aq-fe-framework 0.1.502 → 0.1.504
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.
@@ -2,7 +2,7 @@ import {
|
|
2
2
|
MyDataTable,
|
3
3
|
MyFlexColumn,
|
4
4
|
MyFlexRow
|
5
|
-
} from "./chunk-
|
5
|
+
} from "./chunk-LJRJYSNW.mjs";
|
6
6
|
import {
|
7
7
|
const_object_colors
|
8
8
|
} from "./chunk-OMJJAHOC.mjs";
|
@@ -98,98 +98,92 @@ function MyActionIcon(_a) {
|
|
98
98
|
}
|
99
99
|
|
100
100
|
// src/core/button/MyButton.tsx
|
101
|
-
import { Button } from "@mantine/core";
|
101
|
+
import { Button, useMantineColorScheme } from "@mantine/core";
|
102
102
|
import {
|
103
103
|
IconDeviceFloppy as IconDeviceFloppy2,
|
104
|
+
IconDownload,
|
104
105
|
IconEdit as IconEdit2,
|
105
|
-
IconFileExport as IconFileExport2,
|
106
|
-
IconFileImport as IconFileImport2,
|
107
106
|
IconPlus as IconPlus2,
|
108
107
|
IconPrinter as IconPrinter2,
|
109
108
|
IconTrash as IconTrash2,
|
109
|
+
IconUpload,
|
110
110
|
IconX as IconX2
|
111
111
|
} from "@tabler/icons-react";
|
112
112
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
113
|
-
var actionConfig2 = {
|
114
|
-
default: {
|
115
|
-
defaultText: ""
|
116
|
-
},
|
117
|
-
create: {
|
118
|
-
color: "blue",
|
119
|
-
type: "submit",
|
120
|
-
icon: /* @__PURE__ */ jsx2(IconPlus2, {}),
|
121
|
-
defaultText: "Th\xEAm"
|
122
|
-
},
|
123
|
-
createMultiple: {
|
124
|
-
color: "green",
|
125
|
-
type: "submit",
|
126
|
-
icon: /* @__PURE__ */ jsx2(IconPlus2, {}),
|
127
|
-
defaultText: "Th\xEAm danh s\xE1ch"
|
128
|
-
},
|
129
|
-
delete: {
|
130
|
-
color: "red",
|
131
|
-
icon: /* @__PURE__ */ jsx2(IconTrash2, {}),
|
132
|
-
defaultText: "X\xF3a"
|
133
|
-
},
|
134
|
-
update: {
|
135
|
-
color: "yellow",
|
136
|
-
type: "submit",
|
137
|
-
icon: /* @__PURE__ */ jsx2(IconEdit2, {}),
|
138
|
-
defaultText: "Ch\u1EC9nh s\u1EEDa"
|
139
|
-
},
|
140
|
-
save: {
|
141
|
-
color: "blue",
|
142
|
-
type: "submit",
|
143
|
-
icon: /* @__PURE__ */ jsx2(IconDeviceFloppy2, {}),
|
144
|
-
defaultText: "L\u01B0u"
|
145
|
-
},
|
146
|
-
import: {
|
147
|
-
color: "green.8",
|
148
|
-
icon: /* @__PURE__ */ jsx2(IconFileImport2, {}),
|
149
|
-
defaultText: "Import"
|
150
|
-
},
|
151
|
-
print: {
|
152
|
-
color: "orange.7",
|
153
|
-
icon: /* @__PURE__ */ jsx2(IconPrinter2, {}),
|
154
|
-
defaultText: "In"
|
155
|
-
},
|
156
|
-
export: {
|
157
|
-
color: "green.8",
|
158
|
-
icon: /* @__PURE__ */ jsx2(IconFileExport2, {}),
|
159
|
-
defaultText: "Export"
|
160
|
-
},
|
161
|
-
cancel: {
|
162
|
-
color: "gray",
|
163
|
-
icon: /* @__PURE__ */ jsx2(IconX2, {}),
|
164
|
-
defaultText: "H\u1EE7y thao t\xE1c"
|
165
|
-
},
|
166
|
-
select: {
|
167
|
-
defaultText: "Ch\u1ECDn"
|
168
|
-
},
|
169
|
-
check: {
|
170
|
-
defaultText: "Ch\u1ECDn"
|
171
|
-
}
|
172
|
-
};
|
173
113
|
function MyButton(_a) {
|
174
114
|
var _b = _a, { children, actionType } = _b, rest = __objRest(_b, ["children", "actionType"]);
|
115
|
+
const { colorScheme } = useMantineColorScheme();
|
116
|
+
const actionConfig2 = {
|
117
|
+
default: {
|
118
|
+
children: ""
|
119
|
+
},
|
120
|
+
create: {
|
121
|
+
color: colorScheme == "light" ? "blue" : "blue.3",
|
122
|
+
type: "submit",
|
123
|
+
leftSection: /* @__PURE__ */ jsx2(IconPlus2, {}),
|
124
|
+
children: "Th\xEAm"
|
125
|
+
},
|
126
|
+
createMultiple: {
|
127
|
+
color: "green",
|
128
|
+
type: "submit",
|
129
|
+
leftSection: /* @__PURE__ */ jsx2(IconPlus2, {}),
|
130
|
+
children: "Th\xEAm danh s\xE1ch"
|
131
|
+
},
|
132
|
+
delete: {
|
133
|
+
color: "red",
|
134
|
+
leftSection: /* @__PURE__ */ jsx2(IconTrash2, {}),
|
135
|
+
children: "X\xF3a"
|
136
|
+
},
|
137
|
+
update: {
|
138
|
+
color: "yellow",
|
139
|
+
type: "submit",
|
140
|
+
leftSection: /* @__PURE__ */ jsx2(IconEdit2, {}),
|
141
|
+
children: "Ch\u1EC9nh s\u1EEDa"
|
142
|
+
},
|
143
|
+
save: {
|
144
|
+
color: "blue",
|
145
|
+
type: "submit",
|
146
|
+
leftSection: /* @__PURE__ */ jsx2(IconDeviceFloppy2, {}),
|
147
|
+
children: "L\u01B0u"
|
148
|
+
},
|
149
|
+
import: {
|
150
|
+
color: colorScheme == "light" ? "green" : "green.3",
|
151
|
+
leftSection: /* @__PURE__ */ jsx2(IconUpload, {}),
|
152
|
+
children: "Import",
|
153
|
+
variant: "light"
|
154
|
+
},
|
155
|
+
export: {
|
156
|
+
color: colorScheme == "light" ? "violet" : "violet.3",
|
157
|
+
leftSection: /* @__PURE__ */ jsx2(IconDownload, {}),
|
158
|
+
children: "Export",
|
159
|
+
variant: "light"
|
160
|
+
},
|
161
|
+
print: {
|
162
|
+
color: "orange.7",
|
163
|
+
leftSection: /* @__PURE__ */ jsx2(IconPrinter2, {}),
|
164
|
+
children: "In"
|
165
|
+
},
|
166
|
+
cancel: {
|
167
|
+
color: "gray",
|
168
|
+
leftSection: /* @__PURE__ */ jsx2(IconX2, {}),
|
169
|
+
children: "H\u1EE7y thao t\xE1c"
|
170
|
+
},
|
171
|
+
select: {
|
172
|
+
children: "Ch\u1ECDn"
|
173
|
+
},
|
174
|
+
check: {
|
175
|
+
children: "Ch\u1ECDn"
|
176
|
+
}
|
177
|
+
};
|
175
178
|
if (!actionType) {
|
176
179
|
return /* @__PURE__ */ jsx2(Button, __spreadProps(__spreadValues({}, rest), { children }));
|
177
180
|
}
|
178
181
|
const config = actionConfig2[actionType];
|
179
|
-
return /* @__PURE__ */ jsx2(
|
180
|
-
Button,
|
181
|
-
__spreadProps(__spreadValues({
|
182
|
-
color: config.color,
|
183
|
-
type: config.type,
|
184
|
-
leftSection: config.icon
|
185
|
-
}, rest), {
|
186
|
-
children: children != null ? children : config.defaultText
|
187
|
-
})
|
188
|
-
);
|
182
|
+
return /* @__PURE__ */ jsx2(Button, __spreadValues(__spreadValues({}, config), rest));
|
189
183
|
}
|
190
184
|
|
191
185
|
// src/core/button/MyButtonCreateUpdate.tsx
|
192
|
-
import { ActionIcon as ActionIcon2, Button as Button2, Modal, ScrollArea, Space, useMantineColorScheme } from "@mantine/core";
|
186
|
+
import { ActionIcon as ActionIcon2, Button as Button2, Modal, ScrollArea, Space, useMantineColorScheme as useMantineColorScheme2 } from "@mantine/core";
|
193
187
|
import { useDisclosure } from "@mantine/hooks";
|
194
188
|
import { IconEdit as IconEdit3, IconPlus as IconPlus3 } from "@tabler/icons-react";
|
195
189
|
import { useQueryClient } from "@tanstack/react-query";
|
@@ -221,7 +215,7 @@ function MyButtonCreateUpdate({
|
|
221
215
|
isUpdate = false,
|
222
216
|
scrollAreaAutosizeProps
|
223
217
|
}) {
|
224
|
-
const theme =
|
218
|
+
const theme = useMantineColorScheme2();
|
225
219
|
const defaultDisclosure = useDisclosure();
|
226
220
|
const disclosure = externalDisclosure != null ? externalDisclosure : defaultDisclosure;
|
227
221
|
const queryClient = useQueryClient();
|
@@ -328,7 +322,7 @@ import { jsx as jsx5 } from "react/jsx-runtime";
|
|
328
322
|
// src/core/button/MyButtonImport.tsx
|
329
323
|
import { Button as Button4, FileInput } from "@mantine/core";
|
330
324
|
import { useDisclosure as useDisclosure2 } from "@mantine/hooks";
|
331
|
-
import { IconFileImport as
|
325
|
+
import { IconFileImport as IconFileImport2 } from "@tabler/icons-react";
|
332
326
|
import { useMemo } from "react";
|
333
327
|
|
334
328
|
// src/core/button/MyButtonModal.tsx
|
@@ -2122,19 +2122,19 @@ function MyButtonViewPDF({
|
|
2122
2122
|
/* @__PURE__ */ jsx34(
|
2123
2123
|
LoadingOverlay,
|
2124
2124
|
{
|
2125
|
-
visible: query.isLoading,
|
2126
2125
|
zIndex: 1e3,
|
2127
2126
|
overlayProps: { radius: "sm", blur: 2 }
|
2128
2127
|
}
|
2129
2128
|
),
|
2130
|
-
query.data
|
2129
|
+
query.data && /* @__PURE__ */ jsx34(
|
2131
2130
|
"iframe",
|
2132
2131
|
{
|
2133
2132
|
src: `data:application/pdf;base64, ${filePath ? (_a = query.data) == null ? void 0 : _a.fileBase64String : (_c = (_b = query.data) == null ? void 0 : _b.fileDetail) == null ? void 0 : _c.fileBase64String}`,
|
2134
2133
|
width: "100%",
|
2135
2134
|
height: "100%"
|
2136
2135
|
}
|
2137
|
-
)
|
2136
|
+
),
|
2137
|
+
src && /* @__PURE__ */ jsx34("iframe", { src, width: "100%", height: "100%" })
|
2138
2138
|
] })
|
2139
2139
|
}
|
2140
2140
|
)
|
@@ -66,7 +66,7 @@ import {
|
|
66
66
|
useS_BasicAppShell,
|
67
67
|
useS_ButtonImport,
|
68
68
|
utils_layout_getItemsWithoutLinks
|
69
|
-
} from "../chunk-
|
69
|
+
} from "../chunk-LJRJYSNW.mjs";
|
70
70
|
import "../chunk-U62R2QKJ.mjs";
|
71
71
|
import "../chunk-5U2JSHSJ.mjs";
|
72
72
|
import "../chunk-OMJJAHOC.mjs";
|
package/dist/core/index.mjs
CHANGED
@@ -18,11 +18,11 @@ import {
|
|
18
18
|
MyStatsCard,
|
19
19
|
MyTextInput,
|
20
20
|
MyWeeklySessionSchedulerPicker
|
21
|
-
} from "../chunk-
|
22
|
-
import "../chunk-
|
21
|
+
} from "../chunk-I2Q7GG2C.mjs";
|
22
|
+
import "../chunk-GFEMKKFH.mjs";
|
23
|
+
import "../chunk-LJRJYSNW.mjs";
|
23
24
|
import "../chunk-U62R2QKJ.mjs";
|
24
25
|
import "../chunk-5U2JSHSJ.mjs";
|
25
|
-
import "../chunk-GFEMKKFH.mjs";
|
26
26
|
import "../chunk-OMJJAHOC.mjs";
|
27
27
|
import "../chunk-K6S7R6LU.mjs";
|
28
28
|
import "../chunk-5IELATPH.mjs";
|
@@ -15,7 +15,10 @@ import {
|
|
15
15
|
MyButton as MyButton2,
|
16
16
|
MyDataTableSelectOne,
|
17
17
|
MyTextInput as MyTextInput2
|
18
|
-
} from "../chunk-
|
18
|
+
} from "../chunk-I2Q7GG2C.mjs";
|
19
|
+
import {
|
20
|
+
const_object_documentTypes
|
21
|
+
} from "../chunk-GFEMKKFH.mjs";
|
19
22
|
import {
|
20
23
|
F_authenticate_Logout,
|
21
24
|
MyActionIconDelete,
|
@@ -41,14 +44,11 @@ import {
|
|
41
44
|
groupToTwoLevels,
|
42
45
|
useS_authenticate,
|
43
46
|
utils_layout_getItemsWithoutLinks
|
44
|
-
} from "../chunk-
|
47
|
+
} from "../chunk-LJRJYSNW.mjs";
|
45
48
|
import {
|
46
49
|
createGenericStore
|
47
50
|
} from "../chunk-U62R2QKJ.mjs";
|
48
51
|
import "../chunk-5U2JSHSJ.mjs";
|
49
|
-
import {
|
50
|
-
const_object_documentTypes
|
51
|
-
} from "../chunk-GFEMKKFH.mjs";
|
52
52
|
import {
|
53
53
|
const_object_colors
|
54
54
|
} from "../chunk-OMJJAHOC.mjs";
|
@@ -4023,24 +4023,25 @@ function F_moduleConfig_Form() {
|
|
4023
4023
|
form.setValues(values);
|
4024
4024
|
}, [query.data]);
|
4025
4025
|
useEffect7(() => {
|
4026
|
-
if (process.env.NEXT_PUBLIC_APP_PROTOTYPE == "
|
4027
|
-
|
4028
|
-
|
4029
|
-
|
4030
|
-
|
4031
|
-
|
4032
|
-
|
4033
|
-
|
4034
|
-
|
4035
|
-
|
4036
|
-
|
4037
|
-
|
4038
|
-
|
4039
|
-
|
4040
|
-
|
4041
|
-
|
4042
|
-
|
4043
|
-
|
4026
|
+
if (process.env.NEXT_PUBLIC_APP_PROTOTYPE == "1") {
|
4027
|
+
const values = {
|
4028
|
+
code: "moduleCode",
|
4029
|
+
name: "moduleName",
|
4030
|
+
officelName: "C\xF4ng ty ABC",
|
4031
|
+
email: "companyABC@gmail.com",
|
4032
|
+
phoneNumber: "03422122222",
|
4033
|
+
registrationDate: new Date((/* @__PURE__ */ new Date()).setFullYear((/* @__PURE__ */ new Date()).getFullYear() - 1)),
|
4034
|
+
limiteDate: new Date((/* @__PURE__ */ new Date()).setFullYear((/* @__PURE__ */ new Date()).getFullYear() + 1)),
|
4035
|
+
faviconPath: "",
|
4036
|
+
logoPath: "",
|
4037
|
+
faviconFile: new File([], "favicon.png"),
|
4038
|
+
logoFile: new File([], "logo.png"),
|
4039
|
+
faviconFileDetail: void 0,
|
4040
|
+
logoFileDetail: void 0
|
4041
|
+
};
|
4042
|
+
form.setInitialValues(values);
|
4043
|
+
form.setValues(values);
|
4044
|
+
}
|
4044
4045
|
}, []);
|
4045
4046
|
return /* @__PURE__ */ jsxs49(Paper7, { p: "md", children: [
|
4046
4047
|
/* @__PURE__ */ jsxs49(Grid4, { children: [
|