aq-fe-framework 0.1.503 → 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.
@@ -98,7 +98,7 @@ 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
104
|
IconDownload,
|
@@ -110,70 +110,71 @@ import {
|
|
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
|
-
children: ""
|
116
|
-
},
|
117
|
-
create: {
|
118
|
-
color: "blue",
|
119
|
-
type: "submit",
|
120
|
-
leftSection: /* @__PURE__ */ jsx2(IconPlus2, {}),
|
121
|
-
children: "Th\xEAm"
|
122
|
-
},
|
123
|
-
createMultiple: {
|
124
|
-
color: "green",
|
125
|
-
type: "submit",
|
126
|
-
leftSection: /* @__PURE__ */ jsx2(IconPlus2, {}),
|
127
|
-
children: "Th\xEAm danh s\xE1ch"
|
128
|
-
},
|
129
|
-
delete: {
|
130
|
-
color: "red",
|
131
|
-
leftSection: /* @__PURE__ */ jsx2(IconTrash2, {}),
|
132
|
-
children: "X\xF3a"
|
133
|
-
},
|
134
|
-
update: {
|
135
|
-
color: "yellow",
|
136
|
-
type: "submit",
|
137
|
-
leftSection: /* @__PURE__ */ jsx2(IconEdit2, {}),
|
138
|
-
children: "Ch\u1EC9nh s\u1EEDa"
|
139
|
-
},
|
140
|
-
save: {
|
141
|
-
color: "blue",
|
142
|
-
type: "submit",
|
143
|
-
leftSection: /* @__PURE__ */ jsx2(IconDeviceFloppy2, {}),
|
144
|
-
children: "L\u01B0u"
|
145
|
-
},
|
146
|
-
import: {
|
147
|
-
color: "green",
|
148
|
-
leftSection: /* @__PURE__ */ jsx2(IconUpload, {}),
|
149
|
-
children: "Import",
|
150
|
-
variant: "light"
|
151
|
-
},
|
152
|
-
export: {
|
153
|
-
color: "violet",
|
154
|
-
leftSection: /* @__PURE__ */ jsx2(IconDownload, {}),
|
155
|
-
children: "Export",
|
156
|
-
variant: "light"
|
157
|
-
},
|
158
|
-
print: {
|
159
|
-
color: "orange.7",
|
160
|
-
leftSection: /* @__PURE__ */ jsx2(IconPrinter2, {}),
|
161
|
-
children: "In"
|
162
|
-
},
|
163
|
-
cancel: {
|
164
|
-
color: "gray",
|
165
|
-
leftSection: /* @__PURE__ */ jsx2(IconX2, {}),
|
166
|
-
children: "H\u1EE7y thao t\xE1c"
|
167
|
-
},
|
168
|
-
select: {
|
169
|
-
children: "Ch\u1ECDn"
|
170
|
-
},
|
171
|
-
check: {
|
172
|
-
children: "Ch\u1ECDn"
|
173
|
-
}
|
174
|
-
};
|
175
113
|
function MyButton(_a) {
|
176
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
|
+
};
|
177
178
|
if (!actionType) {
|
178
179
|
return /* @__PURE__ */ jsx2(Button, __spreadProps(__spreadValues({}, rest), { children }));
|
179
180
|
}
|
@@ -182,7 +183,7 @@ function MyButton(_a) {
|
|
182
183
|
}
|
183
184
|
|
184
185
|
// src/core/button/MyButtonCreateUpdate.tsx
|
185
|
-
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";
|
186
187
|
import { useDisclosure } from "@mantine/hooks";
|
187
188
|
import { IconEdit as IconEdit3, IconPlus as IconPlus3 } from "@tabler/icons-react";
|
188
189
|
import { useQueryClient } from "@tanstack/react-query";
|
@@ -214,7 +215,7 @@ function MyButtonCreateUpdate({
|
|
214
215
|
isUpdate = false,
|
215
216
|
scrollAreaAutosizeProps
|
216
217
|
}) {
|
217
|
-
const theme =
|
218
|
+
const theme = useMantineColorScheme2();
|
218
219
|
const defaultDisclosure = useDisclosure();
|
219
220
|
const disclosure = externalDisclosure != null ? externalDisclosure : defaultDisclosure;
|
220
221
|
const queryClient = useQueryClient();
|
package/dist/core/index.mjs
CHANGED
@@ -18,11 +18,11 @@ import {
|
|
18
18
|
MyStatsCard,
|
19
19
|
MyTextInput,
|
20
20
|
MyWeeklySessionSchedulerPicker
|
21
|
-
} from "../chunk-
|
21
|
+
} from "../chunk-I2Q7GG2C.mjs";
|
22
|
+
import "../chunk-GFEMKKFH.mjs";
|
22
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,
|
@@ -46,9 +49,6 @@ 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: [
|