@dcs-tech/ui 0.9.0 → 0.11.0
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/CHANGELOG.md +488 -0
- package/README.md +43 -7
- package/THIRD_PARTY_NOTICES.md +23 -0
- package/dist/ChartImageMenu-sB2QNQzd.js +9673 -0
- package/dist/ChartView-BstZkP1g.js +1942 -0
- package/dist/{SummaryChart-CxRjK_HU.js → SummaryChart-B5ibDNOZ.js} +11 -10
- package/dist/{SummaryImage-Crf1R-3a.js → SummaryImage-CRP7X2Nl.js} +2 -2
- package/dist/SummarySeeAll-CtYRGV4G.js +101 -0
- package/dist/assets/fileTask.worker-D97s2vRV.js +1 -0
- package/dist/columnValue-BOn9NC8X.js +644 -0
- package/dist/exportContext-CMzuzRjc.js +274 -0
- package/dist/{exportEngine-BFZD6djX.js → exportEngine-CYDN8Ty-.js} +167 -137
- package/dist/file-worker.js +1 -1
- package/dist/{fileActions-CFNO14Aj.js → fileActions-DkPEWE-t.js} +1 -1
- package/dist/{geometry-yZmKN662.js → geometry-CFS5If1N.js} +848 -439
- package/dist/index.js +24208 -12603
- package/dist/{labels-CnqqTrne.js → labels-mukFhYkc.js} +126 -1
- package/dist/{runFileTask-BIZTFnZP.js → runFileTask-DI_39TjR.js} +17 -0
- package/dist/scrollArea-B52kugL1.js +291 -0
- package/dist/style.css +1 -1
- package/dist/{summaryChartData-CARqGRUl.js → summaryChartData-D15kw64n.js} +10 -3
- package/dist/types/components/Alert/Alert.d.ts +16 -0
- package/dist/types/components/Alert/index.d.ts +2 -0
- package/dist/types/components/Card/Card.d.ts +4 -3
- package/dist/types/components/Card/index.d.ts +1 -1
- package/dist/types/components/Charts/BarList.d.ts +4 -3
- package/dist/types/components/Charts/CalendarHeatmap.d.ts +4 -2
- package/dist/types/components/Charts/Chart.d.ts +3 -2
- package/dist/types/components/Charts/ChartView.d.ts +3 -2
- package/dist/types/components/Charts/ColumnChart.d.ts +4 -3
- package/dist/types/components/Charts/Donut.d.ts +3 -2
- package/dist/types/components/Charts/Funnel.d.ts +4 -2
- package/dist/types/components/Charts/Gauge.d.ts +3 -2
- package/dist/types/components/Charts/LineChart.d.ts +4 -3
- package/dist/types/components/Charts/NumberTrend.d.ts +4 -3
- package/dist/types/components/Charts/Progress.d.ts +3 -2
- package/dist/types/components/Charts/StackedBar.d.ts +3 -2
- package/dist/types/components/Charts/Treemap.d.ts +3 -2
- package/dist/types/components/Charts/chartData.d.ts +6 -0
- package/dist/types/components/Charts/chartImage.d.ts +3 -0
- package/dist/types/components/Charts/geometry.d.ts +3 -0
- package/dist/types/components/Charts/index.d.ts +2 -0
- package/dist/types/components/Charts/palette.d.ts +1 -0
- package/dist/types/components/Charts/parts.d.ts +14 -0
- package/dist/types/components/Charts/useChartMotion.d.ts +8 -0
- package/dist/types/components/ChipInput/ChipTags.d.ts +3 -0
- package/dist/types/components/CommandPalette/CommandPaletteTrigger.d.ts +9 -0
- package/dist/types/components/CommandPalette/index.d.ts +2 -0
- package/dist/types/components/DataTable/DataTable.d.ts +3 -1
- package/dist/types/components/DataTable/DisplayPopover.d.ts +1 -0
- package/dist/types/components/DataTable/HeaderMenu.d.ts +1 -0
- package/dist/types/components/DataTable/TableColumnModal.d.ts +4 -1
- package/dist/types/components/DataTable/TablePagination.d.ts +1 -1
- package/dist/types/components/DataTable/TableToolbar.d.ts +21 -1
- package/dist/types/components/DataTable/TableView.d.ts +19 -2
- package/dist/types/components/DataTable/cards/CardView.d.ts +25 -5
- package/dist/types/components/DataTable/cards/cardFields.d.ts +1 -0
- package/dist/types/components/DataTable/cards/rowParts.d.ts +1 -0
- package/dist/types/components/DataTable/cellSelection/CellRangeBar.d.ts +16 -0
- package/dist/types/components/DataTable/cellSelection/cellRangeStore.d.ts +18 -0
- package/dist/types/components/DataTable/cellSelection/paintRanges.d.ts +2 -0
- package/dist/types/components/DataTable/cellSelection/useCellSelection.d.ts +63 -0
- package/dist/types/components/DataTable/data/listDelta.d.ts +27 -0
- package/dist/types/components/DataTable/data/rowLineage.d.ts +3 -0
- package/dist/types/components/DataTable/data/rowModels.d.ts +9 -0
- package/dist/types/components/DataTable/data/rowTransaction.d.ts +9 -0
- package/dist/types/components/DataTable/data/useServerData.d.ts +3 -1
- package/dist/types/components/DataTable/defaults.d.ts +4 -0
- package/dist/types/components/DataTable/export/exportCells.d.ts +5 -2
- package/dist/types/components/DataTable/export/exportEngine.d.ts +7 -2
- package/dist/types/components/DataTable/export/useTableExport.d.ts +17 -1
- package/dist/types/components/DataTable/filters/filterRowModel.d.ts +1 -0
- package/dist/types/components/DataTable/grouping/groupModel.d.ts +11 -0
- package/dist/types/components/DataTable/index.d.ts +1 -1
- package/dist/types/components/DataTable/keyboard/ShortcutsDialog.d.ts +4 -1
- package/dist/types/components/DataTable/keyboard/useGridKeyboard.d.ts +8 -0
- package/dist/types/components/DataTable/labels.d.ts +130 -0
- package/dist/types/components/DataTable/layout/LayoutSwitcher.d.ts +10 -2
- package/dist/types/components/DataTable/layout/useFitWidths.d.ts +7 -0
- package/dist/types/components/DataTable/menu/RowMenu.d.ts +1 -0
- package/dist/types/components/DataTable/menu/buildRowMenu.d.ts +6 -3
- package/dist/types/components/DataTable/motion/RowChangeNotice.d.ts +19 -0
- package/dist/types/components/DataTable/motion/rowChanges.d.ts +25 -0
- package/dist/types/components/DataTable/motion/useNoticeInsets.d.ts +2 -0
- package/dist/types/components/DataTable/motion/useRowChangeNotices.d.ts +35 -0
- package/dist/types/components/DataTable/motion/useRowMotion.d.ts +29 -3
- package/dist/types/components/DataTable/persistence/reconcile.d.ts +4 -0
- package/dist/types/components/DataTable/persistence/useColumnPersistence.d.ts +5 -1
- package/dist/types/components/DataTable/pivot/PivotPanel.d.ts +11 -0
- package/dist/types/components/DataTable/pivot/PivotView.d.ts +22 -0
- package/dist/types/components/DataTable/pivot/pivotModel.d.ts +54 -0
- package/dist/types/components/DataTable/pivot/usePivot.d.ts +44 -0
- package/dist/types/components/DataTable/rows/PressRow.d.ts +1 -0
- package/dist/types/components/DataTable/rows/RowLead.d.ts +23 -0
- package/dist/types/components/DataTable/rows/rowPress.d.ts +2 -0
- package/dist/types/components/DataTable/rows/usePinnedRows.d.ts +34 -0
- package/dist/types/components/DataTable/rows/useRowDrag.d.ts +44 -0
- package/dist/types/components/DataTable/split/SplitView.d.ts +4 -2
- package/dist/types/components/DataTable/summary/SummaryChart.d.ts +2 -1
- package/dist/types/components/DataTable/summary/TableSummary.d.ts +2 -1
- package/dist/types/components/DataTable/summary/summaryModel.d.ts +28 -6
- package/dist/types/components/DataTable/summary/useTableSummary.d.ts +3 -0
- package/dist/types/components/DataTable/toolbar/ToolbarMore.d.ts +14 -0
- package/dist/types/components/DataTable/toolbar/useToolbarFit.d.ts +10 -0
- package/dist/types/components/DataTable/tree/TreeChips.d.ts +5 -0
- package/dist/types/components/DataTable/tree/treeExport.d.ts +54 -0
- package/dist/types/components/DataTable/tree/treeMove.d.ts +1 -0
- package/dist/types/components/DataTable/tree/useTreeChildren.d.ts +15 -0
- package/dist/types/components/DataTable/tree/useTreeData.d.ts +60 -0
- package/dist/types/components/DataTable/types.d.ts +290 -6
- package/dist/types/components/DataTable/ui-local/TableReorderList.d.ts +13 -0
- package/dist/types/components/DataTable/ui.d.ts +2 -1
- package/dist/types/components/DataTable/useDataChangeTracker.d.ts +11 -4
- package/dist/types/components/DataTable/useTable.d.ts +14 -1
- package/dist/types/components/DataTable/virtual/useVirtualLines.d.ts +1 -0
- package/dist/types/components/DatePicker/PeriodGrid.d.ts +13 -0
- package/dist/types/components/DatePicker/PeriodPicker.d.ts +19 -0
- package/dist/types/components/DatePicker/index.d.ts +1 -1
- package/dist/types/components/Dialog/dialogSlots.d.ts +9 -0
- package/dist/types/components/DropdownMenu/DropdownMenu.d.ts +8 -0
- package/dist/types/components/EventCalendar/EventCalendar.d.ts +46 -0
- package/dist/types/components/EventCalendar/eventParts.d.ts +10 -0
- package/dist/types/components/EventCalendar/index.d.ts +3 -0
- package/dist/types/components/EventCalendar/useCalendarEdit.d.ts +40 -0
- package/dist/types/components/FieldWrapper/index.d.ts +1 -1
- package/dist/types/components/Fields/index.d.ts +1 -1
- package/dist/types/components/Icon/Icon.d.ts +36 -0
- package/dist/types/components/Icon/Icon.storyData.d.ts +6 -0
- package/dist/types/components/Icon/IconContext.d.ts +7 -0
- package/dist/types/components/Icon/icons.d.ts +223 -0
- package/dist/types/components/Icon/index.d.ts +7 -0
- package/dist/types/components/Icon/useIconDone.d.ts +5 -0
- package/dist/types/components/Image/ImageEditor.d.ts +21 -0
- package/dist/types/components/Image/ImagePicker.d.ts +10 -1
- package/dist/types/components/Image/imageRender.d.ts +33 -0
- package/dist/types/components/Image/index.d.ts +3 -1
- package/dist/types/components/Image/prepareImage.d.ts +4 -3
- package/dist/types/components/Link/Link.d.ts +22 -0
- package/dist/types/components/Link/index.d.ts +2 -0
- package/dist/types/components/NavList/NavList.d.ts +13 -0
- package/dist/types/components/NavList/index.d.ts +2 -0
- package/dist/types/components/PageProgress/PageProgress.d.ts +10 -0
- package/dist/types/components/PageProgress/index.d.ts +2 -0
- package/dist/types/components/Pagination/Pagination.d.ts +19 -0
- package/dist/types/components/Pagination/index.d.ts +2 -0
- package/dist/types/components/Popover/Popover.d.ts +2 -1
- package/dist/types/components/Popover/floatingPosition.d.ts +26 -2
- package/dist/types/components/ReorderList/ReorderGroup.d.ts +16 -0
- package/dist/types/components/ReorderList/ReorderList.d.ts +56 -0
- package/dist/types/components/ReorderList/crossListDrag.d.ts +61 -0
- package/dist/types/components/ReorderList/index.d.ts +5 -0
- package/dist/types/components/ReorderList/useReorderDrag.d.ts +28 -0
- package/dist/types/components/Scroll/ui.d.ts +1 -0
- package/dist/types/components/SlidingHighlight/index.d.ts +2 -0
- package/dist/types/components/SlidingHighlight/useSlidingHighlight.d.ts +20 -0
- package/dist/types/components/Suggest/SuggestionList.d.ts +1 -0
- package/dist/types/components/Tooltip/useTooltip.d.ts +4 -0
- package/dist/types/components/UIProvider/UILabelsContext.d.ts +120 -0
- package/dist/types/components/UIProvider/UIProvider.d.ts +2 -0
- package/dist/types/core/hooks/index.d.ts +2 -1
- package/dist/types/core/hooks/useMeasuredState.d.ts +1 -0
- package/dist/types/core/hooks/usePresence.d.ts +1 -0
- package/dist/types/core/icons/actions.icons.d.ts +37 -0
- package/dist/types/core/icons/commerce.icons.d.ts +16 -0
- package/dist/types/core/icons/communication.icons.d.ts +10 -0
- package/dist/types/core/icons/delivery.icons.d.ts +13 -0
- package/dist/types/core/icons/devices.icons.d.ts +16 -0
- package/dist/types/core/icons/files.icons.d.ts +13 -0
- package/dist/types/core/icons/general.icons.d.ts +24 -0
- package/dist/types/core/icons/index.d.ts +14 -0
- package/dist/types/core/icons/media.icons.d.ts +11 -0
- package/dist/types/core/icons/navigation.icons.d.ts +25 -0
- package/dist/types/core/icons/people.icons.d.ts +13 -0
- package/dist/types/core/icons/registry.d.ts +2 -0
- package/dist/types/core/icons/state.icons.d.ts +14 -0
- package/dist/types/core/icons/status.icons.d.ts +10 -0
- package/dist/types/core/icons/table.icons.d.ts +22 -0
- package/dist/types/core/icons/text.icons.d.ts +13 -0
- package/dist/types/core/logic/alert.logic.d.ts +3 -0
- package/dist/types/core/logic/cellRange.logic.d.ts +66 -0
- package/dist/types/core/logic/cellTouch.logic.d.ts +16 -0
- package/dist/types/core/logic/columnGroups.logic.d.ts +31 -0
- package/dist/types/core/logic/commandPalette.logic.d.ts +2 -0
- package/dist/types/core/logic/datePicker.logic.d.ts +12 -0
- package/dist/types/core/logic/dropdownSide.logic.d.ts +19 -0
- package/dist/types/core/logic/eventCalendar.logic.d.ts +225 -0
- package/dist/types/core/logic/fieldWrapper.logic.d.ts +6 -1
- package/dist/types/core/logic/fitColumns.logic.d.ts +7 -0
- package/dist/types/core/logic/icon.logic.d.ts +24 -0
- package/dist/types/core/logic/imageEditor.logic.d.ts +132 -0
- package/dist/types/core/logic/imageTransform.logic.d.ts +57 -0
- package/dist/types/core/logic/index.d.ts +25 -0
- package/dist/types/core/logic/inertProps.d.ts +3 -0
- package/dist/types/core/logic/pageProgress.logic.d.ts +3 -0
- package/dist/types/core/logic/pagination.logic.d.ts +7 -0
- package/dist/types/core/logic/periodPicker.logic.d.ts +86 -0
- package/dist/types/core/logic/pivot.logic.d.ts +100 -0
- package/dist/types/core/logic/reorder.logic.d.ts +49 -0
- package/dist/types/core/logic/rowActions.logic.d.ts +7 -0
- package/dist/types/core/logic/rowDrag.logic.d.ts +36 -0
- package/dist/types/core/logic/rowPinning.logic.d.ts +12 -0
- package/dist/types/core/logic/slidingHighlight.logic.d.ts +20 -0
- package/dist/types/core/logic/toolbarOverflow.logic.d.ts +21 -0
- package/dist/types/core/logic/treeData.logic.d.ts +44 -0
- package/dist/types/core/logic/treeDrag.logic.d.ts +63 -0
- package/dist/types/core/logic/tween.logic.d.ts +33 -0
- package/dist/types/core/logic/visualViewport.logic.d.ts +13 -0
- package/dist/types/core/types/chipinput.types.d.ts +3 -1
- package/dist/types/core/types/collapsible.types.d.ts +3 -0
- package/dist/types/core/types/datePicker.types.d.ts +7 -0
- package/dist/types/core/types/eventCalendar.types.d.ts +18 -0
- package/dist/types/core/types/field.types.d.ts +6 -3
- package/dist/types/core/types/fieldWrapper.types.d.ts +2 -0
- package/dist/types/core/types/fields.types.d.ts +6 -1
- package/dist/types/core/types/fileEngine.types.d.ts +6 -0
- package/dist/types/core/types/form.types.d.ts +1 -0
- package/dist/types/core/types/format.types.d.ts +2 -0
- package/dist/types/core/types/icon.types.d.ts +109 -0
- package/dist/types/core/types/index.d.ts +2 -0
- package/dist/types/core/types/input.types.d.ts +2 -0
- package/dist/types/core/types/navigation.types.d.ts +1 -0
- package/dist/types/core/types/select.types.d.ts +2 -6
- package/dist/types/core/types/suggest.types.d.ts +2 -0
- package/dist/types/index.d.ts +31 -6
- package/package.json +4 -4
- package/dist/ChartImageMenu-DDVNJNc6.js +0 -1499
- package/dist/ChartView-CW3m4Z_1.js +0 -1703
- package/dist/SummarySeeAll-BRHOMQRA.js +0 -101
- package/dist/assets/fileTask.worker--Q3rI3Bn.js +0 -1
- package/dist/columnValue-DwUqueZ6.js +0 -610
- package/dist/exportContext-BKFnNQ0q.js +0 -166
- package/dist/scrollArea-DbYFqbIH.js +0 -269
- package/dist/types/components/DataTable/ui-local/DragAndDropList/DragAndDropList.d.ts +0 -4
- package/dist/types/components/DataTable/ui-local/DragAndDropList/index.d.ts +0 -3
- package/dist/types/components/DataTable/ui-local/DragAndDropList/types.d.ts +0 -70
|
@@ -1,610 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
var e = (e) => String(e).padStart(2, "0"), t = (e, t) => new Date(e, t, 0).getDate();
|
|
3
|
-
function n({ y: e, m: n, d: r }) {
|
|
4
|
-
return !Number.isInteger(e) || !Number.isInteger(n) || !Number.isInteger(r) || e < 1900 || e > 9999 || n < 1 || n > 12 ? !1 : r >= 1 && r <= t(e, n);
|
|
5
|
-
}
|
|
6
|
-
var r = ({ y: t, m: n, d: r }) => `${String(t).padStart(4, "0")}-${e(n)}-${e(r)}`;
|
|
7
|
-
function i(e) {
|
|
8
|
-
let t = /^(\d{4})-(\d{2})-(\d{2})(?:[T ].*)?$/.exec(String(e ?? "").trim());
|
|
9
|
-
if (!t) return null;
|
|
10
|
-
let r = {
|
|
11
|
-
y: Number(t[1]),
|
|
12
|
-
m: Number(t[2]),
|
|
13
|
-
d: Number(t[3])
|
|
14
|
-
};
|
|
15
|
-
return n(r) ? r : null;
|
|
16
|
-
}
|
|
17
|
-
var a = (e = /* @__PURE__ */ new Date()) => r({
|
|
18
|
-
y: e.getFullYear(),
|
|
19
|
-
m: e.getMonth() + 1,
|
|
20
|
-
d: e.getDate()
|
|
21
|
-
}), o = (e) => {
|
|
22
|
-
let t = i(e);
|
|
23
|
-
return t ? r(t) : "";
|
|
24
|
-
}, s = (e, t) => e < t ? -1 : +(e > t);
|
|
25
|
-
function c(e, t) {
|
|
26
|
-
let n = i(e);
|
|
27
|
-
if (!n) return "";
|
|
28
|
-
let a = new Date(n.y, n.m - 1, n.d + t);
|
|
29
|
-
return r({
|
|
30
|
-
y: a.getFullYear(),
|
|
31
|
-
m: a.getMonth() + 1,
|
|
32
|
-
d: a.getDate()
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
function l(e, n) {
|
|
36
|
-
let a = i(e);
|
|
37
|
-
if (!a) return "";
|
|
38
|
-
let o = a.y * 12 + (a.m - 1) + n, s = Math.floor(o / 12), c = (o % 12 + 12) % 12 + 1;
|
|
39
|
-
return r({
|
|
40
|
-
y: s,
|
|
41
|
-
m: c,
|
|
42
|
-
d: Math.min(a.d, t(s, c))
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
var u = (e, t) => l(e, t * 12);
|
|
46
|
-
function d(e) {
|
|
47
|
-
let t = i(e);
|
|
48
|
-
return t ? r({
|
|
49
|
-
...t,
|
|
50
|
-
d: 1
|
|
51
|
-
}) : "";
|
|
52
|
-
}
|
|
53
|
-
function f(e) {
|
|
54
|
-
let n = i(e);
|
|
55
|
-
return n ? r({
|
|
56
|
-
...n,
|
|
57
|
-
d: t(n.y, n.m)
|
|
58
|
-
}) : "";
|
|
59
|
-
}
|
|
60
|
-
function p(e) {
|
|
61
|
-
let t = i(e);
|
|
62
|
-
return t ? new Date(t.y, t.m - 1, t.d).getDay() : -1;
|
|
63
|
-
}
|
|
64
|
-
var m = (e, t, n) => {
|
|
65
|
-
let r = o(t), i = o(n);
|
|
66
|
-
return !(r && s(e, r) < 0 || i && s(e, i) > 0);
|
|
67
|
-
};
|
|
68
|
-
function h(e, t, n) {
|
|
69
|
-
let r = o(t), i = o(n);
|
|
70
|
-
return r && s(e, r) < 0 ? r : i && s(e, i) > 0 ? i : e;
|
|
71
|
-
}
|
|
72
|
-
function g(t) {
|
|
73
|
-
let n = /^(\d{1,2}):(\d{2})(?::\d{2})?$/.exec(String(t ?? "").trim());
|
|
74
|
-
if (!n) return "";
|
|
75
|
-
let r = Number(n[1]), i = Number(n[2]);
|
|
76
|
-
return r > 23 || i > 59 ? "" : `${e(r)}:${e(i)}`;
|
|
77
|
-
}
|
|
78
|
-
function _(e) {
|
|
79
|
-
let [t = "", n = ""] = String(e ?? "").trim().replace(" ", "T").split("T");
|
|
80
|
-
return {
|
|
81
|
-
day: o(t),
|
|
82
|
-
time: g(n)
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
function v(e, t) {
|
|
86
|
-
let n = o(e);
|
|
87
|
-
if (!n) return "";
|
|
88
|
-
let r = g(t);
|
|
89
|
-
return r ? `${n}T${r}` : n;
|
|
90
|
-
}
|
|
91
|
-
function y(e, t) {
|
|
92
|
-
if (e > 99) return e;
|
|
93
|
-
let n = (t + 19) % 100, r = Math.floor((t + 19) / 100) * 100;
|
|
94
|
-
return e <= n ? r + e : r - 100 + e;
|
|
95
|
-
}
|
|
96
|
-
var b = /^(\d{2}|\d{4})$/, x = /^\d{1,2}$/;
|
|
97
|
-
function S(e, t, i) {
|
|
98
|
-
if (e.length === 1) {
|
|
99
|
-
let t = e[0];
|
|
100
|
-
if (t.length !== 8) return null;
|
|
101
|
-
let i = {
|
|
102
|
-
y: Number(t.slice(0, 4)),
|
|
103
|
-
m: Number(t.slice(4, 6)),
|
|
104
|
-
d: Number(t.slice(6, 8))
|
|
105
|
-
};
|
|
106
|
-
return n(i) ? r(i) : null;
|
|
107
|
-
}
|
|
108
|
-
if (!b.test(e[0]) || !x.test(e[1]) || e.length === 3 && !x.test(e[2])) return null;
|
|
109
|
-
let a = {
|
|
110
|
-
y: y(Number(e[0]), i),
|
|
111
|
-
m: Number(e[1]),
|
|
112
|
-
d: e.length === 3 ? Number(e[2]) : t.d
|
|
113
|
-
};
|
|
114
|
-
return n(a) ? r(a) : null;
|
|
115
|
-
}
|
|
116
|
-
function C(e, t = {}) {
|
|
117
|
-
let o = String(e ?? "").trim();
|
|
118
|
-
if (!o) return null;
|
|
119
|
-
let s = i(t.today) ?? i(a()), c = i(t.within) ?? s, l = t.order ?? "dmy", u = o.split(/[^0-9]+/).filter(Boolean);
|
|
120
|
-
if (!u.length || u.length > 3) return null;
|
|
121
|
-
if (l === "ymd") return S(u, c, s.y);
|
|
122
|
-
let d = "", f = "", p = "";
|
|
123
|
-
if (u.length === 1) {
|
|
124
|
-
let e = u[0];
|
|
125
|
-
if (e.length <= 2) d = e;
|
|
126
|
-
else if (e.length <= 4) d = e.slice(0, 2), f = e.slice(2);
|
|
127
|
-
else if (e.length === 6) d = e.slice(0, 2), f = e.slice(2, 4), p = e.slice(4, 6);
|
|
128
|
-
else if (e.length === 8) d = e.slice(0, 2), f = e.slice(2, 4), p = e.slice(4, 8);
|
|
129
|
-
else return null;
|
|
130
|
-
} else {
|
|
131
|
-
if (!x.test(u[0]) || !x.test(u[1])) return null;
|
|
132
|
-
if (d = u[0], f = u[1], u.length === 3) {
|
|
133
|
-
if (!b.test(u[2])) return null;
|
|
134
|
-
p = u[2];
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
if (l === "mdy" && f) {
|
|
138
|
-
let e = d;
|
|
139
|
-
d = f, f = e;
|
|
140
|
-
}
|
|
141
|
-
let m = {
|
|
142
|
-
d: Number(d),
|
|
143
|
-
m: f ? Number(f) : c.m,
|
|
144
|
-
y: p ? y(Number(p), s.y) : f ? s.y : c.y
|
|
145
|
-
};
|
|
146
|
-
return n(m) ? r(m) : null;
|
|
147
|
-
}
|
|
148
|
-
function w(e, t = {}) {
|
|
149
|
-
let n = String(e ?? "").trim(), r = n.indexOf("+");
|
|
150
|
-
if (r <= 0 || r >= n.length - 1) return null;
|
|
151
|
-
let i = C(n.slice(0, r), t);
|
|
152
|
-
if (!i) return null;
|
|
153
|
-
let a = C(n.slice(r + 1), {
|
|
154
|
-
...t,
|
|
155
|
-
within: i
|
|
156
|
-
});
|
|
157
|
-
return a ? {
|
|
158
|
-
from: i,
|
|
159
|
-
to: s(a, i) < 0 ? u(a, 1) : a
|
|
160
|
-
} : null;
|
|
161
|
-
}
|
|
162
|
-
function T(t, n = "dd-mm-yyyy") {
|
|
163
|
-
let r = i(t);
|
|
164
|
-
if (!r) return "";
|
|
165
|
-
let a = e(r.d), o = e(r.m), s = String(r.y).padStart(4, "0");
|
|
166
|
-
return n === "yyyy-mm-dd" ? `${s}-${o}-${a}` : n === "dd/mm/yyyy" ? `${a}/${o}/${s}` : `${a}-${o}-${s}`;
|
|
167
|
-
}
|
|
168
|
-
var ee = (e = "dd-mm-yyyy", t = !1) => t ? `${e} hh:mm` : e;
|
|
169
|
-
function te(e, t = "dd-mm-yyyy", n = !1) {
|
|
170
|
-
let { day: r, time: i } = _(e);
|
|
171
|
-
if (!r) return "";
|
|
172
|
-
let a = T(r, t);
|
|
173
|
-
return n && i ? `${a} ${i}` : a;
|
|
174
|
-
}
|
|
175
|
-
function ne(e, t = {}) {
|
|
176
|
-
let n = String(e ?? "").trim(), r = "";
|
|
177
|
-
if (t.withTime) {
|
|
178
|
-
let e = /[\s,]*(\d{1,2}:\d{2})$/.exec(n);
|
|
179
|
-
if (e) {
|
|
180
|
-
if (r = g(e[1]), !r) return null;
|
|
181
|
-
n = n.slice(0, e.index);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
let i = C(n, t);
|
|
185
|
-
return i ? {
|
|
186
|
-
day: i,
|
|
187
|
-
time: r
|
|
188
|
-
} : null;
|
|
189
|
-
}
|
|
190
|
-
function E(e) {
|
|
191
|
-
let n = i(e.month) ?? i(a()), l = r({
|
|
192
|
-
...n,
|
|
193
|
-
d: 1
|
|
194
|
-
}), u = (Math.trunc(e.weekStart ?? 0) % 7 + 7) % 7, d = o(e.today ?? a()), h = o(e.selected), g = o(e.highlighted), _ = o(e.rangeFrom), v = o(e.rangeTo), y = _ && v ? s(_, v) <= 0 ? _ : v : _ || v, b = _ && v ? s(_, v) <= 0 ? v : _ : _ || v, x = (p(l) - u + 7) % 7, S = t(n.y, n.m), C = e.fixedWeeks === !1 ? Math.ceil((x + S) / 7) : 6, w = c(l, -x), T = [];
|
|
195
|
-
for (let t = 0; t < C; t++) {
|
|
196
|
-
let r = [];
|
|
197
|
-
for (let a = 0; a < 7; a++) {
|
|
198
|
-
let o = c(w, t * 7 + a), l = i(o);
|
|
199
|
-
r.push({
|
|
200
|
-
day: o,
|
|
201
|
-
date: l.d,
|
|
202
|
-
inMonth: l.y === n.y && l.m === n.m,
|
|
203
|
-
isToday: !!d && o === d,
|
|
204
|
-
isSelected: !!h && o === h,
|
|
205
|
-
isHighlighted: !!g && o === g,
|
|
206
|
-
inRange: !!y && !!b && s(o, y) > 0 && s(o, b) < 0,
|
|
207
|
-
isRangeStart: !!y && o === y,
|
|
208
|
-
isRangeEnd: !!b && o === b,
|
|
209
|
-
disabled: !m(o, e.min, e.max)
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
T.push(r);
|
|
213
|
-
}
|
|
214
|
-
return {
|
|
215
|
-
month: l,
|
|
216
|
-
year: n.y,
|
|
217
|
-
monthIndex: n.m,
|
|
218
|
-
weeks: T,
|
|
219
|
-
weekdays: Array.from({ length: 7 }, (e, t) => (u + t) % 7),
|
|
220
|
-
canPagePrev: m(c(l, -1), e.min, e.max),
|
|
221
|
-
canPageNext: m(c(f(l), 1), e.min, e.max)
|
|
222
|
-
};
|
|
223
|
-
}
|
|
224
|
-
var re = [
|
|
225
|
-
"highlightLeft",
|
|
226
|
-
"highlightRight",
|
|
227
|
-
"highlightPrev",
|
|
228
|
-
"highlightNext",
|
|
229
|
-
"highlightFirst",
|
|
230
|
-
"highlightLast",
|
|
231
|
-
"highlightPrevPage",
|
|
232
|
-
"highlightNextPage"
|
|
233
|
-
];
|
|
234
|
-
function ie(e, t, n = {}) {
|
|
235
|
-
let r = o(e) || a();
|
|
236
|
-
return h(t === "highlightLeft" ? c(r, -1) : t === "highlightRight" ? c(r, 1) : t === "highlightPrev" ? c(r, -7) : t === "highlightNext" ? c(r, 7) : t === "highlightFirst" ? d(r) : t === "highlightLast" ? f(r) : t === "highlightPrevPage" ? l(r, -1) : l(r, 1), n.min, n.max);
|
|
237
|
-
}
|
|
238
|
-
function ae(e, t = {}) {
|
|
239
|
-
let { day: n } = _(e);
|
|
240
|
-
return n || h(o(t.today ?? a()) || a(), t.min, t.max);
|
|
241
|
-
}
|
|
242
|
-
function D(e, t = 4) {
|
|
243
|
-
let n = i(e) ?? i(a()), o = Math.min(12, Math.max(1, Math.trunc(t) || 1)), s = r({
|
|
244
|
-
y: n.m >= o ? n.y : n.y - 1,
|
|
245
|
-
m: o,
|
|
246
|
-
d: 1
|
|
247
|
-
});
|
|
248
|
-
return {
|
|
249
|
-
from: s,
|
|
250
|
-
to: c(u(s, 1), -1)
|
|
251
|
-
};
|
|
252
|
-
}
|
|
253
|
-
function oe(e, t = 0) {
|
|
254
|
-
let n = o(e) || a(), r = (Math.trunc(t) % 7 + 7) % 7;
|
|
255
|
-
return c(n, -(((p(n) - r) % 7 + 7) % 7));
|
|
256
|
-
}
|
|
257
|
-
function O(e, t = 4) {
|
|
258
|
-
let n = D(e, t), r = i(e).y * 12 + i(e).m - (i(n.from).y * 12 + i(n.from).m), a = l(n.from, Math.floor(r / 3) * 3);
|
|
259
|
-
return {
|
|
260
|
-
from: a,
|
|
261
|
-
to: f(l(a, 2))
|
|
262
|
-
};
|
|
263
|
-
}
|
|
264
|
-
function se(e = {}) {
|
|
265
|
-
let t = o(e.today ?? a()) || a(), n = e.fyStartMonth ?? 4, r = e.weekStart ?? 0, i = D(t, n), s = D(c(i.from, -1), n), u = oe(t, r), p = c(u, -7), m = l(t, -1), h = O(t, n), g = O(c(h.from, -1), n), _ = [
|
|
266
|
-
{
|
|
267
|
-
key: "today",
|
|
268
|
-
label: "Today",
|
|
269
|
-
single: !0,
|
|
270
|
-
from: t,
|
|
271
|
-
to: t
|
|
272
|
-
},
|
|
273
|
-
{
|
|
274
|
-
key: "yesterday",
|
|
275
|
-
label: "Yesterday",
|
|
276
|
-
single: !0,
|
|
277
|
-
from: c(t, -1),
|
|
278
|
-
to: c(t, -1)
|
|
279
|
-
},
|
|
280
|
-
{
|
|
281
|
-
key: "last7",
|
|
282
|
-
label: "Last 7 days",
|
|
283
|
-
from: c(t, -6),
|
|
284
|
-
to: t
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
key: "last30",
|
|
288
|
-
label: "Last 30 days",
|
|
289
|
-
from: c(t, -29),
|
|
290
|
-
to: t
|
|
291
|
-
},
|
|
292
|
-
{
|
|
293
|
-
key: "thisWeek",
|
|
294
|
-
label: "This Week",
|
|
295
|
-
from: u,
|
|
296
|
-
to: c(u, 6)
|
|
297
|
-
},
|
|
298
|
-
{
|
|
299
|
-
key: "lastWeek",
|
|
300
|
-
label: "Last Week",
|
|
301
|
-
from: p,
|
|
302
|
-
to: c(p, 6)
|
|
303
|
-
},
|
|
304
|
-
{
|
|
305
|
-
key: "thisMonth",
|
|
306
|
-
label: "This Month",
|
|
307
|
-
from: d(t),
|
|
308
|
-
to: f(t)
|
|
309
|
-
},
|
|
310
|
-
{
|
|
311
|
-
key: "lastMonth",
|
|
312
|
-
label: "Last Month",
|
|
313
|
-
from: d(m),
|
|
314
|
-
to: f(m)
|
|
315
|
-
},
|
|
316
|
-
{
|
|
317
|
-
key: "thisQuarter",
|
|
318
|
-
label: "This Quarter",
|
|
319
|
-
from: h.from,
|
|
320
|
-
to: h.to
|
|
321
|
-
},
|
|
322
|
-
{
|
|
323
|
-
key: "lastQuarter",
|
|
324
|
-
label: "Last Quarter",
|
|
325
|
-
from: g.from,
|
|
326
|
-
to: g.to
|
|
327
|
-
},
|
|
328
|
-
{
|
|
329
|
-
key: "thisFY",
|
|
330
|
-
label: "This FY",
|
|
331
|
-
from: i.from,
|
|
332
|
-
to: i.to
|
|
333
|
-
},
|
|
334
|
-
{
|
|
335
|
-
key: "lastFY",
|
|
336
|
-
label: "Last FY",
|
|
337
|
-
from: s.from,
|
|
338
|
-
to: s.to
|
|
339
|
-
},
|
|
340
|
-
{
|
|
341
|
-
key: "ytd",
|
|
342
|
-
label: "Year to date",
|
|
343
|
-
from: i.from,
|
|
344
|
-
to: t
|
|
345
|
-
}
|
|
346
|
-
];
|
|
347
|
-
if (e.labels) for (let t of _) t.label = e.labels[t.key] ?? t.label;
|
|
348
|
-
return e.only ? e.only.map((e) => _.find((t) => t.key === e)).filter((e) => !!e) : _;
|
|
349
|
-
}
|
|
350
|
-
function ce(e, t) {
|
|
351
|
-
let n = String(t ?? "").trim().toLowerCase();
|
|
352
|
-
return n ? e.filter((e) => e.label.toLowerCase().includes(n)) : e;
|
|
353
|
-
}
|
|
354
|
-
function le(e, t, n = {}) {
|
|
355
|
-
let r = o(e);
|
|
356
|
-
if (!r) return d(a());
|
|
357
|
-
let s = Math.max(1, Math.trunc(n.months ?? 1)), c = n.currentMonthSide ?? "right", u = d(r), f = d(o(t) || r), p = i(u), m = i(f), h = (m.y - p.y) * 12 + (m.m - p.m) + 1;
|
|
358
|
-
return c === "right" ? l(h <= s ? f : u, -(s - 1)) : u;
|
|
359
|
-
}
|
|
360
|
-
function k(e, t) {
|
|
361
|
-
let n = o(t);
|
|
362
|
-
if (!n) return {
|
|
363
|
-
from: o(e?.from),
|
|
364
|
-
to: o(e?.to)
|
|
365
|
-
};
|
|
366
|
-
let r = o(e?.from), i = o(e?.to);
|
|
367
|
-
return r ? n === r && n === i ? {
|
|
368
|
-
from: "",
|
|
369
|
-
to: ""
|
|
370
|
-
} : n === r || n === i ? {
|
|
371
|
-
from: n,
|
|
372
|
-
to: n
|
|
373
|
-
} : s(n, r) < 0 ? {
|
|
374
|
-
from: n,
|
|
375
|
-
to: i || r
|
|
376
|
-
} : {
|
|
377
|
-
from: r,
|
|
378
|
-
to: n
|
|
379
|
-
} : {
|
|
380
|
-
from: n,
|
|
381
|
-
to: n
|
|
382
|
-
};
|
|
383
|
-
}
|
|
384
|
-
function A(e) {
|
|
385
|
-
let t, n;
|
|
386
|
-
try {
|
|
387
|
-
t = new Intl.DateTimeFormat(e, {
|
|
388
|
-
month: "long",
|
|
389
|
-
timeZone: "UTC"
|
|
390
|
-
}), n = new Intl.DateTimeFormat(e, {
|
|
391
|
-
weekday: "short",
|
|
392
|
-
timeZone: "UTC"
|
|
393
|
-
});
|
|
394
|
-
} catch {
|
|
395
|
-
t = new Intl.DateTimeFormat(void 0, {
|
|
396
|
-
month: "long",
|
|
397
|
-
timeZone: "UTC"
|
|
398
|
-
}), n = new Intl.DateTimeFormat(void 0, {
|
|
399
|
-
weekday: "short",
|
|
400
|
-
timeZone: "UTC"
|
|
401
|
-
});
|
|
402
|
-
}
|
|
403
|
-
let r = n.resolvedOptions().locale.toLowerCase().startsWith("en");
|
|
404
|
-
return {
|
|
405
|
-
months: Array.from({ length: 12 }, (e, n) => t.format(Date.UTC(2024, n, 1))),
|
|
406
|
-
weekdays: Array.from({ length: 7 }, (e, t) => {
|
|
407
|
-
let i = n.format(Date.UTC(2024, 0, 7 + t));
|
|
408
|
-
return r ? i.slice(0, 2) : i;
|
|
409
|
-
})
|
|
410
|
-
};
|
|
411
|
-
}
|
|
412
|
-
// src/core/logic/tableDate.logic.ts
|
|
413
|
-
var j = (e) => String(e).padStart(2, "0");
|
|
414
|
-
function M(e) {
|
|
415
|
-
if (Number.isNaN(e.getTime())) return null;
|
|
416
|
-
let t = r({
|
|
417
|
-
y: e.getFullYear(),
|
|
418
|
-
m: e.getMonth() + 1,
|
|
419
|
-
d: e.getDate()
|
|
420
|
-
}), n = e.getHours(), i = e.getMinutes();
|
|
421
|
-
return n === 0 && i === 0 ? t : `${t}T${j(n)}:${j(i)}`;
|
|
422
|
-
}
|
|
423
|
-
function N(e, t, i, a, o) {
|
|
424
|
-
if (!n({
|
|
425
|
-
y: e,
|
|
426
|
-
m: t,
|
|
427
|
-
d: i
|
|
428
|
-
})) return null;
|
|
429
|
-
let s = r({
|
|
430
|
-
y: e,
|
|
431
|
-
m: t,
|
|
432
|
-
d: i
|
|
433
|
-
});
|
|
434
|
-
if (a === void 0 || o === void 0) return s;
|
|
435
|
-
let c = Number(a), l = Number(o);
|
|
436
|
-
return c > 23 || l > 59 ? null : c === 0 && l === 0 ? s : `${s}T${j(c)}:${j(l)}`;
|
|
437
|
-
}
|
|
438
|
-
var P = "(?:[T ](\\d{1,2}):(\\d{2})(?::\\d{2}(?:\\.\\d+)?)?)?", ue = RegExp(`^(\\d{4})-(\\d{2})-(\\d{2})${P}$`), F = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}:?\d{2})$/i, de = RegExp(`^(\\d{1,2})[-/.](\\d{1,2})[-/.](\\d{4})${P}$`), I = RegExp(`^(\\d{4})[-/.](\\d{1,2})[-/.](\\d{1,2})${P}$`);
|
|
439
|
-
function L(e, t) {
|
|
440
|
-
if (e == null || e === "") return null;
|
|
441
|
-
if (e instanceof Date) return M(e);
|
|
442
|
-
if (typeof e == "number") return Number.isFinite(e) ? M(new Date(e)) : null;
|
|
443
|
-
if (typeof e != "string") return null;
|
|
444
|
-
let n = e.trim();
|
|
445
|
-
if (!n) return null;
|
|
446
|
-
let r = ue.exec(n);
|
|
447
|
-
return r && !F.test(n) ? N(Number(r[1]), Number(r[2]), Number(r[3]), r[4], r[5]) : F.test(n) ? M(new Date(n)) : t === "dd-mm-yyyy" || t === "dd/mm/yyyy" ? (r = de.exec(n), r ? N(Number(r[3]), Number(r[2]), Number(r[1]), r[4], r[5]) : null) : t === "yyyy-mm-dd" ? (r = I.exec(n), r ? N(Number(r[1]), Number(r[2]), Number(r[3]), r[4], r[5]) : null) : /[a-z]/i.test(n) ? M(new Date(n)) : null;
|
|
448
|
-
}
|
|
449
|
-
var R = (e) => e ? e.slice(0, 10) : null, z = (e, t) => e < t ? -1 : +(e > t);
|
|
450
|
-
function B(e, t = "dd-mm-yyyy") {
|
|
451
|
-
if (!e) return "";
|
|
452
|
-
let n = T(e.slice(0, 10), t);
|
|
453
|
-
return e.length > 10 ? `${n} ${e.slice(11, 16)}` : n;
|
|
454
|
-
}
|
|
455
|
-
function V(e, t, n, r) {
|
|
456
|
-
let i = e == null, a = t == null;
|
|
457
|
-
return i && a ? 0 : i ? n ? -1 : 1 : a ? n ? 1 : -1 : r(e, t);
|
|
458
|
-
}
|
|
459
|
-
var H = {
|
|
460
|
-
pageSize: 25,
|
|
461
|
-
pageSizeOptions: [
|
|
462
|
-
25,
|
|
463
|
-
50,
|
|
464
|
-
100,
|
|
465
|
-
500,
|
|
466
|
-
-1
|
|
467
|
-
]
|
|
468
|
-
}, U = {
|
|
469
|
-
multiSort: !1,
|
|
470
|
-
defaultSort: []
|
|
471
|
-
}, W = { advanced: !0 }, fe = [
|
|
472
|
-
"xlsx",
|
|
473
|
-
"pdf",
|
|
474
|
-
"csv",
|
|
475
|
-
"html",
|
|
476
|
-
"json"
|
|
477
|
-
], G = { mode: "multiple" };
|
|
478
|
-
function pe() {
|
|
479
|
-
return {
|
|
480
|
-
id: q(),
|
|
481
|
-
logic: "AND",
|
|
482
|
-
conditions: []
|
|
483
|
-
};
|
|
484
|
-
}
|
|
485
|
-
function me(e) {
|
|
486
|
-
return e.pagination === !1 ? !1 : e.pagination === !0 || e.pagination === void 0 ? H : {
|
|
487
|
-
...H,
|
|
488
|
-
...e.pagination
|
|
489
|
-
};
|
|
490
|
-
}
|
|
491
|
-
function he(e) {
|
|
492
|
-
return e.sorting === !1 ? !1 : e.sorting === !0 || e.sorting === void 0 ? U : {
|
|
493
|
-
...U,
|
|
494
|
-
...e.sorting
|
|
495
|
-
};
|
|
496
|
-
}
|
|
497
|
-
function K(e) {
|
|
498
|
-
return e.filtering === !1 ? !1 : e.filtering === !0 || e.filtering === void 0 ? W : {
|
|
499
|
-
...W,
|
|
500
|
-
...e.filtering
|
|
501
|
-
};
|
|
502
|
-
}
|
|
503
|
-
function ge(e) {
|
|
504
|
-
if (!e.export) return !1;
|
|
505
|
-
let t = { ...e.export };
|
|
506
|
-
return t.quick && (t.quick.enabled === void 0 && (t.quick = {
|
|
507
|
-
...t.quick,
|
|
508
|
-
enabled: !0
|
|
509
|
-
}), t.quick.formats || (t.quick = {
|
|
510
|
-
...t.quick,
|
|
511
|
-
formats: fe
|
|
512
|
-
}), t.quick.fileNameAs || (t.quick = {
|
|
513
|
-
...t.quick,
|
|
514
|
-
fileNameAs: "title-date-generated"
|
|
515
|
-
})), t;
|
|
516
|
-
}
|
|
517
|
-
function _e(e) {
|
|
518
|
-
let t = e.selection === void 0 ? "onDemand" : e.selection;
|
|
519
|
-
return t ? t === !0 || t === "onDemand" ? {
|
|
520
|
-
...G,
|
|
521
|
-
show: "onDemand"
|
|
522
|
-
} : t === "always" ? {
|
|
523
|
-
...G,
|
|
524
|
-
show: "always"
|
|
525
|
-
} : {
|
|
526
|
-
...G,
|
|
527
|
-
...t,
|
|
528
|
-
show: t.show ?? "onDemand"
|
|
529
|
-
} : !1;
|
|
530
|
-
}
|
|
531
|
-
function q() {
|
|
532
|
-
return Math.random().toString(36).substring(2, 10);
|
|
533
|
-
}
|
|
534
|
-
function J(e, t) {
|
|
535
|
-
return t.split(".").reduce((e, t) => e?.[t], e);
|
|
536
|
-
}
|
|
537
|
-
// src/components/DataTable/columnValue.ts
|
|
538
|
-
var ve = "dd-mm-yyyy";
|
|
539
|
-
function Y(e, t) {
|
|
540
|
-
return e.value ? e.value(t) : J(t, e.key);
|
|
541
|
-
}
|
|
542
|
-
function X(e, t, n) {
|
|
543
|
-
return L(typeof e.parse == "function" ? e.parse(t, n) : t, typeof e.parse == "string" ? e.parse : void 0);
|
|
544
|
-
}
|
|
545
|
-
var ye = (e, t) => X(e, Y(e, t), t);
|
|
546
|
-
function be(e, t, n) {
|
|
547
|
-
return e.filterAccessor ? L(e.filterAccessor(t), typeof e.parse == "string" ? e.parse : void 0) : X(e, t, n);
|
|
548
|
-
}
|
|
549
|
-
function Z(e, t, n) {
|
|
550
|
-
let r = X(e, t, n);
|
|
551
|
-
return r ? B(r, e.dateFormat ?? "dd-mm-yyyy") : t == null ? "" : String(t);
|
|
552
|
-
}
|
|
553
|
-
function xe(e, t, n) {
|
|
554
|
-
switch (t) {
|
|
555
|
-
case "integer": return n.number(e, 0);
|
|
556
|
-
case "amount": return n.number(e, 2);
|
|
557
|
-
case "currency": return n.money(e);
|
|
558
|
-
case "percent": return n.percent(e);
|
|
559
|
-
default: return String(e);
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
function Q(e, t, n, r) {
|
|
563
|
-
if (e.format) {
|
|
564
|
-
let n = e.format(t, r);
|
|
565
|
-
return n == null ? "" : String(n);
|
|
566
|
-
}
|
|
567
|
-
if (e.type === "date" || t instanceof Date) return Z(e, t, r);
|
|
568
|
-
if (t == null) return "";
|
|
569
|
-
if (Array.isArray(t)) return t.map((t) => Q({
|
|
570
|
-
...e,
|
|
571
|
-
format: void 0
|
|
572
|
-
}, t, n, r)).filter(Boolean).join(", ");
|
|
573
|
-
if (typeof t == "boolean") return t ? n.yes : n.no;
|
|
574
|
-
let i = e.filterOptions?.find((e) => String(e.value) === String(t));
|
|
575
|
-
return i ? i.label : typeof t == "number" && e.numberFormat && n.fmt && Number.isFinite(t) ? xe(t, e.numberFormat, n.fmt) : typeof t == "object" ? "" : String(t);
|
|
576
|
-
}
|
|
577
|
-
var Se = (e, t, n) => Q(e, Y(e, t), n, t);
|
|
578
|
-
function Ce(e, t, n) {
|
|
579
|
-
let r = Y(e, t);
|
|
580
|
-
if (e.searchText) return e.searchText(r, t) ?? "";
|
|
581
|
-
let i = Q(e, r, n, t), a = r == null || typeof r == "object" ? "" : String(r);
|
|
582
|
-
return a && a !== i ? `${i} ${a}` : i;
|
|
583
|
-
}
|
|
584
|
-
var $ = (e) => e == null || e === "" || typeof e == "number" && Number.isNaN(e);
|
|
585
|
-
function we(e, t, n, r) {
|
|
586
|
-
if (e.sortValue) {
|
|
587
|
-
let r = e.sortValue(t, n);
|
|
588
|
-
return $(r) ? null : r;
|
|
589
|
-
}
|
|
590
|
-
if (e.type === "date") return X(e, t, n);
|
|
591
|
-
if ($(t)) return null;
|
|
592
|
-
if (e.type === "number") {
|
|
593
|
-
let e = typeof t == "number" ? t : Number(t);
|
|
594
|
-
return Number.isFinite(e) ? e : null;
|
|
595
|
-
}
|
|
596
|
-
if (typeof t == "boolean") return +!!t;
|
|
597
|
-
let i = Q({
|
|
598
|
-
...e,
|
|
599
|
-
format: void 0,
|
|
600
|
-
numberFormat: void 0
|
|
601
|
-
}, t, r, n);
|
|
602
|
-
return i === "" ? null : i;
|
|
603
|
-
}
|
|
604
|
-
function Te(e, t) {
|
|
605
|
-
return typeof e == "number" && typeof t == "number" ? e - t : String(e).localeCompare(String(t), void 0, {
|
|
606
|
-
numeric: !0,
|
|
607
|
-
sensitivity: "base"
|
|
608
|
-
});
|
|
609
|
-
}
|
|
610
|
-
export { ee as A, ne as B, R as C, se as D, E, v as F, a as G, l as H, ce as I, le as K, ie as L, te as M, T as N, A as O, m as P, ae as R, B as S, re as T, _ as U, i as V, d as W, me as _, Y as a, V as b, be as c, Q as d, pe as f, K as g, ge as h, Se as i, k as j, s as k, Ce as l, J as m, ye as n, Te as o, q as p, X as r, Z as s, ve as t, we as u, _e as v, L as w, z as x, he as y, w as z };
|