aq-fe-framework 0.1.529 → 0.1.530

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.
@@ -0,0 +1,13 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ModalProps } from '@mantine/core';
3
+ import { useDisclosure } from '@mantine/hooks';
4
+
5
+ interface MyModalDeleteProps extends Omit<ModalProps, "opened" | "onClose"> {
6
+ disclosure: ReturnType<typeof useDisclosure>;
7
+ contextData?: string;
8
+ onSubmit?: () => void;
9
+ submitLoading?: boolean;
10
+ }
11
+ declare function MyModalDelete({ disclosure, contextData, onSubmit, submitLoading, ...rest }: MyModalDeleteProps): react_jsx_runtime.JSX.Element;
12
+
13
+ export { type MyModalDeleteProps as M, MyModalDelete as a };
@@ -8,7 +8,7 @@ import { useDisclosure, useListState } from '@mantine/hooks';
8
8
  import { UseFormReturnType, useForm } from '@mantine/form';
9
9
  import { I as I_BasicAppShell_LinkItem } from '../BasicAppShell-BOu5-Gvr.mjs';
10
10
  export { a as BasicAppShell, B as BasicAppShell_transformMenuToEnum, f as flattenMenuGroups, g as groupToTwoLevels, u as utils_layout_getItemsWithoutLinks } from '../BasicAppShell-BOu5-Gvr.mjs';
11
- import { I as IUtils_Excel_ColumnConfig, b as IAQFileDetail } from '../utils_file-Dy33UVzg.mjs';
11
+ import { I as IUtils_Excel_ColumnConfig, a as IAQFileDetail } from '../utils_file-G8NTHCO-.mjs';
12
12
  import { MRT_ColumnDef, MRT_RowData, MRT_TableOptions, MRT_TableInstance } from 'mantine-react-table';
13
13
  import { DateInputProps } from '@mantine/dates';
14
14
  import { RichTextEditorProps } from '@mantine/tiptap';
@@ -11,6 +11,7 @@ import { UseQueryResult, QueryKey, UseQueryOptions } from '@tanstack/react-query
11
11
  import { MRT_RowData, MRT_ColumnDef } from 'mantine-react-table';
12
12
  import { RichTextEditorProps, RichTextEditorToolbarProps, RichTextEditorContentProps } from '@mantine/tiptap';
13
13
  import { I as IBaseEntity } from '../IBaseEntity-ChMy9RzQ.mjs';
14
+ export { a as MyModalDelete, M as MyModalDeleteProps } from '../MyModalDelete-D-gPkYBS.mjs';
14
15
 
15
16
  interface MyActionIconProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "color" | "style">, ActionIconProps {
16
17
  actionType?: type_action;
@@ -196,12 +197,4 @@ interface MyFlexEndProps extends GroupProps {
196
197
  }
197
198
  declare function MyFlexEnd({ children, ...rest }: MyFlexEndProps): react_jsx_runtime.JSX.Element;
198
199
 
199
- interface MyModalDeleteProps extends Omit<ModalProps, "opened" | "onClose"> {
200
- disclosure: ReturnType<typeof useDisclosure>;
201
- contextData?: string;
202
- onSubmit?: () => void;
203
- submitLoading?: boolean;
204
- }
205
- declare function MyModalDelete({ disclosure, contextData, onSubmit, submitLoading, ...rest }: 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, type MyModalDeleteProps, MyRichTextEditor, MySelect, MySelectFromAPI, type MySelectFromAPIProps, type MySelectProps, MyStatsCard, MyTextInput, MyWeeklySessionSchedulerPicker, type WeeklySessionSchedulerProps };
200
+ 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 };
@@ -1,2 +1,14 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { M as MyModalDeleteProps } from '../MyModalDelete-D-gPkYBS.mjs';
3
+ import { AxiosResponse } from 'axios';
4
+ import { M as MyApiResponse } from '../createBaseApi-75GHCO22.mjs';
5
+ import '@mantine/core';
6
+ import '@mantine/hooks';
7
+ import '../IBaseEntity-ChMy9RzQ.mjs';
1
8
 
2
- export { }
9
+ interface MyModalDeleteServiceProps<IRes> extends MyModalDeleteProps {
10
+ axiosFn: () => Promise<AxiosResponse<MyApiResponse<IRes>>>;
11
+ }
12
+ declare function MyModalDeleteService<IRes>({ disclosure, axiosFn, contextData }: MyModalDeleteServiceProps<IRes>): react_jsx_runtime.JSX.Element;
13
+
14
+ export { MyModalDeleteService };
@@ -1,12 +1,49 @@
1
- import "../chunk-LWFI4LKU.mjs";
1
+ import {
2
+ MyModalDelete
3
+ } from "../chunk-LWFI4LKU.mjs";
2
4
  import "../chunk-PFOC2A7E.mjs";
