@dndbuilder.com/react
Version:
Drag and drop builder for React
276 lines (275 loc) • 11 kB
TypeScript
import { RootState } from './index';
import { SettingsType, AnyObject } from '../types';
import { Block } from '../types/block';
export declare const getContentRoot: (state: RootState) => Block;
export declare const getContent: (state: RootState) => Record<string, Block>;
export declare const getBlock: <T extends object = AnyObject>(id: Block["id"]) => (state: RootState) => Block<T>;
export declare const getBlocks: (ids: Block["id"][]) => (state: RootState) => Block[];
export declare const getBlockSettings: <T extends object = AnyObject>(id: Block["id"]) => (state: RootState) => T;
export declare const getBlockSettingsValueByKey: <T = unknown>(id: Block["id"], key: string) => (state: RootState) => T;
export declare const getBlockAdvancedSettings: <T extends object = AnyObject>(id: Block["id"]) => (state: RootState) => T;
export declare const getBlockAdvancedSettingsValueByKey: <T = unknown>(id: Block["id"], key: string) => (state: RootState) => T;
export declare const getSelectedBlock: <T extends object = AnyObject>(state: RootState) => Block<T> | null;
export declare const getSelectedBlockId: (state: RootState) => string | null;
export declare const getIsAnyChildSelected: (id: Block["id"]) => (state: RootState) => boolean;
export declare const getBlockIndex: (id: Block["id"]) => (state: RootState) => number;
export declare const getIsBlockSelected: (id: Block["id"]) => (state: RootState) => boolean;
export declare const getCurrentBreakpoint: (state: RootState) => import('..').Breakpoint;
export declare const getCurrentLocale: (state: RootState) => string;
export declare const getActiveTheme: (state: RootState) => import('..').Theme;
export declare const getActiveThemeId: (state: RootState) => string;
export declare const getActiveThemeSettings: (state: RootState) => import('..').ThemeSettings;
export declare const getActiveThemeContainerSettings: ((state: {
app: import('./app-slice').AppState;
builder: import('redux-undo').StateWithHistory<import('./builder-slice').BuilderState>;
theme: import('./theme-slice').ThemeState;
}) => {
width?: import('..').ResponsiveValue<import('..').UnitValue>;
maxWidth?: import('..').ResponsiveValue<import('..').UnitValue>;
padding?: import('..').ResponsiveValue<import('..').SpacingValue>;
gap?: import('..').ResponsiveValue<{
x?: number;
y?: number;
linked?: boolean;
unit?: import('..').Unit;
}>;
}) & {
clearCache: () => void;
resultsCount: () => number;
resetResultsCount: () => void;
} & {
resultFunc: (resultFuncArgs_0: import('..').ThemeSettings) => {
width?: import('..').ResponsiveValue<import('..').UnitValue>;
maxWidth?: import('..').ResponsiveValue<import('..').UnitValue>;
padding?: import('..').ResponsiveValue<import('..').SpacingValue>;
gap?: import('..').ResponsiveValue<{
x?: number;
y?: number;
linked?: boolean;
unit?: import('..').Unit;
}>;
};
memoizedResultFunc: ((resultFuncArgs_0: import('..').ThemeSettings) => {
width?: import('..').ResponsiveValue<import('..').UnitValue>;
maxWidth?: import('..').ResponsiveValue<import('..').UnitValue>;
padding?: import('..').ResponsiveValue<import('..').SpacingValue>;
gap?: import('..').ResponsiveValue<{
x?: number;
y?: number;
linked?: boolean;
unit?: import('..').Unit;
}>;
}) & {
clearCache: () => void;
resultsCount: () => number;
resetResultsCount: () => void;
};
lastResult: () => {
width?: import('..').ResponsiveValue<import('..').UnitValue>;
maxWidth?: import('..').ResponsiveValue<import('..').UnitValue>;
padding?: import('..').ResponsiveValue<import('..').SpacingValue>;
gap?: import('..').ResponsiveValue<{
x?: number;
y?: number;
linked?: boolean;
unit?: import('..').Unit;
}>;
};
dependencies: [(state: RootState) => import('..').ThemeSettings];
recomputations: () => number;
resetRecomputations: () => void;
dependencyRecomputations: () => number;
resetDependencyRecomputations: () => void;
} & {
argsMemoize: typeof import('@reduxjs/toolkit').weakMapMemoize;
memoize: typeof import('@reduxjs/toolkit').weakMapMemoize;
};
export declare const getActiveThemeColorSettings: ((state: {
app: import('./app-slice').AppState;
builder: import('redux-undo').StateWithHistory<import('./builder-slice').BuilderState>;
theme: import('./theme-slice').ThemeState;
}) => {
accentColor: string;
backgroundColor: string;
textColor: string;
presets?: {
id: string;
name: string;
value: string;
}[];
}) & {
clearCache: () => void;
resultsCount: () => number;
resetResultsCount: () => void;
} & {
resultFunc: (resultFuncArgs_0: import('..').ThemeSettings) => {
accentColor: string;
backgroundColor: string;
textColor: string;
presets?: {
id: string;
name: string;
value: string;
}[];
};
memoizedResultFunc: ((resultFuncArgs_0: import('..').ThemeSettings) => {
accentColor: string;
backgroundColor: string;
textColor: string;
presets?: {
id: string;
name: string;
value: string;
}[];
}) & {
clearCache: () => void;
resultsCount: () => number;
resetResultsCount: () => void;
};
lastResult: () => {
accentColor: string;
backgroundColor: string;
textColor: string;
presets?: {
id: string;
name: string;
value: string;
}[];
};
dependencies: [(state: RootState) => import('..').ThemeSettings];
recomputations: () => number;
resetRecomputations: () => void;
dependencyRecomputations: () => number;
resetDependencyRecomputations: () => void;
} & {
argsMemoize: typeof import('@reduxjs/toolkit').weakMapMemoize;
memoize: typeof import('@reduxjs/toolkit').weakMapMemoize;
};
export declare const getActiveThemeSettingsValueByKey: <T = unknown>(key: string) => (state: RootState) => T;
export declare const getActiveThemeColorPresets: ((state: {
app: import('./app-slice').AppState;
builder: import('redux-undo').StateWithHistory<import('./builder-slice').BuilderState>;
theme: import('./theme-slice').ThemeState;
}) => {
id: string;
name: string;
value: string;
}[] | undefined) & {
clearCache: () => void;
resultsCount: () => number;
resetResultsCount: () => void;
} & {
resultFunc: (resultFuncArgs_0: import('..').ThemeSettings) => {
id: string;
name: string;
value: string;
}[] | undefined;
memoizedResultFunc: ((resultFuncArgs_0: import('..').ThemeSettings) => {
id: string;
name: string;
value: string;
}[] | undefined) & {
clearCache: () => void;
resultsCount: () => number;
resetResultsCount: () => void;
};
lastResult: () => {
id: string;
name: string;
value: string;
}[] | undefined;
dependencies: [(state: RootState) => import('..').ThemeSettings];
recomputations: () => number;
resetRecomputations: () => void;
dependencyRecomputations: () => number;
resetDependencyRecomputations: () => void;
} & {
argsMemoize: typeof import('@reduxjs/toolkit').weakMapMemoize;
memoize: typeof import('@reduxjs/toolkit').weakMapMemoize;
};
export declare const getActiveThemeTypographyPresets: ((state: {
app: import('./app-slice').AppState;
builder: import('redux-undo').StateWithHistory<import('./builder-slice').BuilderState>;
theme: import('./theme-slice').ThemeState;
}) => {
id: string;
name: string;
value: Omit<import('..').TypographyType, "presets">;
}[] | undefined) & {
clearCache: () => void;
resultsCount: () => number;
resetResultsCount: () => void;
} & {
resultFunc: (resultFuncArgs_0: import('..').ThemeSettings) => {
id: string;
name: string;
value: Omit<import('..').TypographyType, "presets">;
}[] | undefined;
memoizedResultFunc: ((resultFuncArgs_0: import('..').ThemeSettings) => {
id: string;
name: string;
value: Omit<import('..').TypographyType, "presets">;
}[] | undefined) & {
clearCache: () => void;
resultsCount: () => number;
resetResultsCount: () => void;
};
lastResult: () => {
id: string;
name: string;
value: Omit<import('..').TypographyType, "presets">;
}[] | undefined;
dependencies: [(state: RootState) => import('..').ThemeSettings];
recomputations: () => number;
resetRecomputations: () => void;
dependencyRecomputations: () => number;
resetDependencyRecomputations: () => void;
} & {
argsMemoize: typeof import('@reduxjs/toolkit').weakMapMemoize;
memoize: typeof import('@reduxjs/toolkit').weakMapMemoize;
};
export declare const getActiveThemeButtonPresets: ((state: {
app: import('./app-slice').AppState;
builder: import('redux-undo').StateWithHistory<import('./builder-slice').BuilderState>;
theme: import('./theme-slice').ThemeState;
}) => {
id: string;
name: string;
value: Omit<import('..').ThemeSettings["button"], "presets">;
}[] | undefined) & {
clearCache: () => void;
resultsCount: () => number;
resetResultsCount: () => void;
} & {
resultFunc: (resultFuncArgs_0: import('..').ThemeSettings) => {
id: string;
name: string;
value: Omit<import('..').ThemeSettings["button"], "presets">;
}[] | undefined;
memoizedResultFunc: ((resultFuncArgs_0: import('..').ThemeSettings) => {
id: string;
name: string;
value: Omit<import('..').ThemeSettings["button"], "presets">;
}[] | undefined) & {
clearCache: () => void;
resultsCount: () => number;
resetResultsCount: () => void;
};
lastResult: () => {
id: string;
name: string;
value: Omit<import('..').ThemeSettings["button"], "presets">;
}[] | undefined;
dependencies: [(state: RootState) => import('..').ThemeSettings];
recomputations: () => number;
resetRecomputations: () => void;
dependencyRecomputations: () => number;
resetDependencyRecomputations: () => void;
} & {
argsMemoize: typeof import('@reduxjs/toolkit').weakMapMemoize;
memoize: typeof import('@reduxjs/toolkit').weakMapMemoize;
};
export declare const getSettings: <T extends object = AnyObject>(type: "block" | "advanced" | "theme") => (state: RootState) => T;
export declare const getSettingsValueByKey: <T = unknown>(key: string, type: SettingsType) => (state: RootState) => T;
export declare const loadBlockChildren: (id: Block["id"]) => (state: RootState) => any;
//# sourceMappingURL=selectors.d.ts.map