aq-fe-framework 0.1.849 → 0.1.850
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/{chunk-SUH3FFFV.mjs → chunk-M4HZYODI.mjs} +22 -4
- package/dist/{chunk-KH5UFCUX.mjs → chunk-MFQ2AABH.mjs} +10 -6
- package/dist/components/index.mjs +3 -3
- package/dist/core/index.mjs +3 -3
- package/dist/coreService/index.mjs +3 -3
- package/dist/modules-features/index.mjs +3 -3
- package/dist/shared/index.mjs +3 -3
- package/dist/stores/index.d.mts +12 -1
- package/dist/stores/index.mjs +3 -1
- package/package.json +1 -1
|
@@ -3,8 +3,25 @@ import {
|
|
|
3
3
|
__spreadValues
|
|
4
4
|
} from "./chunk-FWCSY2DS.mjs";
|
|
5
5
|
|
|
6
|
-
// src/stores/
|
|
6
|
+
// src/stores/AppStore.ts
|
|
7
7
|
import { create } from "zustand";
|
|
8
|
+
var useAppStore = create((set, get) => ({
|
|
9
|
+
appState: {
|
|
10
|
+
currentPage: null
|
|
11
|
+
},
|
|
12
|
+
setAppState: (appState) => set({ appState }),
|
|
13
|
+
setCurrentPage: (pageId) => set((appState) => ({
|
|
14
|
+
appState: __spreadProps(__spreadValues({}, appState), {
|
|
15
|
+
currentPageId: pageId != null ? pageId : null
|
|
16
|
+
})
|
|
17
|
+
})),
|
|
18
|
+
getCurrentPage() {
|
|
19
|
+
return get().appState.currentPageId;
|
|
20
|
+
}
|
|
21
|
+
}));
|
|
22
|
+
|
|
23
|
+
// src/stores/CreateGenericStore.ts
|
|
24
|
+
import { create as create2 } from "zustand";
|
|
8
25
|
import { persist } from "zustand/middleware";
|
|
9
26
|
function createGenericStore({ initialState, storageKey }) {
|
|
10
27
|
const storeCreator = (set) => ({
|
|
@@ -13,11 +30,11 @@ function createGenericStore({ initialState, storageKey }) {
|
|
|
13
30
|
setProperty: (key, value) => set((store) => ({ state: __spreadProps(__spreadValues({}, store.state), { [key]: value }) })),
|
|
14
31
|
resetState: () => set({ state: initialState })
|
|
15
32
|
});
|
|
16
|
-
return storageKey ?
|
|
33
|
+
return storageKey ? create2(persist(storeCreator, { name: storageKey })) : create2(storeCreator);
|
|
17
34
|
}
|
|
18
35
|
|
|
19
36
|
// src/stores/createStateStore.ts
|
|
20
|
-
import { create as
|
|
37
|
+
import { create as create3 } from "zustand";
|
|
21
38
|
import { persist as persist2 } from "zustand/middleware";
|
|
22
39
|
function createStateStore({
|
|
23
40
|
initialState,
|
|
@@ -46,7 +63,7 @@ function createStateStore({
|
|
|
46
63
|
});
|
|
47
64
|
return { state: stateWithReset };
|
|
48
65
|
};
|
|
49
|
-
const store = storageKey ?
|
|
66
|
+
const store = storageKey ? create3(persist2(createStateWithSetters, { name: storageKey })) : create3(createStateWithSetters);
|
|
50
67
|
const current = store.getState();
|
|
51
68
|
const actualReset = () => store.setState({
|
|
52
69
|
state: __spreadProps(__spreadValues(__spreadValues({}, initialState), Object.fromEntries(
|
|
@@ -95,6 +112,7 @@ function useStore_Permission() {
|
|
|
95
112
|
}
|
|
96
113
|
|
|
97
114
|
export {
|
|
115
|
+
useAppStore,
|
|
98
116
|
createGenericStore,
|
|
99
117
|
createStateStore,
|
|
100
118
|
createTenantSettingsStore,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
createGenericStore,
|
|
3
|
+
useAppStore,
|
|
4
|
+
useStore_Permission
|
|
5
|
+
} from "./chunk-M4HZYODI.mjs";
|
|
4
6
|
import {
|
|
5
7
|
utils_aq_mapBaseEntityToDomain,
|
|
6
8
|
utils_aq_mapDomainToEntity,
|
|
@@ -12,14 +14,13 @@ import {
|
|
|
12
14
|
utils_mantineReactTable_sortColumnsByKeyOrder,
|
|
13
15
|
utils_pdf_download
|
|
14
16
|
} from "./chunk-RJH5TVHS.mjs";
|
|
17
|
+
import {
|
|
18
|
+
utils_date
|
|
19
|
+
} from "./chunk-SQ5IPU7G.mjs";
|
|
15
20
|
import {
|
|
16
21
|
utils_converter_enumToSelectOptions,
|
|
17
22
|
utils_converter_mapEnumToSelectData
|
|
18
23
|
} from "./chunk-7NNLZDND.mjs";
|
|
19
|
-
import {
|
|
20
|
-
createGenericStore,
|
|
21
|
-
useStore_Permission
|
|
22
|
-
} from "./chunk-SUH3FFFV.mjs";
|
|
23
24
|
import {
|
|
24
25
|
baseColumns
|
|
25
26
|
} from "./chunk-O7YCQQO5.mjs";
|
|
@@ -8943,6 +8944,7 @@ function normalizePath(path) {
|
|
|
8943
8944
|
}
|
|
8944
8945
|
function RenderNavLinks({ items }) {
|
|
8945
8946
|
const pathName = usePathname2();
|
|
8947
|
+
const appStore = useAppStore();
|
|
8946
8948
|
const basicAppShellStore = useStore_BasicAppShell();
|
|
8947
8949
|
const extractPathName = pathName.split("/").slice(2).join("/");
|
|
8948
8950
|
return /* @__PURE__ */ jsx80(Fragment16, { children: items.map((item, index) => /* @__PURE__ */ jsx80(
|
|
@@ -8961,7 +8963,9 @@ function RenderNavLinks({ items }) {
|
|
|
8961
8963
|
if (item.links) {
|
|
8962
8964
|
e4.preventDefault();
|
|
8963
8965
|
basicAppShellStore.toggleGroupMenuOpenId(item.label);
|
|
8966
|
+
return;
|
|
8964
8967
|
}
|
|
8968
|
+
appStore.setCurrentPage(item.pageId);
|
|
8965
8969
|
},
|
|
8966
8970
|
children: item.links && /* @__PURE__ */ jsx80(RenderNavLinks, { items: item.links })
|
|
8967
8971
|
},
|
|
@@ -70,11 +70,11 @@ import {
|
|
|
70
70
|
useHeaderMegaMenuStore,
|
|
71
71
|
useS_ButtonImport,
|
|
72
72
|
useStore_BasicAppShell
|
|
73
|
-
} from "../chunk-
|
|
74
|
-
import "../chunk-
|
|
73
|
+
} from "../chunk-MFQ2AABH.mjs";
|
|
74
|
+
import "../chunk-M4HZYODI.mjs";
|
|
75
75
|
import "../chunk-RJH5TVHS.mjs";
|
|
76
|
+
import "../chunk-SQ5IPU7G.mjs";
|
|
76
77
|
import "../chunk-7NNLZDND.mjs";
|
|
77
|
-
import "../chunk-SUH3FFFV.mjs";
|
|
78
78
|
import "../chunk-O7YCQQO5.mjs";
|
|
79
79
|
import "../chunk-QSWIVDXC.mjs";
|
|
80
80
|
import "../chunk-J64W5V6F.mjs";
|
package/dist/core/index.mjs
CHANGED
|
@@ -30,11 +30,11 @@ import {
|
|
|
30
30
|
MyStatsCard,
|
|
31
31
|
MyTextInput2 as MyTextInput,
|
|
32
32
|
MyWeeklySessionSchedulerPicker
|
|
33
|
-
} from "../chunk-
|
|
34
|
-
import "../chunk-
|
|
33
|
+
} from "../chunk-MFQ2AABH.mjs";
|
|
34
|
+
import "../chunk-M4HZYODI.mjs";
|
|
35
35
|
import "../chunk-RJH5TVHS.mjs";
|
|
36
|
+
import "../chunk-SQ5IPU7G.mjs";
|
|
36
37
|
import "../chunk-7NNLZDND.mjs";
|
|
37
|
-
import "../chunk-SUH3FFFV.mjs";
|
|
38
38
|
import "../chunk-O7YCQQO5.mjs";
|
|
39
39
|
import "../chunk-QSWIVDXC.mjs";
|
|
40
40
|
import "../chunk-J64W5V6F.mjs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MyModalDelete
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-MFQ2AABH.mjs";
|
|
4
|
+
import "../chunk-M4HZYODI.mjs";
|
|
5
5
|
import "../chunk-RJH5TVHS.mjs";
|
|
6
|
+
import "../chunk-SQ5IPU7G.mjs";
|
|
6
7
|
import "../chunk-7NNLZDND.mjs";
|
|
7
|
-
import "../chunk-SUH3FFFV.mjs";
|
|
8
8
|
import "../chunk-O7YCQQO5.mjs";
|
|
9
9
|
import "../chunk-QSWIVDXC.mjs";
|
|
10
10
|
import "../chunk-J64W5V6F.mjs";
|
|
@@ -113,11 +113,11 @@ import {
|
|
|
113
113
|
MailTemplateDeleteButton,
|
|
114
114
|
useS_moduleConfig,
|
|
115
115
|
useStore_Authenticate
|
|
116
|
-
} from "../chunk-
|
|
117
|
-
import "../chunk-
|
|
116
|
+
} from "../chunk-MFQ2AABH.mjs";
|
|
117
|
+
import "../chunk-M4HZYODI.mjs";
|
|
118
118
|
import "../chunk-RJH5TVHS.mjs";
|
|
119
|
+
import "../chunk-SQ5IPU7G.mjs";
|
|
119
120
|
import "../chunk-7NNLZDND.mjs";
|
|
120
|
-
import "../chunk-SUH3FFFV.mjs";
|
|
121
121
|
import "../chunk-O7YCQQO5.mjs";
|
|
122
122
|
import "../chunk-QSWIVDXC.mjs";
|
|
123
123
|
import "../chunk-J64W5V6F.mjs";
|
package/dist/shared/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MySelect
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-MFQ2AABH.mjs";
|
|
4
|
+
import "../chunk-M4HZYODI.mjs";
|
|
5
|
+
import "../chunk-RJH5TVHS.mjs";
|
|
4
6
|
import {
|
|
5
7
|
utils_converter
|
|
6
8
|
} from "../chunk-SQ5IPU7G.mjs";
|
|
7
|
-
import "../chunk-RJH5TVHS.mjs";
|
|
8
9
|
import "../chunk-7NNLZDND.mjs";
|
|
9
|
-
import "../chunk-SUH3FFFV.mjs";
|
|
10
10
|
import "../chunk-O7YCQQO5.mjs";
|
|
11
11
|
import "../chunk-QSWIVDXC.mjs";
|
|
12
12
|
import "../chunk-J64W5V6F.mjs";
|
package/dist/stores/index.d.mts
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import * as zustand from 'zustand';
|
|
2
2
|
import { I as IPagePermission } from '../IPagePermission-992CbJhp.mjs';
|
|
3
3
|
|
|
4
|
+
interface AppState {
|
|
5
|
+
currentPageId?: number | null;
|
|
6
|
+
}
|
|
7
|
+
interface AppStore {
|
|
8
|
+
appState: AppState;
|
|
9
|
+
setAppState: (appState: AppState) => void;
|
|
10
|
+
setCurrentPage: (pageId: number | null | undefined) => void;
|
|
11
|
+
getCurrentPage: () => number | null | undefined;
|
|
12
|
+
}
|
|
13
|
+
declare const useAppStore: zustand.UseBoundStore<zustand.StoreApi<AppStore>>;
|
|
14
|
+
|
|
4
15
|
interface GenericStore$1<T> {
|
|
5
16
|
state: T;
|
|
6
17
|
setState: (newState: T) => void;
|
|
@@ -56,4 +67,4 @@ declare function useStore_Permission(): {
|
|
|
56
67
|
resetState: () => void;
|
|
57
68
|
};
|
|
58
69
|
|
|
59
|
-
export { type IStoreState, type ITenantSetting, createGenericStore, createStateStore, createTenantSettingsStore, useStore_Permission };
|
|
70
|
+
export { type IStoreState, type ITenantSetting, createGenericStore, createStateStore, createTenantSettingsStore, useAppStore, useStore_Permission };
|
package/dist/stores/index.mjs
CHANGED
|
@@ -2,12 +2,14 @@ import {
|
|
|
2
2
|
createGenericStore,
|
|
3
3
|
createStateStore,
|
|
4
4
|
createTenantSettingsStore,
|
|
5
|
+
useAppStore,
|
|
5
6
|
useStore_Permission
|
|
6
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-M4HZYODI.mjs";
|
|
7
8
|
import "../chunk-FWCSY2DS.mjs";
|
|
8
9
|
export {
|
|
9
10
|
createGenericStore,
|
|
10
11
|
createStateStore,
|
|
11
12
|
createTenantSettingsStore,
|
|
13
|
+
useAppStore,
|
|
12
14
|
useStore_Permission
|
|
13
15
|
};
|