mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-22 14:09:46 +03:00
Format
This commit is contained in:
parent
5b388bec7f
commit
7408db7d7d
|
@ -62,13 +62,13 @@ const migrateOldOptions = (oldOptions: OldOrNewOptions): Options => ({
|
|||
? oldOptions.filter && oldOptions.whitelist.length > 0
|
||||
? FilterState.ALLOWLIST_SPECIFIC
|
||||
: oldOptions.filter
|
||||
? FilterState.DENYLIST_SPECIFIC
|
||||
: FilterState.DO_NOT_FILTER
|
||||
? FilterState.DENYLIST_SPECIFIC
|
||||
: FilterState.DO_NOT_FILTER
|
||||
: oldOptions.filter === 'WHITELIST_SPECIFIC'
|
||||
? FilterState.ALLOWLIST_SPECIFIC
|
||||
: oldOptions.filter === 'BLACKLIST_SPECIFIC'
|
||||
? FilterState.DENYLIST_SPECIFIC
|
||||
: oldOptions.filter,
|
||||
? FilterState.ALLOWLIST_SPECIFIC
|
||||
: oldOptions.filter === 'BLACKLIST_SPECIFIC'
|
||||
? FilterState.DENYLIST_SPECIFIC
|
||||
: oldOptions.filter,
|
||||
});
|
||||
|
||||
const get = (callback: (options: Options) => void) => {
|
||||
|
|
|
@ -401,8 +401,8 @@ export default function (DOMNode: HTMLElement, options: Partial<Options> = {}) {
|
|||
d.data._children && d.data._children.length > 0
|
||||
? nodeStyleOptions.colors.collapsed
|
||||
: d.data.children && d.data.children.length > 0
|
||||
? nodeStyleOptions.colors.parent
|
||||
: nodeStyleOptions.colors.default,
|
||||
? nodeStyleOptions.colors.parent
|
||||
: nodeStyleOptions.colors.default,
|
||||
);
|
||||
|
||||
// transition nodes to their new position
|
||||
|
|
|
@ -190,8 +190,8 @@ export const invertBase16Theme = (base16Theme: Base16Theme): Base16Theme =>
|
|||
(t[key as keyof Base16Theme] = /^base/.test(key)
|
||||
? invertColor(base16Theme[key as keyof Base16Theme])
|
||||
: key === 'scheme'
|
||||
? base16Theme[key] + ':inverted'
|
||||
: base16Theme[key as keyof Base16Theme]),
|
||||
? base16Theme[key] + ':inverted'
|
||||
: base16Theme[key as keyof Base16Theme]),
|
||||
t
|
||||
),
|
||||
{} as Base16Theme,
|
||||
|
|
|
@ -34,17 +34,17 @@ export const composeWithDevTools: ReduxDevtoolsExtensionCompose =
|
|||
process.env.NODE_ENV === 'production'
|
||||
? logOnly.composeWithDevTools
|
||||
: typeof window !== 'undefined' &&
|
||||
window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
|
||||
? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
|
||||
: extensionComposeStub;
|
||||
window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
|
||||
? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
|
||||
: extensionComposeStub;
|
||||
|
||||
export const devToolsEnhancer: (options?: EnhancerOptions) => StoreEnhancer =
|
||||
process.env.NODE_ENV === 'production'
|
||||
? logOnly.devToolsEnhancer
|
||||
: typeof window !== 'undefined' && window.__REDUX_DEVTOOLS_EXTENSION__
|
||||
? window.__REDUX_DEVTOOLS_EXTENSION__
|
||||
: function () {
|
||||
return function (noop) {
|
||||
return noop;
|
||||
? window.__REDUX_DEVTOOLS_EXTENSION__
|
||||
: function () {
|
||||
return function (noop) {
|
||||
return noop;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -173,10 +173,10 @@ export const rootReducer: Reducer<DemoAppState, DemoAppAction> =
|
|||
action.type === 'PUSH'
|
||||
? [...state, Math.random()]
|
||||
: action.type === 'POP'
|
||||
? state.slice(0, state.length - 1)
|
||||
: action.type === 'REPLACE'
|
||||
? [Math.random(), ...state.slice(1)]
|
||||
: state,
|
||||
? state.slice(0, state.length - 1)
|
||||
: action.type === 'REPLACE'
|
||||
? [Math.random(), ...state.slice(1)]
|
||||
: state,
|
||||
hugeArrays: (state = [], action) =>
|
||||
action.type === 'PUSH_HUGE_ARRAY' ? [...state, ...HUGE_ARRAY] : state,
|
||||
hugeObjects: (state = [], action) =>
|
||||
|
|
|
@ -203,10 +203,10 @@ export const rootReducer: Reducer<DemoAppState, DemoAppAction> =
|
|||
action.type === 'PUSH'
|
||||
? [...state, Math.random()]
|
||||
: action.type === 'POP'
|
||||
? state.slice(0, state.length - 1)
|
||||
: action.type === 'REPLACE'
|
||||
? [Math.random(), ...state.slice(1)]
|
||||
: state,
|
||||
? state.slice(0, state.length - 1)
|
||||
: action.type === 'REPLACE'
|
||||
? [Math.random(), ...state.slice(1)]
|
||||
: state,
|
||||
hugeArrays: (state = [], action) =>
|
||||
action.type === 'PUSH_HUGE_ARRAY' ? [...state, ...HUGE_ARRAY] : state,
|
||||
hugeObjects: (state = [], action) =>
|
||||
|
|
|
@ -127,8 +127,8 @@ export default function ActionList<A extends Action<string>>({
|
|||
overIndex < activeIndex
|
||||
? (over.id as number)
|
||||
: overIndex < actionIds.length - 1
|
||||
? actionIds[overIndex + 1]
|
||||
: actionIds.length;
|
||||
? actionIds[overIndex + 1]
|
||||
: actionIds.length;
|
||||
|
||||
onReorderAction(active.id as number, beforeActionId);
|
||||
}
|
||||
|
|
|
@ -113,8 +113,8 @@ class ActionPreview<S, A extends Action<string>> extends Component<
|
|||
typeof tabs === 'function'
|
||||
? tabs(DEFAULT_TABS as Tab<S, A>[])
|
||||
: tabs
|
||||
? tabs
|
||||
: (DEFAULT_TABS as Tab<S, A>[]);
|
||||
? tabs
|
||||
: (DEFAULT_TABS as Tab<S, A>[]);
|
||||
|
||||
const { component: TabComponent } =
|
||||
renderedTabs.find((tab) => tab.name === tabName) ||
|
||||
|
|
|
@ -41,8 +41,8 @@ function str2array(
|
|||
return typeof str === 'string'
|
||||
? [str]
|
||||
: str && str.length > 0
|
||||
? str
|
||||
: undefined;
|
||||
? str
|
||||
: undefined;
|
||||
}
|
||||
|
||||
function getRandomId() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user