3
5
  import "../chunk-U62R2QKJ.mjs";
4
6
  import "../chunk-5U2JSHSJ.mjs";
5
7
  import "../chunk-OMJJAHOC.mjs";
6
- import "../chunk-DH6RVK5I.mjs";
8
+ import {
9
+ useMyReactMutation
10
+ } from "../chunk-DH6RVK5I.mjs";
7
11
  import "../chunk-7ZCOFATU.mjs";
8
12
  import "../chunk-FWCSY2DS.mjs";
9
13
 
10
14
  // src/coreService/overlays/MyModalDeleteService.tsx
11
15
  import { useState } from "react";
12
16
  import { jsx } from "react/jsx-runtime";
17
+ function MyModalDeleteService({
18
+ disclosure,
19
+ axiosFn,
20
+ contextData
21
+ }) {
22
+ const loadingState = useState();
23
+ const mutation = useMyReactMutation({
24
+ axiosFn,
25
+ mutationType: "delete",
26
+ options: {
27
+ onSuccess: () => {
28
+ loadingState[1];
29
+ disclosure[1].close();
30
+ close();
31
+ }
32
+ }
33
+ });
34
+ return /* @__PURE__ */ jsx(
35
+ MyModalDelete,
36
+ {
37
+ disclosure,
38
+ contextData,
39
+ onSubmit: () => {
40
+ mutation.mutate();
41
+ loadingState[1](true);
42
+ },
43
+ submitLoading: mutation.isPending
44
+ }
45
+ );
46
+ }
47
+ export {
48
+ MyModalDeleteService
49
+ };
@@ -13,7 +13,7 @@ import {
13
13
  U0DateToDDMMYYYString
14
14
  } from "../chunk-EWDS5IOF.mjs";
15
15
  import {
16
- MyButton,
16
+ MyButton as MyButton2,
17
17
  MyDataTableSelectOne,
18
18
  MyTextInput as MyTextInput2
19
19
  } from "../chunk-IMBXTNPQ.mjs";
@@ -26,7 +26,7 @@ import {
26
26
  MyActionIconDelete,
27
27
  MyActionIconUpdate,
28
28
  MyBoxesBackground,
29
- MyButton as MyButton2,
29
+ MyButton,
30
30
  MyButtonCreate,
31
31
  MyButtonModal,
32
32
  MyButtonViewPDF,
@@ -211,7 +211,7 @@ function Permission_SaveMenuPermission({
211
211
  }
212
212
  });
213
213
  return /* @__PURE__ */ jsx3(
214
- MyButton,
214
+ MyButton2,
215
215
  {
216
216
  onClick: () => {
217
217
  mutation.mutate((values == null ? void 0 : values.filter((item) => item.id != "0").map((item) => ({
@@ -832,7 +832,7 @@ function F_accessControl_Save() {
832
832
  }
833
833
  disable[1](false);
834
834
  }, [store.state.rolePermissions]);
835
- return /* @__PURE__ */ jsx9(MyButton2, { disabled: disable[0], crudType: "save", onClick: handleSave });
835
+ return /* @__PURE__ */ jsx9(MyButton, { disabled: disable[0], crudType: "save", onClick: handleSave });
836
836
  }
837
837
 
838
838
  // src/modules-features/admin/core/accessControl/old/F_accessControl.tsx
@@ -1286,7 +1286,7 @@ function F_accessControlLevel_Save() {
1286
1286
  }
1287
1287
  disable[1](false);
1288
1288
  }, [store.state.rolePermissions]);
1289
- return /* @__PURE__ */ jsx16(MyButton2, { disabled: disable[0], crudType: "save", onClick: handleSave });
1289
+ return /* @__PURE__ */ jsx16(MyButton, { disabled: disable[0], crudType: "save", onClick: handleSave });
1290
1290
  }
1291
1291
 
1292
1292
  // src/modules-features/admin/core/accessControlLevel/old/F_accessControlLevel.tsx
@@ -3057,7 +3057,7 @@ function F_core35923() {
3057
3057
  /* @__PURE__ */ jsx49(Grid5.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx49(MyFileInput, { label: "Favicon (16px x 16px)" }) }),
3058
3058
  /* @__PURE__ */ jsx49(Grid5.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx49(MyFileInput, { label: "Logo (330px x 115px)" }) })
3059
3059
  ] }),
