This commit is contained in:
Nathan Bierema 2023-11-13 10:37:09 -05:00
parent 5b388bec7f
commit 7408db7d7d
9 changed files with 32 additions and 32 deletions

View File

@ -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) => {

View File

@ -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

View File

@ -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,

View File

@ -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;
};
};
};

View File

@ -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) =>

View File

@ -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) =>

View File

@ -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);
}

View File

@ -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) ||

View File

@ -41,8 +41,8 @@ function str2array(
return typeof str === 'string'
? [str]
: str && str.length > 0
? str
: undefined;
? str
: undefined;
}
function getRandomId() {