aq-fe-framework 0.1.647 → 0.1.649

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.
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createGenericStore,
3
3
  useStore_Permission
4
- } from "./chunk-3SZWWNH4.mjs";
4
+ } from "./chunk-PEZLOH7T.mjs";
5
5
  import {
6
6
  U0MyValidateEmail,
7
7
  updateEnableList,
@@ -77,18 +77,27 @@ function useStore_Permission() {
77
77
  }
78
78
 
79
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
- return __spreadValues({}, store);
80
+ function createTenantSettingsStore() {
81
+ const useStore2 = createGenericStore({
82
+ initialState: {},
83
+ storageKey: "useStore_TenantSettings"
84
+ });
85
+ function useStore_TenantSettings() {
86
+ const store = useStore2();
87
+ function getSetting(settingKey) {
88
+ var _a, _b, _c;
89
+ return (_c = (_b = (_a = store.state.currentTenantSetting) == null ? void 0 : _a.tenantSettings) == null ? void 0 : _b.find((s) => s.settingKey === settingKey)) == null ? void 0 : _c.settingValue;
90
+ }
91
+ return __spreadProps(__spreadValues({}, store), {
92
+ getSetting
93
+ });
94
+ }
95
+ return useStore_TenantSettings;
87
96
  }
88
97
 
89
98
  export {
90
99
  createGenericStore,
91
100
  createStateStore,
92
101
  useStore_Permission,
93
- useStore_TenantSettings
102
+ createTenantSettingsStore
94
103
  };
@@ -70,8 +70,8 @@ import {
70
70
  useHeaderMegaMenuStore,
71
71
  useS_ButtonImport,
72
72
  useStore_BasicAppShell
73
- } from "../chunk-NFSUFJEO.mjs";
74
- import "../chunk-3SZWWNH4.mjs";
73
+ } from "../chunk-5HU4DEXC.mjs";
74
+ import "../chunk-PEZLOH7T.mjs";
75
75
  import "../chunk-GMM6RIVS.mjs";
76
76
  import "../chunk-7PUDC2WF.mjs";
77
77
  import "../chunk-EWDS5IOF.mjs";
@@ -23,8 +23,8 @@ import {
23
23
  MyStatsCard,
24
24
  MyTextInput2 as MyTextInput,
25
25
  MyWeeklySessionSchedulerPicker
26
- } from "../chunk-NFSUFJEO.mjs";
27
- import "../chunk-3SZWWNH4.mjs";
26
+ } from "../chunk-5HU4DEXC.mjs";
27
+ import "../chunk-PEZLOH7T.mjs";
28
28
  import "../chunk-GMM6RIVS.mjs";
29
29
  import "../chunk-7PUDC2WF.mjs";
30
30
  import "../chunk-EWDS5IOF.mjs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  MyModalDelete
3
- } from "../chunk-NFSUFJEO.mjs";
4
- import "../chunk-3SZWWNH4.mjs";
3
+ } from "../chunk-5HU4DEXC.mjs";
4
+ import "../chunk-PEZLOH7T.mjs";
5
5
  import "../chunk-GMM6RIVS.mjs";
6
6
  import "../chunk-7PUDC2WF.mjs";
7
7
  import "../chunk-EWDS5IOF.mjs";
@@ -106,8 +106,8 @@ import {
106
106
  Feat_accessControlLevel,
107
107
  useS_authenticate,
108
108
  useS_moduleConfig
109
- } from "../chunk-NFSUFJEO.mjs";
110
- import "../chunk-3SZWWNH4.mjs";
109
+ } from "../chunk-5HU4DEXC.mjs";
110
+ import "../chunk-PEZLOH7T.mjs";
111
111
  import "../chunk-GMM6RIVS.mjs";
112
112
  import "../chunk-7PUDC2WF.mjs";
113
113
  import "../chunk-EWDS5IOF.mjs";
@@ -25,33 +25,36 @@ 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 {
28
+ interface I {
29
29
  permission?: IPagePermission[];
30
30
  currentPermissionPage?: IPagePermission;
31
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
+ state: I;
34
+ setState: (newState: I) => void;
35
+ setProperty: <K extends keyof I>(key: K, value: I[K]) => void;
36
36
  resetState: () => void;
37
37
  };
38
38
 
39
- interface IPageTenantSetting {
39
+ type TenantSettingValue = string | number | boolean | string[] | number[] | Record<string, any>;
40
+ interface ITenantSetting<TSettingKey> {
40
41
  pageId?: number;
41
42
  tenantSettings?: {
42
- settingKey?: string;
43
- settingValue?: string;
43
+ settingKey?: TSettingKey;
44
+ settingValue?: TenantSettingValue;
45
+ description?: string;
44
46
  }[];
45
47
  }
46
- interface I {
47
- allTenantSetting?: IPageTenantSetting[];
48
- currentTenantSetting?: IPageTenantSetting;
48
+ interface ITenantSettingStore<TSettingKey> {
49
+ allTenantSetting?: ITenantSetting<TSettingKey>[];
50
+ currentTenantSetting?: ITenantSetting<TSettingKey>;
49
51
  }
50
- declare function useStore_TenantSettings(): {
51
- state: I;
52
- setState: (newState: I) => void;
53
- setProperty: <K extends keyof I>(key: K, value: I[K]) => void;
52
+ declare function createTenantSettingsStore<TSettingKey extends string>(): () => {
53
+ getSetting: (settingKey: TSettingKey) => TenantSettingValue | undefined;
54
+ state: ITenantSettingStore<TSettingKey>;
55
+ setState: (newState: ITenantSettingStore<TSettingKey>) => void;
56
+ setProperty: <K extends keyof ITenantSettingStore<TSettingKey>>(key: K, value: ITenantSettingStore<TSettingKey>[K]) => void;
54
57
  resetState: () => void;
55
58
  };
56
59
 
57
- export { createGenericStore, createStateStore, useStore_Permission, useStore_TenantSettings };
60
+ export { type TenantSettingValue, 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-3SZWWNH4.mjs";
4
+ createTenantSettingsStore,
5
+ useStore_Permission
6
+ } from "../chunk-PEZLOH7T.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.647",
53
+ "version": "0.1.649",
54
54
  "private": false,
55
55
  "files": [
56
56
  "dist"