aq-fe-framework 0.1.453 → 0.1.455
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.
@@ -98,7 +98,7 @@ function MyActionIcon(_a) {
|
|
98
98
|
}
|
99
99
|
|
100
100
|
// src/core/button/MyButton.tsx
|
101
|
-
import { Button
|
101
|
+
import { Button } from "@mantine/core";
|
102
102
|
import {
|
103
103
|
IconDeviceFloppy as IconDeviceFloppy2,
|
104
104
|
IconEdit as IconEdit2,
|
@@ -117,8 +117,8 @@ var actionConfig2 = {
|
|
117
117
|
create: {
|
118
118
|
color: "blue",
|
119
119
|
type: "submit",
|
120
|
-
icon: /* @__PURE__ */ jsx2(
|
121
|
-
defaultText: "
|
120
|
+
icon: /* @__PURE__ */ jsx2(IconPlus2, {}),
|
121
|
+
defaultText: "Th\xEAm"
|
122
122
|
},
|
123
123
|
createMultiple: {
|
124
124
|
color: "green",
|
@@ -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(
|
176
|
+
return /* @__PURE__ */ jsx2(Button, __spreadProps(__spreadValues({}, rest), { children }));
|
177
177
|
}
|
178
178
|
const config = actionConfig2[actionType];
|
179
179
|
return /* @__PURE__ */ jsx2(
|
180
|
-
|
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
|
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
|
-
|
260
|
+
Button2,
|
261
261
|
__spreadProps(__spreadValues({
|
262
262
|
onClick: disclosure[1].open,
|
263
263
|
leftSection: /* @__PURE__ */ jsx4(IconPlus3, {})
|
@@ -310,7 +310,7 @@ function MyButtonCreateUpdate({
|
|
310
310
|
})
|
311
311
|
),
|
312
312
|
/* @__PURE__ */ jsx4(Space, {}),
|
313
|
-
/* @__PURE__ */ jsx4(MyButton, { fullWidth: true, actionType: "
|
313
|
+
/* @__PURE__ */ jsx4(MyButton, { fullWidth: true, actionType: "save" })
|
314
314
|
]
|
315
315
|
}
|
316
316
|
)
|
@@ -320,28 +320,30 @@ function MyButtonCreateUpdate({
|
|
320
320
|
}
|
321
321
|
|
322
322
|
// src/core/button/MyButtonExportStructure.tsx
|
323
|
-
import { Button as
|
323
|
+
import { Button as Button3 } from "@mantine/core";
|
324
324
|
import ExcelJS from "exceljs";
|
325
325
|
import { saveAs } from "file-saver";
|
326
326
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
327
327
|
|
328
328
|
// src/core/button/MyButtonImport.tsx
|
329
|
-
import { Button as
|
329
|
+
import { Button as Button4, FileInput } from "@mantine/core";
|
330
330
|
import { useDisclosure as useDisclosure2 } from "@mantine/hooks";
|
331
331
|
import { IconFileImport as IconFileImport3 } from "@tabler/icons-react";
|
332
332
|
import { useMemo } from "react";
|
333
333
|
|
334
334
|
// src/core/button/MyButtonModal.tsx
|
335
|
-
import {
|
335
|
+
import { Modal as Modal2 } from "@mantine/core";
|
336
336
|
import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
|
337
337
|
function MyButtonModal({
|
338
338
|
disclosure,
|
339
339
|
children,
|
340
340
|
buttonProps,
|
341
|
-
|
341
|
+
actionIconProps,
|
342
|
+
modalProps,
|
343
|
+
isActionIcon = false
|
342
344
|
}) {
|
343
345
|
return /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
344
|
-
/* @__PURE__ */ jsx6(
|
346
|
+
isActionIcon ? /* @__PURE__ */ jsx6(MyActionIcon, __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)),
|
345
347
|
/* @__PURE__ */ jsx6(
|
346
348
|
Modal2,
|
347
349
|
__spreadProps(__spreadValues({
|
@@ -357,9 +359,17 @@ function MyButtonModal({
|
|
357
359
|
// src/core/button/MyButtonImport.tsx
|
358
360
|
import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
|
359
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
|
+
|
360
370
|
// src/core/dataDisplay/MyDataTableSelectOne.tsx
|
361
371
|
import { useEffect, useMemo as useMemo2 } from "react";
|
362
|
-
import { jsx as
|
372
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
363
373
|
function MyDataTableSelectOne({
|
364
374
|
columns,
|
365
375
|
queryResult,
|
@@ -371,7 +381,7 @@ function MyDataTableSelectOne({
|
|
371
381
|
if (!queryResult.data) return;
|
372
382
|
setIdSelection(queryResult.data[0].id);
|
373
383
|
}, [queryResult.data]);
|
374
|
-
return /* @__PURE__ */
|
384
|
+
return /* @__PURE__ */ jsx9(
|
375
385
|
MyDataTable,
|
376
386
|
{
|
377
387
|
columns: columnsState,
|
@@ -397,20 +407,20 @@ function MyDataTableSelectOne({
|
|
397
407
|
|
398
408
|
// src/core/dataDisplay/MyInfoBox.tsx
|
399
409
|
import { Group, Paper, Stack, Text } from "@mantine/core";
|
400
|
-
import { jsx as
|
410
|
+
import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
|
401
411
|
function MyInfoBox({ title, data, paperProps }) {
|
402
|
-
return /* @__PURE__ */
|
403
|
-
title && /* @__PURE__ */
|
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 }),
|
404
414
|
data.map((item, index) => /* @__PURE__ */ jsxs4(Group, { justify: "space-between", children: [
|
405
|
-
/* @__PURE__ */
|
406
|
-
/* @__PURE__ */
|
415
|
+
/* @__PURE__ */ jsx10(Text, { size: "sm", fw: 500, c: "dimmed", children: item.label }),
|
416
|
+
/* @__PURE__ */ jsx10(Text, { size: "sm", fw: 500, children: item.value })
|
407
417
|
] }, index))
|
408
418
|
] }) }));
|
409
419
|
}
|
410
420
|
|
411
421
|
// src/core/dataDisplay/MyLabelValueRow.tsx
|
412
422
|
import { Group as Group2, Text as Text2 } from "@mantine/core";
|
413
|
-
import { jsx as
|
423
|
+
import { jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
|
414
424
|
function MyLabelValueRow({
|
415
425
|
label,
|
416
426
|
value,
|
@@ -423,13 +433,13 @@ function MyLabelValueRow({
|
|
423
433
|
label,
|
424
434
|
":"
|
425
435
|
] })),
|
426
|
-
/* @__PURE__ */
|
436
|
+
/* @__PURE__ */ jsx11(Text2, __spreadProps(__spreadValues({}, valueProps), { children: value }))
|
427
437
|
] }));
|
428
438
|
}
|
429
439
|
|
430
440
|
// src/core/dataDisplay/MyStatsCartd.tsx
|
431
441
|
import { Box, Card, ThemeIcon } from "@mantine/core";
|
432
|
-
import { jsx as
|
442
|
+
import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
|
433
443
|
function MyStatsCard({
|
434
444
|
title,
|
435
445
|
value,
|
@@ -439,21 +449,21 @@ function MyStatsCard({
|
|
439
449
|
themeIconProps
|
440
450
|
}) {
|
441
451
|
return /* @__PURE__ */ jsxs6(Card, { children: [
|
442
|
-
/* @__PURE__ */
|
443
|
-
/* @__PURE__ */
|
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: [
|
444
454
|
/* @__PURE__ */ jsxs6("div", { children: [
|
445
|
-
/* @__PURE__ */
|
446
|
-
/* @__PURE__ */
|
447
|
-
/* @__PURE__ */
|
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 })
|
448
458
|
] }),
|
449
|
-
/* @__PURE__ */
|
459
|
+
/* @__PURE__ */ jsx12(ThemeIcon, __spreadProps(__spreadValues({ size: "xl", radius: "xl" }, themeIconProps), { children: icon }))
|
450
460
|
] }) })
|
451
461
|
] });
|
452
462
|
}
|
453
463
|
|
454
464
|
// src/core/input/MyDayOfWeekPicker.tsx
|
455
465
|
import { Badge, Group as Group3 } from "@mantine/core";
|
456
|
-
import { jsx as
|
466
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
457
467
|
var days = Object.entries(enum_daysOfWeek).filter(([key]) => isNaN(Number(key))).map(([label, value]) => ({ label, value }));
|
458
468
|
function MyDayOfWeekPicker({ value = [], onChange }) {
|
459
469
|
const toggle = (val) => {
|
@@ -461,7 +471,7 @@ function MyDayOfWeekPicker({ value = [], onChange }) {
|
|
461
471
|
const newValue = value.includes(val) ? value.filter((v) => v !== val) : [...value, val].sort((a, b) => a - b);
|
462
472
|
onChange(newValue);
|
463
473
|
};
|
464
|
-
return /* @__PURE__ */
|
474
|
+
return /* @__PURE__ */ jsx13(MyFlexRow, { align: "center", children: /* @__PURE__ */ jsx13(Group3, { gap: "xs", children: days.map((d) => /* @__PURE__ */ jsx13(
|
465
475
|
Badge,
|
466
476
|
{
|
467
477
|
variant: value.includes(d.value) ? "filled" : "outline",
|
@@ -489,7 +499,7 @@ import Underline from "@tiptap/extension-underline";
|
|
489
499
|
import { useEditor } from "@tiptap/react";
|
490
500
|
import StarterKit from "@tiptap/starter-kit";
|
491
501
|
import { useEffect as useEffect2 } from "react";
|
492
|
-
import { jsx as
|
502
|
+
import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
|
493
503
|
function MyRichTextEditor(props) {
|
494
504
|
const editor = useEditor({
|
495
505
|
extensions: [
|
@@ -573,44 +583,44 @@ function MyRichTextEditor(props) {
|
|
573
583
|
editor.commands.setContent(props.value || "", false);
|
574
584
|
}
|
575
585
|
}, [props.value, editor]);
|
576
|
-
return /* @__PURE__ */
|
586
|
+
return /* @__PURE__ */ jsx14(Input.Wrapper, __spreadProps(__spreadValues({}, props.inputWrapperProps), { children: /* @__PURE__ */ jsxs7(MantineRichTextEditor, __spreadProps(__spreadValues({ editor }, props.richTextEditorProps), { children: [
|
577
587
|
/* @__PURE__ */ jsxs7(MantineRichTextEditor.Toolbar, __spreadProps(__spreadValues({}, props.richTextEditorToolBarProps), { children: [
|
578
588
|
/* @__PURE__ */ jsxs7(MantineRichTextEditor.ControlsGroup, { children: [
|
579
|
-
/* @__PURE__ */
|
580
|
-
/* @__PURE__ */
|
581
|
-
/* @__PURE__ */
|
582
|
-
/* @__PURE__ */
|
583
|
-
/* @__PURE__ */
|
584
|
-
/* @__PURE__ */
|
585
|
-
/* @__PURE__ */
|
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, {})
|
586
596
|
] }),
|
587
597
|
/* @__PURE__ */ jsxs7(MantineRichTextEditor.ControlsGroup, { children: [
|
588
|
-
/* @__PURE__ */
|
589
|
-
/* @__PURE__ */
|
590
|
-
/* @__PURE__ */
|
591
|
-
/* @__PURE__ */
|
598
|
+
/* @__PURE__ */ jsx14(MantineRichTextEditor.H1, {}),
|
599
|
+
/* @__PURE__ */ jsx14(MantineRichTextEditor.H2, {}),
|
600
|
+
/* @__PURE__ */ jsx14(MantineRichTextEditor.H3, {}),
|
601
|
+
/* @__PURE__ */ jsx14(MantineRichTextEditor.H4, {})
|
592
602
|
] }),
|
593
603
|
/* @__PURE__ */ jsxs7(MantineRichTextEditor.ControlsGroup, { children: [
|
594
|
-
/* @__PURE__ */
|
595
|
-
/* @__PURE__ */
|
596
|
-
/* @__PURE__ */
|
597
|
-
/* @__PURE__ */
|
598
|
-
/* @__PURE__ */
|
599
|
-
/* @__PURE__ */
|
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, {})
|
600
610
|
] }),
|
601
611
|
/* @__PURE__ */ jsxs7(MantineRichTextEditor.ControlsGroup, { children: [
|
602
|
-
/* @__PURE__ */
|
603
|
-
/* @__PURE__ */
|
612
|
+
/* @__PURE__ */ jsx14(MantineRichTextEditor.Link, {}),
|
613
|
+
/* @__PURE__ */ jsx14(MantineRichTextEditor.Unlink, {})
|
604
614
|
] }),
|
605
615
|
/* @__PURE__ */ jsxs7(MantineRichTextEditor.ControlsGroup, { children: [
|
606
|
-
/* @__PURE__ */
|
607
|
-
/* @__PURE__ */
|
608
|
-
/* @__PURE__ */
|
609
|
-
/* @__PURE__ */
|
616
|
+
/* @__PURE__ */ jsx14(MantineRichTextEditor.AlignLeft, {}),
|
617
|
+
/* @__PURE__ */ jsx14(MantineRichTextEditor.AlignCenter, {}),
|
618
|
+
/* @__PURE__ */ jsx14(MantineRichTextEditor.AlignJustify, {}),
|
619
|
+
/* @__PURE__ */ jsx14(MantineRichTextEditor.AlignRight, {})
|
610
620
|
] }),
|
611
621
|
props.extraControlsGroup
|
612
622
|
] })),
|
613
|
-
/* @__PURE__ */
|
623
|
+
/* @__PURE__ */ jsx14(
|
614
624
|
ScrollArea2.Autosize,
|
615
625
|
__spreadProps(__spreadValues({
|
616
626
|
onMouseDown: () => {
|
@@ -619,7 +629,7 @@ function MyRichTextEditor(props) {
|
|
619
629
|
mah: "200",
|
620
630
|
style: { cursor: "text" }
|
621
631
|
}, props.scrollAreaAutosizeProps), {
|
622
|
-
children: /* @__PURE__ */
|
632
|
+
children: /* @__PURE__ */ jsx14(RichTextEditor.Content, __spreadValues({ mih: "200" }, props.richTextEditorContentProps))
|
623
633
|
})
|
624
634
|
)
|
625
635
|
] })) }));
|
@@ -628,7 +638,7 @@ function MyRichTextEditor(props) {
|
|
628
638
|
// src/core/input/MySelect.tsx
|
629
639
|
import { Loader, Select } from "@mantine/core";
|
630
640
|
import React from "react";
|
631
|
-
import { jsx as
|
641
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
632
642
|
function extractTextFromReactNode(node) {
|
633
643
|
if (typeof node === "string" || typeof node === "number") return String(node);
|
634
644
|
if (Array.isArray(node)) return node.map(extractTextFromReactNode).join(" ");
|
@@ -646,7 +656,7 @@ function MySelect(_a) {
|
|
646
656
|
const plainTextLabel = extractTextFromReactNode(label).toLowerCase().trim();
|
647
657
|
placeholder = `Ch\u1ECDn ${plainTextLabel}`;
|
648
658
|
}
|
649
|
-
return /* @__PURE__ */
|
659
|
+
return /* @__PURE__ */ jsx15(
|
650
660
|
Select,
|
651
661
|
__spreadValues({
|
652
662
|
searchable: true,
|
@@ -654,7 +664,7 @@ function MySelect(_a) {
|
|
654
664
|
placeholder,
|
655
665
|
data: data != null ? data : [],
|
656
666
|
error: isError ? true : void 0,
|
657
|
-
rightSection: isLoading ? /* @__PURE__ */
|
667
|
+
rightSection: isLoading ? /* @__PURE__ */ jsx15(Loader, { size: "xs" }) : void 0,
|
658
668
|
disabled: isLoading || isError,
|
659
669
|
styles: (theme) => ({
|
660
670
|
input: rest.readOnly ? {
|
@@ -670,7 +680,7 @@ function MySelect(_a) {
|
|
670
680
|
|
671
681
|
// src/core/input/MySelectFromAPI.tsx
|
672
682
|
import { useCallback, useEffect as useEffect3, useMemo as useMemo3, useRef } from "react";
|
673
|
-
import { jsx as
|
683
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
674
684
|
function MySelectFromAPI(_a) {
|
675
685
|
var _b = _a, {
|
676
686
|
queryKey,
|
@@ -734,7 +744,7 @@ function MySelectFromAPI(_a) {
|
|
734
744
|
hasAutoSelected.current = true;
|
735
745
|
}
|
736
746
|
}, [autoSelectFirstItem, query.data, value, getLabel, onChange, setObjectData]);
|
737
|
-
return /* @__PURE__ */
|
747
|
+
return /* @__PURE__ */ jsx16(
|
738
748
|
MySelect,
|
739
749
|
__spreadValues({
|
740
750
|
isLoading: query.isLoading,
|
@@ -748,10 +758,10 @@ function MySelectFromAPI(_a) {
|
|
748
758
|
|
749
759
|
// src/core/input/MyTextInput.tsx
|
750
760
|
import { TextInput } from "@mantine/core";
|
751
|
-
import { jsx as
|
761
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
752
762
|
function MyTextInput(_a) {
|
753
763
|
var _b = _a, { label, isPhoneNumber } = _b, rest = __objRest(_b, ["label", "isPhoneNumber"]);
|
754
|
-
return /* @__PURE__ */
|
764
|
+
return /* @__PURE__ */ jsx17(
|
755
765
|
TextInput,
|
756
766
|
__spreadValues({
|
757
767
|
onKeyDown: (e) => {
|
@@ -789,7 +799,7 @@ function MyTextInput(_a) {
|
|
789
799
|
|
790
800
|
// src/core/input/MyWeeklySessionSchedulerPicker.tsx
|
791
801
|
import {
|
792
|
-
Button as
|
802
|
+
Button as Button5,
|
793
803
|
Center,
|
794
804
|
Divider,
|
795
805
|
Group as Group4,
|
@@ -800,7 +810,7 @@ import {
|
|
800
810
|
} from "@mantine/core";
|
801
811
|
import { IconPlus as IconPlus4, IconTrash as IconTrash3 } from "@tabler/icons-react";
|
802
812
|
import { useState } from "react";
|
803
|
-
import { jsx as
|
813
|
+
import { jsx as jsx18, jsxs as jsxs8 } from "react/jsx-runtime";
|
804
814
|
function MyWeeklySessionSchedulerPicker({
|
805
815
|
value = [],
|
806
816
|
onChange
|
@@ -831,8 +841,8 @@ function MyWeeklySessionSchedulerPicker({
|
|
831
841
|
return acc;
|
832
842
|
}, {});
|
833
843
|
const getLabel = (day) => enum_daysOfWeek[day] || `Day ${day}`;
|
834
|
-
return /* @__PURE__ */
|
835
|
-
/* @__PURE__ */
|
844
|
+
return /* @__PURE__ */ jsx18(Paper2, { w: "100%", p: "md", children: /* @__PURE__ */ jsxs8(MyFlexColumn, { children: [
|
845
|
+
/* @__PURE__ */ jsx18(Center, { children: /* @__PURE__ */ jsx18(
|
836
846
|
MyDayOfWeekPicker,
|
837
847
|
{
|
838
848
|
value: selectedDays,
|
@@ -842,8 +852,8 @@ function MyWeeklySessionSchedulerPicker({
|
|
842
852
|
}
|
843
853
|
}
|
844
854
|
) }),
|
845
|
-
/* @__PURE__ */
|
846
|
-
/* @__PURE__ */
|
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) => {
|
847
857
|
var _a;
|
848
858
|
return /* @__PURE__ */ jsxs8(
|
849
859
|
Paper2,
|
@@ -853,18 +863,18 @@ function MyWeeklySessionSchedulerPicker({
|
|
853
863
|
bg: const_object_colors.mantineBackgroundBlueLight,
|
854
864
|
children: [
|
855
865
|
/* @__PURE__ */ jsxs8(Group4, { gap: "apart", children: [
|
856
|
-
/* @__PURE__ */
|
857
|
-
/* @__PURE__ */
|
858
|
-
|
866
|
+
/* @__PURE__ */ jsx18(Text4, { w: "70px", fw: 500, children: getLabel(dayOfWeek) }),
|
867
|
+
/* @__PURE__ */ jsx18(
|
868
|
+
Button5,
|
859
869
|
{
|
860
870
|
color: "teal.5",
|
861
|
-
leftSection: /* @__PURE__ */
|
871
|
+
leftSection: /* @__PURE__ */ jsx18(IconPlus4, { size: 14 }),
|
862
872
|
onClick: () => handleAddSession(dayOfWeek),
|
863
873
|
children: "Th\xEAm bu\u1ED5i"
|
864
874
|
}
|
865
875
|
)
|
866
876
|
] }),
|
867
|
-
/* @__PURE__ */
|
877
|
+
/* @__PURE__ */ jsx18(Divider, { my: "sm" }),
|
868
878
|
(_a = grouped[dayOfWeek]) == null ? void 0 : _a.map((item, indexInDay) => {
|
869
879
|
const globalIndex = value.findIndex(
|
870
880
|
(v) => v === item
|
@@ -876,7 +886,7 @@ function MyWeeklySessionSchedulerPicker({
|
|
876
886
|
gap: "xs",
|
877
887
|
align: "flex-end",
|
878
888
|
children: [
|
879
|
-
/* @__PURE__ */
|
889
|
+
/* @__PURE__ */ jsx18(
|
880
890
|
NumberInput,
|
881
891
|
{
|
882
892
|
label: "Ti\u1EBFt b\u1EAFt \u0111\u1EA7u",
|
@@ -888,7 +898,7 @@ function MyWeeklySessionSchedulerPicker({
|
|
888
898
|
)
|
889
899
|
}
|
890
900
|
),
|
891
|
-
/* @__PURE__ */
|
901
|
+
/* @__PURE__ */ jsx18(
|
892
902
|
NumberInput,
|
893
903
|
{
|
894
904
|
label: "S\u1ED1 ti\u1EBFt",
|
@@ -900,7 +910,7 @@ function MyWeeklySessionSchedulerPicker({
|
|
900
910
|
)
|
901
911
|
}
|
902
912
|
),
|
903
|
-
/* @__PURE__ */
|
913
|
+
/* @__PURE__ */ jsx18(
|
904
914
|
NumberInput,
|
905
915
|
{
|
906
916
|
label: "S\u1ED1 ph\xFAt ",
|
@@ -909,13 +919,13 @@ function MyWeeklySessionSchedulerPicker({
|
|
909
919
|
value: item.durationMinutes
|
910
920
|
}
|
911
921
|
),
|
912
|
-
/* @__PURE__ */
|
913
|
-
|
922
|
+
/* @__PURE__ */ jsx18(
|
923
|
+
Button5,
|
914
924
|
{
|
915
925
|
variant: "light",
|
916
926
|
color: "red",
|
917
927
|
onClick: () => handleRemove(globalIndex),
|
918
|
-
leftSection: /* @__PURE__ */
|
928
|
+
leftSection: /* @__PURE__ */ jsx18(IconTrash3, { size: 14 }),
|
919
929
|
children: "X\xF3a bu\u1ED5i"
|
920
930
|
}
|
921
931
|
)
|
@@ -934,10 +944,10 @@ function MyWeeklySessionSchedulerPicker({
|
|
934
944
|
|
935
945
|
// src/core/layout/MyFlexEnd.tsx
|
936
946
|
import { Group as Group5 } from "@mantine/core";
|
937
|
-
import { jsx as
|
947
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
938
948
|
function MyFlexEnd2(_a) {
|
939
949
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
940
|
-
return /* @__PURE__ */
|
950
|
+
return /* @__PURE__ */ jsx19(Group5, __spreadProps(__spreadValues({ justify: "end", mt: "md" }, rest), { children }));
|
941
951
|
}
|
942
952
|
|
943
953
|
export {
|
@@ -946,6 +956,7 @@ export {
|
|
946
956
|
MyFlexColumn2 as MyFlexColumn,
|
947
957
|
MyButtonCreateUpdate,
|
948
958
|
MyButtonModal,
|
959
|
+
MyButtonModalCreateUpdate,
|
949
960
|
MyDataTableSelectOne,
|
950
961
|
MyInfoBox,
|
951
962
|
MyLabelValueRow,
|
package/dist/core/index.d.mts
CHANGED
@@ -11,10 +11,10 @@ import { MRT_RowData, MRT_ColumnDef } from 'mantine-react-table';
|
|
11
11
|
import { RichTextEditorProps, RichTextEditorToolbarProps, RichTextEditorContentProps } from '@mantine/tiptap';
|
12
12
|
import { I as IBaseEntity } from '../IBaseEntity-BprRafT5.mjs';
|
13
13
|
|
14
|
-
interface
|
14
|
+
interface MyActionIconProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "color" | "style">, ActionIconProps {
|
15
15
|
actionType?: type_action;
|
16
16
|
}
|
17
|
-
declare function MyActionIcon({ children, actionType, ...rest }:
|
17
|
+
declare function MyActionIcon({ children, actionType, ...rest }: MyActionIconProps): react_jsx_runtime.JSX.Element;
|
18
18
|
|
19
19
|
interface MyButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "color" | "style">, ButtonProps {
|
20
20
|
actionType?: type_action;
|
@@ -54,10 +54,16 @@ interface MyButtonExportStructureProps {
|
|
54
54
|
interface MyButtonModalProps {
|
55
55
|
children?: ReactNode;
|
56
56
|
disclosure: ReturnType<typeof useDisclosure>;
|
57
|
-
buttonProps?:
|
57
|
+
buttonProps?: MyButtonProps;
|
58
|
+
actionIconProps?: MyActionIconProps;
|
58
59
|
modalProps?: Omit<ModalProps, "opened" | "onClose">;
|
60
|
+
isActionIcon?: boolean;
|
61
|
+
}
|
62
|
+
declare function MyButtonModal({ disclosure, children, buttonProps, actionIconProps, modalProps, isActionIcon }: MyButtonModalProps): react_jsx_runtime.JSX.Element;
|
63
|
+
|
64
|
+
interface MyButtonModalCreateUpdateProps extends Omit<MyButtonModalProps, "disclosure"> {
|
59
65
|
}
|
60
|
-
declare function
|
66
|
+
declare function MyButtonModalCreateUpdate(props?: MyButtonModalCreateUpdateProps): react_jsx_runtime.JSX.Element;
|
61
67
|
|
62
68
|
declare function MyDataTableSelectOne<TData extends MRT_RowData>({ columns, queryResult, idSelection, setIdSelection }: {
|
63
69
|
columns: MRT_ColumnDef<TData>[];
|
@@ -166,4 +172,4 @@ interface MyFlexEndProps extends GroupProps {
|
|
166
172
|
}
|
167
173
|
declare function MyFlexEnd({ children, ...rest }: MyFlexEndProps): react_jsx_runtime.JSX.Element;
|
168
174
|
|
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 };
|
175
|
+
export { type IWeeklySession, MyActionIcon, type MyActionIconProps, MyButton, MyButtonCreateUpdate, type MyButtonExportStructureProps, MyButtonModal, MyButtonModalCreateUpdate, type MyButtonModalProps, type MyButtonProps, MyDataTableSelectOne, MyDayOfWeekPicker, MyFlexColumn, MyFlexEnd, MyInfoBox, type MyInfoBoxItem, type MyInfoBoxProps, MyLabelValueRow, MyRichTextEditor, MySelect, MySelectFromAPI, type MySelectProps, MyStatsCard, MyTextInput, MyWeeklySessionSchedulerPicker, type WeeklySessionSchedulerProps };
|
package/dist/core/index.mjs
CHANGED
@@ -3,6 +3,7 @@ import {
|
|
3
3
|
MyButton,
|
4
4
|
MyButtonCreateUpdate,
|
5
5
|
MyButtonModal,
|
6
|
+
MyButtonModalCreateUpdate,
|
6
7
|
MyDataTableSelectOne,
|
7
8
|
MyDayOfWeekPicker,
|
8
9
|
MyFlexColumn,
|
@@ -15,7 +16,7 @@ import {
|
|
15
16
|
MyStatsCard,
|
16
17
|
MyTextInput,
|
17
18
|
MyWeeklySessionSchedulerPicker
|
18
|
-
} from "../chunk-
|
19
|
+
} from "../chunk-GALHJARG.mjs";
|
19
20
|
import "../chunk-562G3GRP.mjs";
|
20
21
|
import "../chunk-U62R2QKJ.mjs";
|
21
22
|
import "../chunk-5U2JSHSJ.mjs";
|
@@ -30,6 +31,7 @@ export {
|
|
30
31
|
MyButton,
|
31
32
|
MyButtonCreateUpdate,
|
32
33
|
MyButtonModal,
|
34
|
+
MyButtonModalCreateUpdate,
|
33
35
|
MyDataTableSelectOne,
|
34
36
|
MyDayOfWeekPicker,
|
35
37
|
MyFlexColumn,
|
@@ -5,11 +5,17 @@ import {
|
|
5
5
|
utils_converter_enumToSelectOptions,
|
6
6
|
utils_file_fileToAQDocumentType
|
7
7
|
} from "../chunk-J7PZ4DWS.mjs";
|
8
|
+
import {
|
9
|
+
baseColumns
|
10
|
+
} from "../chunk-BEFEWY44.mjs";
|
11
|
+
import {
|
12
|
+
U0DateToDDMMYYYString
|
13
|
+
} from "../chunk-EWDS5IOF.mjs";
|
8
14
|
import {
|
9
15
|
MyButton as MyButton2,
|
10
16
|
MyDataTableSelectOne,
|
11
17
|
MyTextInput as MyTextInput2
|
12
|
-
} from "../chunk-
|
18
|
+
} from "../chunk-GALHJARG.mjs";
|
13
19
|
import {
|
14
20
|
F_authenticate_Logout,
|
15
21
|
MyActionIconDelete,
|
@@ -46,12 +52,6 @@ import {
|
|
46
52
|
import {
|
47
53
|
const_object_colors
|
48
54
|
} from "../chunk-OMJJAHOC.mjs";
|
49
|
-
import {
|
50
|
-
baseColumns
|
51
|
-
} from "../chunk-BEFEWY44.mjs";
|
52
|
-
import {
|
53
|
-
U0DateToDDMMYYYString
|
54
|
-
} from "../chunk-EWDS5IOF.mjs";
|
55
55
|
import {
|
56
56
|
enum_emailConfigModule
|
57
57
|
} from "../chunk-VH4ZAD6M.mjs";
|
package/dist/utils/index.mjs
CHANGED
@@ -22,15 +22,15 @@ import {
|
|
22
22
|
utils_time_getHourMinuteFromString,
|
23
23
|
utils_validator_validateCode
|
24
24
|
} from "../chunk-J7PZ4DWS.mjs";
|
25
|
-
import {
|
26
|
-
utils_pdf_download
|
27
|
-
} from "../chunk-5U2JSHSJ.mjs";
|
28
25
|
import {
|
29
26
|
U0DateToDDMMYYYString,
|
30
27
|
utils_date_dateToDDMMYYYString,
|
31
28
|
utils_date_formatToDateTimeStartEnd,
|
32
29
|
utils_date_getHHmm
|
33
30
|
} from "../chunk-EWDS5IOF.mjs";
|
31
|
+
import {
|
32
|
+
utils_pdf_download
|
33
|
+
} from "../chunk-5U2JSHSJ.mjs";
|
34
34
|
import {
|
35
35
|
utils_notification_show
|
36
36
|
} from "../chunk-7ZCOFATU.mjs";
|