@archbase/admin 4.0.19 → 4.0.21
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/ArchbaseNavigationProgress.d.ts +1 -0
- package/dist/ArchbaseStatefulRoutes.d.ts +23 -0
- package/dist/archbase-admin-4.0.21.tgz +0 -0
- package/dist/components/TabStoreProvider.d.ts +23 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/hooks/index.d.ts +8 -0
- package/dist/hooks/useArchbaseAdminStore.d.ts +15 -0
- package/dist/hooks/useArchbaseGridState.d.ts +79 -0
- package/dist/hooks/useArchbasePersistedState.d.ts +61 -0
- package/dist/hooks/useArchbaseState.d.ts +42 -0
- package/dist/hooks/useArchbaseTreeState.d.ts +81 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +2649 -2205
- package/dist/state/createTabStore.d.ts +59 -0
- package/dist/state/index.d.ts +4 -0
- package/dist/state/tabRegistryStore.d.ts +53 -0
- package/package.json +16 -16
- package/dist/archbase-admin-4.0.19.tgz +0 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export interface GridState {
|
|
2
|
+
columnWidths: Record<string, number>;
|
|
3
|
+
sortModel: {
|
|
4
|
+
field: string;
|
|
5
|
+
sort: 'asc' | 'desc';
|
|
6
|
+
}[];
|
|
7
|
+
filterModel: Record<string, any>;
|
|
8
|
+
page: number;
|
|
9
|
+
pageSize: number;
|
|
10
|
+
}
|
|
11
|
+
export interface TabLocalState {
|
|
12
|
+
scrollY: number;
|
|
13
|
+
setScrollY: (y: number) => void;
|
|
14
|
+
expandedPanels: string[];
|
|
15
|
+
togglePanel: (panelId: string) => void;
|
|
16
|
+
setExpandedPanels: (panels: string[]) => void;
|
|
17
|
+
formValues: Record<string, any>;
|
|
18
|
+
formDirty: boolean;
|
|
19
|
+
setFormValues: (values: Record<string, any>) => void;
|
|
20
|
+
setFormDirty: (dirty: boolean) => void;
|
|
21
|
+
gridState: GridState | null;
|
|
22
|
+
setGridState: (state: Partial<GridState> | null) => void;
|
|
23
|
+
dataSourceIndex: number;
|
|
24
|
+
setDataSourceIndex: (index: number) => void;
|
|
25
|
+
customState: Record<string, any>;
|
|
26
|
+
setCustomState: (key: string, value: any) => void;
|
|
27
|
+
getCustomState: <T = any>(key: string) => T | undefined;
|
|
28
|
+
clearCustomState: (key?: string) => void;
|
|
29
|
+
openModals: string[];
|
|
30
|
+
openModal: (modalId: string) => void;
|
|
31
|
+
closeModal: (modalId: string) => void;
|
|
32
|
+
isModalOpen: (modalId: string) => boolean;
|
|
33
|
+
closeAllModals: () => void;
|
|
34
|
+
viewMode: string;
|
|
35
|
+
setViewMode: (mode: string) => void;
|
|
36
|
+
activeInternalTab: string | null;
|
|
37
|
+
setActiveInternalTab: (tabId: string | null) => void;
|
|
38
|
+
filters: Record<string, any>;
|
|
39
|
+
setFilter: (key: string, value: any) => void;
|
|
40
|
+
setFilters: (filters: Record<string, any>) => void;
|
|
41
|
+
clearFilters: () => void;
|
|
42
|
+
hydrate: (snapshot: Partial<SerializedTabState>) => void;
|
|
43
|
+
serialize: () => SerializedTabState;
|
|
44
|
+
}
|
|
45
|
+
export interface SerializedTabState {
|
|
46
|
+
scrollY: number;
|
|
47
|
+
expandedPanels: string[];
|
|
48
|
+
formValues: Record<string, any>;
|
|
49
|
+
formDirty: boolean;
|
|
50
|
+
gridState: GridState | null;
|
|
51
|
+
dataSourceIndex: number;
|
|
52
|
+
customState: Record<string, any>;
|
|
53
|
+
openModals: string[];
|
|
54
|
+
viewMode: string;
|
|
55
|
+
activeInternalTab: string | null;
|
|
56
|
+
filters: Record<string, any>;
|
|
57
|
+
}
|
|
58
|
+
export declare const createTabStore: (initialState?: Partial<SerializedTabState>) => import('zustand').StoreApi<TabLocalState>;
|
|
59
|
+
export type TabStore = ReturnType<typeof createTabStore>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { useTabRegistryStore } from './tabRegistryStore';
|
|
2
|
+
export type { TabSnapshot, TabRegistryState } from './tabRegistryStore';
|
|
3
|
+
export { createTabStore } from './createTabStore';
|
|
4
|
+
export type { TabStore, TabLocalState, SerializedTabState, GridState } from './createTabStore';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export interface TabSnapshot {
|
|
2
|
+
scrollY: number;
|
|
3
|
+
expandedPanels: string[];
|
|
4
|
+
formValues: Record<string, any>;
|
|
5
|
+
formDirty: boolean;
|
|
6
|
+
gridState: {
|
|
7
|
+
columnWidths: Record<string, number>;
|
|
8
|
+
sortModel: {
|
|
9
|
+
field: string;
|
|
10
|
+
sort: 'asc' | 'desc';
|
|
11
|
+
}[];
|
|
12
|
+
filterModel: Record<string, any>;
|
|
13
|
+
page: number;
|
|
14
|
+
pageSize: number;
|
|
15
|
+
} | null;
|
|
16
|
+
dataSourceIndex: number;
|
|
17
|
+
customState: Record<string, any>;
|
|
18
|
+
openModals: string[];
|
|
19
|
+
viewMode: string;
|
|
20
|
+
activeInternalTab: string | null;
|
|
21
|
+
filters: Record<string, any>;
|
|
22
|
+
lastAccessed: number;
|
|
23
|
+
}
|
|
24
|
+
export interface TabRegistryState {
|
|
25
|
+
openTabs: string[];
|
|
26
|
+
activeTabId: string | null;
|
|
27
|
+
snapshots: Record<string, TabSnapshot>;
|
|
28
|
+
maxSnapshots: number;
|
|
29
|
+
addTab: (tabId: string) => void;
|
|
30
|
+
removeTab: (tabId: string) => void;
|
|
31
|
+
setActiveTab: (tabId: string) => void;
|
|
32
|
+
saveSnapshot: (tabId: string, snapshot: Partial<TabSnapshot>) => void;
|
|
33
|
+
getSnapshot: (tabId: string) => TabSnapshot | undefined;
|
|
34
|
+
clearSnapshot: (tabId: string) => void;
|
|
35
|
+
pruneOldSnapshots: () => void;
|
|
36
|
+
}
|
|
37
|
+
export declare const useTabRegistryStore: import('zustand').UseBoundStore<Omit<import('zustand').StoreApi<TabRegistryState>, "setState" | "persist"> & {
|
|
38
|
+
setState(partial: TabRegistryState | Partial<TabRegistryState> | ((state: TabRegistryState) => TabRegistryState | Partial<TabRegistryState>), replace?: false): unknown;
|
|
39
|
+
setState(state: TabRegistryState | ((state: TabRegistryState) => TabRegistryState), replace: true): unknown;
|
|
40
|
+
persist: {
|
|
41
|
+
setOptions: (options: Partial<import('zustand/middleware').PersistOptions<TabRegistryState, {
|
|
42
|
+
snapshots: Record<string, TabSnapshot>;
|
|
43
|
+
}, unknown>>) => void;
|
|
44
|
+
clearStorage: () => void;
|
|
45
|
+
rehydrate: () => Promise<void> | void;
|
|
46
|
+
hasHydrated: () => boolean;
|
|
47
|
+
onHydrate: (fn: (state: TabRegistryState) => void) => () => void;
|
|
48
|
+
onFinishHydration: (fn: (state: TabRegistryState) => void) => () => void;
|
|
49
|
+
getOptions: () => Partial<import('zustand/middleware').PersistOptions<TabRegistryState, {
|
|
50
|
+
snapshots: Record<string, TabSnapshot>;
|
|
51
|
+
}, unknown>>;
|
|
52
|
+
};
|
|
53
|
+
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@archbase/admin",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.21",
|
|
4
4
|
"description": "Admin interface components for Archbase React",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"author": "Edson Martins",
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@mantine/core": "9.
|
|
30
|
-
"@mantine/form": "9.
|
|
31
|
-
"@mantine/hooks": "9.
|
|
29
|
+
"@mantine/core": "9.2.1",
|
|
30
|
+
"@mantine/form": "9.2.1",
|
|
31
|
+
"@mantine/hooks": "9.2.1",
|
|
32
32
|
"@rehooks/component-size": "^1.0.3",
|
|
33
33
|
"@storybook/preview-api": "^8.6.14",
|
|
34
34
|
"@tabler/icons-react": "^3.27.0",
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
"react-router-dom": "^6.28.0",
|
|
44
44
|
"usehooks-ts": "^2.16.0",
|
|
45
45
|
"zustand": "^5.0.6",
|
|
46
|
-
"@archbase/components": "4.0.
|
|
47
|
-
"@archbase/core": "4.0.
|
|
48
|
-
"@archbase/data": "4.0.
|
|
49
|
-
"@archbase/layout": "4.0.
|
|
50
|
-
"@archbase/security": "4.0.
|
|
51
|
-
"@archbase/template": "4.0.
|
|
46
|
+
"@archbase/components": "4.0.21",
|
|
47
|
+
"@archbase/core": "4.0.21",
|
|
48
|
+
"@archbase/data": "4.0.21",
|
|
49
|
+
"@archbase/layout": "4.0.21",
|
|
50
|
+
"@archbase/security": "4.0.21",
|
|
51
|
+
"@archbase/template": "4.0.21"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"keepalive-for-react": "^5.0.7",
|
|
@@ -62,12 +62,12 @@
|
|
|
62
62
|
"vitest": "^2.0.0"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
|
-
"@mantine/core": "9.
|
|
66
|
-
"@mantine/dates": "9.
|
|
67
|
-
"@mantine/hooks": "9.
|
|
68
|
-
"@mantine/modals": "9.
|
|
69
|
-
"@mantine/notifications": "9.
|
|
70
|
-
"@mantine/spotlight": "9.
|
|
65
|
+
"@mantine/core": "9.2.1",
|
|
66
|
+
"@mantine/dates": "9.2.1",
|
|
67
|
+
"@mantine/hooks": "9.2.1",
|
|
68
|
+
"@mantine/modals": "9.2.1",
|
|
69
|
+
"@mantine/notifications": "9.2.1",
|
|
70
|
+
"@mantine/spotlight": "9.2.1",
|
|
71
71
|
"@tabler/icons-react": "^3.27.0",
|
|
72
72
|
"react": ">=18.0.0",
|
|
73
73
|
"react-dom": ">=18.0.0"
|
|
Binary file
|