aq-fe-framework 0.1.563 → 0.1.565
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.
|
@@ -419,20 +419,14 @@ import { IconPrinter as IconPrinter3 } from "@tabler/icons-react";
|
|
|
419
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
|
-
function MyButtonPrintPDF(
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
"children",
|
|
431
|
-
"autoPadding",
|
|
432
|
-
"buttonProps",
|
|
433
|
-
"useReactToPrintProps",
|
|
434
|
-
"pageSize"
|
|
435
|
-
]);
|
|
422
|
+
function MyButtonPrintPDF({
|
|
423
|
+
children,
|
|
424
|
+
autoPadding = true,
|
|
425
|
+
buttonProps,
|
|
426
|
+
useReactToPrintProps,
|
|
427
|
+
pageSize = "portrait"
|
|
428
|
+
// ✅ mặc định
|
|
429
|
+
}) {
|
|
436
430
|
const printRef = useRef(null);
|
|
437
431
|
const handlePrint = useReactToPrint(__spreadValues({
|
|
438
432
|
documentTitle: "In n\u1ED9i dung",
|
|
@@ -466,11 +460,7 @@ function MyButtonPrintPDF(_a) {
|
|
|
466
460
|
Button5,
|
|
467
461
|
__spreadProps(__spreadValues({
|
|
468
462
|
color: "orange",
|
|
469
|
-
onClick:
|
|
470
|
-
var _a2;
|
|
471
|
-
(_a2 = buttonProps == null ? void 0 : buttonProps.onClick) == null ? void 0 : _a2.call(buttonProps, e);
|
|
472
|
-
handlePrint();
|
|
473
|
-
},
|
|
463
|
+
onClick: handlePrint,
|
|
474
464
|
leftSection: /* @__PURE__ */ jsx9(IconPrinter3, {})
|
|
475
465
|
}, buttonProps), {
|
|
476
466
|
children: (buttonProps == null ? void 0 : buttonProps.children) || "In"
|
|
@@ -1073,6 +1063,9 @@ function MyFlexEnd2(_a) {
|
|
|
1073
1063
|
return /* @__PURE__ */ jsx21(Group5, __spreadProps(__spreadValues({ justify: "end", mt: "md" }, rest), { children }));
|
|
1074
1064
|
}
|
|
1075
1065
|
|
|
1066
|
+
// src/core/overlays/MyPrintContent.tsx
|
|
1067
|
+
import { jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1068
|
+
|
|
1076
1069
|
export {
|
|
1077
1070
|
MyActionIcon,
|
|
1078
1071
|
MyButton,
|
package/dist/core/index.d.mts
CHANGED
|
@@ -74,16 +74,15 @@ interface MyButtonModalFormProps<IEntity> extends MyButtonModalProps {
|
|
|
74
74
|
}
|
|
75
75
|
declare function MyButtonModalForm<IEntity>({ isUpdate, children, form, disclosure, onSubmit, isLoading, ...rest }: MyButtonModalFormProps<IEntity>): react_jsx_runtime.JSX.Element;
|
|
76
76
|
|
|
77
|
-
type PageSizeOption = "portrait" | "landscape" | "A4-landscape";
|
|
77
|
+
type PageSizeOption$1 = "portrait" | "landscape" | "A4-landscape";
|
|
78
78
|
interface MyButtonPrintPDFProps {
|
|
79
|
-
buttonProps?:
|
|
79
|
+
buttonProps?: ButtonProps;
|
|
80
80
|
children?: ReactNode;
|
|
81
81
|
autoPadding?: boolean;
|
|
82
82
|
useReactToPrintProps?: UseReactToPrintOptions;
|
|
83
|
-
pageSize?: PageSizeOption;
|
|
83
|
+
pageSize?: PageSizeOption$1;
|
|
84
84
|
}
|
|
85
|
-
declare function MyButtonPrintPDF({ children, autoPadding, buttonProps, useReactToPrintProps, pageSize,
|
|
86
|
-
...rest }: MyButtonPrintPDFProps): react_jsx_runtime.JSX.Element;
|
|
85
|
+
declare function MyButtonPrintPDF({ children, autoPadding, buttonProps, useReactToPrintProps, pageSize, }: MyButtonPrintPDFProps): react_jsx_runtime.JSX.Element;
|
|
87
86
|
|
|
88
87
|
declare function MyDataTableSelectOne<TData extends MRT_RowData>({ columns, queryResult, idSelection, setIdSelection }: {
|
|
89
88
|
columns: MRT_ColumnDef<TData>[];
|
|
@@ -199,4 +198,12 @@ interface MyFlexEndProps extends GroupProps {
|
|
|
199
198
|
}
|
|
200
199
|
declare function MyFlexEnd({ children, ...rest }: MyFlexEndProps): react_jsx_runtime.JSX.Element;
|
|
201
200
|
|
|
202
|
-
|
|
201
|
+
type PageSizeOption = "portrait" | "landscape" | "A4-landscape";
|
|
202
|
+
interface MyPrintContentProps {
|
|
203
|
+
children?: ReactNode;
|
|
204
|
+
autoPadding?: boolean;
|
|
205
|
+
pageSize?: PageSizeOption;
|
|
206
|
+
printRef: React.RefObject<HTMLDivElement>;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
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, type MyPrintContentProps, MyRichTextEditor, MySelect, MySelectFromAPI, type MySelectFromAPIProps, type MySelectProps, MyStatsCard, MyTextInput, MyWeeklySessionSchedulerPicker, type WeeklySessionSchedulerProps };
|
package/dist/core/index.mjs
CHANGED