aq-fe-framework 0.1.319 → 0.1.321
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.
- package/dist/chunk-2SBUKAGS.mjs +20 -0
- package/dist/chunk-BZMQOGL6.mjs +13 -0
- package/dist/{chunk-QMQQZF6X.mjs → chunk-FAG4PGP2.mjs} +327 -474
- package/dist/chunk-GEYCGM75.mjs +178 -0
- package/dist/{chunk-PSV5MULK.mjs → chunk-HEW5D3R4.mjs} +65 -25
- package/dist/{chunk-YJ32RSH2.mjs → chunk-YQPDRFRL.mjs} +1 -1
- package/dist/columns/index.mjs +3 -15
- package/dist/components/index.d.mts +3 -1
- package/dist/components/index.mjs +4 -4
- package/dist/const/index.mjs +12 -2
- package/dist/core/index.d.mts +10 -1
- package/dist/core/index.mjs +6 -4
- package/dist/hooks/index.d.mts +2 -2
- package/dist/hooks/index.mjs +1 -1
- package/dist/interfaces/index.d.mts +6 -444
- package/dist/modules-features/index.d.mts +54 -55
- package/dist/modules-features/index.mjs +184 -223
- package/package.json +1 -1
- package/dist/chunk-GFEMKKFH.mjs +0 -25
- package/dist/chunk-HHJFKKE7.mjs +0 -26
@@ -0,0 +1,178 @@
|
|
1
|
+
import {
|
2
|
+
__objRest,
|
3
|
+
__spreadProps,
|
4
|
+
__spreadValues
|
5
|
+
} from "./chunk-FWCSY2DS.mjs";
|
6
|
+
|
7
|
+
// src/components/Layouts/FlexColumn/MyFlexColumn.tsx
|
8
|
+
import { Flex } from "@mantine/core";
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
10
|
+
function MyFlexColumn(_a) {
|
11
|
+
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
12
|
+
return /* @__PURE__ */ jsx(Flex, __spreadProps(__spreadValues({ direction: "column", gap: "md" }, rest), { children }));
|
13
|
+
}
|
14
|
+
|
15
|
+
// src/components/DataDisplay/DataTable/MyDataTable.tsx
|
16
|
+
import { Alert, Button, Center, Group, Portal, Text } from "@mantine/core";
|
17
|
+
import { IconBug, IconDownload } from "@tabler/icons-react";
|
18
|
+
import { download, generateCsv, mkConfig } from "export-to-csv";
|
19
|
+
import {
|
20
|
+
MantineReactTable,
|
21
|
+
useMantineReactTable
|
22
|
+
} from "mantine-react-table";
|
23
|
+
import { MRT_Localization_VI } from "mantine-react-table/locales/vi/index.cjs";
|
24
|
+
import { useEffect } from "react";
|
25
|
+
import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
|
26
|
+
function formatData(data, formats) {
|
27
|
+
return data.map((row) => {
|
28
|
+
const transformedRow = {};
|
29
|
+
Object.entries(row).forEach(([key, value]) => {
|
30
|
+
const formatFn = formats[key];
|
31
|
+
if (value instanceof Date) {
|
32
|
+
transformedRow[key] = formatFn ? formatFn(value.toISOString()) : value.toISOString();
|
33
|
+
} else if (value !== null && typeof value === "object") {
|
34
|
+
transformedRow[key] = formatFn ? formatFn(JSON.stringify(value)) : JSON.stringify(value);
|
35
|
+
} else {
|
36
|
+
transformedRow[key] = formatFn ? formatFn(value) : value;
|
37
|
+
}
|
38
|
+
});
|
39
|
+
return transformedRow;
|
40
|
+
});
|
41
|
+
}
|
42
|
+
function MyDataTable(_a) {
|
43
|
+
var _b = _a, {
|
44
|
+
formats = {},
|
45
|
+
exportAble = false,
|
46
|
+
csvConfigProps,
|
47
|
+
rowActionSize,
|
48
|
+
columns,
|
49
|
+
data,
|
50
|
+
renderTopToolbarCustomActions,
|
51
|
+
setSelectedRow,
|
52
|
+
isError,
|
53
|
+
isLoading,
|
54
|
+
pagination,
|
55
|
+
initialState,
|
56
|
+
state: state
|
57
|
+
} = _b, rest = __objRest(_b, [
|
58
|
+
"formats",
|
59
|
+
"exportAble",
|
60
|
+
"csvConfigProps",
|
61
|
+
"rowActionSize",
|
62
|
+
"columns",
|
63
|
+
"data",
|
64
|
+
"renderTopToolbarCustomActions",
|
65
|
+
"setSelectedRow",
|
66
|
+
"isError",
|
67
|
+
"isLoading",
|
68
|
+
"pagination",
|
69
|
+
"initialState",
|
70
|
+
// setPagination,
|
71
|
+
"state"
|
72
|
+
]);
|
73
|
+
const { renderRowActions } = __spreadValues({}, rest);
|
74
|
+
const csvConfig = mkConfig(__spreadValues({
|
75
|
+
fieldSeparator: ",",
|
76
|
+
decimalSeparator: ".",
|
77
|
+
useKeysAsHeaders: (csvConfigProps == null ? void 0 : csvConfigProps.columnHeaders) ? false : true
|
78
|
+
}, csvConfigProps));
|
79
|
+
const handleExport = (rows) => {
|
80
|
+
if (rows.length == 0) {
|
81
|
+
const transformedData = formatData(data, formats);
|
82
|
+
const csv2 = generateCsv(csvConfig)(transformedData);
|
83
|
+
download(csvConfig)(csv2);
|
84
|
+
return;
|
85
|
+
}
|
86
|
+
const rowData = rows.map((row) => row.original);
|
87
|
+
const transformedRows = formatData(rowData, formats);
|
88
|
+
const csv = generateCsv(csvConfig)(transformedRows);
|
89
|
+
download(csvConfig)(csv);
|
90
|
+
};
|
91
|
+
const table = useMantineReactTable(__spreadValues({
|
92
|
+
columns,
|
93
|
+
data,
|
94
|
+
renderTopToolbarCustomActions: ({ table: table2 }) => {
|
95
|
+
return /* @__PURE__ */ jsxs(Group, { children: [
|
96
|
+
renderTopToolbarCustomActions && renderTopToolbarCustomActions({ table: table2 }),
|
97
|
+
exportAble && /* @__PURE__ */ jsx2(Fragment, { children: /* @__PURE__ */ jsx2(
|
98
|
+
Button,
|
99
|
+
{
|
100
|
+
color: "green.8",
|
101
|
+
onClick: () => handleExport(table2.getSelectedRowModel().rows),
|
102
|
+
leftSection: /* @__PURE__ */ jsx2(IconDownload, {}),
|
103
|
+
variant: "filled",
|
104
|
+
children: "Export"
|
105
|
+
}
|
106
|
+
) })
|
107
|
+
] });
|
108
|
+
},
|
109
|
+
manualPagination: true,
|
110
|
+
enableRowNumbers: true,
|
111
|
+
enableRowSelection: exportAble,
|
112
|
+
enableEditing: renderRowActions ? true : false,
|
113
|
+
positionActionsColumn: "last",
|
114
|
+
enableColumnResizing: true,
|
115
|
+
layoutMode: "semantic",
|
116
|
+
displayColumnDefOptions: {
|
117
|
+
"mrt-row-actions": {
|
118
|
+
header: "Thao t\xE1c",
|
119
|
+
size: rowActionSize
|
120
|
+
},
|
121
|
+
"mrt-row-numbers": {
|
122
|
+
Header: "STT",
|
123
|
+
size: 1
|
124
|
+
}
|
125
|
+
},
|
126
|
+
enableColumnPinning: true,
|
127
|
+
initialState: __spreadValues({
|
128
|
+
density: "md",
|
129
|
+
columnPinning: { right: ["mrt-row-actions"] },
|
130
|
+
columnVisibility: {
|
131
|
+
modifiedWhen: false,
|
132
|
+
modifiedFullName: false
|
133
|
+
}
|
134
|
+
}, initialState),
|
135
|
+
mantineTableHeadCellProps: {
|
136
|
+
style: {
|
137
|
+
verticalAlign: "middle",
|
138
|
+
paddingTop: "2px",
|
139
|
+
paddingBottom: "2px"
|
140
|
+
}
|
141
|
+
},
|
142
|
+
mantineTableBodyCellProps: {
|
143
|
+
style: {
|
144
|
+
paddingTop: "2px",
|
145
|
+
paddingBottom: "2px"
|
146
|
+
}
|
147
|
+
},
|
148
|
+
localization: MRT_Localization_VI,
|
149
|
+
renderEmptyRowsFallback: () => isError ? /* @__PURE__ */ jsx2(Alert, { icon: /* @__PURE__ */ jsx2(IconBug, {}), color: "red", title: "C\xF3 l\u1ED7i x\u1EA3y ra!", m: "md" }) : /* @__PURE__ */ jsxs(Center, { p: "md", children: [
|
150
|
+
" ",
|
151
|
+
/* @__PURE__ */ jsx2(Text, { c: "gray", fw: "600", size: "15px", fs: "italic", children: "Kh\xF4ng c\xF3 d\u1EEF li\u1EC7u!" })
|
152
|
+
] }),
|
153
|
+
state: __spreadValues(__spreadValues({
|
154
|
+
showSkeletons: isLoading
|
155
|
+
}, pagination ? { pagination } : {}), state),
|
156
|
+
mantineTableContainerProps: { style: { maxHeight: "65vh" } },
|
157
|
+
enableStickyHeader: true
|
158
|
+
}, rest));
|
159
|
+
useEffect(() => {
|
160
|
+
setSelectedRow && setSelectedRow(table.getSelectedRowModel().rows.map((row) => row.original));
|
161
|
+
}, [table.getState().rowSelection]);
|
162
|
+
if (data == void 0) return;
|
163
|
+
return /* @__PURE__ */ jsx2("main", { style: { position: "relative", zIndex: 1 }, children: table.getState().isFullScreen ? /* @__PURE__ */ jsx2(Portal, { children: /* @__PURE__ */ jsx2(MantineReactTable, { table }) }) : /* @__PURE__ */ jsx2(MantineReactTable, { table }) });
|
164
|
+
}
|
165
|
+
|
166
|
+
// src/components/Layouts/FlexRow/MyFlexRow.tsx
|
167
|
+
import { Flex as Flex2 } from "@mantine/core";
|
168
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
169
|
+
function MyFlexRow(_a) {
|
170
|
+
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
171
|
+
return /* @__PURE__ */ jsx3(Flex2, __spreadProps(__spreadValues({ gap: "md", align: "center" }, rest), { children }));
|
172
|
+
}
|
173
|
+
|
174
|
+
export {
|
175
|
+
MyFlexColumn,
|
176
|
+
MyDataTable,
|
177
|
+
MyFlexRow
|
178
|
+
};
|
@@ -1,16 +1,17 @@
|
|
1
1
|
import {
|
2
|
-
|
3
|
-
} from "./chunk-K6S7R6LU.mjs";
|
4
|
-
import {
|
2
|
+
MyDataTable,
|
5
3
|
MyFlexColumn,
|
6
4
|
MyFlexRow
|
7
|
-
} from "./chunk-
|
5
|
+
} from "./chunk-GEYCGM75.mjs";
|
8
6
|
import {
|
9
7
|
const_object_colors
|
10
8
|
} from "./chunk-NWBLJ3W3.mjs";
|
9
|
+
import {
|
10
|
+
enum_daysOfWeek
|
11
|
+
} from "./chunk-K6S7R6LU.mjs";
|
11
12
|
import {
|
12
13
|
useMyReactMutation
|
13
|
-
} from "./chunk-
|
14
|
+
} from "./chunk-YQPDRFRL.mjs";
|
14
15
|
import {
|
15
16
|
utils_notification_show
|
16
17
|
} from "./chunk-7ZCOFATU.mjs";
|
@@ -304,9 +305,47 @@ function MyButtonModal({
|
|
304
305
|
] });
|
305
306
|
}
|
306
307
|
|
308
|
+
// src/core/dataDisplay/MyDataTableSelectOne.tsx
|
309
|
+
import { useEffect, useMemo } from "react";
|
310
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
311
|
+
function MyDataTableSelectOne({
|
312
|
+
columns,
|
313
|
+
queryResult,
|
314
|
+
idSelection,
|
315
|
+
setIdSelection
|
316
|
+
}) {
|
317
|
+
const columnsState = useMemo(() => columns, []);
|
318
|
+
useEffect(() => {
|
319
|
+
if (!queryResult.data) return;
|
320
|
+
setIdSelection(queryResult.data[0].id);
|
321
|
+
}, [queryResult.data]);
|
322
|
+
return /* @__PURE__ */ jsx5(
|
323
|
+
MyDataTable,
|
324
|
+
{
|
325
|
+
columns: columnsState,
|
326
|
+
data: queryResult.data || [],
|
327
|
+
isLoading: queryResult.isLoading,
|
328
|
+
isError: queryResult.isError,
|
329
|
+
getRowId: (row) => {
|
330
|
+
var _a;
|
331
|
+
return (_a = row.id) == null ? void 0 : _a.toString();
|
332
|
+
},
|
333
|
+
mantineTableBodyRowProps: ({ row }) => ({
|
334
|
+
onClick: () => {
|
335
|
+
setIdSelection(row.original.id);
|
336
|
+
},
|
337
|
+
style: {
|
338
|
+
cursor: "pointer",
|
339
|
+
backgroundColor: row.original.id == idSelection ? const_object_colors.mantineBackgroundTealLight : "transparent"
|
340
|
+
}
|
341
|
+
})
|
342
|
+
}
|
343
|
+
);
|
344
|
+
}
|
345
|
+
|
307
346
|
// src/core/input/MyDayOfWeekPicker.tsx
|
308
347
|
import { Badge, Group } from "@mantine/core";
|
309
|
-
import { jsx as
|
348
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
310
349
|
var days = Object.entries(enum_daysOfWeek).filter(([key]) => isNaN(Number(key))).map(([label, value]) => ({ label, value }));
|
311
350
|
function MyDayOfWeekPicker({ value = [], onChange }) {
|
312
351
|
const toggle = (val) => {
|
@@ -314,7 +353,7 @@ function MyDayOfWeekPicker({ value = [], onChange }) {
|
|
314
353
|
const newValue = value.includes(val) ? value.filter((v) => v !== val) : [...value, val].sort((a, b) => a - b);
|
315
354
|
onChange(newValue);
|
316
355
|
};
|
317
|
-
return /* @__PURE__ */
|
356
|
+
return /* @__PURE__ */ jsx6(MyFlexRow, { align: "center", children: /* @__PURE__ */ jsx6(Group, { gap: "xs", children: days.map((d) => /* @__PURE__ */ jsx6(
|
318
357
|
Badge,
|
319
358
|
{
|
320
359
|
variant: value.includes(d.value) ? "filled" : "outline",
|
@@ -331,10 +370,10 @@ function MyDayOfWeekPicker({ value = [], onChange }) {
|
|
331
370
|
|
332
371
|
// src/core/input/MyTextInput.tsx
|
333
372
|
import { TextInput } from "@mantine/core";
|
334
|
-
import { jsx as
|
373
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
335
374
|
function MyTextInput(_a) {
|
336
375
|
var _b = _a, { label, isPhoneNumber } = _b, rest = __objRest(_b, ["label", "isPhoneNumber"]);
|
337
|
-
return /* @__PURE__ */
|
376
|
+
return /* @__PURE__ */ jsx7(
|
338
377
|
TextInput,
|
339
378
|
__spreadValues({
|
340
379
|
onKeyDown: (e) => {
|
@@ -374,13 +413,13 @@ import {
|
|
374
413
|
Text as Text2
|
375
414
|
} from "@mantine/core";
|
376
415
|
import { IconPlus as IconPlus4, IconTrash as IconTrash3 } from "@tabler/icons-react";
|
377
|
-
import { useState } from "react";
|
378
|
-
import { jsx as
|
416
|
+
import { useState as useState2 } from "react";
|
417
|
+
import { jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
|
379
418
|
function MyWeeklySessionSchedulerPicker({
|
380
419
|
value = [],
|
381
420
|
onChange
|
382
421
|
}) {
|
383
|
-
const [selectedDays, setSelectedDays] =
|
422
|
+
const [selectedDays, setSelectedDays] = useState2([]);
|
384
423
|
const handleAddSession = (dayOfWeek) => {
|
385
424
|
const newSession = {
|
386
425
|
dayOfWeek,
|
@@ -406,8 +445,8 @@ function MyWeeklySessionSchedulerPicker({
|
|
406
445
|
return acc;
|
407
446
|
}, {});
|
408
447
|
const getLabel = (day) => enum_daysOfWeek[day] || `Day ${day}`;
|
409
|
-
return /* @__PURE__ */
|
410
|
-
/* @__PURE__ */
|
448
|
+
return /* @__PURE__ */ jsx8(Paper, { w: "100%", p: "md", children: /* @__PURE__ */ jsxs3(MyFlexColumn, { children: [
|
449
|
+
/* @__PURE__ */ jsx8(Center, { children: /* @__PURE__ */ jsx8(
|
411
450
|
MyDayOfWeekPicker,
|
412
451
|
{
|
413
452
|
value: selectedDays,
|
@@ -417,8 +456,8 @@ function MyWeeklySessionSchedulerPicker({
|
|
417
456
|
}
|
418
457
|
}
|
419
458
|
) }),
|
420
|
-
/* @__PURE__ */
|
421
|
-
/* @__PURE__ */
|
459
|
+
/* @__PURE__ */ jsx8(Divider, { my: "xs" }),
|
460
|
+
/* @__PURE__ */ jsx8(Center, { children: /* @__PURE__ */ jsx8(ScrollArea.Autosize, { h: "40vh", children: /* @__PURE__ */ jsx8(MyFlexColumn, { w: { base: "100%", sm: "70%" }, children: selectedDays.map((dayOfWeek) => {
|
422
461
|
var _a;
|
423
462
|
return /* @__PURE__ */ jsxs3(
|
424
463
|
Paper,
|
@@ -428,18 +467,18 @@ function MyWeeklySessionSchedulerPicker({
|
|
428
467
|
bg: const_object_colors.mantineBackgroundBlueLight,
|
429
468
|
children: [
|
430
469
|
/* @__PURE__ */ jsxs3(Group2, { gap: "apart", children: [
|
431
|
-
/* @__PURE__ */
|
432
|
-
/* @__PURE__ */
|
470
|
+
/* @__PURE__ */ jsx8(Text2, { w: "70px", fw: 500, children: getLabel(dayOfWeek) }),
|
471
|
+
/* @__PURE__ */ jsx8(
|
433
472
|
Button5,
|
434
473
|
{
|
435
474
|
color: "teal.5",
|
436
|
-
leftSection: /* @__PURE__ */
|
475
|
+
leftSection: /* @__PURE__ */ jsx8(IconPlus4, { size: 14 }),
|
437
476
|
onClick: () => handleAddSession(dayOfWeek),
|
438
477
|
children: "Th\xEAm bu\u1ED5i"
|
439
478
|
}
|
440
479
|
)
|
441
480
|
] }),
|
442
|
-
/* @__PURE__ */
|
481
|
+
/* @__PURE__ */ jsx8(Divider, { my: "sm" }),
|
443
482
|
(_a = grouped[dayOfWeek]) == null ? void 0 : _a.map((item, indexInDay) => {
|
444
483
|
const globalIndex = value.findIndex(
|
445
484
|
(v) => v === item
|
@@ -451,7 +490,7 @@ function MyWeeklySessionSchedulerPicker({
|
|
451
490
|
gap: "xs",
|
452
491
|
align: "flex-end",
|
453
492
|
children: [
|
454
|
-
/* @__PURE__ */
|
493
|
+
/* @__PURE__ */ jsx8(
|
455
494
|
NumberInput,
|
456
495
|
{
|
457
496
|
label: "Ti\u1EBFt b\u1EAFt \u0111\u1EA7u",
|
@@ -463,7 +502,7 @@ function MyWeeklySessionSchedulerPicker({
|
|
463
502
|
)
|
464
503
|
}
|
465
504
|
),
|
466
|
-
/* @__PURE__ */
|
505
|
+
/* @__PURE__ */ jsx8(
|
467
506
|
NumberInput,
|
468
507
|
{
|
469
508
|
label: "S\u1ED1 ti\u1EBFt",
|
@@ -475,7 +514,7 @@ function MyWeeklySessionSchedulerPicker({
|
|
475
514
|
)
|
476
515
|
}
|
477
516
|
),
|
478
|
-
/* @__PURE__ */
|
517
|
+
/* @__PURE__ */ jsx8(
|
479
518
|
NumberInput,
|
480
519
|
{
|
481
520
|
label: "S\u1ED1 ph\xFAt ",
|
@@ -484,13 +523,13 @@ function MyWeeklySessionSchedulerPicker({
|
|
484
523
|
value: item.durationMinutes
|
485
524
|
}
|
486
525
|
),
|
487
|
-
/* @__PURE__ */
|
526
|
+
/* @__PURE__ */ jsx8(
|
488
527
|
Button5,
|
489
528
|
{
|
490
529
|
variant: "light",
|
491
530
|
color: "red",
|
492
531
|
onClick: () => handleRemove(globalIndex),
|
493
|
-
leftSection: /* @__PURE__ */
|
532
|
+
leftSection: /* @__PURE__ */ jsx8(IconTrash3, { size: 14 }),
|
494
533
|
children: "X\xF3a bu\u1ED5i"
|
495
534
|
}
|
496
535
|
)
|
@@ -512,6 +551,7 @@ export {
|
|
512
551
|
MyButton,
|
513
552
|
MyButtonCreateUpdate,
|
514
553
|
MyButtonModal,
|
554
|
+
MyDataTableSelectOne,
|
515
555
|
MyDayOfWeekPicker,
|
516
556
|
MyTextInput,
|
517
557
|
MyWeeklySessionSchedulerPicker
|
package/dist/columns/index.mjs
CHANGED
@@ -1,20 +1,8 @@
|
|
1
1
|
import {
|
2
|
-
|
3
|
-
} from "../chunk-
|
2
|
+
baseColumns
|
3
|
+
} from "../chunk-2SBUKAGS.mjs";
|
4
|
+
import "../chunk-I2XIN2R3.mjs";
|
4
5
|
import "../chunk-FWCSY2DS.mjs";
|
5
|
-
|
6
|
-
// src/columns/baseColumns.ts
|
7
|
-
var baseColumns = [
|
8
|
-
{
|
9
|
-
header: "Ng\xE0y c\u1EADp nh\u1EADt",
|
10
|
-
accessorKey: "modifiedWhen",
|
11
|
-
Cell: ({ cell }) => utils_date_dateToDDMMYYYString(new Date(cell.getValue()))
|
12
|
-
},
|
13
|
-
{
|
14
|
-
header: "Ng\u01B0\u1EDDi c\u1EADp nh\u1EADt",
|
15
|
-
accessorKey: "modifiedFullName"
|
16
|
-
}
|
17
|
-
];
|
18
6
|
export {
|
19
7
|
baseColumns
|
20
8
|
};
|
@@ -319,8 +319,10 @@ interface MyDataTableProps<TData extends MRT_RowData> extends MRT_TableOptions<T
|
|
319
319
|
pageIndex: number;
|
320
320
|
pageSize: number;
|
321
321
|
};
|
322
|
+
state?: Partial<MRT_TableOptions<TData>['state']>;
|
323
|
+
initialState?: Partial<MRT_TableOptions<TData>['initialState']>;
|
322
324
|
}
|
323
|
-
declare function MyDataTable<TData extends MRT_RowData>({ formats, exportAble, csvConfigProps, rowActionSize, columns, data, renderTopToolbarCustomActions, setSelectedRow, isError, isLoading, pagination, ...rest }: MyDataTableProps<TData>): react_jsx_runtime.JSX.Element | undefined;
|
325
|
+
declare function MyDataTable<TData extends MRT_RowData>({ formats, exportAble, csvConfigProps, rowActionSize, columns, data, renderTopToolbarCustomActions, setSelectedRow, isError, isLoading, pagination, initialState, state, ...rest }: MyDataTableProps<TData>): react_jsx_runtime.JSX.Element | undefined;
|
324
326
|
|
325
327
|
interface MyIconTextProps {
|
326
328
|
icon?: React.ElementType;
|
@@ -36,7 +36,6 @@ import {
|
|
36
36
|
MyCenterFull,
|
37
37
|
MyCheckbox,
|
38
38
|
MyContainer,
|
39
|
-
MyDataTable,
|
40
39
|
MyDataTableSelect,
|
41
40
|
MyDateInput,
|
42
41
|
MyFieldset,
|
@@ -64,15 +63,16 @@ import {
|
|
64
63
|
useS_BasicAppShell,
|
65
64
|
useS_ButtonImport,
|
66
65
|
utils_layout_getItemsWithoutLinks
|
67
|
-
} from "../chunk-
|
66
|
+
} from "../chunk-FAG4PGP2.mjs";
|
68
67
|
import "../chunk-Y3YGC5IH.mjs";
|
69
68
|
import "../chunk-5U2JSHSJ.mjs";
|
70
69
|
import {
|
70
|
+
MyDataTable,
|
71
71
|
MyFlexColumn,
|
72
72
|
MyFlexRow
|
73
|
-
} from "../chunk-
|
73
|
+
} from "../chunk-GEYCGM75.mjs";
|
74
74
|
import "../chunk-NWBLJ3W3.mjs";
|
75
|
-
import "../chunk-
|
75
|
+
import "../chunk-YQPDRFRL.mjs";
|
76
76
|
import "../chunk-7ZCOFATU.mjs";
|
77
77
|
import "../chunk-FWCSY2DS.mjs";
|
78
78
|
export {
|
package/dist/const/index.mjs
CHANGED
@@ -1,11 +1,21 @@
|
|
1
1
|
import {
|
2
|
-
const_array_daysOfWeek,
|
3
2
|
const_object_documentTypes
|
4
|
-
} from "../chunk-
|
3
|
+
} from "../chunk-BZMQOGL6.mjs";
|
5
4
|
import {
|
6
5
|
const_object_colors
|
7
6
|
} from "../chunk-NWBLJ3W3.mjs";
|
8
7
|
import "../chunk-FWCSY2DS.mjs";
|
8
|
+
|
9
|
+
// src/const/array/const_array_daysOfWeek.ts
|
10
|
+
var const_array_daysOfWeek = [
|
11
|
+
"Th\u1EE9 Hai",
|
12
|
+
"Th\u1EE9 Ba",
|
13
|
+
"Th\u1EE9 T\u01B0",
|
14
|
+
"Th\u1EE9 N\u0103m",
|
15
|
+
"Th\u1EE9 S\xE1u",
|
16
|
+
"Th\u1EE9 B\u1EA3y",
|
17
|
+
"Ch\u1EE7 Nh\u1EADt"
|
18
|
+
];
|
9
19
|
export {
|
10
20
|
const_array_daysOfWeek,
|
11
21
|
const_object_colors,
|
package/dist/core/index.d.mts
CHANGED
@@ -6,6 +6,8 @@ import { M as MyApiResponse } from '../createBaseApi-2GYRG_xt.mjs';
|
|
6
6
|
import { AxiosResponse } from 'axios';
|
7
7
|
import { UseFormReturnType } from '@mantine/form';
|
8
8
|
import { useDisclosure } from '@mantine/hooks';
|
9
|
+
import { UseQueryResult } from '@tanstack/react-query';
|
10
|
+
import { MRT_RowData, MRT_ColumnDef } from 'mantine-react-table';
|
9
11
|
import '../base-BprRafT5.mjs';
|
10
12
|
|
11
13
|
interface CoreActionIconProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "color" | "style">, ActionIconProps {
|
@@ -43,6 +45,13 @@ interface CoreButtonModalProps {
|
|
43
45
|
}
|
44
46
|
declare function MyButtonModal({ disclosure, children, buttonProps, modalProps, }: CoreButtonModalProps): react_jsx_runtime.JSX.Element;
|
45
47
|
|
48
|
+
declare function MyDataTableSelectOne<TData extends MRT_RowData>({ columns, queryResult, idSelection, setIdSelection }: {
|
49
|
+
columns: MRT_ColumnDef<TData>[];
|
50
|
+
queryResult: UseQueryResult<TData[], Error>;
|
51
|
+
idSelection: string | number | undefined;
|
52
|
+
setIdSelection: (id: string | number | undefined) => void;
|
53
|
+
}): react_jsx_runtime.JSX.Element;
|
54
|
+
|
46
55
|
interface CoreDayOfWeekPickerProps {
|
47
56
|
value?: number[];
|
48
57
|
onChange?: (val: number[]) => void;
|
@@ -68,4 +77,4 @@ interface WeeklySessionSchedulerProps {
|
|
68
77
|
}
|
69
78
|
declare function MyWeeklySessionSchedulerPicker({ value, onChange, }: WeeklySessionSchedulerProps): react_jsx_runtime.JSX.Element;
|
70
79
|
|
71
|
-
export { type IWeeklySession, MyActionIcon, MyButton, MyButtonCreateUpdate, MyButtonModal, MyDayOfWeekPicker, MyTextInput, MyWeeklySessionSchedulerPicker, type WeeklySessionSchedulerProps };
|
80
|
+
export { type IWeeklySession, MyActionIcon, MyButton, MyButtonCreateUpdate, MyButtonModal, MyDataTableSelectOne, MyDayOfWeekPicker, MyTextInput, MyWeeklySessionSchedulerPicker, type WeeklySessionSchedulerProps };
|
package/dist/core/index.mjs
CHANGED
@@ -3,14 +3,15 @@ import {
|
|
3
3
|
MyButton,
|
4
4
|
MyButtonCreateUpdate,
|
5
5
|
MyButtonModal,
|
6
|
+
MyDataTableSelectOne,
|
6
7
|
MyDayOfWeekPicker,
|
7
8
|
MyTextInput,
|
8
9
|
MyWeeklySessionSchedulerPicker
|
9
|
-
} from "../chunk-
|
10
|
-
import "../chunk-
|
11
|
-
import "../chunk-HHJFKKE7.mjs";
|
10
|
+
} from "../chunk-HEW5D3R4.mjs";
|
11
|
+
import "../chunk-GEYCGM75.mjs";
|
12
12
|
import "../chunk-NWBLJ3W3.mjs";
|
13
|
-
import "../chunk-
|
13
|
+
import "../chunk-K6S7R6LU.mjs";
|
14
|
+
import "../chunk-YQPDRFRL.mjs";
|
14
15
|
import "../chunk-7ZCOFATU.mjs";
|
15
16
|
import "../chunk-FWCSY2DS.mjs";
|
16
17
|
export {
|
@@ -18,6 +19,7 @@ export {
|
|
18
19
|
MyButton,
|
19
20
|
MyButtonCreateUpdate,
|
20
21
|
MyButtonModal,
|
22
|
+
MyDataTableSelectOne,
|
21
23
|
MyDayOfWeekPicker,
|
22
24
|
MyTextInput,
|
23
25
|
MyWeeklySessionSchedulerPicker
|
package/dist/hooks/index.d.mts
CHANGED
@@ -37,10 +37,10 @@ interface MyReactQueryProps<IRes, IBody> {
|
|
37
37
|
queryKey: QueryKey;
|
38
38
|
axiosFn: () => Promise<AxiosResponse<MyApiResponse<IRes>, IBody>>;
|
39
39
|
options?: Partial<UseQueryOptions<IRes, Error>>;
|
40
|
-
mockData?: IRes
|
40
|
+
mockData?: IRes;
|
41
41
|
}
|
42
42
|
declare function useMyReactQuery<IRes, IBody>({ queryKey, axiosFn, options, mockData }: MyReactQueryProps<IRes, IBody>): _tanstack_react_query.UseQueryResult<IRes, Error>;
|
43
43
|
|
44
44
|
declare function useQ_AQ_GetAQModule(): _tanstack_react_query.UseQueryResult<IAQModule, Error>;
|
45
45
|
|
46
|
-
export { MyApiResponse, useLoadAxiosConfig, useMyDevice, useMyReactMutation, useMyReactQuery, useMyRouter, useQ_AQ_GetAQModule };
|
46
|
+
export { MyApiResponse, type MyReactQueryProps, useLoadAxiosConfig, useMyDevice, useMyReactMutation, useMyReactQuery, useMyRouter, useQ_AQ_GetAQModule };
|