1mpacto-react-ui 2.0.16 → 2.0.17
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/assets/style.css +1 -1
- package/dist/components/Alert/index.cjs +1 -0
- package/dist/components/Alert/index.mjs +220 -0
- package/dist/components/Alert/style.module.scss.cjs +1 -0
- package/dist/components/Alert/style.module.scss.mjs +14 -0
- package/dist/components/Badges/Badges.cjs +2 -0
- package/dist/components/Badges/Badges.config.cjs +1 -0
- package/dist/components/Badges/Badges.config.mjs +47 -0
- package/dist/components/Badges/Badges.mjs +29 -0
- package/dist/components/Badges/style.module.scss.cjs +1 -0
- package/dist/components/Badges/style.module.scss.mjs +40 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.cjs +3 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.config.cjs +1 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.config.mjs +16 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.mjs +67 -0
- package/dist/components/Breadcrumbs/style.module.scss.cjs +1 -0
- package/dist/components/Breadcrumbs/style.module.scss.mjs +16 -0
- package/dist/components/Button/Button.cjs +12 -0
- package/dist/components/Button/Button.config.cjs +1 -0
- package/dist/components/Button/Button.config.mjs +75 -0
- package/dist/components/Button/Button.mjs +75 -0
- package/dist/components/Button/style.module.scss.cjs +1 -0
- package/dist/components/Button/style.module.scss.mjs +58 -0
- package/dist/components/ButtonIcon/ButtonIcon.cjs +12 -0
- package/dist/components/ButtonIcon/ButtonIcon.config.cjs +1 -0
- package/dist/components/ButtonIcon/ButtonIcon.config.mjs +68 -0
- package/dist/components/ButtonIcon/ButtonIcon.mjs +65 -0
- package/dist/components/ButtonIcon/style.module.scss.cjs +1 -0
- package/dist/components/ButtonIcon/style.module.scss.mjs +51 -0
- package/dist/components/ButtonPopover/ButtonPopover.cjs +1 -0
- package/dist/components/ButtonPopover/ButtonPopover.mjs +84 -0
- package/dist/components/ButtonPopover/style.module.scss.cjs +1 -0
- package/dist/components/ButtonPopover/style.module.scss.mjs +10 -0
- package/dist/components/Calendar/Calendar.cjs +1 -0
- package/dist/components/Calendar/Calendar.mjs +199 -0
- package/dist/components/Calendar/CalendarButton.cjs +1 -0
- package/dist/components/Calendar/CalendarButton.mjs +18 -0
- package/dist/components/Calendar/CalendarCell.cjs +1 -0
- package/dist/components/Calendar/CalendarCell.mjs +26 -0
- package/dist/components/Calendar/CalendarMonth.cjs +1 -0
- package/dist/components/Calendar/CalendarMonth.mjs +74 -0
- package/dist/components/Calendar/CalendarRange.cjs +1 -0
- package/dist/components/Calendar/CalendarRange.mjs +140 -0
- package/dist/components/Calendar/CalendarYear.cjs +3 -0
- package/dist/components/Calendar/CalendarYear.mjs +74 -0
- package/dist/components/Calendar/style.module.scss.cjs +1 -0
- package/dist/components/Calendar/style.module.scss.mjs +36 -0
- package/dist/components/Chart/DoughnutChart.cjs +1 -0
- package/dist/components/Chart/DoughnutChart.mjs +173 -0
- package/dist/components/Chart/GradientBarChart.cjs +1 -0
- package/dist/components/Chart/GradientBarChart.mjs +157 -0
- package/dist/components/Chart/GradientLineChart.cjs +1 -0
- package/dist/components/Chart/GradientLineChart.mjs +143 -0
- package/dist/components/Chart/LineChart.cjs +1 -0
- package/dist/components/Chart/LineChart.mjs +158 -0
- package/dist/components/Chips/Chips.cjs +3 -0
- package/dist/components/Chips/Chips.config.cjs +1 -0
- package/dist/components/Chips/Chips.config.mjs +35 -0
- package/dist/components/Chips/Chips.mjs +37 -0
- package/dist/components/Chips/style.module.scss.cjs +1 -0
- package/dist/components/Chips/style.module.scss.mjs +14 -0
- package/dist/components/Collapse/Collapse.cjs +1 -0
- package/dist/components/Collapse/Collapse.mjs +35 -0
- package/dist/components/Collapse/CollapseV2.cjs +1 -0
- package/dist/components/Collapse/CollapseV2.mjs +30 -0
- package/dist/components/Collapse/style.module.scss.cjs +1 -0
- package/dist/components/Collapse/style.module.scss.mjs +7 -0
- package/dist/components/DatePicker/DatePicker.cjs +1 -0
- package/dist/components/DatePicker/DatePicker.mjs +125 -0
- package/dist/components/DatePicker/DateRangePicker.cjs +1 -0
- package/dist/components/DatePicker/DateRangePicker.mjs +112 -0
- package/dist/components/DatePicker/FilterDate.cjs +1 -0
- package/dist/components/DatePicker/FilterDate.mjs +248 -0
- package/dist/components/DatePicker/MonthYearPicker.cjs +1 -0
- package/dist/components/DatePicker/MonthYearPicker.mjs +83 -0
- package/dist/components/ErrorMessage/ErrorMessage.cjs +1 -0
- package/dist/components/ErrorMessage/ErrorMessage.config.cjs +1 -0
- package/dist/components/ErrorMessage/ErrorMessage.config.mjs +11 -0
- package/dist/components/ErrorMessage/ErrorMessage.mjs +6 -0
- package/dist/components/ErrorMessage/style.module.scss.cjs +1 -0
- package/dist/components/ErrorMessage/style.module.scss.mjs +8 -0
- package/dist/components/FilterContainer/FilterContainer.cjs +1 -0
- package/dist/components/FilterContainer/FilterContainer.mjs +63 -0
- package/dist/components/Input/InputFloatingInner.cjs +5 -0
- package/dist/components/Input/InputFloatingInner.config.cjs +1 -0
- package/dist/components/Input/InputFloatingInner.config.mjs +11 -0
- package/dist/components/Input/InputFloatingInner.mjs +65 -0
- package/dist/components/Input/InputFloatingInner.module.scss.cjs +1 -0
- package/dist/components/Input/InputFloatingInner.module.scss.mjs +20 -0
- package/dist/components/Input/InputInnerLabel.cjs +6 -0
- package/dist/components/Input/InputInnerLabel.config.cjs +1 -0
- package/dist/components/Input/InputInnerLabel.config.mjs +10 -0
- package/dist/components/Input/InputInnerLabel.mjs +78 -0
- package/dist/components/Input/InputInnerLabel.module.scss.cjs +1 -0
- package/dist/components/Input/InputInnerLabel.module.scss.mjs +20 -0
- package/dist/components/Input/InputNative.cjs +5 -0
- package/dist/components/Input/InputNative.config.cjs +1 -0
- package/dist/components/Input/InputNative.config.mjs +11 -0
- package/dist/components/Input/InputNative.mjs +58 -0
- package/dist/components/Input/InputNative.module.scss.cjs +1 -0
- package/dist/components/Input/InputNative.module.scss.mjs +18 -0
- package/dist/components/Input/InputReguler.cjs +5 -0
- package/dist/components/Input/InputReguler.config.cjs +1 -0
- package/dist/components/Input/InputReguler.config.mjs +11 -0
- package/dist/components/Input/InputReguler.mjs +79 -0
- package/dist/components/Input/InputReguler.module.scss.cjs +1 -0
- package/dist/components/Input/InputReguler.module.scss.mjs +24 -0
- package/dist/components/Modal/ModalDialog.cjs +1 -0
- package/dist/components/Modal/ModalDialog.config.cjs +1 -0
- package/dist/components/Modal/ModalDialog.config.mjs +12 -0
- package/dist/components/Modal/ModalDialog.mjs +44 -0
- package/dist/components/Modal/style.module.scss.cjs +1 -0
- package/dist/components/Modal/style.module.scss.mjs +14 -0
- package/dist/components/NumberFormat/NumberFormat.cjs +1 -0
- package/dist/components/NumberFormat/NumberFormat.mjs +33 -0
- package/dist/components/Pagination/Pagination.cjs +2 -0
- package/dist/components/Pagination/Pagination.config.cjs +1 -0
- package/dist/components/Pagination/Pagination.config.mjs +25 -0
- package/dist/components/Pagination/Pagination.mjs +231 -0
- package/dist/components/Pagination/style.module.scss.cjs +1 -0
- package/dist/components/Pagination/style.module.scss.mjs +20 -0
- package/dist/components/Popover/Popover.cjs +1 -0
- package/dist/components/Popover/Popover.mjs +78 -0
- package/dist/components/Popover/style.module.scss.cjs +1 -0
- package/dist/components/Popover/style.module.scss.mjs +7 -0
- package/dist/components/PortalComponent/PortalComponent.cjs +1 -0
- package/dist/components/PortalComponent/PortalComponent.mjs +18 -0
- package/dist/components/RadioCheckbox/CheckboxTable.cjs +1 -0
- package/dist/components/RadioCheckbox/CheckboxTable.mjs +27 -0
- package/dist/components/RadioCheckbox/RadioCheckbox.cjs +3 -0
- package/dist/components/RadioCheckbox/RadioCheckbox.config.cjs +1 -0
- package/dist/components/RadioCheckbox/RadioCheckbox.config.mjs +31 -0
- package/dist/components/RadioCheckbox/RadioCheckbox.mjs +84 -0
- package/dist/components/RadioCheckbox/RadioCheckbox.module.scss.cjs +1 -0
- package/dist/components/RadioCheckbox/RadioCheckbox.module.scss.mjs +26 -0
- package/dist/components/RadioCheckbox/RadioCheckboxLabel.cjs +4 -0
- package/dist/components/RadioCheckbox/RadioCheckboxLabel.config.cjs +1 -0
- package/dist/components/RadioCheckbox/RadioCheckboxLabel.config.mjs +20 -0
- package/dist/components/RadioCheckbox/RadioCheckboxLabel.mjs +55 -0
- package/dist/components/RadioCheckbox/RadioCheckboxLabel.module.scss.cjs +1 -0
- package/dist/components/RadioCheckbox/RadioCheckboxLabel.module.scss.mjs +19 -0
- package/dist/components/SelectDropdownContainer/SelectDropdownContainer.cjs +1 -0
- package/dist/components/SelectDropdownContainer/SelectDropdownContainer.config.cjs +1 -0
- package/dist/components/SelectDropdownContainer/SelectDropdownContainer.config.mjs +27 -0
- package/dist/components/SelectDropdownContainer/SelectDropdownContainer.mjs +150 -0
- package/dist/components/SelectDropdownContainer/SelectDropdownContainer.module.scss.cjs +1 -0
- package/dist/components/SelectDropdownContainer/SelectDropdownContainer.module.scss.mjs +10 -0
- package/dist/components/SelectDropdownContainer/styleConfig.cjs +1 -0
- package/dist/components/SelectDropdownContainer/styleConfig.mjs +277 -0
- package/dist/components/Sidebar/ItemSidebar.cjs +8 -0
- package/dist/components/Sidebar/ItemSidebar.config.cjs +1 -0
- package/dist/components/Sidebar/ItemSidebar.config.mjs +42 -0
- package/dist/components/Sidebar/ItemSidebar.mjs +122 -0
- package/dist/components/Sidebar/Sidebar.cjs +1 -0
- package/dist/components/Sidebar/Sidebar.config.cjs +1 -0
- package/dist/components/Sidebar/Sidebar.config.mjs +25 -0
- package/dist/components/Sidebar/Sidebar.mjs +136 -0
- package/dist/components/Sidebar/Sidebar.module.scss.cjs +1 -0
- package/dist/components/Sidebar/Sidebar.module.scss.mjs +26 -0
- package/dist/components/Sidebar/itemSidebar.module.scss.cjs +1 -0
- package/dist/components/Sidebar/itemSidebar.module.scss.mjs +31 -0
- package/dist/components/Step/Step.cjs +5 -0
- package/dist/components/Step/Step.mjs +85 -0
- package/dist/components/Step/Step.module.scss.cjs +1 -0
- package/dist/components/Step/Step.module.scss.mjs +17 -0
- package/dist/components/Step/StepIndicator.cjs +4 -0
- package/dist/components/Step/StepIndicator.mjs +65 -0
- package/dist/components/Step/StepIndicator.module.scss.cjs +1 -0
- package/dist/components/Step/StepIndicator.module.scss.mjs +16 -0
- package/dist/components/Switch/Switch.cjs +1 -0
- package/dist/components/Switch/Switch.config.cjs +1 -0
- package/dist/components/Switch/Switch.config.mjs +28 -0
- package/dist/components/Switch/Switch.mjs +53 -0
- package/dist/components/Switch/style.module.scss.cjs +1 -0
- package/dist/components/Switch/style.module.scss.mjs +23 -0
- package/dist/components/TPublish/TPublish.cjs +1 -0
- package/dist/components/TPublish/TPublish.mjs +5 -0
- package/dist/components/Table/Table.cjs +3 -0
- package/dist/components/Table/Table.config.cjs +1 -0
- package/dist/components/Table/Table.config.mjs +69 -0
- package/dist/components/Table/Table.mjs +402 -0
- package/dist/components/Table/Table.module.scss.cjs +1 -0
- package/dist/components/Table/Table.module.scss.mjs +19 -0
- package/dist/components/Table/TableSubMobile.cjs +1 -0
- package/dist/components/Table/TableSubMobile.mjs +37 -0
- package/dist/components/Table/TableSubMobile.module.scss.cjs +1 -0
- package/dist/components/Table/TableSubMobile.module.scss.mjs +6 -0
- package/dist/components/Tabs/TabPanel.cjs +1 -0
- package/dist/components/Tabs/TabPanel.mjs +14 -0
- package/dist/components/Tabs/Tabs.cjs +8 -0
- package/dist/components/Tabs/Tabs.config.cjs +1 -0
- package/dist/components/Tabs/Tabs.config.mjs +33 -0
- package/dist/components/Tabs/Tabs.mjs +112 -0
- package/dist/components/Tabs/style.module.scss.cjs +1 -0
- package/dist/components/Tabs/style.module.scss.mjs +30 -0
- package/dist/components/Text/Text.cjs +5 -0
- package/dist/components/Text/Text.mjs +39 -0
- package/dist/components/TextEditor/TextEditor.cjs +1 -0
- package/dist/components/TextEditor/TextEditor.mjs +9 -0
- package/dist/components/TextEditor/style.module.scss.cjs +1 -0
- package/dist/components/TextEditor/style.module.scss.mjs +7 -0
- package/dist/components/Textarea/Textarea.cjs +7 -0
- package/dist/components/Textarea/Textarea.config.cjs +1 -0
- package/dist/components/Textarea/Textarea.config.mjs +33 -0
- package/dist/components/Textarea/Textarea.mjs +87 -0
- package/dist/components/Textarea/TextareaFloatingInner.cjs +6 -0
- package/dist/components/Textarea/TextareaFloatingInner.config.cjs +1 -0
- package/dist/components/Textarea/TextareaFloatingInner.config.mjs +9 -0
- package/dist/components/Textarea/TextareaFloatingInner.mjs +101 -0
- package/dist/components/Textarea/TextareaFloatingInner.module.scss.cjs +1 -0
- package/dist/components/Textarea/TextareaFloatingInner.module.scss.mjs +17 -0
- package/dist/components/Textarea/TextareaInnerLabel.cjs +6 -0
- package/dist/components/Textarea/TextareaInnerLabel.config.cjs +1 -0
- package/dist/components/Textarea/TextareaInnerLabel.config.mjs +10 -0
- package/dist/components/Textarea/TextareaInnerLabel.mjs +87 -0
- package/dist/components/Textarea/TextareaInnerLabel.module.scss.cjs +1 -0
- package/dist/components/Textarea/TextareaInnerLabel.module.scss.mjs +17 -0
- package/dist/components/Textarea/style.module.scss.cjs +1 -0
- package/dist/components/Textarea/style.module.scss.mjs +25 -0
- package/dist/components/TimeRange/TimeRange.cjs +1 -0
- package/dist/components/TimeRange/TimeRange.mjs +187 -0
- package/dist/components/TimeRange/TimeRange.module.scss.cjs +1 -0
- package/dist/components/TimeRange/TimeRange.module.scss.mjs +23 -0
- package/dist/components/Timeline/Timeline.cjs +1 -0
- package/dist/components/Timeline/Timeline.mjs +12 -0
- package/dist/components/Timeline/style.module.scss.cjs +1 -0
- package/dist/components/Timeline/style.module.scss.mjs +14 -0
- package/dist/components/Tooltip/Tooltip.cjs +1 -0
- package/dist/components/Tooltip/Tooltip.mjs +77 -0
- package/dist/components/Tooltip/Tooltip.module.scss.cjs +1 -0
- package/dist/components/Tooltip/Tooltip.module.scss.mjs +8 -0
- package/dist/components/TruncateComponent/TruncateComponent.cjs +1 -0
- package/dist/components/TruncateComponent/TruncateComponent.mjs +83 -0
- package/dist/components/Upload/UploadFile.cjs +1 -0
- package/dist/components/Upload/UploadFile.mjs +94 -0
- package/dist/components/Upload/UploadFile.module.scss.cjs +1 -0
- package/dist/components/Upload/UploadFile.module.scss.mjs +6 -0
- package/dist/components/Upload/UploadImage.cjs +12 -0
- package/dist/components/Upload/UploadImage.mjs +162 -0
- package/dist/components/Upload/UploadImage.module.scss.cjs +1 -0
- package/dist/components/Upload/UploadImage.module.scss.mjs +14 -0
- package/dist/components/Upload/UploadMultipleFile.cjs +1 -0
- package/dist/components/Upload/UploadMultipleFile.mjs +85 -0
- package/dist/components/Upload/UploadMultipleFile.module.scss.cjs +1 -0
- package/dist/components/Upload/UploadMultipleFile.module.scss.mjs +14 -0
- package/dist/components/Virtualization/ListVirtualization.cjs +1 -0
- package/dist/components/Virtualization/ListVirtualization.mjs +82 -0
- package/dist/components/Virtualization/TableVirtualization.cjs +1 -0
- package/dist/components/Virtualization/TableVirtualization.mjs +84 -0
- package/dist/config/bigNumber/index.cjs +1 -0
- package/dist/config/bigNumber/index.mjs +15 -0
- package/dist/config/components/borderRadius.cjs +1 -0
- package/dist/config/components/borderRadius.mjs +14 -0
- package/dist/config/components/font.cjs +1 -0
- package/dist/config/components/font.mjs +8 -0
- package/dist/config/components/gap.cjs +1 -0
- package/dist/config/components/gap.mjs +110 -0
- package/dist/config/components/tinymce.cjs +28 -0
- package/dist/config/components/tinymce.mjs +81 -0
- package/dist/config/components/typography.cjs +1 -0
- package/dist/config/components/typography.mjs +83 -0
- package/dist/config/resources/index.cjs +1 -0
- package/dist/config/resources/index.mjs +4 -0
- package/dist/config/tailwind/colors.cjs +1 -0
- package/dist/config/tailwind/colors.mjs +291 -0
- package/dist/config/tailwind/nativeScreen.cjs +1 -0
- package/dist/config/tailwind/nativeScreen.mjs +11 -0
- package/dist/config/tailwind/screen.cjs +1 -0
- package/dist/config/tailwind/screen.mjs +11 -0
- package/dist/config/tailwind/typography.cjs +1 -0
- package/dist/config/tailwind/typography.mjs +158 -0
- package/dist/hooks/useAsyncDebounce.cjs +1 -0
- package/dist/hooks/useAsyncDebounce.mjs +21 -0
- package/dist/hooks/useCombinedResizeObserver.cjs +1 -0
- package/dist/hooks/useCombinedResizeObserver.mjs +48 -0
- package/dist/hooks/useCountdown.cjs +1 -0
- package/dist/hooks/useCountdown.mjs +38 -0
- package/dist/hooks/useDeepCompareEffect.cjs +1 -0
- package/dist/hooks/useDeepCompareEffect.mjs +14 -0
- package/dist/hooks/useElementOrWindowMediaQuery.cjs +1 -0
- package/dist/hooks/useElementOrWindowMediaQuery.mjs +23 -0
- package/dist/hooks/useEventListener.cjs +1 -0
- package/dist/hooks/useEventListener.mjs +19 -0
- package/dist/hooks/useMasonry.cjs +1 -0
- package/dist/hooks/useMasonry.mjs +53 -0
- package/dist/hooks/useMergeRefs.cjs +1 -0
- package/dist/hooks/useMergeRefs.mjs +29 -0
- package/dist/hooks/useOtpInput.cjs +1 -0
- package/dist/hooks/useOtpInput.mjs +115 -0
- package/dist/hooks/useStateRef.cjs +1 -0
- package/dist/hooks/useStateRef.mjs +10 -0
- package/dist/index.cjs +1 -247
- package/dist/index.mjs +207 -51684
- package/dist/package.json.cjs +1 -0
- package/dist/package.json.d.ts +3 -2
- package/dist/package.json.mjs +7 -0
- package/dist/public/assets/icons/arrow-narrow-down.svg.cjs +1 -0
- package/dist/public/assets/icons/arrow-narrow-down.svg.mjs +4 -0
- package/dist/utils/axiosBigNumber.cjs +1 -0
- package/dist/utils/axiosBigNumber.mjs +32 -0
- package/dist/utils/common.cjs +1 -0
- package/dist/utils/common.mjs +264 -0
- package/dist/utils/cookies.cjs +1 -0
- package/dist/utils/cookies.mjs +48 -0
- package/dist/utils/formatBigNumber.cjs +1 -0
- package/dist/utils/formatBigNumber.mjs +39 -0
- package/dist/utils/yup.cjs +1 -0
- package/dist/utils/yup.mjs +78 -0
- package/package.json +3 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="2.0.17",o={version:e};exports.default=o;exports.version=e;
|
package/dist/package.json.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
"name": "1mpacto-react-ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.17",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=20.19.4",
|
|
@@ -61,7 +61,7 @@ declare const _default: {
|
|
|
61
61
|
"react": "^19.1.1",
|
|
62
62
|
"react-dom": "^19.1.1",
|
|
63
63
|
"sass": "^1.94.2",
|
|
64
|
-
"storybook": "
|
|
64
|
+
"storybook": "10.1.4",
|
|
65
65
|
"ts-node": "^10.9.2",
|
|
66
66
|
"typescript": "~5.9.3",
|
|
67
67
|
"vite": "^6.3.5",
|
|
@@ -75,6 +75,7 @@ declare const _default: {
|
|
|
75
75
|
"main": "./dist/index.cjs",
|
|
76
76
|
"module": "./dist/index.mjs",
|
|
77
77
|
"types": "./dist/index.d.ts",
|
|
78
|
+
"sideEffects": false,
|
|
78
79
|
"exports": {
|
|
79
80
|
".": {
|
|
80
81
|
"types": "./dist/index.d.ts",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.6673%2011.3333L8.00065%2014M8.00065%2014L5.33398%2011.3333M8.00065%2014V2'%20stroke='%23CFD8DC'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";exports.default=e;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const e = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.6673%2011.3333L8.00065%2014M8.00065%2014L5.33398%2011.3333M8.00065%2014V2'%20stroke='%23CFD8DC'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";
|
|
2
|
+
export {
|
|
3
|
+
e as default
|
|
4
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../config/bigNumber/index.cjs"),u=require("lossless-json");function s(e){if(typeof e=="object"&&e!==null){if(Array.isArray(e))return e.map(s);const n={};for(const[r,t]of Object.entries(e))typeof t=="number"||typeof t=="string"?typeof t=="number"&&!Number.isSafeInteger(t)||typeof t=="string"&&/^-?\d+(?:\.\d+)?$/.test(t)?n[r]=o.BigNumber(t).toString():n[r]=t:typeof t=="object"?n[r]=s(t):n[r]=t;return n}return e}function i(e){if(typeof e=="object"&&e!==null){if(Array.isArray(e))return e.map(i);if(e instanceof o.BigNumber)return e.toString();const n={};for(const[r,t]of Object.entries(e))n[r]=i(t);return n}return e}const f=e=>u.parse(e,null,r=>typeof r=="number"&&!Number.isSafeInteger(r)||typeof r=="string"&&/^-?\d+(?:\.\d+)?$/.test(r)?u.isSafeNumber(r)?parseFloat(r):o.BigNumber(r).toString():r);exports.convertBigNumbersToStrings=i;exports.convertNumbersToBigNumbers=s;exports.convertTextToJsonBigNumbers=f;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { BigNumber as i } from "../config/bigNumber/index.mjs";
|
|
2
|
+
import { parse as o, isSafeNumber as u } from "lossless-json";
|
|
3
|
+
function s(r) {
|
|
4
|
+
if (typeof r == "object" && r !== null) {
|
|
5
|
+
if (Array.isArray(r))
|
|
6
|
+
return r.map(s);
|
|
7
|
+
const n = {};
|
|
8
|
+
for (const [e, t] of Object.entries(r))
|
|
9
|
+
typeof t == "number" || typeof t == "string" ? typeof t == "number" && !Number.isSafeInteger(t) || typeof t == "string" && /^-?\d+(?:\.\d+)?$/.test(t) ? n[e] = i(t).toString() : n[e] = t : typeof t == "object" ? n[e] = s(t) : n[e] = t;
|
|
10
|
+
return n;
|
|
11
|
+
}
|
|
12
|
+
return r;
|
|
13
|
+
}
|
|
14
|
+
function f(r) {
|
|
15
|
+
if (typeof r == "object" && r !== null) {
|
|
16
|
+
if (Array.isArray(r))
|
|
17
|
+
return r.map(f);
|
|
18
|
+
if (r instanceof i)
|
|
19
|
+
return r.toString();
|
|
20
|
+
const n = {};
|
|
21
|
+
for (const [e, t] of Object.entries(r))
|
|
22
|
+
n[e] = f(t);
|
|
23
|
+
return n;
|
|
24
|
+
}
|
|
25
|
+
return r;
|
|
26
|
+
}
|
|
27
|
+
const p = (r) => o(r, null, (e) => typeof e == "number" && !Number.isSafeInteger(e) || typeof e == "string" && /^-?\d+(?:\.\d+)?$/.test(e) ? u(e) ? parseFloat(e) : i(e).toString() : e);
|
|
28
|
+
export {
|
|
29
|
+
f as convertBigNumbersToStrings,
|
|
30
|
+
s as convertNumbersToBigNumbers,
|
|
31
|
+
p as convertTextToJsonBigNumbers
|
|
32
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("date-fns"),g=require("date-fns/locale"),N=require("../config/bigNumber/index.cjs"),b=require("node-forge"),B=e=>{try{return N.BigNumber(e).isFinite()}catch{return!1}},K=e=>{if(typeof e=="number"&&Number.isFinite(e))return!0;if(typeof e=="string"&&e.trim()!==""&&!isNaN(Number(e))){const r=Number(e);return Number.isFinite(r)}return!1};function S(e,r){const{minimumFractionDigits:n,instance:t=!1,ignoreFractionLimit:s=!1}=r||{};let{maximumFractionDigits:i=2}=r||{};B(e)||(e="0"),!s&&n!==void 0&&n>i&&(i=n);let c="";if(s?c=N.BigNumber(e).toString():c=N.BigNumber(e).toFixed(i),c.includes(".")&&!s){const[o,u]=c.split(".");let a=u.replace(/0+$/,"");n!==void 0&&n>=0&&(a=a.padEnd(n,"0")),c=a?`${o}.${a}`:o}return t?N.BigNumber(c):c}const D=(e,r=2)=>{let n=parseFloat(K(e)?e:0);return n=(+(Math.round(n+"e"+r)+"e-"+r)).toFixed(r),n=Number(n),n};function V(e,r="currency",n){const{minimumFractionDigits:t=0,locale:s="id-ID",currency:i="IDR",withSpace:c=!1}=n||{},o=new Intl.NumberFormat(s,{style:r,currency:i,minimumFractionDigits:t}).format(D(e,t>0?t:2));return c?o:o.replace(/\s/g,"")}const w=(e,r,n,t)=>{const s={"id-ID":g.id,"zh-CN":g.zhCN,"en-US":g.enUS,"nl-BE":g.nl};let i=n??"-";return e&&!isNaN(new Date(e).getTime())&&(i=$.format(e,r??"dd/MM/yyyy",{locale:s[t??"id-ID"]})),i},C=(e,r,n,t,s,i)=>{const c={"id-ID":g.id,"zh-CN":g.zhCN,"en-US":g.enUS,"nl-NL":g.nl};if(e&&!isNaN(new Date(e).getTime())){const o=$.format(e,n??"dd/MM/yyyy",{locale:c[i??"id-ID"]});if(r&&!isNaN(new Date(r).getTime())){const u=$.format(r,n??"dd/MM/yyyy",{locale:c[i??"id-ID"]});return o===u?o:`${o}${t??"-"}${u}`}return o}return s??"-"},T=(e,r)=>e.reduce((n,t)=>{const s=String(t[r]);return n[s]||(n[s]=[]),n[s].push(t),n},{}),L=({value:e,keyDate:r="date",keyFormat:n="formatDate",format:t="dd/MM/yyyy"})=>{const s=e.map(i=>({...i,[n]:w(i[r],t)}));return T(s,n)},R=e=>(Object.keys(e).forEach(r=>{["",null,void 0,[],{}].includes(e[r])&&delete e[r]}),e),P=(e,r)=>{var l,d;const n=/^-?\d+[0-9.,]*$/,t=/([.])(?=.*\1)/,s=/([,])(?=.*\1)/,i=((l=e.split(",")[0])==null?void 0:l.trim())||"",c=((d=e.split(",")[1])==null?void 0:d.trim())||"",o=!t.test(i)&&(i==="-"||n.test(i)||!i),u=!t.test(c)&&(c==="-"||n.test(c)||!c),a=(y,p,F)=>{let A=y;const M=y.split(".")[0];return isNaN(parseFloat(M.split(".")[0]))||(parseFloat(M.split(".")[0])<=p?A=`${p}`:parseFloat(M)>=F&&(A=`${F}`)),A},f=a(i,(r==null?void 0:r.latMin)??-85,(r==null?void 0:r.latMax)??85),m=a(c,(r==null?void 0:r.longMin)??-180,(r==null?void 0:r.longMax)??180);return{latitude:f,longitude:m,latlong:`${f}${e.includes(",")?","+m:""}`,isValid:!s.test(e)&&o&&u}},q=(e,r)=>e?Object.fromEntries(Object.entries(r).filter(([t])=>t.startsWith(e))):r,x=(e,r)=>e.map(n=>n[r]).join(","),E=(e,r)=>e.map(n=>n[r]),v=(e,r)=>Array.isArray(e)?e==null?void 0:e.map((n,t,s)=>typeof r=="function"?r(n,t,s):n):[],z=(e,r,n,t,s)=>Array.isArray(e)?{[r]:e==null?void 0:e.map((i,c,o)=>typeof n=="function"?n(i,c,o):i),[`${r}-val-be`]:i=>t==="array-of-object-to-array"?E(i,s):x(i,s)}:{[r]:"",[`${r}-val-be`]:()=>""};function I(e,r){if(e===r)return!0;if(typeof e!="object"||typeof r!="object"||e===null||r===null)return!1;const n=Object.keys(e),t=Object.keys(r);if(n.length!==t.length)return!1;for(const s of n)if(!t.includes(s)||!I(e[s],r[s]))return!1;return!0}function J(e,r={maxTime:"hour"}){const{maxTime:n="hour"}=r,t=u=>u<10?`0${u}`:u;let s=t(0),i=t(0);const c=t(Math.floor(e%3600/60)),o=t(Math.floor(e%60));return n==="hour"?i=t(Math.floor(e/3600)):n==="day"&&(s=t(Math.floor(e/(3600*24))),i=t(Math.floor(e%(3600*24)/3600))),{day:s,hour:i,minute:c,second:o}}function h(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function j(e,...r){if(!r.length)return e;const n=r.shift();if(h(e)&&h(n))for(const t in n)h(n[t])?(e[t]||Object.assign(e,{[t]:{}}),j(e[t],n[t])):Object.assign(e,{[t]:n[t]});return j(e,...r)}function O(e,r){const n=r.match(/[^.[\]]+/g);if(!n||n.length===0)return;const t=(s,i)=>{if(typeof s!="object"||s===null||i.length===0)return;const c=s,o=i[0],u=i.slice(1);if(u.length===0){delete c[o];return}const a=c[o];if(o==="*"&&Array.isArray(c)){for(const f of c)t(f,u);return}t(a,u)};t(e,n)}function U(e,r){if(!e||!r)return e;if(Array.isArray(r))for(const n of r)O(e,n);else O(e,r);return e}function H(e,r){const n=JSON.parse(JSON.stringify(e));if(Array.isArray(r))for(const t of r)O(n,t);else O(n,r);return n}function W(e,r,n={}){const t=n.arrayMergeStrategy||"combine",s=(n.keepKeys||[]).map(o=>o.match(/[^.[\]]+/g)||[]),i=o=>s.some(u=>u.length!==o.length?!1:u.every((a,f)=>a===o[f]));function c(o,u,a){if(a.length>0&&i(a))return o;if(Array.isArray(u)&&Array.isArray(o)){if(t==="overwrite")return[...u];const f=t==="sync"?u.length:Math.max(o.length,u.length),m=new Array(f);for(let l=0;l<f;l++){const d=[...a,String(l)],y=o[l],p=u[l];if(l>=u.length){m[l]=y;continue}if(l>=o.length){m[l]=p;continue}m[l]=c(y,p,d)}return m}if(h(u)&&h(o)){const f={...o};return Object.keys(u).forEach(m=>{const l=[...a,m],d=u[m],y=o[m];f[m]=c(y,d,l)}),f}return u===void 0?o:u}return c(e,r,[])}const G=e=>D(e||0),Q=e=>S(e||0),X=(e,r)=>S(e||0,r),Y=e=>isNaN(e)?void 0:e,Z=e=>{const r=e.toString().split(""),n=r[1]!=="0"?`,${r[1]}`:"";let[t]=e.toString().split(".");return t=t.replaceAll("-",""),t.length>=15?`${+t.substring(0,3)} T`:t.length===14?`${+t.substring(0,2)} T`:t.length===13?`${+t.substring(0,1)}${n} T`:t.length===12?`${+t.substring(0,3)} M`:t.length===11?`${+t.substring(0,2)} M`:t.length===10?`${+t.substring(0,1)}${n} M`:t.length===9?`${+t.substring(0,3)} JT`:t.length===8?`${+t.substring(0,2)} JT`:t.length===7?`${+t.substring(0,1)}${n} JT`:t.length===6?`${+t.substring(0,3)} RB`:t.length===5?`${+t.substring(0,2)} RB`:t.length===4?`${+t.substring(0,1)}${n} RB`:t.length<=3?+t?`${+t}`:0:null};function _(e){if(typeof e!="string")throw new Error("Input harus berupa string");const r=e.split(".");if(r.length===1)return{filename:e,extension:""};const n="."+r[r.length-1];return{filename:r.slice(0,-1).join("."),extension:n}}const k=e=>(new DOMParser().parseFromString(e||"","text/html").body.textContent??"").toString();function ee(e,r){const n=typeof e=="string"?e:JSON.stringify(e),t=b.util.decode64(r.replace(/\s+/g,"")),s=b.util.decode64(t),i=b.asn1.fromDer(s),o=b.pki.publicKeyFromAsn1(i).encrypt(n,"RSA-OAEP",{md:b.md.sha256.create(),mgf1:{md:b.md.sha1.create()}});return b.util.encode64(o)}exports.deepCompareEquals=I;exports.deepMerge=W;exports.deleteKeysImmutable=H;exports.deleteKeysMutable=U;exports.encryptRSAOAEP=ee;exports.extractElementStringToOriginalValue=k;exports.formatDate=w;exports.formatDateRange=C;exports.formatNumber=V;exports.groupByKey=T;exports.isAccurateBigNumber=B;exports.isAccurateNumber=K;exports.isObject=h;exports.mergeObjects=j;exports.parseBigDecimal=S;exports.parseDecimal=D;exports.parseFileName=_;exports.removeKeyObjectEmptyValue=R;exports.sanitizeObjectKeyPrefix=q;exports.setDigit=Z;exports.transformArrayMapping=v;exports.transformArrayMappingObjectFC=z;exports.transformArrayOfObjectToArray=E;exports.transformArrayOfObjectToString=x;exports.transformBigNumber=Q;exports.transformBigNumberOpt=X;exports.transformDataHistory=L;exports.transformLatLong=P;exports.transformNumber=G;exports.transformSecondTime=J;exports.transfromIsNan=Y;
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import { format as M } from "date-fns";
|
|
2
|
+
import { nl as S, enUS as w, zhCN as D, id as F } from "date-fns/locale";
|
|
3
|
+
import { BigNumber as p } from "../config/bigNumber/index.mjs";
|
|
4
|
+
import y from "node-forge";
|
|
5
|
+
const T = (e) => {
|
|
6
|
+
try {
|
|
7
|
+
return p(e).isFinite();
|
|
8
|
+
} catch {
|
|
9
|
+
return !1;
|
|
10
|
+
}
|
|
11
|
+
}, B = (e) => {
|
|
12
|
+
if (typeof e == "number" && Number.isFinite(e))
|
|
13
|
+
return !0;
|
|
14
|
+
if (typeof e == "string" && e.trim() !== "" && !isNaN(Number(e))) {
|
|
15
|
+
const t = Number(e);
|
|
16
|
+
return Number.isFinite(t);
|
|
17
|
+
}
|
|
18
|
+
return !1;
|
|
19
|
+
};
|
|
20
|
+
function x(e, t) {
|
|
21
|
+
const { minimumFractionDigits: n, instance: r = !1, ignoreFractionLimit: s = !1 } = t || {};
|
|
22
|
+
let { maximumFractionDigits: i = 2 } = t || {};
|
|
23
|
+
T(e) || (e = "0"), !s && n !== void 0 && n > i && (i = n);
|
|
24
|
+
let c = "";
|
|
25
|
+
if (s ? c = p(e).toString() : c = p(e).toFixed(i), c.includes(".") && !s) {
|
|
26
|
+
const [o, u] = c.split(".");
|
|
27
|
+
let l = u.replace(/0+$/, "");
|
|
28
|
+
n !== void 0 && n >= 0 && (l = l.padEnd(n, "0")), c = l ? `${o}.${l}` : o;
|
|
29
|
+
}
|
|
30
|
+
return r ? p(c) : c;
|
|
31
|
+
}
|
|
32
|
+
const K = (e, t = 2) => {
|
|
33
|
+
let n = parseFloat(B(e) ? e : 0);
|
|
34
|
+
return n = (+(Math.round(n + "e" + t) + "e-" + t)).toFixed(t), n = Number(n), n;
|
|
35
|
+
};
|
|
36
|
+
function z(e, t = "currency", n) {
|
|
37
|
+
const { minimumFractionDigits: r = 0, locale: s = "id-ID", currency: i = "IDR", withSpace: c = !1 } = n || {}, o = new Intl.NumberFormat(s, {
|
|
38
|
+
style: t,
|
|
39
|
+
currency: i,
|
|
40
|
+
minimumFractionDigits: r
|
|
41
|
+
}).format(K(e, r > 0 ? r : 2));
|
|
42
|
+
return c ? o : o.replace(/\s/g, "");
|
|
43
|
+
}
|
|
44
|
+
const I = (e, t, n, r) => {
|
|
45
|
+
const s = { "id-ID": F, "zh-CN": D, "en-US": w, "nl-BE": S };
|
|
46
|
+
let i = n ?? "-";
|
|
47
|
+
return e && !isNaN(new Date(e).getTime()) && (i = M(e, t ?? "dd/MM/yyyy", { locale: s[r ?? "id-ID"] })), i;
|
|
48
|
+
}, U = (e, t, n, r, s, i) => {
|
|
49
|
+
const c = { "id-ID": F, "zh-CN": D, "en-US": w, "nl-NL": S };
|
|
50
|
+
if (e && !isNaN(new Date(e).getTime())) {
|
|
51
|
+
const o = M(e, n ?? "dd/MM/yyyy", { locale: c[i ?? "id-ID"] });
|
|
52
|
+
if (t && !isNaN(new Date(t).getTime())) {
|
|
53
|
+
const u = M(t, n ?? "dd/MM/yyyy", { locale: c[i ?? "id-ID"] });
|
|
54
|
+
return o === u ? o : `${o}${r ?? "-"}${u}`;
|
|
55
|
+
}
|
|
56
|
+
return o;
|
|
57
|
+
}
|
|
58
|
+
return s ?? "-";
|
|
59
|
+
}, V = (e, t) => e.reduce((n, r) => {
|
|
60
|
+
const s = String(r[t]);
|
|
61
|
+
return n[s] || (n[s] = []), n[s].push(r), n;
|
|
62
|
+
}, {}), q = ({
|
|
63
|
+
value: e,
|
|
64
|
+
keyDate: t = "date",
|
|
65
|
+
keyFormat: n = "formatDate",
|
|
66
|
+
format: r = "dd/MM/yyyy"
|
|
67
|
+
}) => {
|
|
68
|
+
const s = e.map((i) => ({
|
|
69
|
+
...i,
|
|
70
|
+
[n]: I(i[t], r)
|
|
71
|
+
}));
|
|
72
|
+
return V(s, n);
|
|
73
|
+
}, H = (e) => (Object.keys(e).forEach((t) => {
|
|
74
|
+
["", null, void 0, [], {}].includes(e[t]) && delete e[t];
|
|
75
|
+
}), e), W = (e, t) => {
|
|
76
|
+
var f, h;
|
|
77
|
+
const n = /^-?\d+[0-9.,]*$/, r = /([.])(?=.*\1)/, s = /([,])(?=.*\1)/, i = ((f = e.split(",")[0]) == null ? void 0 : f.trim()) || "", c = ((h = e.split(",")[1]) == null ? void 0 : h.trim()) || "", o = !r.test(i) && (i === "-" || n.test(i) || !i), u = !r.test(c) && (c === "-" || n.test(c) || !c), l = (m, b, O) => {
|
|
78
|
+
let A = m;
|
|
79
|
+
const $ = m.split(".")[0];
|
|
80
|
+
return isNaN(parseFloat($.split(".")[0])) || (parseFloat($.split(".")[0]) <= b ? A = `${b}` : parseFloat($) >= O && (A = `${O}`)), A;
|
|
81
|
+
}, a = l(i, (t == null ? void 0 : t.latMin) ?? -85, (t == null ? void 0 : t.latMax) ?? 85), g = l(c, (t == null ? void 0 : t.longMin) ?? -180, (t == null ? void 0 : t.longMax) ?? 180);
|
|
82
|
+
return {
|
|
83
|
+
latitude: a,
|
|
84
|
+
longitude: g,
|
|
85
|
+
latlong: `${a}${e.includes(",") ? "," + g : ""}`,
|
|
86
|
+
isValid: !s.test(e) && o && u
|
|
87
|
+
};
|
|
88
|
+
}, G = (e, t) => e ? Object.fromEntries(Object.entries(t).filter(([r]) => r.startsWith(e))) : t, E = (e, t) => e.map((n) => n[t]).join(","), L = (e, t) => e.map((n) => n[t]), Q = (e, t) => Array.isArray(e) ? e == null ? void 0 : e.map(
|
|
89
|
+
(n, r, s) => typeof t == "function" ? t(n, r, s) : n
|
|
90
|
+
) : [], X = (e, t, n, r, s) => Array.isArray(e) ? {
|
|
91
|
+
[t]: e == null ? void 0 : e.map(
|
|
92
|
+
(i, c, o) => typeof n == "function" ? n(i, c, o) : i
|
|
93
|
+
),
|
|
94
|
+
[`${t}-val-be`]: (i) => r === "array-of-object-to-array" ? L(i, s) : E(i, s)
|
|
95
|
+
} : { [t]: "", [`${t}-val-be`]: () => "" };
|
|
96
|
+
function R(e, t) {
|
|
97
|
+
if (e === t) return !0;
|
|
98
|
+
if (typeof e != "object" || typeof t != "object" || e === null || t === null)
|
|
99
|
+
return !1;
|
|
100
|
+
const n = Object.keys(e), r = Object.keys(t);
|
|
101
|
+
if (n.length !== r.length) return !1;
|
|
102
|
+
for (const s of n)
|
|
103
|
+
if (!r.includes(s) || !R(e[s], t[s]))
|
|
104
|
+
return !1;
|
|
105
|
+
return !0;
|
|
106
|
+
}
|
|
107
|
+
function Y(e, t = { maxTime: "hour" }) {
|
|
108
|
+
const { maxTime: n = "hour" } = t, r = (u) => u < 10 ? `0${u}` : u;
|
|
109
|
+
let s = r(0), i = r(0);
|
|
110
|
+
const c = r(Math.floor(e % 3600 / 60)), o = r(Math.floor(e % 60));
|
|
111
|
+
return n === "hour" ? i = r(Math.floor(e / 3600)) : n === "day" && (s = r(Math.floor(e / (3600 * 24))), i = r(Math.floor(e % (3600 * 24) / 3600))), {
|
|
112
|
+
day: s,
|
|
113
|
+
hour: i,
|
|
114
|
+
minute: c,
|
|
115
|
+
second: o
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
function d(e) {
|
|
119
|
+
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
120
|
+
}
|
|
121
|
+
function j(e, ...t) {
|
|
122
|
+
if (!t.length) return e;
|
|
123
|
+
const n = t.shift();
|
|
124
|
+
if (d(e) && d(n))
|
|
125
|
+
for (const r in n)
|
|
126
|
+
d(n[r]) ? (e[r] || Object.assign(e, { [r]: {} }), j(e[r], n[r])) : Object.assign(e, { [r]: n[r] });
|
|
127
|
+
return j(e, ...t);
|
|
128
|
+
}
|
|
129
|
+
function N(e, t) {
|
|
130
|
+
const n = t.match(/[^.[\]]+/g);
|
|
131
|
+
if (!n || n.length === 0)
|
|
132
|
+
return;
|
|
133
|
+
const r = (s, i) => {
|
|
134
|
+
if (typeof s != "object" || s === null || i.length === 0)
|
|
135
|
+
return;
|
|
136
|
+
const c = s, o = i[0], u = i.slice(1);
|
|
137
|
+
if (u.length === 0) {
|
|
138
|
+
delete c[o];
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
const l = c[o];
|
|
142
|
+
if (o === "*" && Array.isArray(c)) {
|
|
143
|
+
for (const a of c)
|
|
144
|
+
r(a, u);
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
r(l, u);
|
|
148
|
+
};
|
|
149
|
+
r(e, n);
|
|
150
|
+
}
|
|
151
|
+
function Z(e, t) {
|
|
152
|
+
if (!e || !t)
|
|
153
|
+
return e;
|
|
154
|
+
if (Array.isArray(t))
|
|
155
|
+
for (const n of t)
|
|
156
|
+
N(e, n);
|
|
157
|
+
else
|
|
158
|
+
N(e, t);
|
|
159
|
+
return e;
|
|
160
|
+
}
|
|
161
|
+
function _(e, t) {
|
|
162
|
+
const n = JSON.parse(JSON.stringify(e));
|
|
163
|
+
if (Array.isArray(t))
|
|
164
|
+
for (const r of t)
|
|
165
|
+
N(n, r);
|
|
166
|
+
else
|
|
167
|
+
N(n, t);
|
|
168
|
+
return n;
|
|
169
|
+
}
|
|
170
|
+
function k(e, t, n = {}) {
|
|
171
|
+
const r = n.arrayMergeStrategy || "combine", s = (n.keepKeys || []).map((o) => o.match(/[^.[\]]+/g) || []), i = (o) => s.some((u) => u.length !== o.length ? !1 : u.every((l, a) => l === o[a]));
|
|
172
|
+
function c(o, u, l) {
|
|
173
|
+
if (l.length > 0 && i(l))
|
|
174
|
+
return o;
|
|
175
|
+
if (Array.isArray(u) && Array.isArray(o)) {
|
|
176
|
+
if (r === "overwrite")
|
|
177
|
+
return [...u];
|
|
178
|
+
const a = r === "sync" ? u.length : Math.max(o.length, u.length), g = new Array(a);
|
|
179
|
+
for (let f = 0; f < a; f++) {
|
|
180
|
+
const h = [...l, String(f)], m = o[f], b = u[f];
|
|
181
|
+
if (f >= u.length) {
|
|
182
|
+
g[f] = m;
|
|
183
|
+
continue;
|
|
184
|
+
}
|
|
185
|
+
if (f >= o.length) {
|
|
186
|
+
g[f] = b;
|
|
187
|
+
continue;
|
|
188
|
+
}
|
|
189
|
+
g[f] = c(m, b, h);
|
|
190
|
+
}
|
|
191
|
+
return g;
|
|
192
|
+
}
|
|
193
|
+
if (d(u) && d(o)) {
|
|
194
|
+
const a = { ...o };
|
|
195
|
+
return Object.keys(u).forEach((g) => {
|
|
196
|
+
const f = [...l, g], h = u[g], m = o[g];
|
|
197
|
+
a[g] = c(m, h, f);
|
|
198
|
+
}), a;
|
|
199
|
+
}
|
|
200
|
+
return u === void 0 ? o : u;
|
|
201
|
+
}
|
|
202
|
+
return c(e, t, []);
|
|
203
|
+
}
|
|
204
|
+
const ee = (e) => K(e || 0), te = (e) => x(e || 0), re = (e, t) => x(e || 0, t), ne = (e) => isNaN(e) ? void 0 : e, ie = (e) => {
|
|
205
|
+
const t = e.toString().split(""), n = t[1] !== "0" ? `,${t[1]}` : "";
|
|
206
|
+
let [r] = e.toString().split(".");
|
|
207
|
+
return r = r.replaceAll("-", ""), r.length >= 15 ? `${+r.substring(0, 3)} T` : r.length === 14 ? `${+r.substring(0, 2)} T` : r.length === 13 ? `${+r.substring(0, 1)}${n} T` : r.length === 12 ? `${+r.substring(0, 3)} M` : r.length === 11 ? `${+r.substring(0, 2)} M` : r.length === 10 ? `${+r.substring(0, 1)}${n} M` : r.length === 9 ? `${+r.substring(0, 3)} JT` : r.length === 8 ? `${+r.substring(0, 2)} JT` : r.length === 7 ? `${+r.substring(0, 1)}${n} JT` : r.length === 6 ? `${+r.substring(0, 3)} RB` : r.length === 5 ? `${+r.substring(0, 2)} RB` : r.length === 4 ? `${+r.substring(0, 1)}${n} RB` : r.length <= 3 ? +r ? `${+r}` : 0 : null;
|
|
208
|
+
};
|
|
209
|
+
function se(e) {
|
|
210
|
+
if (typeof e != "string")
|
|
211
|
+
throw new Error("Input harus berupa string");
|
|
212
|
+
const t = e.split(".");
|
|
213
|
+
if (t.length === 1)
|
|
214
|
+
return {
|
|
215
|
+
filename: e,
|
|
216
|
+
extension: ""
|
|
217
|
+
};
|
|
218
|
+
const n = "." + t[t.length - 1];
|
|
219
|
+
return {
|
|
220
|
+
filename: t.slice(0, -1).join("."),
|
|
221
|
+
extension: n
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
const oe = (e) => (new DOMParser().parseFromString(e || "", "text/html").body.textContent ?? "").toString();
|
|
225
|
+
function ce(e, t) {
|
|
226
|
+
const n = typeof e == "string" ? e : JSON.stringify(e), r = y.util.decode64(t.replace(/\s+/g, "")), s = y.util.decode64(r), i = y.asn1.fromDer(s), o = y.pki.publicKeyFromAsn1(i).encrypt(n, "RSA-OAEP", {
|
|
227
|
+
md: y.md.sha256.create(),
|
|
228
|
+
mgf1: { md: y.md.sha1.create() }
|
|
229
|
+
});
|
|
230
|
+
return y.util.encode64(o);
|
|
231
|
+
}
|
|
232
|
+
export {
|
|
233
|
+
R as deepCompareEquals,
|
|
234
|
+
k as deepMerge,
|
|
235
|
+
_ as deleteKeysImmutable,
|
|
236
|
+
Z as deleteKeysMutable,
|
|
237
|
+
ce as encryptRSAOAEP,
|
|
238
|
+
oe as extractElementStringToOriginalValue,
|
|
239
|
+
I as formatDate,
|
|
240
|
+
U as formatDateRange,
|
|
241
|
+
z as formatNumber,
|
|
242
|
+
V as groupByKey,
|
|
243
|
+
T as isAccurateBigNumber,
|
|
244
|
+
B as isAccurateNumber,
|
|
245
|
+
d as isObject,
|
|
246
|
+
j as mergeObjects,
|
|
247
|
+
x as parseBigDecimal,
|
|
248
|
+
K as parseDecimal,
|
|
249
|
+
se as parseFileName,
|
|
250
|
+
H as removeKeyObjectEmptyValue,
|
|
251
|
+
G as sanitizeObjectKeyPrefix,
|
|
252
|
+
ie as setDigit,
|
|
253
|
+
Q as transformArrayMapping,
|
|
254
|
+
X as transformArrayMappingObjectFC,
|
|
255
|
+
L as transformArrayOfObjectToArray,
|
|
256
|
+
E as transformArrayOfObjectToString,
|
|
257
|
+
te as transformBigNumber,
|
|
258
|
+
re as transformBigNumberOpt,
|
|
259
|
+
q as transformDataHistory,
|
|
260
|
+
W as transformLatLong,
|
|
261
|
+
ee as transformNumber,
|
|
262
|
+
Y as transformSecondTime,
|
|
263
|
+
ne as transfromIsNan
|
|
264
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("js-cookie"),a={setItem(t,s,n={},e=3e3){const l={...{path:"/",expires:365},...n};parseInt(o.get(`${t}_count`)??"0",10)&&this.removeItem(t,n);const c=Math.ceil(s.length/e);for(let r=0;r<c;r++){const i=s.slice(r*e,(r+1)*e);o.set(`${t}_${r}`,i,l)}o.set(`${t}_count`,c.toString(),l)},getItem(t){const s=parseInt(o.get(`${t}_count`)??"0",10);if(!s)return null;let n="";for(let e=0;e<s;e++){const u=o.get(`${t}_${e}`);if(!u)return null;n+=u}return n},removeItem(t,s={}){const n=parseInt(o.get(`${t}_count`)??"0",10),e={path:"/",...s};if(!isNaN(n)){for(let u=0;u<n;u++)o.remove(`${t}_${u}`,e);o.remove(`${t}_count`,e)}},clear(t={}){const s={path:"/",...t},n=o.get();Object.keys(n).forEach(e=>o.remove(e,s))}};exports.default=a;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import o from "js-cookie";
|
|
2
|
+
const f = {
|
|
3
|
+
setItem(t, s, n = {}, e = 3e3) {
|
|
4
|
+
const u = { ...{
|
|
5
|
+
path: "/",
|
|
6
|
+
expires: 365
|
|
7
|
+
}, ...n };
|
|
8
|
+
parseInt(o.get(`${t}_count`) ?? "0", 10) && this.removeItem(t, n);
|
|
9
|
+
const i = Math.ceil(s.length / e);
|
|
10
|
+
for (let c = 0; c < i; c++) {
|
|
11
|
+
const l = s.slice(c * e, (c + 1) * e);
|
|
12
|
+
o.set(`${t}_${c}`, l, u);
|
|
13
|
+
}
|
|
14
|
+
o.set(`${t}_count`, i.toString(), u);
|
|
15
|
+
},
|
|
16
|
+
getItem(t) {
|
|
17
|
+
const s = parseInt(o.get(`${t}_count`) ?? "0", 10);
|
|
18
|
+
if (!s) return null;
|
|
19
|
+
let n = "";
|
|
20
|
+
for (let e = 0; e < s; e++) {
|
|
21
|
+
const r = o.get(`${t}_${e}`);
|
|
22
|
+
if (!r) return null;
|
|
23
|
+
n += r;
|
|
24
|
+
}
|
|
25
|
+
return n;
|
|
26
|
+
},
|
|
27
|
+
removeItem(t, s = {}) {
|
|
28
|
+
const n = parseInt(o.get(`${t}_count`) ?? "0", 10), e = {
|
|
29
|
+
path: "/",
|
|
30
|
+
...s
|
|
31
|
+
};
|
|
32
|
+
if (!isNaN(n)) {
|
|
33
|
+
for (let r = 0; r < n; r++)
|
|
34
|
+
o.remove(`${t}_${r}`, e);
|
|
35
|
+
o.remove(`${t}_count`, e);
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
clear(t = {}) {
|
|
39
|
+
const s = {
|
|
40
|
+
path: "/",
|
|
41
|
+
...t
|
|
42
|
+
}, n = o.get();
|
|
43
|
+
Object.keys(n).forEach((e) => o.remove(e, s));
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
export {
|
|
47
|
+
f as default
|
|
48
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("../config/bigNumber/index.cjs"),f=require("./common.cjs");function v(r,n={}){const{locale:a,currency:c,minimumFractionDigits:e,withSpace:y,currencyDisplay:p,ignoreFractionLimit:s=!1}=n;let{maximumFractionDigits:m=2}=n;!s&&e!==void 0&&e>m&&(m=e);const b=f.parseBigDecimal(r,{maximumFractionDigits:m,ignoreFractionLimit:s}),[P,l=""]=b.split("."),u=P.replace(/\B(?=(\d{3})+(?!\d))/g,".");let t="";s?t=l:t=l.slice(0,m),s||(e===void 0?t=t.replace(/0+$/,""):t&&e>0&&(t=t.padEnd(e,"0")));let i=t?`${u},${t}`:u;if(!a||!c)return i;const o={"id-ID":{symbol:"Rp",code:"IDR",name:"Rupiah",negativePosition:"start"},"en-US":{symbol:"$",code:"USD",name:"US Dollar",negativePosition:"middle"},"ja-JP":{symbol:"¥",code:"JPY",name:"Yen",negativePosition:"middle"}}[a]||{symbol:"",code:c,name:c},d={symbol:o.symbol,code:o.code,name:o.name}[p||"symbol"],g=i.includes("-");return i=o.negativePosition==="start"?i.replace("-",""):i,y?`${o.negativePosition==="start"&&g?"-":""}${d} ${i}`:`${o.negativePosition==="start"&&g?"-":""}${d}${i}`}function D(r){if(!f.isAccurateBigNumber(r))return"0";const n=typeof r=="number"?$.BigNumber(r).toString():r;if(!n.includes("."))return n;const[a,c]=n.split("."),e=c.replace(/0+$/,"");return e?`${a}.${e}`:a}exports.formatBigNumber=v;exports.removeTrailingZeros=D;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { BigNumber as $ } from "../config/bigNumber/index.mjs";
|
|
2
|
+
import { parseBigDecimal as P, isAccurateBigNumber as D } from "./common.mjs";
|
|
3
|
+
function S(r, n = {}) {
|
|
4
|
+
const { locale: a, currency: c, minimumFractionDigits: e, withSpace: f, currencyDisplay: p, ignoreFractionLimit: s = !1 } = n;
|
|
5
|
+
let { maximumFractionDigits: m = 2 } = n;
|
|
6
|
+
!s && e !== void 0 && e > m && (m = e);
|
|
7
|
+
const y = P(r, {
|
|
8
|
+
maximumFractionDigits: m,
|
|
9
|
+
ignoreFractionLimit: s
|
|
10
|
+
}), [b, l = ""] = y.split("."), d = b.replace(/\B(?=(\d{3})+(?!\d))/g, ".");
|
|
11
|
+
let t = "";
|
|
12
|
+
s ? t = l : t = l.slice(0, m), s || (e === void 0 ? t = t.replace(/0+$/, "") : t && e > 0 && (t = t.padEnd(e, "0")));
|
|
13
|
+
let i = t ? `${d},${t}` : d;
|
|
14
|
+
if (!a || !c)
|
|
15
|
+
return i;
|
|
16
|
+
const o = {
|
|
17
|
+
"id-ID": { symbol: "Rp", code: "IDR", name: "Rupiah", negativePosition: "start" },
|
|
18
|
+
"en-US": { symbol: "$", code: "USD", name: "US Dollar", negativePosition: "middle" },
|
|
19
|
+
"ja-JP": { symbol: "¥", code: "JPY", name: "Yen", negativePosition: "middle" }
|
|
20
|
+
// Add more locales as needed
|
|
21
|
+
}[a] || { symbol: "", code: c, name: c }, u = {
|
|
22
|
+
symbol: o.symbol,
|
|
23
|
+
code: o.code,
|
|
24
|
+
name: o.name
|
|
25
|
+
}[p || "symbol"], g = i.includes("-");
|
|
26
|
+
return i = o.negativePosition === "start" ? i.replace("-", "") : i, f ? `${o.negativePosition === "start" && g ? "-" : ""}${u} ${i}` : `${o.negativePosition === "start" && g ? "-" : ""}${u}${i}`;
|
|
27
|
+
}
|
|
28
|
+
function F(r) {
|
|
29
|
+
if (!D(r)) return "0";
|
|
30
|
+
const n = typeof r == "number" ? $(r).toString() : r;
|
|
31
|
+
if (!n.includes("."))
|
|
32
|
+
return n;
|
|
33
|
+
const [a, c] = n.split("."), e = c.replace(/0+$/, "");
|
|
34
|
+
return e ? `${a}.${e}` : a;
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
S as formatBigNumber,
|
|
38
|
+
F as removeTrailingZeros
|
|
39
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../config/bigNumber/index.cjs"),n=require("./common.cjs"),s=e=>typeof e=="string"||typeof e=="number"||typeof e=="bigint"?n.parseBigDecimal(e):"";function o(e,t){return{name:"minBig",message:t||`Value must be greater than or equal to ${e}`,test(r){return r=s(r),n.isAccurateBigNumber(r)?i.BigNumber(r).gte(i.BigNumber(e))?!0:this.createError({message:t||`Value must be greater than or equal to ${e}`}):this.createError({message:t||"Invalid BigNumber value"})}}}function m(e,t){return{name:"maxBig",message:t||`Value must be less than or equal to ${e}`,test(r){return r=s(r),n.isAccurateBigNumber(r)?i.BigNumber(r).lte(i.BigNumber(e))?!0:this.createError({message:t||`Value must be less than or equal to ${e}`}):this.createError({message:t||"Invalid BigNumber value"})}}}function c(e,t){return{name:"moreThanBig",message:t||`Value must be greater than ${e}`,test(r){return r=s(r),n.isAccurateBigNumber(r)?i.BigNumber(r).gt(i.BigNumber(e))?!0:this.createError({message:t||`Value must be greater than ${e}`}):this.createError({message:t||"Invalid BigNumber value"})}}}function B(e,t){return{name:"lessThanBig",message:t||`Value must be less than ${e}`,test(r){return r=s(r),n.isAccurateBigNumber(r)?i.BigNumber(r).lt(i.BigNumber(e))?!0:this.createError({message:t||`Value must be less than ${e}`}):this.createError({message:t||"Invalid BigNumber value"})}}}function l(e,t,r){return{name:"betweenBig",message:r||`Value must be between ${e} and ${t}`,test(u){if(u=s(u),!n.isAccurateBigNumber(u))return this.createError({message:r||"Invalid BigNumber value"});const g=i.BigNumber(u),a=i.BigNumber(e),b=i.BigNumber(t);return g.lt(a)||g.gt(b)?this.createError({message:r||`Value must be between ${e} and ${t}`}):!0}}}exports.betweenBig=l;exports.lessThanBig=B;exports.maxBig=m;exports.minBig=o;exports.moreThanBig=c;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { BigNumber as n } from "../config/bigNumber/index.mjs";
|
|
2
|
+
import { isAccurateBigNumber as i, parseBigDecimal as b } from "./common.mjs";
|
|
3
|
+
const s = (e) => typeof e == "string" || typeof e == "number" || typeof e == "bigint" ? b(e) : "";
|
|
4
|
+
function l(e, t) {
|
|
5
|
+
return {
|
|
6
|
+
name: "minBig",
|
|
7
|
+
message: t || `Value must be greater than or equal to ${e}`,
|
|
8
|
+
test(r) {
|
|
9
|
+
return r = s(r), i(r) ? n(r).gte(n(e)) ? !0 : this.createError({
|
|
10
|
+
message: t || `Value must be greater than or equal to ${e}`
|
|
11
|
+
}) : this.createError({
|
|
12
|
+
message: t || "Invalid BigNumber value"
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
function f(e, t) {
|
|
18
|
+
return {
|
|
19
|
+
name: "maxBig",
|
|
20
|
+
message: t || `Value must be less than or equal to ${e}`,
|
|
21
|
+
test(r) {
|
|
22
|
+
return r = s(r), i(r) ? n(r).lte(n(e)) ? !0 : this.createError({
|
|
23
|
+
message: t || `Value must be less than or equal to ${e}`
|
|
24
|
+
}) : this.createError({
|
|
25
|
+
message: t || "Invalid BigNumber value"
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function h(e, t) {
|
|
31
|
+
return {
|
|
32
|
+
name: "moreThanBig",
|
|
33
|
+
message: t || `Value must be greater than ${e}`,
|
|
34
|
+
test(r) {
|
|
35
|
+
return r = s(r), i(r) ? n(r).gt(n(e)) ? !0 : this.createError({
|
|
36
|
+
message: t || `Value must be greater than ${e}`
|
|
37
|
+
}) : this.createError({
|
|
38
|
+
message: t || "Invalid BigNumber value"
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function B(e, t) {
|
|
44
|
+
return {
|
|
45
|
+
name: "lessThanBig",
|
|
46
|
+
message: t || `Value must be less than ${e}`,
|
|
47
|
+
test(r) {
|
|
48
|
+
return r = s(r), i(r) ? n(r).lt(n(e)) ? !0 : this.createError({
|
|
49
|
+
message: t || `Value must be less than ${e}`
|
|
50
|
+
}) : this.createError({
|
|
51
|
+
message: t || "Invalid BigNumber value"
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function V(e, t, r) {
|
|
57
|
+
return {
|
|
58
|
+
name: "betweenBig",
|
|
59
|
+
message: r || `Value must be between ${e} and ${t}`,
|
|
60
|
+
test(u) {
|
|
61
|
+
if (u = s(u), !i(u))
|
|
62
|
+
return this.createError({
|
|
63
|
+
message: r || "Invalid BigNumber value"
|
|
64
|
+
});
|
|
65
|
+
const a = n(u), g = n(e), o = n(t);
|
|
66
|
+
return a.lt(g) || a.gt(o) ? this.createError({
|
|
67
|
+
message: r || `Value must be between ${e} and ${t}`
|
|
68
|
+
}) : !0;
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
export {
|
|
73
|
+
V as betweenBig,
|
|
74
|
+
B as lessThanBig,
|
|
75
|
+
f as maxBig,
|
|
76
|
+
l as minBig,
|
|
77
|
+
h as moreThanBig
|
|
78
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "1mpacto-react-ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.17",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=20.19.4",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"react": "^19.1.1",
|
|
62
62
|
"react-dom": "^19.1.1",
|
|
63
63
|
"sass": "^1.94.2",
|
|
64
|
-
"storybook": "
|
|
64
|
+
"storybook": "10.1.4",
|
|
65
65
|
"ts-node": "^10.9.2",
|
|
66
66
|
"typescript": "~5.9.3",
|
|
67
67
|
"vite": "^6.3.5",
|
|
@@ -75,6 +75,7 @@
|
|
|
75
75
|
"main": "./dist/index.cjs",
|
|
76
76
|
"module": "./dist/index.mjs",
|
|
77
77
|
"types": "./dist/index.d.ts",
|
|
78
|
+
"sideEffects": false,
|
|
78
79
|
"exports": {
|
|
79
80
|
".": {
|
|
80
81
|
"types": "./dist/index.d.ts",
|