aq-fe-framework 0.2.3 → 0.2.4

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,6 +1,3 @@
1
- import {
2
- createGenericStore
3
- } from "./chunk-BTITP4TN.mjs";
4
1
  import {
5
2
  __spreadProps,
6
3
  __spreadValues
@@ -23,10 +20,10 @@ var useAppStore = create((set, get) => ({
23
20
  }
24
21
  }));
25
22
 
26
- // src/stores/CreateGenericStore.ts
23
+ // src/shared/lib/createGenericStore.ts
27
24
  import { create as create2 } from "zustand";
28
25
  import { persist } from "zustand/middleware";
29
- function createGenericStore2({ initialState, storageKey }) {
26
+ function createGenericStore({ initialState, storageKey }) {
30
27
  const storeCreator = (set) => ({
31
28
  state: initialState,
32
29
  setState: (newState) => set({ state: newState }),
@@ -58,7 +55,7 @@ function useStore_ProjectInfo() {
58
55
 
59
56
  export {
60
57
  useAppStore,
61
- createGenericStore2 as createGenericStore,
58
+ createGenericStore,
62
59
  useStore_Permission,
63
60
  useStore_ProjectInfo
64
61
  };
@@ -74,61 +74,6 @@ function useMyRouter() {
74
74
  });
75
75
  }
76
76
 
77
- // src/hooks/custom-hooks/createBaseApi.ts
78
- function createBaseApi(baseUrl, axiosInstance) {
79
- return {
80
- get: ({
81
- params = "",
82
- id,
83
- paging
84
- } = {}) => {
85
- return axiosInstance.get(`${baseUrl}/get` + params, { params: __spreadProps(__spreadValues({}, paging), { id }) });
86
- },
87
- getAll: ({
88
- params = "",
89
- cols,
90
- paging
91
- } = {}) => {
92
- return axiosInstance.get(`${baseUrl}/GetAll` + params, {
93
- params: __spreadValues({
94
- cols: cols == null ? void 0 : cols.join(",")
95
- }, paging)
96
- });
97
- },
98
- create: (data) => {
99
- return axiosInstance.post(`${baseUrl}/create`, __spreadValues({}, data));
100
- },
101
- update: (data) => {
102
- return axiosInstance.post(`${baseUrl}/update`, data);
103
- },
104
- updateList: (data) => {
105
- return axiosInstance.post(`${baseUrl}/updateList`, data);
106
- },
107
- createOrUpdateList: (data) => {
108
- return axiosInstance.post(`${baseUrl}/createOrUpdateList`, data);
109
- },
110
- createList: (data) => {
111
- return axiosInstance.post(`${baseUrl}/createList`, data);
112
- },
113
- delete: (id) => {
114
- return axiosInstance.post(`${baseUrl}/delete`, { id });
115
- },
116
- //Theme delete list
117
- deleteList: (values) => {
118
- return axiosInstance.post(`${baseUrl}/deleteList`, values.map((item) => ({
119
- id: item.id,
120
- isEnabled: false
121
- })));
122
- },
123
- deleteListIds: (ids) => {
124
- return axiosInstance.post(`${baseUrl}/deleteList`, ids.map((id) => ({
125
- id,
126
- isEnabled: false
127
- })));
128
- }
129
- };
130
- }
131
-
132
77
  // src/hooks/custom-hooks/useConfig.ts
133
78
  import { useQuery } from "@tanstack/react-query";
134
79
  async function fetchConfig(configPath) {
@@ -296,7 +241,7 @@ function useCrudService(service, queryKey) {
296
241
  };
297
242
  }
298
243
 
299
- // src/api/config/baseAxios.ts
244
+ // src/shared/config/baseAxios.ts
300
245
  import axios from "axios";
301
246
  var baseAxios = axios.create({
302
247
  baseURL: ""
@@ -376,7 +321,6 @@ export {
376
321
  useExportData,
377
322
  useMyDevice,
378
323
  useMyRouter,
379
- createBaseApi,
380
324
  useConfig,
381
325
  useMyReactMutation,
382
326
  useMyReactQuery,
@@ -65,15 +65,11 @@ import {
65
65
  getReadablePageIdSet,
66
66
  useHeaderMegaMenuStore,
67
67
  useStore_BasicAppShell
68
- } from "../chunk-MSZEQG5H.mjs";
69
- import "../chunk-WW55EZ4B.mjs";
68
+ } from "../chunk-BDL36J6Y.mjs";
70
69
  import "../chunk-LZVUOVHO.mjs";
71
70
  import "../chunk-G75DH6JW.mjs";
72
- import "../chunk-NYAWQRB7.mjs";
73
- import "../chunk-BTITP4TN.mjs";
74
- import "../chunk-S5NCYRRY.mjs";
75
- import "../chunk-VFTEXXA7.mjs";
76
- import "../chunk-ENA4TRWO.mjs";
71
+ import "../chunk-YMMUWZA3.mjs";
72
+ import "../chunk-CBZXSBNX.mjs";
77
73
  import "../chunk-WZ6PXGGC.mjs";
78
74
  import "../chunk-JD6AELXS.mjs";
79
75
  export {
@@ -11,8 +11,8 @@ import { useDisclosure, UseDisclosureReturnValue } from '@mantine/hooks';
11
11
  import { M as MyButtonModalProps, a as MyButtonDeleteListProps } from '../MyButtonDeleteList-D-TUKf6l.mjs';
12
12
  export { b as MyButtonModal } from '../MyButtonDeleteList-D-TUKf6l.mjs';
13
13
  export { b as MyActionIcon, a as MyActionIconProps, c as MyButton, M as MyButtonProps } from '../MyButton-B-zlvQ58.mjs';
14
- import { M as MySelectProps } from '../CustomDataTableAPI-BVA06xYD.mjs';
15
- export { d as CustomDataTableAPI, C as CustomDataTableAPIProps, b as MyButtonCreateUpdate, a as MyButtonCreateUpdateProps, c as MySelect } from '../CustomDataTableAPI-BVA06xYD.mjs';
14
+ import { M as MySelectProps } from '../CustomDataTableAPI-oGo4pFag.mjs';
15
+ export { d as CustomDataTableAPI, C as CustomDataTableAPIProps, b as MyButtonCreateUpdate, a as MyButtonCreateUpdateProps, c as MySelect } from '../CustomDataTableAPI-oGo4pFag.mjs';
16
16
  import { UseQueryResult, QueryKey, UseQueryOptions } from '@tanstack/react-query';
17
17
  import { MRT_RowData, MRT_ColumnDef, MRT_TableInstance } from 'mantine-react-table';
18
18
  import { M as MyDataTableProps } from '../MyDataTable-EHNm2xBh.mjs';
@@ -37,15 +37,11 @@ import {
37
37
  MyStatsCard,
38
38
  MyTextInput2 as MyTextInput,
39
39
  MyWeeklySessionSchedulerPicker
40
- } from "../chunk-MSZEQG5H.mjs";
41
- import "../chunk-WW55EZ4B.mjs";
40
+ } from "../chunk-BDL36J6Y.mjs";
42
41
  import "../chunk-LZVUOVHO.mjs";
43
42
  import "../chunk-G75DH6JW.mjs";
44
- import "../chunk-NYAWQRB7.mjs";
45
- import "../chunk-BTITP4TN.mjs";
46
- import "../chunk-S5NCYRRY.mjs";
47
- import "../chunk-VFTEXXA7.mjs";
48
- import "../chunk-ENA4TRWO.mjs";
43
+ import "../chunk-YMMUWZA3.mjs";
44
+ import "../chunk-CBZXSBNX.mjs";
49
45
  import "../chunk-WZ6PXGGC.mjs";
50
46
  import "../chunk-JD6AELXS.mjs";
51
47
  export {
@@ -1,10 +1,10 @@
1
1
  import * as react from 'react';
2
2
  import { MRT_RowData, MRT_TableInstance } from 'mantine-react-table';
3
3
  import * as next_dist_shared_lib_app_router_context_shared_runtime from 'next/dist/shared/lib/app-router-context.shared-runtime';
4
- import { B as BaseApiType, M as MyApiResponse } from '../useMyReactMutation-C4T2Bi5O.mjs';
5
- export { I as IPagingParams, a as MyReactMutationProps, c as createBaseApi, u as useMyReactMutation } from '../useMyReactMutation-C4T2Bi5O.mjs';
6
4
  import * as _tanstack_react_query from '@tanstack/react-query';
7
5
  import { QueryKey } from '@tanstack/react-query';
6
+ import { B as BaseApiType, M as MyApiResponse } from '../useMyReactMutation-C4T2Bi5O.mjs';
7
+ export { a as MyReactMutationProps, u as useMyReactMutation } from '../useMyReactMutation-C4T2Bi5O.mjs';
8
8
  import { AxiosInstance } from 'axios';
9
9
  export { M as MyReactQueryProps, u as useMyReactQuery } from '../useMyReactQuery-CqXIs4-6.mjs';
10
10
  import { I as IAQModule } from '../IAQModule-DbiJ8E6q.mjs';
@@ -78,4 +78,4 @@ declare const useLoadAxiosConfig: ({ axiosInstance, aqModule, url, prefix, }: {
78
78
 
79
79
  declare function useQ_AQ_GetAQModule(): _tanstack_react_query.UseQueryResult<IAQModule, Error>;
80
80
 
81
- export { BaseApiType, MyApiResponse, useConfig, useCrudService, useEditableRows, useExportData, useLoadAxiosConfig, useMyDevice, useMyRouter, useQ_AQ_GetAQModule };
81
+ export { useConfig, useCrudService, useEditableRows, useExportData, useLoadAxiosConfig, useMyDevice, useMyRouter, useQ_AQ_GetAQModule };
@@ -1,5 +1,4 @@
1
1
  import {
2
- createBaseApi,
3
2
  useConfig,
4
3
  useCrudService,
5
4
  useEditableRows,
@@ -10,11 +9,10 @@ import {
10
9
  useMyReactQuery,
11
10
  useMyRouter,
12
11
  useQ_AQ_GetAQModule
13
- } from "../chunk-ENA4TRWO.mjs";
12
+ } from "../chunk-YMMUWZA3.mjs";
14
13
  import "../chunk-WZ6PXGGC.mjs";
15
14
  import "../chunk-JD6AELXS.mjs";
16
15
  export {
17
- createBaseApi,
18
16
  useConfig,
19
17
  useCrudService,
20
18
  useEditableRows,
@@ -0,0 +1,22 @@
1
+ .input[data-variant="underline"] {
2
+ border: calc(0.125rem * var(--mantine-scale)) solid transparent;
3
+ border-radius: calc(0.3125rem * var(--mantine-scale));
4
+ padding-left: calc(0.5rem * var(--mantine-scale));
5
+ padding-right: calc(0.5rem * var(--mantine-scale));
6
+ background-color: white;
7
+ }
8
+
9
+ .input[data-variant="underline"]:focus,
10
+ .input[data-variant="underline"]:focus-visible {
11
+ border-color: var(--mantine-color-gray-5);
12
+ outline: none;
13
+ }
14
+
15
+ .input[data-variant="underline"]:active {
16
+ border-color: var(--mantine-color-gray-5);
17
+ }
18
+
19
+ .input[data-variant="underline"] {
20
+
21
+ transition: border-color 0.2s ease-in-out;
22
+ }
@@ -64,15 +64,11 @@ import {
64
64
  UserAvatarMenu,
65
65
  useS_moduleConfig,
66
66
  useStore_Authenticate
67
- } from "../chunk-MSZEQG5H.mjs";
68
- import "../chunk-WW55EZ4B.mjs";
67
+ } from "../chunk-BDL36J6Y.mjs";
69
68
  import "../chunk-LZVUOVHO.mjs";
70
69
  import "../chunk-G75DH6JW.mjs";
71
- import "../chunk-NYAWQRB7.mjs";
72
- import "../chunk-BTITP4TN.mjs";
73
- import "../chunk-S5NCYRRY.mjs";
74
- import "../chunk-VFTEXXA7.mjs";
75
- import "../chunk-ENA4TRWO.mjs";
70
+ import "../chunk-YMMUWZA3.mjs";
71
+ import "../chunk-CBZXSBNX.mjs";
76
72
  import "../chunk-WZ6PXGGC.mjs";
77
73
  import "../chunk-JD6AELXS.mjs";
78
74
  export {
@@ -1,22 +1,77 @@
1
+ export { A as AqModuleId, a as aqModuleIdEnum } from '../aqModuleIdEnum-CRhuRqot.mjs';
2
+ import { I as I_BasicAppShell_LinkItem } from '../types-mIsH5BBF.mjs';
1
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { SelectProps } from '@mantine/core';
3
- import { M as MySelectProps, C as CustomDataTableAPIProps } from '../CustomDataTableAPI-BVA06xYD.mjs';
4
+ import * as _mantine_core from '@mantine/core';
5
+ import { SelectProps, VariantColorsResolver } from '@mantine/core';
6
+ import { M as MySelectProps, C as CustomDataTableAPIProps } from '../CustomDataTableAPI-oGo4pFag.mjs';
4
7
  import { I as IAccount } from '../IAccount-C2U1yDfL.mjs';
8
+ export { B as BaseApiType, I as IPagingParams, M as MyApiResponse, c as createBaseApi } from '../useMyReactMutation-C4T2Bi5O.mjs';
9
+ import { ClassValue } from 'clsx';
10
+ import * as zustand from 'zustand';
5
11
  import 'react';
6
- import 'mantine-react-table';
7
- import '../useMyReactQuery-CqXIs4-6.mjs';
8
- import '@tanstack/react-query';
9
12
  import 'axios';
10
- import '../useMyReactMutation-C4T2Bi5O.mjs';
11
- import '../type_mutation-CCtnyeP3.mjs';
12
- import '../IBaseEntity-BVJRftBU.mjs';
13
13
  import '@mantine/form';
14
14
  import '@mantine/hooks';
15
15
  import '../MyButton-B-zlvQ58.mjs';
16
16
  import '../type_action-hMF6_2Mr.mjs';
17
+ import 'mantine-react-table';
17
18
  import '../MyDataTable-EHNm2xBh.mjs';
18
19
  import '@tanstack/react-table';
20
+ import '../useMyReactQuery-CqXIs4-6.mjs';
21
+ import '@tanstack/react-query';
19
22
  import '../utils_file-JlhzjLGS.mjs';
23
+ import '../IBaseEntity-BVJRftBU.mjs';
24
+ import '../type_mutation-CCtnyeP3.mjs';
25
+
26
+ declare const colorsObject: {
27
+ mantineBackgroundPrimary: string;
28
+ mantineBackgroundSecondary: string;
29
+ mantineBackgroundTertiary: string;
30
+ mantineBackgroundBlueLight: string;
31
+ mantineBackgroundBlue: string;
32
+ mantineBackgroundTealLight: string;
33
+ };
34
+
35
+ declare const columnSizeObject: {
36
+ name: number;
37
+ description: number;
38
+ };
39
+
40
+ declare const daysOfWeekArray: string[];
41
+
42
+ declare enum daysOfWeekEnum {
43
+ "Thứ Hai" = 1,
44
+ "Thứ Ba" = 2,
45
+ "Thứ Tư" = 3,
46
+ "Thứ Năm" = 4,
47
+ "Thứ Sáu" = 5,
48
+ "Thứ Bảy" = 6,
49
+ "Chủ Nhật" = 0
50
+ }
51
+
52
+ declare const documentTypesObject: {
53
+ Security: number;
54
+ Refinement: number;
55
+ Guideline: number;
56
+ Regulations: number;
57
+ Workflow: number;
58
+ Form: number;
59
+ };
60
+
61
+ declare enum genderEnum {
62
+ /** Nam */
63
+ Male = 1,
64
+ /** Nữ */
65
+ Female = 2
66
+ }
67
+ /** 1=Nam, 2=Nữ */
68
+ declare const genderLabel: Record<genderEnum, string>;
69
+
70
+ declare const menuDataObject: {
71
+ managementSystem: () => I_BasicAppShell_LinkItem;
72
+ documentManagement: () => I_BasicAppShell_LinkItem;
73
+ systemCatalog: (extraMenu?: I_BasicAppShell_LinkItem[]) => I_BasicAppShell_LinkItem;
74
+ };
20
75
 
21
76
  interface ISelect extends SelectProps {
22
77
  documentTypeId?: number;
@@ -35,4 +90,161 @@ declare function GenderSelect({ ...rest }: Shared_GenderSelectProps): react_jsx_
35
90
  interface AccountTableProps extends Omit<CustomDataTableAPIProps<IAccount>, "query" | "columns"> {
36
91
  }
37
92
 
38
- export { type AccountTableProps, DocTypeSelect, GenderSelect };
93
+ declare function cn(...inputs: ClassValue[]): string;
94
+
95
+ interface GenericStore<T> {
96
+ state: T;
97
+ setState: (newState: T) => void;
98
+ setProperty: <K extends keyof T>(key: K, value: T[K]) => void;
99
+ resetState: () => void;
100
+ }
101
+ declare function createGenericStore<T>({ initialState, storageKey }: {
102
+ initialState: T;
103
+ storageKey?: string;
104
+ }): zustand.UseBoundStore<zustand.StoreApi<GenericStore<T>>>;
105
+
106
+ declare const theme: {
107
+ focusRing?: "auto" | "always" | "never" | undefined;
108
+ scale?: number | undefined;
109
+ fontSmoothing?: boolean | undefined;
110
+ white?: string | undefined;
111
+ black?: string | undefined;
112
+ colors?: {
113
+ [x: string & {}]: _mantine_core.MantineColorsTuple | undefined;
114
+ blue?: _mantine_core.MantineColorsTuple | undefined;
115
+ cyan?: _mantine_core.MantineColorsTuple | undefined;
116
+ gray?: _mantine_core.MantineColorsTuple | undefined;
117
+ green?: _mantine_core.MantineColorsTuple | undefined;
118
+ indigo?: _mantine_core.MantineColorsTuple | undefined;
119
+ lime?: _mantine_core.MantineColorsTuple | undefined;
120
+ orange?: _mantine_core.MantineColorsTuple | undefined;
121
+ pink?: _mantine_core.MantineColorsTuple | undefined;
122
+ red?: _mantine_core.MantineColorsTuple | undefined;
123
+ teal?: _mantine_core.MantineColorsTuple | undefined;
124
+ violet?: _mantine_core.MantineColorsTuple | undefined;
125
+ yellow?: _mantine_core.MantineColorsTuple | undefined;
126
+ dark?: _mantine_core.MantineColorsTuple | undefined;
127
+ grape?: _mantine_core.MantineColorsTuple | undefined;
128
+ } | undefined;
129
+ primaryShade?: _mantine_core.MantineColorShade | {
130
+ light?: _mantine_core.MantineColorShade | undefined;
131
+ dark?: _mantine_core.MantineColorShade | undefined;
132
+ } | undefined;
133
+ primaryColor?: string | undefined;
134
+ variantColorResolver?: _mantine_core.VariantColorsResolver | undefined;
135
+ autoContrast?: boolean | undefined;
136
+ luminanceThreshold?: number | undefined;
137
+ fontFamily?: string | undefined;
138
+ fontFamilyMonospace?: string | undefined;
139
+ headings?: {
140
+ fontFamily?: string | undefined;
141
+ fontWeight?: string | undefined;
142
+ textWrap?: "wrap" | "nowrap" | "balance" | "pretty" | "stable" | undefined;
143
+ sizes?: {
144
+ h1?: {
145
+ fontSize?: string | undefined;
146
+ fontWeight?: string | undefined;
147
+ lineHeight?: string | undefined;
148
+ } | undefined;
149
+ h2?: {
150
+ fontSize?: string | undefined;
151
+ fontWeight?: string | undefined;
152
+ lineHeight?: string | undefined;
153
+ } | undefined;
154
+ h3?: {
155
+ fontSize?: string | undefined;
156
+ fontWeight?: string | undefined;
157
+ lineHeight?: string | undefined;
158
+ } | undefined;
159
+ h4?: {
160
+ fontSize?: string | undefined;
161
+ fontWeight?: string | undefined;
162
+ lineHeight?: string | undefined;
163
+ } | undefined;
164
+ h5?: {
165
+ fontSize?: string | undefined;
166
+ fontWeight?: string | undefined;
167
+ lineHeight?: string | undefined;
168
+ } | undefined;
169
+ h6?: {
170
+ fontSize?: string | undefined;
171
+ fontWeight?: string | undefined;
172
+ lineHeight?: string | undefined;
173
+ } | undefined;
174
+ } | undefined;
175
+ } | undefined;
176
+ radius?: {
177
+ [x: string & {}]: string | undefined;
178
+ xs?: string | undefined;
179
+ sm?: string | undefined;
180
+ md?: string | undefined;
181
+ lg?: string | undefined;
182
+ xl?: string | undefined;
183
+ } | undefined;
184
+ defaultRadius?: _mantine_core.MantineRadius | undefined;
185
+ spacing?: {
186
+ [x: number]: string | undefined;
187
+ [x: string & {}]: string | undefined;
188
+ xs?: string | undefined;
189
+ sm?: string | undefined;
190
+ md?: string | undefined;
191
+ lg?: string | undefined;
192
+ xl?: string | undefined;
193
+ } | undefined;
194
+ fontSizes?: {
195
+ [x: string & {}]: string | undefined;
196
+ xs?: string | undefined;
197
+ sm?: string | undefined;
198
+ md?: string | undefined;
199
+ lg?: string | undefined;
200
+ xl?: string | undefined;
201
+ } | undefined;
202
+ lineHeights?: {
203
+ [x: string & {}]: string | undefined;
204
+ xs?: string | undefined;
205
+ sm?: string | undefined;
206
+ md?: string | undefined;
207
+ lg?: string | undefined;
208
+ xl?: string | undefined;
209
+ } | undefined;
210
+ breakpoints?: {
211
+ [x: string & {}]: string | undefined;
212
+ xs?: string | undefined;
213
+ sm?: string | undefined;
214
+ md?: string | undefined;
215
+ lg?: string | undefined;
216
+ xl?: string | undefined;
217
+ } | undefined;
218
+ shadows?: {
219
+ [x: string & {}]: string | undefined;
220
+ xs?: string | undefined;
221
+ sm?: string | undefined;
222
+ md?: string | undefined;
223
+ lg?: string | undefined;
224
+ xl?: string | undefined;
225
+ } | undefined;
226
+ respectReducedMotion?: boolean | undefined;
227
+ cursorType?: "default" | "pointer" | undefined;
228
+ defaultGradient?: {
229
+ from?: string | undefined;
230
+ to?: string | undefined;
231
+ deg?: number | undefined;
232
+ } | undefined;
233
+ activeClassName?: string | undefined;
234
+ focusClassName?: string | undefined;
235
+ components?: {
236
+ [x: string]: {
237
+ classNames?: any;
238
+ styles?: any;
239
+ vars?: any;
240
+ defaultProps?: any;
241
+ } | undefined;
242
+ } | undefined;
243
+ other?: {
244
+ [x: string]: any;
245
+ } | undefined;
246
+ };
247
+
248
+ declare const variantColorResolver: VariantColorsResolver;
249
+
250
+ export { type AccountTableProps, DocTypeSelect, GenderSelect, cn, colorsObject, columnSizeObject, createGenericStore, daysOfWeekArray, daysOfWeekEnum, documentTypesObject, genderEnum, genderLabel, menuDataObject, theme, variantColorResolver };