aq-fe-framework 0.1.331 → 0.1.332
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.
@@ -362,9 +362,33 @@ function MyLabelValueRow({
|
|
362
362
|
] }));
|
363
363
|
}
|
364
364
|
|
365
|
+
// src/core/dataDisplay/MyStatsCartd.tsx
|
366
|
+
import { Box, Card, ThemeIcon } from "@mantine/core";
|
367
|
+
import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
368
|
+
function MyStatsCard({
|
369
|
+
title,
|
370
|
+
value,
|
371
|
+
subtitle,
|
372
|
+
icon,
|
373
|
+
color,
|
374
|
+
themeIconProps
|
375
|
+
}) {
|
376
|
+
return /* @__PURE__ */ jsxs4(Card, { children: [
|
377
|
+
/* @__PURE__ */ jsx7("div", { className: `absolute inset-0 bg-gradient-to-br ${color} opacity-5` }),
|
378
|
+
/* @__PURE__ */ jsx7(Box, { className: "p-6", children: /* @__PURE__ */ jsxs4("div", { className: "flex items-center justify-between", children: [
|
379
|
+
/* @__PURE__ */ jsxs4("div", { children: [
|
380
|
+
/* @__PURE__ */ jsx7("p", { className: "text-sm font-medium text-muted-foreground", children: title }),
|
381
|
+
/* @__PURE__ */ jsx7("p", { className: "text-3xl font-bold", children: value }),
|
382
|
+
/* @__PURE__ */ jsx7("p", { className: "text-xs text-muted-foreground mt-1", children: subtitle })
|
383
|
+
] }),
|
384
|
+
/* @__PURE__ */ jsx7(ThemeIcon, __spreadProps(__spreadValues({ size: "xl", radius: "xl" }, themeIconProps), { children: icon }))
|
385
|
+
] }) })
|
386
|
+
] });
|
387
|
+
}
|
388
|
+
|
365
389
|
// src/core/input/MyDayOfWeekPicker.tsx
|
366
390
|
import { Badge, Group as Group2 } from "@mantine/core";
|
367
|
-
import { jsx as
|
391
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
368
392
|
var days = Object.entries(enum_daysOfWeek).filter(([key]) => isNaN(Number(key))).map(([label, value]) => ({ label, value }));
|
369
393
|
function MyDayOfWeekPicker({ value = [], onChange }) {
|
370
394
|
const toggle = (val) => {
|
@@ -372,7 +396,7 @@ function MyDayOfWeekPicker({ value = [], onChange }) {
|
|
372
396
|
const newValue = value.includes(val) ? value.filter((v) => v !== val) : [...value, val].sort((a, b) => a - b);
|
373
397
|
onChange(newValue);
|
374
398
|
};
|
375
|
-
return /* @__PURE__ */
|
399
|
+
return /* @__PURE__ */ jsx8(MyFlexRow, { align: "center", children: /* @__PURE__ */ jsx8(Group2, { gap: "xs", children: days.map((d) => /* @__PURE__ */ jsx8(
|
376
400
|
Badge,
|
377
401
|
{
|
378
402
|
variant: value.includes(d.value) ? "filled" : "outline",
|
@@ -389,10 +413,10 @@ function MyDayOfWeekPicker({ value = [], onChange }) {
|
|
389
413
|
|
390
414
|
// src/core/input/MyTextInput.tsx
|
391
415
|
import { TextInput } from "@mantine/core";
|
392
|
-
import { jsx as
|
416
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
393
417
|
function MyTextInput(_a) {
|
394
418
|
var _b = _a, { label, isPhoneNumber } = _b, rest = __objRest(_b, ["label", "isPhoneNumber"]);
|
395
|
-
return /* @__PURE__ */
|
419
|
+
return /* @__PURE__ */ jsx9(
|
396
420
|
TextInput,
|
397
421
|
__spreadValues({
|
398
422
|
onKeyDown: (e) => {
|
@@ -433,7 +457,7 @@ import {
|
|
433
457
|
} from "@mantine/core";
|
434
458
|
import { IconPlus as IconPlus4, IconTrash as IconTrash3 } from "@tabler/icons-react";
|
435
459
|
import { useState as useState2 } from "react";
|
436
|
-
import { jsx as
|
460
|
+
import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
|
437
461
|
function MyWeeklySessionSchedulerPicker({
|
438
462
|
value = [],
|
439
463
|
onChange
|
@@ -464,8 +488,8 @@ function MyWeeklySessionSchedulerPicker({
|
|
464
488
|
return acc;
|
465
489
|
}, {});
|
466
490
|
const getLabel = (day) => enum_daysOfWeek[day] || `Day ${day}`;
|
467
|
-
return /* @__PURE__ */
|
468
|
-
/* @__PURE__ */
|
491
|
+
return /* @__PURE__ */ jsx10(Paper, { w: "100%", p: "md", children: /* @__PURE__ */ jsxs5(MyFlexColumn, { children: [
|
492
|
+
/* @__PURE__ */ jsx10(Center, { children: /* @__PURE__ */ jsx10(
|
469
493
|
MyDayOfWeekPicker,
|
470
494
|
{
|
471
495
|
value: selectedDays,
|
@@ -475,41 +499,41 @@ function MyWeeklySessionSchedulerPicker({
|
|
475
499
|
}
|
476
500
|
}
|
477
501
|
) }),
|
478
|
-
/* @__PURE__ */
|
479
|
-
/* @__PURE__ */
|
502
|
+
/* @__PURE__ */ jsx10(Divider, { my: "xs" }),
|
503
|
+
/* @__PURE__ */ jsx10(Center, { children: /* @__PURE__ */ jsx10(ScrollArea.Autosize, { h: "40vh", children: /* @__PURE__ */ jsx10(MyFlexColumn, { w: { base: "100%", sm: "70%" }, children: selectedDays.map((dayOfWeek) => {
|
480
504
|
var _a;
|
481
|
-
return /* @__PURE__ */
|
505
|
+
return /* @__PURE__ */ jsxs5(
|
482
506
|
Paper,
|
483
507
|
{
|
484
508
|
w: "100%",
|
485
509
|
p: "md",
|
486
510
|
bg: const_object_colors.mantineBackgroundBlueLight,
|
487
511
|
children: [
|
488
|
-
/* @__PURE__ */
|
489
|
-
/* @__PURE__ */
|
490
|
-
/* @__PURE__ */
|
512
|
+
/* @__PURE__ */ jsxs5(Group3, { gap: "apart", children: [
|
513
|
+
/* @__PURE__ */ jsx10(Text3, { w: "70px", fw: 500, children: getLabel(dayOfWeek) }),
|
514
|
+
/* @__PURE__ */ jsx10(
|
491
515
|
Button5,
|
492
516
|
{
|
493
517
|
color: "teal.5",
|
494
|
-
leftSection: /* @__PURE__ */
|
518
|
+
leftSection: /* @__PURE__ */ jsx10(IconPlus4, { size: 14 }),
|
495
519
|
onClick: () => handleAddSession(dayOfWeek),
|
496
520
|
children: "Th\xEAm bu\u1ED5i"
|
497
521
|
}
|
498
522
|
)
|
499
523
|
] }),
|
500
|
-
/* @__PURE__ */
|
524
|
+
/* @__PURE__ */ jsx10(Divider, { my: "sm" }),
|
501
525
|
(_a = grouped[dayOfWeek]) == null ? void 0 : _a.map((item, indexInDay) => {
|
502
526
|
const globalIndex = value.findIndex(
|
503
527
|
(v) => v === item
|
504
528
|
);
|
505
|
-
return /* @__PURE__ */
|
529
|
+
return /* @__PURE__ */ jsxs5(
|
506
530
|
Group3,
|
507
531
|
{
|
508
532
|
mt: "xs",
|
509
533
|
gap: "xs",
|
510
534
|
align: "flex-end",
|
511
535
|
children: [
|
512
|
-
/* @__PURE__ */
|
536
|
+
/* @__PURE__ */ jsx10(
|
513
537
|
NumberInput,
|
514
538
|
{
|
515
539
|
label: "Ti\u1EBFt b\u1EAFt \u0111\u1EA7u",
|
@@ -521,7 +545,7 @@ function MyWeeklySessionSchedulerPicker({
|
|
521
545
|
)
|
522
546
|
}
|
523
547
|
),
|
524
|
-
/* @__PURE__ */
|
548
|
+
/* @__PURE__ */ jsx10(
|
525
549
|
NumberInput,
|
526
550
|
{
|
527
551
|
label: "S\u1ED1 ti\u1EBFt",
|
@@ -533,7 +557,7 @@ function MyWeeklySessionSchedulerPicker({
|
|
533
557
|
)
|
534
558
|
}
|
535
559
|
),
|
536
|
-
/* @__PURE__ */
|
560
|
+
/* @__PURE__ */ jsx10(
|
537
561
|
NumberInput,
|
538
562
|
{
|
539
563
|
label: "S\u1ED1 ph\xFAt ",
|
@@ -542,13 +566,13 @@ function MyWeeklySessionSchedulerPicker({
|
|
542
566
|
value: item.durationMinutes
|
543
567
|
}
|
544
568
|
),
|
545
|
-
/* @__PURE__ */
|
569
|
+
/* @__PURE__ */ jsx10(
|
546
570
|
Button5,
|
547
571
|
{
|
548
572
|
variant: "light",
|
549
573
|
color: "red",
|
550
574
|
onClick: () => handleRemove(globalIndex),
|
551
|
-
leftSection: /* @__PURE__ */
|
575
|
+
leftSection: /* @__PURE__ */ jsx10(IconTrash3, { size: 14 }),
|
552
576
|
children: "X\xF3a bu\u1ED5i"
|
553
577
|
}
|
554
578
|
)
|
@@ -567,10 +591,10 @@ function MyWeeklySessionSchedulerPicker({
|
|
567
591
|
|
568
592
|
// src/core/layout/MyFlexColumn.tsx
|
569
593
|
import { Flex } from "@mantine/core";
|
570
|
-
import { jsx as
|
594
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
571
595
|
function MyFlexColumn2(_a) {
|
572
596
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
573
|
-
return /* @__PURE__ */
|
597
|
+
return /* @__PURE__ */ jsx11(Flex, __spreadProps(__spreadValues({ direction: "column", gap: "md" }, rest), { children }));
|
574
598
|
}
|
575
599
|
|
576
600
|
export {
|
@@ -580,6 +604,7 @@ export {
|
|
580
604
|
MyButtonModal,
|
581
605
|
MyDataTableSelectOne,
|
582
606
|
MyLabelValueRow,
|
607
|
+
MyStatsCard,
|
583
608
|
MyDayOfWeekPicker,
|
584
609
|
MyTextInput,
|
585
610
|
MyWeeklySessionSchedulerPicker,
|
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, TextProps, GroupProps, TextInputProps, FlexProps } from '@mantine/core';
|
3
|
+
import { ActionIconProps, ButtonProps, ModalProps, TextProps, GroupProps, ThemeIconProps, TextInputProps, FlexProps } from '@mantine/core';
|
4
4
|
import { ReactNode } from 'react';
|
5
5
|
import { M as MyApiResponse } from '../createBaseApi-2GYRG_xt.mjs';
|
6
6
|
import { AxiosResponse } from 'axios';
|
@@ -62,6 +62,15 @@ interface LabelValueRowProps {
|
|
62
62
|
}
|
63
63
|
declare function MyLabelValueRow({ label, value, labelProps, valueProps, groupProps }: LabelValueRowProps): react_jsx_runtime.JSX.Element;
|
64
64
|
|
65
|
+
declare function MyStatsCard({ title, value, subtitle, icon, color, themeIconProps }: {
|
66
|
+
title: string;
|
67
|
+
value: number;
|
68
|
+
subtitle: string;
|
69
|
+
icon: ReactNode;
|
70
|
+
color: string;
|
71
|
+
themeIconProps?: ThemeIconProps;
|
72
|
+
}): react_jsx_runtime.JSX.Element;
|
73
|
+
|
65
74
|
interface CoreDayOfWeekPickerProps {
|
66
75
|
value?: number[];
|
67
76
|
onChange?: (val: number[]) => void;
|
@@ -92,4 +101,4 @@ interface IMyFlexColumn extends FlexProps {
|
|
92
101
|
}
|
93
102
|
declare function MyFlexColumn({ children, ...rest }: IMyFlexColumn): react_jsx_runtime.JSX.Element;
|
94
103
|
|
95
|
-
export { type IWeeklySession, MyActionIcon, MyButton, MyButtonCreateUpdate, MyButtonModal, MyDataTableSelectOne, MyDayOfWeekPicker, MyFlexColumn, MyLabelValueRow, MyTextInput, MyWeeklySessionSchedulerPicker, type WeeklySessionSchedulerProps };
|
104
|
+
export { type IWeeklySession, MyActionIcon, MyButton, MyButtonCreateUpdate, MyButtonModal, MyDataTableSelectOne, MyDayOfWeekPicker, MyFlexColumn, MyLabelValueRow, MyStatsCard, MyTextInput, MyWeeklySessionSchedulerPicker, type WeeklySessionSchedulerProps };
|
package/dist/core/index.mjs
CHANGED
@@ -7,9 +7,10 @@ import {
|
|
7
7
|
MyDayOfWeekPicker,
|
8
8
|
MyFlexColumn,
|
9
9
|
MyLabelValueRow,
|
10
|
+
MyStatsCard,
|
10
11
|
MyTextInput,
|
11
12
|
MyWeeklySessionSchedulerPicker
|
12
|
-
} from "../chunk-
|
13
|
+
} from "../chunk-WXLN7SEF.mjs";
|
13
14
|
import "../chunk-GEYCGM75.mjs";
|
14
15
|
import "../chunk-NWBLJ3W3.mjs";
|
15
16
|
import "../chunk-K6S7R6LU.mjs";
|
@@ -25,6 +26,7 @@ export {
|
|
25
26
|
MyDayOfWeekPicker,
|
26
27
|
MyFlexColumn,
|
27
28
|
MyLabelValueRow,
|
29
|
+
MyStatsCard,
|
28
30
|
MyTextInput,
|
29
31
|
MyWeeklySessionSchedulerPicker
|
30
32
|
};
|
@@ -2,6 +2,10 @@ import { I as IBaseEntity } from '../base-BprRafT5.mjs';
|
|
2
2
|
export { I as IEmailConfig } from '../EmailConfig-DvTXTBt3.mjs';
|
3
3
|
export { I as IAQModule } from '../IAQModule-CCtwv-e0.mjs';
|
4
4
|
|
5
|
+
interface IPageContent extends IBaseEntity {
|
6
|
+
description?: string;
|
7
|
+
}
|
8
|
+
|
5
9
|
interface IFile {
|
6
10
|
fileName?: string | undefined;
|
7
11
|
fileExtension?: string | undefined;
|
@@ -51,8 +55,4 @@ interface IUser extends IBaseEntity {
|
|
51
55
|
email?: string;
|
52
56
|
}
|
53
57
|
|
54
|
-
interface IPageContent extends IBaseEntity {
|
55
|
-
description?: string;
|
56
|
-
}
|
57
|
-
|
58
58
|
export { IBaseEntity, type IDocument, type IFile, type IPageContent, type IPagePermission, type IRole, type IUser };
|
@@ -11,6 +11,9 @@ import {
|
|
11
11
|
import {
|
12
12
|
U0DateToDDMMYYYString
|
13
13
|
} from "../chunk-I2XIN2R3.mjs";
|
14
|
+
import {
|
15
|
+
const_object_documentTypes
|
16
|
+
} from "../chunk-BZMQOGL6.mjs";
|
14
17
|
import {
|
15
18
|
F_authenticate_Logout,
|
16
19
|
MyActionIconDelete,
|
@@ -42,15 +45,12 @@ import {
|
|
42
45
|
MyButton as MyButton2,
|
43
46
|
MyDataTableSelectOne,
|
44
47
|
MyTextInput as MyTextInput2
|
45
|
-
} from "../chunk-
|
48
|
+
} from "../chunk-WXLN7SEF.mjs";
|
46
49
|
import {
|
47
50
|
MyDataTable,
|
48
51
|
MyFlexColumn,
|
49
52
|
MyFlexRow
|
50
53
|
} from "../chunk-GEYCGM75.mjs";
|
51
|
-
import {
|
52
|
-
const_object_documentTypes
|
53
|
-
} from "../chunk-BZMQOGL6.mjs";
|
54
54
|
import {
|
55
55
|
const_object_colors
|
56
56
|
} from "../chunk-NWBLJ3W3.mjs";
|