aq-fe-framework 0.1.558 → 0.1.560
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-RO44L2EA.mjs → chunk-O3ZHCTDD.mjs} +1 -1
- package/dist/{chunk-WXBZOEYU.mjs → chunk-OYDVMTRL.mjs} +13 -21
- package/dist/{chunk-VAT2XBDF.mjs → chunk-QIMS22BF.mjs} +0 -2
- package/dist/components/index.mjs +1 -1
- package/dist/core/index.d.mts +1 -2
- package/dist/core/index.mjs +3 -3
- package/dist/coreService/index.mjs +2 -2
- package/dist/modules-features/index.mjs +3 -3
- package/package.json +2 -1
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
MyDataTable,
|
|
3
3
|
MyFlexColumn,
|
|
4
4
|
MyFlexRow
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-QIMS22BF.mjs";
|
|
6
6
|
import {
|
|
7
7
|
const_object_colors
|
|
8
8
|
} from "./chunk-OMJJAHOC.mjs";
|
|
@@ -416,7 +416,7 @@ function MyButtonModalForm(_a) {
|
|
|
416
416
|
// src/core/button/MyButtonPrintPDF.tsx
|
|
417
417
|
import { Button as Button5 } from "@mantine/core";
|
|
418
418
|
import { IconPrinter as IconPrinter3 } from "@tabler/icons-react";
|
|
419
|
-
import {
|
|
419
|
+
import { useRef } from "react";
|
|
420
420
|
import { useReactToPrint } from "react-to-print";
|
|
421
421
|
import { Fragment as Fragment3, jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
422
422
|
function MyButtonPrintPDF(_a) {
|
|
@@ -425,17 +425,14 @@ function MyButtonPrintPDF(_a) {
|
|
|
425
425
|
autoPadding = true,
|
|
426
426
|
buttonProps,
|
|
427
427
|
useReactToPrintProps,
|
|
428
|
-
isReady = true,
|
|
429
428
|
pageSize = "portrait"
|
|
430
429
|
} = _b, rest = __objRest(_b, [
|
|
431
430
|
"children",
|
|
432
431
|
"autoPadding",
|
|
433
432
|
"buttonProps",
|
|
434
433
|
"useReactToPrintProps",
|
|
435
|
-
"isReady",
|
|
436
434
|
"pageSize"
|
|
437
435
|
]);
|
|
438
|
-
const isPrintState = useState(false);
|
|
439
436
|
const printRef = useRef(null);
|
|
440
437
|
const handlePrint = useReactToPrint(__spreadValues({
|
|
441
438
|
documentTitle: "In n\u1ED9i dung",
|
|
@@ -452,11 +449,6 @@ function MyButtonPrintPDF(_a) {
|
|
|
452
449
|
return ``;
|
|
453
450
|
}
|
|
454
451
|
};
|
|
455
|
-
useEffect(() => {
|
|
456
|
-
if (isReady == false) return;
|
|
457
|
-
if (isPrintState[0] == false) return;
|
|
458
|
-
handlePrint();
|
|
459
|
-
}, [isReady, isPrintState[0]]);
|
|
460
452
|
return /* @__PURE__ */ jsxs5(Fragment3, { children: [
|
|
461
453
|
/* @__PURE__ */ jsx9("style", { children: getPageSizeCSS() }),
|
|
462
454
|
/* @__PURE__ */ jsx9("div", { style: { display: "none" }, children: /* @__PURE__ */ jsx9(
|
|
@@ -474,13 +466,13 @@ function MyButtonPrintPDF(_a) {
|
|
|
474
466
|
Button5,
|
|
475
467
|
__spreadProps(__spreadValues({
|
|
476
468
|
color: "orange",
|
|
477
|
-
leftSection: /* @__PURE__ */ jsx9(IconPrinter3, {})
|
|
478
|
-
}, buttonProps), {
|
|
479
469
|
onClick: (e) => {
|
|
480
470
|
var _a2;
|
|
481
471
|
(_a2 = buttonProps == null ? void 0 : buttonProps.onClick) == null ? void 0 : _a2.call(buttonProps, e);
|
|
482
|
-
|
|
472
|
+
handlePrint();
|
|
483
473
|
},
|
|
474
|
+
leftSection: /* @__PURE__ */ jsx9(IconPrinter3, {})
|
|
475
|
+
}, buttonProps), {
|
|
484
476
|
children: (buttonProps == null ? void 0 : buttonProps.children) || "In"
|
|
485
477
|
})
|
|
486
478
|
)
|
|
@@ -488,7 +480,7 @@ function MyButtonPrintPDF(_a) {
|
|
|
488
480
|
}
|
|
489
481
|
|
|
490
482
|
// src/core/dataDisplay/MyDataTableSelectOne.tsx
|
|
491
|
-
import { useEffect
|
|
483
|
+
import { useEffect, useMemo as useMemo2 } from "react";
|
|
492
484
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
493
485
|
function MyDataTableSelectOne({
|
|
494
486
|
columns,
|
|
@@ -497,7 +489,7 @@ function MyDataTableSelectOne({
|
|
|
497
489
|
setIdSelection
|
|
498
490
|
}) {
|
|
499
491
|
const columnsState = useMemo2(() => columns, []);
|
|
500
|
-
|
|
492
|
+
useEffect(() => {
|
|
501
493
|
if (!queryResult.data) return;
|
|
502
494
|
setIdSelection(queryResult.data[0].id);
|
|
503
495
|
}, [queryResult.data]);
|
|
@@ -628,7 +620,7 @@ import TextAlign from "@tiptap/extension-text-align";
|
|
|
628
620
|
import Underline from "@tiptap/extension-underline";
|
|
629
621
|
import { useEditor } from "@tiptap/react";
|
|
630
622
|
import StarterKit from "@tiptap/starter-kit";
|
|
631
|
-
import { useEffect as
|
|
623
|
+
import { useEffect as useEffect2 } from "react";
|
|
632
624
|
import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
633
625
|
function MyRichTextEditor(props) {
|
|
634
626
|
const editor = useEditor({
|
|
@@ -708,7 +700,7 @@ function MyRichTextEditor(props) {
|
|
|
708
700
|
(_a = props.onBlur) == null ? void 0 : _a.call(props, editor2.getHTML());
|
|
709
701
|
}
|
|
710
702
|
});
|
|
711
|
-
|
|
703
|
+
useEffect2(() => {
|
|
712
704
|
if (editor && props.value !== editor.getHTML()) {
|
|
713
705
|
editor.commands.setContent(props.value || "", false);
|
|
714
706
|
}
|
|
@@ -809,7 +801,7 @@ function MySelect(_a) {
|
|
|
809
801
|
}
|
|
810
802
|
|
|
811
803
|
// src/core/input/MySelectFromAPI.tsx
|
|
812
|
-
import { useCallback, useEffect as
|
|
804
|
+
import { useCallback, useEffect as useEffect3, useMemo as useMemo3, useRef as useRef2 } from "react";
|
|
813
805
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
814
806
|
function MySelectFromAPI(_a) {
|
|
815
807
|
var _b = _a, {
|
|
@@ -863,7 +855,7 @@ function MySelectFromAPI(_a) {
|
|
|
863
855
|
setObjectData(selected);
|
|
864
856
|
}
|
|
865
857
|
};
|
|
866
|
-
|
|
858
|
+
useEffect3(() => {
|
|
867
859
|
var _a2, _b2, _c;
|
|
868
860
|
if (autoSelectFirstItem && !hasAutoSelected.current && ((_a2 = query.data) == null ? void 0 : _a2.length) && (value === void 0 || value === null || value === "")) {
|
|
869
861
|
const firstItem = query.data[0];
|
|
@@ -940,13 +932,13 @@ import {
|
|
|
940
932
|
Text as Text5
|
|
941
933
|
} from "@mantine/core";
|
|
942
934
|
import { IconPlus as IconPlus4, IconTrash as IconTrash3 } from "@tabler/icons-react";
|
|
943
|
-
import { useState
|
|
935
|
+
import { useState } from "react";
|
|
944
936
|
import { jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
945
937
|
function MyWeeklySessionSchedulerPicker({
|
|
946
938
|
value = [],
|
|
947
939
|
onChange
|
|
948
940
|
}) {
|
|
949
|
-
const [selectedDays, setSelectedDays] =
|
|
941
|
+
const [selectedDays, setSelectedDays] = useState([]);
|
|
950
942
|
const handleAddSession = (dayOfWeek) => {
|
|
951
943
|
const newSession = {
|
|
952
944
|
dayOfWeek,
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
useS_BasicAppShell,
|
|
68
68
|
useS_ButtonImport,
|
|
69
69
|
utils_layout_getItemsWithoutLinks
|
|
70
|
-
} from "../chunk-
|
|
70
|
+
} from "../chunk-QIMS22BF.mjs";
|
|
71
71
|
import "../chunk-U62R2QKJ.mjs";
|
|
72
72
|
import "../chunk-5U2JSHSJ.mjs";
|
|
73
73
|
import "../chunk-OMJJAHOC.mjs";
|
package/dist/core/index.d.mts
CHANGED
|
@@ -81,9 +81,8 @@ interface MyButtonPrintPDFProps {
|
|
|
81
81
|
autoPadding?: boolean;
|
|
82
82
|
useReactToPrintProps?: UseReactToPrintOptions;
|
|
83
83
|
pageSize?: PageSizeOption;
|
|
84
|
-
isReady?: boolean;
|
|
85
84
|
}
|
|
86
|
-
declare function MyButtonPrintPDF({ children, autoPadding, buttonProps, useReactToPrintProps,
|
|
85
|
+
declare function MyButtonPrintPDF({ children, autoPadding, buttonProps, useReactToPrintProps, pageSize, // ✅ mặc định
|
|
87
86
|
...rest }: MyButtonPrintPDFProps): react_jsx_runtime.JSX.Element;
|
|
88
87
|
|
|
89
88
|
declare function MyDataTableSelectOne<TData extends MRT_RowData>({ columns, queryResult, idSelection, setIdSelection }: {
|
package/dist/core/index.mjs
CHANGED
|
@@ -18,12 +18,12 @@ import {
|
|
|
18
18
|
MyStatsCard,
|
|
19
19
|
MyTextInput,
|
|
20
20
|
MyWeeklySessionSchedulerPicker
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-OYDVMTRL.mjs";
|
|
22
22
|
import "../chunk-GFEMKKFH.mjs";
|
|
23
23
|
import {
|
|
24
24
|
MyModalDelete
|
|
25
|
-
} from "../chunk-
|
|
26
|
-
import "../chunk-
|
|
25
|
+
} from "../chunk-O3ZHCTDD.mjs";
|
|
26
|
+
import "../chunk-QIMS22BF.mjs";
|
|
27
27
|
import "../chunk-U62R2QKJ.mjs";
|
|
28
28
|
import "../chunk-5U2JSHSJ.mjs";
|
|
29
29
|
import "../chunk-OMJJAHOC.mjs";
|
|
@@ -15,11 +15,11 @@ import {
|
|
|
15
15
|
MyButton as MyButton2,
|
|
16
16
|
MyDataTableSelectOne,
|
|
17
17
|
MyTextInput as MyTextInput2
|
|
18
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-OYDVMTRL.mjs";
|
|
19
19
|
import {
|
|
20
20
|
const_object_documentTypes
|
|
21
21
|
} from "../chunk-GFEMKKFH.mjs";
|
|
22
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-O3ZHCTDD.mjs";
|
|
23
23
|
import {
|
|
24
24
|
F_authenticate_Logout,
|
|
25
25
|
MyActionIconDelete,
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
groupToTwoLevels,
|
|
46
46
|
useS_authenticate,
|
|
47
47
|
utils_layout_getItemsWithoutLinks
|
|
48
|
-
} from "../chunk-
|
|
48
|
+
} from "../chunk-QIMS22BF.mjs";
|
|
49
49
|
import {
|
|
50
50
|
createGenericStore
|
|
51
51
|
} from "../chunk-U62R2QKJ.mjs";
|
package/package.json
CHANGED
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"types": "./dist/coreService/index.d.mts"
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
|
-
"version": "0.1.
|
|
49
|
+
"version": "0.1.560",
|
|
50
50
|
"private": false,
|
|
51
51
|
"files": [
|
|
52
52
|
"dist"
|
|
@@ -98,6 +98,7 @@
|
|
|
98
98
|
"@tiptap/pm": "^2.9.1",
|
|
99
99
|
"@tiptap/react": "^2.9.1",
|
|
100
100
|
"@tiptap/starter-kit": "^2.9.1",
|
|
101
|
+
"aq-fe-framework": "^0.1.559",
|
|
101
102
|
"autoprefixer": "^10.4.20",
|
|
102
103
|
"axios": "^1.7.7",
|
|
103
104
|
"caniuse-lite": "^1.0.30001718",
|