@applica-software-guru/react-admin 1.5.352 → 1.5.354
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/dist/components/ra-lists/List.d.ts.map +1 -1
- package/dist/components/ra-lists/ListTabsToolbar.d.ts +1 -1
- package/dist/components/ra-lists/ListTabsToolbar.d.ts.map +1 -1
- package/dist/components/ra-lists/ListToolbar.d.ts +2 -0
- package/dist/components/ra-lists/ListToolbar.d.ts.map +1 -1
- package/dist/components/ra-lists/ListView.d.ts +17 -0
- package/dist/components/ra-lists/ListView.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/useLocalStorage.d.ts +26 -0
- package/dist/hooks/useLocalStorage.d.ts.map +1 -1
- package/dist/hooks/useSessionStorage.d.ts +29 -0
- package/dist/hooks/useSessionStorage.d.ts.map +1 -0
- package/dist/react-admin.cjs.js +61 -61
- package/dist/react-admin.cjs.js.gz +0 -0
- package/dist/react-admin.cjs.js.map +1 -1
- package/dist/react-admin.es.js +10473 -10336
- package/dist/react-admin.es.js.gz +0 -0
- package/dist/react-admin.es.js.map +1 -1
- package/dist/react-admin.umd.js +59 -59
- package/dist/react-admin.umd.js.gz +0 -0
- package/dist/react-admin.umd.js.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/sessionStorage.d.ts +16 -0
- package/dist/utils/sessionStorage.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/components/ra-lists/List.tsx +0 -1
- package/src/components/ra-lists/ListTabsToolbar.tsx +80 -15
- package/src/components/ra-lists/ListToolbar.tsx +79 -36
- package/src/components/ra-lists/ListView.tsx +20 -2
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useLocalStorage.tsx +26 -0
- package/src/hooks/useSessionStorage.tsx +74 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/sessionStorage.ts +73 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-lists/List.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-lists/List.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAyNxC,iBAAS,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,YAAY,CAI5C;AAED,OAAO,EAAE,IAAI,EAAE,CAAC;AAChB,YAAY,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -9,6 +9,6 @@ type ListTabToolbarConfig = {
|
|
|
9
9
|
interface ListTabsToolbarProps {
|
|
10
10
|
tabs?: ListTabToolbarConfig[];
|
|
11
11
|
}
|
|
12
|
-
declare function ListTabsToolbar(props: ListTabsToolbarProps): import("react/jsx-runtime").JSX.Element
|
|
12
|
+
declare function ListTabsToolbar(props: ListTabsToolbarProps): import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export { type ListTabToolbarConfig, ListTabsToolbar };
|
|
14
14
|
//# sourceMappingURL=ListTabsToolbar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListTabsToolbar.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-lists/ListTabsToolbar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ListTabsToolbar.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-lists/ListTabsToolbar.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAA2C,MAAM,OAAO,CAAC;AAK9E,KAAK,oBAAoB,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,UAAU,oBAAoB;IAC5B,IAAI,CAAC,EAAE,oBAAoB,EAAE,CAAC;CAC/B;AAED,iBAAS,eAAe,CAAC,KAAK,EAAE,oBAAoB,2CA8GnD;AAED,OAAO,EAAE,KAAK,oBAAoB,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -2,8 +2,10 @@ import React, { ReactElement } from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { ToolbarProps } from '@mui/material';
|
|
4
4
|
import { Exporter } from 'ra-core';
|
|
5
|
+
import { ListTabToolbarConfig } from './ListTabsToolbar';
|
|
5
6
|
interface ListToolbarPropsExtended extends ListToolbarProps {
|
|
6
7
|
hasFilterSidebar?: boolean;
|
|
8
|
+
tabs?: ListTabToolbarConfig[];
|
|
7
9
|
}
|
|
8
10
|
declare function ListToolbarComp(props: ListToolbarPropsExtended): ReactElement | null;
|
|
9
11
|
declare namespace ListToolbarComp {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListToolbar.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-lists/ListToolbar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ListToolbar.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-lists/ListToolbar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,YAAY,EAAQ,MAAM,OAAO,CAAC;AAElD,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAgB,YAAY,EAAiB,MAAM,eAAe,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAkB,MAAM,SAAS,CAAC;AAInD,OAAO,EAAE,oBAAoB,EAAmB,MAAM,mBAAmB,CAAC;AAE1E,UAAU,wBAAyB,SAAQ,gBAAgB;IACzD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,IAAI,CAAC,EAAE,oBAAoB,EAAE,CAAC;CAC/B;AAED,iBAAS,eAAe,CAAC,KAAK,EAAE,wBAAwB,GAAG,YAAY,GAAG,IAAI,CA4F7E;kBA5FQ,eAAe;;;;;;;AAsGxB,UAAU,gBAAiB,SAAQ,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,UAAU,CAAC;IAC3E,OAAO,CAAC,EAAE,YAAY,GAAG,KAAK,CAAC;IAC/B,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;IAC5B,OAAO,CAAC,EAAE,YAAY,GAAG,YAAY,EAAE,CAAC;IACxC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAwBD,QAAA,MAAM,WAAW,mDAAwB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,CAAC;AACvB,YAAY,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -20,6 +20,23 @@ interface ListViewProps {
|
|
|
20
20
|
* );
|
|
21
21
|
*/
|
|
22
22
|
tabs?: ListTabToolbarConfig[];
|
|
23
|
+
/**
|
|
24
|
+
* A unique key to identify the tab group. Used to persist the selected tab in session storage.
|
|
25
|
+
* Must be stable across renders and unique among different List components.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* import { List, ListTabToolbarConfig } from 'react-admin';
|
|
29
|
+
* const tabs: ListTabToolbarConfig[] = [
|
|
30
|
+
* { label: 'Published', key: 'published', icon: <IconPublished />, filter: { status: 'published' }, default: true },
|
|
31
|
+
* { label: 'Drafts', key: 'drafts', icon: <IconDrafts />, filter: { status: 'draft' } },
|
|
32
|
+
* ];
|
|
33
|
+
* const PostList = () => (
|
|
34
|
+
* <List tabs={tabs} tabGroupKey="post-list-tabs">
|
|
35
|
+
* ...
|
|
36
|
+
* </List>
|
|
37
|
+
* );
|
|
38
|
+
*/
|
|
39
|
+
tabGroupKey?: string;
|
|
23
40
|
/**
|
|
24
41
|
* The actions to display in the toolbar. defaults to Filter + Create + Export.
|
|
25
42
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListView.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-lists/ListView.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,QAAQ,EAAkB,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAgB,MAAM,OAAO,CAAC;AAY3E,OAAO,EAAE,KAAK,oBAAoB,
|
|
1
|
+
{"version":3,"file":"ListView.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-lists/ListView.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,QAAQ,EAAkB,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAgB,MAAM,OAAO,CAAC;AAY3E,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAO9D,iBAAS,QAAQ,CAAC,UAAU,SAAS,QAAQ,GAAG,GAAG,EAAE,KAAK,EAAE,aAAa,GAAG,YAAY,GAAG,IAAI,CA0I9F;AAuCD,UAAU,aAAa;IACrB;;;;;;;;;;;;;;OAcG;IACH,IAAI,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAE9B;;;;;;;;;;;;;;;OAeG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACH,OAAO,CAAC,EAAE,YAAY,GAAG,KAAK,CAAC;IAE/B;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,KAAK,CAAC,EAAE,YAAY,CAAC;IAErB;;OAEG;IACH,iBAAiB,CAAC,EAAE,YAAY,GAAG,KAAK,CAAC;IAEzC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,EAAE,WAAW,CAAC;IAExB;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,KAAK,CAAC,EAAE,YAAY,GAAG,KAAK,CAAC;IAE7B;;;;;;;;;;;;;OAaG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B;;;;;;;;;;;;;;;;;OAiBG;IACH,OAAO,CAAC,EAAE,YAAY,GAAG,YAAY,EAAE,CAAC;IAExC;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;;;;;;;;;;OAcG;IACH,UAAU,CAAC,EAAE,YAAY,GAAG,KAAK,CAAC;IAElC;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IAE9B;;;;;;;;;;;;;;;;;OAiBG;IACH,EAAE,CAAC,EAAE,OAAO,CAAC;CACd;AA+CD,OAAO,EAAE,QAAQ,EAAE,CAAC;AACpB,YAAY,EAAE,aAAa,EAAE,CAAC"}
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export * from './useMemoizedObject';
|
|
|
6
6
|
export * from './usePopoverState';
|
|
7
7
|
export * from './useRefDimensions';
|
|
8
8
|
export * from './useResourceTitle';
|
|
9
|
+
export * from './useSessionStorage';
|
|
9
10
|
export * from './useSystemTheme';
|
|
10
11
|
export * from './useUuid';
|
|
11
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC"}
|
|
@@ -1,3 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React hook for synchronizing a state value with browser LocalStorage.
|
|
3
|
+
*
|
|
4
|
+
* This hook provides a stateful value and a setter function, similar to `useState`,
|
|
5
|
+
* but persists the value in LocalStorage under the specified key. The value is
|
|
6
|
+
* automatically updated when LocalStorage changes (including from other tabs/windows).
|
|
7
|
+
*
|
|
8
|
+
* Use this hook only when you need to persist state across sessions or tabs.
|
|
9
|
+
* If you only need to share state within a single session, consider using `useSessionStorage`
|
|
10
|
+
*
|
|
11
|
+
* Example:
|
|
12
|
+
* ```tsx
|
|
13
|
+
* const [value, setValue] = useLocalStorage('myKey', 'defaultValue');
|
|
14
|
+
*
|
|
15
|
+
* // Read the value
|
|
16
|
+
* console.log(value);
|
|
17
|
+
*
|
|
18
|
+
* // Update the value (persists to LocalStorage)
|
|
19
|
+
* setValue('newValue');
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @param key - The LocalStorage key to store the value under. Must be a non-empty string.
|
|
23
|
+
* @param defaultValue - The default value to use if the key does not exist in LocalStorage.
|
|
24
|
+
* @returns A tuple containing the current value and a setter function to update it.
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
1
27
|
declare function useLocalStorage(key: string, defaultValue?: unknown): [unknown, (newValue: unknown) => unknown];
|
|
2
28
|
export { useLocalStorage };
|
|
3
29
|
//# sourceMappingURL=useLocalStorage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocalStorage.d.ts","sourceRoot":"","sources":["../../../src/hooks/useLocalStorage.tsx"],"names":[],"mappings":"AAkBA,iBAAS,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,OAAO,CAAC,CA2BvG;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"useLocalStorage.d.ts","sourceRoot":"","sources":["../../../src/hooks/useLocalStorage.tsx"],"names":[],"mappings":"AAkBA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,iBAAS,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,OAAO,CAAC,CA2BvG;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React hook for synchronizing a state value with browser SessionStorage.
|
|
3
|
+
*
|
|
4
|
+
* This hook provides a stateful value and a setter function, similar to `useState`,
|
|
5
|
+
* but persists the value in SessionStorage under the specified key across the same session.
|
|
6
|
+
*
|
|
7
|
+
* Use this hook only when you need to persist state across tabs within the same session.
|
|
8
|
+
* If you need to persist state across sessions, consider using `useLocalStorage`
|
|
9
|
+
* instead.
|
|
10
|
+
*
|
|
11
|
+
* Example:
|
|
12
|
+
* ```tsx
|
|
13
|
+
* const [value, setValue] = useSessionStorage('myKey', 'defaultValue');
|
|
14
|
+
*
|
|
15
|
+
* // Read the value
|
|
16
|
+
* console.log(value);
|
|
17
|
+
*
|
|
18
|
+
* // Update the value (persists to SessionStorage)
|
|
19
|
+
* setValue('newValue');
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @param key - The SessionStorage key to store the value under. Must be a non-empty string.
|
|
23
|
+
* @param defaultValue - The default value to use if the key does not exist in SessionStorage.
|
|
24
|
+
* @returns A tuple containing the current value and a setter function to update it.
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
declare function useSessionStorage(key: string, defaultValue?: unknown): [unknown, (newValue: unknown) => unknown];
|
|
28
|
+
export { useSessionStorage };
|
|
29
|
+
//# sourceMappingURL=useSessionStorage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSessionStorage.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSessionStorage.tsx"],"names":[],"mappings":"AAkBA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,iBAAS,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,OAAO,CAAC,CA2BzG;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|