@dmsi/wedgekit-react 1.0.1 → 2.0.1
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/classNames.d.ts +1 -0
- package/dist/classNames.d.ts.map +1 -1
- package/dist/classNames.js +150 -0
- package/dist/components/AccessCard.js +63 -0
- package/dist/components/AccessCardGroup.js +73 -0
- package/dist/components/AccessChangerTabItem.js +51 -0
- package/dist/components/Accordion.js +99 -0
- package/dist/components/Alert.d.ts.map +1 -1
- package/dist/components/Alert.js +78 -0
- package/dist/components/Breadcrumbs.js +111 -0
- package/dist/components/Button.js +137 -0
- package/dist/components/CalendarRange.js +405 -0
- package/dist/components/Caption.js +99 -0
- package/dist/components/Card.js +50 -0
- package/dist/components/Checkbox.js +108 -0
- package/dist/components/CompactImagesPreview.d.ts.map +1 -1
- package/dist/components/CompactImagesPreview.js +120 -0
- package/dist/components/ContentTab.js +68 -0
- package/dist/components/ContentTabs.js +96 -0
- package/dist/components/DMSiLogo.js +54 -0
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +27 -0
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +79 -0
- package/dist/components/DataGrid/PinnedColumns.d.ts +9 -2
- package/dist/components/DataGrid/PinnedColumns.d.ts.map +1 -1
- package/dist/components/DataGrid/PinnedColumns.js +165 -0
- package/dist/components/DataGrid/SummaryRow/SummaryCell.d.ts +18 -0
- package/dist/components/DataGrid/SummaryRow/SummaryCell.d.ts.map +1 -0
- package/dist/components/DataGrid/SummaryRow/SummaryCell.js +51 -0
- package/dist/components/DataGrid/SummaryRow/aggregations.d.ts +39 -0
- package/dist/components/DataGrid/SummaryRow/aggregations.d.ts.map +1 -0
- package/dist/components/DataGrid/SummaryRow/aggregations.js +55 -0
- package/dist/components/DataGrid/SummaryRow/index.d.ts +18 -0
- package/dist/components/DataGrid/SummaryRow/index.d.ts.map +1 -0
- package/dist/components/DataGrid/SummaryRow/index.js +86 -0
- package/dist/components/DataGrid/TableBody/GroupRow.d.ts +18 -0
- package/dist/components/DataGrid/TableBody/GroupRow.d.ts.map +1 -0
- package/dist/components/DataGrid/TableBody/GroupRow.js +243 -0
- package/dist/components/DataGrid/TableBody/LoadingCell.js +33 -0
- package/dist/components/DataGrid/TableBody/TableBodyRow.d.ts +3 -2
- package/dist/components/DataGrid/TableBody/TableBodyRow.d.ts.map +1 -1
- package/dist/components/DataGrid/TableBody/TableBodyRow.js +136 -0
- package/dist/components/DataGrid/TableBody/index.d.ts +3 -1
- package/dist/components/DataGrid/TableBody/index.d.ts.map +1 -1
- package/dist/components/DataGrid/TableBody/index.js +161 -0
- package/dist/components/DataGrid/index.d.ts +1 -1
- package/dist/components/DataGrid/index.d.ts.map +1 -1
- package/dist/components/DataGrid/index.js +696 -0
- package/dist/components/DataGrid/types.d.ts +141 -1
- package/dist/components/DataGrid/types.d.ts.map +1 -1
- package/dist/components/DataGrid/utils.d.ts +2 -0
- package/dist/components/DataGrid/utils.d.ts.map +1 -1
- package/dist/components/DataGrid/utils.js +20 -0
- package/dist/components/DataGridCell.d.ts +5 -2
- package/dist/components/DataGridCell.d.ts.map +1 -1
- package/dist/components/DataGridCell.js +412 -0
- package/dist/components/DataTable.js +700 -0
- package/dist/components/DateInput.js +193 -0
- package/dist/components/DateRangeInput.js +368 -0
- package/dist/components/DebugJson.js +28 -0
- package/dist/components/Display.js +46 -0
- package/dist/components/EditingContext.js +34 -0
- package/dist/components/EmblaCarousel/ArrowButtons.js +83 -0
- package/dist/components/EmblaCarousel/SelectedSnapDisplay.js +12 -0
- package/dist/components/EmblaCarousel/index.js +153 -0
- package/dist/components/EmblaCarousel/usePrevNextButtons.js +21 -0
- package/dist/components/EmblaCarousel/useSelectedSnapDisplay.js +15 -0
- package/dist/components/EmptyCartIcon.js +25 -0
- package/dist/components/FilterGroup.d.ts +5 -3
- package/dist/components/FilterGroup.d.ts.map +1 -1
- package/dist/components/FilterGroup.js +198 -0
- package/dist/components/FullViewportBox.js +19 -0
- package/dist/components/Grid.js +54 -0
- package/dist/components/Heading.js +50 -0
- package/dist/components/HorizontalDivider.js +20 -0
- package/dist/components/Icon.d.ts +5 -2
- package/dist/components/Icon.d.ts.map +1 -1
- package/dist/components/Icon.js +73 -0
- package/dist/components/ImagePlaceholder.js +22 -0
- package/dist/components/Input.d.ts +11 -9
- package/dist/components/Input.d.ts.map +1 -1
- package/dist/components/Input.js +469 -0
- package/dist/components/InputGroup.js +45 -0
- package/dist/components/Label.js +37 -0
- package/dist/components/Link.js +69 -0
- package/dist/components/List.js +12 -0
- package/dist/components/ListGroup.d.ts.map +1 -1
- package/dist/components/ListGroup.js +54 -0
- package/dist/components/LiveChatComponent.js +25 -0
- package/dist/components/LoadingScrim.js +22 -0
- package/dist/components/LogoAgilityTopBar.js +90 -0
- package/dist/components/LogoDMSiTopBar.js +54 -0
- package/dist/components/LogoMillworkTopBar.js +196 -0
- package/dist/components/MainBar.js +58 -0
- package/dist/components/MaxViewportBox.js +19 -0
- package/dist/components/Menu.d.ts.map +1 -1
- package/dist/components/Menu.js +202 -0
- package/dist/components/MenuOption.js +161 -0
- package/dist/components/MobileDataGrid/ColumnList.js +85 -0
- package/dist/components/MobileDataGrid/ColumnSelector/index.js +100 -0
- package/dist/components/MobileDataGrid/GridContextProvider/GridContext.d.ts.map +1 -1
- package/dist/components/MobileDataGrid/GridContextProvider/GridContext.js +6 -0
- package/dist/components/MobileDataGrid/GridContextProvider/index.js +80 -0
- package/dist/components/MobileDataGrid/GridContextProvider/useGridContext.js +11 -0
- package/dist/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.js +18 -0
- package/dist/components/MobileDataGrid/MobileDataGridCard/index.d.ts +2 -1
- package/dist/components/MobileDataGrid/MobileDataGridCard/index.d.ts.map +1 -1
- package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +130 -0
- package/dist/components/MobileDataGrid/MobileDataGridHeader.d.ts.map +1 -1
- package/dist/components/MobileDataGrid/MobileDataGridHeader.js +67 -0
- package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +42 -0
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.d.ts.map +1 -1
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +58 -0
- package/dist/components/MobileDataGrid/dataGridReducer.js +28 -0
- package/dist/components/MobileDataGrid/index.d.ts +1 -1
- package/dist/components/MobileDataGrid/index.d.ts.map +1 -1
- package/dist/components/MobileDataGrid/index.js +78 -0
- package/dist/components/MobileNavMenu.d.ts.map +1 -1
- package/dist/components/MobileNavMenu.js +173 -0
- package/dist/components/Modal.d.ts +1 -2
- package/dist/components/Modal.d.ts.map +1 -1
- package/dist/components/Modal.js +201 -0
- package/dist/components/ModalButtons.d.ts.map +1 -1
- package/dist/components/ModalButtons.js +57 -0
- package/dist/components/ModalContent.d.ts +1 -2
- package/dist/components/ModalContent.d.ts.map +1 -1
- package/dist/components/ModalContent.js +24 -0
- package/dist/components/ModalHeader.js +74 -0
- package/dist/components/ModalScrim.js +32 -0
- package/dist/components/NavigationTab.js +72 -0
- package/dist/components/NavigationTabs.js +45 -0
- package/dist/components/NestedMenu.d.ts.map +1 -1
- package/dist/components/NestedMenu.js +119 -0
- package/dist/components/Notification.js +91 -0
- package/dist/components/OptionPill.d.ts +2 -1
- package/dist/components/OptionPill.d.ts.map +1 -1
- package/dist/components/OptionPill.js +103 -0
- package/dist/components/OrderCheckIcon.js +28 -0
- package/dist/components/PDFViewer/DownloadIcon.js +25 -0
- package/dist/components/PDFViewer/PDFElement.js +77 -0
- package/dist/components/PDFViewer/PDFNavigation.js +64 -0
- package/dist/components/PDFViewer/PDFPage.js +28 -0
- package/dist/components/PDFViewer/index.d.ts.map +1 -1
- package/dist/components/PDFViewer/index.js +124 -0
- package/dist/components/Pagination.d.ts.map +1 -1
- package/dist/components/Pagination.js +117 -0
- package/dist/components/Paragraph.js +43 -0
- package/dist/components/Password.js +47 -0
- package/dist/components/ProductImagePreview/CarouselPagination.js +48 -0
- package/dist/components/ProductImagePreview/MobileImageCarousel.d.ts +2 -1
- package/dist/components/ProductImagePreview/MobileImageCarousel.d.ts.map +1 -1
- package/dist/components/ProductImagePreview/MobileImageCarousel.js +146 -0
- package/dist/components/ProductImagePreview/ProductPrimaryImage.d.ts +2 -1
- package/dist/components/ProductImagePreview/ProductPrimaryImage.d.ts.map +1 -1
- package/dist/components/ProductImagePreview/ProductPrimaryImage.js +138 -0
- package/dist/components/ProductImagePreview/Thumbnail.d.ts +2 -1
- package/dist/components/ProductImagePreview/Thumbnail.d.ts.map +1 -1
- package/dist/components/ProductImagePreview/Thumbnail.js +46 -0
- package/dist/components/ProductImagePreview/ZoomWindow.js +74 -0
- package/dist/components/ProductImagePreview/index.d.ts.map +1 -1
- package/dist/components/ProductImagePreview/index.js +189 -0
- package/dist/components/ProductImagePreview/useProductImagePreview.js +85 -0
- package/dist/components/ProjectBar.d.ts +1 -1
- package/dist/components/ProjectBar.js +54 -0
- package/dist/components/Radio.js +113 -0
- package/dist/components/Search.js +89 -0
- package/dist/components/SearchResultImage/index.js +26 -0
- package/dist/components/Select.js +122 -0
- package/dist/components/SideMenu.js +24 -0
- package/dist/components/SideMenuGroup.js +80 -0
- package/dist/components/SideMenuItem.js +79 -0
- package/dist/components/SimpleTable.js +60 -0
- package/dist/components/SkeletonParagraph.js +24 -0
- package/dist/components/Spinner.d.ts +1 -1
- package/dist/components/Spinner.d.ts.map +1 -1
- package/dist/components/Spinner.js +30 -0
- package/dist/components/Stack.js +174 -0
- package/dist/components/StatusPill.js +44 -0
- package/dist/components/Stepper.js +138 -0
- package/dist/components/Subheader.d.ts +2 -1
- package/dist/components/Subheader.d.ts.map +1 -1
- package/dist/components/Subheader.js +41 -0
- package/dist/components/Surface.js +30 -0
- package/dist/components/Swatch.js +1498 -0
- package/dist/components/Textarea.js +106 -0
- package/dist/components/Theme.d.ts +1 -1
- package/dist/components/Theme.d.ts.map +1 -1
- package/dist/components/Theme.js +25 -0
- package/dist/components/Time.d.ts +2 -1
- package/dist/components/Time.d.ts.map +1 -1
- package/dist/components/Time.js +225 -0
- package/dist/components/Toast.d.ts +4 -3
- package/dist/components/Toast.d.ts.map +1 -1
- package/dist/components/Toast.js +170 -0
- package/dist/components/Tooltip.js +102 -0
- package/dist/components/TopBar.d.ts.map +1 -1
- package/dist/components/TopBar.js +119 -0
- package/dist/components/Upload.js +107 -0
- package/dist/components/WorldpayIframe.d.ts.map +1 -1
- package/dist/components/WorldpayIframe.js +19 -0
- package/dist/hooks/useEditCell.js +23 -0
- package/dist/hooks/useInfiniteScroll.js +25 -0
- package/dist/hooks/useKeydown.js +20 -0
- package/dist/hooks/useMatchesMedia.js +15 -0
- package/dist/hooks/useMenuSystem.js +186 -0
- package/dist/hooks/useMounted.js +9 -0
- package/dist/hooks/useTableLayout/computeColumns.js +59 -0
- package/dist/hooks/useTableLayout/storage.js +64 -0
- package/dist/hooks/useTableLayout/useTableLayout.js +163 -0
- package/dist/index.js +249 -52864
- package/dist/lib/loadFonts.js +11 -0
- package/dist/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js +56 -0
- package/dist/node_modules/@dnd-kit/core/dist/core.esm.js +2299 -0
- package/dist/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.js +13 -0
- package/dist/node_modules/@dnd-kit/sortable/dist/sortable.esm.js +367 -0
- package/dist/node_modules/@dnd-kit/utilities/dist/utilities.esm.js +235 -0
- package/dist/node_modules/@headlessui/react/dist/components/description/description.js +45 -0
- package/dist/node_modules/@headlessui/react/dist/components/keyboard.js +4 -0
- package/dist/node_modules/@headlessui/react/dist/components/label/label.js +62 -0
- package/dist/node_modules/@headlessui/react/dist/components/switch/switch.js +56 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-active-press.js +33 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-controllable.js +10 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-default-value.js +8 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-disposables.js +9 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-event.js +9 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-iso-morphic-effect.js +8 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-latest-value.js +11 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-resolve-button-type.js +12 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-slot.js +7 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-sync-refs.js +16 -0
- package/dist/node_modules/@headlessui/react/dist/internal/disabled.js +8 -0
- package/dist/node_modules/@headlessui/react/dist/internal/form-fields.js +35 -0
- package/dist/node_modules/@headlessui/react/dist/internal/hidden.js +13 -0
- package/dist/node_modules/@headlessui/react/dist/internal/id.js +8 -0
- package/dist/node_modules/@headlessui/react/dist/utils/bugs.js +19 -0
- package/dist/node_modules/@headlessui/react/dist/utils/class-names.js +6 -0
- package/dist/node_modules/@headlessui/react/dist/utils/disposables.js +40 -0
- package/dist/node_modules/@headlessui/react/dist/utils/dom.js +34 -0
- package/dist/node_modules/@headlessui/react/dist/utils/env.js +34 -0
- package/dist/node_modules/@headlessui/react/dist/utils/form.js +32 -0
- package/dist/node_modules/@headlessui/react/dist/utils/match.js +11 -0
- package/dist/node_modules/@headlessui/react/dist/utils/micro-task.js +8 -0
- package/dist/node_modules/@headlessui/react/dist/utils/owner.js +8 -0
- package/dist/node_modules/@headlessui/react/dist/utils/render.js +126 -0
- package/dist/node_modules/@js-temporal/polyfill/dist/index.esm.js +3913 -0
- package/dist/node_modules/@mikecousins/react-pdf/dist/index.js +83 -0
- package/dist/node_modules/@react-aria/focus/dist/useFocusRing.js +38 -0
- package/dist/node_modules/@react-aria/interactions/dist/useFocus.js +31 -0
- package/dist/node_modules/@react-aria/interactions/dist/useFocusVisible.js +99 -0
- package/dist/node_modules/@react-aria/interactions/dist/useFocusWithin.js +59 -0
- package/dist/node_modules/@react-aria/interactions/dist/useHover.js +86 -0
- package/dist/node_modules/@react-aria/interactions/dist/utils.js +68 -0
- package/dist/node_modules/@react-aria/utils/dist/DOMFunctions.js +32 -0
- package/dist/node_modules/@react-aria/utils/dist/domHelpers.js +15 -0
- package/dist/node_modules/@react-aria/utils/dist/focusWithoutScrolling.js +45 -0
- package/dist/node_modules/@react-aria/utils/dist/isVirtualEvent.js +7 -0
- package/dist/node_modules/@react-aria/utils/dist/openLink.js +28 -0
- package/dist/node_modules/@react-aria/utils/dist/platform.js +47 -0
- package/dist/node_modules/@react-aria/utils/dist/useGlobalListeners.js +34 -0
- package/dist/node_modules/@react-aria/utils/dist/useLayoutEffect.js +6 -0
- package/dist/node_modules/@react-stately/flags/dist/import.js +7 -0
- package/dist/node_modules/@tanstack/react-table/build/lib/index.js +94 -0
- package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js +38 -0
- package/dist/node_modules/@tanstack/table-core/build/lib/index.js +1954 -0
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +575 -0
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +52 -0
- package/dist/node_modules/clsx/dist/clsx.js +17 -0
- package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +1204 -0
- package/dist/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js +126 -0
- package/dist/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js +24 -0
- package/dist/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +35 -0
- package/dist/node_modules/jsbi/dist/jsbi.js +1040 -0
- package/dist/node_modules/react-use/esm/usePrevious.js +10 -0
- package/dist/static/no-results-image.png.js +4 -0
- package/dist/styles.css +1 -1
- package/dist/utils/date-patch-dashes.js +28 -0
- package/dist/utils/date.js +95 -0
- package/dist/utils/formatting.js +22 -0
- package/dist/utils/index.js +4 -0
- package/dist/utils/mergeObjectArrays.js +18 -0
- package/dist/utils.js +20 -0
- package/package.json +1 -1
- /package/dist/{pdf-l6QfMa5e.js → node_modules/pdfjs-dist/build/pdf.js} +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
function s(e) {
|
|
2
|
+
const t = e.replace(/\D/g, "");
|
|
3
|
+
return t.length <= 2 ? t : t.length <= 4 ? `${t.slice(0, 2)}/${t.slice(2)}` : `${t.slice(0, 2)}/${t.slice(2, 4)}/${t.slice(4, 8)}`;
|
|
4
|
+
}
|
|
5
|
+
function d(e) {
|
|
6
|
+
if (!e) return "";
|
|
7
|
+
let t = "", r = "", i = "";
|
|
8
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(e))
|
|
9
|
+
[t, r, i] = e.split("-");
|
|
10
|
+
else if (/^\d{2}-\d{2}-\d{4}$/.test(e))
|
|
11
|
+
[r, i, t] = e.split("-");
|
|
12
|
+
else if (/^\d{2}\/\d{2}\/\d{4}$/.test(e))
|
|
13
|
+
[r, i, t] = e.split("/");
|
|
14
|
+
else
|
|
15
|
+
return e;
|
|
16
|
+
return !t || !r || !i ? e : `${r}/${i}/${t}`;
|
|
17
|
+
}
|
|
18
|
+
function f(e) {
|
|
19
|
+
if (!e) return "";
|
|
20
|
+
let t = "", r = "", i = "";
|
|
21
|
+
const n = e.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);
|
|
22
|
+
return n && ([, r, i, t] = n), !t || !r || !i ? "" : `${t}-${r}-${i}`;
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
d as formatDateWithDashes,
|
|
26
|
+
s as formatInputValueWithDashes,
|
|
27
|
+
f as parseInputDateWithDashes
|
|
28
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
function h(n) {
|
|
2
|
+
const t = n.match(/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/);
|
|
3
|
+
if (!t)
|
|
4
|
+
return null;
|
|
5
|
+
const [, e, r, i] = t, o = e.padStart(2, "0"), s = r.padStart(2, "0");
|
|
6
|
+
return `${i}-${o}-${s}`;
|
|
7
|
+
}
|
|
8
|
+
function a(n) {
|
|
9
|
+
const t = new Date(n);
|
|
10
|
+
return t instanceof Date && !isNaN(t.getTime()) && n === t.toISOString().split("T")[0];
|
|
11
|
+
}
|
|
12
|
+
function D(n) {
|
|
13
|
+
const t = n.replace(/\D/g, "");
|
|
14
|
+
return t.length < 2 ? t : t.length >= 4 ? `${t.slice(0, 2)}/${t.slice(2, 4)}/${t.slice(4, 8)}` : `${t.slice(0, 2)}/${t.slice(2)}`;
|
|
15
|
+
}
|
|
16
|
+
function u(n) {
|
|
17
|
+
return /\d/.test(n);
|
|
18
|
+
}
|
|
19
|
+
function c(n) {
|
|
20
|
+
return n === "/";
|
|
21
|
+
}
|
|
22
|
+
function f(n, t) {
|
|
23
|
+
let e = 0;
|
|
24
|
+
for (let r = 0; r < t && r < n.length; r++)
|
|
25
|
+
u(n[r]) && e++;
|
|
26
|
+
return e;
|
|
27
|
+
}
|
|
28
|
+
function l(n, t) {
|
|
29
|
+
let e = 0;
|
|
30
|
+
for (let r = 0; r < n.length; r++) {
|
|
31
|
+
if (!u(n[r]) || (e++, e !== t))
|
|
32
|
+
continue;
|
|
33
|
+
const i = r + 1, o = n[i];
|
|
34
|
+
return o && c(o) ? i + 1 : i;
|
|
35
|
+
}
|
|
36
|
+
return n.length;
|
|
37
|
+
}
|
|
38
|
+
function $(n, t, e) {
|
|
39
|
+
const r = f(
|
|
40
|
+
n,
|
|
41
|
+
e
|
|
42
|
+
), i = l(
|
|
43
|
+
t,
|
|
44
|
+
r
|
|
45
|
+
);
|
|
46
|
+
return Math.min(i, t.length);
|
|
47
|
+
}
|
|
48
|
+
function d(n) {
|
|
49
|
+
const [t, e, r] = n.split("-");
|
|
50
|
+
if (!t || !e || !r)
|
|
51
|
+
return null;
|
|
52
|
+
const i = parseInt(t, 10), o = parseInt(e, 10), s = parseInt(r, 10);
|
|
53
|
+
return isNaN(i) || isNaN(o) || isNaN(s) ? null : { year: i, month: o, day: s };
|
|
54
|
+
}
|
|
55
|
+
function g(n, t) {
|
|
56
|
+
return !(n < 1 || n > 12 || t < 1 || t > 31);
|
|
57
|
+
}
|
|
58
|
+
function p(n, t, e) {
|
|
59
|
+
const r = t.toString().padStart(2, "0"), i = e.toString().padStart(2, "0");
|
|
60
|
+
return `${r}/${i}/${n}`;
|
|
61
|
+
}
|
|
62
|
+
function y(n) {
|
|
63
|
+
if (!n)
|
|
64
|
+
return "";
|
|
65
|
+
try {
|
|
66
|
+
const t = d(n);
|
|
67
|
+
if (!t)
|
|
68
|
+
return "";
|
|
69
|
+
const { year: e, month: r, day: i } = t;
|
|
70
|
+
return g(r, i) ? p(e, r, i) : "";
|
|
71
|
+
} catch (t) {
|
|
72
|
+
return console.error("Error formatting date:", t), "";
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
function S(n, t) {
|
|
76
|
+
if (!n || !t || !a(n) || !a(t))
|
|
77
|
+
return !1;
|
|
78
|
+
const e = new Date(n);
|
|
79
|
+
return new Date(t) >= e;
|
|
80
|
+
}
|
|
81
|
+
export {
|
|
82
|
+
$ as calculateCursorPosition,
|
|
83
|
+
f as countDigitsUpToCursor,
|
|
84
|
+
l as findPositionAfterDigitCount,
|
|
85
|
+
y as formatDate,
|
|
86
|
+
p as formatDatePartsToDisplay,
|
|
87
|
+
D as formatInputValue,
|
|
88
|
+
u as isDigit,
|
|
89
|
+
c as isSlash,
|
|
90
|
+
a as isValidDate,
|
|
91
|
+
g as isValidDateRange,
|
|
92
|
+
S as isValidDateRangeOrder,
|
|
93
|
+
d as parseDateParts,
|
|
94
|
+
h as parseInputDate
|
|
95
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
function i(r) {
|
|
2
|
+
return !r || r <= 0 ? {} : {
|
|
3
|
+
placeholder: `0.${"0".repeat(r)}`
|
|
4
|
+
};
|
|
5
|
+
}
|
|
6
|
+
function f(r, t) {
|
|
7
|
+
if (!r || r === "")
|
|
8
|
+
return "";
|
|
9
|
+
const n = typeof r == "string" ? parseFloat(r) : r;
|
|
10
|
+
return isNaN(n) ? "" : !t || t <= 0 ? String(Math.round(n)) : n.toFixed(t);
|
|
11
|
+
}
|
|
12
|
+
function c(r) {
|
|
13
|
+
if (!r || r === "")
|
|
14
|
+
return "";
|
|
15
|
+
const t = r.split("."), n = t[0], e = t[1], o = n.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
16
|
+
return e !== void 0 ? `${o}.${e}` : o;
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
c as formatCurrencyDisplay,
|
|
20
|
+
f as formatDecimalValue,
|
|
21
|
+
i as getDecimalPlaceholder
|
|
22
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
function d(c, s) {
|
|
2
|
+
const r = /* @__PURE__ */ new Map();
|
|
3
|
+
for (const t of s) {
|
|
4
|
+
const e = t.id;
|
|
5
|
+
e !== void 0 && r.set(e, t);
|
|
6
|
+
}
|
|
7
|
+
return c.map((t) => {
|
|
8
|
+
const e = t.id;
|
|
9
|
+
if (e !== void 0 && r.has(e)) {
|
|
10
|
+
const a = r.get(e), o = t.meta, n = a.meta, i = o && n && typeof o == "object" && typeof n == "object" ? { ...o, ...n } : n ?? o;
|
|
11
|
+
return { ...t, ...a, meta: i };
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
d as mergeObjectArrays
|
|
18
|
+
};
|
package/dist/utils.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
function o(n) {
|
|
2
|
+
if (typeof window > "u" || typeof document > "u")
|
|
3
|
+
throw new Error(
|
|
4
|
+
"findDocumentRoot can only be used in a browser environment."
|
|
5
|
+
);
|
|
6
|
+
if (!n || !(n instanceof Node))
|
|
7
|
+
return window.document.body;
|
|
8
|
+
let e = n;
|
|
9
|
+
for (; e && e.parentNode; ) {
|
|
10
|
+
if (e.parentNode === document)
|
|
11
|
+
return document.body;
|
|
12
|
+
if (e.parentNode instanceof DocumentFragment)
|
|
13
|
+
return e.parentNode;
|
|
14
|
+
e = e.parentNode;
|
|
15
|
+
}
|
|
16
|
+
return window.document.body;
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
o as findDocumentRoot
|
|
20
|
+
};
|
package/package.json
CHANGED
|
File without changes
|