aq-fe-framework 0.1.652 → 0.1.654

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.
@@ -66,6 +66,24 @@ function createStateStore({
66
66
  return store;
67
67
  }
68
68
 
69
+ // src/stores/createTenantSettingsStore.ts
70
+ function createTenantSettingsStore(params) {
71
+ const useStore2 = createGenericStore({
72
+ initialState: params.initialState || {},
73
+ storageKey: params.storageKey || "useStore_TenantSettings"
74
+ });
75
+ return function useTenantSettingsStore() {
76
+ const store = useStore2();
77
+ function getSetting(settingKey) {
78
+ var _a, _b;
79
+ return (_b = (_a = store.state.tenantSettings) == null ? void 0 : _a.find((s) => s.settingKey === settingKey)) == null ? void 0 : _b.settingValue;
80
+ }
81
+ return __spreadProps(__spreadValues({}, store), {
82
+ getSetting
83
+ });
84
+ };
85
+ }
86
+
69
87
  // src/stores/useStore_Permission.ts
70
88
  var useStore = createGenericStore({
71
89
  initialState: {},
@@ -76,25 +94,9 @@ function useStore_Permission() {
76
94
  return __spreadValues({}, store);
77
95
  }
78
96
 
79
- // src/stores/useStore_TenantSettings.ts
80
- var useStore2 = createGenericStore({
81
- initialState: {},
82
- storageKey: "useStore_TenantSettings"
83
- });
84
- function useStore_TenantSettings() {
85
- const store = useStore2();
86
- function getSetting(settingKey) {
87
- var _a, _b;
88
- return (_b = (_a = store.state.tenantSettings) == null ? void 0 : _a.find((s) => s.settingKey === settingKey)) == null ? void 0 : _b.settingValue;
89
- }
90
- return __spreadProps(__spreadValues({}, store), {
91
- getSetting
92
- });
93
- }
94
-
95
97
  export {
96
98
  createGenericStore,
97
99
  createStateStore,
98
- useStore_Permission,
99
- useStore_TenantSettings
100
+ createTenantSettingsStore,
101
+ useStore_Permission
100
102
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createGenericStore,
3
3
  useStore_Permission
4
- } from "./chunk-2HJ7QAH4.mjs";
4
+ } from "./chunk-SUH3FFFV.mjs";
5
5
  import {
6
6
  U0MyValidateEmail,
7
7
  updateEnableList,
@@ -20,14 +20,14 @@ import {
20
20
  import {
21
21
  U0DateToDDMMYYYString
22
22
  } from "./chunk-EWDS5IOF.mjs";
23
- import {
24
- const_object_colors,
25
- const_object_documentTypes
26
- } from "./chunk-IUTUR43V.mjs";
27
23
  import {
28
24
  enum_daysOfWeek,
29
25
  enum_emailConfigModule
30
26
  } from "./chunk-MNJNQRZU.mjs";
27
+ import {
28
+ const_object_colors,
29
+ const_object_documentTypes
30
+ } from "./chunk-IUTUR43V.mjs";
31
31
  import {
32
32
  baseAxios_default,
33
33
  createBaseApi,
@@ -70,16 +70,16 @@ import {
70
70
  useHeaderMegaMenuStore,
71
71
  useS_ButtonImport,
72
72
  useStore_BasicAppShell
73
- } from "../chunk-XW4UDX6G.mjs";
74
- import "../chunk-2HJ7QAH4.mjs";
73
+ } from "../chunk-VYSIPI7U.mjs";
74
+ import "../chunk-SUH3FFFV.mjs";
75
75
  import "../chunk-GMM6RIVS.mjs";
76
76
  import "../chunk-7PUDC2WF.mjs";
77
77
  import "../chunk-EWDS5IOF.mjs";
78
- import "../chunk-IUTUR43V.mjs";
79
78
  import "../chunk-MNJNQRZU.mjs";
79
+ import "../chunk-IUTUR43V.mjs";
80
80
  import "../chunk-CZWDOLZ3.mjs";
81
- import "../chunk-WZ6PXGGC.mjs";
82
81
  import "../chunk-7ZCOFATU.mjs";
82
+ import "../chunk-WZ6PXGGC.mjs";
83
83
  import "../chunk-FWCSY2DS.mjs";
84
84
  export {
85
85
  AQButtonCreateByImportFile,
@@ -23,16 +23,16 @@ import {
23
23
  MyStatsCard,
24
24
  MyTextInput2 as MyTextInput,
25
25
  MyWeeklySessionSchedulerPicker
26
- } from "../chunk-XW4UDX6G.mjs";
27
- import "../chunk-2HJ7QAH4.mjs";
26
+ } from "../chunk-VYSIPI7U.mjs";
27
+ import "../chunk-SUH3FFFV.mjs";
28
28
  import "../chunk-GMM6RIVS.mjs";
29
29
  import "../chunk-7PUDC2WF.mjs";
30
30
  import "../chunk-EWDS5IOF.mjs";
31
- import "../chunk-IUTUR43V.mjs";
32
31
  import "../chunk-MNJNQRZU.mjs";
32
+ import "../chunk-IUTUR43V.mjs";
33
33
  import "../chunk-CZWDOLZ3.mjs";
34
- import "../chunk-WZ6PXGGC.mjs";
35
34
  import "../chunk-7ZCOFATU.mjs";
35
+ import "../chunk-WZ6PXGGC.mjs";
36
36
  import "../chunk-FWCSY2DS.mjs";
37
37
  export {
38
38
  DroppablePlaceholder,
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  MyModalDelete
3
- } from "../chunk-XW4UDX6G.mjs";
4
- import "../chunk-2HJ7QAH4.mjs";
3
+ } from "../chunk-VYSIPI7U.mjs";
4
+ import "../chunk-SUH3FFFV.mjs";
5
5
  import "../chunk-GMM6RIVS.mjs";
6
6
  import "../chunk-7PUDC2WF.mjs";
7
7
  import "../chunk-EWDS5IOF.mjs";
8
- import "../chunk-IUTUR43V.mjs";
9
8
  import "../chunk-MNJNQRZU.mjs";
9
+ import "../chunk-IUTUR43V.mjs";
10
10
  import {
11
11
  useMyReactMutation
12
12
  } from "../chunk-CZWDOLZ3.mjs";
13
- import "../chunk-WZ6PXGGC.mjs";
14
13
  import "../chunk-7ZCOFATU.mjs";
14
+ import "../chunk-WZ6PXGGC.mjs";
15
15
  import {
16
16
  __objRest,
17
17
  __spreadValues
@@ -10,8 +10,8 @@ import {
10
10
  useMyRouter,
11
11
  useQ_AQ_GetAQModule
12
12
  } from "../chunk-CZWDOLZ3.mjs";
13
- import "../chunk-WZ6PXGGC.mjs";
14
13
  import "../chunk-7ZCOFATU.mjs";
14
+ import "../chunk-WZ6PXGGC.mjs";
15
15
  import "../chunk-FWCSY2DS.mjs";
16
16
  export {
17
17
  createBaseApi,
@@ -106,16 +106,16 @@ import {
106
106
  Feat_accessControlLevel,
107
107
  useS_authenticate,
108
108
  useS_moduleConfig
109
- } from "../chunk-XW4UDX6G.mjs";
110
- import "../chunk-2HJ7QAH4.mjs";
109
+ } from "../chunk-VYSIPI7U.mjs";
110
+ import "../chunk-SUH3FFFV.mjs";
111
111
  import "../chunk-GMM6RIVS.mjs";
112
112
  import "../chunk-7PUDC2WF.mjs";
113
113
  import "../chunk-EWDS5IOF.mjs";
114
- import "../chunk-IUTUR43V.mjs";
115
114
  import "../chunk-MNJNQRZU.mjs";
115
+ import "../chunk-IUTUR43V.mjs";
116
116
  import "../chunk-CZWDOLZ3.mjs";
117
- import "../chunk-WZ6PXGGC.mjs";
118
117
  import "../chunk-7ZCOFATU.mjs";
118
+ import "../chunk-WZ6PXGGC.mjs";
119
119
  import "../chunk-FWCSY2DS.mjs";
120
120
  export {
121
121
  ENUM_BUSINESS_TYPE,
@@ -25,33 +25,35 @@ declare function createStateStore<T extends Record<string, any>>({ initialState,
25
25
  storageKey?: string;
26
26
  }): zustand.UseBoundStore<zustand.StoreApi<GenericStore<T>>>;
27
27
 
28
- interface I$1 {
29
- permission?: IPagePermission[];
30
- currentPermissionPage?: IPagePermission;
28
+ interface ITenantSetting<TKey = string> {
29
+ settingKey?: TKey;
30
+ settingValue?: string | boolean | number;
31
+ description?: string;
31
32
  }
32
- declare function useStore_Permission(): {
33
- state: I$1;
34
- setState: (newState: I$1) => void;
35
- setProperty: <K extends keyof I$1>(key: K, value: I$1[K]) => void;
33
+ interface IStoreState<TKey = string> {
34
+ tenantSettings?: ITenantSetting<TKey>[];
35
+ currentTenantSetting?: ITenantSetting<TKey>;
36
+ }
37
+ declare function createTenantSettingsStore<TKey>(params: {
38
+ storageKey?: string;
39
+ initialState?: Partial<IStoreState<TKey>>;
40
+ }): () => {
41
+ getSetting: (settingKey: TKey) => string | boolean | number | undefined;
42
+ state: IStoreState<TKey>;
43
+ setState: (newState: IStoreState<TKey>) => void;
44
+ setProperty: <K extends keyof IStoreState<TKey>>(key: K, value: IStoreState<TKey>[K]) => void;
36
45
  resetState: () => void;
37
46
  };
38
47
 
39
- interface ITenantSetting {
40
- pageId?: number;
41
- settingValue?: string;
42
- settingKey?: string | boolean | number;
43
- description?: string;
44
- }
45
48
  interface I {
46
- tenantSettings?: ITenantSetting[];
47
- currentTenantSetting?: ITenantSetting;
49
+ permission?: IPagePermission[];
50
+ currentPermissionPage?: IPagePermission;
48
51
  }
49
- declare function useStore_TenantSettings(): {
50
- getSetting: (settingKey: string) => string | undefined;
52
+ declare function useStore_Permission(): {
51
53
  state: I;
52
54
  setState: (newState: I) => void;
53
55
  setProperty: <K extends keyof I>(key: K, value: I[K]) => void;
54
56
  resetState: () => void;
55
57
  };
56
58
 
57
- export { createGenericStore, createStateStore, useStore_Permission, useStore_TenantSettings };
59
+ export { type IStoreState, type ITenantSetting, createGenericStore, createStateStore, createTenantSettingsStore, useStore_Permission };
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  createGenericStore,
3
3
  createStateStore,
4
- useStore_Permission,
5
- useStore_TenantSettings
6
- } from "../chunk-2HJ7QAH4.mjs";
4
+ createTenantSettingsStore,
5
+ useStore_Permission
6
+ } from "../chunk-SUH3FFFV.mjs";
7
7
  import "../chunk-FWCSY2DS.mjs";
8
8
  export {
9
9
  createGenericStore,
10
10
  createStateStore,
11
- useStore_Permission,
12
- useStore_TenantSettings
11
+ createTenantSettingsStore,
12
+ useStore_Permission
13
13
  };
package/package.json CHANGED
@@ -50,7 +50,7 @@
50
50
  "types": "./dist/types/index.d.mts"
51
51
  }
52
52
  },
53
- "version": "0.1.652",
53
+ "version": "0.1.654",
54
54
  "private": false,
55
55
  "files": [
56
56
  "dist"