aq-fe-framework 0.1.517 → 0.1.518

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,4 +1,5 @@
1
1
  import {
2
+ MyButton,
2
3
  MyDataTable,
3
4
  MyFlexColumn,
4
5
  MyFlexRow
@@ -175,7 +176,7 @@ var getActionConfig2 = (colorScheme) => ({
175
176
  children: "T\xECm"
176
177
  }
177
178
  });
178
- function MyButton(_a) {
179
+ function MyButton2(_a) {
179
180
  var _b = _a, { children, actionType } = _b, rest = __objRest(_b, ["children", "actionType"]);
180
181
  const { colorScheme } = useMantineColorScheme2();
181
182
  if (!actionType) {
@@ -307,7 +308,7 @@ function MyButtonCreateUpdate({
307
308
  })
308
309
  ),
309
310
  /* @__PURE__ */ jsx4(Space, {}),
310
- /* @__PURE__ */ jsx4(MyButton, { fullWidth: true, actionType: "save" })
311
+ /* @__PURE__ */ jsx4(MyButton2, { fullWidth: true, actionType: "save" })
311
312
  ]
312
313
  }
313
314
  )
@@ -346,7 +347,7 @@ function MyButtonModal({
346
347
  onClick: disclosure == null ? void 0 : disclosure[1].open
347
348
  }, actionIconProps)
