@dmsi/wedgekit-react 0.0.236 → 0.0.238
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-KSKC53TG.js → chunk-6ZYTR6DU.js} +1 -1
- package/dist/{chunk-E2FXH7FO.js → chunk-MQXOQL3T.js} +2 -2
- package/dist/{chunk-3S6HGDOB.js → chunk-OP5XCT3L.js} +1 -1
- package/dist/{chunk-QZVI635D.js → chunk-PZKWZN6V.js} +33 -19
- package/dist/{chunk-CF7ZTPW4.js → chunk-VGPOI7UP.js} +4 -4
- package/dist/{chunk-7UWREFWU.js → chunk-X73BO77J.js} +1 -1
- package/dist/components/CalendarRange.cjs +60 -4
- package/dist/components/CalendarRange.js +11 -11
- package/dist/components/DataGridCell.js +6 -6
- package/dist/components/DateInput.cjs +12 -4
- package/dist/components/DateInput.js +13 -13
- package/dist/components/DateRangeInput.cjs +12 -4
- package/dist/components/DateRangeInput.js +13 -13
- package/dist/components/FilterGroup.js +11 -11
- package/dist/components/Input.js +2 -2
- package/dist/components/MenuOption.js +2 -2
- package/dist/components/MobileDataGrid.js +3 -3
- package/dist/components/Modal.js +4 -4
- package/dist/components/ModalButtons.js +2 -2
- package/dist/components/ModalHeader.js +2 -2
- package/dist/components/NavigationTab.js +2 -2
- package/dist/components/NavigationTabs.js +2 -2
- package/dist/components/NestedMenu.js +2 -2
- package/dist/components/Notification.js +3 -3
- package/dist/components/OptionPill.js +2 -2
- package/dist/components/PDFViewer.js +6 -6
- package/dist/components/Password.js +2 -2
- package/dist/components/Search.js +3 -3
- package/dist/components/Select.js +3 -3
- package/dist/components/Stepper.js +5 -5
- package/dist/components/Time.js +4 -4
- package/dist/components/Toast.js +3 -3
- package/dist/components/Upload.js +3 -3
- package/dist/components/index.cjs +60 -4
- package/dist/components/index.js +17 -17
- package/package.json +1 -1
- package/src/components/DataGrid/TableBody/TableBodyRow.tsx +19 -1
- package/src/components/DataGrid/types.ts +1 -0
- package/dist/{chunk-SXUQUQQH.js → chunk-3FOAGRIY.js} +3 -3
- package/dist/{chunk-UTJU4IBV.js → chunk-OGMN5SHL.js} +3 -3
- package/dist/{chunk-6IXVPFYC.js → chunk-RJBKI53P.js} +3 -3
- package/dist/{chunk-JYPV4HT6.js → chunk-UVG2TKTG.js} +3 -3
- package/dist/{chunk-FALCLDSX.js → chunk-VR7X3NMG.js} +3 -3
- package/dist/{chunk-ESXNSPIG.js → chunk-YCKRRAJA.js} +3 -3
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
} from "./chunk-4RJKB7LC.js";
|
|
4
4
|
import {
|
|
5
5
|
ModalButtons
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-OGMN5SHL.js";
|
|
7
7
|
import {
|
|
8
8
|
ModalContent
|
|
9
9
|
} from "./chunk-FRHPFACM.js";
|
|
10
10
|
import {
|
|
11
11
|
ModalHeader
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-VR7X3NMG.js";
|
|
13
13
|
import {
|
|
14
14
|
ModalScrim
|
|
15
15
|
} from "./chunk-ZFOANBWG.js";
|
|
@@ -3,38 +3,41 @@ import {
|
|
|
3
3
|
} from "./chunk-QQ5G773N.js";
|
|
4
4
|
import {
|
|
5
5
|
Select
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6ZYTR6DU.js";
|
|
7
|
+
import {
|
|
8
|
+
Checkbox
|
|
9
|
+
} from "./chunk-DXVLA32J.js";
|
|
7
10
|
import {
|
|
8
11
|
DataCellHeader,
|
|
9
12
|
DataGridCell,
|
|
10
13
|
DragAlongCell,
|
|
11
14
|
DraggableCellHeader
|
|
12
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-VGPOI7UP.js";
|
|
13
16
|
import {
|
|
14
17
|
Menu
|
|
15
18
|
} from "./chunk-NA3ODQCN.js";
|
|
16
19
|
import {
|
|
17
20
|
MenuOption
|
|
18
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-RJBKI53P.js";
|
|
22
|
+
import {
|
|
23
|
+
useInfiniteScroll,
|
|
24
|
+
useTableLayout
|
|
25
|
+
} from "./chunk-ZU2K7BD3.js";
|
|
26
|
+
import {
|
|
27
|
+
formatDate
|
|
28
|
+
} from "./chunk-T3F37S6Z.js";
|
|
19
29
|
import {
|
|
20
30
|
Search
|
|
21
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-OP5XCT3L.js";
|
|
22
32
|
import {
|
|
23
33
|
Input
|
|
24
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-YCKRRAJA.js";
|
|
35
|
+
import {
|
|
36
|
+
formatCurrencyDisplay
|
|
37
|
+
} from "./chunk-5UH6QUFB.js";
|
|
25
38
|
import {
|
|
26
39
|
Label
|
|
27
40
|
} from "./chunk-VP7HJX24.js";
|
|
28
|
-
import {
|
|
29
|
-
Checkbox
|
|
30
|
-
} from "./chunk-DXVLA32J.js";
|
|
31
|
-
import {
|
|
32
|
-
Button
|
|
33
|
-
} from "./chunk-KNP4LUFA.js";
|
|
34
|
-
import {
|
|
35
|
-
useInfiniteScroll,
|
|
36
|
-
useTableLayout
|
|
37
|
-
} from "./chunk-ZU2K7BD3.js";
|
|
38
41
|
import {
|
|
39
42
|
Subheader
|
|
40
43
|
} from "./chunk-FS2RQE55.js";
|
|
@@ -44,6 +47,9 @@ import {
|
|
|
44
47
|
import {
|
|
45
48
|
Icon
|
|
46
49
|
} from "./chunk-UAPWR2KE.js";
|
|
50
|
+
import {
|
|
51
|
+
Button
|
|
52
|
+
} from "./chunk-KNP4LUFA.js";
|
|
47
53
|
import {
|
|
48
54
|
componentGap,
|
|
49
55
|
componentPadding
|
|
@@ -112,6 +118,13 @@ import clsx2 from "clsx";
|
|
|
112
118
|
import { flexRender } from "@tanstack/react-table";
|
|
113
119
|
import React from "react";
|
|
114
120
|
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
121
|
+
var valueFormatters = {
|
|
122
|
+
date: (value) => typeof value === "string" ? formatDate(value) : "",
|
|
123
|
+
currency: (value) => formatCurrencyDisplay(value)
|
|
124
|
+
};
|
|
125
|
+
function isValueFormatterKey(value) {
|
|
126
|
+
return typeof value === "string" && value in valueFormatters;
|
|
127
|
+
}
|
|
115
128
|
function TableBodyRow({
|
|
116
129
|
id,
|
|
117
130
|
testid,
|
|
@@ -161,14 +174,15 @@ function TableBodyRow({
|
|
|
161
174
|
/* @__PURE__ */ jsx2("td", { style: { display: "flex", width: virtualPaddingLeft } })
|
|
162
175
|
) : null,
|
|
163
176
|
columns.map((column) => {
|
|
164
|
-
var _a2, _b;
|
|
177
|
+
var _a2, _b, _c;
|
|
165
178
|
const cell = locked ? column : visibleCells[column.index];
|
|
166
179
|
if (!cell) {
|
|
167
180
|
return;
|
|
168
181
|
}
|
|
169
|
-
const
|
|
170
|
-
const
|
|
171
|
-
|
|
182
|
+
const cellFormat = (_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.format;
|
|
183
|
+
const cellAlignment = (_b = cell.column.columnDef.meta) == null ? void 0 : _b.align;
|
|
184
|
+
const cellValue = cellFormat && isValueFormatterKey(cellFormat) ? valueFormatters[cellFormat](cell.getValue()) : cell.getValue();
|
|
185
|
+
return ((_c = cell.column.columnDef.meta) == null ? void 0 : _c.useCustomRenderer) ? /* @__PURE__ */ jsx2(React.Fragment, { children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id) : /* @__PURE__ */ jsx2(
|
|
172
186
|
CellElement,
|
|
173
187
|
{
|
|
174
188
|
id: id ? `${id}-row-${row.id}-cell-${cell.id}` : void 0,
|
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
} from "./chunk-VP36B2MM.js";
|
|
7
7
|
import {
|
|
8
8
|
MenuOption
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-RJBKI53P.js";
|
|
10
|
+
import {
|
|
11
|
+
Search
|
|
12
|
+
} from "./chunk-OP5XCT3L.js";
|
|
10
13
|
import {
|
|
11
14
|
CSS
|
|
12
15
|
} from "./chunk-WVUIIBRR.js";
|
|
13
|
-
import {
|
|
14
|
-
Search
|
|
15
|
-
} from "./chunk-3S6HGDOB.js";
|
|
16
16
|
import {
|
|
17
17
|
Icon
|
|
18
18
|
} from "./chunk-UAPWR2KE.js";
|
|
@@ -472,6 +472,54 @@ function formatCurrencyDisplay(value) {
|
|
|
472
472
|
return decimalPart !== void 0 ? `${formattedInteger}.${decimalPart}` : formattedInteger;
|
|
473
473
|
}
|
|
474
474
|
|
|
475
|
+
// src/utils/date.ts
|
|
476
|
+
function parseDateParts(dateString) {
|
|
477
|
+
const [yearStr, monthStr, dayStr] = dateString.split("-");
|
|
478
|
+
if (!yearStr || !monthStr || !dayStr) {
|
|
479
|
+
return null;
|
|
480
|
+
}
|
|
481
|
+
const year = parseInt(yearStr, 10);
|
|
482
|
+
const month = parseInt(monthStr, 10);
|
|
483
|
+
const day = parseInt(dayStr, 10);
|
|
484
|
+
if (isNaN(year) || isNaN(month) || isNaN(day)) {
|
|
485
|
+
return null;
|
|
486
|
+
}
|
|
487
|
+
return { year, month, day };
|
|
488
|
+
}
|
|
489
|
+
function isValidDateRange(month, day) {
|
|
490
|
+
if (month < 1 || month > 12) {
|
|
491
|
+
return false;
|
|
492
|
+
}
|
|
493
|
+
if (day < 1 || day > 31) {
|
|
494
|
+
return false;
|
|
495
|
+
}
|
|
496
|
+
return true;
|
|
497
|
+
}
|
|
498
|
+
function formatDatePartsToDisplay(year, month, day) {
|
|
499
|
+
const paddedMonth = month.toString().padStart(2, "0");
|
|
500
|
+
const paddedDay = day.toString().padStart(2, "0");
|
|
501
|
+
return `${paddedMonth}/${paddedDay}/${year}`;
|
|
502
|
+
}
|
|
503
|
+
function formatDate(date) {
|
|
504
|
+
if (!date) {
|
|
505
|
+
return "";
|
|
506
|
+
}
|
|
507
|
+
try {
|
|
508
|
+
const dateParts = parseDateParts(date);
|
|
509
|
+
if (!dateParts) {
|
|
510
|
+
return "";
|
|
511
|
+
}
|
|
512
|
+
const { year, month, day } = dateParts;
|
|
513
|
+
if (!isValidDateRange(month, day)) {
|
|
514
|
+
return "";
|
|
515
|
+
}
|
|
516
|
+
return formatDatePartsToDisplay(year, month, day);
|
|
517
|
+
} catch (error) {
|
|
518
|
+
console.error("Error formatting date:", error);
|
|
519
|
+
return "";
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
|
|
475
523
|
// src/utils/mergeObjectArrays.ts
|
|
476
524
|
function mergeObjectArrays(arr1, arr2) {
|
|
477
525
|
const maxLength = Math.max(arr1.length, arr2.length);
|
|
@@ -2322,6 +2370,13 @@ var import_clsx10 = __toESM(require("clsx"), 1);
|
|
|
2322
2370
|
var import_react_table = require("@tanstack/react-table");
|
|
2323
2371
|
var import_react12 = __toESM(require("react"), 1);
|
|
2324
2372
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
2373
|
+
var valueFormatters = {
|
|
2374
|
+
date: (value) => typeof value === "string" ? formatDate(value) : "",
|
|
2375
|
+
currency: (value) => formatCurrencyDisplay(value)
|
|
2376
|
+
};
|
|
2377
|
+
function isValueFormatterKey(value) {
|
|
2378
|
+
return typeof value === "string" && value in valueFormatters;
|
|
2379
|
+
}
|
|
2325
2380
|
function TableBodyRow({
|
|
2326
2381
|
id,
|
|
2327
2382
|
testid,
|
|
@@ -2371,14 +2426,15 @@ function TableBodyRow({
|
|
|
2371
2426
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("td", { style: { display: "flex", width: virtualPaddingLeft } })
|
|
2372
2427
|
) : null,
|
|
2373
2428
|
columns.map((column) => {
|
|
2374
|
-
var _a2, _b;
|
|
2429
|
+
var _a2, _b, _c;
|
|
2375
2430
|
const cell = locked ? column : visibleCells[column.index];
|
|
2376
2431
|
if (!cell) {
|
|
2377
2432
|
return;
|
|
2378
2433
|
}
|
|
2379
|
-
const
|
|
2380
|
-
const
|
|
2381
|
-
|
|
2434
|
+
const cellFormat = (_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.format;
|
|
2435
|
+
const cellAlignment = (_b = cell.column.columnDef.meta) == null ? void 0 : _b.align;
|
|
2436
|
+
const cellValue = cellFormat && isValueFormatterKey(cellFormat) ? valueFormatters[cellFormat](cell.getValue()) : cell.getValue();
|
|
2437
|
+
return ((_c = cell.column.columnDef.meta) == null ? void 0 : _c.useCustomRenderer) ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react12.default.Fragment, { children: (0, import_react_table.flexRender)(cell.column.columnDef.cell, cell.getContext()) }, cell.id) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2382
2438
|
CellElement,
|
|
2383
2439
|
{
|
|
2384
2440
|
id: id ? `${id}-row-${row.id}-cell-${cell.id}` : void 0,
|
|
@@ -2,30 +2,30 @@ import {
|
|
|
2
2
|
CalendarRange,
|
|
3
3
|
CalendarRange_default,
|
|
4
4
|
isWeekend
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-X73BO77J.js";
|
|
6
|
+
import "../chunk-PZKWZN6V.js";
|
|
7
7
|
import "../chunk-QQ5G773N.js";
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-6ZYTR6DU.js";
|
|
9
|
+
import "../chunk-DXVLA32J.js";
|
|
10
|
+
import "../chunk-VGPOI7UP.js";
|
|
10
11
|
import "../chunk-NA3ODQCN.js";
|
|
11
12
|
import "../chunk-VP36B2MM.js";
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-WVUIIBRR.js";
|
|
14
|
-
import "../chunk-3S6HGDOB.js";
|
|
15
|
-
import "../chunk-ESXNSPIG.js";
|
|
16
|
-
import "../chunk-VP7HJX24.js";
|
|
17
|
-
import "../chunk-DXVLA32J.js";
|
|
18
|
-
import "../chunk-KNP4LUFA.js";
|
|
13
|
+
import "../chunk-RJBKI53P.js";
|
|
19
14
|
import "../chunk-ZU2K7BD3.js";
|
|
20
15
|
import "../chunk-VXWSAIB5.js";
|
|
21
16
|
import "../chunk-T3F37S6Z.js";
|
|
17
|
+
import "../chunk-OP5XCT3L.js";
|
|
18
|
+
import "../chunk-YCKRRAJA.js";
|
|
22
19
|
import "../chunk-5UH6QUFB.js";
|
|
20
|
+
import "../chunk-VP7HJX24.js";
|
|
21
|
+
import "../chunk-WVUIIBRR.js";
|
|
23
22
|
import "../chunk-FS2RQE55.js";
|
|
24
23
|
import "../chunk-NWELJDBW.js";
|
|
25
24
|
import "../chunk-QA3KMRA6.js";
|
|
26
25
|
import "../chunk-TJWGFGWX.js";
|
|
27
26
|
import "../chunk-7KLALK3J.js";
|
|
28
27
|
import "../chunk-UAPWR2KE.js";
|
|
28
|
+
import "../chunk-KNP4LUFA.js";
|
|
29
29
|
import "../chunk-6CTCHYIS.js";
|
|
30
30
|
import "../chunk-BBZEL7EG.js";
|
|
31
31
|
export {
|
|
@@ -4,18 +4,18 @@ import {
|
|
|
4
4
|
DataGridCell,
|
|
5
5
|
DragAlongCell,
|
|
6
6
|
DraggableCellHeader
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-VGPOI7UP.js";
|
|
8
8
|
import "../chunk-NA3ODQCN.js";
|
|
9
9
|
import "../chunk-VP36B2MM.js";
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-WVUIIBRR.js";
|
|
12
|
-
import "../chunk-3S6HGDOB.js";
|
|
13
|
-
import "../chunk-ESXNSPIG.js";
|
|
14
|
-
import "../chunk-VP7HJX24.js";
|
|
10
|
+
import "../chunk-RJBKI53P.js";
|
|
15
11
|
import "../chunk-ZU2K7BD3.js";
|
|
16
12
|
import "../chunk-VXWSAIB5.js";
|
|
17
13
|
import "../chunk-T3F37S6Z.js";
|
|
14
|
+
import "../chunk-OP5XCT3L.js";
|
|
15
|
+
import "../chunk-YCKRRAJA.js";
|
|
18
16
|
import "../chunk-5UH6QUFB.js";
|
|
17
|
+
import "../chunk-VP7HJX24.js";
|
|
18
|
+
import "../chunk-WVUIIBRR.js";
|
|
19
19
|
import "../chunk-7KLALK3J.js";
|
|
20
20
|
import "../chunk-UAPWR2KE.js";
|
|
21
21
|
import "../chunk-6CTCHYIS.js";
|
|
@@ -2440,6 +2440,13 @@ var import_clsx10 = __toESM(require("clsx"), 1);
|
|
|
2440
2440
|
var import_react_table = require("@tanstack/react-table");
|
|
2441
2441
|
var import_react12 = __toESM(require("react"), 1);
|
|
2442
2442
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
2443
|
+
var valueFormatters = {
|
|
2444
|
+
date: (value) => typeof value === "string" ? formatDate(value) : "",
|
|
2445
|
+
currency: (value) => formatCurrencyDisplay(value)
|
|
2446
|
+
};
|
|
2447
|
+
function isValueFormatterKey(value) {
|
|
2448
|
+
return typeof value === "string" && value in valueFormatters;
|
|
2449
|
+
}
|
|
2443
2450
|
function TableBodyRow({
|
|
2444
2451
|
id,
|
|
2445
2452
|
testid,
|
|
@@ -2489,14 +2496,15 @@ function TableBodyRow({
|
|
|
2489
2496
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("td", { style: { display: "flex", width: virtualPaddingLeft } })
|
|
2490
2497
|
) : null,
|
|
2491
2498
|
columns.map((column) => {
|
|
2492
|
-
var _a2, _b;
|
|
2499
|
+
var _a2, _b, _c;
|
|
2493
2500
|
const cell = locked ? column : visibleCells[column.index];
|
|
2494
2501
|
if (!cell) {
|
|
2495
2502
|
return;
|
|
2496
2503
|
}
|
|
2497
|
-
const
|
|
2498
|
-
const
|
|
2499
|
-
|
|
2504
|
+
const cellFormat = (_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.format;
|
|
2505
|
+
const cellAlignment = (_b = cell.column.columnDef.meta) == null ? void 0 : _b.align;
|
|
2506
|
+
const cellValue = cellFormat && isValueFormatterKey(cellFormat) ? valueFormatters[cellFormat](cell.getValue()) : cell.getValue();
|
|
2507
|
+
return ((_c = cell.column.columnDef.meta) == null ? void 0 : _c.useCustomRenderer) ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react12.default.Fragment, { children: (0, import_react_table.flexRender)(cell.column.columnDef.cell, cell.getContext()) }, cell.id) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2500
2508
|
CellElement,
|
|
2501
2509
|
{
|
|
2502
2510
|
id: id ? `${id}-row-${row.id}-cell-${cell.id}` : void 0,
|
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CalendarRange
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-X73BO77J.js";
|
|
4
|
+
import "../chunk-PZKWZN6V.js";
|
|
5
5
|
import "../chunk-QQ5G773N.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-6ZYTR6DU.js";
|
|
7
|
+
import "../chunk-DXVLA32J.js";
|
|
8
|
+
import "../chunk-VGPOI7UP.js";
|
|
8
9
|
import "../chunk-NA3ODQCN.js";
|
|
9
10
|
import "../chunk-VP36B2MM.js";
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-WVUIIBRR.js";
|
|
12
|
-
import "../chunk-3S6HGDOB.js";
|
|
13
|
-
import {
|
|
14
|
-
InputBase
|
|
15
|
-
} from "../chunk-ESXNSPIG.js";
|
|
16
|
-
import "../chunk-VP7HJX24.js";
|
|
17
|
-
import "../chunk-DXVLA32J.js";
|
|
18
|
-
import "../chunk-KNP4LUFA.js";
|
|
11
|
+
import "../chunk-RJBKI53P.js";
|
|
19
12
|
import "../chunk-ZU2K7BD3.js";
|
|
20
13
|
import {
|
|
21
14
|
findDocumentRoot
|
|
@@ -27,7 +20,13 @@ import {
|
|
|
27
20
|
isValidDate,
|
|
28
21
|
parseInputDate
|
|
29
22
|
} from "../chunk-T3F37S6Z.js";
|
|
23
|
+
import "../chunk-OP5XCT3L.js";
|
|
24
|
+
import {
|
|
25
|
+
InputBase
|
|
26
|
+
} from "../chunk-YCKRRAJA.js";
|
|
30
27
|
import "../chunk-5UH6QUFB.js";
|
|
28
|
+
import "../chunk-VP7HJX24.js";
|
|
29
|
+
import "../chunk-WVUIIBRR.js";
|
|
31
30
|
import "../chunk-FS2RQE55.js";
|
|
32
31
|
import "../chunk-NWELJDBW.js";
|
|
33
32
|
import "../chunk-QA3KMRA6.js";
|
|
@@ -36,6 +35,7 @@ import "../chunk-7KLALK3J.js";
|
|
|
36
35
|
import {
|
|
37
36
|
Icon
|
|
38
37
|
} from "../chunk-UAPWR2KE.js";
|
|
38
|
+
import "../chunk-KNP4LUFA.js";
|
|
39
39
|
import "../chunk-6CTCHYIS.js";
|
|
40
40
|
import {
|
|
41
41
|
__objRest,
|
|
@@ -2448,6 +2448,13 @@ var import_clsx10 = __toESM(require("clsx"), 1);
|
|
|
2448
2448
|
var import_react_table = require("@tanstack/react-table");
|
|
2449
2449
|
var import_react12 = __toESM(require("react"), 1);
|
|
2450
2450
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
2451
|
+
var valueFormatters = {
|
|
2452
|
+
date: (value) => typeof value === "string" ? formatDate(value) : "",
|
|
2453
|
+
currency: (value) => formatCurrencyDisplay(value)
|
|
2454
|
+
};
|
|
2455
|
+
function isValueFormatterKey(value) {
|
|
2456
|
+
return typeof value === "string" && value in valueFormatters;
|
|
2457
|
+
}
|
|
2451
2458
|
function TableBodyRow({
|
|
2452
2459
|
id,
|
|
2453
2460
|
testid,
|
|
@@ -2497,14 +2504,15 @@ function TableBodyRow({
|
|
|
2497
2504
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("td", { style: { display: "flex", width: virtualPaddingLeft } })
|
|
2498
2505
|
) : null,
|
|
2499
2506
|
columns.map((column) => {
|
|
2500
|
-
var _a2, _b;
|
|
2507
|
+
var _a2, _b, _c;
|
|
2501
2508
|
const cell = locked ? column : visibleCells[column.index];
|
|
2502
2509
|
if (!cell) {
|
|
2503
2510
|
return;
|
|
2504
2511
|
}
|
|
2505
|
-
const
|
|
2506
|
-
const
|
|
2507
|
-
|
|
2512
|
+
const cellFormat = (_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.format;
|
|
2513
|
+
const cellAlignment = (_b = cell.column.columnDef.meta) == null ? void 0 : _b.align;
|
|
2514
|
+
const cellValue = cellFormat && isValueFormatterKey(cellFormat) ? valueFormatters[cellFormat](cell.getValue()) : cell.getValue();
|
|
2515
|
+
return ((_c = cell.column.columnDef.meta) == null ? void 0 : _c.useCustomRenderer) ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react12.default.Fragment, { children: (0, import_react_table.flexRender)(cell.column.columnDef.cell, cell.getContext()) }, cell.id) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2508
2516
|
CellElement,
|
|
2509
2517
|
{
|
|
2510
2518
|
id: id ? `${id}-row-${row.id}-cell-${cell.id}` : void 0,
|
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CalendarRange
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-X73BO77J.js";
|
|
4
|
+
import "../chunk-PZKWZN6V.js";
|
|
5
5
|
import "../chunk-QQ5G773N.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-6ZYTR6DU.js";
|
|
7
|
+
import "../chunk-DXVLA32J.js";
|
|
8
|
+
import "../chunk-VGPOI7UP.js";
|
|
8
9
|
import "../chunk-NA3ODQCN.js";
|
|
9
10
|
import "../chunk-VP36B2MM.js";
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-WVUIIBRR.js";
|
|
12
|
-
import "../chunk-3S6HGDOB.js";
|
|
13
|
-
import {
|
|
14
|
-
InputBase
|
|
15
|
-
} from "../chunk-ESXNSPIG.js";
|
|
16
|
-
import "../chunk-VP7HJX24.js";
|
|
17
|
-
import "../chunk-DXVLA32J.js";
|
|
18
|
-
import "../chunk-KNP4LUFA.js";
|
|
11
|
+
import "../chunk-RJBKI53P.js";
|
|
19
12
|
import "../chunk-ZU2K7BD3.js";
|
|
20
13
|
import {
|
|
21
14
|
findDocumentRoot
|
|
@@ -28,7 +21,13 @@ import {
|
|
|
28
21
|
isValidDateRangeOrder,
|
|
29
22
|
parseInputDate
|
|
30
23
|
} from "../chunk-T3F37S6Z.js";
|
|
24
|
+
import "../chunk-OP5XCT3L.js";
|
|
25
|
+
import {
|
|
26
|
+
InputBase
|
|
27
|
+
} from "../chunk-YCKRRAJA.js";
|
|
31
28
|
import "../chunk-5UH6QUFB.js";
|
|
29
|
+
import "../chunk-VP7HJX24.js";
|
|
30
|
+
import "../chunk-WVUIIBRR.js";
|
|
32
31
|
import "../chunk-FS2RQE55.js";
|
|
33
32
|
import "../chunk-NWELJDBW.js";
|
|
34
33
|
import "../chunk-QA3KMRA6.js";
|
|
@@ -37,6 +36,7 @@ import "../chunk-7KLALK3J.js";
|
|
|
37
36
|
import {
|
|
38
37
|
Icon
|
|
39
38
|
} from "../chunk-UAPWR2KE.js";
|
|
39
|
+
import "../chunk-KNP4LUFA.js";
|
|
40
40
|
import "../chunk-6CTCHYIS.js";
|
|
41
41
|
import {
|
|
42
42
|
__objRest,
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
OptionPill
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-UVG2TKTG.js";
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-ESXNSPIG.js";
|
|
9
|
-
import {
|
|
10
|
-
Label
|
|
11
|
-
} from "../chunk-VP7HJX24.js";
|
|
6
|
+
Link
|
|
7
|
+
} from "../chunk-3BCGS6VO.js";
|
|
12
8
|
import {
|
|
13
9
|
Checkbox
|
|
14
10
|
} from "../chunk-DXVLA32J.js";
|
|
15
|
-
import
|
|
11
|
+
import {
|
|
12
|
+
Search
|
|
13
|
+
} from "../chunk-OP5XCT3L.js";
|
|
14
|
+
import "../chunk-YCKRRAJA.js";
|
|
16
15
|
import "../chunk-5UH6QUFB.js";
|
|
17
|
-
import "../chunk-7KLALK3J.js";
|
|
18
16
|
import {
|
|
19
|
-
|
|
20
|
-
} from "../chunk-
|
|
17
|
+
Label
|
|
18
|
+
} from "../chunk-VP7HJX24.js";
|
|
19
|
+
import "../chunk-7KLALK3J.js";
|
|
21
20
|
import {
|
|
22
21
|
Icon
|
|
23
22
|
} from "../chunk-UAPWR2KE.js";
|
|
23
|
+
import "../chunk-KNP4LUFA.js";
|
|
24
24
|
import {
|
|
25
25
|
baseTransition,
|
|
26
26
|
componentGap,
|
package/dist/components/Input.js
CHANGED
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
InputBase,
|
|
7
7
|
Percentage,
|
|
8
8
|
UOM
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-VP7HJX24.js";
|
|
9
|
+
} from "../chunk-YCKRRAJA.js";
|
|
11
10
|
import "../chunk-5UH6QUFB.js";
|
|
11
|
+
import "../chunk-VP7HJX24.js";
|
|
12
12
|
import "../chunk-UAPWR2KE.js";
|
|
13
13
|
import "../chunk-6CTCHYIS.js";
|
|
14
14
|
import "../chunk-BBZEL7EG.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
MenuOption
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-VP7HJX24.js";
|
|
4
|
+
} from "../chunk-RJBKI53P.js";
|
|
6
5
|
import "../chunk-ZU2K7BD3.js";
|
|
7
6
|
import "../chunk-VXWSAIB5.js";
|
|
8
7
|
import "../chunk-T3F37S6Z.js";
|
|
9
8
|
import "../chunk-5UH6QUFB.js";
|
|
9
|
+
import "../chunk-VP7HJX24.js";
|
|
10
10
|
import "../chunk-7KLALK3J.js";
|
|
11
11
|
import "../chunk-UAPWR2KE.js";
|
|
12
12
|
import "../chunk-6CTCHYIS.js";
|
|
@@ -4,9 +4,6 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
Heading3
|
|
6
6
|
} from "../chunk-KEDK5EWD.js";
|
|
7
|
-
import {
|
|
8
|
-
Button
|
|
9
|
-
} from "../chunk-KNP4LUFA.js";
|
|
10
7
|
import {
|
|
11
8
|
Stack
|
|
12
9
|
} from "../chunk-QA3KMRA6.js";
|
|
@@ -16,6 +13,9 @@ import {
|
|
|
16
13
|
import {
|
|
17
14
|
Icon
|
|
18
15
|
} from "../chunk-UAPWR2KE.js";
|
|
16
|
+
import {
|
|
17
|
+
Button
|
|
18
|
+
} from "../chunk-KNP4LUFA.js";
|
|
19
19
|
import "../chunk-6CTCHYIS.js";
|
|
20
20
|
import "../chunk-BBZEL7EG.js";
|
|
21
21
|
|
package/dist/components/Modal.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
Modal
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-MQXOQL3T.js";
|
|
5
5
|
import "../chunk-4RJKB7LC.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-OGMN5SHL.js";
|
|
7
7
|
import "../chunk-FRHPFACM.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-VR7X3NMG.js";
|
|
9
9
|
import "../chunk-ZFOANBWG.js";
|
|
10
10
|
import "../chunk-KEDK5EWD.js";
|
|
11
|
-
import "../chunk-KNP4LUFA.js";
|
|
12
11
|
import "../chunk-ZU2K7BD3.js";
|
|
13
12
|
import "../chunk-VXWSAIB5.js";
|
|
14
13
|
import "../chunk-T3F37S6Z.js";
|
|
15
14
|
import "../chunk-5UH6QUFB.js";
|
|
16
15
|
import "../chunk-UAPWR2KE.js";
|
|
16
|
+
import "../chunk-KNP4LUFA.js";
|
|
17
17
|
import "../chunk-6CTCHYIS.js";
|
|
18
18
|
import "../chunk-BBZEL7EG.js";
|
|
19
19
|
export {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ModalButtons
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-KNP4LUFA.js";
|
|
3
|
+
} from "../chunk-OGMN5SHL.js";
|
|
5
4
|
import "../chunk-UAPWR2KE.js";
|
|
5
|
+
import "../chunk-KNP4LUFA.js";
|
|
6
6
|
import "../chunk-6CTCHYIS.js";
|
|
7
7
|
import "../chunk-BBZEL7EG.js";
|
|
8
8
|
export {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ModalHeader
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-VR7X3NMG.js";
|
|
4
4
|
import "../chunk-KEDK5EWD.js";
|
|
5
|
-
import "../chunk-KNP4LUFA.js";
|
|
6
5
|
import "../chunk-UAPWR2KE.js";
|
|
6
|
+
import "../chunk-KNP4LUFA.js";
|
|
7
7
|
import "../chunk-6CTCHYIS.js";
|
|
8
8
|
import "../chunk-BBZEL7EG.js";
|
|
9
9
|
export {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NavigationTab
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-KNP4LUFA.js";
|
|
3
|
+
} from "../chunk-3FOAGRIY.js";
|
|
5
4
|
import "../chunk-UAPWR2KE.js";
|
|
5
|
+
import "../chunk-KNP4LUFA.js";
|
|
6
6
|
import "../chunk-6CTCHYIS.js";
|
|
7
7
|
import "../chunk-BBZEL7EG.js";
|
|
8
8
|
export {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
NavigationTab
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-KNP4LUFA.js";
|
|
4
|
+
} from "../chunk-3FOAGRIY.js";
|
|
6
5
|
import "../chunk-UAPWR2KE.js";
|
|
6
|
+
import "../chunk-KNP4LUFA.js";
|
|
7
7
|
import {
|
|
8
8
|
componentGap
|
|
9
9
|
} from "../chunk-6CTCHYIS.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
MenuOption
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-VP7HJX24.js";
|
|
4
|
+
} from "../chunk-RJBKI53P.js";
|
|
6
5
|
import {
|
|
7
6
|
useKeydown
|
|
8
7
|
} from "../chunk-ZU2K7BD3.js";
|
|
9
8
|
import "../chunk-VXWSAIB5.js";
|
|
10
9
|
import "../chunk-T3F37S6Z.js";
|
|
11
10
|
import "../chunk-5UH6QUFB.js";
|
|
11
|
+
import "../chunk-VP7HJX24.js";
|
|
12
12
|
import "../chunk-7KLALK3J.js";
|
|
13
13
|
import {
|
|
14
14
|
Icon
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
import {
|
|
3
3
|
Heading3
|
|
4
4
|
} from "../chunk-KEDK5EWD.js";
|
|
5
|
-
import {
|
|
6
|
-
Button
|
|
7
|
-
} from "../chunk-KNP4LUFA.js";
|
|
8
5
|
import {
|
|
9
6
|
Stack
|
|
10
7
|
} from "../chunk-QA3KMRA6.js";
|
|
@@ -14,6 +11,9 @@ import {
|
|
|
14
11
|
import {
|
|
15
12
|
Icon
|
|
16
13
|
} from "../chunk-UAPWR2KE.js";
|
|
14
|
+
import {
|
|
15
|
+
Button
|
|
16
|
+
} from "../chunk-KNP4LUFA.js";
|
|
17
17
|
import "../chunk-6CTCHYIS.js";
|
|
18
18
|
import {
|
|
19
19
|
__objRest,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OptionPill
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-UVG2TKTG.js";
|
|
4
4
|
import "../chunk-VP7HJX24.js";
|
|
5
|
-
import "../chunk-KNP4LUFA.js";
|
|
6
5
|
import "../chunk-UAPWR2KE.js";
|
|
6
|
+
import "../chunk-KNP4LUFA.js";
|
|
7
7
|
import "../chunk-6CTCHYIS.js";
|
|
8
8
|
import "../chunk-BBZEL7EG.js";
|
|
9
9
|
export {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
Modal
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-MQXOQL3T.js";
|
|
5
5
|
import "../chunk-4RJKB7LC.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-OGMN5SHL.js";
|
|
7
7
|
import "../chunk-FRHPFACM.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-VR7X3NMG.js";
|
|
9
9
|
import "../chunk-ZFOANBWG.js";
|
|
10
10
|
import {
|
|
11
11
|
Spinner
|
|
@@ -13,9 +13,6 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
Heading3
|
|
15
15
|
} from "../chunk-KEDK5EWD.js";
|
|
16
|
-
import {
|
|
17
|
-
Button
|
|
18
|
-
} from "../chunk-KNP4LUFA.js";
|
|
19
16
|
import "../chunk-ZU2K7BD3.js";
|
|
20
17
|
import "../chunk-VXWSAIB5.js";
|
|
21
18
|
import "../chunk-T3F37S6Z.js";
|
|
@@ -29,6 +26,9 @@ import {
|
|
|
29
26
|
import {
|
|
30
27
|
Icon
|
|
31
28
|
} from "../chunk-UAPWR2KE.js";
|
|
29
|
+
import {
|
|
30
|
+
Button
|
|
31
|
+
} from "../chunk-KNP4LUFA.js";
|
|
32
32
|
import "../chunk-6CTCHYIS.js";
|
|
33
33
|
import {
|
|
34
34
|
__async
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
Search
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-VP7HJX24.js";
|
|
4
|
+
} from "../chunk-OP5XCT3L.js";
|
|
5
|
+
import "../chunk-YCKRRAJA.js";
|
|
7
6
|
import "../chunk-5UH6QUFB.js";
|
|
7
|
+
import "../chunk-VP7HJX24.js";
|
|
8
8
|
import "../chunk-UAPWR2KE.js";
|
|
9
9
|
import "../chunk-6CTCHYIS.js";
|
|
10
10
|
import "../chunk-BBZEL7EG.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
Select
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-VP7HJX24.js";
|
|
4
|
+
} from "../chunk-6ZYTR6DU.js";
|
|
5
|
+
import "../chunk-YCKRRAJA.js";
|
|
7
6
|
import "../chunk-5UH6QUFB.js";
|
|
7
|
+
import "../chunk-VP7HJX24.js";
|
|
8
8
|
import "../chunk-UAPWR2KE.js";
|
|
9
9
|
import "../chunk-6CTCHYIS.js";
|
|
10
10
|
import "../chunk-BBZEL7EG.js";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
InputBase
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-VP7HJX24.js";
|
|
6
|
-
import {
|
|
7
|
-
Button
|
|
8
|
-
} from "../chunk-KNP4LUFA.js";
|
|
4
|
+
} from "../chunk-YCKRRAJA.js";
|
|
9
5
|
import "../chunk-5UH6QUFB.js";
|
|
6
|
+
import "../chunk-VP7HJX24.js";
|
|
10
7
|
import {
|
|
11
8
|
Icon
|
|
12
9
|
} from "../chunk-UAPWR2KE.js";
|
|
10
|
+
import {
|
|
11
|
+
Button
|
|
12
|
+
} from "../chunk-KNP4LUFA.js";
|
|
13
13
|
import {
|
|
14
14
|
componentGap
|
|
15
15
|
} from "../chunk-6CTCHYIS.js";
|
package/dist/components/Time.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
InputBase
|
|
3
|
-
} from "../chunk-ESXNSPIG.js";
|
|
4
|
-
import "../chunk-VP7HJX24.js";
|
|
5
1
|
import {
|
|
6
2
|
findDocumentRoot
|
|
7
3
|
} from "../chunk-VXWSAIB5.js";
|
|
8
4
|
import "../chunk-T3F37S6Z.js";
|
|
5
|
+
import {
|
|
6
|
+
InputBase
|
|
7
|
+
} from "../chunk-YCKRRAJA.js";
|
|
9
8
|
import "../chunk-5UH6QUFB.js";
|
|
9
|
+
import "../chunk-VP7HJX24.js";
|
|
10
10
|
import {
|
|
11
11
|
Stack
|
|
12
12
|
} from "../chunk-QA3KMRA6.js";
|
package/dist/components/Toast.js
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
import {
|
|
3
3
|
Heading3
|
|
4
4
|
} from "../chunk-KEDK5EWD.js";
|
|
5
|
-
import {
|
|
6
|
-
Button
|
|
7
|
-
} from "../chunk-KNP4LUFA.js";
|
|
8
5
|
import {
|
|
9
6
|
Paragraph
|
|
10
7
|
} from "../chunk-7KLALK3J.js";
|
|
11
8
|
import {
|
|
12
9
|
Icon
|
|
13
10
|
} from "../chunk-UAPWR2KE.js";
|
|
11
|
+
import {
|
|
12
|
+
Button
|
|
13
|
+
} from "../chunk-KNP4LUFA.js";
|
|
14
14
|
import {
|
|
15
15
|
componentGap,
|
|
16
16
|
componentPadding,
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Spinner
|
|
3
3
|
} from "../chunk-PLMGI5K5.js";
|
|
4
|
-
import {
|
|
5
|
-
Button
|
|
6
|
-
} from "../chunk-KNP4LUFA.js";
|
|
7
4
|
import {
|
|
8
5
|
Stack
|
|
9
6
|
} from "../chunk-QA3KMRA6.js";
|
|
@@ -13,6 +10,9 @@ import {
|
|
|
13
10
|
import {
|
|
14
11
|
Icon
|
|
15
12
|
} from "../chunk-UAPWR2KE.js";
|
|
13
|
+
import {
|
|
14
|
+
Button
|
|
15
|
+
} from "../chunk-KNP4LUFA.js";
|
|
16
16
|
import {
|
|
17
17
|
componentGap
|
|
18
18
|
} from "../chunk-6CTCHYIS.js";
|
|
@@ -483,6 +483,54 @@ function formatCurrencyDisplay(value) {
|
|
|
483
483
|
return decimalPart !== void 0 ? `${formattedInteger}.${decimalPart}` : formattedInteger;
|
|
484
484
|
}
|
|
485
485
|
|
|
486
|
+
// src/utils/date.ts
|
|
487
|
+
function parseDateParts(dateString) {
|
|
488
|
+
const [yearStr, monthStr, dayStr] = dateString.split("-");
|
|
489
|
+
if (!yearStr || !monthStr || !dayStr) {
|
|
490
|
+
return null;
|
|
491
|
+
}
|
|
492
|
+
const year = parseInt(yearStr, 10);
|
|
493
|
+
const month = parseInt(monthStr, 10);
|
|
494
|
+
const day = parseInt(dayStr, 10);
|
|
495
|
+
if (isNaN(year) || isNaN(month) || isNaN(day)) {
|
|
496
|
+
return null;
|
|
497
|
+
}
|
|
498
|
+
return { year, month, day };
|
|
499
|
+
}
|
|
500
|
+
function isValidDateRange(month, day) {
|
|
501
|
+
if (month < 1 || month > 12) {
|
|
502
|
+
return false;
|
|
503
|
+
}
|
|
504
|
+
if (day < 1 || day > 31) {
|
|
505
|
+
return false;
|
|
506
|
+
}
|
|
507
|
+
return true;
|
|
508
|
+
}
|
|
509
|
+
function formatDatePartsToDisplay(year, month, day) {
|
|
510
|
+
const paddedMonth = month.toString().padStart(2, "0");
|
|
511
|
+
const paddedDay = day.toString().padStart(2, "0");
|
|
512
|
+
return `${paddedMonth}/${paddedDay}/${year}`;
|
|
513
|
+
}
|
|
514
|
+
function formatDate(date) {
|
|
515
|
+
if (!date) {
|
|
516
|
+
return "";
|
|
517
|
+
}
|
|
518
|
+
try {
|
|
519
|
+
const dateParts = parseDateParts(date);
|
|
520
|
+
if (!dateParts) {
|
|
521
|
+
return "";
|
|
522
|
+
}
|
|
523
|
+
const { year, month, day } = dateParts;
|
|
524
|
+
if (!isValidDateRange(month, day)) {
|
|
525
|
+
return "";
|
|
526
|
+
}
|
|
527
|
+
return formatDatePartsToDisplay(year, month, day);
|
|
528
|
+
} catch (error) {
|
|
529
|
+
console.error("Error formatting date:", error);
|
|
530
|
+
return "";
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
|
|
486
534
|
// src/utils/mergeObjectArrays.ts
|
|
487
535
|
function mergeObjectArrays(arr1, arr2) {
|
|
488
536
|
const maxLength = Math.max(arr1.length, arr2.length);
|
|
@@ -2333,6 +2381,13 @@ var import_clsx10 = __toESM(require("clsx"), 1);
|
|
|
2333
2381
|
var import_react_table = require("@tanstack/react-table");
|
|
2334
2382
|
var import_react12 = __toESM(require("react"), 1);
|
|
2335
2383
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
2384
|
+
var valueFormatters = {
|
|
2385
|
+
date: (value) => typeof value === "string" ? formatDate(value) : "",
|
|
2386
|
+
currency: (value) => formatCurrencyDisplay(value)
|
|
2387
|
+
};
|
|
2388
|
+
function isValueFormatterKey(value) {
|
|
2389
|
+
return typeof value === "string" && value in valueFormatters;
|
|
2390
|
+
}
|
|
2336
2391
|
function TableBodyRow({
|
|
2337
2392
|
id,
|
|
2338
2393
|
testid,
|
|
@@ -2382,14 +2437,15 @@ function TableBodyRow({
|
|
|
2382
2437
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("td", { style: { display: "flex", width: virtualPaddingLeft } })
|
|
2383
2438
|
) : null,
|
|
2384
2439
|
columns.map((column) => {
|
|
2385
|
-
var _a2, _b;
|
|
2440
|
+
var _a2, _b, _c;
|
|
2386
2441
|
const cell = locked ? column : visibleCells[column.index];
|
|
2387
2442
|
if (!cell) {
|
|
2388
2443
|
return;
|
|
2389
2444
|
}
|
|
2390
|
-
const
|
|
2391
|
-
const
|
|
2392
|
-
|
|
2445
|
+
const cellFormat = (_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.format;
|
|
2446
|
+
const cellAlignment = (_b = cell.column.columnDef.meta) == null ? void 0 : _b.align;
|
|
2447
|
+
const cellValue = cellFormat && isValueFormatterKey(cellFormat) ? valueFormatters[cellFormat](cell.getValue()) : cell.getValue();
|
|
2448
|
+
return ((_c = cell.column.columnDef.meta) == null ? void 0 : _c.useCustomRenderer) ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react12.default.Fragment, { children: (0, import_react_table.flexRender)(cell.column.columnDef.cell, cell.getContext()) }, cell.id) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2393
2449
|
CellElement,
|
|
2394
2450
|
{
|
|
2395
2451
|
id: id ? `${id}-row-${row.id}-cell-${cell.id}` : void 0,
|
package/dist/components/index.js
CHANGED
|
@@ -1,45 +1,42 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DataGrid
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-PZKWZN6V.js";
|
|
4
4
|
import {
|
|
5
5
|
Tooltip
|
|
6
6
|
} from "../chunk-QQ5G773N.js";
|
|
7
7
|
import {
|
|
8
8
|
Select
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-6ZYTR6DU.js";
|
|
10
|
+
import {
|
|
11
|
+
Checkbox
|
|
12
|
+
} from "../chunk-DXVLA32J.js";
|
|
10
13
|
import {
|
|
11
14
|
DataCellHeader,
|
|
12
15
|
DataGridCell,
|
|
13
16
|
DragAlongCell,
|
|
14
17
|
DraggableCellHeader
|
|
15
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-VGPOI7UP.js";
|
|
16
19
|
import {
|
|
17
20
|
Menu
|
|
18
21
|
} from "../chunk-NA3ODQCN.js";
|
|
19
22
|
import "../chunk-VP36B2MM.js";
|
|
20
23
|
import {
|
|
21
24
|
MenuOption
|
|
22
|
-
} from "../chunk-
|
|
23
|
-
import "../chunk-
|
|
25
|
+
} from "../chunk-RJBKI53P.js";
|
|
26
|
+
import "../chunk-ZU2K7BD3.js";
|
|
27
|
+
import "../chunk-VXWSAIB5.js";
|
|
28
|
+
import "../chunk-T3F37S6Z.js";
|
|
24
29
|
import {
|
|
25
30
|
Search
|
|
26
|
-
} from "../chunk-
|
|
31
|
+
} from "../chunk-OP5XCT3L.js";
|
|
27
32
|
import {
|
|
28
33
|
Input
|
|
29
|
-
} from "../chunk-
|
|
34
|
+
} from "../chunk-YCKRRAJA.js";
|
|
35
|
+
import "../chunk-5UH6QUFB.js";
|
|
30
36
|
import {
|
|
31
37
|
Label
|
|
32
38
|
} from "../chunk-VP7HJX24.js";
|
|
33
|
-
import
|
|
34
|
-
Checkbox
|
|
35
|
-
} from "../chunk-DXVLA32J.js";
|
|
36
|
-
import {
|
|
37
|
-
Button
|
|
38
|
-
} from "../chunk-KNP4LUFA.js";
|
|
39
|
-
import "../chunk-ZU2K7BD3.js";
|
|
40
|
-
import "../chunk-VXWSAIB5.js";
|
|
41
|
-
import "../chunk-T3F37S6Z.js";
|
|
42
|
-
import "../chunk-5UH6QUFB.js";
|
|
39
|
+
import "../chunk-WVUIIBRR.js";
|
|
43
40
|
import {
|
|
44
41
|
Subheader
|
|
45
42
|
} from "../chunk-FS2RQE55.js";
|
|
@@ -56,6 +53,9 @@ import {
|
|
|
56
53
|
import {
|
|
57
54
|
Icon
|
|
58
55
|
} from "../chunk-UAPWR2KE.js";
|
|
56
|
+
import {
|
|
57
|
+
Button
|
|
58
|
+
} from "../chunk-KNP4LUFA.js";
|
|
59
59
|
import "../chunk-6CTCHYIS.js";
|
|
60
60
|
import "../chunk-BBZEL7EG.js";
|
|
61
61
|
export {
|
package/package.json
CHANGED
|
@@ -3,6 +3,19 @@ import { Cell, flexRender, Row } from "@tanstack/react-table";
|
|
|
3
3
|
import { VirtualItem, Virtualizer } from "@tanstack/react-virtual";
|
|
4
4
|
import React from "react";
|
|
5
5
|
import { DataGridCell, DragAlongCell, Paragraph, Tooltip } from "../..";
|
|
6
|
+
import { formatCurrencyDisplay, formatDate } from "../../../utils";
|
|
7
|
+
|
|
8
|
+
const valueFormatters = {
|
|
9
|
+
date: (value: unknown) =>
|
|
10
|
+
typeof value === "string" ? formatDate(value) : "",
|
|
11
|
+
currency: (value: unknown) => formatCurrencyDisplay(value as string),
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
type ValueFormatterKey = keyof typeof valueFormatters;
|
|
15
|
+
|
|
16
|
+
function isValueFormatterKey(value: unknown): value is ValueFormatterKey {
|
|
17
|
+
return typeof value === "string" && value in valueFormatters;
|
|
18
|
+
}
|
|
6
19
|
|
|
7
20
|
interface TableBodyRowProps<T> {
|
|
8
21
|
id?: string;
|
|
@@ -90,8 +103,13 @@ export function TableBodyRow<T>({
|
|
|
90
103
|
if (!cell) {
|
|
91
104
|
return;
|
|
92
105
|
}
|
|
106
|
+
const cellFormat = cell.column.columnDef.meta?.format;
|
|
93
107
|
const cellAlignment = cell.column.columnDef.meta?.align;
|
|
94
|
-
|
|
108
|
+
|
|
109
|
+
const cellValue =
|
|
110
|
+
cellFormat && isValueFormatterKey(cellFormat)
|
|
111
|
+
? valueFormatters[cellFormat](cell.getValue())
|
|
112
|
+
: cell.getValue();
|
|
95
113
|
|
|
96
114
|
return cell.column.columnDef.meta?.useCustomRenderer ? (
|
|
97
115
|
<React.Fragment key={cell.id}>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Label
|
|
3
3
|
} from "./chunk-VP7HJX24.js";
|
|
4
|
-
import {
|
|
5
|
-
Button
|
|
6
|
-
} from "./chunk-KNP4LUFA.js";
|
|
7
4
|
import {
|
|
8
5
|
Icon
|
|
9
6
|
} from "./chunk-UAPWR2KE.js";
|
|
7
|
+
import {
|
|
8
|
+
Button
|
|
9
|
+
} from "./chunk-KNP4LUFA.js";
|
|
10
10
|
import {
|
|
11
11
|
baseTransition,
|
|
12
12
|
componentGap,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Heading2
|
|
3
3
|
} from "./chunk-KEDK5EWD.js";
|
|
4
|
-
import {
|
|
5
|
-
Button
|
|
6
|
-
} from "./chunk-KNP4LUFA.js";
|
|
7
4
|
import {
|
|
8
5
|
Icon
|
|
9
6
|
} from "./chunk-UAPWR2KE.js";
|
|
7
|
+
import {
|
|
8
|
+
Button
|
|
9
|
+
} from "./chunk-KNP4LUFA.js";
|
|
10
10
|
import {
|
|
11
11
|
layoutGroupGap,
|
|
12
12
|
layoutPaddding
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Label
|
|
3
|
-
} from "./chunk-VP7HJX24.js";
|
|
4
1
|
import {
|
|
5
2
|
formatCurrencyDisplay,
|
|
6
3
|
formatDecimalValue,
|
|
7
4
|
getDecimalPlaceholder
|
|
8
5
|
} from "./chunk-5UH6QUFB.js";
|
|
6
|
+
import {
|
|
7
|
+
Label
|
|
8
|
+
} from "./chunk-VP7HJX24.js";
|
|
9
9
|
import {
|
|
10
10
|
Icon
|
|
11
11
|
} from "./chunk-UAPWR2KE.js";
|