aq-fe-framework 0.1.486 → 0.1.488

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.
@@ -2,13 +2,13 @@ import {
2
2
  MyDataTable,
3
3
  MyFlexColumn,
4
4
  MyFlexRow
5
- } from "./chunk-YC5RSWLH.mjs";
6
- import {
7
- enum_daysOfWeek
8
- } from "./chunk-K6S7R6LU.mjs";
5
+ } from "./chunk-BYWT26DO.mjs";
9
6
  import {
10
7
  const_object_colors
11
8
  } from "./chunk-OMJJAHOC.mjs";
9
+ import {
10
+ enum_daysOfWeek
11
+ } from "./chunk-K6S7R6LU.mjs";
12
12
  import {
13
13
  useMyReactMutation,
14
14
  useMyReactQuery
@@ -367,13 +367,46 @@ function MyButtonModalCreateUpdate(props) {
367
367
  return /* @__PURE__ */ jsx8(MyButtonModal, __spreadValues({ disclosure: disc, modalProps: { title: "Chi ti\u1EBFt d\u1EEF li\u1EC7u" } }, props));
368
368
  }
369
369
 
370
+ // src/core/button/MyButtonPrintPDF.tsx
371
+ import { Button as Button5 } from "@mantine/core";
372
+ import { IconPrinter as IconPrinter3 } from "@tabler/icons-react";
373
+ import { useRef } from "react";
374
+ import { useReactToPrint } from "react-to-print";
375
+ import { Fragment as Fragment3, jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
376
+ function MyButtonPrintPDF({
377
+ children = "",
378
+ autoPadding = true,
379
+ buttonProps,
380
+ useReactToPrintProps
381
+ }) {
382
+ const printRef = useRef(null);
383
+ const handlePrint = useReactToPrint(__spreadValues({
384
+ documentTitle: "In n\u1ED9i dung",
385
+ contentRef: printRef
386
+ }, useReactToPrintProps));
387
+ return /* @__PURE__ */ jsxs4(Fragment3, { children: [
388
+ /* @__PURE__ */ jsx9("div", { style: { display: "none" }, children: /* @__PURE__ */ jsx9(
389
+ "div",
390
+ {
391
+ ref: printRef,
392
+ style: {
393
+ padding: autoPadding ? "2cm 2cm 2cm 3cm" : void 0,
394
+ fontFamily: '"Times New Roman", Times, serif'
395
+ },
396
+ children
397
+ }
398
+ ) }),
399
+ /* @__PURE__ */ jsx9(Button5, __spreadProps(__spreadValues({ color: "orange", onClick: handlePrint, leftSection: /* @__PURE__ */ jsx9(IconPrinter3, {}) }, buttonProps), { children: (buttonProps == null ? void 0 : buttonProps.children) || "In" }))
400
+ ] });
401
+ }
402
+
370
403
  // src/core/button/MyButtonPrototypeSwitch.tsx
371
404
  import { Switch } from "@mantine/core";
372
- import { jsx as jsx9 } from "react/jsx-runtime";
405
+ import { jsx as jsx10 } from "react/jsx-runtime";
373
406
 
374
407
  // src/core/dataDisplay/MyDataTableSelectOne.tsx
375
408
  import { useEffect, useMemo as useMemo2 } from "react";
376
- import { jsx as jsx10 } from "react/jsx-runtime";
409
+ import { jsx as jsx11 } from "react/jsx-runtime";
377
410
  function MyDataTableSelectOne({
378
411
  columns,
379
412
  queryResult,
@@ -385,7 +418,7 @@ function MyDataTableSelectOne({
385
418
  if (!queryResult.data) return;
386
419
  setIdSelection(queryResult.data[0].id);
387
420
  }, [queryResult.data]);
388
- return /* @__PURE__ */ jsx10(
421
+ return /* @__PURE__ */ jsx11(
389
422
  MyDataTable,
390
423
  {
391
424
  columns: columnsState,
@@ -411,30 +444,30 @@ function MyDataTableSelectOne({
411
444
 
412
445
  // src/core/dataDisplay/MyFlexIconTitle.tsx
413
446
  import { Flex as Flex2, Text } from "@mantine/core";
414
- import { jsx as jsx11, jsxs as jsxs4 } from "react/jsx-runtime";
447
+ import { jsx as jsx12, jsxs as jsxs5 } from "react/jsx-runtime";
415
448
  function MyFlexIconTitle(props) {
416
- return /* @__PURE__ */ jsxs4(Flex2, __spreadProps(__spreadValues({ direction: "row", align: "center", gap: "xs" }, props), { children: [
449
+ return /* @__PURE__ */ jsxs5(Flex2, __spreadProps(__spreadValues({ direction: "row", align: "center", gap: "xs" }, props), { children: [
417
450
  props.icon,
418
- /* @__PURE__ */ jsx11(Text, __spreadProps(__spreadValues({ size: "lg", fw: 700 }, props.textProps), { children: props == null ? void 0 : props.children }))
451
+ /* @__PURE__ */ jsx12(Text, __spreadProps(__spreadValues({ size: "lg", fw: 700 }, props.textProps), { children: props == null ? void 0 : props.children }))
419
452
  ] }));
420
453
  }
421
454
 
422
455
  // src/core/dataDisplay/MyInfoBox.tsx
423
456
  import { Group, Paper, Stack, Text as Text2 } from "@mantine/core";
424
- import { jsx as jsx12, jsxs as jsxs5 } from "react/jsx-runtime";
457
+ import { jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
425
458
  function MyInfoBox({ title, data, paperProps }) {
426
- return /* @__PURE__ */ jsx12(Paper, __spreadProps(__spreadValues({ withBorder: true, shadow: "xs", radius: "md", p: "md", bg: const_object_colors.mantineBackgroundBlueLight }, paperProps), { children: /* @__PURE__ */ jsxs5(Stack, { children: [
427
- title && /* @__PURE__ */ jsx12(Text2, { fw: 600, size: "sm", children: title }),
428
- data.map((item, index) => /* @__PURE__ */ jsxs5(Group, { justify: "space-between", children: [
429
- /* @__PURE__ */ jsx12(Text2, { size: "sm", fw: 500, c: "dimmed", children: item.label }),
430
- /* @__PURE__ */ jsx12(Text2, { size: "sm", fw: 500, children: item.value })
459
+ return /* @__PURE__ */ jsx13(Paper, __spreadProps(__spreadValues({ withBorder: true, shadow: "xs", radius: "md", p: "md", bg: const_object_colors.mantineBackgroundBlueLight }, paperProps), { children: /* @__PURE__ */ jsxs6(Stack, { children: [
460
+ title && /* @__PURE__ */ jsx13(Text2, { fw: 600, size: "sm", children: title }),
461
+ data.map((item, index) => /* @__PURE__ */ jsxs6(Group, { justify: "space-between", children: [
462
+ /* @__PURE__ */ jsx13(Text2, { size: "sm", fw: 500, c: "dimmed", children: item.label }),
463
+ /* @__PURE__ */ jsx13(Text2, { size: "sm", fw: 500, children: item.value })
431
464
  ] }, index))
432
465
  ] }) }));
433
466
  }
434
467
 
435
468
  // src/core/dataDisplay/MyLabelValueRow.tsx
436
469
  import { Group as Group2, Text as Text3 } from "@mantine/core";
437
- import { jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
470
+ import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
438
471
  function MyLabelValueRow({
439
472
  label,
440
473
  value,
@@ -442,18 +475,18 @@ function MyLabelValueRow({
442
475
  valueProps,
443
476
  groupProps
444
477
  }) {
445
- return /* @__PURE__ */ jsxs6(Group2, __spreadProps(__spreadValues({ gap: 5, wrap: "nowrap" }, groupProps), { children: [
446
- /* @__PURE__ */ jsxs6(Text3, __spreadProps(__spreadValues({ fw: 600 }, labelProps), { children: [
478
+ return /* @__PURE__ */ jsxs7(Group2, __spreadProps(__spreadValues({ gap: 5, wrap: "nowrap" }, groupProps), { children: [
479
+ /* @__PURE__ */ jsxs7(Text3, __spreadProps(__spreadValues({ fw: 600 }, labelProps), { children: [
447
480
  label,
448
481
  ":"
449
482
  ] })),
450
- /* @__PURE__ */ jsx13(Text3, __spreadProps(__spreadValues({}, valueProps), { children: value }))
483
+ /* @__PURE__ */ jsx14(Text3, __spreadProps(__spreadValues({}, valueProps), { children: value }))
451
484
  ] }));
452
485
  }
453
486
 
454
487
  // src/core/dataDisplay/MyStatsCartd.tsx
455
488
  import { Box, Card, ThemeIcon } from "@mantine/core";
456
- import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
489
+ import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
457
490
  function MyStatsCard({
458
491
  title,
459
492
  value,
@@ -462,22 +495,22 @@ function MyStatsCard({
462
495
  color,
463
496
  themeIconProps
464
497
  }) {
465
- return /* @__PURE__ */ jsxs7(Card, { children: [
466
- /* @__PURE__ */ jsx14("div", { className: `absolute inset-0 bg-gradient-to-br ${color} opacity-5` }),
467
- /* @__PURE__ */ jsx14(Box, { className: "p-6", children: /* @__PURE__ */ jsxs7("div", { className: "flex items-center justify-between", children: [
468
- /* @__PURE__ */ jsxs7("div", { children: [
469
- /* @__PURE__ */ jsx14("p", { className: "text-sm font-medium text-muted-foreground", children: title }),
470
- /* @__PURE__ */ jsx14("p", { className: "text-3xl font-bold", children: value }),
471
- /* @__PURE__ */ jsx14("p", { className: "text-xs text-muted-foreground mt-1", children: subtitle })
498
+ return /* @__PURE__ */ jsxs8(Card, { children: [
499
+ /* @__PURE__ */ jsx15("div", { className: `absolute inset-0 bg-gradient-to-br ${color} opacity-5` }),
500
+ /* @__PURE__ */ jsx15(Box, { className: "p-6", children: /* @__PURE__ */ jsxs8("div", { className: "flex items-center justify-between", children: [
501
+ /* @__PURE__ */ jsxs8("div", { children: [
502
+ /* @__PURE__ */ jsx15("p", { className: "text-sm font-medium text-muted-foreground", children: title }),
503
+ /* @__PURE__ */ jsx15("p", { className: "text-3xl font-bold", children: value }),
504
+ /* @__PURE__ */ jsx15("p", { className: "text-xs text-muted-foreground mt-1", children: subtitle })
472
505
  ] }),
473
- /* @__PURE__ */ jsx14(ThemeIcon, __spreadProps(__spreadValues({ size: "xl", radius: "xl" }, themeIconProps), { children: icon }))
506
+ /* @__PURE__ */ jsx15(ThemeIcon, __spreadProps(__spreadValues({ size: "xl", radius: "xl" }, themeIconProps), { children: icon }))
474
507
  ] }) })
475
508
  ] });
476
509
  }
477
510
 
478
511
  // src/core/input/MyDayOfWeekPicker.tsx
479
512
  import { Badge, Group as Group3 } from "@mantine/core";
480
- import { jsx as jsx15 } from "react/jsx-runtime";
513
+ import { jsx as jsx16 } from "react/jsx-runtime";
481
514
  var days = Object.entries(enum_daysOfWeek).filter(([key]) => isNaN(Number(key))).map(([label, value]) => ({ label, value }));
482
515
  function MyDayOfWeekPicker({ value = [], onChange }) {
483
516
  const toggle = (val) => {
@@ -485,7 +518,7 @@ function MyDayOfWeekPicker({ value = [], onChange }) {
485
518
  const newValue = value.includes(val) ? value.filter((v) => v !== val) : [...value, val].sort((a, b) => a - b);
486
519
  onChange(newValue);
487
520
  };
488
- return /* @__PURE__ */ jsx15(MyFlexRow, { align: "center", children: /* @__PURE__ */ jsx15(Group3, { gap: "xs", children: days.map((d) => /* @__PURE__ */ jsx15(
521
+ return /* @__PURE__ */ jsx16(MyFlexRow, { align: "center", children: /* @__PURE__ */ jsx16(Group3, { gap: "xs", children: days.map((d) => /* @__PURE__ */ jsx16(
489
522
  Badge,
490
523
  {
491
524
  variant: value.includes(d.value) ? "filled" : "outline",
@@ -513,7 +546,7 @@ import Underline from "@tiptap/extension-underline";
513
546
  import { useEditor } from "@tiptap/react";
514
547
  import StarterKit from "@tiptap/starter-kit";
515
548
  import { useEffect as useEffect2 } from "react";
516
- import { jsx as jsx16, jsxs as jsxs8 } from "react/jsx-runtime";
549
+ import { jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
517
550
  function MyRichTextEditor(props) {
518
551
  const editor = useEditor({
519
552
  extensions: [
@@ -597,44 +630,44 @@ function MyRichTextEditor(props) {
597
630
  editor.commands.setContent(props.value || "", false);
598
631
  }
599
632
  }, [props.value, editor]);
600
- return /* @__PURE__ */ jsx16(Input.Wrapper, __spreadProps(__spreadValues({}, props.inputWrapperProps), { children: /* @__PURE__ */ jsxs8(MantineRichTextEditor, __spreadProps(__spreadValues({ editor }, props.richTextEditorProps), { children: [
601
- /* @__PURE__ */ jsxs8(MantineRichTextEditor.Toolbar, __spreadProps(__spreadValues({}, props.richTextEditorToolBarProps), { children: [
602
- /* @__PURE__ */ jsxs8(MantineRichTextEditor.ControlsGroup, { children: [
603
- /* @__PURE__ */ jsx16(MantineRichTextEditor.Bold, {}),
604
- /* @__PURE__ */ jsx16(MantineRichTextEditor.Italic, {}),
605
- /* @__PURE__ */ jsx16(MantineRichTextEditor.Underline, {}),
606
- /* @__PURE__ */ jsx16(MantineRichTextEditor.Strikethrough, {}),
607
- /* @__PURE__ */ jsx16(MantineRichTextEditor.ClearFormatting, {}),
608
- /* @__PURE__ */ jsx16(MantineRichTextEditor.Highlight, {}),
609
- /* @__PURE__ */ jsx16(MantineRichTextEditor.Code, {})
633
+ return /* @__PURE__ */ jsx17(Input.Wrapper, __spreadProps(__spreadValues({}, props.inputWrapperProps), { children: /* @__PURE__ */ jsxs9(MantineRichTextEditor, __spreadProps(__spreadValues({ editor }, props.richTextEditorProps), { children: [
634
+ /* @__PURE__ */ jsxs9(MantineRichTextEditor.Toolbar, __spreadProps(__spreadValues({}, props.richTextEditorToolBarProps), { children: [
635
+ /* @__PURE__ */ jsxs9(MantineRichTextEditor.ControlsGroup, { children: [
636
+ /* @__PURE__ */ jsx17(MantineRichTextEditor.Bold, {}),
637
+ /* @__PURE__ */ jsx17(MantineRichTextEditor.Italic, {}),
638
+ /* @__PURE__ */ jsx17(MantineRichTextEditor.Underline, {}),
639
+ /* @__PURE__ */ jsx17(MantineRichTextEditor.Strikethrough, {}),
640
+ /* @__PURE__ */ jsx17(MantineRichTextEditor.ClearFormatting, {}),
641
+ /* @__PURE__ */ jsx17(MantineRichTextEditor.Highlight, {}),
642
+ /* @__PURE__ */ jsx17(MantineRichTextEditor.Code, {})
610
643
  ] }),
611
- /* @__PURE__ */ jsxs8(MantineRichTextEditor.ControlsGroup, { children: [
612
- /* @__PURE__ */ jsx16(MantineRichTextEditor.H1, {}),
613
- /* @__PURE__ */ jsx16(MantineRichTextEditor.H2, {}),
614
- /* @__PURE__ */ jsx16(MantineRichTextEditor.H3, {}),
615
- /* @__PURE__ */ jsx16(MantineRichTextEditor.H4, {})
644
+ /* @__PURE__ */ jsxs9(MantineRichTextEditor.ControlsGroup, { children: [
645
+ /* @__PURE__ */ jsx17(MantineRichTextEditor.H1, {}),
646
+ /* @__PURE__ */ jsx17(MantineRichTextEditor.H2, {}),
647
+ /* @__PURE__ */ jsx17(MantineRichTextEditor.H3, {}),
648
+ /* @__PURE__ */ jsx17(MantineRichTextEditor.H4, {})
616
649
  ] }),
617
- /* @__PURE__ */ jsxs8(MantineRichTextEditor.ControlsGroup, { children: [
618
- /* @__PURE__ */ jsx16(MantineRichTextEditor.Blockquote, {}),
619
- /* @__PURE__ */ jsx16(MantineRichTextEditor.Hr, {}),
620
- /* @__PURE__ */ jsx16(MantineRichTextEditor.BulletList, {}),
621
- /* @__PURE__ */ jsx16(MantineRichTextEditor.OrderedList, {}),
622
- /* @__PURE__ */ jsx16(MantineRichTextEditor.Subscript, {}),
623
- /* @__PURE__ */ jsx16(MantineRichTextEditor.Superscript, {})
650
+ /* @__PURE__ */ jsxs9(MantineRichTextEditor.ControlsGroup, { children: [
651
+ /* @__PURE__ */ jsx17(MantineRichTextEditor.Blockquote, {}),
652
+ /* @__PURE__ */ jsx17(MantineRichTextEditor.Hr, {}),
653
+ /* @__PURE__ */ jsx17(MantineRichTextEditor.BulletList, {}),
654
+ /* @__PURE__ */ jsx17(MantineRichTextEditor.OrderedList, {}),
655
+ /* @__PURE__ */ jsx17(MantineRichTextEditor.Subscript, {}),
656
+ /* @__PURE__ */ jsx17(MantineRichTextEditor.Superscript, {})
624
657
  ] }),
625
- /* @__PURE__ */ jsxs8(MantineRichTextEditor.ControlsGroup, { children: [
626
- /* @__PURE__ */ jsx16(MantineRichTextEditor.Link, {}),
627
- /* @__PURE__ */ jsx16(MantineRichTextEditor.Unlink, {})
658
+ /* @__PURE__ */ jsxs9(MantineRichTextEditor.ControlsGroup, { children: [
659
+ /* @__PURE__ */ jsx17(MantineRichTextEditor.Link, {}),
660
+ /* @__PURE__ */ jsx17(MantineRichTextEditor.Unlink, {})
628
661
  ] }),
629
- /* @__PURE__ */ jsxs8(MantineRichTextEditor.ControlsGroup, { children: [
630
- /* @__PURE__ */ jsx16(MantineRichTextEditor.AlignLeft, {}),
631
- /* @__PURE__ */ jsx16(MantineRichTextEditor.AlignCenter, {}),
632
- /* @__PURE__ */ jsx16(MantineRichTextEditor.AlignJustify, {}),
633
- /* @__PURE__ */ jsx16(MantineRichTextEditor.AlignRight, {})
662
+ /* @__PURE__ */ jsxs9(MantineRichTextEditor.ControlsGroup, { children: [
663
+ /* @__PURE__ */ jsx17(MantineRichTextEditor.AlignLeft, {}),
664
+ /* @__PURE__ */ jsx17(MantineRichTextEditor.AlignCenter, {}),
665
+ /* @__PURE__ */ jsx17(MantineRichTextEditor.AlignJustify, {}),
666
+ /* @__PURE__ */ jsx17(MantineRichTextEditor.AlignRight, {})
634
667
  ] }),
635
668
  props.extraControlsGroup
636
669
  ] })),
637
- /* @__PURE__ */ jsx16(
670
+ /* @__PURE__ */ jsx17(
638
671
  ScrollArea2.Autosize,
639
672
  __spreadProps(__spreadValues({
640
673
  onMouseDown: () => {
@@ -643,7 +676,7 @@ function MyRichTextEditor(props) {
643
676
  mah: "200",
644
677
  style: { cursor: "text" }
645
678
  }, props.scrollAreaAutosizeProps), {
646
- children: /* @__PURE__ */ jsx16(RichTextEditor.Content, __spreadValues({ mih: "200" }, props.richTextEditorContentProps))
679
+ children: /* @__PURE__ */ jsx17(RichTextEditor.Content, __spreadValues({ mih: "200" }, props.richTextEditorContentProps))
647
680
  })
648
681
  )
649
682
  ] })) }));
@@ -652,7 +685,7 @@ function MyRichTextEditor(props) {
652
685
  // src/core/input/MySelect.tsx
653
686
  import { Loader, Select } from "@mantine/core";
654
687
  import React from "react";
655
- import { jsx as jsx17 } from "react/jsx-runtime";
688
+ import { jsx as jsx18 } from "react/jsx-runtime";
656
689
  function extractTextFromReactNode(node) {
657
690
  if (typeof node === "string" || typeof node === "number") return String(node);
658
691
  if (Array.isArray(node)) return node.map(extractTextFromReactNode).join(" ");
@@ -670,7 +703,7 @@ function MySelect(_a) {
670
703
  const plainTextLabel = extractTextFromReactNode(label).toLowerCase().trim();
671
704
  placeholder = `Ch\u1ECDn ${plainTextLabel}`;
672
705
  }
673
- return /* @__PURE__ */ jsx17(
706
+ return /* @__PURE__ */ jsx18(
674
707
  Select,
675
708
  __spreadValues({
676
709
  searchable: true,
@@ -678,7 +711,7 @@ function MySelect(_a) {
678
711
  placeholder,
679
712
  data: data != null ? data : [],
680
713
  error: isError ? true : void 0,
681
- rightSection: isLoading ? /* @__PURE__ */ jsx17(Loader, { size: "xs" }) : void 0,
714
+ rightSection: isLoading ? /* @__PURE__ */ jsx18(Loader, { size: "xs" }) : void 0,
682
715
  disabled: isLoading || isError,
683
716
  styles: (theme) => ({
684
717
  input: rest.readOnly ? {
@@ -693,8 +726,8 @@ function MySelect(_a) {
693
726
  }
694
727
 
695
728
  // src/core/input/MySelectFromAPI.tsx
696
- import { useCallback, useEffect as useEffect3, useMemo as useMemo3, useRef } from "react";
697
- import { jsx as jsx18 } from "react/jsx-runtime";
729
+ import { useCallback, useEffect as useEffect3, useMemo as useMemo3, useRef as useRef2 } from "react";
730
+ import { jsx as jsx19 } from "react/jsx-runtime";
698
731
  function MySelectFromAPI(_a) {
699
732
  var _b = _a, {
700
733
  queryKey,
@@ -718,7 +751,7 @@ function MySelectFromAPI(_a) {
718
751
  "queryOptions"
719
752
  ]);
720
753
  const query = useMyReactQuery({ queryKey, axiosFn, options: __spreadValues({}, queryOptions) });
721
- const hasAutoSelected = useRef(false);
754
+ const hasAutoSelected = useRef2(false);
722
755
  const getLabel = useCallback(
723
756
  (item) => {
724
757
  var _a2, _b2;
@@ -758,7 +791,7 @@ function MySelectFromAPI(_a) {
758
791
  hasAutoSelected.current = true;
759
792
  }
760
793
  }, [autoSelectFirstItem, query.data, value, getLabel, onChange, setObjectData]);
761
- return /* @__PURE__ */ jsx18(
794
+ return /* @__PURE__ */ jsx19(
762
795
  MySelect,
763
796
  __spreadValues({
764
797
  isLoading: query.isLoading,
@@ -772,10 +805,10 @@ function MySelectFromAPI(_a) {
772
805
 
773
806
  // src/core/input/MyTextInput.tsx
774
807
  import { TextInput } from "@mantine/core";
775
- import { jsx as jsx19 } from "react/jsx-runtime";
808
+ import { jsx as jsx20 } from "react/jsx-runtime";
776
809
  function MyTextInput(_a) {
777
810
  var _b = _a, { label, isPhoneNumber } = _b, rest = __objRest(_b, ["label", "isPhoneNumber"]);
778
- return /* @__PURE__ */ jsx19(
811
+ return /* @__PURE__ */ jsx20(
779
812
  TextInput,
780
813
  __spreadValues({
781
814
  onKeyDown: (e) => {
@@ -813,7 +846,7 @@ function MyTextInput(_a) {
813
846
 
814
847
  // src/core/input/MyWeeklySessionSchedulerPicker.tsx
815
848
  import {
816
- Button as Button5,
849
+ Button as Button6,
817
850
  Center,
818
851
  Divider,
819
852
  Group as Group4,
@@ -824,7 +857,7 @@ import {
824
857
  } from "@mantine/core";
825
858
  import { IconPlus as IconPlus4, IconTrash as IconTrash3 } from "@tabler/icons-react";
826
859
  import { useState } from "react";
827
- import { jsx as jsx20, jsxs as jsxs9 } from "react/jsx-runtime";
860
+ import { jsx as jsx21, jsxs as jsxs10 } from "react/jsx-runtime";
828
861
  function MyWeeklySessionSchedulerPicker({
829
862
  value = [],
830
863
  onChange
@@ -855,8 +888,8 @@ function MyWeeklySessionSchedulerPicker({
855
888
  return acc;
856
889
  }, {});
857
890
  const getLabel = (day) => enum_daysOfWeek[day] || `Day ${day}`;
858
- return /* @__PURE__ */ jsx20(Paper2, { w: "100%", p: "md", children: /* @__PURE__ */ jsxs9(MyFlexColumn, { children: [
859
- /* @__PURE__ */ jsx20(Center, { children: /* @__PURE__ */ jsx20(
891
+ return /* @__PURE__ */ jsx21(Paper2, { w: "100%", p: "md", children: /* @__PURE__ */ jsxs10(MyFlexColumn, { children: [
892
+ /* @__PURE__ */ jsx21(Center, { children: /* @__PURE__ */ jsx21(
860
893
  MyDayOfWeekPicker,
861
894
  {
862
895
  value: selectedDays,
@@ -866,41 +899,41 @@ function MyWeeklySessionSchedulerPicker({
866
899
  }
867
900
  }
868
901
  ) }),
869
- /* @__PURE__ */ jsx20(Divider, { my: "xs" }),
870
- /* @__PURE__ */ jsx20(Center, { children: /* @__PURE__ */ jsx20(ScrollArea3.Autosize, { h: "40vh", children: /* @__PURE__ */ jsx20(MyFlexColumn, { w: { base: "100%", sm: "70%" }, children: selectedDays.map((dayOfWeek) => {
902
+ /* @__PURE__ */ jsx21(Divider, { my: "xs" }),
903
+ /* @__PURE__ */ jsx21(Center, { children: /* @__PURE__ */ jsx21(ScrollArea3.Autosize, { h: "40vh", children: /* @__PURE__ */ jsx21(MyFlexColumn, { w: { base: "100%", sm: "70%" }, children: selectedDays.map((dayOfWeek) => {
871
904
  var _a;
872
- return /* @__PURE__ */ jsxs9(
905
+ return /* @__PURE__ */ jsxs10(
873
906
  Paper2,
874
907
  {
875
908
  w: "100%",
876
909
  p: "md",
877
910
  bg: const_object_colors.mantineBackgroundBlueLight,
878
911
  children: [
879
- /* @__PURE__ */ jsxs9(Group4, { gap: "apart", children: [
880
- /* @__PURE__ */ jsx20(Text5, { w: "70px", fw: 500, children: getLabel(dayOfWeek) }),
881
- /* @__PURE__ */ jsx20(
882
- Button5,
912
+ /* @__PURE__ */ jsxs10(Group4, { gap: "apart", children: [
913
+ /* @__PURE__ */ jsx21(Text5, { w: "70px", fw: 500, children: getLabel(dayOfWeek) }),
914
+ /* @__PURE__ */ jsx21(
915
+ Button6,
883
916
  {
884
917
  color: "teal.5",
885
- leftSection: /* @__PURE__ */ jsx20(IconPlus4, { size: 14 }),
918
+ leftSection: /* @__PURE__ */ jsx21(IconPlus4, { size: 14 }),
886
919
  onClick: () => handleAddSession(dayOfWeek),
887
920
  children: "Th\xEAm bu\u1ED5i"
888
921
  }
889
922
  )
890
923
  ] }),
891
- /* @__PURE__ */ jsx20(Divider, { my: "sm" }),
924
+ /* @__PURE__ */ jsx21(Divider, { my: "sm" }),
892
925
  (_a = grouped[dayOfWeek]) == null ? void 0 : _a.map((item, indexInDay) => {
893
926
  const globalIndex = value.findIndex(
894
927
  (v) => v === item
895
928
  );
896
- return /* @__PURE__ */ jsxs9(
929
+ return /* @__PURE__ */ jsxs10(
897
930
  Group4,
898
931
  {
899
932
  mt: "xs",
900
933
  gap: "xs",
901
934
  align: "flex-end",
902
935
  children: [
903
- /* @__PURE__ */ jsx20(
936
+ /* @__PURE__ */ jsx21(
904
937
  NumberInput,
905
938
  {
906
939
  label: "Ti\u1EBFt b\u1EAFt \u0111\u1EA7u",
@@ -912,7 +945,7 @@ function MyWeeklySessionSchedulerPicker({
912
945
  )
913
946
  }
914
947
  ),
915
- /* @__PURE__ */ jsx20(
948
+ /* @__PURE__ */ jsx21(
916
949
  NumberInput,
917
950
  {
918
951
  label: "S\u1ED1 ti\u1EBFt",
@@ -924,7 +957,7 @@ function MyWeeklySessionSchedulerPicker({
924
957
  )
925
958
  }
926
959
  ),
927
- /* @__PURE__ */ jsx20(
960
+ /* @__PURE__ */ jsx21(
928
961
  NumberInput,
929
962
  {
930
963
  label: "S\u1ED1 ph\xFAt ",
@@ -933,13 +966,13 @@ function MyWeeklySessionSchedulerPicker({
933
966
  value: item.durationMinutes
934
967
  }
935
968
  ),
936
- /* @__PURE__ */ jsx20(
937
- Button5,
969
+ /* @__PURE__ */ jsx21(
970
+ Button6,
938
971
  {
939
972
  variant: "light",
940
973
  color: "red",
941
974
  onClick: () => handleRemove(globalIndex),
942
- leftSection: /* @__PURE__ */ jsx20(IconTrash3, { size: 14 }),
975
+ leftSection: /* @__PURE__ */ jsx21(IconTrash3, { size: 14 }),
943
976
  children: "X\xF3a bu\u1ED5i"
944
977
  }
945
978
  )
@@ -958,10 +991,10 @@ function MyWeeklySessionSchedulerPicker({
958
991
 
959
992
  // src/core/layout/MyFlexEnd.tsx
960
993
  import { Group as Group5 } from "@mantine/core";
961
- import { jsx as jsx21 } from "react/jsx-runtime";
994
+ import { jsx as jsx22 } from "react/jsx-runtime";
962
995
  function MyFlexEnd2(_a) {
963
996
  var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
964
- return /* @__PURE__ */ jsx21(Group5, __spreadProps(__spreadValues({ justify: "end", mt: "md" }, rest), { children }));
997
+ return /* @__PURE__ */ jsx22(Group5, __spreadProps(__spreadValues({ justify: "end", mt: "md" }, rest), { children }));
965
998
  }
966
999
 
967
1000
  export {
@@ -971,6 +1004,7 @@ export {
971
1004
  MyButtonCreateUpdate,
972
1005
  MyButtonModal,
973
1006
  MyButtonModalCreateUpdate,
1007
+ MyButtonPrintPDF,
974
1008
  MyDataTableSelectOne,
975
1009
  MyFlexIconTitle,
976
1010
  MyInfoBox,
@@ -65,9 +65,9 @@ import {
65
65
  useS_BasicAppShell,
66
66
  useS_ButtonImport,
67
67
  utils_layout_getItemsWithoutLinks
68
- } from "../chunk-YC5RSWLH.mjs";
69
- import "../chunk-5U2JSHSJ.mjs";
68
+ } from "../chunk-BYWT26DO.mjs";
70
69
  import "../chunk-U62R2QKJ.mjs";
70
+ import "../chunk-5U2JSHSJ.mjs";
71
71
  import "../chunk-OMJJAHOC.mjs";
72
72
  import "../chunk-KFSAV44B.mjs";
73
73
  import "../chunk-7ZCOFATU.mjs";
@@ -6,6 +6,7 @@ import { M as MyApiResponse } from '../createBaseApi-D9OK2lA_.mjs';
6
6
  import { AxiosResponse } from 'axios';
7
7
  import { UseFormReturnType } from '@mantine/form';
8
8
  import { useDisclosure } from '@mantine/hooks';
9
+ import { UseReactToPrintOptions } from 'react-to-print';
9
10
  import { UseQueryResult, QueryKey, UseQueryOptions } from '@tanstack/react-query';
10
11
  import { MRT_RowData, MRT_ColumnDef } from 'mantine-react-table';
11
12
  import { RichTextEditorProps, RichTextEditorToolbarProps, RichTextEditorContentProps } from '@mantine/tiptap';
@@ -66,6 +67,14 @@ interface MyButtonModalCreateUpdateProps extends Omit<MyButtonModalProps, "discl
66
67
  }
67
68
  declare function MyButtonModalCreateUpdate(props?: MyButtonModalCreateUpdateProps): react_jsx_runtime.JSX.Element;
68
69
 
70
+ interface MyButtonPrintPDFProps {
71
+ buttonProps?: ButtonProps;
72
+ children?: ReactNode;
73
+ autoPadding?: boolean;
74
+ useReactToPrintProps?: UseReactToPrintOptions;
75
+ }
76
+ declare function MyButtonPrintPDF({ children, autoPadding, buttonProps, useReactToPrintProps, }: MyButtonPrintPDFProps): react_jsx_runtime.JSX.Element;
77
+
69
78
  declare function MyDataTableSelectOne<TData extends MRT_RowData>({ columns, queryResult, idSelection, setIdSelection }: {
70
79
  columns: MRT_ColumnDef<TData>[];
71
80
  queryResult: UseQueryResult<TData[], Error>;
@@ -180,4 +189,4 @@ interface MyFlexEndProps extends GroupProps {
180
189
  }
181
190
  declare function MyFlexEnd({ children, ...rest }: MyFlexEndProps): react_jsx_runtime.JSX.Element;
182
191
 
183
- export { type IWeeklySession, MyActionIcon, type MyActionIconProps, MyButton, MyButtonCreateUpdate, type MyButtonExportStructureProps, MyButtonModal, MyButtonModalCreateUpdate, type MyButtonModalProps, type MyButtonProps$1 as MyButtonProps, MyDataTableSelectOne, MyDayOfWeekPicker, MyFlexColumn, MyFlexEnd, MyFlexIconTitle, MyInfoBox, type MyInfoBoxItem, type MyInfoBoxProps, MyLabelValueRow, MyRichTextEditor, MySelect, MySelectFromAPI, type MySelectProps, MyStatsCard, MyTextInput, MyWeeklySessionSchedulerPicker, type WeeklySessionSchedulerProps };
192
+ export { type IWeeklySession, MyActionIcon, type MyActionIconProps, MyButton, MyButtonCreateUpdate, type MyButtonExportStructureProps, MyButtonModal, MyButtonModalCreateUpdate, type MyButtonModalProps, MyButtonPrintPDF, type MyButtonProps$1 as MyButtonProps, MyDataTableSelectOne, MyDayOfWeekPicker, MyFlexColumn, MyFlexEnd, MyFlexIconTitle, MyInfoBox, type MyInfoBoxItem, type MyInfoBoxProps, MyLabelValueRow, MyRichTextEditor, MySelect, MySelectFromAPI, type MySelectProps, MyStatsCard, MyTextInput, MyWeeklySessionSchedulerPicker, type WeeklySessionSchedulerProps };
@@ -4,6 +4,7 @@ import {
4
4
  MyButtonCreateUpdate,
5
5
  MyButtonModal,
6
6
  MyButtonModalCreateUpdate,
7
+ MyButtonPrintPDF,
7
8
  MyDataTableSelectOne,
8
9
  MyDayOfWeekPicker,
9
10
  MyFlexColumn,
@@ -17,13 +18,13 @@ import {
17
18
  MyStatsCard,
18
19
  MyTextInput,
19
20
  MyWeeklySessionSchedulerPicker
20
- } from "../chunk-TQSJUC2O.mjs";
21
- import "../chunk-YC5RSWLH.mjs";
22
- import "../chunk-5U2JSHSJ.mjs";
21
+ } from "../chunk-WFKVWQCH.mjs";
22
+ import "../chunk-BYWT26DO.mjs";
23
23
  import "../chunk-U62R2QKJ.mjs";
24
- import "../chunk-K6S7R6LU.mjs";
24
+ import "../chunk-5U2JSHSJ.mjs";
25
25
  import "../chunk-GFEMKKFH.mjs";
26
26
  import "../chunk-OMJJAHOC.mjs";
27
+ import "../chunk-K6S7R6LU.mjs";
27
28
  import "../chunk-KFSAV44B.mjs";
28
29
  import "../chunk-7ZCOFATU.mjs";
29
30
  import "../chunk-FWCSY2DS.mjs";
@@ -33,6 +34,7 @@ export {
33
34
  MyButtonCreateUpdate,
34
35
  MyButtonModal,
35
36
  MyButtonModalCreateUpdate,
37
+ MyButtonPrintPDF,
36
38
  MyDataTableSelectOne,
37
39
  MyDayOfWeekPicker,
38
40
  MyFlexColumn,
@@ -15,7 +15,7 @@ import {
15
15
  MyButton as MyButton2,
16
16
  MyDataTableSelectOne,
17
17
  MyTextInput as MyTextInput2
18
- } from "../chunk-TQSJUC2O.mjs";
18
+ } from "../chunk-WFKVWQCH.mjs";
19
19
  import {
20
20
  F_authenticate_Logout,
21
21
  MyActionIconDelete,
@@ -41,21 +41,21 @@ import {
41
41
  groupToTwoLevels,
42
42
  useS_authenticate,
43
43
  utils_layout_getItemsWithoutLinks
44
- } from "../chunk-YC5RSWLH.mjs";
45
- import "../chunk-5U2JSHSJ.mjs";
44
+ } from "../chunk-BYWT26DO.mjs";
46
45
  import {
47
46
  createGenericStore
48
47
  } from "../chunk-U62R2QKJ.mjs";
49
- import {
50
- enum_emailConfigModule
51
- } from "../chunk-VH4ZAD6M.mjs";
52
- import "../chunk-K6S7R6LU.mjs";
48
+ import "../chunk-5U2JSHSJ.mjs";
53
49
  import {
54
50
  const_object_documentTypes
55
51
  } from "../chunk-GFEMKKFH.mjs";
56
52
  import {
57
53
  const_object_colors
58
54
  } from "../chunk-OMJJAHOC.mjs";
55
+ import {
56
+ enum_emailConfigModule
57
+ } from "../chunk-VH4ZAD6M.mjs";
58
+ import "../chunk-K6S7R6LU.mjs";
59
59
  import {
60
60
  baseAxios_default,
61
61
  createBaseApi,
package/package.json CHANGED
@@ -42,7 +42,7 @@
42
42
  "types": "./dist/columns/index.d.mts"
43
43
  }
44
44
  },
45
- "version": "0.1.486",
45
+ "version": "0.1.488",
46
46
  "private": false,
47
47
  "files": [
48
48
  "dist"
@@ -1,9 +1,9 @@
1
- import {
2
- utils_pdf_download
3
- } from "./chunk-5U2JSHSJ.mjs";
4
1
  import {
5
2
  createGenericStore
6
3
  } from "./chunk-U62R2QKJ.mjs";
4
+ import {
5
+ utils_pdf_download
6
+ } from "./chunk-5U2JSHSJ.mjs";
7
7
  import {
8
8
  const_object_colors
9
9
  } from "./chunk-OMJJAHOC.mjs";