348
349
  ) : /* @__PURE__ */ jsx6(
349
- MyButton,
350
+ MyButton2,
350
351
  __spreadValues({
351
352
  onClick: disclosure == null ? void 0 : disclosure[1].open
352
353
  }, buttonProps)
@@ -396,7 +397,7 @@ function MyButtonModalForm(_a) {
396
397
  children: /* @__PURE__ */ jsx8("form", { onSubmit: form.onSubmit(onSubmit), children: /* @__PURE__ */ jsxs4(Stack, { children: [
397
398
  children,
398
399
  /* @__PURE__ */ jsx8(
399
- MyButton,
400
+ MyButton2,
400
401
  {
401
402
  actionType: "save",
402
403
  loading: isLoading
@@ -1057,9 +1058,52 @@ function MyFlexEnd2(_a) {
1057
1058
  return /* @__PURE__ */ jsx21(Group5, __spreadProps(__spreadValues({ justify: "end", mt: "md" }, rest), { children }));
1058
1059
  }
1059
1060
 
1061
+ // src/core/overlays/MyModalDelete.tsx
1062
+ import { Group as Group6, Highlight as Highlight2, Modal as Modal3 } from "@mantine/core";
1063
+ import { jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
1064
+ function MyModalDelete({
1065
+ disclosure,
1066
+ contextData,
1067
+ handleSubmit,
1068
+ submitLoading
1069
+ }) {
1070
+ return /* @__PURE__ */ jsxs12(Modal3, { onClose: disclosure[1].close, opened: disclosure[0], children: [
1071
+ /* @__PURE__ */ jsx22(
1072
+ Highlight2,
1073
+ {
1074
+ highlight: contextData || [],
1075
+ color: "red.6",
1076
+ highlightStyles: {
1077
+ fontWeight: 700,
1078
+ WebkitBackgroundClip: "text",
1079
+ WebkitTextFillColor: "transparent"
1080
+ },
1081
+ children: `B\u1EA1n s\u1EAFp x\xF3a d\u1EEF li\u1EC7u ${contextData || ""}. H\xE0nh \u0111\u1ED9ng n\xE0y kh\xF4ng th\u1EC3 ho\xE0n t\xE1c. B\u1EA1n c\xF3 ch\u1EAFc ch\u1EAFn mu\u1ED1n ti\u1EBFp t\u1EE5c?`
1082
+ }
1083
+ ),
1084
+ /* @__PURE__ */ jsxs12(Group6, { grow: true, children: [
1085
+ /* @__PURE__ */ jsx22(
1086
+ MyButton,
1087
+ {
1088
+ crudType: "delete",
1089
+ onClick: handleSubmit,
1090
+ loading: submitLoading
1091
+ }
1092
+ ),
1093
+ /* @__PURE__ */ jsx22(
1094
+ MyButton,
1095
+ {
1096
+ crudType: "cancel",
1097
+ onClick: disclosure[1].close
1098
+ }
1099
+ )
1100
+ ] })
1101
+ ] });
1102
+ }
1103
+
1060
1104
  export {
1061
1105
  MyActionIcon,
1062
- MyButton,
1106
+ MyButton2 as MyButton,
1063
1107
  MyFlexColumn2 as MyFlexColumn,
1064
1108
  MyButtonCreateUpdate,
1065
1109
  MyButtonModal,
@@ -1076,5 +1120,6 @@ export {
1076
1120
  MySelectFromAPI,
1077
1121
  MyTextInput,
1078
1122
  MyWeeklySessionSchedulerPicker,
1079
- MyFlexEnd2 as MyFlexEnd
1123
+ MyFlexEnd2 as MyFlexEnd,
1124
+ MyModalDelete
1080
1125
  };
@@ -196,4 +196,12 @@ interface MyFlexEndProps extends GroupProps {
196
196
  }
197
197
  declare function MyFlexEnd({ children, ...rest }: MyFlexEndProps): react_jsx_runtime.JSX.Element;
198
198
 
199
- export { type IWeeklySession, MyActionIcon, type MyActionIconProps, MyButton, MyButtonCreateUpdate, type MyButtonExportStructureProps, MyButtonModal, MyButtonModalForm, type MyButtonModalFormProps, type MyButtonModalProps, MyButtonPrintPDF, type MyButtonPrintPDFProps, type MyButtonProps$1 as MyButtonProps, MyDataTableSelectOne, MyDayOfWeekPicker, MyFlexColumn, MyFlexEnd, MyFlexIconTitle, MyInfoBox, type MyInfoBoxItem, type MyInfoBoxProps, MyLabelValueRow, MyRichTextEditor, MySelect, MySelectFromAPI, type MySelectFromAPIProps, type MySelectProps, MyStatsCard, MyTextInput, MyWeeklySessionSchedulerPicker, type WeeklySessionSchedulerProps };
199
+ interface MyModalDeleteProps {
200
+ disclosure: ReturnType<typeof useDisclosure>;
201
+ contextData?: string;
202
+ handleSubmit: () => void;
203
+ submitLoading?: boolean;
204
+ }
205
+ declare function MyModalDelete({ disclosure, contextData, handleSubmit, submitLoading }: MyModalDeleteProps): react_jsx_runtime.JSX.Element;
206
+
207
+ export { type IWeeklySession, MyActionIcon, type MyActionIconProps, MyButton, MyButtonCreateUpdate, type MyButtonExportStructureProps, MyButtonModal, MyButtonModalForm, type MyButtonModalFormProps, type MyButtonModalProps, MyButtonPrintPDF, type MyButtonPrintPDFProps, type MyButtonProps$1 as MyButtonProps, MyDataTableSelectOne, MyDayOfWeekPicker, MyFlexColumn, MyFlexEnd, MyFlexIconTitle, MyInfoBox, type MyInfoBoxItem, type MyInfoBoxProps, MyLabelValueRow, MyModalDelete, MyRichTextEditor, MySelect, MySelectFromAPI, type MySelectFromAPIProps, type MySelectProps, MyStatsCard, MyTextInput, MyWeeklySessionSchedulerPicker, type WeeklySessionSchedulerProps };
@@ -12,16 +12,17 @@ import {
12
12
  MyFlexIconTitle,
13
13
  MyInfoBox,
14
14
  MyLabelValueRow,
15
+ MyModalDelete,
15
16
  MyRichTextEditor,
16
17
  MySelect,
17
18
  MySelectFromAPI,
18
19
  MyStatsCard,
19
20
  MyTextInput,
20
21
  MyWeeklySessionSchedulerPicker
21
- } from "../chunk-NVM7HSI6.mjs";
22
+ } from "../chunk-S7JWSEIN.mjs";
23
+ import "../chunk-GFEMKKFH.mjs";
22
24
  import "../chunk-CHSXCM2D.mjs";
23
25
  import "../chunk-5U2JSHSJ.mjs";
24
- import "../chunk-GFEMKKFH.mjs";
25
26
  import "../chunk-OMJJAHOC.mjs";
26
27
  import "../chunk-K6S7R6LU.mjs";
27
28
  import "../chunk-3XSLM5GI.mjs";
@@ -42,6 +43,7 @@ export {
42
43
  MyFlexIconTitle,
43
44
  MyInfoBox,
44
45
  MyLabelValueRow,
46
+ MyModalDelete,
45
47
  MyRichTextEditor,
46
48
  MySelect,
47
49
  MySelectFromAPI,
@@ -13,16 +13,19 @@ import {
13
13
  U0DateToDDMMYYYString
14
14
  } from "../chunk-EWDS5IOF.mjs";
15
15
  import {
16
- MyButton as MyButton2,
16
+ MyButton,
17
17
  MyDataTableSelectOne,
18
18
  MyTextInput as MyTextInput2
19
- } from "../chunk-NVM7HSI6.mjs";
19
+ } from "../chunk-S7JWSEIN.mjs";
20
+ import {
21
+ const_object_documentTypes
22
+ } from "../chunk-GFEMKKFH.mjs";
20
23
  import {
21
24
  F_authenticate_Logout,
22
25
  MyActionIconDelete,
23
26
  MyActionIconUpdate,
24
27
  MyBoxesBackground,
25
- MyButton,
28
+ MyButton as MyButton2,
26
29
  MyButtonCreate,
27
30
  MyButtonModal,
28
31
  MyButtonViewPDF,
@@ -44,9 +47,6 @@ import {
44
47
  utils_layout_getItemsWithoutLinks
45
48
  } from "../chunk-CHSXCM2D.mjs";
46
49
  import "../chunk-5U2JSHSJ.mjs";
47
- import {
48
- const_object_documentTypes
49
- } from "../chunk-GFEMKKFH.mjs";
50
50
  import {
51
51
  const_object_colors
52
52
  } from "../chunk-OMJJAHOC.mjs";
@@ -210,7 +210,7 @@ function Permission_SaveMenuPermission({
210
210
  }
211
211
  });
212
212
  return /* @__PURE__ */ jsx3(
213
- MyButton2,
213
+ MyButton,
214
214
  {
215
215
  onClick: () => {
216
216
  mutation.mutate((values == null ? void 0 : values.filter((item) => item.id != "0").map((item) => ({
@@ -831,7 +831,7 @@ function F_accessControl_Save() {
831
831
  }
832
832
  disable[1](false);
833
833
  }, [store.state.rolePermissions]);
834
- return /* @__PURE__ */ jsx9(MyButton, { disabled: disable[0], crudType: "save", onClick: handleSave });
834
+ return /* @__PURE__ */ jsx9(MyButton2, { disabled: disable[0], crudType: "save", onClick: handleSave });
835
835
  }
836
836
 
837
837
  // src/modules-features/admin/core/accessControl/old/F_accessControl.tsx
@@ -1285,7 +1285,7 @@ function F_accessControlLevel_Save() {
1285
1285
  }
1286
1286
  disable[1](false);
1287
1287
  }, [store.state.rolePermissions]);
1288
- return /* @__PURE__ */ jsx16(MyButton, { disabled: disable[0], crudType: "save", onClick: handleSave });
1288
+ return /* @__PURE__ */ jsx16(MyButton2, { disabled: disable[0], crudType: "save", onClick: handleSave });
1289
1289
  }
1290
1290
 
1291
1291
  // src/modules-features/admin/core/accessControlLevel/old/F_accessControlLevel.tsx
@@ -3056,7 +3056,7 @@ function F_core35923() {
3056
3056
  /* @__PURE__ */ jsx49(Grid5.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx49(MyFileInput, { label: "Favicon (16px x 16px)" }) }),
3057
3057
  /* @__PURE__ */ jsx49(Grid5.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx49(MyFileInput, { label: "Logo (330px x 115px)" }) })
3058
3058
  ] }),
3059
- /* @__PURE__ */ jsx49(MyFlexEnd, { children: /* @__PURE__ */ jsx49(MyButton, { crudType: "save" }) })
3059
+ /* @__PURE__ */ jsx49(MyFlexEnd, { children: /* @__PURE__ */ jsx49(MyButton2, { crudType: "save" }) })
3060
3060
  ] });
3061
3061
  }
3062
3062
 
@@ -4443,7 +4443,7 @@ function F_moduleConfig_Save({
4443
4443
  });
4444
4444
  }
4445
4445
  return /* @__PURE__ */ jsx83(
4446
- MyButton,
4446
+ MyButton2,
4447
4447
  {
4448
4448
  disabled: !form.isDirty(),
4449
4449
  crudType: "save",
@@ -4899,13 +4899,13 @@ import { useMemo as useMemo20 } from "react";
4899
4899
  // src/modules-features/admin/core/pageContentConfig/F_pageContentConfig_DeleteDescription.tsx
4900
4900
  import { jsx as jsx91 } from "react/jsx-runtime";
4901
4901
  function F_pageContentConfig_DeleteDescription() {
4902
- return /* @__PURE__ */ jsx91(MyButton2, { actionType: "delete" });
4902
+ return /* @__PURE__ */ jsx91(MyButton, { actionType: "delete" });
4903
4903
  }
4904
4904
 
4905
4905
  // src/modules-features/admin/core/pageContentConfig/F_pageContentConfig_Export.tsx
4906
4906
  import { jsx as jsx92 } from "react/jsx-runtime";
4907
4907
  function F_pageContentConfig_Export() {
4908
- return /* @__PURE__ */ jsx92(MyButton2, { actionType: "export" });
4908
+ return /* @__PURE__ */ jsx92(MyButton, { actionType: "export" });
4909
4909
  }
4910
4910
 
4911
4911
  // src/modules-features/admin/core/pageContentConfig/F_pageContentConfig_Save.tsx
@@ -4917,7 +4917,7 @@ function F_pageContentConfig_Save({ menuValues }) {
4917
4917
  return service_pageContent.updateList([{ id: 1 }]);
4918
4918
  }
4919
4919
  });
4920
- return /* @__PURE__ */ jsx93(MyButton2, { actionType: "save", onClick: () => updatePageConfigMutation.mutate({}) });
4920
+ return /* @__PURE__ */ jsx93(MyButton, { actionType: "save", onClick: () => updatePageConfigMutation.mutate({}) });
4921
4921
  }
4922
4922
 
4923
4923
  // src/modules-features/admin/core/pageContentConfig/F_pageContentConfig_ReadMenu.tsx
package/package.json CHANGED
@@ -42,7 +42,7 @@
42
42
  "types": "./dist/columns/index.d.mts"
43
43
  }
44
44
  },
45
- "version": "0.1.517",
45
+ "version": "0.1.518",
46
46
  "private": false,
47
47
  "files": [
48
48
  "dist"