aq-fe-framework 0.1.451 → 0.1.453

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,7 +2,7 @@ import {
2
2
  MyDataTable,
3
3
  MyFlexColumn,
4
4
  MyFlexRow
5
- } from "./chunk-RZBHPPQT.mjs";
5
+ } from "./chunk-562G3GRP.mjs";
6
6
  import {
7
7
  const_object_colors
8
8
  } from "./chunk-OMJJAHOC.mjs";
@@ -319,9 +319,21 @@ function MyButtonCreateUpdate({
319
319
  ] });
320
320
  }
321
321
 
322
+ // src/core/button/MyButtonExportStructure.tsx
323
+ import { Button as Button4 } from "@mantine/core";
324
+ import ExcelJS from "exceljs";
325
+ import { saveAs } from "file-saver";
326
+ import { jsx as jsx5 } from "react/jsx-runtime";
327
+
328
+ // src/core/button/MyButtonImport.tsx
329
+ import { Button as Button6, FileInput } from "@mantine/core";
330
+ import { useDisclosure as useDisclosure2 } from "@mantine/hooks";
331
+ import { IconFileImport as IconFileImport3 } from "@tabler/icons-react";
332
+ import { useMemo } from "react";
333
+
322
334
  // src/core/button/MyButtonModal.tsx
323
- import { Button as Button4, Modal as Modal2 } from "@mantine/core";
324
- import { Fragment as Fragment2, jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
335
+ import { Button as Button5, Modal as Modal2 } from "@mantine/core";
336
+ import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
325
337
  function MyButtonModal({
326
338
  disclosure,
327
339
  children,
@@ -329,34 +341,37 @@ function MyButtonModal({
329
341
  modalProps
330
342
  }) {
331
343
  return /* @__PURE__ */ jsxs2(Fragment2, { children: [
332
- /* @__PURE__ */ jsx5(Button4, __spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, color: "indigo" }, buttonProps)),
333
- /* @__PURE__ */ jsx5(
344
+ /* @__PURE__ */ jsx6(Button5, __spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, color: "indigo" }, buttonProps)),
345
+ /* @__PURE__ */ jsx6(
334
346
  Modal2,
335
347
  __spreadProps(__spreadValues({
336
348
  opened: disclosure == null ? void 0 : disclosure[0],
337
349
  onClose: disclosure[1].close
338
350
  }, modalProps), {
339
- children: /* @__PURE__ */ jsx5(MyFlexColumn, { children })
351
+ children: /* @__PURE__ */ jsx6(MyFlexColumn, { children })
340
352
  })
341
353
  )
342
354
  ] });
343
355
  }
344
356
 
357
+ // src/core/button/MyButtonImport.tsx
358
+ import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
359
+
345
360
  // src/core/dataDisplay/MyDataTableSelectOne.tsx
