aq-fe-framework 0.2.3 → 0.2.5
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/aqModuleIdEnum-CRhuRqot.d.mts +9 -0
- package/dist/{chunk-G75DH6JW.mjs → chunk-6VCC6SNB.mjs} +2 -1
- package/dist/{chunk-WW55EZ4B.mjs → chunk-CBZXSBNX.mjs} +3 -6
- package/dist/{chunk-LZVUOVHO.mjs → chunk-EK56CXXU.mjs} +4 -2
- package/dist/{chunk-ENA4TRWO.mjs → chunk-YMMUWZA3.mjs} +1 -57
- package/dist/{chunk-MSZEQG5H.mjs → chunk-YV2SXIKG.mjs} +355 -262
- package/dist/components/index.mjs +5 -9
- package/dist/core/index.d.mts +2 -2
- package/dist/core/index.mjs +5 -9
- package/dist/hooks/index.d.mts +3 -3
- package/dist/hooks/index.mjs +1 -3
- package/dist/mantine.module-EDE7MA6Y.module.css +22 -0
- package/dist/modules-features/index.mjs +5 -9
- package/dist/shared/index.d.mts +221 -9
- package/dist/shared/index.mjs +288 -16
- package/dist/stores/index.d.mts +2 -17
- package/dist/stores/index.mjs +1 -4
- package/dist/utils/index.mjs +1 -1
- package/dist/utils-v2/index.mjs +1 -1
- package/package.json +1 -17
- package/dist/build-object/index.d.mts +0 -33
- package/dist/build-object/index.mjs +0 -11
- package/dist/chunk-BTITP4TN.mjs +0 -21
- package/dist/chunk-NYAWQRB7.mjs +0 -29
- package/dist/chunk-S5NCYRRY.mjs +0 -105
- package/dist/chunk-VFTEXXA7.mjs +0 -28
- package/dist/const/index.d.mts +0 -36
- package/dist/const/index.mjs +0 -17
- package/dist/const_aqModuleId-DcJjCR3N.d.mts +0 -9
- package/dist/enum/index.d.mts +0 -20
- package/dist/enum/index.mjs +0 -11
- package/dist/zod-schemas/index.d.mts +0 -161
- package/dist/zod-schemas/index.mjs +0 -71
- package/dist/{CustomDataTableAPI-BVA06xYD.d.mts → CustomDataTableAPI-oGo4pFag.d.mts} +2 -2
package/dist/shared/index.mjs
CHANGED
|
@@ -1,39 +1,311 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DocTypeSelect,
|
|
3
|
-
MySelect
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
MySelect,
|
|
4
|
+
cn,
|
|
5
|
+
colorsObject,
|
|
6
|
+
createBaseApi,
|
|
7
|
+
daysOfWeekEnum,
|
|
8
|
+
documentTypesObject,
|
|
9
|
+
genderEnum,
|
|
10
|
+
genderLabel
|
|
11
|
+
} from "../chunk-YV2SXIKG.mjs";
|
|
7
12
|
import {
|
|
8
13
|
utils_converter
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-BTITP4TN.mjs";
|
|
12
|
-
import "../chunk-S5NCYRRY.mjs";
|
|
14
|
+
} from "../chunk-6VCC6SNB.mjs";
|
|
15
|
+
import "../chunk-YMMUWZA3.mjs";
|
|
13
16
|
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
} from "../chunk-VFTEXXA7.mjs";
|
|
17
|
-
import "../chunk-ENA4TRWO.mjs";
|
|
17
|
+
createGenericStore
|
|
18
|
+
} from "../chunk-CBZXSBNX.mjs";
|
|
18
19
|
import "../chunk-WZ6PXGGC.mjs";
|
|
20
|
+
import "../chunk-EK56CXXU.mjs";
|
|
19
21
|
import {
|
|
20
22
|
__objRest,
|
|
21
23
|
__spreadValues
|
|
22
24
|
} from "../chunk-JD6AELXS.mjs";
|
|
23
25
|
|
|
24
|
-
// src/shared/
|
|
26
|
+
// src/shared/consts/aqModuleIdEnum.ts
|
|
27
|
+
var aqModuleIdEnum = {
|
|
28
|
+
SAE: 1,
|
|
29
|
+
EVA: 6,
|
|
30
|
+
SRM: 8,
|
|
31
|
+
EAQ: 10
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
// src/shared/consts/columnSizeObject.ts
|
|
35
|
+
var columnSizeObject = {
|
|
36
|
+
name: 300,
|
|
37
|
+
// Tên (họ tên, tên đề tài, tên đơn vị...)
|
|
38
|
+
description: 500
|
|
39
|
+
// Mô tả dài
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
// src/shared/consts/daysOfWeekArray.ts
|
|
43
|
+
var daysOfWeekArray = [
|
|
44
|
+
"Th\u1EE9 Hai",
|
|
45
|
+
"Th\u1EE9 Ba",
|
|
46
|
+
"Th\u1EE9 T\u01B0",
|
|
47
|
+
"Th\u1EE9 N\u0103m",
|
|
48
|
+
"Th\u1EE9 S\xE1u",
|
|
49
|
+
"Th\u1EE9 B\u1EA3y",
|
|
50
|
+
"Ch\u1EE7 Nh\u1EADt"
|
|
51
|
+
];
|
|
52
|
+
|
|
53
|
+
// src/shared/consts/menuDataObject.tsx
|
|
54
|
+
import { IconCategory, IconFileReport, IconSettings } from "@tabler/icons-react";
|
|
25
55
|
import { jsx } from "react/jsx-runtime";
|
|
56
|
+
var menuDataObject = {
|
|
57
|
+
managementSystem: () => {
|
|
58
|
+
return {
|
|
59
|
+
label: "Qu\u1EA3n l\xFD h\u1EC7 th\u1ED1ng",
|
|
60
|
+
icon: /* @__PURE__ */ jsx(IconSettings, {}),
|
|
61
|
+
links: [
|
|
62
|
+
{ pageId: 1, name: "Account management", label: "Qu\u1EA3n l\xFD t\xE0i kho\u1EA3n ", link: "accountManagement" },
|
|
63
|
+
{ pageId: 100005, name: "Account group management", label: "Qu\u1EA3n l\xFD nh\xF3m t\xE0i kho\u1EA3n", link: "roleManagement" },
|
|
64
|
+
{ pageId: 2, name: "Access control level", label: "Ph\xE2n quy\u1EC1n c\u1EA5p \u0111\u01A1n v\u1ECB", link: "accessControlLevel" },
|
|
65
|
+
{ pageId: 3, name: "Access control", label: "Ph\xE2n quy\u1EC1n s\u1EED d\u1EE5ng", link: "accessControl" },
|
|
66
|
+
{ pageId: 4, name: "Security regulations", label: "Quy \u0111\u1ECBnh an to\xE0n/ b\u1EA3o m\u1EADt th\xF4ng tin", link: "securityPolicyDocs" },
|
|
67
|
+
{ pageId: 5, name: "System updates", label: "Th\xF4ng tin x\xE2y d\u1EF1ng, c\u1EA3i ti\u1EBFn, b\u1EA3o tr\xEC h\u1EC7 th\u1ED1ng", link: "systemUpdateDocs" },
|
|
68
|
+
{ pageId: 6, name: "User guide", label: "T\xE0i li\u1EC7u h\u01B0\u1EDBng d\u1EABn s\u1EED d\u1EE5ng", link: "userGuideDocs" }
|
|
69
|
+
]
|
|
70
|
+
};
|
|
71
|
+
},
|
|
72
|
+
documentManagement: () => {
|
|
73
|
+
return {
|
|
74
|
+
label: "V\u0103n b\u1EA3n - Quy \u0111\u1ECBnh",
|
|
75
|
+
icon: /* @__PURE__ */ jsx(IconFileReport, {}),
|
|
76
|
+
links: [
|
|
77
|
+
{ pageId: 7, name: "Organizational regulations", label: "V\u0103n b\u1EA3n - Quy \u0111\u1ECBnh t\u1ED5 ch\u1EE9c", link: "organizationPolicyDocs" },
|
|
78
|
+
{ pageId: 8, name: "Workflow process", label: "Quy tr\xECnh x\u1EED l\xFD c\xF4ng vi\u1EC7c", link: "workflowProcessDocs" },
|
|
79
|
+
{ pageId: 9, name: "Form templates", label: "T\xE0i li\u1EC7u bi\u1EC3u m\u1EABu", link: "formTemplateDocs" }
|
|
80
|
+
]
|
|
81
|
+
};
|
|
82
|
+
},
|
|
83
|
+
systemCatalog: (extraMenu) => {
|
|
84
|
+
return {
|
|
85
|
+
label: "Danh m\u1EE5c h\u1EC7 th\u1ED1ng",
|
|
86
|
+
icon: /* @__PURE__ */ jsx(IconCategory, {}),
|
|
87
|
+
links: [
|
|
88
|
+
// { pageId: 100008, name: "lecturerList", label: "Danh mục viên chức", link: "lecturerList" },
|
|
89
|
+
{ pageId: 100001, name: "Document categories", label: "Danh m\u1EE5c lo\u1EA1i v\u0103n b\u1EA3n", link: "documentCategories" },
|
|
90
|
+
{ pageId: 100011, name: "Code config", label: "Danh m\u1EE5c b\u1ED9 \u0111\u1EBFm", link: "codeFormula" },
|
|
91
|
+
{ pageId: 100002, name: "mailConfig", label: "Danh m\u1EE5c c\u1EA5u h\xECnh mail", link: "mailConfig" },
|
|
92
|
+
{ pageId: 100010, name: "Mail template", label: "M\u1EABu Mail th\xF4ng b\xE1o", link: "mailTemplate" },
|
|
93
|
+
{ pageId: 100003, name: "pageContentConfig", label: "Danh m\u1EE5c Page Content", link: "pageContent" },
|
|
94
|
+
// { pageId: 100006, name: "Department list", label: "Danh mục đơn vị", link: "departmentList" },
|
|
95
|
+
// { pageId: 100007, name: "Academic year", label: "Danh mục năm học", link: "academicYear" },
|
|
96
|
+
{ pageId: 100004, name: "moduleConfig", label: "C\u1EA5u h\xECnh th\xF4ng tin ch\u1EE7 qu\u1EA3n", link: "moduleConfig" },
|
|
97
|
+
...extraMenu || []
|
|
98
|
+
]
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
// src/shared/features/GenderSelect.tsx
|
|
104
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
26
105
|
function GenderSelect(_a) {
|
|
27
106
|
var rest = __objRest(_a, []);
|
|
28
|
-
return /* @__PURE__ */
|
|
107
|
+
return /* @__PURE__ */ jsx2(
|
|
29
108
|
MySelect,
|
|
30
109
|
__spreadValues({
|
|
31
110
|
label: "Gi\u1EDBi t\xEDnh",
|
|
32
|
-
data: utils_converter.mapEnumToSelectData(
|
|
111
|
+
data: utils_converter.mapEnumToSelectData(genderEnum, genderLabel)
|
|
33
112
|
}, rest)
|
|
34
113
|
);
|
|
35
114
|
}
|
|
115
|
+
|
|
116
|
+
// src/shared/providers/MyMantineProvider.tsx
|
|
117
|
+
import { MantineProvider } from "@mantine/core";
|
|
118
|
+
import { ModalsProvider } from "@mantine/modals";
|
|
119
|
+
import { Notifications } from "@mantine/notifications";
|
|
120
|
+
|
|
121
|
+
// src/shared/providers/theme.tsx
|
|
122
|
+
import { ActionIcon, Blockquote, createTheme, Divider, FileInput, Indicator, Modal, Paper, Select, SimpleGrid, Space, Switch, Table, Textarea, TextInput, Title, Tooltip } from "@mantine/core";
|
|
123
|
+
import { DateInput, TimeInput } from "@mantine/dates";
|
|
124
|
+
import { IconFile, IconInfoCircle } from "@tabler/icons-react";
|
|
125
|
+
import dayjs from "dayjs";
|
|
126
|
+
import "dayjs/locale/vi";
|
|
127
|
+
import classes from "../mantine.module-EDE7MA6Y.module.css";
|
|
128
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
129
|
+
dayjs.locale("vi");
|
|
130
|
+
var theme = createTheme({
|
|
131
|
+
// variantColorResolver: variantColorResolver,
|
|
132
|
+
cursorType: "pointer",
|
|
133
|
+
components: {
|
|
134
|
+
Switch: Switch.extend({
|
|
135
|
+
defaultProps: {
|
|
136
|
+
maw: "fit-content"
|
|
137
|
+
}
|
|
138
|
+
}),
|
|
139
|
+
Paper: Paper.extend({
|
|
140
|
+
defaultProps: {
|
|
141
|
+
withBorder: true,
|
|
142
|
+
shadow: "sm",
|
|
143
|
+
radius: "md"
|
|
144
|
+
}
|
|
145
|
+
}),
|
|
146
|
+
TextInput: TextInput.extend({
|
|
147
|
+
defaultProps: {
|
|
148
|
+
classNames: classes
|
|
149
|
+
}
|
|
150
|
+
}),
|
|
151
|
+
Textarea: Textarea.extend({
|
|
152
|
+
defaultProps: {
|
|
153
|
+
autosize: true,
|
|
154
|
+
minRows: 4,
|
|
155
|
+
w: "100%"
|
|
156
|
+
}
|
|
157
|
+
}),
|
|
158
|
+
Title: Title.extend({
|
|
159
|
+
defaultProps: {
|
|
160
|
+
order: 2
|
|
161
|
+
}
|
|
162
|
+
}),
|
|
163
|
+
Modal: Modal.extend({
|
|
164
|
+
defaultProps: {
|
|
165
|
+
centered: true,
|
|
166
|
+
overlayProps: {
|
|
167
|
+
backgroundOpacity: 0.55,
|
|
168
|
+
blur: 3
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}),
|
|
172
|
+
DateInput: DateInput.extend({
|
|
173
|
+
defaultProps: {
|
|
174
|
+
dateParser: (value) => {
|
|
175
|
+
const [day, month, year] = value.split("/");
|
|
176
|
+
return /* @__PURE__ */ new Date(`${year}-${month}-${day}`);
|
|
177
|
+
},
|
|
178
|
+
valueFormat: "DD/MM/YYYY",
|
|
179
|
+
locale: "vi",
|
|
180
|
+
clearable: true,
|
|
181
|
+
highlightToday: true
|
|
182
|
+
}
|
|
183
|
+
}),
|
|
184
|
+
TimeInput: TimeInput.extend({
|
|
185
|
+
defaultProps: {}
|
|
186
|
+
}),
|
|
187
|
+
Divider: Divider.extend({
|
|
188
|
+
defaultProps: {
|
|
189
|
+
my: "md"
|
|
190
|
+
}
|
|
191
|
+
}),
|
|
192
|
+
Tooltip: Tooltip.extend({
|
|
193
|
+
defaultProps: {
|
|
194
|
+
withArrow: true,
|
|
195
|
+
transitionProps: { transition: "skew-up", duration: 150 }
|
|
196
|
+
}
|
|
197
|
+
}),
|
|
198
|
+
SimpleGrid: SimpleGrid.extend({
|
|
199
|
+
defaultProps: {
|
|
200
|
+
cols: { base: 1, sm: 2, lg: 4 }
|
|
201
|
+
}
|
|
202
|
+
}),
|
|
203
|
+
Blockquote: Blockquote.extend({
|
|
204
|
+
defaultProps: {
|
|
205
|
+
iconSize: 30,
|
|
206
|
+
icon: /* @__PURE__ */ jsx3(IconInfoCircle, {})
|
|
207
|
+
}
|
|
208
|
+
}),
|
|
209
|
+
ActionIcon: ActionIcon.extend({
|
|
210
|
+
defaultProps: {
|
|
211
|
+
variant: "light"
|
|
212
|
+
}
|
|
213
|
+
}),
|
|
214
|
+
Indicator: Indicator.extend({
|
|
215
|
+
defaultProps: {
|
|
216
|
+
size: 16,
|
|
217
|
+
inline: true
|
|
218
|
+
}
|
|
219
|
+
}),
|
|
220
|
+
Table: Table.extend({
|
|
221
|
+
defaultProps: {
|
|
222
|
+
withTableBorder: true,
|
|
223
|
+
withColumnBorders: true,
|
|
224
|
+
highlightOnHover: true
|
|
225
|
+
}
|
|
226
|
+
}),
|
|
227
|
+
Space: Space.extend({
|
|
228
|
+
defaultProps: {
|
|
229
|
+
my: "md",
|
|
230
|
+
mx: "md"
|
|
231
|
+
}
|
|
232
|
+
}),
|
|
233
|
+
FileInput: FileInput.extend({
|
|
234
|
+
defaultProps: {
|
|
235
|
+
leftSection: /* @__PURE__ */ jsx3(IconFile, {})
|
|
236
|
+
}
|
|
237
|
+
}),
|
|
238
|
+
Select: Select.extend({
|
|
239
|
+
defaultProps: {
|
|
240
|
+
allowDeselect: false
|
|
241
|
+
}
|
|
242
|
+
})
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
|
|
246
|
+
// src/shared/providers/MyMantineProvider.tsx
|
|
247
|
+
import { jsx as jsx4, jsxs } from "react/jsx-runtime";
|
|
248
|
+
|
|
249
|
+
// src/shared/providers/MyReactQueryProvider.tsx
|
|
250
|
+
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
251
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
252
|
+
var queryClient = new QueryClient({
|
|
253
|
+
defaultOptions: {
|
|
254
|
+
queries: {
|
|
255
|
+
refetchOnWindowFocus: false
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
// src/shared/providers/Provider.tsx
|
|
261
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
262
|
+
|
|
263
|
+
// src/shared/providers/themes/variantColorResolver.ts
|
|
264
|
+
import {
|
|
265
|
+
darken,
|
|
266
|
+
defaultVariantColorsResolver,
|
|
267
|
+
parseThemeColor,
|
|
268
|
+
rgba
|
|
269
|
+
} from "@mantine/core";
|
|
270
|
+
var variantColorResolver = (input) => {
|
|
271
|
+
const parsedColor = parseThemeColor({
|
|
272
|
+
color: input.color || input.theme.primaryColor,
|
|
273
|
+
theme: input.theme
|
|
274
|
+
});
|
|
275
|
+
const defaultColors = defaultVariantColorsResolver(input);
|
|
276
|
+
if (input.variant === "soft") {
|
|
277
|
+
return {
|
|
278
|
+
background: rgba(parsedColor.value, 0.1),
|
|
279
|
+
hover: rgba(parsedColor.value, 0.15),
|
|
280
|
+
border: `1px solid ${rgba(parsedColor.value, 0.2)}`,
|
|
281
|
+
color: parsedColor.value
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
if (input.variant === "light") {
|
|
285
|
+
return {
|
|
286
|
+
background: rgba(parsedColor.value, 0.08),
|
|
287
|
+
hover: rgba(parsedColor.value, 0.12),
|
|
288
|
+
border: `2px solid ${rgba(parsedColor.value, 0.2)}`,
|
|
289
|
+
color: darken(parsedColor.value, 0.2)
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
return defaultColors;
|
|
293
|
+
};
|
|
36
294
|
export {
|
|
37
295
|
DocTypeSelect,
|
|
38
|
-
GenderSelect
|
|
296
|
+
GenderSelect,
|
|
297
|
+
aqModuleIdEnum,
|
|
298
|
+
cn,
|
|
299
|
+
colorsObject,
|
|
300
|
+
columnSizeObject,
|
|
301
|
+
createBaseApi,
|
|
302
|
+
createGenericStore,
|
|
303
|
+
daysOfWeekArray,
|
|
304
|
+
daysOfWeekEnum,
|
|
305
|
+
documentTypesObject,
|
|
306
|
+
genderEnum,
|
|
307
|
+
genderLabel,
|
|
308
|
+
menuDataObject,
|
|
309
|
+
theme,
|
|
310
|
+
variantColorResolver
|
|
39
311
|
};
|
package/dist/stores/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as zustand from 'zustand';
|
|
2
2
|
import { I as IPagePermission } from '../IPagePermission-992CbJhp.mjs';
|
|
3
|
-
import { A as AqModuleId } from '../
|
|
3
|
+
import { A as AqModuleId } from '../aqModuleIdEnum-CRhuRqot.mjs';
|
|
4
4
|
|
|
5
5
|
interface AppState {
|
|
6
6
|
currentPageId?: number | null;
|
|
@@ -13,21 +13,6 @@ interface AppStore {
|
|
|
13
13
|
}
|
|
14
14
|
declare const useAppStore: zustand.UseBoundStore<zustand.StoreApi<AppStore>>;
|
|
15
15
|
|
|
16
|
-
interface GenericStore<T> {
|
|
17
|
-
state: T;
|
|
18
|
-
setState: (newState: T) => void;
|
|
19
|
-
setProperty: <K extends keyof T>(key: K, value: T[K]) => void;
|
|
20
|
-
resetState: () => void;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* @deprecated
|
|
24
|
-
* Vui lòng dùng `createGenericStore` từ `build-object` thay thế.
|
|
25
|
-
*/
|
|
26
|
-
declare function createGenericStore<T>({ initialState, storageKey }: {
|
|
27
|
-
initialState: T;
|
|
28
|
-
storageKey?: string;
|
|
29
|
-
}): zustand.UseBoundStore<zustand.StoreApi<GenericStore<T>>>;
|
|
30
|
-
|
|
31
16
|
interface IStore_Permission {
|
|
32
17
|
permission?: IPagePermission[];
|
|
33
18
|
currentPermissionPage?: IPagePermission;
|
|
@@ -50,4 +35,4 @@ declare function useStore_ProjectInfo(): {
|
|
|
50
35
|
resetState: () => void;
|
|
51
36
|
};
|
|
52
37
|
|
|
53
|
-
export { type IStore_Permission,
|
|
38
|
+
export { type IStore_Permission, useAppStore, useStore_Permission, useStore_ProjectInfo };
|
package/dist/stores/index.mjs
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
|
-
createGenericStore,
|
|
3
2
|
useAppStore,
|
|
4
3
|
useStore_Permission,
|
|
5
4
|
useStore_ProjectInfo
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-BTITP4TN.mjs";
|
|
5
|
+
} from "../chunk-CBZXSBNX.mjs";
|
|
8
6
|
import "../chunk-JD6AELXS.mjs";
|
|
9
7
|
export {
|
|
10
|
-
createGenericStore,
|
|
11
8
|
useAppStore,
|
|
12
9
|
useStore_Permission,
|
|
13
10
|
useStore_ProjectInfo
|
package/dist/utils/index.mjs
CHANGED
package/dist/utils-v2/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -33,14 +33,6 @@
|
|
|
33
33
|
"import": "./dist/interfaces/index.mjs",
|
|
34
34
|
"types": "./dist/interfaces/index.d.mts"
|
|
35
35
|
},
|
|
36
|
-
"./const": {
|
|
37
|
-
"import": "./dist/const/index.mjs",
|
|
38
|
-
"types": "./dist/const/index.d.mts"
|
|
39
|
-
},
|
|
40
|
-
"./enum": {
|
|
41
|
-
"import": "./dist/enum/index.mjs",
|
|
42
|
-
"types": "./dist/enum/index.d.mts"
|
|
43
|
-
},
|
|
44
36
|
"./core": {
|
|
45
37
|
"import": "./dist/core/index.mjs",
|
|
46
38
|
"types": "./dist/core/index.d.mts"
|
|
@@ -48,17 +40,9 @@
|
|
|
48
40
|
"./types": {
|
|
49
41
|
"import": "./dist/types/index.mjs",
|
|
50
42
|
"types": "./dist/types/index.d.mts"
|
|
51
|
-
},
|
|
52
|
-
"./build-object": {
|
|
53
|
-
"import": "./dist/build-object/index.mjs",
|
|
54
|
-
"types": "./dist/build-object/index.d.mts"
|
|
55
|
-
},
|
|
56
|
-
"./zod-schemas": {
|
|
57
|
-
"import": "./dist/zod-schemas/index.mjs",
|
|
58
|
-
"types": "./dist/zod-schemas/index.d.mts"
|
|
59
43
|
}
|
|
60
44
|
},
|
|
61
|
-
"version": "0.2.
|
|
45
|
+
"version": "0.2.5",
|
|
62
46
|
"private": false,
|
|
63
47
|
"files": [
|
|
64
48
|
"dist"
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import * as zustand from 'zustand';
|
|
2
|
-
|
|
3
|
-
interface GenericStore<T> {
|
|
4
|
-
state: T;
|
|
5
|
-
setState: (newState: T) => void;
|
|
6
|
-
setProperty: <K extends keyof T>(key: K, value: T[K]) => void;
|
|
7
|
-
resetState: () => void;
|
|
8
|
-
}
|
|
9
|
-
declare function createGenericStore<T>({ initialState, storageKey }: {
|
|
10
|
-
initialState: T;
|
|
11
|
-
storageKey?: string;
|
|
12
|
-
}): zustand.UseBoundStore<zustand.StoreApi<GenericStore<T>>>;
|
|
13
|
-
|
|
14
|
-
interface ITenantSetting<TKey = string> {
|
|
15
|
-
settingKey?: TKey;
|
|
16
|
-
settingValue?: string | boolean | number;
|
|
17
|
-
description?: string;
|
|
18
|
-
}
|
|
19
|
-
interface IStoreState<TKey = string> {
|
|
20
|
-
tenantSettings?: ITenantSetting<TKey>[];
|
|
21
|
-
}
|
|
22
|
-
declare function createTenantSettingsStore<TKey>(params: {
|
|
23
|
-
storageKey?: string;
|
|
24
|
-
initialState?: Partial<IStoreState<TKey>>;
|
|
25
|
-
}): () => {
|
|
26
|
-
getSetting: (settingKey: TKey) => string | boolean | number | undefined;
|
|
27
|
-
state: IStoreState<TKey>;
|
|
28
|
-
setState: (newState: IStoreState<TKey>) => void;
|
|
29
|
-
setProperty: <K extends "tenantSettings">(key: K, value: IStoreState<TKey>[K]) => void;
|
|
30
|
-
resetState: () => void;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export { type IStoreState, type ITenantSetting, createGenericStore, createTenantSettingsStore };
|
package/dist/chunk-BTITP4TN.mjs
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__spreadProps,
|
|
3
|
-
__spreadValues
|
|
4
|
-
} from "./chunk-JD6AELXS.mjs";
|
|
5
|
-
|
|
6
|
-
// src/build-object/CreateGenericStore.ts
|
|
7
|
-
import { create } from "zustand";
|
|
8
|
-
import { persist } from "zustand/middleware";
|
|
9
|
-
function createGenericStore({ initialState, storageKey }) {
|
|
10
|
-
const storeCreator = (set) => ({
|
|
11
|
-
state: initialState,
|
|
12
|
-
setState: (newState) => set({ state: newState }),
|
|
13
|
-
setProperty: (key, value) => set((store) => ({ state: __spreadProps(__spreadValues({}, store.state), { [key]: value }) })),
|
|
14
|
-
resetState: () => set({ state: initialState })
|
|
15
|
-
});
|
|
16
|
-
return storageKey ? create(persist(storeCreator, { name: storageKey })) : create(storeCreator);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export {
|
|
20
|
-
createGenericStore
|
|
21
|
-
};
|
package/dist/chunk-NYAWQRB7.mjs
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createGenericStore
|
|
3
|
-
} from "./chunk-BTITP4TN.mjs";
|
|
4
|
-
import {
|
|
5
|
-
__spreadProps,
|
|
6
|
-
__spreadValues
|
|
7
|
-
} from "./chunk-JD6AELXS.mjs";
|
|
8
|
-
|
|
9
|
-
// src/build-object/createTenantSettingsStore.ts
|
|
10
|
-
function createTenantSettingsStore(params) {
|
|
11
|
-
const useStore = createGenericStore({
|
|
12
|
-
initialState: params.initialState || {},
|
|
13
|
-
storageKey: params.storageKey || "useStore_TenantSettings"
|
|
14
|
-
});
|
|
15
|
-
return function useTenantSettingsStore() {
|
|
16
|
-
const store = useStore();
|
|
17
|
-
function getSetting(settingKey) {
|
|
18
|
-
var _a, _b;
|
|
19
|
-
return (_b = (_a = store.state.tenantSettings) == null ? void 0 : _a.find((s) => s.settingKey === settingKey)) == null ? void 0 : _b.settingValue;
|
|
20
|
-
}
|
|
21
|
-
return __spreadProps(__spreadValues({}, store), {
|
|
22
|
-
getSetting
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export {
|
|
28
|
-
createTenantSettingsStore
|
|
29
|
-
};
|
package/dist/chunk-S5NCYRRY.mjs
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
// src/const/array/const_array_daysOfWeek.ts
|
|
2
|
-
var const_array_daysOfWeek = [
|
|
3
|
-
"Th\u1EE9 Hai",
|
|
4
|
-
"Th\u1EE9 Ba",
|
|
5
|
-
"Th\u1EE9 T\u01B0",
|
|
6
|
-
"Th\u1EE9 N\u0103m",
|
|
7
|
-
"Th\u1EE9 S\xE1u",
|
|
8
|
-
"Th\u1EE9 B\u1EA3y",
|
|
9
|
-
"Ch\u1EE7 Nh\u1EADt"
|
|
10
|
-
];
|
|
11
|
-
|
|
12
|
-
// src/const/object/const_aqModuleId.ts
|
|
13
|
-
var const_aqModuleId = {
|
|
14
|
-
SAE: 1,
|
|
15
|
-
EVA: 6,
|
|
16
|
-
SRM: 8,
|
|
17
|
-
EAQ: 10
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
// src/const/object/const_columnSize.ts
|
|
21
|
-
var const_columnSize = {
|
|
22
|
-
name: 300,
|
|
23
|
-
// Tên (họ tên, tên đề tài, tên đơn vị...)
|
|
24
|
-
description: 500
|
|
25
|
-
// Mô tả dài
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
// src/const/object/const_object_colors.ts
|
|
29
|
-
var const_object_colors = {
|
|
30
|
-
mantineBackgroundPrimary: "light-dark(var(--mantine-color-white), var(--mantine-color-dark))",
|
|
31
|
-
mantineBackgroundSecondary: "light-dark(var(--mantine-color-gray-1), var(--mantine-color-dark-8))",
|
|
32
|
-
mantineBackgroundTertiary: "light-dark(var(--mantine-color-gray-0), var(--mantine-color-dark-6))",
|
|
33
|
-
mantineBackgroundBlueLight: "var(--mantine-color-blue-light)",
|
|
34
|
-
mantineBackgroundBlue: "var(--mantine-color-blue)",
|
|
35
|
-
mantineBackgroundTealLight: "var(--mantine-color-teal-light)"
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
// src/const/object/const_object_documentTypes.ts
|
|
39
|
-
var const_object_documentTypes = {
|
|
40
|
-
Security: 1,
|
|
41
|
-
Refinement: 2,
|
|
42
|
-
Guideline: 3,
|
|
43
|
-
Regulations: 4,
|
|
44
|
-
Workflow: 5,
|
|
45
|
-
Form: 6
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
// src/const/object/const_object_menuData.tsx
|
|
49
|
-
import { IconCategory, IconFileReport, IconSettings } from "@tabler/icons-react";
|
|
50
|
-
import { jsx } from "react/jsx-runtime";
|
|
51
|
-
var const_object_generalMenuData = {
|
|
52
|
-
managementSystem: () => {
|
|
53
|
-
return {
|
|
54
|
-
label: "Qu\u1EA3n l\xFD h\u1EC7 th\u1ED1ng",
|
|
55
|
-
icon: /* @__PURE__ */ jsx(IconSettings, {}),
|
|
56
|
-
links: [
|
|
57
|
-
{ pageId: 1, name: "Account management", label: "Qu\u1EA3n l\xFD t\xE0i kho\u1EA3n ", link: "accountManagement" },
|
|
58
|
-
{ pageId: 100005, name: "Account group management", label: "Qu\u1EA3n l\xFD nh\xF3m t\xE0i kho\u1EA3n", link: "roleManagement" },
|
|
59
|
-
{ pageId: 2, name: "Access control level", label: "Ph\xE2n quy\u1EC1n c\u1EA5p \u0111\u01A1n v\u1ECB", link: "accessControlLevel" },
|
|
60
|
-
{ pageId: 3, name: "Access control", label: "Ph\xE2n quy\u1EC1n s\u1EED d\u1EE5ng", link: "accessControl" },
|
|
61
|
-
{ pageId: 4, name: "Security regulations", label: "Quy \u0111\u1ECBnh an to\xE0n/ b\u1EA3o m\u1EADt th\xF4ng tin", link: "securityPolicyDocs" },
|
|
62
|
-
{ pageId: 5, name: "System updates", label: "Th\xF4ng tin x\xE2y d\u1EF1ng, c\u1EA3i ti\u1EBFn, b\u1EA3o tr\xEC h\u1EC7 th\u1ED1ng", link: "systemUpdateDocs" },
|
|
63
|
-
{ pageId: 6, name: "User guide", label: "T\xE0i li\u1EC7u h\u01B0\u1EDBng d\u1EABn s\u1EED d\u1EE5ng", link: "userGuideDocs" }
|
|
64
|
-
]
|
|
65
|
-
};
|
|
66
|
-
},
|
|
67
|
-
documentManagement: () => {
|
|
68
|
-
return {
|
|
69
|
-
label: "V\u0103n b\u1EA3n - Quy \u0111\u1ECBnh",
|
|
70
|
-
icon: /* @__PURE__ */ jsx(IconFileReport, {}),
|
|
71
|
-
links: [
|
|
72
|
-
{ pageId: 7, name: "Organizational regulations", label: "V\u0103n b\u1EA3n - Quy \u0111\u1ECBnh t\u1ED5 ch\u1EE9c", link: "organizationPolicyDocs" },
|
|
73
|
-
{ pageId: 8, name: "Workflow process", label: "Quy tr\xECnh x\u1EED l\xFD c\xF4ng vi\u1EC7c", link: "workflowProcessDocs" },
|
|
74
|
-
{ pageId: 9, name: "Form templates", label: "T\xE0i li\u1EC7u bi\u1EC3u m\u1EABu", link: "formTemplateDocs" }
|
|
75
|
-
]
|
|
76
|
-
};
|
|
77
|
-
},
|
|
78
|
-
systemCatalog: (extraMenu) => {
|
|
79
|
-
return {
|
|
80
|
-
label: "Danh m\u1EE5c h\u1EC7 th\u1ED1ng",
|
|
81
|
-
icon: /* @__PURE__ */ jsx(IconCategory, {}),
|
|
82
|
-
links: [
|
|
83
|
-
// { pageId: 100008, name: "lecturerList", label: "Danh mục viên chức", link: "lecturerList" },
|
|
84
|
-
{ pageId: 100001, name: "Document categories", label: "Danh m\u1EE5c lo\u1EA1i v\u0103n b\u1EA3n", link: "documentCategories" },
|
|
85
|
-
{ pageId: 100011, name: "Code config", label: "Danh m\u1EE5c b\u1ED9 \u0111\u1EBFm", link: "codeFormula" },
|
|
86
|
-
{ pageId: 100002, name: "mailConfig", label: "Danh m\u1EE5c c\u1EA5u h\xECnh mail", link: "mailConfig" },
|
|
87
|
-
{ pageId: 100010, name: "Mail template", label: "M\u1EABu Mail th\xF4ng b\xE1o", link: "mailTemplate" },
|
|
88
|
-
{ pageId: 100003, name: "pageContentConfig", label: "Danh m\u1EE5c Page Content", link: "pageContent" },
|
|
89
|
-
// { pageId: 100006, name: "Department list", label: "Danh mục đơn vị", link: "departmentList" },
|
|
90
|
-
// { pageId: 100007, name: "Academic year", label: "Danh mục năm học", link: "academicYear" },
|
|
91
|
-
{ pageId: 100004, name: "moduleConfig", label: "C\u1EA5u h\xECnh th\xF4ng tin ch\u1EE7 qu\u1EA3n", link: "moduleConfig" },
|
|
92
|
-
...extraMenu || []
|
|
93
|
-
]
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
export {
|
|
99
|
-
const_array_daysOfWeek,
|
|
100
|
-
const_aqModuleId,
|
|
101
|
-
const_columnSize,
|
|
102
|
-
const_object_colors,
|
|
103
|
-
const_object_documentTypes,
|
|
104
|
-
const_object_generalMenuData
|
|
105
|
-
};
|
package/dist/chunk-VFTEXXA7.mjs
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// src/enum/enum_daysOfWeek.ts
|
|
2
|
-
var enum_daysOfWeek = /* @__PURE__ */ ((enum_daysOfWeek2) => {
|
|
3
|
-
enum_daysOfWeek2[enum_daysOfWeek2["Th\u1EE9 Hai"] = 1] = "Th\u1EE9 Hai";
|
|
4
|
-
enum_daysOfWeek2[enum_daysOfWeek2["Th\u1EE9 Ba"] = 2] = "Th\u1EE9 Ba";
|
|
5
|
-
enum_daysOfWeek2[enum_daysOfWeek2["Th\u1EE9 T\u01B0"] = 3] = "Th\u1EE9 T\u01B0";
|
|
6
|
-
enum_daysOfWeek2[enum_daysOfWeek2["Th\u1EE9 N\u0103m"] = 4] = "Th\u1EE9 N\u0103m";
|
|
7
|
-
enum_daysOfWeek2[enum_daysOfWeek2["Th\u1EE9 S\xE1u"] = 5] = "Th\u1EE9 S\xE1u";
|
|
8
|
-
enum_daysOfWeek2[enum_daysOfWeek2["Th\u1EE9 B\u1EA3y"] = 6] = "Th\u1EE9 B\u1EA3y";
|
|
9
|
-
enum_daysOfWeek2[enum_daysOfWeek2["Ch\u1EE7 Nh\u1EADt"] = 0] = "Ch\u1EE7 Nh\u1EADt";
|
|
10
|
-
return enum_daysOfWeek2;
|
|
11
|
-
})(enum_daysOfWeek || {});
|
|
12
|
-
|
|
13
|
-
// src/enum/enum_gender.ts
|
|
14
|
-
var enum_gender = /* @__PURE__ */ ((enum_gender2) => {
|
|
15
|
-
enum_gender2[enum_gender2["Male"] = 1] = "Male";
|
|
16
|
-
enum_gender2[enum_gender2["Female"] = 2] = "Female";
|
|
17
|
-
return enum_gender2;
|
|
18
|
-
})(enum_gender || {});
|
|
19
|
-
var enumLabel_gender = {
|
|
20
|
-
[1 /* Male */]: "Nam",
|
|
21
|
-
[2 /* Female */]: "N\u1EEF"
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export {
|
|
25
|
-
enum_daysOfWeek,
|
|
26
|
-
enum_gender,
|
|
27
|
-
enumLabel_gender
|
|
28
|
-
};
|