aq-fe-framework 0.1.502 → 0.1.503

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-YAMXCOJ5.mjs";
5
+ } from "./chunk-LJRJYSNW.mjs";
6
6
  import {
7
7
  const_object_colors
8
8
  } from "./chunk-OMJJAHOC.mjs";
@@ -101,73 +101,75 @@ function MyActionIcon(_a) {
101
101
  import { Button } 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
113
  var actionConfig2 = {
114
114
  default: {
115
- defaultText: ""
115
+ children: ""
116
116
  },
117
117
  create: {
118
118
  color: "blue",
119
119
  type: "submit",
120
- icon: /* @__PURE__ */ jsx2(IconPlus2, {}),
121
- defaultText: "Th\xEAm"
120
+ leftSection: /* @__PURE__ */ jsx2(IconPlus2, {}),
121
+ children: "Th\xEAm"
122
122
  },
123
123
  createMultiple: {
124
124
  color: "green",
125
125
  type: "submit",
126
- icon: /* @__PURE__ */ jsx2(IconPlus2, {}),
127
- defaultText: "Th\xEAm danh s\xE1ch"
126
+ leftSection: /* @__PURE__ */ jsx2(IconPlus2, {}),
127
+ children: "Th\xEAm danh s\xE1ch"
128
128
  },
129
129
  delete: {
130
130
  color: "red",
131
- icon: /* @__PURE__ */ jsx2(IconTrash2, {}),
132
- defaultText: "X\xF3a"
131
+ leftSection: /* @__PURE__ */ jsx2(IconTrash2, {}),
132
+ children: "X\xF3a"
133
133
  },
134
134
  update: {
135
135
  color: "yellow",
136
136
  type: "submit",
137
- icon: /* @__PURE__ */ jsx2(IconEdit2, {}),
138
- defaultText: "Ch\u1EC9nh s\u1EEDa"
137
+ leftSection: /* @__PURE__ */ jsx2(IconEdit2, {}),
138
+ children: "Ch\u1EC9nh s\u1EEDa"
139
139
  },
140
140
  save: {
141
141
  color: "blue",
142
142
  type: "submit",
143
- icon: /* @__PURE__ */ jsx2(IconDeviceFloppy2, {}),
144
- defaultText: "L\u01B0u"
143
+ leftSection: /* @__PURE__ */ jsx2(IconDeviceFloppy2, {}),
144
+ children: "L\u01B0u"
145
145
  },
146
146
  import: {
147
- color: "green.8",
148
- icon: /* @__PURE__ */ jsx2(IconFileImport2, {}),
149
- defaultText: "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"
150
157
  },
151
158
  print: {
152
159
  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
+ leftSection: /* @__PURE__ */ jsx2(IconPrinter2, {}),
161
+ children: "In"
160
162
  },
161
163
  cancel: {
162
164
  color: "gray",
163
- icon: /* @__PURE__ */ jsx2(IconX2, {}),
164
- defaultText: "H\u1EE7y thao t\xE1c"
165
+ leftSection: /* @__PURE__ */ jsx2(IconX2, {}),
166
+ children: "H\u1EE7y thao t\xE1c"
165
167
  },
166
168
  select: {
167
- defaultText: "Ch\u1ECDn"
169
+ children: "Ch\u1ECDn"
168
170
  },
169
171
  check: {
170
- defaultText: "Ch\u1ECDn"
172
+ children: "Ch\u1ECDn"
171
173
  }
172
174
  };
173
175
  function MyButton(_a) {
@@ -176,16 +178,7 @@ function MyButton(_a) {
176
178
  return /* @__PURE__ */ jsx2(Button, __spreadProps(__spreadValues({}, rest), { children }));
177
179
  }
178
180
  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
- );
181
+ return /* @__PURE__ */ jsx2(Button, __spreadValues(__spreadValues({}, config), rest));
189
182
  }
190
183
 
191
184
  // src/core/button/MyButtonCreateUpdate.tsx
@@ -328,7 +321,7 @@ import { jsx as jsx5 } from "react/jsx-runtime";
328
321
  // src/core/button/MyButtonImport.tsx
329
322
  import { Button as Button4, FileInput } from "@mantine/core";
330
323
  import { useDisclosure as useDisclosure2 } from "@mantine/hooks";
331
- import { IconFileImport as IconFileImport3 } from "@tabler/icons-react";
324
+ import { IconFileImport as IconFileImport2 } from "@tabler/icons-react";
332
325
  import { useMemo } from "react";
333
326
 
334
327
  // 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 ? /* @__PURE__ */ jsx34(
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
- ) : /* @__PURE__ */ jsx34("iframe", { src, width: "100%", height: "100%" })
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-YAMXCOJ5.mjs";
69
+ } from "../chunk-LJRJYSNW.mjs";
70
70
  import "../chunk-U62R2QKJ.mjs";
71
71
  import "../chunk-5U2JSHSJ.mjs";
72
72
  import "../chunk-OMJJAHOC.mjs";
@@ -18,8 +18,8 @@ import {
18
18
  MyStatsCard,
19
19
  MyTextInput,
20
20
  MyWeeklySessionSchedulerPicker
21
- } from "../chunk-SH7FDAU2.mjs";
22
- import "../chunk-YAMXCOJ5.mjs";
21
+ } from "../chunk-LB6M373A.mjs";
22
+ import "../chunk-LJRJYSNW.mjs";
23
23
  import "../chunk-U62R2QKJ.mjs";
24
24
  import "../chunk-5U2JSHSJ.mjs";
25
25
  import "../chunk-GFEMKKFH.mjs";
@@ -15,7 +15,7 @@ import {
15
15
  MyButton as MyButton2,
16
16
  MyDataTableSelectOne,
17
17
  MyTextInput as MyTextInput2
18
- } from "../chunk-SH7FDAU2.mjs";
18
+ } from "../chunk-LB6M373A.mjs";
19
19
  import {
20
20
  F_authenticate_Logout,
21
21
  MyActionIconDelete,
@@ -41,7 +41,7 @@ import {
41
41
  groupToTwoLevels,
42
42
  useS_authenticate,
43
43
  utils_layout_getItemsWithoutLinks
44
- } from "../chunk-YAMXCOJ5.mjs";
44
+ } from "../chunk-LJRJYSNW.mjs";
45
45
  import {
46
46
  createGenericStore
47
47
  } from "../chunk-U62R2QKJ.mjs";
package/package.json CHANGED
@@ -42,7 +42,7 @@
42
42
  "types": "./dist/columns/index.d.mts"
43
43
  }
44
44
  },
45
- "version": "0.1.502",
45
+ "version": "0.1.503",
46
46
  "private": false,
47
47
  "files": [
48
48
  "dist"