346
- import { useEffect, useMemo } from "react";
347
- import { jsx as jsx6 } from "react/jsx-runtime";
361
+ import { useEffect, useMemo as useMemo2 } from "react";
362
+ import { jsx as jsx8 } from "react/jsx-runtime";
348
363
  function MyDataTableSelectOne({
349
364
  columns,
350
365
  queryResult,
351
366
  idSelection,
352
367
  setIdSelection
353
368
  }) {
354
- const columnsState = useMemo(() => columns, []);
369
+ const columnsState = useMemo2(() => columns, []);
355
370
  useEffect(() => {
356
371
  if (!queryResult.data) return;
357
372
  setIdSelection(queryResult.data[0].id);
358
373
  }, [queryResult.data]);
359
- return /* @__PURE__ */ jsx6(
374
+ return /* @__PURE__ */ jsx8(
360
375
  MyDataTable,
361
376
  {
362
377
  columns: columnsState,
@@ -382,20 +397,20 @@ function MyDataTableSelectOne({
382
397
 
383
398
  // src/core/dataDisplay/MyInfoBox.tsx
384
399
  import { Group, Paper, Stack, Text } from "@mantine/core";
385
- import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
400
+ import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
386
401
  function MyInfoBox({ title, data, paperProps }) {
387
- return /* @__PURE__ */ jsx7(Paper, __spreadProps(__spreadValues({ withBorder: true, shadow: "xs", radius: "md", p: "md", bg: const_object_colors.mantineBackgroundBlueLight }, paperProps), { children: /* @__PURE__ */ jsxs3(Stack, { children: [
388
- title && /* @__PURE__ */ jsx7(Text, { fw: 600, size: "sm", children: title }),
389
- data.map((item, index) => /* @__PURE__ */ jsxs3(Group, { justify: "space-between", children: [
390
- /* @__PURE__ */ jsx7(Text, { size: "sm", fw: 500, c: "dimmed", children: item.label }),
391
- /* @__PURE__ */ jsx7(Text, { size: "sm", fw: 500, children: item.value })
402
+ return /* @__PURE__ */ jsx9(Paper, __spreadProps(__spreadValues({ withBorder: true, shadow: "xs", radius: "md", p: "md", bg: const_object_colors.mantineBackgroundBlueLight }, paperProps), { children: /* @__PURE__ */ jsxs4(Stack, { children: [
403
+ title && /* @__PURE__ */ jsx9(Text, { fw: 600, size: "sm", children: title }),
404
+ data.map((item, index) => /* @__PURE__ */ jsxs4(Group, { justify: "space-between", children: [
405
+ /* @__PURE__ */ jsx9(Text, { size: "sm", fw: 500, c: "dimmed", children: item.label }),
406
+ /* @__PURE__ */ jsx9(Text, { size: "sm", fw: 500, children: item.value })
392
407
  ] }, index))
393
408
  ] }) }));
394
409
  }
395
410
 
396
411
  // src/core/dataDisplay/MyLabelValueRow.tsx
397
412
  import { Group as Group2, Text as Text2 } from "@mantine/core";
398
- import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
413
+ import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
399
414
  function MyLabelValueRow({
400
415
  label,
401
416
  value,
@@ -403,18 +418,18 @@ function MyLabelValueRow({
403
418
  valueProps,
404
419
  groupProps
405
420
  }) {
406
- return /* @__PURE__ */ jsxs4(Group2, __spreadProps(__spreadValues({ gap: 5, wrap: "nowrap" }, groupProps), { children: [
407
- /* @__PURE__ */ jsxs4(Text2, __spreadProps(__spreadValues({ fw: 600 }, labelProps), { children: [
421
+ return /* @__PURE__ */ jsxs5(Group2, __spreadProps(__spreadValues({ gap: 5, wrap: "nowrap" }, groupProps), { children: [
422
+ /* @__PURE__ */ jsxs5(Text2, __spreadProps(__spreadValues({ fw: 600 }, labelProps), { children: [
408
423
  label,
409
424
  ":"
410
425
  ] })),
411
- /* @__PURE__ */ jsx8(Text2, __spreadProps(__spreadValues({}, valueProps), { children: value }))
426
+ /* @__PURE__ */ jsx10(Text2, __spreadProps(__spreadValues({}, valueProps), { children: value }))
412
427
  ] }));
413
428
  }
414
429
 
415
430
  // src/core/dataDisplay/MyStatsCartd.tsx
416
431
  import { Box, Card, ThemeIcon } from "@mantine/core";
417
- import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
432
+ import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
418
433
  function MyStatsCard({
419
434
  title,
420
435
  value,
@@ -423,22 +438,22 @@ function MyStatsCard({
423
438
  color,
424
439
  themeIconProps
425
440
  }) {
426
- return /* @__PURE__ */ jsxs5(Card, { children: [
427
- /* @__PURE__ */ jsx9("div", { className: `absolute inset-0 bg-gradient-to-br ${color} opacity-5` }),
428
- /* @__PURE__ */ jsx9(Box, { className: "p-6", children: /* @__PURE__ */ jsxs5("div", { className: "flex items-center justify-between", children: [
429
- /* @__PURE__ */ jsxs5("div", { children: [
430
- /* @__PURE__ */ jsx9("p", { className: "text-sm font-medium text-muted-foreground", children: title }),
431
- /* @__PURE__ */ jsx9("p", { className: "text-3xl font-bold", children: value }),
432
- /* @__PURE__ */ jsx9("p", { className: "text-xs text-muted-foreground mt-1", children: subtitle })
441
+ return /* @__PURE__ */ jsxs6(Card, { children: [
442
+ /* @__PURE__ */ jsx11("div", { className: `absolute inset-0 bg-gradient-to-br ${color} opacity-5` }),
443
+ /* @__PURE__ */ jsx11(Box, { className: "p-6", children: /* @__PURE__ */ jsxs6("div", { className: "flex items-center justify-between", children: [
444
+ /* @__PURE__ */ jsxs6("div", { children: [
445
+ /* @__PURE__ */ jsx11("p", { className: "text-sm font-medium text-muted-foreground", children: title }),
446
+ /* @__PURE__ */ jsx11("p", { className: "text-3xl font-bold", children: value }),
447
+ /* @__PURE__ */ jsx11("p", { className: "text-xs text-muted-foreground mt-1", children: subtitle })
433
448
  ] }),
434
- /* @__PURE__ */ jsx9(ThemeIcon, __spreadProps(__spreadValues({ size: "xl", radius: "xl" }, themeIconProps), { children: icon }))
449
+ /* @__PURE__ */ jsx11(ThemeIcon, __spreadProps(__spreadValues({ size: "xl", radius: "xl" }, themeIconProps), { children: icon }))
435
450
  ] }) })
436
451
  ] });
437
452
  }
438
453
 
439
454
  // src/core/input/MyDayOfWeekPicker.tsx
440
455
  import { Badge, Group as Group3 } from "@mantine/core";
441
- import { jsx as jsx10 } from "react/jsx-runtime";
456
+ import { jsx as jsx12 } from "react/jsx-runtime";
442
457
  var days = Object.entries(enum_daysOfWeek).filter(([key]) => isNaN(Number(key))).map(([label, value]) => ({ label, value }));
443
458
  function MyDayOfWeekPicker({ value = [], onChange }) {
444
459
  const toggle = (val) => {
@@ -446,7 +461,7 @@ function MyDayOfWeekPicker({ value = [], onChange }) {
446
461
  const newValue = value.includes(val) ? value.filter((v) => v !== val) : [...value, val].sort((a, b) => a - b);
447
462
  onChange(newValue);
448
463
  };
449
- return /* @__PURE__ */ jsx10(MyFlexRow, { align: "center", children: /* @__PURE__ */ jsx10(Group3, { gap: "xs", children: days.map((d) => /* @__PURE__ */ jsx10(
464
+ return /* @__PURE__ */ jsx12(MyFlexRow, { align: "center", children: /* @__PURE__ */ jsx12(Group3, { gap: "xs", children: days.map((d) => /* @__PURE__ */ jsx12(
450
465
  Badge,
451
466
  {
452
467
  variant: value.includes(d.value) ? "filled" : "outline",
@@ -474,7 +489,7 @@ import Underline from "@tiptap/extension-underline";
474
489
  import { useEditor } from "@tiptap/react";
475
490
  import StarterKit from "@tiptap/starter-kit";
476
491
  import { useEffect as useEffect2 } from "react";
477
- import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
492
+ import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
478
493
  function MyRichTextEditor(props) {
479
494
  const editor = useEditor({
480
495
  extensions: [
@@ -558,44 +573,44 @@ function MyRichTextEditor(props) {
558
573
  editor.commands.setContent(props.value || "", false);
559
574
  }
560
575
  }, [props.value, editor]);
561
- return /* @__PURE__ */ jsx11(Input.Wrapper, __spreadProps(__spreadValues({}, props.inputWrapperProps), { children: /* @__PURE__ */ jsxs6(MantineRichTextEditor, __spreadProps(__spreadValues({ editor }, props.richTextEditorProps), { children: [
562
- /* @__PURE__ */ jsxs6(MantineRichTextEditor.Toolbar, __spreadProps(__spreadValues({}, props.richTextEditorToolBarProps), { children: [
563
- /* @__PURE__ */ jsxs6(MantineRichTextEditor.ControlsGroup, { children: [
564
- /* @__PURE__ */ jsx11(MantineRichTextEditor.Bold, {}),
565
- /* @__PURE__ */ jsx11(MantineRichTextEditor.Italic, {}),
566
- /* @__PURE__ */ jsx11(MantineRichTextEditor.Underline, {}),
567
- /* @__PURE__ */ jsx11(MantineRichTextEditor.Strikethrough, {}),
568
- /* @__PURE__ */ jsx11(MantineRichTextEditor.ClearFormatting, {}),
569
- /* @__PURE__ */ jsx11(MantineRichTextEditor.Highlight, {}),
570
- /* @__PURE__ */ jsx11(MantineRichTextEditor.Code, {})
576
+ return /* @__PURE__ */ jsx13(Input.Wrapper, __spreadProps(__spreadValues({}, props.inputWrapperProps), { children: /* @__PURE__ */ jsxs7(MantineRichTextEditor, __spreadProps(__spreadValues({ editor }, props.richTextEditorProps), { children: [
577
+ /* @__PURE__ */ jsxs7(MantineRichTextEditor.Toolbar, __spreadProps(__spreadValues({}, props.richTextEditorToolBarProps), { children: [
578
+ /* @__PURE__ */ jsxs7(MantineRichTextEditor.ControlsGroup, { children: [
579
+ /* @__PURE__ */ jsx13(MantineRichTextEditor.Bold, {}),
580
+ /* @__PURE__ */ jsx13(MantineRichTextEditor.Italic, {}),
581
+ /* @__PURE__ */ jsx13(MantineRichTextEditor.Underline, {}),
582
+ /* @__PURE__ */ jsx13(MantineRichTextEditor.Strikethrough, {}),
583
+ /* @__PURE__ */ jsx13(MantineRichTextEditor.ClearFormatting, {}),
584
+ /* @__PURE__ */ jsx13(MantineRichTextEditor.Highlight, {}),
585
+ /* @__PURE__ */ jsx13(MantineRichTextEditor.Code, {})
571
586
  ] }),
572
- /* @__PURE__ */ jsxs6(MantineRichTextEditor.ControlsGroup, { children: [
573
- /* @__PURE__ */ jsx11(MantineRichTextEditor.H1, {}),
574
- /* @__PURE__ */ jsx11(MantineRichTextEditor.H2, {}),
575
- /* @__PURE__ */ jsx11(MantineRichTextEditor.H3, {}),
576
- /* @__PURE__ */ jsx11(MantineRichTextEditor.H4, {})
587
+ /* @__PURE__ */ jsxs7(MantineRichTextEditor.ControlsGroup, { children: [
588
+ /* @__PURE__ */ jsx13(MantineRichTextEditor.H1, {}),
589
+ /* @__PURE__ */ jsx13(MantineRichTextEditor.H2, {}),
590
+ /* @__PURE__ */ jsx13(MantineRichTextEditor.H3, {}),
591
+ /* @__PURE__ */ jsx13(MantineRichTextEditor.H4, {})
577
592
  ] }),
578
- /* @__PURE__ */ jsxs6(MantineRichTextEditor.ControlsGroup, { children: [
579
- /* @__PURE__ */ jsx11(MantineRichTextEditor.Blockquote, {}),
580
- /* @__PURE__ */ jsx11(MantineRichTextEditor.Hr, {}),
581
- /* @__PURE__ */ jsx11(MantineRichTextEditor.BulletList, {}),
582
- /* @__PURE__ */ jsx11(MantineRichTextEditor.OrderedList, {}),
583
- /* @__PURE__ */ jsx11(MantineRichTextEditor.Subscript, {}),
584
- /* @__PURE__ */ jsx11(MantineRichTextEditor.Superscript, {})
593
+ /* @__PURE__ */ jsxs7(MantineRichTextEditor.ControlsGroup, { children: [
594
+ /* @__PURE__ */ jsx13(MantineRichTextEditor.Blockquote, {}),
595
+ /* @__PURE__ */ jsx13(MantineRichTextEditor.Hr, {}),
596
+ /* @__PURE__ */ jsx13(MantineRichTextEditor.BulletList, {}),
597
+ /* @__PURE__ */ jsx13(MantineRichTextEditor.OrderedList, {}),
598
+ /* @__PURE__ */ jsx13(MantineRichTextEditor.Subscript, {}),
599
+ /* @__PURE__ */ jsx13(MantineRichTextEditor.Superscript, {})
585
600
  ] }),
586
- /* @__PURE__ */ jsxs6(MantineRichTextEditor.ControlsGroup, { children: [
587
- /* @__PURE__ */ jsx11(MantineRichTextEditor.Link, {}),
588
- /* @__PURE__ */ jsx11(MantineRichTextEditor.Unlink, {})
601
+ /* @__PURE__ */ jsxs7(MantineRichTextEditor.ControlsGroup, { children: [
602
+ /* @__PURE__ */ jsx13(MantineRichTextEditor.Link, {}),
603
+ /* @__PURE__ */ jsx13(MantineRichTextEditor.Unlink, {})
589
604
  ] }),
590
- /* @__PURE__ */ jsxs6(MantineRichTextEditor.ControlsGroup, { children: [
591
- /* @__PURE__ */ jsx11(MantineRichTextEditor.AlignLeft, {}),
592
- /* @__PURE__ */ jsx11(MantineRichTextEditor.AlignCenter, {}),
593
- /* @__PURE__ */ jsx11(MantineRichTextEditor.AlignJustify, {}),
594
- /* @__PURE__ */ jsx11(MantineRichTextEditor.AlignRight, {})
605
+ /* @__PURE__ */ jsxs7(MantineRichTextEditor.ControlsGroup, { children: [
606
+ /* @__PURE__ */ jsx13(MantineRichTextEditor.AlignLeft, {}),
607
+ /* @__PURE__ */ jsx13(MantineRichTextEditor.AlignCenter, {}),
608
+ /* @__PURE__ */ jsx13(MantineRichTextEditor.AlignJustify, {}),
609
+ /* @__PURE__ */ jsx13(MantineRichTextEditor.AlignRight, {})
595
610
  ] }),
596
611
  props.extraControlsGroup
597
612
  ] })),
598
- /* @__PURE__ */ jsx11(
613
+ /* @__PURE__ */ jsx13(
599
614
  ScrollArea2.Autosize,
600
615
  __spreadProps(__spreadValues({
601
616
  onMouseDown: () => {
@@ -604,7 +619,7 @@ function MyRichTextEditor(props) {
604
619
  mah: "200",
605
620
  style: { cursor: "text" }
606
621
  }, props.scrollAreaAutosizeProps), {
607
- children: /* @__PURE__ */ jsx11(RichTextEditor.Content, __spreadValues({ mih: "200" }, props.richTextEditorContentProps))
622
+ children: /* @__PURE__ */ jsx13(RichTextEditor.Content, __spreadValues({ mih: "200" }, props.richTextEditorContentProps))
608
623
  })
609
624
  )
610
625
  ] })) }));
@@ -613,7 +628,7 @@ function MyRichTextEditor(props) {
613
628
  // src/core/input/MySelect.tsx
614
629
  import { Loader, Select } from "@mantine/core";
615
630
  import React from "react";
616
- import { jsx as jsx12 } from "react/jsx-runtime";
631
+ import { jsx as jsx14 } from "react/jsx-runtime";
617
632
  function extractTextFromReactNode(node) {
618
633
  if (typeof node === "string" || typeof node === "number") return String(node);
619
634
  if (Array.isArray(node)) return node.map(extractTextFromReactNode).join(" ");
@@ -628,10 +643,10 @@ function MySelect(_a) {
628
643
  } else if (isLoading) {
629
644
  placeholder = "\u0110ang t\u1EA3i...";
630
645
  } else if (label) {
631
- const plainTextLabel = extractTextFromReactNode(label).toLowerCase();
646
+ const plainTextLabel = extractTextFromReactNode(label).toLowerCase().trim();
632
647
  placeholder = `Ch\u1ECDn ${plainTextLabel}`;
633
648
  }
634
- return /* @__PURE__ */ jsx12(
649
+ return /* @__PURE__ */ jsx14(
635
650
  Select,
636
651
  __spreadValues({
637
652
  searchable: true,
@@ -639,7 +654,7 @@ function MySelect(_a) {
639
654
  placeholder,
640
655
  data: data != null ? data : [],
641
656
  error: isError ? true : void 0,
642
- rightSection: isLoading ? /* @__PURE__ */ jsx12(Loader, { size: "xs" }) : void 0,
657
+ rightSection: isLoading ? /* @__PURE__ */ jsx14(Loader, { size: "xs" }) : void 0,
643
658
  disabled: isLoading || isError,
644
659
  styles: (theme) => ({
645
660
  input: rest.readOnly ? {
@@ -654,8 +669,8 @@ function MySelect(_a) {
654
669
  }
655
670
 
656
671
  // src/core/input/MySelectFromAPI.tsx
657
- import { useCallback, useEffect as useEffect3, useMemo as useMemo2, useRef } from "react";
658
- import { jsx as jsx13 } from "react/jsx-runtime";
672
+ import { useCallback, useEffect as useEffect3, useMemo as useMemo3, useRef } from "react";
673
+ import { jsx as jsx15 } from "react/jsx-runtime";
659
674
  function MySelectFromAPI(_a) {
660
675
  var _b = _a, {
661
676
  queryKey,
@@ -687,7 +702,7 @@ function MySelectFromAPI(_a) {
687
702
  },
688
703
  [getOptionLabel, labelWithCode]
689
704
  );
690
- const options = useMemo2(() => {
705
+ const options = useMemo3(() => {
691
706
  var _a2, _b2;
692
707
  return (_b2 = (_a2 = query.data) == null ? void 0 : _a2.map((item) => {
693
708
  var _a3, _b3;
@@ -719,7 +734,7 @@ function MySelectFromAPI(_a) {
719
734
  hasAutoSelected.current = true;
720
735
  }
721
736
  }, [autoSelectFirstItem, query.data, value, getLabel, onChange, setObjectData]);
722
- return /* @__PURE__ */ jsx13(
737
+ return /* @__PURE__ */ jsx15(
723
738
  MySelect,
724
739
  __spreadValues({
725
740
  isLoading: query.isLoading,
@@ -733,10 +748,10 @@ function MySelectFromAPI(_a) {
733
748
 
734
749
  // src/core/input/MyTextInput.tsx
735
750
  import { TextInput } from "@mantine/core";
736
- import { jsx as jsx14 } from "react/jsx-runtime";
751
+ import { jsx as jsx16 } from "react/jsx-runtime";
737
752
  function MyTextInput(_a) {
738
753
  var _b = _a, { label, isPhoneNumber } = _b, rest = __objRest(_b, ["label", "isPhoneNumber"]);
739
- return /* @__PURE__ */ jsx14(
754
+ return /* @__PURE__ */ jsx16(
740
755
  TextInput,
741
756
  __spreadValues({
742
757
  onKeyDown: (e) => {
@@ -774,7 +789,7 @@ function MyTextInput(_a) {
774
789
 
775
790
  // src/core/input/MyWeeklySessionSchedulerPicker.tsx
776
791
  import {
777
- Button as Button5,
792
+ Button as Button7,
778
793
  Center,
779
794
  Divider,
780
795
  Group as Group4,
@@ -785,7 +800,7 @@ import {
785
800
  } from "@mantine/core";
786
801
  import { IconPlus as IconPlus4, IconTrash as IconTrash3 } from "@tabler/icons-react";
787
802
  import { useState } from "react";
788
- import { jsx as jsx15, jsxs as jsxs7 } from "react/jsx-runtime";
803
+ import { jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
789
804
  function MyWeeklySessionSchedulerPicker({
790
805
  value = [],
791
806
  onChange
@@ -816,8 +831,8 @@ function MyWeeklySessionSchedulerPicker({
816
831
  return acc;
817
832
  }, {});
818
833
  const getLabel = (day) => enum_daysOfWeek[day] || `Day ${day}`;
819
- return /* @__PURE__ */ jsx15(Paper2, { w: "100%", p: "md", children: /* @__PURE__ */ jsxs7(MyFlexColumn, { children: [
820
- /* @__PURE__ */ jsx15(Center, { children: /* @__PURE__ */ jsx15(
834
+ return /* @__PURE__ */ jsx17(Paper2, { w: "100%", p: "md", children: /* @__PURE__ */ jsxs8(MyFlexColumn, { children: [
835
+ /* @__PURE__ */ jsx17(Center, { children: /* @__PURE__ */ jsx17(
821
836
  MyDayOfWeekPicker,
822
837
  {
823
838
  value: selectedDays,
@@ -827,41 +842,41 @@ function MyWeeklySessionSchedulerPicker({
827
842
  }
828
843
  }
829
844
  ) }),
830
- /* @__PURE__ */ jsx15(Divider, { my: "xs" }),
831
- /* @__PURE__ */ jsx15(Center, { children: /* @__PURE__ */ jsx15(ScrollArea3.Autosize, { h: "40vh", children: /* @__PURE__ */ jsx15(MyFlexColumn, { w: { base: "100%", sm: "70%" }, children: selectedDays.map((dayOfWeek) => {
845
+ /* @__PURE__ */ jsx17(Divider, { my: "xs" }),
846
+ /* @__PURE__ */ jsx17(Center, { children: /* @__PURE__ */ jsx17(ScrollArea3.Autosize, { h: "40vh", children: /* @__PURE__ */ jsx17(MyFlexColumn, { w: { base: "100%", sm: "70%" }, children: selectedDays.map((dayOfWeek) => {
832
847
  var _a;
833
- return /* @__PURE__ */ jsxs7(
848
+ return /* @__PURE__ */ jsxs8(
834
849
  Paper2,
835
850
  {
836
851
  w: "100%",
837
852
  p: "md",
838
853
  bg: const_object_colors.mantineBackgroundBlueLight,
839
854
  children: [
840
- /* @__PURE__ */ jsxs7(Group4, { gap: "apart", children: [
841
- /* @__PURE__ */ jsx15(Text4, { w: "70px", fw: 500, children: getLabel(dayOfWeek) }),
842
- /* @__PURE__ */ jsx15(
843
- Button5,
855
+ /* @__PURE__ */ jsxs8(Group4, { gap: "apart", children: [
856
+ /* @__PURE__ */ jsx17(Text4, { w: "70px", fw: 500, children: getLabel(dayOfWeek) }),
857
+ /* @__PURE__ */ jsx17(
858
+ Button7,
844
859
  {
845
860
  color: "teal.5",
846
- leftSection: /* @__PURE__ */ jsx15(IconPlus4, { size: 14 }),
861
+ leftSection: /* @__PURE__ */ jsx17(IconPlus4, { size: 14 }),
847
862
  onClick: () => handleAddSession(dayOfWeek),
848
863
  children: "Th\xEAm bu\u1ED5i"
849
864
  }
850
865
  )
851
866
  ] }),
852
- /* @__PURE__ */ jsx15(Divider, { my: "sm" }),
867
+ /* @__PURE__ */ jsx17(Divider, { my: "sm" }),
853
868
  (_a = grouped[dayOfWeek]) == null ? void 0 : _a.map((item, indexInDay) => {
854
869
  const globalIndex = value.findIndex(
855
870
  (v) => v === item
856
871
  );
857
- return /* @__PURE__ */ jsxs7(
872
+ return /* @__PURE__ */ jsxs8(
858
873
  Group4,
859
874
  {
860
875
  mt: "xs",
861
876
  gap: "xs",
862
877
  align: "flex-end",
863
878
  children: [
864
- /* @__PURE__ */ jsx15(
879
+ /* @__PURE__ */ jsx17(
865
880
  NumberInput,
866
881
  {
867
882
  label: "Ti\u1EBFt b\u1EAFt \u0111\u1EA7u",
@@ -873,7 +888,7 @@ function MyWeeklySessionSchedulerPicker({
873
888
  )
874
889
  }
875
890
  ),
876
- /* @__PURE__ */ jsx15(
891
+ /* @__PURE__ */ jsx17(
877
892
  NumberInput,
878
893
  {
879
894
  label: "S\u1ED1 ti\u1EBFt",
@@ -885,7 +900,7 @@ function MyWeeklySessionSchedulerPicker({
885
900
  )
886
901
  }
887
902
  ),
888
- /* @__PURE__ */ jsx15(
903
+ /* @__PURE__ */ jsx17(
889
904
  NumberInput,
890
905
  {
891
906
  label: "S\u1ED1 ph\xFAt ",
@@ -894,13 +909,13 @@ function MyWeeklySessionSchedulerPicker({
894
909
  value: item.durationMinutes
895
910
  }
896
911
  ),
897
- /* @__PURE__ */ jsx15(
898
- Button5,
912
+ /* @__PURE__ */ jsx17(
913
+ Button7,
899
914
  {
900
915
  variant: "light",
901
916
  color: "red",
902
917
  onClick: () => handleRemove(globalIndex),
903
- leftSection: /* @__PURE__ */ jsx15(IconTrash3, { size: 14 }),
918
+ leftSection: /* @__PURE__ */ jsx17(IconTrash3, { size: 14 }),
904
919
  children: "X\xF3a bu\u1ED5i"
905
920
  }
906
921
  )
@@ -917,6 +932,14 @@ function MyWeeklySessionSchedulerPicker({
917
932
  ] }) });
918
933
  }
919
934
 
935
+ // src/core/layout/MyFlexEnd.tsx
936
+ import { Group as Group5 } from "@mantine/core";
937
+ import { jsx as jsx18 } from "react/jsx-runtime";
938
+ function MyFlexEnd2(_a) {
939
+ var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
940
+ return /* @__PURE__ */ jsx18(Group5, __spreadProps(__spreadValues({ justify: "end", mt: "md" }, rest), { children }));
941
+ }
942
+
920
943
  export {
921
944
  MyActionIcon,
922
945
  MyButton,
@@ -932,5 +955,6 @@ export {
932
955
  MySelect,
933
956
  MySelectFromAPI,
934
957
  MyTextInput,
935
- MyWeeklySessionSchedulerPicker
958
+ MyWeeklySessionSchedulerPicker,
959
+ MyFlexEnd2 as MyFlexEnd
936
960
  };
@@ -36,11 +36,14 @@ import {
36
36
  MyCenterFull,
37
37
  MyCheckbox,
38
38
  MyContainer,
39
+ MyDataTable,
39
40
  MyDataTableSelect,
40
41
  MyDateInput,
41
42
  MyFieldset,
42
43
  MyFileInput,
44
+ MyFlexColumn,
43
45
  MyFlexEnd,
46
+ MyFlexRow,
44
47
  MyHtmlWrapper,
45
48
  MyIconText,
46
49
  MyNumberFormatter,
@@ -62,14 +65,9 @@ import {
62
65
  useS_BasicAppShell,
63
66
  useS_ButtonImport,
64
67
  utils_layout_getItemsWithoutLinks
65
- } from "../chunk-2NIJIQ4L.mjs";
66
- import "../chunk-5U2JSHSJ.mjs";
68
+ } from "../chunk-562G3GRP.mjs";
67
69
  import "../chunk-U62R2QKJ.mjs";
68
- import {
69
- MyDataTable,
70
- MyFlexColumn,
71
- MyFlexRow
72
- } from "../chunk-RZBHPPQT.mjs";
70
+ import "../chunk-5U2JSHSJ.mjs";
73
71
  import "../chunk-OMJJAHOC.mjs";
74
72
  import "../chunk-KFSAV44B.mjs";
75
73
  import "../chunk-7ZCOFATU.mjs";
@@ -0,0 +1,94 @@
1
+ /* src/components/Layouts/HeaderMegaMenu/css.module.css */
2
+ .header {
3
+ position: sticky;
4
+ top: 0;
5
+ z-index: 1;
6
+ height: calc(3.75rem * var(--mantine-scale));
7
+ background-color: var(--mantine-color-white);
8
+ }
9
+ [data-mantine-color-scheme=dark] .header {
10
+ background-color: var(--mantine-color-dark);
11
+ }
12
+ .header {
13
+ padding-left: var(--mantine-spacing-md);
14
+ padding-right: var(--mantine-spacing-md);
15
+ border-bottom: 1px solid var(--mantine-color-gray-3);
16
+ }
17
+ [data-mantine-color-scheme=dark] .header {
18
+ border-bottom: 1px solid var(--mantine-color-dark-4);
19
+ }
20
+ .link {
21
+ display: flex;
22
+ align-items: center;
23
+ height: 100%;
24
+ padding-left: var(--mantine-spacing-md);
25
+ padding-right: var(--mantine-spacing-md);
26
+ text-decoration: none;
27
+ color: var(--mantine-color-black);
28
+ }
29
+ [data-mantine-color-scheme=dark] .link {
30
+ color: var(--mantine-color-white);
31
+ }
32
+ .link {
33
+ font-weight: 500;
34
+ font-size: var(--mantine-font-size-sm);
35
+ }
36
+ @media (max-width: $mantine-breakpoint-sm) {
37
+ .link {
38
+ height: calc(2.625rem * var(--mantine-scale));
39
+ width: 100%;
40
+ }
41
+ }
42
+ @media (hover: hover) {
43
+ .link:hover {
44
+ background-color: var(--mantine-color-gray-0);
45
+ }
46
+ [data-mantine-color-scheme=dark] .link:hover {
47
+ background-color: var(--mantine-color-dark-6);
48
+ }
49
+ }
50
+ @media (hover: none) {
51
+ .link:active {
52
+ background-color: var(--mantine-color-gray-0);
53
+ }
54
+ [data-mantine-color-scheme=dark] .link:active {
55
+ background-color: var(--mantine-color-dark-6);
56
+ }
57
+ }
58
+ .subLink {
59
+ width: 100%;
60
+ padding: var(--mantine-spacing-xs) var(--mantine-spacing-md);
61
+ border-radius: var(--mantine-radius-md);
62
+ }
63
+ @media (hover: hover) {
64
+ .subLink:hover {
65
+ background-color: var(--mantine-color-gray-0);
66
+ }
67
+ [data-mantine-color-scheme=dark] .subLink:hover {
68
+ background-color: var(--mantine-color-dark-7);
69
+ }
70
+ }
71
+ @media (hover: none) {
72
+ .subLink:active {
73
+ background-color: var(--mantine-color-gray-0);
74
+ }
75
+ [data-mantine-color-scheme=dark] .subLink:active {
76
+ background-color: var(--mantine-color-dark-7);
77
+ }
78
+ }
79
+ .dropdownFooter {
80
+ background-color: var(--mantine-color-gray-0);
81
+ }
82
+ [data-mantine-color-scheme=dark] .dropdownFooter {
83
+ background-color: var(--mantine-color-dark-7);
84
+ }
85
+ .dropdownFooter {
86
+ margin: calc(var(--mantine-spacing-md) * -1);
87
+ margin-top: var(--mantine-spacing-sm);
88
+ padding: var(--mantine-spacing-md) calc(var(--mantine-spacing-md) * 2);
89
+ padding-bottom: var(--mantine-spacing-xl);
90
+ border-top: 1px solid var(--mantine-color-gray-1);
91
+ }
92
+ [data-mantine-color-scheme=dark] .dropdownFooter {
93
+ border-top: 1px solid var(--mantine-color-dark-5);
94
+ }
@@ -41,13 +41,23 @@ interface CoreButtonCreateUpdateProps<IReq, IRes> {
41
41
  }
42
42
  declare function MyButtonCreateUpdate<IReq, IRes>({ modalProps, actionIconProps, buttonProps, form, onSubmit, onSuccess, onError, ignoreDefaultOnError, ignoreDefaultOnSuccess, closeModalWhenSubmit, resetFormWhenSubmit, children, disclosure: externalDisclosure, isUpdate, scrollAreaAutosizeProps }: CoreButtonCreateUpdateProps<IReq, IRes>): react_jsx_runtime.JSX.Element;
43
43
 
44
- interface CoreButtonModalProps {
44
+ interface IFieldStructure {
45
+ fieldCode?: string;
46
+ fieldName?: string;
47
+ }
48
+ interface MyButtonExportStructureProps {
49
+ data?: IFieldStructure[];
50
+ fileName?: string;
51
+ buttonProps?: ButtonProps;
52
+ }
53
+
54
+ interface MyButtonModalProps {
45
55
  children?: ReactNode;
46
56
  disclosure: ReturnType<typeof useDisclosure>;
47
57
  buttonProps?: ButtonProps;
48
- modalProps?: ModalProps;
58
+ modalProps?: Omit<ModalProps, "opened" | "onClose">;
49
59
  }
50
- declare function MyButtonModal({ disclosure, children, buttonProps, modalProps, }: CoreButtonModalProps): react_jsx_runtime.JSX.Element;
60
+ declare function MyButtonModal({ disclosure, children, buttonProps, modalProps, }: MyButtonModalProps): react_jsx_runtime.JSX.Element;
51
61
 
52
62
  declare function MyDataTableSelectOne<TData extends MRT_RowData>({ columns, queryResult, idSelection, setIdSelection }: {
53
63
  columns: MRT_ColumnDef<TData>[];
@@ -151,4 +161,9 @@ interface IMyFlexColumn extends FlexProps {
151
161
  }
152
162
  declare function MyFlexColumn({ children, ...rest }: IMyFlexColumn): react_jsx_runtime.JSX.Element;
153
163
 
154
- export { type IWeeklySession, MyActionIcon, MyButton, MyButtonCreateUpdate, MyButtonModal, MyDataTableSelectOne, MyDayOfWeekPicker, MyFlexColumn, MyInfoBox, type MyInfoBoxItem, type MyInfoBoxProps, MyLabelValueRow, MyRichTextEditor, MySelect, MySelectFromAPI, type MySelectProps, MyStatsCard, MyTextInput, MyWeeklySessionSchedulerPicker, type WeeklySessionSchedulerProps };
164
+ interface MyFlexEndProps extends GroupProps {
165
+ children: ReactNode;
166
+ }
167
+ declare function MyFlexEnd({ children, ...rest }: MyFlexEndProps): react_jsx_runtime.JSX.Element;
168
+
169
+ export { type IWeeklySession, MyActionIcon, MyButton, MyButtonCreateUpdate, type MyButtonExportStructureProps, MyButtonModal, MyDataTableSelectOne, MyDayOfWeekPicker, MyFlexColumn, MyFlexEnd, MyInfoBox, type MyInfoBoxItem, type MyInfoBoxProps, MyLabelValueRow, MyRichTextEditor, MySelect, MySelectFromAPI, type MySelectProps, MyStatsCard, MyTextInput, MyWeeklySessionSchedulerPicker, type WeeklySessionSchedulerProps };
@@ -6,6 +6,7 @@ import {
6
6
  MyDataTableSelectOne,
7
7
  MyDayOfWeekPicker,
8
8
  MyFlexColumn,
9
+ MyFlexEnd,
9
10
  MyInfoBox,
10
11
  MyLabelValueRow,
11
12
  MyRichTextEditor,
@@ -14,8 +15,10 @@ import {
14
15
  MyStatsCard,
15
16
  MyTextInput,
16
17
  MyWeeklySessionSchedulerPicker
17
- } from "../chunk-QMN4DRTF.mjs";
18
- import "../chunk-RZBHPPQT.mjs";
18
+ } from "../chunk-M4NVNBCO.mjs";
19
+ import "../chunk-562G3GRP.mjs";
20
+ import "../chunk-U62R2QKJ.mjs";
21
+ import "../chunk-5U2JSHSJ.mjs";
19
22
  import "../chunk-GFEMKKFH.mjs";
20
23
  import "../chunk-OMJJAHOC.mjs";
21
24
  import "../chunk-K6S7R6LU.mjs";
@@ -30,6 +33,7 @@ export {
30
33
  MyDataTableSelectOne,
31
34
  MyDayOfWeekPicker,
32
35
  MyFlexColumn,
36
+ MyFlexEnd,
33
37
  MyInfoBox,
34
38
  MyLabelValueRow,
35
39
  MyRichTextEditor,