aq-fe-framework 0.1.452 → 0.1.454

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";
@@ -98,7 +98,7 @@ function MyActionIcon(_a) {
98
98
  }
99
99
 
100
100
  // src/core/button/MyButton.tsx
101
- import { Button as Button2 } from "@mantine/core";
101
+ import { Button } from "@mantine/core";
102
102
  import {
103
103
  IconDeviceFloppy as IconDeviceFloppy2,
104
104
  IconEdit as IconEdit2,
@@ -173,11 +173,11 @@ var actionConfig2 = {
173
173
  function MyButton(_a) {
174
174
  var _b = _a, { children, actionType } = _b, rest = __objRest(_b, ["children", "actionType"]);
175
175
  if (!actionType) {
176
- return /* @__PURE__ */ jsx2(Button2, __spreadProps(__spreadValues({}, rest), { children }));
176
+ return /* @__PURE__ */ jsx2(Button, __spreadProps(__spreadValues({}, rest), { children }));
177
177
  }
178
178
  const config = actionConfig2[actionType];
179
179
  return /* @__PURE__ */ jsx2(
180
- Button2,
180
+ Button,
181
181
  __spreadProps(__spreadValues({
182
182
  color: config.color,
183
183
  type: config.type,
@@ -189,7 +189,7 @@ function MyButton(_a) {
189
189
  }
190
190
 
191
191
  // src/core/button/MyButtonCreateUpdate.tsx
192
- import { ActionIcon as ActionIcon2, Button as Button3, Modal, ScrollArea, Space, useMantineColorScheme } from "@mantine/core";
192
+ import { ActionIcon as ActionIcon2, Button as Button2, Modal, ScrollArea, Space, useMantineColorScheme } from "@mantine/core";
193
193
  import { useDisclosure } from "@mantine/hooks";
194
194
  import { IconEdit as IconEdit3, IconPlus as IconPlus3 } from "@tabler/icons-react";
195
195
  import { useQueryClient } from "@tanstack/react-query";
@@ -257,7 +257,7 @@ function MyButtonCreateUpdate({
257
257
  children: (actionIconProps == null ? void 0 : actionIconProps.children) || /* @__PURE__ */ jsx4(IconEdit3, {})
258
258
  })
259
259
  ) : /* @__PURE__ */ jsx4(
260
- Button3,
260
+ Button2,
261
261
  __spreadProps(__spreadValues({
262
262
  onClick: disclosure[1].open,
263
263
  leftSection: /* @__PURE__ */ jsx4(IconPlus3, {})
@@ -319,44 +319,69 @@ function MyButtonCreateUpdate({
319
319
  ] });
320
320
  }
321
321
 
322
+ // src/core/button/MyButtonExportStructure.tsx
323
+ import { Button as Button3 } 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 Button4, 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 { ActionIcon as ActionIcon3, 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,
328
340
  buttonProps,
329
- modalProps
341
+ actionIconProps,
342
+ modalProps,
343
+ isActionIcon = false
330
344
  }) {
331
345
  return /* @__PURE__ */ jsxs2(Fragment2, { children: [
332
- /* @__PURE__ */ jsx5(Button4, __spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, color: "indigo" }, buttonProps)),
333
- /* @__PURE__ */ jsx5(
346
+ isActionIcon ? /* @__PURE__ */ jsx6(ActionIcon3, __spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, color: "indigo" }, actionIconProps)) : /* @__PURE__ */ jsx6(MyButton, __spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, color: "indigo" }, buttonProps)),
347
+ /* @__PURE__ */ jsx6(
334
348
  Modal2,
335
349
  __spreadProps(__spreadValues({
336
350
  opened: disclosure == null ? void 0 : disclosure[0],
337
351
  onClose: disclosure[1].close
338
352
  }, modalProps), {
339
- children: /* @__PURE__ */ jsx5(MyFlexColumn, { children })
353
+ children: /* @__PURE__ */ jsx6(MyFlexColumn, { children })
340
354
  })
341
355
  )
342
356
  ] });
343
357
  }
344
358
 
359
+ // src/core/button/MyButtonImport.tsx
360
+ import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
361
+
362
+ // src/core/button/MyButtonModalCreateUpdate.tsx
363
+ import { useDisclosure as useDisclosure3 } from "@mantine/hooks";
364
+ import { jsx as jsx8 } from "react/jsx-runtime";
365
+ function MyButtonModalCreateUpdate(props) {
366
+ const disc = useDisclosure3();
367
+ return /* @__PURE__ */ jsx8(MyButtonModal, __spreadValues({ disclosure: disc, modalProps: { title: "Chi ti\u1EBFt d\u1EEF li\u1EC7u" } }, props));
368
+ }
369
+
345
370
  // src/core/dataDisplay/MyDataTableSelectOne.tsx
346
- import { useEffect, useMemo } from "react";
347
- import { jsx as jsx6 } from "react/jsx-runtime";
371
+ import { useEffect, useMemo as useMemo2 } from "react";
372
+ import { jsx as jsx9 } from "react/jsx-runtime";
348
373
  function MyDataTableSelectOne({
349
374
  columns,
350
375
  queryResult,
351
376
  idSelection,
352
377
  setIdSelection
353
378
  }) {
354
- const columnsState = useMemo(() => columns, []);
379
+ const columnsState = useMemo2(() => columns, []);
355
380
  useEffect(() => {
356
381
  if (!queryResult.data) return;
357
382
  setIdSelection(queryResult.data[0].id);
358
383
  }, [queryResult.data]);
359
- return /* @__PURE__ */ jsx6(
384
+ return /* @__PURE__ */ jsx9(
360
385
  MyDataTable,
361
386
  {
362
387
  columns: columnsState,
@@ -382,20 +407,20 @@ function MyDataTableSelectOne({
382
407
 
383
408
  // src/core/dataDisplay/MyInfoBox.tsx
384
409
  import { Group, Paper, Stack, Text } from "@mantine/core";
385
- import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
410
+ import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
386
411
  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 })
412
+ return /* @__PURE__ */ jsx10(Paper, __spreadProps(__spreadValues({ withBorder: true, shadow: "xs", radius: "md", p: "md", bg: const_object_colors.mantineBackgroundBlueLight }, paperProps), { children: /* @__PURE__ */ jsxs4(Stack, { children: [
413
+ title && /* @__PURE__ */ jsx10(Text, { fw: 600, size: "sm", children: title }),
414
+ data.map((item, index) => /* @__PURE__ */ jsxs4(Group, { justify: "space-between", children: [
415
+ /* @__PURE__ */ jsx10(Text, { size: "sm", fw: 500, c: "dimmed", children: item.label }),
416
+ /* @__PURE__ */ jsx10(Text, { size: "sm", fw: 500, children: item.value })
392
417
  ] }, index))
393
418
  ] }) }));
394
419
  }
395
420
 
396
421
  // src/core/dataDisplay/MyLabelValueRow.tsx
397
422
  import { Group as Group2, Text as Text2 } from "@mantine/core";
398
- import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
423
+ import { jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
399
424
  function MyLabelValueRow({
400
425
  label,
401
426
  value,
@@ -403,18 +428,18 @@ function MyLabelValueRow({
403
428
  valueProps,
404
429
  groupProps
405
430
  }) {
406
- return /* @__PURE__ */ jsxs4(Group2, __spreadProps(__spreadValues({ gap: 5, wrap: "nowrap" }, groupProps), { children: [
407
- /* @__PURE__ */ jsxs4(Text2, __spreadProps(__spreadValues({ fw: 600 }, labelProps), { children: [
431
+ return /* @__PURE__ */ jsxs5(Group2, __spreadProps(__spreadValues({ gap: 5, wrap: "nowrap" }, groupProps), { children: [
432
+ /* @__PURE__ */ jsxs5(Text2, __spreadProps(__spreadValues({ fw: 600 }, labelProps), { children: [
408
433
  label,
409
434
  ":"
410
435
  ] })),
411
- /* @__PURE__ */ jsx8(Text2, __spreadProps(__spreadValues({}, valueProps), { children: value }))
436
+ /* @__PURE__ */ jsx11(Text2, __spreadProps(__spreadValues({}, valueProps), { children: value }))
412
437
  ] }));
413
438
  }
414
439
 
415
440
  // src/core/dataDisplay/MyStatsCartd.tsx
416
441
  import { Box, Card, ThemeIcon } from "@mantine/core";
417
- import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
442
+ import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
418
443
  function MyStatsCard({
419
444
  title,
420
445
  value,
@@ -423,22 +448,22 @@ function MyStatsCard({
423
448
  color,
424
449
  themeIconProps
425
450
  }) {
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 })
451
+ return /* @__PURE__ */ jsxs6(Card, { children: [
452
+ /* @__PURE__ */ jsx12("div", { className: `absolute inset-0 bg-gradient-to-br ${color} opacity-5` }),
453
+ /* @__PURE__ */ jsx12(Box, { className: "p-6", children: /* @__PURE__ */ jsxs6("div", { className: "flex items-center justify-between", children: [
454
+ /* @__PURE__ */ jsxs6("div", { children: [
455
+ /* @__PURE__ */ jsx12("p", { className: "text-sm font-medium text-muted-foreground", children: title }),
456
+ /* @__PURE__ */ jsx12("p", { className: "text-3xl font-bold", children: value }),
457
+ /* @__PURE__ */ jsx12("p", { className: "text-xs text-muted-foreground mt-1", children: subtitle })
433
458
  ] }),
434
- /* @__PURE__ */ jsx9(ThemeIcon, __spreadProps(__spreadValues({ size: "xl", radius: "xl" }, themeIconProps), { children: icon }))
459
+ /* @__PURE__ */ jsx12(ThemeIcon, __spreadProps(__spreadValues({ size: "xl", radius: "xl" }, themeIconProps), { children: icon }))
435
460
  ] }) })
436
461
  ] });
437
462
  }
438
463
 
439
464
  // src/core/input/MyDayOfWeekPicker.tsx
440
465
  import { Badge, Group as Group3 } from "@mantine/core";
441
- import { jsx as jsx10 } from "react/jsx-runtime";
466
+ import { jsx as jsx13 } from "react/jsx-runtime";
442
467
  var days = Object.entries(enum_daysOfWeek).filter(([key]) => isNaN(Number(key))).map(([label, value]) => ({ label, value }));
443
468
  function MyDayOfWeekPicker({ value = [], onChange }) {
444
469
  const toggle = (val) => {
@@ -446,7 +471,7 @@ function MyDayOfWeekPicker({ value = [], onChange }) {
446
471
  const newValue = value.includes(val) ? value.filter((v) => v !== val) : [...value, val].sort((a, b) => a - b);
447
472
  onChange(newValue);
448
473
  };
449
- return /* @__PURE__ */ jsx10(MyFlexRow, { align: "center", children: /* @__PURE__ */ jsx10(Group3, { gap: "xs", children: days.map((d) => /* @__PURE__ */ jsx10(
474
+ return /* @__PURE__ */ jsx13(MyFlexRow, { align: "center", children: /* @__PURE__ */ jsx13(Group3, { gap: "xs", children: days.map((d) => /* @__PURE__ */ jsx13(
450
475
  Badge,
451
476
  {
452
477
  variant: value.includes(d.value) ? "filled" : "outline",
@@ -474,7 +499,7 @@ import Underline from "@tiptap/extension-underline";
474
499
  import { useEditor } from "@tiptap/react";
475
500
  import StarterKit from "@tiptap/starter-kit";
476
501
  import { useEffect as useEffect2 } from "react";
477
- import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
502
+ import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
478
503
  function MyRichTextEditor(props) {
479
504
  const editor = useEditor({
480
505
  extensions: [
@@ -558,44 +583,44 @@ function MyRichTextEditor(props) {
558
583
  editor.commands.setContent(props.value || "", false);
559
584
  }
560
585
  }, [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, {})
586
+ return /* @__PURE__ */ jsx14(Input.Wrapper, __spreadProps(__spreadValues({}, props.inputWrapperProps), { children: /* @__PURE__ */ jsxs7(MantineRichTextEditor, __spreadProps(__spreadValues({ editor }, props.richTextEditorProps), { children: [
587
+ /* @__PURE__ */ jsxs7(MantineRichTextEditor.Toolbar, __spreadProps(__spreadValues({}, props.richTextEditorToolBarProps), { children: [
588
+ /* @__PURE__ */ jsxs7(MantineRichTextEditor.ControlsGroup, { children: [
589
+ /* @__PURE__ */ jsx14(MantineRichTextEditor.Bold, {}),
590
+ /* @__PURE__ */ jsx14(MantineRichTextEditor.Italic, {}),
591
+ /* @__PURE__ */ jsx14(MantineRichTextEditor.Underline, {}),
592
+ /* @__PURE__ */ jsx14(MantineRichTextEditor.Strikethrough, {}),
593
+ /* @__PURE__ */ jsx14(MantineRichTextEditor.ClearFormatting, {}),
594
+ /* @__PURE__ */ jsx14(MantineRichTextEditor.Highlight, {}),
595
+ /* @__PURE__ */ jsx14(MantineRichTextEditor.Code, {})
571
596
  ] }),
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, {})
597
+ /* @__PURE__ */ jsxs7(MantineRichTextEditor.ControlsGroup, { children: [
598
+ /* @__PURE__ */ jsx14(MantineRichTextEditor.H1, {}),
599
+ /* @__PURE__ */ jsx14(MantineRichTextEditor.H2, {}),
600
+ /* @__PURE__ */ jsx14(MantineRichTextEditor.H3, {}),
601
+ /* @__PURE__ */ jsx14(MantineRichTextEditor.H4, {})
577
602
  ] }),
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, {})
603
+ /* @__PURE__ */ jsxs7(MantineRichTextEditor.ControlsGroup, { children: [
604
+ /* @__PURE__ */ jsx14(MantineRichTextEditor.Blockquote, {}),
605
+ /* @__PURE__ */ jsx14(MantineRichTextEditor.Hr, {}),
606
+ /* @__PURE__ */ jsx14(MantineRichTextEditor.BulletList, {}),
607
+ /* @__PURE__ */ jsx14(MantineRichTextEditor.OrderedList, {}),
608
+ /* @__PURE__ */ jsx14(MantineRichTextEditor.Subscript, {}),
609
+ /* @__PURE__ */ jsx14(MantineRichTextEditor.Superscript, {})
585
610
  ] }),
586
- /* @__PURE__ */ jsxs6(MantineRichTextEditor.ControlsGroup, { children: [
587
- /* @__PURE__ */ jsx11(MantineRichTextEditor.Link, {}),
588
- /* @__PURE__ */ jsx11(MantineRichTextEditor.Unlink, {})
611
+ /* @__PURE__ */ jsxs7(MantineRichTextEditor.ControlsGroup, { children: [
612
+ /* @__PURE__ */ jsx14(MantineRichTextEditor.Link, {}),
613
+ /* @__PURE__ */ jsx14(MantineRichTextEditor.Unlink, {})
589
614
  ] }),
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, {})
615
+ /* @__PURE__ */ jsxs7(MantineRichTextEditor.ControlsGroup, { children: [
616
+ /* @__PURE__ */ jsx14(MantineRichTextEditor.AlignLeft, {}),
617
+ /* @__PURE__ */ jsx14(MantineRichTextEditor.AlignCenter, {}),
618
+ /* @__PURE__ */ jsx14(MantineRichTextEditor.AlignJustify, {}),
619
+ /* @__PURE__ */ jsx14(MantineRichTextEditor.AlignRight, {})
595
620
  ] }),
596
621
  props.extraControlsGroup
597
622
  ] })),
598
- /* @__PURE__ */ jsx11(
623
+ /* @__PURE__ */ jsx14(
599
624
  ScrollArea2.Autosize,
600
625
  __spreadProps(__spreadValues({
601
626
  onMouseDown: () => {
@@ -604,7 +629,7 @@ function MyRichTextEditor(props) {
604
629
  mah: "200",
605
630
  style: { cursor: "text" }
606
631
  }, props.scrollAreaAutosizeProps), {
607
- children: /* @__PURE__ */ jsx11(RichTextEditor.Content, __spreadValues({ mih: "200" }, props.richTextEditorContentProps))
632
+ children: /* @__PURE__ */ jsx14(RichTextEditor.Content, __spreadValues({ mih: "200" }, props.richTextEditorContentProps))
608
633
  })
609
634
  )
610
635
  ] })) }));
@@ -613,7 +638,7 @@ function MyRichTextEditor(props) {
613
638
  // src/core/input/MySelect.tsx
614
639
  import { Loader, Select } from "@mantine/core";
615
640
  import React from "react";
616
- import { jsx as jsx12 } from "react/jsx-runtime";
641
+ import { jsx as jsx15 } from "react/jsx-runtime";
617
642
  function extractTextFromReactNode(node) {
618
643
  if (typeof node === "string" || typeof node === "number") return String(node);
619
644
  if (Array.isArray(node)) return node.map(extractTextFromReactNode).join(" ");
@@ -631,7 +656,7 @@ function MySelect(_a) {
631
656
  const plainTextLabel = extractTextFromReactNode(label).toLowerCase().trim();
632
657
  placeholder = `Ch\u1ECDn ${plainTextLabel}`;
633
658
  }
634
- return /* @__PURE__ */ jsx12(
659
+ return /* @__PURE__ */ jsx15(
635
660
  Select,
636
661
  __spreadValues({
637
662
  searchable: true,
@@ -639,7 +664,7 @@ function MySelect(_a) {
639
664
  placeholder,
640
665
  data: data != null ? data : [],
641
666
  error: isError ? true : void 0,
642
- rightSection: isLoading ? /* @__PURE__ */ jsx12(Loader, { size: "xs" }) : void 0,
667
+ rightSection: isLoading ? /* @__PURE__ */ jsx15(Loader, { size: "xs" }) : void 0,
643
668
  disabled: isLoading || isError,
644
669
  styles: (theme) => ({
645
670
  input: rest.readOnly ? {
@@ -654,8 +679,8 @@ function MySelect(_a) {
654
679
  }
655
680
 
656
681
  // 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";
682
+ import { useCallback, useEffect as useEffect3, useMemo as useMemo3, useRef } from "react";
683
+ import { jsx as jsx16 } from "react/jsx-runtime";
659
684
  function MySelectFromAPI(_a) {
660
685
  var _b = _a, {
661
686
  queryKey,
@@ -687,7 +712,7 @@ function MySelectFromAPI(_a) {
687
712
  },
688
713
  [getOptionLabel, labelWithCode]
689
714
  );
690
- const options = useMemo2(() => {
715
+ const options = useMemo3(() => {
691
716
  var _a2, _b2;
692
717
  return (_b2 = (_a2 = query.data) == null ? void 0 : _a2.map((item) => {
693
718
  var _a3, _b3;
@@ -719,7 +744,7 @@ function MySelectFromAPI(_a) {
719
744
  hasAutoSelected.current = true;
720
745
  }
721
746
  }, [autoSelectFirstItem, query.data, value, getLabel, onChange, setObjectData]);
722
- return /* @__PURE__ */ jsx13(
747
+ return /* @__PURE__ */ jsx16(
723
748
  MySelect,
724
749
  __spreadValues({
725
750
  isLoading: query.isLoading,
@@ -733,10 +758,10 @@ function MySelectFromAPI(_a) {
733
758
 
734
759
  // src/core/input/MyTextInput.tsx
735
760
  import { TextInput } from "@mantine/core";
736
- import { jsx as jsx14 } from "react/jsx-runtime";
761
+ import { jsx as jsx17 } from "react/jsx-runtime";
737
762
  function MyTextInput(_a) {
738
763
  var _b = _a, { label, isPhoneNumber } = _b, rest = __objRest(_b, ["label", "isPhoneNumber"]);
739
- return /* @__PURE__ */ jsx14(
764
+ return /* @__PURE__ */ jsx17(
740
765
  TextInput,
741
766
  __spreadValues({
742
767
  onKeyDown: (e) => {
@@ -785,7 +810,7 @@ import {
785
810
  } from "@mantine/core";
786
811
  import { IconPlus as IconPlus4, IconTrash as IconTrash3 } from "@tabler/icons-react";
787
812
  import { useState } from "react";
788
- import { jsx as jsx15, jsxs as jsxs7 } from "react/jsx-runtime";
813
+ import { jsx as jsx18, jsxs as jsxs8 } from "react/jsx-runtime";
789
814
  function MyWeeklySessionSchedulerPicker({
790
815
  value = [],
791
816
  onChange
@@ -816,8 +841,8 @@ function MyWeeklySessionSchedulerPicker({
816
841
  return acc;
817
842
  }, {});
818
843
  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(
844
+ return /* @__PURE__ */ jsx18(Paper2, { w: "100%", p: "md", children: /* @__PURE__ */ jsxs8(MyFlexColumn, { children: [
845
+ /* @__PURE__ */ jsx18(Center, { children: /* @__PURE__ */ jsx18(
821
846
  MyDayOfWeekPicker,
822
847
  {
823
848
  value: selectedDays,
@@ -827,41 +852,41 @@ function MyWeeklySessionSchedulerPicker({
827
852
  }
828
853
  }
829
854
  ) }),
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) => {
855
+ /* @__PURE__ */ jsx18(Divider, { my: "xs" }),
856
+ /* @__PURE__ */ jsx18(Center, { children: /* @__PURE__ */ jsx18(ScrollArea3.Autosize, { h: "40vh", children: /* @__PURE__ */ jsx18(MyFlexColumn, { w: { base: "100%", sm: "70%" }, children: selectedDays.map((dayOfWeek) => {
832
857
  var _a;
833
- return /* @__PURE__ */ jsxs7(
858
+ return /* @__PURE__ */ jsxs8(
834
859
  Paper2,
835
860
  {
836
861
  w: "100%",
837
862
  p: "md",
838
863
  bg: const_object_colors.mantineBackgroundBlueLight,
839
864
  children: [
840
- /* @__PURE__ */ jsxs7(Group4, { gap: "apart", children: [
841
- /* @__PURE__ */ jsx15(Text4, { w: "70px", fw: 500, children: getLabel(dayOfWeek) }),
842
- /* @__PURE__ */ jsx15(
865
+ /* @__PURE__ */ jsxs8(Group4, { gap: "apart", children: [
866
+ /* @__PURE__ */ jsx18(Text4, { w: "70px", fw: 500, children: getLabel(dayOfWeek) }),
867
+ /* @__PURE__ */ jsx18(
843
868
  Button5,
844
869
  {
845
870
  color: "teal.5",
846
- leftSection: /* @__PURE__ */ jsx15(IconPlus4, { size: 14 }),
871
+ leftSection: /* @__PURE__ */ jsx18(IconPlus4, { size: 14 }),
847
872
  onClick: () => handleAddSession(dayOfWeek),
848
873
  children: "Th\xEAm bu\u1ED5i"
849
874
  }
850
875
  )
851
876
  ] }),
852
- /* @__PURE__ */ jsx15(Divider, { my: "sm" }),
877
+ /* @__PURE__ */ jsx18(Divider, { my: "sm" }),
853
878
  (_a = grouped[dayOfWeek]) == null ? void 0 : _a.map((item, indexInDay) => {
854
879
  const globalIndex = value.findIndex(
855
880
  (v) => v === item
856
881
  );
857
- return /* @__PURE__ */ jsxs7(
882
+ return /* @__PURE__ */ jsxs8(
858
883
  Group4,
859
884
  {
860
885
  mt: "xs",
861
886
  gap: "xs",
862
887
  align: "flex-end",
863
888
  children: [
864
- /* @__PURE__ */ jsx15(
889
+ /* @__PURE__ */ jsx18(
865
890
  NumberInput,
866
891
  {
867
892
  label: "Ti\u1EBFt b\u1EAFt \u0111\u1EA7u",
@@ -873,7 +898,7 @@ function MyWeeklySessionSchedulerPicker({
873
898
  )
874
899
  }
875
900
  ),
876
- /* @__PURE__ */ jsx15(
901
+ /* @__PURE__ */ jsx18(
877
902
  NumberInput,
878
903
  {
879
904
  label: "S\u1ED1 ti\u1EBFt",
@@ -885,7 +910,7 @@ function MyWeeklySessionSchedulerPicker({
885
910
  )
886
911
  }
887
912
  ),
888
- /* @__PURE__ */ jsx15(
913
+ /* @__PURE__ */ jsx18(
889
914
  NumberInput,
890
915
  {
891
916
  label: "S\u1ED1 ph\xFAt ",
@@ -894,13 +919,13 @@ function MyWeeklySessionSchedulerPicker({
894
919
  value: item.durationMinutes
895
920
  }
896
921
  ),
897
- /* @__PURE__ */ jsx15(
922
+ /* @__PURE__ */ jsx18(
898
923
  Button5,
899
924
  {
900
925
  variant: "light",
901
926
  color: "red",
902
927
  onClick: () => handleRemove(globalIndex),
903
- leftSection: /* @__PURE__ */ jsx15(IconTrash3, { size: 14 }),
928
+ leftSection: /* @__PURE__ */ jsx18(IconTrash3, { size: 14 }),
904
929
  children: "X\xF3a bu\u1ED5i"
905
930
  }
906
931
  )
@@ -917,12 +942,21 @@ function MyWeeklySessionSchedulerPicker({
917
942
  ] }) });
918
943
  }
919
944
 
945
+ // src/core/layout/MyFlexEnd.tsx
946
+ import { Group as Group5 } from "@mantine/core";
947
+ import { jsx as jsx19 } from "react/jsx-runtime";
948
+ function MyFlexEnd2(_a) {
949
+ var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
950
+ return /* @__PURE__ */ jsx19(Group5, __spreadProps(__spreadValues({ justify: "end", mt: "md" }, rest), { children }));
951
+ }
952
+
920
953
  export {
921
954
  MyActionIcon,
922
955
  MyButton,
923
956
  MyFlexColumn2 as MyFlexColumn,
924
957
  MyButtonCreateUpdate,
925
958
  MyButtonModal,
959
+ MyButtonModalCreateUpdate,
926
960
  MyDataTableSelectOne,
927
961
  MyInfoBox,
928
962
  MyLabelValueRow,
@@ -932,5 +966,6 @@ export {
932
966
  MySelect,
933
967
  MySelectFromAPI,
934
968
  MyTextInput,
935
- MyWeeklySessionSchedulerPicker
969
+ MyWeeklySessionSchedulerPicker,
970
+ MyFlexEnd2 as MyFlexEnd
936
971
  };
@@ -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-WUXEUR7R.mjs";
68
+ } from "../chunk-562G3GRP.mjs";
66
69
  import "../chunk-U62R2QKJ.mjs";
67
70
  import "../chunk-5U2JSHSJ.mjs";
68
- import {
69
- MyDataTable,
70
- MyFlexColumn,
71
- MyFlexRow
72
- } from "../chunk-RZBHPPQT.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
+ }