aq-fe-framework 0.1.478 → 0.1.480
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.
@@ -1,3 +1,6 @@
|
|
1
|
+
import {
|
2
|
+
enum_daysOfWeek
|
3
|
+
} from "./chunk-K6S7R6LU.mjs";
|
1
4
|
import {
|
2
5
|
MyDataTable,
|
3
6
|
MyFlexColumn,
|
@@ -6,9 +9,6 @@ import {
|
|
6
9
|
import {
|
7
10
|
const_object_colors
|
8
11
|
} from "./chunk-OMJJAHOC.mjs";
|
9
|
-
import {
|
10
|
-
enum_daysOfWeek
|
11
|
-
} from "./chunk-K6S7R6LU.mjs";
|
12
12
|
import {
|
13
13
|
useMyReactMutation,
|
14
14
|
useMyReactQuery
|
@@ -451,13 +451,69 @@ function MyLabelValueRow({
|
|
451
451
|
] }));
|
452
452
|
}
|
453
453
|
|
454
|
-
// src/core/dataDisplay/
|
455
|
-
import {
|
456
|
-
|
454
|
+
// src/core/dataDisplay/MyPaperTag.tsx
|
455
|
+
import {
|
456
|
+
Badge,
|
457
|
+
Paper as Paper2,
|
458
|
+
rgba,
|
459
|
+
Stack as Stack2,
|
460
|
+
Text as Text4,
|
461
|
+
useMantineTheme
|
462
|
+
} from "@mantine/core";
|
463
|
+
import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
|
464
|
+
function MyPaperTag(_a) {
|
465
|
+
var _b = _a, {
|
466
|
+
bg = "blue",
|
467
|
+
children,
|
468
|
+
badgeProps,
|
469
|
+
labelProps,
|
470
|
+
label
|
471
|
+
} = _b, rest = __objRest(_b, [
|
472
|
+
"bg",
|
473
|
+
"children",
|
474
|
+
"badgeProps",
|
475
|
+
"labelProps",
|
476
|
+
"label"
|
477
|
+
]);
|
478
|
+
var _a2, _b2, _c, _d;
|
479
|
+
const theme = useMantineTheme();
|
480
|
+
const bgColor = ((_a2 = theme.colors[bg]) == null ? void 0 : _a2[0]) || rgba(bg, 0.05);
|
481
|
+
const borderColor = ((_b2 = theme.colors[bg]) == null ? void 0 : _b2[2]) || rgba(bg, 0.2);
|
482
|
+
const badgeColor = (_c = theme.colors[bg]) == null ? void 0 : _c[8];
|
483
|
+
return /* @__PURE__ */ jsxs7(Stack2, { gap: 5, children: [
|
484
|
+
/* @__PURE__ */ jsx14(Text4, __spreadProps(__spreadValues({ fw: "500", size: "sm" }, labelProps), { children: label })),
|
485
|
+
/* @__PURE__ */ jsx14(
|
486
|
+
Paper2,
|
487
|
+
__spreadProps(__spreadValues({
|
488
|
+
w: "100%",
|
489
|
+
p: "xs",
|
490
|
+
style: {
|
491
|
+
backgroundColor: bgColor,
|
492
|
+
border: `1px solid ${borderColor}`,
|
493
|
+
display: "inline-block"
|
494
|
+
}
|
495
|
+
}, rest), {
|
496
|
+
children: /* @__PURE__ */ jsx14(
|
497
|
+
Badge,
|
498
|
+
__spreadProps(__spreadValues({
|
499
|
+
variant: "light",
|
500
|
+
color: badgeColor,
|
501
|
+
radius: "xl",
|
502
|
+
size: "md",
|
503
|
+
fw: "bold",
|
504
|
+
style: { fontWeight: 500, backgroundColor: (_d = theme.colors[bg]) == null ? void 0 : _d[1] }
|
505
|
+
}, badgeProps), {
|
506
|
+
children
|
507
|
+
})
|
508
|
+
)
|
509
|
+
})
|
510
|
+
)
|
511
|
+
] });
|
512
|
+
}
|
457
513
|
|
458
514
|
// src/core/dataDisplay/MyStatsCartd.tsx
|
459
515
|
import { Box, Card, ThemeIcon } from "@mantine/core";
|
460
|
-
import { jsx as jsx15, jsxs as
|
516
|
+
import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
|
461
517
|
function MyStatsCard({
|
462
518
|
title,
|
463
519
|
value,
|
@@ -466,10 +522,10 @@ function MyStatsCard({
|
|
466
522
|
color,
|
467
523
|
themeIconProps
|
468
524
|
}) {
|
469
|
-
return /* @__PURE__ */
|
525
|
+
return /* @__PURE__ */ jsxs8(Card, { children: [
|
470
526
|
/* @__PURE__ */ jsx15("div", { className: `absolute inset-0 bg-gradient-to-br ${color} opacity-5` }),
|
471
|
-
/* @__PURE__ */ jsx15(Box, { className: "p-6", children: /* @__PURE__ */
|
472
|
-
/* @__PURE__ */
|
527
|
+
/* @__PURE__ */ jsx15(Box, { className: "p-6", children: /* @__PURE__ */ jsxs8("div", { className: "flex items-center justify-between", children: [
|
528
|
+
/* @__PURE__ */ jsxs8("div", { children: [
|
473
529
|
/* @__PURE__ */ jsx15("p", { className: "text-sm font-medium text-muted-foreground", children: title }),
|
474
530
|
/* @__PURE__ */ jsx15("p", { className: "text-3xl font-bold", children: value }),
|
475
531
|
/* @__PURE__ */ jsx15("p", { className: "text-xs text-muted-foreground mt-1", children: subtitle })
|
@@ -480,7 +536,7 @@ function MyStatsCard({
|
|
480
536
|
}
|
481
537
|
|
482
538
|
// src/core/input/MyDayOfWeekPicker.tsx
|
483
|
-
import { Badge, Group as Group3 } from "@mantine/core";
|
539
|
+
import { Badge as Badge2, Group as Group3 } from "@mantine/core";
|
484
540
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
485
541
|
var days = Object.entries(enum_daysOfWeek).filter(([key]) => isNaN(Number(key))).map(([label, value]) => ({ label, value }));
|
486
542
|
function MyDayOfWeekPicker({ value = [], onChange }) {
|
@@ -490,7 +546,7 @@ function MyDayOfWeekPicker({ value = [], onChange }) {
|
|
490
546
|
onChange(newValue);
|
491
547
|
};
|
492
548
|
return /* @__PURE__ */ jsx16(MyFlexRow, { align: "center", children: /* @__PURE__ */ jsx16(Group3, { gap: "xs", children: days.map((d) => /* @__PURE__ */ jsx16(
|
493
|
-
|
549
|
+
Badge2,
|
494
550
|
{
|
495
551
|
variant: value.includes(d.value) ? "filled" : "outline",
|
496
552
|
color: "blue",
|
@@ -517,7 +573,7 @@ import Underline from "@tiptap/extension-underline";
|
|
517
573
|
import { useEditor } from "@tiptap/react";
|
518
574
|
import StarterKit from "@tiptap/starter-kit";
|
519
575
|
import { useEffect as useEffect2 } from "react";
|
520
|
-
import { jsx as jsx17, jsxs as
|
576
|
+
import { jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
|
521
577
|
function MyRichTextEditor(props) {
|
522
578
|
const editor = useEditor({
|
523
579
|
extensions: [
|
@@ -601,9 +657,9 @@ function MyRichTextEditor(props) {
|
|
601
657
|
editor.commands.setContent(props.value || "", false);
|
602
658
|
}
|
603
659
|
}, [props.value, editor]);
|
604
|
-
return /* @__PURE__ */ jsx17(Input.Wrapper, __spreadProps(__spreadValues({}, props.inputWrapperProps), { children: /* @__PURE__ */
|
605
|
-
/* @__PURE__ */
|
606
|
-
/* @__PURE__ */
|
660
|
+
return /* @__PURE__ */ jsx17(Input.Wrapper, __spreadProps(__spreadValues({}, props.inputWrapperProps), { children: /* @__PURE__ */ jsxs9(MantineRichTextEditor, __spreadProps(__spreadValues({ editor }, props.richTextEditorProps), { children: [
|
661
|
+
/* @__PURE__ */ jsxs9(MantineRichTextEditor.Toolbar, __spreadProps(__spreadValues({}, props.richTextEditorToolBarProps), { children: [
|
662
|
+
/* @__PURE__ */ jsxs9(MantineRichTextEditor.ControlsGroup, { children: [
|
607
663
|
/* @__PURE__ */ jsx17(MantineRichTextEditor.Bold, {}),
|
608
664
|
/* @__PURE__ */ jsx17(MantineRichTextEditor.Italic, {}),
|
609
665
|
/* @__PURE__ */ jsx17(MantineRichTextEditor.Underline, {}),
|
@@ -612,13 +668,13 @@ function MyRichTextEditor(props) {
|
|
612
668
|
/* @__PURE__ */ jsx17(MantineRichTextEditor.Highlight, {}),
|
613
669
|
/* @__PURE__ */ jsx17(MantineRichTextEditor.Code, {})
|
614
670
|
] }),
|
615
|
-
/* @__PURE__ */
|
671
|
+
/* @__PURE__ */ jsxs9(MantineRichTextEditor.ControlsGroup, { children: [
|
616
672
|
/* @__PURE__ */ jsx17(MantineRichTextEditor.H1, {}),
|
617
673
|
/* @__PURE__ */ jsx17(MantineRichTextEditor.H2, {}),
|
618
674
|
/* @__PURE__ */ jsx17(MantineRichTextEditor.H3, {}),
|
619
675
|
/* @__PURE__ */ jsx17(MantineRichTextEditor.H4, {})
|
620
676
|
] }),
|
621
|
-
/* @__PURE__ */
|
677
|
+
/* @__PURE__ */ jsxs9(MantineRichTextEditor.ControlsGroup, { children: [
|
622
678
|
/* @__PURE__ */ jsx17(MantineRichTextEditor.Blockquote, {}),
|
623
679
|
/* @__PURE__ */ jsx17(MantineRichTextEditor.Hr, {}),
|
624
680
|
/* @__PURE__ */ jsx17(MantineRichTextEditor.BulletList, {}),
|
@@ -626,11 +682,11 @@ function MyRichTextEditor(props) {
|
|
626
682
|
/* @__PURE__ */ jsx17(MantineRichTextEditor.Subscript, {}),
|
627
683
|
/* @__PURE__ */ jsx17(MantineRichTextEditor.Superscript, {})
|
628
684
|
] }),
|
629
|
-
/* @__PURE__ */
|
685
|
+
/* @__PURE__ */ jsxs9(MantineRichTextEditor.ControlsGroup, { children: [
|
630
686
|
/* @__PURE__ */ jsx17(MantineRichTextEditor.Link, {}),
|
631
687
|
/* @__PURE__ */ jsx17(MantineRichTextEditor.Unlink, {})
|
632
688
|
] }),
|
633
|
-
/* @__PURE__ */
|
689
|
+
/* @__PURE__ */ jsxs9(MantineRichTextEditor.ControlsGroup, { children: [
|
634
690
|
/* @__PURE__ */ jsx17(MantineRichTextEditor.AlignLeft, {}),
|
635
691
|
/* @__PURE__ */ jsx17(MantineRichTextEditor.AlignCenter, {}),
|
636
692
|
/* @__PURE__ */ jsx17(MantineRichTextEditor.AlignJustify, {}),
|
@@ -824,11 +880,11 @@ import {
|
|
824
880
|
NumberInput,
|
825
881
|
Paper as Paper3,
|
826
882
|
ScrollArea as ScrollArea3,
|
827
|
-
Text as
|
883
|
+
Text as Text6
|
828
884
|
} from "@mantine/core";
|
829
885
|
import { IconPlus as IconPlus4, IconTrash as IconTrash3 } from "@tabler/icons-react";
|
830
886
|
import { useState } from "react";
|
831
|
-
import { jsx as jsx21, jsxs as
|
887
|
+
import { jsx as jsx21, jsxs as jsxs10 } from "react/jsx-runtime";
|
832
888
|
function MyWeeklySessionSchedulerPicker({
|
833
889
|
value = [],
|
834
890
|
onChange
|
@@ -859,7 +915,7 @@ function MyWeeklySessionSchedulerPicker({
|
|
859
915
|
return acc;
|
860
916
|
}, {});
|
861
917
|
const getLabel = (day) => enum_daysOfWeek[day] || `Day ${day}`;
|
862
|
-
return /* @__PURE__ */ jsx21(Paper3, { w: "100%", p: "md", children: /* @__PURE__ */
|
918
|
+
return /* @__PURE__ */ jsx21(Paper3, { w: "100%", p: "md", children: /* @__PURE__ */ jsxs10(MyFlexColumn, { children: [
|
863
919
|
/* @__PURE__ */ jsx21(Center, { children: /* @__PURE__ */ jsx21(
|
864
920
|
MyDayOfWeekPicker,
|
865
921
|
{
|
@@ -873,15 +929,15 @@ function MyWeeklySessionSchedulerPicker({
|
|
873
929
|
/* @__PURE__ */ jsx21(Divider, { my: "xs" }),
|
874
930
|
/* @__PURE__ */ jsx21(Center, { children: /* @__PURE__ */ jsx21(ScrollArea3.Autosize, { h: "40vh", children: /* @__PURE__ */ jsx21(MyFlexColumn, { w: { base: "100%", sm: "70%" }, children: selectedDays.map((dayOfWeek) => {
|
875
931
|
var _a;
|
876
|
-
return /* @__PURE__ */
|
932
|
+
return /* @__PURE__ */ jsxs10(
|
877
933
|
Paper3,
|
878
934
|
{
|
879
935
|
w: "100%",
|
880
936
|
p: "md",
|
881
937
|
bg: const_object_colors.mantineBackgroundBlueLight,
|
882
938
|
children: [
|
883
|
-
/* @__PURE__ */
|
884
|
-
/* @__PURE__ */ jsx21(
|
939
|
+
/* @__PURE__ */ jsxs10(Group4, { gap: "apart", children: [
|
940
|
+
/* @__PURE__ */ jsx21(Text6, { w: "70px", fw: 500, children: getLabel(dayOfWeek) }),
|
885
941
|
/* @__PURE__ */ jsx21(
|
886
942
|
Button5,
|
887
943
|
{
|
@@ -897,7 +953,7 @@ function MyWeeklySessionSchedulerPicker({
|
|
897
953
|
const globalIndex = value.findIndex(
|
898
954
|
(v) => v === item
|
899
955
|
);
|
900
|
-
return /* @__PURE__ */
|
956
|
+
return /* @__PURE__ */ jsxs10(
|
901
957
|
Group4,
|
902
958
|
{
|
903
959
|
mt: "xs",
|
@@ -979,6 +1035,7 @@ export {
|
|
979
1035
|
MyFlexIconTitle,
|
980
1036
|
MyInfoBox,
|
981
1037
|
MyLabelValueRow,
|
1038
|
+
MyPaperTag,
|
982
1039
|
MyStatsCard,
|
983
1040
|
MyDayOfWeekPicker,
|
984
1041
|
MyRichTextEditor,
|
package/dist/core/index.d.mts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
2
2
|
import { t as type_action } from '../types-B5rmBuXz.mjs';
|
3
|
-
import { ActionIconProps, ButtonProps, ModalProps, ScrollAreaAutosizeProps, TextProps, PaperProps, GroupProps, ThemeIconProps, InputWrapperProps, SelectProps, TextInputProps, FlexProps } from '@mantine/core';
|
3
|
+
import { ActionIconProps, ButtonProps, ModalProps, ScrollAreaAutosizeProps, TextProps, PaperProps, GroupProps, BadgeProps, ThemeIconProps, InputWrapperProps, SelectProps, TextInputProps, FlexProps } from '@mantine/core';
|
4
4
|
import { ReactNode, ButtonHTMLAttributes } from 'react';
|
5
5
|
import { M as MyApiResponse } from '../createBaseApi-D9OK2lA_.mjs';
|
6
6
|
import { AxiosResponse } from 'axios';
|
@@ -101,6 +101,15 @@ interface LabelValueRowProps {
|
|
101
101
|
}
|
102
102
|
declare function MyLabelValueRow({ label, value, labelProps, valueProps, groupProps }: LabelValueRowProps): react_jsx_runtime.JSX.Element;
|
103
103
|
|
104
|
+
interface MyPaperTagProps extends PaperProps {
|
105
|
+
children?: string;
|
106
|
+
badgeProps?: BadgeProps;
|
107
|
+
bg?: string;
|
108
|
+
label?: string;
|
109
|
+
labelProps?: TextProps;
|
110
|
+
}
|
111
|
+
declare function MyPaperTag({ bg, children, badgeProps, labelProps, label, ...rest }: MyPaperTagProps): react_jsx_runtime.JSX.Element;
|
112
|
+
|
104
113
|
declare function MyStatsCard({ title, value, subtitle, icon, color, themeIconProps }: {
|
105
114
|
title: string;
|
106
115
|
value: number;
|
@@ -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, type MyButtonProps$1 as MyButtonProps, MyDataTableSelectOne, MyDayOfWeekPicker, MyFlexColumn, MyFlexEnd, MyFlexIconTitle, MyInfoBox, type MyInfoBoxItem, type MyInfoBoxProps, MyLabelValueRow, MyPaperTag, MyRichTextEditor, MySelect, MySelectFromAPI, type MySelectProps, MyStatsCard, MyTextInput, MyWeeklySessionSchedulerPicker, type WeeklySessionSchedulerProps };
|
package/dist/core/index.mjs
CHANGED
@@ -11,19 +11,20 @@ import {
|
|
11
11
|
MyFlexIconTitle,
|
12
12
|
MyInfoBox,
|
13
13
|
MyLabelValueRow,
|
14
|
+
MyPaperTag,
|
14
15
|
MyRichTextEditor,
|
15
16
|
MySelect,
|
16
17
|
MySelectFromAPI,
|
17
18
|
MyStatsCard,
|
18
19
|
MyTextInput,
|
19
20
|
MyWeeklySessionSchedulerPicker
|
20
|
-
} from "../chunk-
|
21
|
+
} from "../chunk-6USECB3O.mjs";
|
21
22
|
import "../chunk-GFEMKKFH.mjs";
|
23
|
+
import "../chunk-K6S7R6LU.mjs";
|
22
24
|
import "../chunk-R43BUIMD.mjs";
|
23
25
|
import "../chunk-U62R2QKJ.mjs";
|
24
26
|
import "../chunk-5U2JSHSJ.mjs";
|
25
27
|
import "../chunk-OMJJAHOC.mjs";
|
26
|
-
import "../chunk-K6S7R6LU.mjs";
|
27
28
|
import "../chunk-KFSAV44B.mjs";
|
28
29
|
import "../chunk-7ZCOFATU.mjs";
|
29
30
|
import "../chunk-FWCSY2DS.mjs";
|
@@ -40,6 +41,7 @@ export {
|
|
40
41
|
MyFlexIconTitle,
|
41
42
|
MyInfoBox,
|
42
43
|
MyLabelValueRow,
|
44
|
+
MyPaperTag,
|
43
45
|
MyRichTextEditor,
|
44
46
|
MySelect,
|
45
47
|
MySelectFromAPI,
|
@@ -11,14 +11,18 @@ import {
|
|
11
11
|
import {
|
12
12
|
U0DateToDDMMYYYString
|
13
13
|
} from "../chunk-EWDS5IOF.mjs";
|
14
|
+
import {
|
15
|
+
enum_emailConfigModule
|
16
|
+
} from "../chunk-VH4ZAD6M.mjs";
|
14
17
|
import {
|
15
18
|
MyButton as MyButton2,
|
16
19
|
MyDataTableSelectOne,
|
17
20
|
MyTextInput as MyTextInput2
|
18
|
-
} from "../chunk-
|
21
|
+
} from "../chunk-6USECB3O.mjs";
|
19
22
|
import {
|
20
23
|
const_object_documentTypes
|
21
24
|
} from "../chunk-GFEMKKFH.mjs";
|
25
|
+
import "../chunk-K6S7R6LU.mjs";
|
22
26
|
import {
|
23
27
|
F_authenticate_Logout,
|
24
28
|
MyActionIconDelete,
|
@@ -52,10 +56,6 @@ import "../chunk-5U2JSHSJ.mjs";
|
|
52
56
|
import {
|
53
57
|
const_object_colors
|
54
58
|
} 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,
|