aq-fe-framework 0.1.513 → 0.1.515
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.
- package/dist/{chunk-NQMVDLMU.mjs → chunk-AKZQQ7BT.mjs} +1 -1
- package/dist/{chunk-IIRXBT7L.mjs → chunk-GCEO6HDO.mjs} +121 -115
- package/dist/{chunk-LAVGCZ5I.mjs → chunk-OIIBQARW.mjs} +25 -15
- package/dist/{chunk-NIDKTA35.mjs → chunk-T7NNF74S.mjs} +7 -0
- package/dist/components/index.mjs +2 -2
- package/dist/core/index.d.mts +7 -6
- package/dist/core/index.mjs +6 -6
- package/dist/hooks/index.d.mts +3 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/interfaces/index.d.mts +9 -2
- package/dist/modules-features/index.mjs +14 -14
- package/dist/utils/index.d.mts +9 -1
- package/dist/utils/index.mjs +3 -1
- package/package.json +1 -1
@@ -2,7 +2,7 @@ import {
|
|
2
2
|
MyDataTable,
|
3
3
|
MyFlexColumn,
|
4
4
|
MyFlexRow
|
5
|
-
} from "./chunk-
|
5
|
+
} from "./chunk-AKZQQ7BT.mjs";
|
6
6
|
import {
|
7
7
|
const_object_colors
|
8
8
|
} from "./chunk-OMJJAHOC.mjs";
|
@@ -12,7 +12,7 @@ import {
|
|
12
12
|
import {
|
13
13
|
useMyReactMutation,
|
14
14
|
useMyReactQuery
|
15
|
-
} from "./chunk-
|
15
|
+
} from "./chunk-OIIBQARW.mjs";
|
16
16
|
import {
|
17
17
|
utils_notification_show
|
18
18
|
} from "./chunk-7ZCOFATU.mjs";
|
@@ -121,12 +121,7 @@ var getActionConfig2 = (colorScheme) => ({
|
|
121
121
|
leftSection: /* @__PURE__ */ jsx2(IconPlus2, {}),
|
122
122
|
children: "Th\xEAm"
|
123
123
|
},
|
124
|
-
createMultiple: {
|
125
|
-
color: "green",
|
126
|
-
type: "submit",
|
127
|
-
leftSection: /* @__PURE__ */ jsx2(IconPlus2, {}),
|
128
|
-
children: "Th\xEAm danh s\xE1ch"
|
129
|
-
},
|
124
|
+
createMultiple: {},
|
130
125
|
delete: {
|
131
126
|
color: "red",
|
132
127
|
leftSection: /* @__PURE__ */ jsx2(IconTrash2, {}),
|
@@ -364,29 +359,43 @@ function MyButtonModal({
|
|
364
359
|
// src/core/button/MyButtonImport.tsx
|
365
360
|
import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
|
366
361
|
|
367
|
-
// src/core/button/
|
362
|
+
// src/core/button/MyButtonModalForm.tsx
|
368
363
|
import { Stack } from "@mantine/core";
|
369
|
-
import {
|
370
|
-
|
371
|
-
function MyButtonModalCreateUpdate(_a) {
|
364
|
+
import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
|
365
|
+
function MyButtonModalForm(_a) {
|
372
366
|
var _b = _a, {
|
367
|
+
isUpdate,
|
373
368
|
children,
|
374
|
-
|
369
|
+
form,
|
370
|
+
disclosure,
|
371
|
+
onSubmit,
|
372
|
+
isLoading
|
375
373
|
} = _b, rest = __objRest(_b, [
|
374
|
+
"isUpdate",
|
376
375
|
"children",
|
377
|
-
"
|
376
|
+
"form",
|
377
|
+
"disclosure",
|
378
|
+
"onSubmit",
|
379
|
+
"isLoading"
|
378
380
|
]);
|
379
|
-
const disc = useDisclosure3();
|
380
381
|
return /* @__PURE__ */ jsx8(
|
381
382
|
MyButtonModal,
|
382
|
-
__spreadProps(__spreadValues({
|
383
|
-
|
384
|
-
modalProps: { title: "Chi ti\u1EBFt d\u1EEF li\u1EC7u" },
|
385
|
-
buttonProps: { actionType: "create" },
|
383
|
+
__spreadProps(__spreadValues({}, rest), {
|
384
|
+
isActionIcon: isUpdate,
|
386
385
|
actionIconProps: { actionType: "update" },
|
387
|
-
|
388
|
-
|
389
|
-
|
386
|
+
buttonProps: { actionType: "create" },
|
387
|
+
modalProps: { title: "Chi ti\u1EBFt d\u1EEF li\u1EC7u" },
|
388
|
+
disclosure,
|
389
|
+
children: /* @__PURE__ */ jsx8("form", { onSubmit: form.onSubmit(onSubmit), children: /* @__PURE__ */ jsxs4(Stack, { children: [
|
390
|
+
children,
|
391
|
+
/* @__PURE__ */ jsx8(
|
392
|
+
MyButton,
|
393
|
+
{
|
394
|
+
actionType: "save",
|
395
|
+
loading: isLoading
|
396
|
+
}
|
397
|
+
)
|
398
|
+
] }) })
|
390
399
|
})
|
391
400
|
);
|
392
401
|
}
|
@@ -396,7 +405,7 @@ import { Button as Button5 } from "@mantine/core";
|
|
396
405
|
import { IconPrinter as IconPrinter3 } from "@tabler/icons-react";
|
397
406
|
import { useRef } from "react";
|
398
407
|
import { useReactToPrint } from "react-to-print";
|
399
|
-
import { Fragment as Fragment3, jsx as jsx9, jsxs as
|
408
|
+
import { Fragment as Fragment3, jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
|
400
409
|
function MyButtonPrintPDF({
|
401
410
|
children,
|
402
411
|
autoPadding = true,
|
@@ -421,7 +430,7 @@ function MyButtonPrintPDF({
|
|
421
430
|
return ``;
|
422
431
|
}
|
423
432
|
};
|
424
|
-
return /* @__PURE__ */
|
433
|
+
return /* @__PURE__ */ jsxs5(Fragment3, { children: [
|
425
434
|
/* @__PURE__ */ jsx9("style", { children: getPageSizeCSS() }),
|
426
435
|
/* @__PURE__ */ jsx9("div", { style: { display: "none" }, children: /* @__PURE__ */ jsx9(
|
427
436
|
"div",
|
@@ -447,13 +456,9 @@ function MyButtonPrintPDF({
|
|
447
456
|
] });
|
448
457
|
}
|
449
458
|
|
450
|
-
// src/core/button/MyButtonPrototypeSwitch.tsx
|
451
|
-
import { Switch } from "@mantine/core";
|
452
|
-
import { jsx as jsx10 } from "react/jsx-runtime";
|
453
|
-
|
454
459
|
// src/core/dataDisplay/MyDataTableSelectOne.tsx
|
455
460
|
import { useEffect, useMemo as useMemo2 } from "react";
|
456
|
-
import { jsx as
|
461
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
457
462
|
function MyDataTableSelectOne({
|
458
463
|
columns,
|
459
464
|
queryResult,
|
@@ -465,7 +470,7 @@ function MyDataTableSelectOne({
|
|
465
470
|
if (!queryResult.data) return;
|
466
471
|
setIdSelection(queryResult.data[0].id);
|
467
472
|
}, [queryResult.data]);
|
468
|
-
return /* @__PURE__ */
|
473
|
+
return /* @__PURE__ */ jsx10(
|
469
474
|
MyDataTable,
|
470
475
|
{
|
471
476
|
columns: columnsState,
|
@@ -491,30 +496,30 @@ function MyDataTableSelectOne({
|
|
491
496
|
|
492
497
|
// src/core/dataDisplay/MyFlexIconTitle.tsx
|
493
498
|
import { Flex as Flex2, Text } from "@mantine/core";
|
494
|
-
import { jsx as
|
499
|
+
import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
|
495
500
|
function MyFlexIconTitle(props) {
|
496
|
-
return /* @__PURE__ */
|
501
|
+
return /* @__PURE__ */ jsxs6(Flex2, __spreadProps(__spreadValues({ direction: "row", align: "center", gap: "xs" }, props), { children: [
|
497
502
|
props.icon,
|
498
|
-
/* @__PURE__ */
|
503
|
+
/* @__PURE__ */ jsx11(Text, __spreadProps(__spreadValues({ size: "lg", fw: 700 }, props.textProps), { children: props == null ? void 0 : props.children }))
|
499
504
|
] }));
|
500
505
|
}
|
501
506
|
|
502
507
|
// src/core/dataDisplay/MyInfoBox.tsx
|
503
508
|
import { Group, Paper, Stack as Stack2, Text as Text2 } from "@mantine/core";
|
504
|
-
import { jsx as
|
509
|
+
import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
505
510
|
function MyInfoBox({ title, data, paperProps }) {
|
506
|
-
return /* @__PURE__ */
|
507
|
-
title && /* @__PURE__ */
|
508
|
-
data.map((item, index) => /* @__PURE__ */
|
509
|
-
/* @__PURE__ */
|
510
|
-
/* @__PURE__ */
|
511
|
+
return /* @__PURE__ */ jsx12(Paper, __spreadProps(__spreadValues({ withBorder: true, shadow: "xs", radius: "md", p: "md", bg: const_object_colors.mantineBackgroundBlueLight }, paperProps), { children: /* @__PURE__ */ jsxs7(Stack2, { children: [
|
512
|
+
title && /* @__PURE__ */ jsx12(Text2, { fw: 600, size: "sm", children: title }),
|
513
|
+
data.map((item, index) => /* @__PURE__ */ jsxs7(Group, { justify: "space-between", children: [
|
514
|
+
/* @__PURE__ */ jsx12(Text2, { size: "sm", fw: 500, c: "dimmed", children: item.label }),
|
515
|
+
/* @__PURE__ */ jsx12(Text2, { size: "sm", fw: 500, children: item.value })
|
511
516
|
] }, index))
|
512
517
|
] }) }));
|
513
518
|
}
|
514
519
|
|
515
520
|
// src/core/dataDisplay/MyLabelValueRow.tsx
|
516
521
|
import { Group as Group2, Text as Text3 } from "@mantine/core";
|
517
|
-
import { jsx as
|
522
|
+
import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
518
523
|
function MyLabelValueRow({
|
519
524
|
label,
|
520
525
|
value,
|
@@ -522,18 +527,18 @@ function MyLabelValueRow({
|
|
522
527
|
valueProps,
|
523
528
|
groupProps
|
524
529
|
}) {
|
525
|
-
return /* @__PURE__ */
|
526
|
-
/* @__PURE__ */
|
530
|
+
return /* @__PURE__ */ jsxs8(Group2, __spreadProps(__spreadValues({ gap: 5, wrap: "nowrap" }, groupProps), { children: [
|
531
|
+
/* @__PURE__ */ jsxs8(Text3, __spreadProps(__spreadValues({ fw: 600 }, labelProps), { children: [
|
527
532
|
label,
|
528
533
|
":"
|
529
534
|
] })),
|
530
|
-
/* @__PURE__ */
|
535
|
+
/* @__PURE__ */ jsx13(Text3, __spreadProps(__spreadValues({}, valueProps), { children: value }))
|
531
536
|
] }));
|
532
537
|
}
|
533
538
|
|
534
539
|
// src/core/dataDisplay/MyStatsCartd.tsx
|
535
540
|
import { Box, Card, ThemeIcon } from "@mantine/core";
|
536
|
-
import { jsx as
|
541
|
+
import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
|
537
542
|
function MyStatsCard({
|
538
543
|
title,
|
539
544
|
value,
|
@@ -542,22 +547,22 @@ function MyStatsCard({
|
|
542
547
|
color,
|
543
548
|
themeIconProps
|
544
549
|
}) {
|
545
|
-
return /* @__PURE__ */
|
546
|
-
/* @__PURE__ */
|
547
|
-
/* @__PURE__ */
|
548
|
-
/* @__PURE__ */
|
549
|
-
/* @__PURE__ */
|
550
|
-
/* @__PURE__ */
|
551
|
-
/* @__PURE__ */
|
550
|
+
return /* @__PURE__ */ jsxs9(Card, { children: [
|
551
|
+
/* @__PURE__ */ jsx14("div", { className: `absolute inset-0 bg-gradient-to-br ${color} opacity-5` }),
|
552
|
+
/* @__PURE__ */ jsx14(Box, { className: "p-6", children: /* @__PURE__ */ jsxs9("div", { className: "flex items-center justify-between", children: [
|
553
|
+
/* @__PURE__ */ jsxs9("div", { children: [
|
554
|
+
/* @__PURE__ */ jsx14("p", { className: "text-sm font-medium text-muted-foreground", children: title }),
|
555
|
+
/* @__PURE__ */ jsx14("p", { className: "text-3xl font-bold", children: value }),
|
556
|
+
/* @__PURE__ */ jsx14("p", { className: "text-xs text-muted-foreground mt-1", children: subtitle })
|
552
557
|
] }),
|
553
|
-
/* @__PURE__ */
|
558
|
+
/* @__PURE__ */ jsx14(ThemeIcon, __spreadProps(__spreadValues({ size: "xl", radius: "xl" }, themeIconProps), { children: icon }))
|
554
559
|
] }) })
|
555
560
|
] });
|
556
561
|
}
|
557
562
|
|
558
563
|
// src/core/input/MyDayOfWeekPicker.tsx
|
559
564
|
import { Badge, Group as Group3 } from "@mantine/core";
|
560
|
-
import { jsx as
|
565
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
561
566
|
var days = Object.entries(enum_daysOfWeek).filter(([key]) => isNaN(Number(key))).map(([label, value]) => ({ label, value }));
|
562
567
|
function MyDayOfWeekPicker({ value = [], onChange }) {
|
563
568
|
const toggle = (val) => {
|
@@ -565,7 +570,7 @@ function MyDayOfWeekPicker({ value = [], onChange }) {
|
|
565
570
|
const newValue = value.includes(val) ? value.filter((v) => v !== val) : [...value, val].sort((a, b) => a - b);
|
566
571
|
onChange(newValue);
|
567
572
|
};
|
568
|
-
return /* @__PURE__ */
|
573
|
+
return /* @__PURE__ */ jsx15(MyFlexRow, { align: "center", children: /* @__PURE__ */ jsx15(Group3, { gap: "xs", children: days.map((d) => /* @__PURE__ */ jsx15(
|
569
574
|
Badge,
|
570
575
|
{
|
571
576
|
variant: value.includes(d.value) ? "filled" : "outline",
|
@@ -593,7 +598,7 @@ import Underline from "@tiptap/extension-underline";
|
|
593
598
|
import { useEditor } from "@tiptap/react";
|
594
599
|
import StarterKit from "@tiptap/starter-kit";
|
595
600
|
import { useEffect as useEffect2 } from "react";
|
596
|
-
import { jsx as
|
601
|
+
import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
|
597
602
|
function MyRichTextEditor(props) {
|
598
603
|
const editor = useEditor({
|
599
604
|
extensions: [
|
@@ -677,44 +682,44 @@ function MyRichTextEditor(props) {
|
|
677
682
|
editor.commands.setContent(props.value || "", false);
|
678
683
|
}
|
679
684
|
}, [props.value, editor]);
|
680
|
-
return /* @__PURE__ */
|
681
|
-
/* @__PURE__ */
|
682
|
-
/* @__PURE__ */
|
683
|
-
/* @__PURE__ */
|
684
|
-
/* @__PURE__ */
|
685
|
-
/* @__PURE__ */
|
686
|
-
/* @__PURE__ */
|
687
|
-
/* @__PURE__ */
|
688
|
-
/* @__PURE__ */
|
689
|
-
/* @__PURE__ */
|
685
|
+
return /* @__PURE__ */ jsx16(Input.Wrapper, __spreadProps(__spreadValues({}, props.inputWrapperProps), { children: /* @__PURE__ */ jsxs10(MantineRichTextEditor, __spreadProps(__spreadValues({ editor }, props.richTextEditorProps), { children: [
|
686
|
+
/* @__PURE__ */ jsxs10(MantineRichTextEditor.Toolbar, __spreadProps(__spreadValues({}, props.richTextEditorToolBarProps), { children: [
|
687
|
+
/* @__PURE__ */ jsxs10(MantineRichTextEditor.ControlsGroup, { children: [
|
688
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Bold, {}),
|
689
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Italic, {}),
|
690
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Underline, {}),
|
691
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Strikethrough, {}),
|
692
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.ClearFormatting, {}),
|
693
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Highlight, {}),
|
694
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Code, {})
|
690
695
|
] }),
|
691
|
-
/* @__PURE__ */
|
692
|
-
/* @__PURE__ */
|
693
|
-
/* @__PURE__ */
|
694
|
-
/* @__PURE__ */
|
695
|
-
/* @__PURE__ */
|
696
|
+
/* @__PURE__ */ jsxs10(MantineRichTextEditor.ControlsGroup, { children: [
|
697
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.H1, {}),
|
698
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.H2, {}),
|
699
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.H3, {}),
|
700
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.H4, {})
|
696
701
|
] }),
|
697
|
-
/* @__PURE__ */
|
698
|
-
/* @__PURE__ */
|
699
|
-
/* @__PURE__ */
|
700
|
-
/* @__PURE__ */
|
701
|
-
/* @__PURE__ */
|
702
|
-
/* @__PURE__ */
|
703
|
-
/* @__PURE__ */
|
702
|
+
/* @__PURE__ */ jsxs10(MantineRichTextEditor.ControlsGroup, { children: [
|
703
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Blockquote, {}),
|
704
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Hr, {}),
|
705
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.BulletList, {}),
|
706
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.OrderedList, {}),
|
707
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Subscript, {}),
|
708
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Superscript, {})
|
704
709
|
] }),
|
705
|
-
/* @__PURE__ */
|
706
|
-
/* @__PURE__ */
|
707
|
-
/* @__PURE__ */
|
710
|
+
/* @__PURE__ */ jsxs10(MantineRichTextEditor.ControlsGroup, { children: [
|
711
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Link, {}),
|
712
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.Unlink, {})
|
708
713
|
] }),
|
709
|
-
/* @__PURE__ */
|
710
|
-
/* @__PURE__ */
|
711
|
-
/* @__PURE__ */
|
712
|
-
/* @__PURE__ */
|
713
|
-
/* @__PURE__ */
|
714
|
+
/* @__PURE__ */ jsxs10(MantineRichTextEditor.ControlsGroup, { children: [
|
715
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.AlignLeft, {}),
|
716
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.AlignCenter, {}),
|
717
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.AlignJustify, {}),
|
718
|
+
/* @__PURE__ */ jsx16(MantineRichTextEditor.AlignRight, {})
|
714
719
|
] }),
|
715
720
|
props.extraControlsGroup
|
716
721
|
] })),
|
717
|
-
/* @__PURE__ */
|
722
|
+
/* @__PURE__ */ jsx16(
|
718
723
|
ScrollArea2.Autosize,
|
719
724
|
__spreadProps(__spreadValues({
|
720
725
|
onMouseDown: () => {
|
@@ -723,7 +728,7 @@ function MyRichTextEditor(props) {
|
|
723
728
|
mah: "200",
|
724
729
|
style: { cursor: "text" }
|
725
730
|
}, props.scrollAreaAutosizeProps), {
|
726
|
-
children: /* @__PURE__ */
|
731
|
+
children: /* @__PURE__ */ jsx16(RichTextEditor.Content, __spreadValues({ mih: "200" }, props.richTextEditorContentProps))
|
727
732
|
})
|
728
733
|
)
|
729
734
|
] })) }));
|
@@ -732,7 +737,7 @@ function MyRichTextEditor(props) {
|
|
732
737
|
// src/core/input/MySelect.tsx
|
733
738
|
import { Loader, Select } from "@mantine/core";
|
734
739
|
import React from "react";
|
735
|
-
import { jsx as
|
740
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
736
741
|
function extractTextFromReactNode(node) {
|
737
742
|
if (typeof node === "string" || typeof node === "number") return String(node);
|
738
743
|
if (Array.isArray(node)) return node.map(extractTextFromReactNode).join(" ");
|
@@ -750,7 +755,7 @@ function MySelect(_a) {
|
|
750
755
|
const plainTextLabel = extractTextFromReactNode(label).toLowerCase().trim();
|
751
756
|
placeholder = `Ch\u1ECDn ${plainTextLabel}`;
|
752
757
|
}
|
753
|
-
return /* @__PURE__ */
|
758
|
+
return /* @__PURE__ */ jsx17(
|
754
759
|
Select,
|
755
760
|
__spreadValues({
|
756
761
|
searchable: true,
|
@@ -758,7 +763,7 @@ function MySelect(_a) {
|
|
758
763
|
placeholder,
|
759
764
|
data: data != null ? data : [],
|
760
765
|
error: isError ? true : void 0,
|
761
|
-
rightSection: isLoading ? /* @__PURE__ */
|
766
|
+
rightSection: isLoading ? /* @__PURE__ */ jsx17(Loader, { size: "xs" }) : void 0,
|
762
767
|
disabled: isLoading || isError,
|
763
768
|
styles: (theme) => ({
|
764
769
|
input: rest.readOnly ? {
|
@@ -774,7 +779,7 @@ function MySelect(_a) {
|
|
774
779
|
|
775
780
|
// src/core/input/MySelectFromAPI.tsx
|
776
781
|
import { useCallback, useEffect as useEffect3, useMemo as useMemo3, useRef as useRef2 } from "react";
|
777
|
-
import { jsx as
|
782
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
778
783
|
function MySelectFromAPI(_a) {
|
779
784
|
var _b = _a, {
|
780
785
|
queryKey,
|
@@ -838,7 +843,7 @@ function MySelectFromAPI(_a) {
|
|
838
843
|
hasAutoSelected.current = true;
|
839
844
|
}
|
840
845
|
}, [autoSelectFirstItem, query.data, value, getLabel, onChange, setObjectData]);
|
841
|
-
return /* @__PURE__ */
|
846
|
+
return /* @__PURE__ */ jsx18(
|
842
847
|
MySelect,
|
843
848
|
__spreadValues({
|
844
849
|
isLoading: query.isLoading,
|
@@ -852,10 +857,10 @@ function MySelectFromAPI(_a) {
|
|
852
857
|
|
853
858
|
// src/core/input/MyTextInput.tsx
|
854
859
|
import { TextInput } from "@mantine/core";
|
855
|
-
import { jsx as
|
860
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
856
861
|
function MyTextInput(_a) {
|
857
862
|
var _b = _a, { label, isPhoneNumber } = _b, rest = __objRest(_b, ["label", "isPhoneNumber"]);
|
858
|
-
return /* @__PURE__ */
|
863
|
+
return /* @__PURE__ */ jsx19(
|
859
864
|
TextInput,
|
860
865
|
__spreadValues({
|
861
866
|
onKeyDown: (e) => {
|
@@ -871,8 +876,9 @@ function MyTextInput(_a) {
|
|
871
876
|
"(",
|
872
877
|
")",
|
873
878
|
" "
|
874
|
-
//
|
879
|
+
// ký tự đặc biệt
|
875
880
|
];
|
881
|
+
if (e.ctrlKey || e.metaKey) return;
|
876
882
|
if (!/[0-9]/.test(e.key) && !allowedKeys.includes(e.key)) {
|
877
883
|
e.preventDefault();
|
878
884
|
}
|
@@ -904,7 +910,7 @@ import {
|
|
904
910
|
} from "@mantine/core";
|
905
911
|
import { IconPlus as IconPlus4, IconTrash as IconTrash3 } from "@tabler/icons-react";
|
906
912
|
import { useState } from "react";
|
907
|
-
import { jsx as
|
913
|
+
import { jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
|
908
914
|
function MyWeeklySessionSchedulerPicker({
|
909
915
|
value = [],
|
910
916
|
onChange
|
@@ -935,8 +941,8 @@ function MyWeeklySessionSchedulerPicker({
|
|
935
941
|
return acc;
|
936
942
|
}, {});
|
937
943
|
const getLabel = (day) => enum_daysOfWeek[day] || `Day ${day}`;
|
938
|
-
return /* @__PURE__ */
|
939
|
-
/* @__PURE__ */
|
944
|
+
return /* @__PURE__ */ jsx20(Paper2, { w: "100%", p: "md", children: /* @__PURE__ */ jsxs11(MyFlexColumn, { children: [
|
945
|
+
/* @__PURE__ */ jsx20(Center, { children: /* @__PURE__ */ jsx20(
|
940
946
|
MyDayOfWeekPicker,
|
941
947
|
{
|
942
948
|
value: selectedDays,
|
@@ -946,41 +952,41 @@ function MyWeeklySessionSchedulerPicker({
|
|
946
952
|
}
|
947
953
|
}
|
948
954
|
) }),
|
949
|
-
/* @__PURE__ */
|
950
|
-
/* @__PURE__ */
|
955
|
+
/* @__PURE__ */ jsx20(Divider, { my: "xs" }),
|
956
|
+
/* @__PURE__ */ jsx20(Center, { children: /* @__PURE__ */ jsx20(ScrollArea3.Autosize, { h: "40vh", children: /* @__PURE__ */ jsx20(MyFlexColumn, { w: { base: "100%", sm: "70%" }, children: selectedDays.map((dayOfWeek) => {
|
951
957
|
var _a;
|
952
|
-
return /* @__PURE__ */
|
958
|
+
return /* @__PURE__ */ jsxs11(
|
953
959
|
Paper2,
|
954
960
|
{
|
955
961
|
w: "100%",
|
956
962
|
p: "md",
|
957
963
|
bg: const_object_colors.mantineBackgroundBlueLight,
|
958
964
|
children: [
|
959
|
-
/* @__PURE__ */
|
960
|
-
/* @__PURE__ */
|
961
|
-
/* @__PURE__ */
|
965
|
+
/* @__PURE__ */ jsxs11(Group4, { gap: "apart", children: [
|
966
|
+
/* @__PURE__ */ jsx20(Text5, { w: "70px", fw: 500, children: getLabel(dayOfWeek) }),
|
967
|
+
/* @__PURE__ */ jsx20(
|
962
968
|
Button6,
|
963
969
|
{
|
964
970
|
color: "teal.5",
|
965
|
-
leftSection: /* @__PURE__ */
|
971
|
+
leftSection: /* @__PURE__ */ jsx20(IconPlus4, { size: 14 }),
|
966
972
|
onClick: () => handleAddSession(dayOfWeek),
|
967
973
|
children: "Th\xEAm bu\u1ED5i"
|
968
974
|
}
|
969
975
|
)
|
970
976
|
] }),
|
971
|
-
/* @__PURE__ */
|
977
|
+
/* @__PURE__ */ jsx20(Divider, { my: "sm" }),
|
972
978
|
(_a = grouped[dayOfWeek]) == null ? void 0 : _a.map((item, indexInDay) => {
|
973
979
|
const globalIndex = value.findIndex(
|
974
980
|
(v) => v === item
|
975
981
|
);
|
976
|
-
return /* @__PURE__ */
|
982
|
+
return /* @__PURE__ */ jsxs11(
|
977
983
|
Group4,
|
978
984
|
{
|
979
985
|
mt: "xs",
|
980
986
|
gap: "xs",
|
981
987
|
align: "flex-end",
|
982
988
|
children: [
|
983
|
-
/* @__PURE__ */
|
989
|
+
/* @__PURE__ */ jsx20(
|
984
990
|
NumberInput,
|
985
991
|
{
|
986
992
|
label: "Ti\u1EBFt b\u1EAFt \u0111\u1EA7u",
|
@@ -992,7 +998,7 @@ function MyWeeklySessionSchedulerPicker({
|
|
992
998
|
)
|
993
999
|
}
|
994
1000
|
),
|
995
|
-
/* @__PURE__ */
|
1001
|
+
/* @__PURE__ */ jsx20(
|
996
1002
|
NumberInput,
|
997
1003
|
{
|
998
1004
|
label: "S\u1ED1 ti\u1EBFt",
|
@@ -1004,7 +1010,7 @@ function MyWeeklySessionSchedulerPicker({
|
|
1004
1010
|
)
|
1005
1011
|
}
|
1006
1012
|
),
|
1007
|
-
/* @__PURE__ */
|
1013
|
+
/* @__PURE__ */ jsx20(
|
1008
1014
|
NumberInput,
|
1009
1015
|
{
|
1010
1016
|
label: "S\u1ED1 ph\xFAt ",
|
@@ -1013,13 +1019,13 @@ function MyWeeklySessionSchedulerPicker({
|
|
1013
1019
|
value: item.durationMinutes
|
1014
1020
|
}
|
1015
1021
|
),
|
1016
|
-
/* @__PURE__ */
|
1022
|
+
/* @__PURE__ */ jsx20(
|
1017
1023
|
Button6,
|
1018
1024
|
{
|
1019
1025
|
variant: "light",
|
1020
1026
|
color: "red",
|
1021
1027
|
onClick: () => handleRemove(globalIndex),
|
1022
|
-
leftSection: /* @__PURE__ */
|
1028
|
+
leftSection: /* @__PURE__ */ jsx20(IconTrash3, { size: 14 }),
|
1023
1029
|
children: "X\xF3a bu\u1ED5i"
|
1024
1030
|
}
|
1025
1031
|
)
|
@@ -1038,10 +1044,10 @@ function MyWeeklySessionSchedulerPicker({
|
|
1038
1044
|
|
1039
1045
|
// src/core/layout/MyFlexEnd.tsx
|
1040
1046
|
import { Group as Group5 } from "@mantine/core";
|
1041
|
-
import { jsx as
|
1047
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
1042
1048
|
function MyFlexEnd2(_a) {
|
1043
1049
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
1044
|
-
return /* @__PURE__ */
|
1050
|
+
return /* @__PURE__ */ jsx21(Group5, __spreadProps(__spreadValues({ justify: "end", mt: "md" }, rest), { children }));
|
1045
1051
|
}
|
1046
1052
|
|
1047
1053
|
export {
|
@@ -1050,7 +1056,7 @@ export {
|
|
1050
1056
|
MyFlexColumn2 as MyFlexColumn,
|
1051
1057
|
MyButtonCreateUpdate,
|
1052
1058
|
MyButtonModal,
|
1053
|
-
|
1059
|
+
MyButtonModalForm,
|
1054
1060
|
MyButtonPrintPDF,
|
1055
1061
|
MyDataTableSelectOne,
|
1056
1062
|
MyFlexIconTitle,
|
@@ -161,7 +161,9 @@ import { useMutation, useQueryClient as useQueryClient2 } from "@tanstack/react-
|
|
161
161
|
function useMyReactMutation({
|
162
162
|
axiosFn,
|
163
163
|
options,
|
164
|
-
mutationType = "create"
|
164
|
+
mutationType = "create",
|
165
|
+
enableDefaultSuccess = true,
|
166
|
+
enableDefaultError = true
|
165
167
|
}) {
|
166
168
|
const queryClient = useQueryClient2();
|
167
169
|
return useMutation(__spreadValues({
|
@@ -170,25 +172,33 @@ function useMyReactMutation({
|
|
170
172
|
if (res.data.isSuccess == 0) throw new Error(res.data.message);
|
171
173
|
return res.data.data;
|
172
174
|
},
|
173
|
-
onSuccess: () => {
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
175
|
+
onSuccess: (data, variables, context) => {
|
176
|
+
var _a;
|
177
|
+
if (enableDefaultSuccess) {
|
178
|
+
notifications.show({
|
179
|
+
message: typeLabel_mutation[mutationType],
|
180
|
+
color: "green"
|
181
|
+
});
|
182
|
+
queryClient.invalidateQueries();
|
183
|
+
}
|
184
|
+
(_a = options == null ? void 0 : options.onSuccess) == null ? void 0 : _a.call(options, data, variables, context);
|
179
185
|
},
|
180
|
-
onError: (
|
181
|
-
|
186
|
+
onError: (error, variables, context) => {
|
187
|
+
var _a;
|
188
|
+
if (enableDefaultError) {
|
189
|
+
if (error.message === null || error.message === "null") {
|
190
|
+
notifications.show({
|
191
|
+
message: "Kh\xF4ng th\u1EC3 thao t\xE1c, l\u1ED7i ch\u01B0a x\xE1c \u0111\u1ECBnh!",
|
192
|
+
color: "red"
|
193
|
+
});
|
194
|
+
return;
|
195
|
+
}
|
182
196
|
notifications.show({
|
183
|
-
message:
|
197
|
+
message: error.message,
|
184
198
|
color: "red"
|
185
199
|
});
|
186
|
-
return;
|
187
200
|
}
|
188
|
-
|
189
|
-
message: e.message,
|
190
|
-
color: "red"
|
191
|
-
});
|
201
|
+
(_a = options == null ? void 0 : options.onError) == null ? void 0 : _a.call(options, error, variables, context);
|
192
202
|
}
|
193
203
|
}, options));
|
194
204
|
}
|
@@ -149,6 +149,12 @@ async function utils_excel_download({
|
|
149
149
|
saveAs(blob, name);
|
150
150
|
}
|
151
151
|
|
152
|
+
// src/utils/utils_field.ts
|
153
|
+
function utils_field_extractAQBaseField(values) {
|
154
|
+
const { id, name, code, concurrencyStamp } = values || {};
|
155
|
+
return { id, name, code, concurrencyStamp };
|
156
|
+
}
|
157
|
+
|
152
158
|
// src/utils/utils_file.ts
|
153
159
|
import Docxtemplater from "docxtemplater";
|
154
160
|
import { saveAs as saveAs2 } from "file-saver";
|
@@ -360,6 +366,7 @@ export {
|
|
360
366
|
utils_currency_formatWithSuffix,
|
361
367
|
utils_excel_exportExcel,
|
362
368
|
utils_excel_download,
|
369
|
+
utils_field_extractAQBaseField,
|
363
370
|
utils_format_fixDecimal,
|
364
371
|
utils_list_isTotalEqual,
|
365
372
|
utils_list_isFieldUnique,
|
@@ -67,11 +67,11 @@ import {
|
|
67
67
|
useS_BasicAppShell,
|
68
68
|
useS_ButtonImport,
|
69
69
|
utils_layout_getItemsWithoutLinks
|
70
|
-
} from "../chunk-
|
70
|
+
} from "../chunk-AKZQQ7BT.mjs";
|
71
71
|
import "../chunk-U62R2QKJ.mjs";
|
72
72
|
import "../chunk-5U2JSHSJ.mjs";
|
73
73
|
import "../chunk-OMJJAHOC.mjs";
|
74
|
-
import "../chunk-
|
74
|
+
import "../chunk-OIIBQARW.mjs";
|
75
75
|
import "../chunk-7ZCOFATU.mjs";
|
76
76
|
import "../chunk-FWCSY2DS.mjs";
|
77
77
|
export {
|
package/dist/core/index.d.mts
CHANGED
@@ -63,13 +63,14 @@ interface MyButtonModalProps {
|
|
63
63
|
}
|
64
64
|
declare function MyButtonModal({ disclosure, children, buttonProps, actionIconProps, modalProps, isActionIcon }: MyButtonModalProps): react_jsx_runtime.JSX.Element;
|
65
65
|
|
66
|
-
interface
|
66
|
+
interface MyButtonModalFormProps<IEntity> extends MyButtonModalProps {
|
67
67
|
isUpdate?: boolean;
|
68
|
-
|
69
|
-
|
70
|
-
|
68
|
+
children?: ReactNode;
|
69
|
+
onSubmit: (values: IEntity) => void;
|
70
|
+
form: UseFormReturnType<IEntity>;
|
71
|
+
isLoading?: boolean;
|
71
72
|
}
|
72
|
-
declare function
|
73
|
+
declare function MyButtonModalForm<IEntity>({ isUpdate, children, form, disclosure, onSubmit, isLoading, ...rest }: MyButtonModalFormProps<IEntity>): react_jsx_runtime.JSX.Element;
|
73
74
|
|
74
75
|
type PageSizeOption = "portrait" | "landscape" | "A4-landscape";
|
75
76
|
interface MyButtonPrintPDFProps {
|
@@ -195,4 +196,4 @@ interface MyFlexEndProps extends GroupProps {
|
|
195
196
|
}
|
196
197
|
declare function MyFlexEnd({ children, ...rest }: MyFlexEndProps): react_jsx_runtime.JSX.Element;
|
197
198
|
|
198
|
-
export { type IWeeklySession, MyActionIcon, type MyActionIconProps, MyButton, MyButtonCreateUpdate, type MyButtonExportStructureProps, MyButtonModal,
|
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 };
|
package/dist/core/index.mjs
CHANGED
@@ -3,7 +3,7 @@ import {
|
|
3
3
|
MyButton,
|
4
4
|
MyButtonCreateUpdate,
|
5
5
|
MyButtonModal,
|
6
|
-
|
6
|
+
MyButtonModalForm,
|
7
7
|
MyButtonPrintPDF,
|
8
8
|
MyDataTableSelectOne,
|
9
9
|
MyDayOfWeekPicker,
|
@@ -18,14 +18,14 @@ import {
|
|
18
18
|
MyStatsCard,
|
19
19
|
MyTextInput,
|
20
20
|
MyWeeklySessionSchedulerPicker
|
21
|
-
} from "../chunk-
|
22
|
-
import "../chunk-
|
23
|
-
import "../chunk-NQMVDLMU.mjs";
|
21
|
+
} from "../chunk-GCEO6HDO.mjs";
|
22
|
+
import "../chunk-AKZQQ7BT.mjs";
|
24
23
|
import "../chunk-U62R2QKJ.mjs";
|
25
24
|
import "../chunk-5U2JSHSJ.mjs";
|
25
|
+
import "../chunk-GFEMKKFH.mjs";
|
26
26
|
import "../chunk-OMJJAHOC.mjs";
|
27
27
|
import "../chunk-K6S7R6LU.mjs";
|
28
|
-
import "../chunk-
|
28
|
+
import "../chunk-OIIBQARW.mjs";
|
29
29
|
import "../chunk-7ZCOFATU.mjs";
|
30
30
|
import "../chunk-FWCSY2DS.mjs";
|
31
31
|
export {
|
@@ -33,7 +33,7 @@ export {
|
|
33
33
|
MyButton,
|
34
34
|
MyButtonCreateUpdate,
|
35
35
|
MyButtonModal,
|
36
|
-
|
36
|
+
MyButtonModalForm,
|
37
37
|
MyButtonPrintPDF,
|
38
38
|
MyDataTableSelectOne,
|
39
39
|
MyDayOfWeekPicker,
|
package/dist/hooks/index.d.mts
CHANGED
@@ -49,8 +49,10 @@ interface MyReactMutationProps<IReq, IRes> {
|
|
49
49
|
axiosFn: (values: IReq) => Promise<AxiosResponse<MyApiResponse<IRes>>>;
|
50
50
|
options?: UseMutationOptions<IRes, Error, IReq>;
|
51
51
|
mutationType?: type_mutation;
|
52
|
+
enableDefaultSuccess?: boolean;
|
53
|
+
enableDefaultError?: boolean;
|
52
54
|
}
|
53
|
-
declare function useMyReactMutation<IReq, IRes>({ axiosFn, options, mutationType }: MyReactMutationProps<IReq, IRes>): _tanstack_react_query.UseMutationResult<IRes, Error, IReq, unknown>;
|
55
|
+
declare function useMyReactMutation<IReq, IRes>({ axiosFn, options, mutationType, enableDefaultSuccess, enableDefaultError, }: MyReactMutationProps<IReq, IRes>): _tanstack_react_query.UseMutationResult<IRes, Error, IReq, unknown>;
|
54
56
|
|
55
57
|
interface MyReactQueryProps<IRes, IBody> {
|
56
58
|
queryKey?: QueryKey;
|
package/dist/hooks/index.mjs
CHANGED
@@ -1,7 +1,14 @@
|
|
1
|
-
export { I as IAQModule } from '../IAQModule-4U3n2emx.mjs';
|
2
1
|
import { I as IBaseEntity } from '../IBaseEntity-ChMy9RzQ.mjs';
|
2
|
+
export { I as IAQModule } from '../IAQModule-4U3n2emx.mjs';
|
3
3
|
export { I as IEmailConfig } from '../IEmailConfig-CioPObC1.mjs';
|
4
4
|
|
5
|
+
interface IAccount extends IBaseEntity {
|
6
|
+
userName?: string;
|
7
|
+
phoneNumber?: string;
|
8
|
+
email?: string;
|
9
|
+
fullName?: string;
|
10
|
+
}
|
11
|
+
|
5
12
|
interface IFile {
|
6
13
|
fileName?: string | undefined;
|
7
14
|
fileExtension?: string | undefined;
|
@@ -72,4 +79,4 @@ interface IPageContent extends IBaseEntity {
|
|
72
79
|
description?: string;
|
73
80
|
}
|
74
81
|
|
75
|
-
export { IBaseEntity, type IDocument, type IDocumentAttribute, type IFile, type IPageContent, type IPagePermission, type IRole, type IUser };
|
82
|
+
export { type IAccount, IBaseEntity, type IDocument, type IDocumentAttribute, type IFile, type IPageContent, type IPagePermission, type IRole, type IUser };
|
@@ -5,21 +5,21 @@ import {
|
|
5
5
|
utils_converter_enumToSelectOptions,
|
6
6
|
utils_file_fileToAQDocumentType,
|
7
7
|
utils_mantineDataTable_filterColumns
|
8
|
-
} from "../chunk-
|
8
|
+
} from "../chunk-T7NNF74S.mjs";
|
9
9
|
import {
|
10
10
|
baseColumns
|
11
11
|
} from "../chunk-7PUDC2WF.mjs";
|
12
12
|
import {
|
13
13
|
U0DateToDDMMYYYString
|
14
14
|
} from "../chunk-EWDS5IOF.mjs";
|
15
|
+
import {
|
16
|
+
enum_emailConfigModule
|
17
|
+
} from "../chunk-VH4ZAD6M.mjs";
|
15
18
|
import {
|
16
19
|
MyButton as MyButton2,
|
17
20
|
MyDataTableSelectOne,
|
18
21
|
MyTextInput as MyTextInput2
|
19
|
-
} from "../chunk-
|
20
|
-
import {
|
21
|
-
const_object_documentTypes
|
22
|
-
} from "../chunk-GFEMKKFH.mjs";
|
22
|
+
} from "../chunk-GCEO6HDO.mjs";
|
23
23
|
import {
|
24
24
|
F_authenticate_Logout,
|
25
25
|
MyActionIconDelete,
|
@@ -45,17 +45,17 @@ import {
|
|
45
45
|
groupToTwoLevels,
|
46
46
|
useS_authenticate,
|
47
47
|
utils_layout_getItemsWithoutLinks
|
48
|
-
} from "../chunk-
|
48
|
+
} from "../chunk-AKZQQ7BT.mjs";
|
49
49
|
import {
|
50
50
|
createGenericStore
|
51
51
|
} from "../chunk-U62R2QKJ.mjs";
|
52
52
|
import "../chunk-5U2JSHSJ.mjs";
|
53
|
+
import {
|
54
|
+
const_object_documentTypes
|
55
|
+
} from "../chunk-GFEMKKFH.mjs";
|
53
56
|
import {
|
54
57
|
const_object_colors
|
55
58
|
} from "../chunk-OMJJAHOC.mjs";
|
56
|
-
import {
|
57
|
-
enum_emailConfigModule
|
58
|
-
} from "../chunk-VH4ZAD6M.mjs";
|
59
59
|
import "../chunk-K6S7R6LU.mjs";
|
60
60
|
import {
|
61
61
|
baseAxios_default,
|
@@ -66,7 +66,7 @@ import {
|
|
66
66
|
useMyRouter,
|
67
67
|
useQ_AQ_GetAQModule,
|
68
68
|
useQ_SkillCenter_GetAll
|
69
|
-
} from "../chunk-
|
69
|
+
} from "../chunk-OIIBQARW.mjs";
|
70
70
|
import {
|
71
71
|
utils_notification_show
|
72
72
|
} from "../chunk-7ZCOFATU.mjs";
|
@@ -76,9 +76,9 @@ import {
|
|
76
76
|
__spreadValues
|
77
77
|
} from "../chunk-FWCSY2DS.mjs";
|
78
78
|
|
79
|
-
// src/api/services/
|
79
|
+
// src/api/services/service_account.ts
|
80
80
|
var CONTROLLER = "/account";
|
81
|
-
var
|
81
|
+
var service_account = __spreadProps(__spreadValues({}, createBaseApi(CONTROLLER, baseAxios_default)), {
|
82
82
|
getAdminAccount: (paging) => {
|
83
83
|
return baseAxios_default.get(CONTROLLER + `/GetAdminAccount`, {
|
84
84
|
params: paging
|
@@ -131,7 +131,7 @@ function Account_Table(_a) {
|
|
131
131
|
var _a2;
|
132
132
|
const query = useMyReactQuery({
|
133
133
|
queryKey: ["accounts"],
|
134
|
-
axiosFn: () =>
|
134
|
+
axiosFn: () => service_account.getAdminAccount()
|
135
135
|
});
|
136
136
|
useEffect(() => {
|
137
137
|
var _a3, _b;
|
@@ -523,7 +523,7 @@ function F_accessControl_ReadUser() {
|
|
523
523
|
const columns = useMemo2(() => userColumns, []);
|
524
524
|
const getAdminAccountQuery = useMyReactQuery({
|
525
525
|
queryKey: ["getAdminAccountQuery"],
|
526
|
-
axiosFn: () =>
|
526
|
+
axiosFn: () => service_account.getAdminAccount(),
|
527
527
|
mockData: mockUserData
|
528
528
|
});
|
529
529
|
return /* @__PURE__ */ jsx7(
|
package/dist/utils/index.d.mts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
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
|
+
import { I as IBaseEntity } from '../IBaseEntity-ChMy9RzQ.mjs';
|
2
3
|
import { MRT_RowData, MRT_ColumnDef } from 'mantine-react-table';
|
3
4
|
import { DefaultMantineColor } from '@mantine/core';
|
4
5
|
import { useQueryClient } from '@tanstack/react-query';
|
@@ -27,6 +28,13 @@ declare function utils_date_dateToDDMMYYYString(date?: Date | string): string;
|
|
27
28
|
declare function utils_date_formatToDateTimeStartEnd(startDate: Date, endDate: Date): string;
|
28
29
|
declare function utils_date_getHHmm(date: Date): string;
|
29
30
|
|
31
|
+
declare function utils_field_extractAQBaseField(values?: Partial<IBaseEntity>): {
|
32
|
+
id: number | undefined;
|
33
|
+
name: string | undefined;
|
34
|
+
code: string | undefined;
|
35
|
+
concurrencyStamp: string | undefined;
|
36
|
+
};
|
37
|
+
|
30
38
|
declare function utils_format_fixDecimal(number: number, digits?: number): number | undefined;
|
31
39
|
|
32
40
|
/**
|
@@ -74,4 +82,4 @@ declare function U0MyValidateEmpty(message?: string): (value: unknown) => React.
|
|
74
82
|
declare function U0MyValidateEmail(value?: string): "Email không đúng định dạng" | null;
|
75
83
|
declare const utils_validator_validateCode: (value?: string) => "Không được để trống" | "Chỉ được nhập chữ, số và dấu '-' (không bắt đầu bằng '-')" | null;
|
76
84
|
|
77
|
-
export { U0DateToDDMMYYYString, U0MyValidateEmail, U0MyValidateEmpty, updateEnableList, utils_converter_enumToSelectOptions, utils_converter_getKeyByValue, utils_converter_getLabelByValue, utils_converter_mapEnumToSelectData, utils_currency_formatWithSuffix, utils_date_dateToDDMMYYYString, utils_date_formatToDateTimeStartEnd, utils_date_getHHmm, utils_format_fixDecimal, utils_list_hasEmptyField, utils_list_isFieldUnique, utils_list_isTotalEqual, utils_list_sumField, utils_mantineDataTable_filterColumns, utils_notification_show, utils_pdf_download, utils_reactQuery_updateListItemInQuery, utils_text_getNormalizedTextFromHtml, utils_time_convertTimeStringToSeconds, utils_time_extractHourMinute, utils_time_getCurrentTimeString, utils_time_getHourMinuteFromString, utils_validator_validateCode };
|
85
|
+
export { U0DateToDDMMYYYString, U0MyValidateEmail, U0MyValidateEmpty, updateEnableList, utils_converter_enumToSelectOptions, utils_converter_getKeyByValue, utils_converter_getLabelByValue, utils_converter_mapEnumToSelectData, utils_currency_formatWithSuffix, utils_date_dateToDDMMYYYString, utils_date_formatToDateTimeStartEnd, utils_date_getHHmm, utils_field_extractAQBaseField, utils_format_fixDecimal, utils_list_hasEmptyField, utils_list_isFieldUnique, utils_list_isTotalEqual, utils_list_sumField, utils_mantineDataTable_filterColumns, utils_notification_show, utils_pdf_download, utils_reactQuery_updateListItemInQuery, utils_text_getNormalizedTextFromHtml, utils_time_convertTimeStringToSeconds, utils_time_extractHourMinute, utils_time_getCurrentTimeString, utils_time_getHourMinuteFromString, utils_validator_validateCode };
|
package/dist/utils/index.mjs
CHANGED
@@ -9,6 +9,7 @@ import {
|
|
9
9
|
utils_currency_formatWithSuffix,
|
10
10
|
utils_excel_download,
|
11
11
|
utils_excel_exportExcel,
|
12
|
+
utils_field_extractAQBaseField,
|
12
13
|
utils_file_AQDocumentTypeToFile,
|
13
14
|
utils_file_docxtemplaterDownload,
|
14
15
|
utils_file_fileToAQDocumentType,
|
@@ -25,7 +26,7 @@ import {
|
|
25
26
|
utils_time_getCurrentTimeString,
|
26
27
|
utils_time_getHourMinuteFromString,
|
27
28
|
utils_validator_validateCode
|
28
|
-
} from "../chunk-
|
29
|
+
} from "../chunk-T7NNF74S.mjs";
|
29
30
|
import {
|
30
31
|
U0DateToDDMMYYYString,
|
31
32
|
utils_date_dateToDDMMYYYString,
|
@@ -54,6 +55,7 @@ export {
|
|
54
55
|
utils_date_getHHmm,
|
55
56
|
utils_excel_download,
|
56
57
|
utils_excel_exportExcel,
|
58
|
+
utils_field_extractAQBaseField,
|
57
59
|
utils_file_AQDocumentTypeToFile,
|
58
60
|
utils_file_docxtemplaterDownload,
|
59
61
|
utils_file_fileToAQDocumentType,
|