tw-react-components 0.0.142 → 0.0.144
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs.js +20 -7
- package/index.esm.js +19 -8
- package/package.json +1 -1
- package/src/contexts/LayoutContext.d.ts +4 -0
- package/src/helpers/resolveTargetObject.d.ts +1 -1
package/index.cjs.js
CHANGED
|
@@ -155,11 +155,13 @@ function mergeRefs(refs) {
|
|
|
155
155
|
};
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
function resolveTargetObject(payload, fieldChain) {
|
|
158
|
+
function resolveTargetObject(payload, fieldChain, defaultValue) {
|
|
159
159
|
if (!fieldChain.length) {
|
|
160
|
-
return payload;
|
|
160
|
+
return payload === null ? payload : payload || defaultValue;
|
|
161
161
|
}
|
|
162
162
|
if (typeof payload !== 'object' || !payload) {
|
|
163
|
+
if (defaultValue)
|
|
164
|
+
return defaultValue;
|
|
163
165
|
throw new Error(`Could not resolve field ${fieldChain[0]} because payload is not an object!`);
|
|
164
166
|
}
|
|
165
167
|
const [key, ...rest] = fieldChain;
|
|
@@ -171,9 +173,9 @@ function resolveTargetObject(payload, fieldChain) {
|
|
|
171
173
|
if (index < 0 || index >= payload.length) {
|
|
172
174
|
throw new Error('Index out of payload boundaries!');
|
|
173
175
|
}
|
|
174
|
-
return resolveTargetObject(payload[index], rest);
|
|
176
|
+
return resolveTargetObject(payload[index], rest, defaultValue);
|
|
175
177
|
}
|
|
176
|
-
return resolveTargetObject(payload[key], rest);
|
|
178
|
+
return resolveTargetObject(payload[key], rest, defaultValue);
|
|
177
179
|
}
|
|
178
180
|
|
|
179
181
|
const variantClassNames = {
|
|
@@ -1336,7 +1338,7 @@ const SelectInput = react.forwardRef((_a, ref) => {
|
|
|
1336
1338
|
}, children: jsxRuntime.jsx("span", { children: renderItem(option, !!selectedMap[option.id]) }) }));
|
|
1337
1339
|
}, [ItemComponent, handleOnSelect, multiple, renderItem, selectedMap]);
|
|
1338
1340
|
return (jsxRuntime.jsxs(DropdownMenu, { open: open, onOpenChange: setOpen, children: [jsxRuntime.jsx(DropdownMenu.Trigger, { className: cn('w-full', className), children: jsxRuntime.jsx(TextInput, Object.assign({ className: "[&>div>*]:cursor-pointer", inputClassName: "text-left" }, props, { value: text !== null && text !== void 0 ? text : '', clearable: clearable && !!selectedItems.length, onClear: handleOnClear, suffixIcon: lucideReact.ChevronDownIcon, onSuffixIconClick: () => setOpen((open) => !open), ref: ref, readOnly: true })) }), jsxRuntime.jsxs(DropdownMenu.Content, { className: "flex max-h-80 w-[calc(var(--radix-popper-anchor-width))] flex-col overflow-hidden", children: [search && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(TextInput, { value: searchValue, placeholder: "Search...", size: props.size, onChange: handleOnSearchValueChange, clearable: !!searchValue.length, onClear: clearSearchValue }), jsxRuntime.jsx(DropdownMenu.Separator, { className: "w-full" })] })), filteredItems.length === 0 &&
|
|
1339
|
-
(allowAddition && searchValue ? (jsxRuntime.jsxs("button", { className: "rounded bg-slate-100 text-center hover:bg-slate-200 dark:bg-slate-900/30 dark:hover:bg-slate-700/30", onClick: handleOnAddItemClicked, children: ["Add '", searchValue, "'"] })) : (jsxRuntime.jsx("div", { className: "text-center text-slate-500", children: "No items." }))), jsxRuntime.jsx(GroupComponent, { className: "flex flex-col gap-1 overflow-auto", value: !multiple && selectedItems.length ? String(selectedItems[0].id) : undefined, children: filteredItems.map((item, index) => item.group ? (jsxRuntime.jsxs(Flex, { className: "gap-1", direction: "column", fullWidth: true, children: [jsxRuntime.jsx(DropdownMenu.Label, { className: "sticky top-0 z-[51] w-full rounded-md border bg-white py-1 dark:bg-slate-900", children: item.label }), item.items.map((subItem) => (jsxRuntime.jsx(RenderOption, Object.assign({}, subItem), subItem.id))), index < filteredItems.length - 1 && (jsxRuntime.jsx("div", { className: "mb-1 h-px w-full bg-slate-200 dark:bg-slate-700" }))] }, item.id)) : (jsxRuntime.jsx(RenderOption, Object.assign({}, item), item.id))) })] })] }));
|
|
1341
|
+
(allowAddition && searchValue ? (jsxRuntime.jsxs("button", { className: "rounded bg-slate-100 py-1.5 text-center hover:bg-slate-200 dark:bg-slate-900/30 dark:hover:bg-slate-700/30", onClick: handleOnAddItemClicked, children: ["Add '", searchValue, "'"] })) : (jsxRuntime.jsx("div", { className: "py-1.5 text-center text-slate-500", children: "No items." }))), jsxRuntime.jsx(GroupComponent, { className: "flex flex-col gap-1 overflow-auto", value: !multiple && selectedItems.length ? String(selectedItems[0].id) : undefined, children: filteredItems.map((item, index) => item.group ? (jsxRuntime.jsxs(Flex, { className: "gap-1", direction: "column", fullWidth: true, children: [jsxRuntime.jsx(DropdownMenu.Label, { className: "sticky top-0 z-[51] w-full rounded-md border bg-white py-1 dark:bg-slate-900", children: item.label }), item.items.map((subItem) => (jsxRuntime.jsx(RenderOption, Object.assign({}, subItem), subItem.id))), index < filteredItems.length - 1 && (jsxRuntime.jsx("div", { className: "mb-1 h-px w-full bg-slate-200 dark:bg-slate-700" }))] }, item.id)) : (jsxRuntime.jsx(RenderOption, Object.assign({}, item), item.id))) })] })] }));
|
|
1340
1342
|
});
|
|
1341
1343
|
|
|
1342
1344
|
const FileInput = react.forwardRef((_a, ref) => {
|
|
@@ -1522,7 +1524,7 @@ const Table = Object.assign($Table, {
|
|
|
1522
1524
|
|
|
1523
1525
|
const possiblePageSize = [5, 10, 25, 50, 100, 500, 1000];
|
|
1524
1526
|
function defaultRender(item, field) {
|
|
1525
|
-
return resolveTargetObject(item, field.split('.'));
|
|
1527
|
+
return resolveTargetObject(item, field.split('.'), '-');
|
|
1526
1528
|
}
|
|
1527
1529
|
function DataTable({ className, columns, rows, sorting, pagination, actions = [], isLoading, rowExtraContent, noDataMessage, onRowClick, rowClassName, }) {
|
|
1528
1530
|
var _a;
|
|
@@ -2112,8 +2114,11 @@ const LayoutContext = react.createContext(undefined);
|
|
|
2112
2114
|
const THEME_MEDIA_QUERY = '(prefers-color-scheme: dark)';
|
|
2113
2115
|
const THEME_COOKIE_NAME = 'theme:state';
|
|
2114
2116
|
const THEME_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
2117
|
+
const SHOW_IDS_COOKIE_NAME = 'show-ids:state';
|
|
2118
|
+
const SHOW_IDS_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
2115
2119
|
const LayoutContextProvider = ({ children }) => {
|
|
2116
2120
|
const [theme, _setTheme] = react.useState(getValueFromCookie(THEME_COOKIE_NAME, 'system'));
|
|
2121
|
+
const [showIds, _setShowIds] = react.useState(getValueFromCookie(SHOW_IDS_COOKIE_NAME, false));
|
|
2117
2122
|
const [resolvedTheme, setResolvedTheme] = react.useState(() => theme === 'system' ? getSystemTheme() : theme);
|
|
2118
2123
|
react.useEffect(() => {
|
|
2119
2124
|
if (resolvedTheme === 'dark') {
|
|
@@ -2139,7 +2144,13 @@ const LayoutContextProvider = ({ children }) => {
|
|
|
2139
2144
|
// This sets the cookie to keep the theme state.
|
|
2140
2145
|
document.cookie = `${THEME_COOKIE_NAME}=${theme}; path=/; max-age=${THEME_COOKIE_MAX_AGE}`;
|
|
2141
2146
|
};
|
|
2142
|
-
|
|
2147
|
+
const toggleShowIds = () => _setShowIds((showIds) => {
|
|
2148
|
+
const newValue = !showIds;
|
|
2149
|
+
// This sets the cookie to keep the showIds state.
|
|
2150
|
+
document.cookie = `${SHOW_IDS_COOKIE_NAME}=${newValue}; path=/; max-age=${SHOW_IDS_COOKIE_MAX_AGE}`;
|
|
2151
|
+
return newValue;
|
|
2152
|
+
});
|
|
2153
|
+
return (jsxRuntime.jsx(LayoutContext.Provider, { value: { theme, resolvedTheme, setTheme, showIds, toggleShowIds }, children: children }));
|
|
2143
2154
|
};
|
|
2144
2155
|
function useLayoutContext() {
|
|
2145
2156
|
const context = react.useContext(LayoutContext);
|
|
@@ -2191,6 +2202,8 @@ exports.Pagination = Pagination;
|
|
|
2191
2202
|
exports.PasswordInput = PasswordInput;
|
|
2192
2203
|
exports.PdfViewerDialog = PdfViewerDialog;
|
|
2193
2204
|
exports.Popover = Popover;
|
|
2205
|
+
exports.SHOW_IDS_COOKIE_MAX_AGE = SHOW_IDS_COOKIE_MAX_AGE;
|
|
2206
|
+
exports.SHOW_IDS_COOKIE_NAME = SHOW_IDS_COOKIE_NAME;
|
|
2194
2207
|
exports.SIDEBAR_COOKIE_MAX_AGE = SIDEBAR_COOKIE_MAX_AGE;
|
|
2195
2208
|
exports.SIDEBAR_COOKIE_NAME = SIDEBAR_COOKIE_NAME;
|
|
2196
2209
|
exports.SIDEBAR_KEYBOARD_SHORTCUT = SIDEBAR_KEYBOARD_SHORTCUT;
|
package/index.esm.js
CHANGED
|
@@ -128,11 +128,13 @@ function mergeRefs(refs) {
|
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
function resolveTargetObject(payload, fieldChain) {
|
|
131
|
+
function resolveTargetObject(payload, fieldChain, defaultValue) {
|
|
132
132
|
if (!fieldChain.length) {
|
|
133
|
-
return payload;
|
|
133
|
+
return payload === null ? payload : payload || defaultValue;
|
|
134
134
|
}
|
|
135
135
|
if (typeof payload !== 'object' || !payload) {
|
|
136
|
+
if (defaultValue)
|
|
137
|
+
return defaultValue;
|
|
136
138
|
throw new Error(`Could not resolve field ${fieldChain[0]} because payload is not an object!`);
|
|
137
139
|
}
|
|
138
140
|
const [key, ...rest] = fieldChain;
|
|
@@ -144,9 +146,9 @@ function resolveTargetObject(payload, fieldChain) {
|
|
|
144
146
|
if (index < 0 || index >= payload.length) {
|
|
145
147
|
throw new Error('Index out of payload boundaries!');
|
|
146
148
|
}
|
|
147
|
-
return resolveTargetObject(payload[index], rest);
|
|
149
|
+
return resolveTargetObject(payload[index], rest, defaultValue);
|
|
148
150
|
}
|
|
149
|
-
return resolveTargetObject(payload[key], rest);
|
|
151
|
+
return resolveTargetObject(payload[key], rest, defaultValue);
|
|
150
152
|
}
|
|
151
153
|
|
|
152
154
|
const variantClassNames = {
|
|
@@ -1309,7 +1311,7 @@ const SelectInput = forwardRef((_a, ref) => {
|
|
|
1309
1311
|
}, children: jsx("span", { children: renderItem(option, !!selectedMap[option.id]) }) }));
|
|
1310
1312
|
}, [ItemComponent, handleOnSelect, multiple, renderItem, selectedMap]);
|
|
1311
1313
|
return (jsxs(DropdownMenu, { open: open, onOpenChange: setOpen, children: [jsx(DropdownMenu.Trigger, { className: cn('w-full', className), children: jsx(TextInput, Object.assign({ className: "[&>div>*]:cursor-pointer", inputClassName: "text-left" }, props, { value: text !== null && text !== void 0 ? text : '', clearable: clearable && !!selectedItems.length, onClear: handleOnClear, suffixIcon: ChevronDownIcon, onSuffixIconClick: () => setOpen((open) => !open), ref: ref, readOnly: true })) }), jsxs(DropdownMenu.Content, { className: "flex max-h-80 w-[calc(var(--radix-popper-anchor-width))] flex-col overflow-hidden", children: [search && (jsxs(Fragment, { children: [jsx(TextInput, { value: searchValue, placeholder: "Search...", size: props.size, onChange: handleOnSearchValueChange, clearable: !!searchValue.length, onClear: clearSearchValue }), jsx(DropdownMenu.Separator, { className: "w-full" })] })), filteredItems.length === 0 &&
|
|
1312
|
-
(allowAddition && searchValue ? (jsxs("button", { className: "rounded bg-slate-100 text-center hover:bg-slate-200 dark:bg-slate-900/30 dark:hover:bg-slate-700/30", onClick: handleOnAddItemClicked, children: ["Add '", searchValue, "'"] })) : (jsx("div", { className: "text-center text-slate-500", children: "No items." }))), jsx(GroupComponent, { className: "flex flex-col gap-1 overflow-auto", value: !multiple && selectedItems.length ? String(selectedItems[0].id) : undefined, children: filteredItems.map((item, index) => item.group ? (jsxs(Flex, { className: "gap-1", direction: "column", fullWidth: true, children: [jsx(DropdownMenu.Label, { className: "sticky top-0 z-[51] w-full rounded-md border bg-white py-1 dark:bg-slate-900", children: item.label }), item.items.map((subItem) => (jsx(RenderOption, Object.assign({}, subItem), subItem.id))), index < filteredItems.length - 1 && (jsx("div", { className: "mb-1 h-px w-full bg-slate-200 dark:bg-slate-700" }))] }, item.id)) : (jsx(RenderOption, Object.assign({}, item), item.id))) })] })] }));
|
|
1314
|
+
(allowAddition && searchValue ? (jsxs("button", { className: "rounded bg-slate-100 py-1.5 text-center hover:bg-slate-200 dark:bg-slate-900/30 dark:hover:bg-slate-700/30", onClick: handleOnAddItemClicked, children: ["Add '", searchValue, "'"] })) : (jsx("div", { className: "py-1.5 text-center text-slate-500", children: "No items." }))), jsx(GroupComponent, { className: "flex flex-col gap-1 overflow-auto", value: !multiple && selectedItems.length ? String(selectedItems[0].id) : undefined, children: filteredItems.map((item, index) => item.group ? (jsxs(Flex, { className: "gap-1", direction: "column", fullWidth: true, children: [jsx(DropdownMenu.Label, { className: "sticky top-0 z-[51] w-full rounded-md border bg-white py-1 dark:bg-slate-900", children: item.label }), item.items.map((subItem) => (jsx(RenderOption, Object.assign({}, subItem), subItem.id))), index < filteredItems.length - 1 && (jsx("div", { className: "mb-1 h-px w-full bg-slate-200 dark:bg-slate-700" }))] }, item.id)) : (jsx(RenderOption, Object.assign({}, item), item.id))) })] })] }));
|
|
1313
1315
|
});
|
|
1314
1316
|
|
|
1315
1317
|
const FileInput = forwardRef((_a, ref) => {
|
|
@@ -1495,7 +1497,7 @@ const Table = Object.assign($Table, {
|
|
|
1495
1497
|
|
|
1496
1498
|
const possiblePageSize = [5, 10, 25, 50, 100, 500, 1000];
|
|
1497
1499
|
function defaultRender(item, field) {
|
|
1498
|
-
return resolveTargetObject(item, field.split('.'));
|
|
1500
|
+
return resolveTargetObject(item, field.split('.'), '-');
|
|
1499
1501
|
}
|
|
1500
1502
|
function DataTable({ className, columns, rows, sorting, pagination, actions = [], isLoading, rowExtraContent, noDataMessage, onRowClick, rowClassName, }) {
|
|
1501
1503
|
var _a;
|
|
@@ -2085,8 +2087,11 @@ const LayoutContext = createContext(undefined);
|
|
|
2085
2087
|
const THEME_MEDIA_QUERY = '(prefers-color-scheme: dark)';
|
|
2086
2088
|
const THEME_COOKIE_NAME = 'theme:state';
|
|
2087
2089
|
const THEME_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
2090
|
+
const SHOW_IDS_COOKIE_NAME = 'show-ids:state';
|
|
2091
|
+
const SHOW_IDS_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
2088
2092
|
const LayoutContextProvider = ({ children }) => {
|
|
2089
2093
|
const [theme, _setTheme] = useState(getValueFromCookie(THEME_COOKIE_NAME, 'system'));
|
|
2094
|
+
const [showIds, _setShowIds] = useState(getValueFromCookie(SHOW_IDS_COOKIE_NAME, false));
|
|
2090
2095
|
const [resolvedTheme, setResolvedTheme] = useState(() => theme === 'system' ? getSystemTheme() : theme);
|
|
2091
2096
|
useEffect(() => {
|
|
2092
2097
|
if (resolvedTheme === 'dark') {
|
|
@@ -2112,7 +2117,13 @@ const LayoutContextProvider = ({ children }) => {
|
|
|
2112
2117
|
// This sets the cookie to keep the theme state.
|
|
2113
2118
|
document.cookie = `${THEME_COOKIE_NAME}=${theme}; path=/; max-age=${THEME_COOKIE_MAX_AGE}`;
|
|
2114
2119
|
};
|
|
2115
|
-
|
|
2120
|
+
const toggleShowIds = () => _setShowIds((showIds) => {
|
|
2121
|
+
const newValue = !showIds;
|
|
2122
|
+
// This sets the cookie to keep the showIds state.
|
|
2123
|
+
document.cookie = `${SHOW_IDS_COOKIE_NAME}=${newValue}; path=/; max-age=${SHOW_IDS_COOKIE_MAX_AGE}`;
|
|
2124
|
+
return newValue;
|
|
2125
|
+
});
|
|
2126
|
+
return (jsx(LayoutContext.Provider, { value: { theme, resolvedTheme, setTheme, showIds, toggleShowIds }, children: children }));
|
|
2116
2127
|
};
|
|
2117
2128
|
function useLayoutContext() {
|
|
2118
2129
|
const context = useContext(LayoutContext);
|
|
@@ -2132,4 +2143,4 @@ const ThemeSelector = ({ className }) => {
|
|
|
2132
2143
|
return (jsxs(DropdownMenu, { children: [jsx(DropdownMenu.Trigger, { asChild: true, children: jsx(Button, { prefixIcon: resolvedTheme === 'dark' ? MoonIcon : SunIcon, className: className, variant: "text" }) }), jsxs(DropdownMenu.Content, { children: [jsxs(DropdownMenu.Item, { onClick: () => setTheme('light'), children: [jsx(DropdownMenu.Icon, { icon: SunIcon }), "Light"] }), jsxs(DropdownMenu.Item, { onClick: () => setTheme('dark'), children: [jsx(DropdownMenu.Icon, { icon: MoonIcon }), "Dark"] }), jsxs(DropdownMenu.Item, { onClick: () => setTheme('system'), children: [jsx(DropdownMenu.Icon, { icon: MonitorIcon }), "System"] })] })] }));
|
|
2133
2144
|
};
|
|
2134
2145
|
|
|
2135
|
-
export { Badge, BasicInput, BasicInputExtension, Block, Button, Card, CheckboxInput, ConfirmDialog, DataTable, DateTimeInput, Dialog, DropdownMenu, EmailInput, FileInput, Flex, FormDialog, FormGroup, FormInputs, Hint, Label, Layout, LayoutContext, LayoutContextProvider, List, ListSorter, ListSorterDialog, Navbar, NumberInput, Pagination, PasswordInput, PdfViewerDialog, Popover, SIDEBAR_COOKIE_MAX_AGE, SIDEBAR_COOKIE_NAME, SIDEBAR_KEYBOARD_SHORTCUT, SIDEBAR_WIDTH, SIDEBAR_WIDTH_ICON, SIDEBAR_WIDTH_MOBILE, SelectInput, Separator, Sheet, Sidebar, SidebarContext, SidebarContextProvider, Skeleton, Spinner, Switch, THEME_COOKIE_MAX_AGE, THEME_COOKIE_NAME, THEME_MEDIA_QUERY, Table, Tabs, TextInput, TextareaInput, ThemeSelector, Tooltip, cn, compareDates, generalComparator, getDisplayDate, getValueFromCookie, isEmpty, mergeRefs, resolveTargetObject, useDays, useIsMobile, useLayoutContext, useLongPress, useMonths, useOnSwipe, useOutsideClick, usePagination, useSidebar };
|
|
2146
|
+
export { Badge, BasicInput, BasicInputExtension, Block, Button, Card, CheckboxInput, ConfirmDialog, DataTable, DateTimeInput, Dialog, DropdownMenu, EmailInput, FileInput, Flex, FormDialog, FormGroup, FormInputs, Hint, Label, Layout, LayoutContext, LayoutContextProvider, List, ListSorter, ListSorterDialog, Navbar, NumberInput, Pagination, PasswordInput, PdfViewerDialog, Popover, SHOW_IDS_COOKIE_MAX_AGE, SHOW_IDS_COOKIE_NAME, SIDEBAR_COOKIE_MAX_AGE, SIDEBAR_COOKIE_NAME, SIDEBAR_KEYBOARD_SHORTCUT, SIDEBAR_WIDTH, SIDEBAR_WIDTH_ICON, SIDEBAR_WIDTH_MOBILE, SelectInput, Separator, Sheet, Sidebar, SidebarContext, SidebarContextProvider, Skeleton, Spinner, Switch, THEME_COOKIE_MAX_AGE, THEME_COOKIE_NAME, THEME_MEDIA_QUERY, Table, Tabs, TextInput, TextareaInput, ThemeSelector, Tooltip, cn, compareDates, generalComparator, getDisplayDate, getValueFromCookie, isEmpty, mergeRefs, resolveTargetObject, useDays, useIsMobile, useLayoutContext, useLongPress, useMonths, useOnSwipe, useOutsideClick, usePagination, useSidebar };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tw-react-components",
|
|
3
3
|
"description": "A set of React components build with TailwindCSS to make a nice dashboard.",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.144",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://bacali95.github.io/tw-react-components",
|
|
7
7
|
"author": {
|
|
@@ -4,10 +4,14 @@ export type LayoutContext = {
|
|
|
4
4
|
theme: ThemeState;
|
|
5
5
|
resolvedTheme: Exclude<ThemeState, 'system'>;
|
|
6
6
|
setTheme: (theme: ThemeState) => void;
|
|
7
|
+
showIds: boolean;
|
|
8
|
+
toggleShowIds: () => void;
|
|
7
9
|
};
|
|
8
10
|
export declare const LayoutContext: import("react").Context<LayoutContext | undefined>;
|
|
9
11
|
export declare const THEME_MEDIA_QUERY = "(prefers-color-scheme: dark)";
|
|
10
12
|
export declare const THEME_COOKIE_NAME = "theme:state";
|
|
11
13
|
export declare const THEME_COOKIE_MAX_AGE: number;
|
|
14
|
+
export declare const SHOW_IDS_COOKIE_NAME = "show-ids:state";
|
|
15
|
+
export declare const SHOW_IDS_COOKIE_MAX_AGE: number;
|
|
12
16
|
export declare const LayoutContextProvider: FC<PropsWithChildren>;
|
|
13
17
|
export declare function useLayoutContext(): LayoutContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function resolveTargetObject(payload: any, fieldChain: string[]): any;
|
|
1
|
+
export declare function resolveTargetObject(payload: any, fieldChain: string[], defaultValue?: any): any;
|