3060
- /* @__PURE__ */ jsx49(MyFlexEnd, { children: /* @__PURE__ */ jsx49(MyButton2, { crudType: "save" }) })
3060
+ /* @__PURE__ */ jsx49(MyFlexEnd, { children: /* @__PURE__ */ jsx49(MyButton, { crudType: "save" }) })
3061
3061
  ] });
3062
3062
  }
3063
3063
 
@@ -4444,7 +4444,7 @@ function F_moduleConfig_Save({
4444
4444
  });
4445
4445
  }
4446
4446
  return /* @__PURE__ */ jsx83(
4447
- MyButton2,
4447
+ MyButton,
4448
4448
  {
4449
4449
  disabled: !form.isDirty(),
4450
4450
  crudType: "save",
@@ -4900,13 +4900,13 @@ import { useMemo as useMemo20 } from "react";
4900
4900
  // src/modules-features/admin/core/pageContentConfig/F_pageContentConfig_DeleteDescription.tsx
4901
4901
  import { jsx as jsx91 } from "react/jsx-runtime";
4902
4902
  function F_pageContentConfig_DeleteDescription() {
4903
- return /* @__PURE__ */ jsx91(MyButton, { actionType: "delete" });
4903
+ return /* @__PURE__ */ jsx91(MyButton2, { actionType: "delete" });
4904
4904
  }
4905
4905
 
4906
4906
  // src/modules-features/admin/core/pageContentConfig/F_pageContentConfig_Export.tsx
4907
4907
  import { jsx as jsx92 } from "react/jsx-runtime";
4908
4908
  function F_pageContentConfig_Export() {
4909
- return /* @__PURE__ */ jsx92(MyButton, { actionType: "export" });
4909
+ return /* @__PURE__ */ jsx92(MyButton2, { actionType: "export" });
4910
4910
  }
4911
4911
 
4912
4912
  // src/modules-features/admin/core/pageContentConfig/F_pageContentConfig_Save.tsx
@@ -4918,7 +4918,7 @@ function F_pageContentConfig_Save({ menuValues }) {
4918
4918
  return service_pageContent.updateList([{ id: 1 }]);
4919
4919
  }
4920
4920
  });
4921
- return /* @__PURE__ */ jsx93(MyButton, { actionType: "save", onClick: () => updatePageConfigMutation.mutate({}) });
4921
+ return /* @__PURE__ */ jsx93(MyButton2, { actionType: "save", onClick: () => updatePageConfigMutation.mutate({}) });
4922
4922
  }
4923
4923
 
4924
4924
  // src/modules-features/admin/core/pageContentConfig/F_pageContentConfig_ReadMenu.tsx
@@ -1,4 +1,4 @@
1
- export { b as IAQFileDetail, I as IUtils_Excel_ColumnConfig, a as utils_excel_download, u as utils_excel_exportExcel, d as utils_file_AQDocumentTypeToFile, e as utils_file_docxtemplaterDownload, c as utils_file_fileToAQDocumentType } from '../utils_file-Dy33UVzg.mjs';
1
+ export { a as IAQFileDetail, I as IUtils_Excel_ColumnConfig, b as utils_excel_download, u as utils_excel_exportExcel, d as utils_file_AQDocumentTypeToFile, e as utils_file_docxtemplaterDownload, c as utils_file_fileToAQDocumentType } from '../utils_file-G8NTHCO-.mjs';
2
2
  import { I as IBaseEntity } from '../IBaseEntity-ChMy9RzQ.mjs';
3
3
  import { MRT_RowData, MRT_ColumnDef } from 'mantine-react-table';
4
4
  import { DefaultMantineColor } from '@mantine/core';
@@ -33,4 +33,4 @@ declare function utils_file_docxtemplaterDownload({ data, filePath, fileName }:
33
33
  fileName?: string;
34
34
  }): Promise<void>;
35
35
 
36
- export { type IUtils_Excel_ColumnConfig as I, utils_excel_download as a, type IAQFileDetail as b, utils_file_fileToAQDocumentType as c, utils_file_AQDocumentTypeToFile as d, utils_file_docxtemplaterDownload as e, utils_excel_exportExcel as u };
36
+ export { type IUtils_Excel_ColumnConfig as I, type IAQFileDetail as a, utils_excel_download as b, utils_file_fileToAQDocumentType as c, utils_file_AQDocumentTypeToFile as d, utils_file_docxtemplaterDownload as e, utils_excel_exportExcel as u };
package/package.json CHANGED
@@ -46,7 +46,7 @@
46
46
  "types": "./dist/coreService/index.d.mts"
47
47
  }
48
48
  },
49
- "version": "0.1.529",
49
+ "version": "0.1.530",
50
50
  "private": false,
51
51
  "files": [
52
52
  "dist"