@zydon/common 2.2.48 → 2.2.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-22WZELUG.js +45 -0
- package/dist/chunk-22WZELUG.js.map +1 -0
- package/dist/chunk-45BEY3NY.js +9 -0
- package/dist/chunk-45BEY3NY.js.map +1 -0
- package/dist/chunk-4NMDUK5L.js +7 -0
- package/dist/chunk-4NMDUK5L.js.map +1 -0
- package/dist/chunk-53KG5GKX.js +19 -0
- package/dist/chunk-53KG5GKX.js.map +1 -0
- package/dist/chunk-5WTLLVTY.js +12 -0
- package/dist/chunk-5WTLLVTY.js.map +1 -0
- package/dist/chunk-62TZEUFR.js +9 -0
- package/dist/chunk-62TZEUFR.js.map +1 -0
- package/dist/chunk-62UHO7QG.js +7 -0
- package/dist/chunk-62UHO7QG.js.map +1 -0
- package/dist/chunk-6LXCHHW2.js +12 -0
- package/dist/chunk-6LXCHHW2.js.map +1 -0
- package/dist/chunk-6PNQMBJS.js +8 -0
- package/dist/chunk-6PNQMBJS.js.map +1 -0
- package/dist/chunk-7R6ZYEQS.js +11 -0
- package/dist/chunk-7R6ZYEQS.js.map +1 -0
- package/dist/chunk-7SCNQBRZ.js +9 -0
- package/dist/chunk-7SCNQBRZ.js.map +1 -0
- package/dist/chunk-ACUHIX2J.js +10 -0
- package/dist/chunk-ACUHIX2J.js.map +1 -0
- package/dist/chunk-ADI3SFX3.js +9 -0
- package/dist/chunk-ADI3SFX3.js.map +1 -0
- package/dist/chunk-BFD4OAPD.js +10 -0
- package/dist/chunk-BFD4OAPD.js.map +1 -0
- package/dist/chunk-DSQS6PJN.js +15 -0
- package/dist/chunk-DSQS6PJN.js.map +1 -0
- package/dist/chunk-E3R7W7GK.js +7 -0
- package/dist/chunk-E3R7W7GK.js.map +1 -0
- package/dist/chunk-ET3WPQIO.js +7 -0
- package/dist/chunk-ET3WPQIO.js.map +1 -0
- package/dist/chunk-FG2BVR7Y.js +5 -0
- package/dist/chunk-FG2BVR7Y.js.map +1 -0
- package/dist/chunk-FU42GMHJ.js +11 -0
- package/dist/chunk-FU42GMHJ.js.map +1 -0
- package/dist/chunk-GGHOJ7G5.js +8 -0
- package/dist/chunk-GGHOJ7G5.js.map +1 -0
- package/dist/chunk-IN7SP2ND.js +8 -0
- package/dist/chunk-IN7SP2ND.js.map +1 -0
- package/dist/chunk-KNQKOMWB.js +7 -0
- package/dist/chunk-KNQKOMWB.js.map +1 -0
- package/dist/chunk-KZQ3J2KO.js +20 -0
- package/dist/chunk-KZQ3J2KO.js.map +1 -0
- package/dist/chunk-L5URMM57.js +7 -0
- package/dist/chunk-L5URMM57.js.map +1 -0
- package/dist/chunk-LC6LNAQ2.js +8 -0
- package/dist/chunk-LC6LNAQ2.js.map +1 -0
- package/dist/chunk-LIKDCEDJ.js +20 -0
- package/dist/chunk-LIKDCEDJ.js.map +1 -0
- package/dist/chunk-LQRRMVFN.js +7 -0
- package/dist/chunk-LQRRMVFN.js.map +1 -0
- package/dist/chunk-LTMBAS4K.js +10 -0
- package/dist/chunk-LTMBAS4K.js.map +1 -0
- package/dist/chunk-M5UKNXG2.js +15 -0
- package/dist/chunk-M5UKNXG2.js.map +1 -0
- package/dist/chunk-MQAMSYYK.js +8 -0
- package/dist/chunk-MQAMSYYK.js.map +1 -0
- package/dist/chunk-N7IK5EUP.js +9 -0
- package/dist/chunk-N7IK5EUP.js.map +1 -0
- package/dist/chunk-OF6623HG.js +5 -0
- package/dist/chunk-OF6623HG.js.map +1 -0
- package/dist/chunk-OFASSEMM.js +15 -0
- package/dist/chunk-OFASSEMM.js.map +1 -0
- package/dist/chunk-OWUHSZYH.js +10 -0
- package/dist/chunk-OWUHSZYH.js.map +1 -0
- package/dist/chunk-P6Y6TTEH.js +13 -0
- package/dist/chunk-P6Y6TTEH.js.map +1 -0
- package/dist/chunk-PC5JAKC5.js +12 -0
- package/dist/chunk-PC5JAKC5.js.map +1 -0
- package/dist/chunk-QQRH32JC.js +7 -0
- package/dist/chunk-QQRH32JC.js.map +1 -0
- package/dist/chunk-RJASLUEG.js +9 -0
- package/dist/chunk-RJASLUEG.js.map +1 -0
- package/dist/chunk-RMQCDH5X.js +9 -0
- package/dist/chunk-RMQCDH5X.js.map +1 -0
- package/dist/chunk-ROVD7OGE.js +7 -0
- package/dist/chunk-ROVD7OGE.js.map +1 -0
- package/dist/chunk-RPO7AI5K.js +8 -0
- package/dist/chunk-RPO7AI5K.js.map +1 -0
- package/dist/chunk-RWCM5G5D.js +19 -0
- package/dist/chunk-RWCM5G5D.js.map +1 -0
- package/dist/chunk-SBIOG3DH.js +10 -0
- package/dist/chunk-SBIOG3DH.js.map +1 -0
- package/dist/chunk-SBSJC4QO.js +12 -0
- package/dist/chunk-SBSJC4QO.js.map +1 -0
- package/dist/chunk-SY7GX7PZ.js +9 -0
- package/dist/chunk-SY7GX7PZ.js.map +1 -0
- package/dist/chunk-W242ZHSJ.js +15 -0
- package/dist/chunk-W242ZHSJ.js.map +1 -0
- package/dist/chunk-WHQGCQ6G.js +18 -0
- package/dist/chunk-WHQGCQ6G.js.map +1 -0
- package/dist/chunk-WLZBPHBP.js +30 -0
- package/dist/chunk-WLZBPHBP.js.map +1 -0
- package/dist/chunk-X2NG6VDB.js +9 -0
- package/dist/chunk-X2NG6VDB.js.map +1 -0
- package/dist/chunk-Y5SERFBJ.js +5 -0
- package/dist/chunk-Y5SERFBJ.js.map +1 -0
- package/dist/chunk-YC7ED3PY.js +10 -0
- package/dist/chunk-YC7ED3PY.js.map +1 -0
- package/dist/chunk-YCEQDXLR.js +8 -0
- package/dist/chunk-YCEQDXLR.js.map +1 -0
- package/dist/chunk-ZC5X4X5U.js +16 -0
- package/dist/chunk-ZC5X4X5U.js.map +1 -0
- package/dist/chunk-ZK4R7GDN.js +5 -0
- package/dist/chunk-ZK4R7GDN.js.map +1 -0
- package/dist/chunk-ZZCWCOYO.js +9 -0
- package/dist/chunk-ZZCWCOYO.js.map +1 -0
- package/dist/components/ActionButton/index.js +4 -34
- package/dist/components/ActionButton/index.js.map +1 -1
- package/dist/components/Autocomplete/index.js +4 -140
- package/dist/components/Autocomplete/index.js.map +1 -1
- package/dist/components/AutocompleteDetailed/index.js +4 -141
- package/dist/components/AutocompleteDetailed/index.js.map +1 -1
- package/dist/components/BuilderLayout/index.js +13 -25
- package/dist/components/BuilderLayout/index.js.map +1 -1
- package/dist/components/BuilderSidebar/index.js +11 -19
- package/dist/components/BuilderSidebar/index.js.map +1 -1
- package/dist/components/ColorPickerInput/index.js +3 -100
- package/dist/components/ColorPickerInput/index.js.map +1 -1
- package/dist/components/ColoredLabel/index.js +8 -43
- package/dist/components/ColoredLabel/index.js.map +1 -1
- package/dist/components/Common/index.js +23 -30
- package/dist/components/Common/index.js.map +1 -1
- package/dist/components/Confirm/index.js +12 -50
- package/dist/components/Confirm/index.js.map +1 -1
- package/dist/components/CustomAvatar/index.js +2 -61
- package/dist/components/CustomAvatar/index.js.map +1 -1
- package/dist/components/CustomAvatarGroup/index.js +8 -75
- package/dist/components/CustomAvatarGroup/index.js.map +1 -1
- package/dist/components/DashedDivider/index.js +2 -9
- package/dist/components/DashedDivider/index.js.map +1 -1
- package/dist/components/DataCards/index.js +21 -59
- package/dist/components/DataCards/index.js.map +1 -1
- package/dist/components/DataGrid/index.js +16 -80
- package/dist/components/DataGrid/index.js.map +1 -1
- package/dist/components/DatePicker/index.js +8 -41
- package/dist/components/DatePicker/index.js.map +1 -1
- package/dist/components/DateRangePicker/index.js +8 -49
- package/dist/components/DateRangePicker/index.js.map +1 -1
- package/dist/components/DateTimePicker/index.js +8 -39
- package/dist/components/DateTimePicker/index.js.map +1 -1
- package/dist/components/Delayed/index.js +6 -16
- package/dist/components/Delayed/index.js.map +1 -1
- package/dist/components/Drawer/index.js +13 -38
- package/dist/components/Drawer/index.js.map +1 -1
- package/dist/components/EmptyContent/index.js +4 -79
- package/dist/components/EmptyContent/index.js.map +1 -1
- package/dist/components/EmptyView/index.js +3 -33
- package/dist/components/EmptyView/index.js.map +1 -1
- package/dist/components/Error/index.js +11 -45
- package/dist/components/Error/index.js.map +1 -1
- package/dist/components/ExpandableGroup/index.js +14 -32
- package/dist/components/ExpandableGroup/index.js.map +1 -1
- package/dist/components/FixedProgressBar/index.js +2 -21
- package/dist/components/FixedProgressBar/index.js.map +1 -1
- package/dist/components/FrameSkeleton/index.js +17 -107
- package/dist/components/FrameSkeleton/index.js.map +1 -1
- package/dist/components/HelpButton/index.js +4 -21
- package/dist/components/HelpButton/index.js.map +1 -1
- package/dist/components/Icon/index.js +3 -669
- package/dist/components/Icon/index.js.map +1 -1
- package/dist/components/ImageCrop/index.js +2 -50
- package/dist/components/ImageCrop/index.js.map +1 -1
- package/dist/components/ImageCropModal/index.js +6 -129
- package/dist/components/ImageCropModal/index.js.map +1 -1
- package/dist/components/Incrementer/index.js +6 -160
- package/dist/components/Incrementer/index.js.map +1 -1
- package/dist/components/Label/index.js +10 -73
- package/dist/components/Label/index.js.map +1 -1
- package/dist/components/LoadingScreen/index.js +9 -10
- package/dist/components/LoadingScreen/index.js.map +1 -1
- package/dist/components/MaskedInput/index.js +2 -54
- package/dist/components/MaskedInput/index.js.map +1 -1
- package/dist/components/MenuItem/index.js +12 -23
- package/dist/components/MenuItem/index.js.map +1 -1
- package/dist/components/MenuPopover/index.js +2 -47
- package/dist/components/MenuPopover/index.js.map +1 -1
- package/dist/components/Modal/index.js +4 -32
- package/dist/components/Modal/index.js.map +1 -1
- package/dist/components/ModalActions/index.js +7 -10
- package/dist/components/ModalActions/index.js.map +1 -1
- package/dist/components/MoreMenu/index.js +12 -17
- package/dist/components/MoreMenu/index.js.map +1 -1
- package/dist/components/NumberInput/index.js +2 -108
- package/dist/components/NumberInput/index.js.map +1 -1
- package/dist/components/PasswordRules/index.js +12 -77
- package/dist/components/PasswordRules/index.js.map +1 -1
- package/dist/components/PopoverSelect/index.js +14 -49
- package/dist/components/PopoverSelect/index.js.map +1 -1
- package/dist/components/Portal/index.js +2 -27
- package/dist/components/Portal/index.js.map +1 -1
- package/dist/components/Result/index.js +2 -27
- package/dist/components/Result/index.js.map +1 -1
- package/dist/components/SavedChanges/index.js +8 -41
- package/dist/components/SavedChanges/index.js.map +1 -1
- package/dist/components/Scrollbar/index.js +2 -44
- package/dist/components/Scrollbar/index.js.map +1 -1
- package/dist/components/SearchInput/index.js +4 -72
- package/dist/components/SearchInput/index.js.map +1 -1
- package/dist/components/SelectableCards/index.js +9 -143
- package/dist/components/SelectableCards/index.js.map +1 -1
- package/dist/components/SeoPreview/index.js +14 -166
- package/dist/components/SeoPreview/index.js.map +1 -1
- package/dist/components/SplashScreen/index.js +9 -106
- package/dist/components/SplashScreen/index.js.map +1 -1
- package/dist/components/Steps/index.js +15 -70
- package/dist/components/Steps/index.js.map +1 -1
- package/dist/components/StyledTab/index.js +11 -89
- package/dist/components/StyledTab/index.js.map +1 -1
- package/dist/components/StyledTabs/index.js +8 -26
- package/dist/components/StyledTabs/index.js.map +1 -1
- package/dist/components/Summary/index.js +9 -14
- package/dist/components/Summary/index.js.map +1 -1
- package/dist/components/SwapList/index.js +23 -248
- package/dist/components/SwapList/index.js.map +1 -1
- package/dist/components/TabPanel/index.js +7 -33
- package/dist/components/TabPanel/index.js.map +1 -1
- package/dist/components/TextMaxLine/index.js +3 -48
- package/dist/components/TextMaxLine/index.js.map +1 -1
- package/dist/components/TimePicker/index.js +8 -41
- package/dist/components/TimePicker/index.js.map +1 -1
- package/dist/components/ToggleButtonGroup/index.js +8 -9
- package/dist/components/ToggleButtonGroup/index.js.map +1 -1
- package/dist/components/Tooltip/index.js +7 -7
- package/dist/components/Tooltip/index.js.map +1 -1
- package/dist/components/WhiteBox/index.js +2 -7
- package/dist/components/WhiteBox/index.js.map +1 -1
- package/dist/components/animate/index.js +3 -15
- package/dist/components/animate/index.js.map +1 -1
- package/dist/components/carousel/index.js +17 -9
- package/dist/components/carousel/index.js.map +1 -1
- package/dist/components/form/Address/index.js +16 -198
- package/dist/components/form/Address/index.js.map +1 -1
- package/dist/components/form/Autocomplete/index.js +5 -41
- package/dist/components/form/Autocomplete/index.js.map +1 -1
- package/dist/components/form/AutocompleteDetailed/index.js +10 -41
- package/dist/components/form/AutocompleteDetailed/index.js.map +1 -1
- package/dist/components/form/Checkbox/index.js +10 -50
- package/dist/components/form/Checkbox/index.js.map +1 -1
- package/dist/components/form/Codes/index.js +12 -86
- package/dist/components/form/Codes/index.js.map +1 -1
- package/dist/components/form/ColorPicker/index.js +9 -51
- package/dist/components/form/ColorPicker/index.js.map +1 -1
- package/dist/components/form/DatePicker/index.js +9 -62
- package/dist/components/form/DatePicker/index.js.map +1 -1
- package/dist/components/form/DateRangePicker/index.js +11 -76
- package/dist/components/form/DateRangePicker/index.js.map +1 -1
- package/dist/components/form/DateTimePicker/index.js +9 -60
- package/dist/components/form/DateTimePicker/index.js.map +1 -1
- package/dist/components/form/Field/index.js +2 -48
- package/dist/components/form/Field/index.js.map +1 -1
- package/dist/components/form/Form/index.js +8 -28
- package/dist/components/form/Form/index.js.map +1 -1
- package/dist/components/form/Incrementer/index.js +12 -37
- package/dist/components/form/Incrementer/index.js.map +1 -1
- package/dist/components/form/InputTags/index.js +10 -68
- package/dist/components/form/InputTags/index.js.map +1 -1
- package/dist/components/form/MaskedInput/index.js +3 -44
- package/dist/components/form/MaskedInput/index.js.map +1 -1
- package/dist/components/form/MultiCheckbox/index.js +13 -92
- package/dist/components/form/MultiCheckbox/index.js.map +1 -1
- package/dist/components/form/MultiChipField/index.js +9 -48
- package/dist/components/form/MultiChipField/index.js.map +1 -1
- package/dist/components/form/NumberInput/index.js +8 -42
- package/dist/components/form/NumberInput/index.js.map +1 -1
- package/dist/components/form/Password/index.js +14 -90
- package/dist/components/form/Password/index.js.map +1 -1
- package/dist/components/form/RadioGroup/index.js +14 -126
- package/dist/components/form/RadioGroup/index.js.map +1 -1
- package/dist/components/form/SelectableCards/index.js +15 -21
- package/dist/components/form/SelectableCards/index.js.map +1 -1
- package/dist/components/form/Switch/index.js +10 -70
- package/dist/components/form/Switch/index.js.map +1 -1
- package/dist/components/form/TimePicker/index.js +9 -63
- package/dist/components/form/TimePicker/index.js.map +1 -1
- package/dist/components/form/UploadAvatarWithCrop/index.js +21 -58
- package/dist/components/form/UploadAvatarWithCrop/index.js.map +1 -1
- package/dist/components/form/UploadWithCrop/index.js +24 -58
- package/dist/components/form/UploadWithCrop/index.js.map +1 -1
- package/dist/components/form/Webhook/index.js +20 -145
- package/dist/components/form/Webhook/index.js.map +1 -1
- package/dist/components/lightbox/index.js +17 -2
- package/dist/components/lightbox/index.js.map +1 -1
- package/dist/components/table/index.js +22 -18
- package/dist/components/table/index.js.map +1 -1
- package/dist/components/upload/index.js +24 -13
- package/dist/components/upload/index.js.map +1 -1
- package/dist/hooks/useActiveElement.js +6 -26
- package/dist/hooks/useActiveElement.js.map +1 -1
- package/dist/hooks/useApiMessage.js +6 -32
- package/dist/hooks/useApiMessage.js.map +1 -1
- package/dist/hooks/useAutocomplete.js +7 -60
- package/dist/hooks/useAutocomplete.js.map +1 -1
- package/dist/hooks/useCopyToClipboard.js +6 -21
- package/dist/hooks/useCopyToClipboard.js.map +1 -1
- package/dist/hooks/useDatagrid.js +7 -44
- package/dist/hooks/useDatagrid.js.map +1 -1
- package/dist/hooks/useDebounceValue.js +6 -17
- package/dist/hooks/useDebounceValue.js.map +1 -1
- package/dist/hooks/useDeepCompareEffect.js +7 -15
- package/dist/hooks/useDeepCompareEffect.js.map +1 -1
- package/dist/hooks/useEventCallback.js +3 -16
- package/dist/hooks/useEventCallback.js.map +1 -1
- package/dist/hooks/useEventListener.js +2 -23
- package/dist/hooks/useEventListener.js.map +1 -1
- package/dist/hooks/useIsMounting.js +6 -12
- package/dist/hooks/useIsMounting.js.map +1 -1
- package/dist/hooks/useIsomorphicLayoutEffect.js +2 -5
- package/dist/hooks/useIsomorphicLayoutEffect.js.map +1 -1
- package/dist/hooks/useLocalStorage.js +9 -87
- package/dist/hooks/useLocalStorage.js.map +1 -1
- package/dist/hooks/useMount.js +6 -8
- package/dist/hooks/useMount.js.map +1 -1
- package/dist/hooks/useOnClickOutside.js +6 -14
- package/dist/hooks/useOnClickOutside.js.map +1 -1
- package/dist/hooks/usePagination.js +6 -39
- package/dist/hooks/usePagination.js.map +1 -1
- package/dist/hooks/usePopover.js +2 -23
- package/dist/hooks/usePopover.js.map +1 -1
- package/dist/hooks/useResponsive.js +2 -34
- package/dist/hooks/useResponsive.js.map +1 -1
- package/dist/hooks/useScrollOffSetTop.js +7 -31
- package/dist/hooks/useScrollOffSetTop.js.map +1 -1
- package/dist/hooks/useSnackbar.js +2 -12
- package/dist/hooks/useSnackbar.js.map +1 -1
- package/dist/hooks/useTabs.js +6 -15
- package/dist/hooks/useTabs.js.map +1 -1
- package/dist/hooks/useToggle.js +2 -10
- package/dist/hooks/useToggle.js.map +1 -1
- package/dist/hooks/useUpload.js +2 -56
- package/dist/hooks/useUpload.js.map +1 -1
- package/dist/hooks/useUploadImage.js +3 -78
- package/dist/hooks/useUploadImage.js.map +1 -1
- package/dist/index.css +11 -0
- package/dist/index.css.map +1 -0
- package/dist/index.js +4 -5
- package/dist/index.js.map +1 -1
- package/dist/locales/all-langs.js +2 -38
- package/dist/locales/all-langs.js.map +1 -1
- package/dist/theme/core/index.js +4 -5
- package/dist/theme/core/index.js.map +1 -1
- package/dist/theme/styles/index.d.ts +1 -1
- package/dist/theme/styles/index.js +2 -2
- package/dist/theme/styles/index.js.map +1 -1
- package/dist/theme/theme-provider.js +8 -44
- package/dist/theme/theme-provider.js.map +1 -1
- package/dist/theme/with-settings/index.js +5 -1
- package/dist/theme/with-settings/index.js.map +1 -1
- package/dist/types/addressProps.js +2 -0
- package/dist/types/addressProps.js.map +1 -1
- package/dist/types/api.js +2 -0
- package/dist/types/api.js.map +1 -1
- package/dist/types/autoComplete.js +2 -0
- package/dist/types/autoComplete.js.map +1 -1
- package/dist/types/autoCompleteProps.js +2 -0
- package/dist/types/autoCompleteProps.js.map +1 -1
- package/dist/types/baseField.js +2 -0
- package/dist/types/baseField.js.map +1 -1
- package/dist/types/dataGridProps.js +2 -0
- package/dist/types/dataGridProps.js.map +1 -1
- package/dist/types/datagrid.js +2 -0
- package/dist/types/datagrid.js.map +1 -1
- package/dist/types/datePickerProps.js +2 -0
- package/dist/types/datePickerProps.js.map +1 -1
- package/dist/types/dateRangePickerProps.js +2 -0
- package/dist/types/dateRangePickerProps.js.map +1 -1
- package/dist/types/dateTimePickerProps.js +2 -0
- package/dist/types/dateTimePickerProps.js.map +1 -1
- package/dist/types/fieldProps.js +2 -0
- package/dist/types/fieldProps.js.map +1 -1
- package/dist/types/icon.js +2 -330
- package/dist/types/icon.js.map +1 -1
- package/dist/types/iconProps.js +2 -0
- package/dist/types/iconProps.js.map +1 -1
- package/dist/types/incrementerProps.js +2 -0
- package/dist/types/incrementerProps.js.map +1 -1
- package/dist/types/item.js +2 -0
- package/dist/types/item.js.map +1 -1
- package/dist/types/multiCheckboxProps.js +2 -0
- package/dist/types/multiCheckboxProps.js.map +1 -1
- package/dist/types/numberInputProps.js +2 -0
- package/dist/types/numberInputProps.js.map +1 -1
- package/dist/types/option.js +2 -0
- package/dist/types/option.js.map +1 -1
- package/dist/types/radioGroupProps.js +2 -0
- package/dist/types/radioGroupProps.js.map +1 -1
- package/dist/types/searchInputProps.js +2 -0
- package/dist/types/searchInputProps.js.map +1 -1
- package/dist/types/sectionProps.js +2 -0
- package/dist/types/sectionProps.js.map +1 -1
- package/dist/types/switchProps.js +2 -0
- package/dist/types/switchProps.js.map +1 -1
- package/dist/types/timePickerProps.js +2 -0
- package/dist/types/timePickerProps.js.map +1 -1
- package/dist/types/upload.js +2 -0
- package/dist/types/upload.js.map +1 -1
- package/dist/types/webhook.js +4 -50
- package/dist/types/webhook.js.map +1 -1
- package/dist/utils/color.js +2 -5
- package/dist/utils/color.js.map +1 -1
- package/dist/utils/compare.js +2 -5
- package/dist/utils/compare.js.map +1 -1
- package/dist/utils/date.js +7 -22
- package/dist/utils/date.js.map +1 -1
- package/dist/utils/formatNumber.js +2 -93
- package/dist/utils/formatNumber.js.map +1 -1
- package/dist/utils/formatTime.js +2 -168
- package/dist/utils/formatTime.js.map +1 -1
- package/dist/utils/loadable.js +8 -13
- package/dist/utils/loadable.js.map +1 -1
- package/dist/utils/mask.js +4 -43
- package/dist/utils/mask.js.map +1 -1
- package/dist/utils/number.js +2 -14
- package/dist/utils/number.js.map +1 -1
- package/dist/utils/sort.js +4 -23
- package/dist/utils/sort.js.map +1 -1
- package/dist/utils/uuidv4.js +4 -9
- package/dist/utils/uuidv4.js.map +1 -1
- package/dist/utils/validators.js +2 -85
- package/dist/utils/validators.js.map +1 -1
- package/package.json +1 -1
package/dist/utils/date.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/date.ts"],"sourcesContent":["import dayjs from 'dayjs';\nimport customParseFormat from 'dayjs/plugin/customParseFormat';\n\ndayjs.extend(customParseFormat);\n\nexport const isValidDate = (date?: string | Date | null): boolean => {\n if (!date) return false;\n return dayjs(date).isValid();\n};\n\nexport const stringToDate = (\n dateString?: string,\n format = 'DD/MM/YYYY HH:mm:ss',\n) => {\n if (!dateString) return null;\n\n const date = dayjs(dateString, format);\n\n return date.isValid() ? date.toDate() : null;\n};\n\nexport const isAfter = (\n date1?: string | Date | null,\n date2?: string | Date | null,\n) => {\n return dayjs(date1).isAfter(dayjs(date2));\n};\n"]
|
|
1
|
+
{"version":3,"sources":["../../src/utils/date.ts"],"names":["dayjs","customParseFormat","isValidDate","date","stringToDate","dateString","format","isAfter","date1","date2"],"mappings":"AAAA,OAAOA,MAAW,QAClB,OAAOC,MAAuB,iCAE9BD,EAAM,OAAOC,CAAiB,EAEvB,IAAMC,EAAeC,GACrBA,EACEH,EAAMG,CAAI,EAAE,QAAQ,EADT,GAIPC,EAAe,CAC1BC,EACAC,EAAS,wBACN,CACH,GAAI,CAACD,EAAY,OAAO,KAExB,IAAMF,EAAOH,EAAMK,EAAYC,CAAM,EAErC,OAAOH,EAAK,QAAQ,EAAIA,EAAK,OAAO,EAAI,IAC1C,EAEaI,EAAU,CACrBC,EACAC,IAEOT,EAAMQ,CAAK,EAAE,QAAQR,EAAMS,CAAK,CAAC","sourcesContent":["import dayjs from 'dayjs';\nimport customParseFormat from 'dayjs/plugin/customParseFormat';\n\ndayjs.extend(customParseFormat);\n\nexport const isValidDate = (date?: string | Date | null): boolean => {\n if (!date) return false;\n return dayjs(date).isValid();\n};\n\nexport const stringToDate = (\n dateString?: string,\n format = 'DD/MM/YYYY HH:mm:ss',\n) => {\n if (!dateString) return null;\n\n const date = dayjs(dateString, format);\n\n return date.isValid() ? date.toDate() : null;\n};\n\nexport const isAfter = (\n date1?: string | Date | null,\n date2?: string | Date | null,\n) => {\n return dayjs(date1).isAfter(dayjs(date2));\n};\n"]}
|
|
@@ -1,94 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (inputValue == null || Number.isNaN(inputValue))
|
|
4
|
-
return null;
|
|
5
|
-
return Number(inputValue);
|
|
6
|
-
}
|
|
7
|
-
function fNumber(inputValue, options) {
|
|
8
|
-
const locale = DEFAULT_LOCALE;
|
|
9
|
-
const number = processInput(inputValue);
|
|
10
|
-
if (number === null)
|
|
11
|
-
return "";
|
|
12
|
-
const fm = new Intl.NumberFormat(locale.code, {
|
|
13
|
-
minimumFractionDigits: 0,
|
|
14
|
-
maximumFractionDigits: 2,
|
|
15
|
-
...options
|
|
16
|
-
}).format(number);
|
|
17
|
-
return fm;
|
|
18
|
-
}
|
|
19
|
-
function fCurrency(inputValue, options) {
|
|
20
|
-
const locale = DEFAULT_LOCALE;
|
|
21
|
-
const number = processInput(inputValue);
|
|
22
|
-
if (number === null)
|
|
23
|
-
return "";
|
|
24
|
-
const fm = new Intl.NumberFormat(locale.code, {
|
|
25
|
-
style: "currency",
|
|
26
|
-
currency: locale.currency,
|
|
27
|
-
minimumFractionDigits: 0,
|
|
28
|
-
maximumFractionDigits: 2,
|
|
29
|
-
...options
|
|
30
|
-
}).format(number);
|
|
31
|
-
return fm;
|
|
32
|
-
}
|
|
33
|
-
function fPercent(inputValue, options) {
|
|
34
|
-
const locale = DEFAULT_LOCALE;
|
|
35
|
-
const number = processInput(inputValue);
|
|
36
|
-
if (number === null)
|
|
37
|
-
return "";
|
|
38
|
-
const fm = new Intl.NumberFormat(locale.code, {
|
|
39
|
-
style: "percent",
|
|
40
|
-
minimumFractionDigits: 0,
|
|
41
|
-
maximumFractionDigits: 1,
|
|
42
|
-
...options
|
|
43
|
-
}).format(number / 100);
|
|
44
|
-
return fm;
|
|
45
|
-
}
|
|
46
|
-
function fShortenNumber(inputValue, options) {
|
|
47
|
-
const locale = DEFAULT_LOCALE;
|
|
48
|
-
const number = processInput(inputValue);
|
|
49
|
-
if (number === null)
|
|
50
|
-
return "";
|
|
51
|
-
const fm = new Intl.NumberFormat(locale.code, {
|
|
52
|
-
notation: "compact",
|
|
53
|
-
maximumFractionDigits: 2,
|
|
54
|
-
...options
|
|
55
|
-
}).format(number);
|
|
56
|
-
return fm.replace(/[A-Z]/g, (match) => match.toLowerCase());
|
|
57
|
-
}
|
|
58
|
-
function fData(inputValue) {
|
|
59
|
-
const number = processInput(inputValue);
|
|
60
|
-
if (number === null || number === 0)
|
|
61
|
-
return "0 bytes";
|
|
62
|
-
const units = ["bytes", "Kb", "Mb", "Gb", "Tb", "Pb", "Eb", "Zb", "Yb"];
|
|
63
|
-
const decimal = 2;
|
|
64
|
-
const baseValue = 1024;
|
|
65
|
-
const index = Math.floor(Math.log(number) / Math.log(baseValue));
|
|
66
|
-
const fm = `${parseFloat((number / baseValue ** index).toFixed(decimal))} ${units[index]}`;
|
|
67
|
-
return fm;
|
|
68
|
-
}
|
|
69
|
-
const fWithDecimalPlacesOrNot = (value, decimalPlaces = 12) => {
|
|
70
|
-
return +Number(value).toFixed(decimalPlaces);
|
|
71
|
-
};
|
|
72
|
-
function fTwoDigits(value) {
|
|
73
|
-
if (value === 0 || value === "0")
|
|
74
|
-
return "0";
|
|
75
|
-
if (typeof value === "string") {
|
|
76
|
-
return value.padStart(2, "0");
|
|
77
|
-
} else {
|
|
78
|
-
return value.toString().padStart(2, "0");
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
const fCurrencyBRL = (value) => new Intl.NumberFormat("pt-BR", { style: "currency", currency: "BRL" }).format(
|
|
82
|
-
value || 0
|
|
83
|
-
);
|
|
84
|
-
export {
|
|
85
|
-
fCurrency,
|
|
86
|
-
fCurrencyBRL,
|
|
87
|
-
fData,
|
|
88
|
-
fNumber,
|
|
89
|
-
fPercent,
|
|
90
|
-
fShortenNumber,
|
|
91
|
-
fTwoDigits,
|
|
92
|
-
fWithDecimalPlacesOrNot
|
|
93
|
-
};
|
|
1
|
+
export { b as fCurrency, h as fCurrencyBRL, e as fData, a as fNumber, c as fPercent, d as fShortenNumber, g as fTwoDigits, f as fWithDecimalPlacesOrNot } from '../chunk-OF6623HG.js';
|
|
2
|
+
//# sourceMappingURL=out.js.map
|
|
94
3
|
//# sourceMappingURL=formatNumber.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
package/dist/utils/formatTime.js
CHANGED
|
@@ -1,169 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import relativeTime from "dayjs/plugin/relativeTime";
|
|
4
|
-
dayjs.extend(duration);
|
|
5
|
-
dayjs.extend(relativeTime);
|
|
6
|
-
const formatStr = {
|
|
7
|
-
dateTime: "DD/MM/YYYY HH:mm",
|
|
8
|
-
date: "DD/MM/YYYY",
|
|
9
|
-
time: "HH:mm",
|
|
10
|
-
split: {
|
|
11
|
-
dateTime: "DD/MM/YYYY HH:mm",
|
|
12
|
-
date: "DD/MM/YYYY"
|
|
13
|
-
},
|
|
14
|
-
paramCase: {
|
|
15
|
-
dateTime: "DD/MM/YYYY HH:mm",
|
|
16
|
-
date: "DD/MM/YYYY"
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
function today(format) {
|
|
20
|
-
return dayjs(/* @__PURE__ */ new Date()).startOf("day").format(format);
|
|
21
|
-
}
|
|
22
|
-
function fDateTime(date, format) {
|
|
23
|
-
if (!date) {
|
|
24
|
-
return null;
|
|
25
|
-
}
|
|
26
|
-
const isValid = dayjs(date).isValid();
|
|
27
|
-
return isValid ? dayjs(date).format(format ?? formatStr.dateTime) : "Invalid time value";
|
|
28
|
-
}
|
|
29
|
-
function fDate(date, format) {
|
|
30
|
-
if (!date) {
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
const isValid = dayjs(date).isValid();
|
|
34
|
-
return isValid ? dayjs(date).format(format ?? formatStr.date) : "Invalid time value";
|
|
35
|
-
}
|
|
36
|
-
function fTime(date, format) {
|
|
37
|
-
if (!date) {
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
const isValid = dayjs(date).isValid();
|
|
41
|
-
return isValid ? dayjs(date).format(format ?? formatStr.time) : "Invalid time value";
|
|
42
|
-
}
|
|
43
|
-
function fTimestamp(date) {
|
|
44
|
-
if (!date) {
|
|
45
|
-
return null;
|
|
46
|
-
}
|
|
47
|
-
const isValid = dayjs(date).isValid();
|
|
48
|
-
return isValid ? dayjs(date).valueOf() : "Invalid time value";
|
|
49
|
-
}
|
|
50
|
-
function fToNow(date) {
|
|
51
|
-
if (!date) {
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
|
-
const isValid = dayjs(date).isValid();
|
|
55
|
-
return isValid ? dayjs(date).toNow(true) : "Invalid time value";
|
|
56
|
-
}
|
|
57
|
-
function fIsBetween(inputDate, startDate, endDate) {
|
|
58
|
-
if (!inputDate || !startDate || !endDate) {
|
|
59
|
-
return false;
|
|
60
|
-
}
|
|
61
|
-
const formattedInputDate = fTimestamp(inputDate);
|
|
62
|
-
const formattedStartDate = fTimestamp(startDate);
|
|
63
|
-
const formattedEndDate = fTimestamp(endDate);
|
|
64
|
-
if (formattedInputDate && formattedStartDate && formattedEndDate) {
|
|
65
|
-
return formattedInputDate >= formattedStartDate && formattedInputDate <= formattedEndDate;
|
|
66
|
-
}
|
|
67
|
-
return false;
|
|
68
|
-
}
|
|
69
|
-
function fIsAfter(startDate, endDate) {
|
|
70
|
-
return dayjs(startDate).isAfter(endDate);
|
|
71
|
-
}
|
|
72
|
-
function fIsSame(startDate, endDate, units) {
|
|
73
|
-
if (!startDate || !endDate) {
|
|
74
|
-
return false;
|
|
75
|
-
}
|
|
76
|
-
const isValid = dayjs(startDate).isValid() && dayjs(endDate).isValid();
|
|
77
|
-
if (!isValid) {
|
|
78
|
-
return "Invalid time value";
|
|
79
|
-
}
|
|
80
|
-
return dayjs(startDate).isSame(endDate, units ?? "year");
|
|
81
|
-
}
|
|
82
|
-
function fDateRangeShortLabel(startDate, endDate, initial) {
|
|
83
|
-
const isValid = dayjs(startDate).isValid() && dayjs(endDate).isValid();
|
|
84
|
-
const isAfter = fIsAfter(startDate, endDate);
|
|
85
|
-
if (!isValid || isAfter) {
|
|
86
|
-
return "Invalid time value";
|
|
87
|
-
}
|
|
88
|
-
let label = `${fDate(startDate)} - ${fDate(endDate)}`;
|
|
89
|
-
if (initial) {
|
|
90
|
-
return label;
|
|
91
|
-
}
|
|
92
|
-
const isSameYear = fIsSame(startDate, endDate, "year");
|
|
93
|
-
const isSameMonth = fIsSame(startDate, endDate, "month");
|
|
94
|
-
const isSameDay = fIsSame(startDate, endDate, "day");
|
|
95
|
-
if (isSameYear && !isSameMonth) {
|
|
96
|
-
label = `${fDate(startDate, "DD MMM")} - ${fDate(endDate)}`;
|
|
97
|
-
} else if (isSameYear && isSameMonth && !isSameDay) {
|
|
98
|
-
label = `${fDate(startDate, "DD")} - ${fDate(endDate)}`;
|
|
99
|
-
} else if (isSameYear && isSameMonth && isSameDay) {
|
|
100
|
-
label = `${fDate(endDate)}`;
|
|
101
|
-
}
|
|
102
|
-
return label;
|
|
103
|
-
}
|
|
104
|
-
function fAdd({
|
|
105
|
-
years = 0,
|
|
106
|
-
months = 0,
|
|
107
|
-
days = 0,
|
|
108
|
-
hours = 0,
|
|
109
|
-
minutes = 0,
|
|
110
|
-
seconds = 0,
|
|
111
|
-
milliseconds = 0
|
|
112
|
-
}) {
|
|
113
|
-
const result = dayjs().add(
|
|
114
|
-
dayjs.duration({
|
|
115
|
-
years,
|
|
116
|
-
months,
|
|
117
|
-
days,
|
|
118
|
-
hours,
|
|
119
|
-
minutes,
|
|
120
|
-
seconds,
|
|
121
|
-
milliseconds
|
|
122
|
-
})
|
|
123
|
-
).format();
|
|
124
|
-
return result;
|
|
125
|
-
}
|
|
126
|
-
function fSub({
|
|
127
|
-
years = 0,
|
|
128
|
-
months = 0,
|
|
129
|
-
days = 0,
|
|
130
|
-
hours = 0,
|
|
131
|
-
minutes = 0,
|
|
132
|
-
seconds = 0,
|
|
133
|
-
milliseconds = 0
|
|
134
|
-
}) {
|
|
135
|
-
const result = dayjs().subtract(
|
|
136
|
-
dayjs.duration({
|
|
137
|
-
years,
|
|
138
|
-
months,
|
|
139
|
-
days,
|
|
140
|
-
hours,
|
|
141
|
-
minutes,
|
|
142
|
-
seconds,
|
|
143
|
-
milliseconds
|
|
144
|
-
})
|
|
145
|
-
).format();
|
|
146
|
-
return result;
|
|
147
|
-
}
|
|
148
|
-
const getDifferenceInDays = (startDate, endDate) => {
|
|
149
|
-
if (!startDate || !endDate)
|
|
150
|
-
return null;
|
|
151
|
-
return dayjs(endDate).diff(dayjs(startDate), "day");
|
|
152
|
-
};
|
|
153
|
-
export {
|
|
154
|
-
fAdd,
|
|
155
|
-
fDate,
|
|
156
|
-
fDateRangeShortLabel,
|
|
157
|
-
fDateTime,
|
|
158
|
-
fIsAfter,
|
|
159
|
-
fIsBetween,
|
|
160
|
-
fIsSame,
|
|
161
|
-
fSub,
|
|
162
|
-
fTime,
|
|
163
|
-
fTimestamp,
|
|
164
|
-
fToNow,
|
|
165
|
-
formatStr,
|
|
166
|
-
getDifferenceInDays,
|
|
167
|
-
today
|
|
168
|
-
};
|
|
1
|
+
export { l as fAdd, d as fDate, k as fDateRangeShortLabel, c as fDateTime, i as fIsAfter, h as fIsBetween, j as fIsSame, m as fSub, e as fTime, f as fTimestamp, g as fToNow, a as formatStr, n as getDifferenceInDays, b as today } from '../chunk-N7IK5EUP.js';
|
|
2
|
+
//# sourceMappingURL=out.js.map
|
|
169
3
|
//# sourceMappingURL=formatTime.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
package/dist/utils/loadable.js
CHANGED
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Suspense } from
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
);
|
|
10
|
-
var loadable_default = loadable;
|
|
11
|
-
export {
|
|
12
|
-
loadable_default as default
|
|
13
|
-
};
|
|
1
|
+
import { a as a$1 } from '../chunk-6PNQMBJS.js';
|
|
2
|
+
import { Suspense } from 'react';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var a=r=>function(l){return jsx(Suspense,{fallback:jsx(a$1,{}),children:jsx(r,{...l})})},m=a;
|
|
6
|
+
|
|
7
|
+
export { m as default };
|
|
8
|
+
//# sourceMappingURL=out.js.map
|
|
14
9
|
//# sourceMappingURL=loadable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/loadable.tsx"],"sourcesContent":["import { ElementType, Suspense } from 'react';\n\nimport FixedProgressBar from 'components/FixedProgressBar';\n\nconst loadable = (Component: ElementType) =>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function loader(props: any) {\n return (\n <Suspense fallback={<FixedProgressBar />}>\n <Component {...props} />\n </Suspense>\n );\n };\n\nexport default loadable;\n"]
|
|
1
|
+
{"version":3,"sources":["../../src/utils/loadable.tsx"],"names":["Suspense","jsx","loadable","Component","props","FixedProgressBar_default","loadable_default"],"mappings":"yCAAA,OAAsB,YAAAA,MAAgB,QAQZ,cAAAC,MAAA,oBAJ1B,IAAMC,EAAYC,GAEhB,SAAgBC,EAAY,CAC1B,OACEH,EAACD,EAAA,CAAS,SAAUC,EAACI,EAAA,EAAiB,EACpC,SAAAJ,EAACE,EAAA,CAAW,GAAGC,EAAO,EACxB,CAEJ,EAEKE,EAAQJ","sourcesContent":["import { ElementType, Suspense } from 'react';\n\nimport FixedProgressBar from 'components/FixedProgressBar';\n\nconst loadable = (Component: ElementType) =>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function loader(props: any) {\n return (\n <Suspense fallback={<FixedProgressBar />}>\n <Component {...props} />\n </Suspense>\n );\n };\n\nexport default loadable;\n"]}
|
package/dist/utils/mask.js
CHANGED
|
@@ -1,44 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
formattedString += char === "#" ? value[j++] || "_" : char;
|
|
6
|
-
});
|
|
7
|
-
return formattedString;
|
|
8
|
-
};
|
|
9
|
-
const cpfMask = (v) => {
|
|
10
|
-
const value = v || "";
|
|
11
|
-
return applyMask(value.replace(/\D/g, ""), "###.###.###-##");
|
|
12
|
-
};
|
|
13
|
-
const cnpjMask = (v) => {
|
|
14
|
-
const value = v || "";
|
|
15
|
-
return applyMask(value.replace(/\D/g, ""), "##.###.###/####-##");
|
|
16
|
-
};
|
|
17
|
-
const cepMask = (v) => {
|
|
18
|
-
const value = v || "";
|
|
19
|
-
return applyMask(value.replace(/\D/g, ""), "#####-###");
|
|
20
|
-
};
|
|
21
|
-
const phoneMask = (v) => {
|
|
22
|
-
const value = v || "";
|
|
23
|
-
const numericValue = value.replace(/\D/g, "");
|
|
24
|
-
const mask = numericValue.length === 11 ? "(##) #####-####" : "(##) ####-####";
|
|
25
|
-
return applyMask(numericValue, mask);
|
|
26
|
-
};
|
|
27
|
-
const cpfMaskOrCnpjMask = (v) => {
|
|
28
|
-
const value = v || "";
|
|
29
|
-
const onlyNumbers = (value || "").replace(/\D/g, "");
|
|
30
|
-
if (onlyNumbers.length === 11)
|
|
31
|
-
return cpfMask(onlyNumbers);
|
|
32
|
-
if (onlyNumbers.length === 14)
|
|
33
|
-
return cnpjMask(onlyNumbers);
|
|
34
|
-
return null;
|
|
35
|
-
};
|
|
36
|
-
export {
|
|
37
|
-
applyMask,
|
|
38
|
-
cepMask,
|
|
39
|
-
cnpjMask,
|
|
40
|
-
cpfMask,
|
|
41
|
-
cpfMaskOrCnpjMask,
|
|
42
|
-
phoneMask
|
|
43
|
-
};
|
|
1
|
+
var r=(e="",n)=>{let t="",s=0;return [...n].forEach(a=>{t+=a==="#"?e[s++]||"_":a;}),t},l=e=>r((e||"").replace(/\D/g,""),"###.###.###-##"),c=e=>r((e||"").replace(/\D/g,""),"##.###.###/####-##"),o=e=>r((e||"").replace(/\D/g,""),"#####-###"),u=e=>{let t=(e||"").replace(/\D/g,""),s=t.length===11?"(##) #####-####":"(##) ####-####";return r(t,s)},p=e=>{let t=(e||""||"").replace(/\D/g,"");return t.length===11?l(t):t.length===14?c(t):null};
|
|
2
|
+
|
|
3
|
+
export { r as applyMask, o as cepMask, c as cnpjMask, l as cpfMask, p as cpfMaskOrCnpjMask, u as phoneMask };
|
|
4
|
+
//# sourceMappingURL=out.js.map
|
|
44
5
|
//# sourceMappingURL=mask.js.map
|
package/dist/utils/mask.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/mask.ts"],"sourcesContent":["export const applyMask = (value = '', mask: string) => {\n let formattedString = '';\n let j = 0;\n\n // Iterate through each character in the mask\n [...mask].forEach(char => {\n // If the character is '#', insert the next character from the input string, or '_' if the input string is shorter\n formattedString += char === '#' ? value[j++] || '_' : char;\n });\n\n return formattedString;\n};\n\nexport const cpfMask = (v: string) => {\n const value = v || '';\n return applyMask(value.replace(/\\D/g, ''), '###.###.###-##');\n};\n\nexport const cnpjMask = (v: string) => {\n const value = v || '';\n return applyMask(value.replace(/\\D/g, ''), '##.###.###/####-##');\n};\n\nexport const cepMask = (v: string) => {\n const value = v || '';\n return applyMask(value.replace(/\\D/g, ''), '#####-###');\n};\n\nexport const phoneMask = (v: string) => {\n const value = v || '';\n const numericValue = value.replace(/\\D/g, '');\n const mask =\n numericValue.length === 11 ? '(##) #####-####' : '(##) ####-####';\n\n return applyMask(numericValue, mask);\n};\n\nexport const cpfMaskOrCnpjMask = (v: string) => {\n const value = v || '';\n const onlyNumbers = (value || '').replace(/\\D/g, '');\n\n if (onlyNumbers.length === 11) return cpfMask(onlyNumbers);\n\n if (onlyNumbers.length === 14) return cnpjMask(onlyNumbers);\n\n return null;\n};\n"]
|
|
1
|
+
{"version":3,"sources":["../../src/utils/mask.ts"],"names":["applyMask","value","mask","formattedString","j","char","cpfMask","v","cnpjMask","cepMask","phoneMask","numericValue","cpfMaskOrCnpjMask","onlyNumbers"],"mappings":"AAAO,IAAMA,EAAY,CAACC,EAAQ,GAAIC,IAAiB,CACrD,IAAIC,EAAkB,GAClBC,EAAI,EAGR,OAAC,GAAGF,CAAI,EAAE,QAAQG,GAAQ,CAExBF,GAAmBE,IAAS,IAAMJ,EAAMG,GAAG,GAAK,IAAMC,CACxD,CAAC,EAEMF,CACT,EAEaG,EAAWC,GAEfP,GADOO,GAAK,IACI,QAAQ,MAAO,EAAE,EAAG,gBAAgB,EAGhDC,EAAYD,GAEhBP,GADOO,GAAK,IACI,QAAQ,MAAO,EAAE,EAAG,oBAAoB,EAGpDE,EAAWF,GAEfP,GADOO,GAAK,IACI,QAAQ,MAAO,EAAE,EAAG,WAAW,EAG3CG,EAAaH,GAAc,CAEtC,IAAMI,GADQJ,GAAK,IACQ,QAAQ,MAAO,EAAE,EACtCL,EACJS,EAAa,SAAW,GAAK,kBAAoB,iBAEnD,OAAOX,EAAUW,EAAcT,CAAI,CACrC,EAEaU,EAAqBL,GAAc,CAE9C,IAAMM,GADQN,GAAK,IACW,IAAI,QAAQ,MAAO,EAAE,EAEnD,OAAIM,EAAY,SAAW,GAAWP,EAAQO,CAAW,EAErDA,EAAY,SAAW,GAAWL,EAASK,CAAW,EAEnD,IACT","sourcesContent":["export const applyMask = (value = '', mask: string) => {\n let formattedString = '';\n let j = 0;\n\n // Iterate through each character in the mask\n [...mask].forEach(char => {\n // If the character is '#', insert the next character from the input string, or '_' if the input string is shorter\n formattedString += char === '#' ? value[j++] || '_' : char;\n });\n\n return formattedString;\n};\n\nexport const cpfMask = (v: string) => {\n const value = v || '';\n return applyMask(value.replace(/\\D/g, ''), '###.###.###-##');\n};\n\nexport const cnpjMask = (v: string) => {\n const value = v || '';\n return applyMask(value.replace(/\\D/g, ''), '##.###.###/####-##');\n};\n\nexport const cepMask = (v: string) => {\n const value = v || '';\n return applyMask(value.replace(/\\D/g, ''), '#####-###');\n};\n\nexport const phoneMask = (v: string) => {\n const value = v || '';\n const numericValue = value.replace(/\\D/g, '');\n const mask =\n numericValue.length === 11 ? '(##) #####-####' : '(##) ####-####';\n\n return applyMask(numericValue, mask);\n};\n\nexport const cpfMaskOrCnpjMask = (v: string) => {\n const value = v || '';\n const onlyNumbers = (value || '').replace(/\\D/g, '');\n\n if (onlyNumbers.length === 11) return cpfMask(onlyNumbers);\n\n if (onlyNumbers.length === 14) return cnpjMask(onlyNumbers);\n\n return null;\n};\n"]}
|
package/dist/utils/number.js
CHANGED
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
}
|
|
4
|
-
function roundIfNecessary(value = 0) {
|
|
5
|
-
return Math.round(value * 100) / 100;
|
|
6
|
-
}
|
|
7
|
-
const isNumeric = (string) => {
|
|
8
|
-
return /^[+-]?\d+(\.\d+)?$/.test(string);
|
|
9
|
-
};
|
|
10
|
-
export {
|
|
11
|
-
isMultiple,
|
|
12
|
-
isNumeric,
|
|
13
|
-
roundIfNecessary
|
|
14
|
-
};
|
|
1
|
+
export { a as isMultiple, c as isNumeric, b as roundIfNecessary } from '../chunk-FG2BVR7Y.js';
|
|
2
|
+
//# sourceMappingURL=out.js.map
|
|
15
3
|
//# sourceMappingURL=number.js.map
|
package/dist/utils/number.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
package/dist/utils/sort.js
CHANGED
|
@@ -1,24 +1,5 @@
|
|
|
1
|
-
function
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
if (aValue < bValue) {
|
|
6
|
-
return direction === "asc" ? -1 : 1;
|
|
7
|
-
}
|
|
8
|
-
if (aValue > bValue) {
|
|
9
|
-
return direction === "asc" ? 1 : -1;
|
|
10
|
-
}
|
|
11
|
-
return 0;
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
function updatePosition(initialIndex, newIndex, rows) {
|
|
15
|
-
const rowsClone = [...rows];
|
|
16
|
-
const row = rowsClone.splice(initialIndex, 1)[0];
|
|
17
|
-
rowsClone.splice(newIndex, 0, row);
|
|
18
|
-
return rowsClone;
|
|
19
|
-
}
|
|
20
|
-
export {
|
|
21
|
-
sort,
|
|
22
|
-
updatePosition
|
|
23
|
-
};
|
|
1
|
+
function u(s,e,n="asc"){return s.slice().sort((r,t)=>{let c=r[e],o=t[e];return c<o?n==="asc"?-1:1:c>o?n==="asc"?1:-1:0})}function a(s,e,n){let r=[...n],t=r.splice(s,1)[0];return r.splice(e,0,t),r}
|
|
2
|
+
|
|
3
|
+
export { u as sort, a as updatePosition };
|
|
4
|
+
//# sourceMappingURL=out.js.map
|
|
24
5
|
//# sourceMappingURL=sort.js.map
|
package/dist/utils/sort.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/sort.ts"],"sourcesContent":["function sort<T>(\n arr: T[],\n prop: keyof T,\n direction: 'asc' | 'desc' = 'asc',\n): T[] {\n return arr.slice().sort((a, b) => {\n const aValue = a[prop];\n const bValue = b[prop];\n\n if (aValue < bValue) {\n return direction === 'asc' ? -1 : 1;\n }\n\n if (aValue > bValue) {\n return direction === 'asc' ? 1 : -1;\n }\n\n return 0;\n });\n}\n\nfunction updatePosition<T>(\n initialIndex: number,\n newIndex: number,\n rows: Array<T>,\n): T[] {\n const rowsClone = [...rows];\n const row = rowsClone.splice(initialIndex, 1)[0];\n rowsClone.splice(newIndex, 0, row);\n\n return rowsClone;\n}\n\nexport { sort, updatePosition };\n"]
|
|
1
|
+
{"version":3,"sources":["../../src/utils/sort.ts"],"names":["sort","arr","prop","direction","a","b","aValue","bValue","updatePosition","initialIndex","newIndex","rows","rowsClone","row"],"mappings":"AAAA,SAASA,EACPC,EACAC,EACAC,EAA4B,MACvB,CACL,OAAOF,EAAI,MAAM,EAAE,KAAK,CAACG,EAAGC,IAAM,CAChC,IAAMC,EAASF,EAAEF,CAAI,EACfK,EAASF,EAAEH,CAAI,EAErB,OAAII,EAASC,EACJJ,IAAc,MAAQ,GAAK,EAGhCG,EAASC,EACJJ,IAAc,MAAQ,EAAI,GAG5B,CACT,CAAC,CACH,CAEA,SAASK,EACPC,EACAC,EACAC,EACK,CACL,IAAMC,EAAY,CAAC,GAAGD,CAAI,EACpBE,EAAMD,EAAU,OAAOH,EAAc,CAAC,EAAE,CAAC,EAC/C,OAAAG,EAAU,OAAOF,EAAU,EAAGG,CAAG,EAE1BD,CACT","sourcesContent":["function sort<T>(\n arr: T[],\n prop: keyof T,\n direction: 'asc' | 'desc' = 'asc',\n): T[] {\n return arr.slice().sort((a, b) => {\n const aValue = a[prop];\n const bValue = b[prop];\n\n if (aValue < bValue) {\n return direction === 'asc' ? -1 : 1;\n }\n\n if (aValue > bValue) {\n return direction === 'asc' ? 1 : -1;\n }\n\n return 0;\n });\n}\n\nfunction updatePosition<T>(\n initialIndex: number,\n newIndex: number,\n rows: Array<T>,\n): T[] {\n const rowsClone = [...rows];\n const row = rowsClone.splice(initialIndex, 1)[0];\n rowsClone.splice(newIndex, 0, row);\n\n return rowsClone;\n}\n\nexport { sort, updatePosition };\n"]}
|
package/dist/utils/uuidv4.js
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
function
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
}
|
|
7
|
-
export {
|
|
8
|
-
uuidv4 as default
|
|
9
|
-
};
|
|
1
|
+
function n(){return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){let x=Math.random()*16|0;return (t==="x"?x:x&3|8).toString(16)})}
|
|
2
|
+
|
|
3
|
+
export { n as default };
|
|
4
|
+
//# sourceMappingURL=out.js.map
|
|
10
5
|
//# sourceMappingURL=uuidv4.js.map
|
package/dist/utils/uuidv4.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/uuidv4.ts"],"sourcesContent":["export default function uuidv4() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n const r = (Math.random() * 16) | 0,\n v = c === 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\n"]
|
|
1
|
+
{"version":3,"sources":["../../src/utils/uuidv4.ts"],"names":["uuidv4","c","r"],"mappings":"AAAe,SAARA,GAA0B,CAC/B,MAAO,uCAAuC,QAAQ,QAAS,SAAUC,EAAG,CAC1E,IAAMC,EAAK,KAAK,OAAO,EAAI,GAAM,EAEjC,OADMD,IAAM,IAAMC,EAAKA,EAAI,EAAO,GACzB,SAAS,EAAE,CACtB,CAAC,CACH","sourcesContent":["export default function uuidv4() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n const r = (Math.random() * 16) | 0,\n v = c === 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\n"]}
|
package/dist/utils/validators.js
CHANGED
|
@@ -1,86 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return false;
|
|
4
|
-
cpf = cpf?.replace(/[^\d]+/g, "");
|
|
5
|
-
if (cpf.length !== 11 || cpf === "00000000000" || cpf === "11111111111" || cpf === "22222222222" || cpf === "33333333333" || cpf === "44444444444" || cpf === "55555555555" || cpf === "66666666666" || cpf === "77777777777" || cpf === "88888888888" || cpf === "99999999999")
|
|
6
|
-
return false;
|
|
7
|
-
let add = 0;
|
|
8
|
-
for (let i = 0; i < 9; i++)
|
|
9
|
-
add += parseInt(cpf.charAt(i)) * (10 - i);
|
|
10
|
-
let rev = 11 - add % 11;
|
|
11
|
-
if (rev === 10 || rev === 11)
|
|
12
|
-
rev = 0;
|
|
13
|
-
if (rev !== parseInt(cpf.charAt(9)))
|
|
14
|
-
return false;
|
|
15
|
-
add = 0;
|
|
16
|
-
for (let i = 0; i < 10; i++)
|
|
17
|
-
add += parseInt(cpf.charAt(i)) * (11 - i);
|
|
18
|
-
rev = 11 - add % 11;
|
|
19
|
-
if (rev === 10 || rev === 11)
|
|
20
|
-
rev = 0;
|
|
21
|
-
if (rev !== parseInt(cpf.charAt(10)))
|
|
22
|
-
return false;
|
|
23
|
-
return true;
|
|
24
|
-
};
|
|
25
|
-
const cnpjIsValid = (cnpj) => {
|
|
26
|
-
if (!cnpj)
|
|
27
|
-
return false;
|
|
28
|
-
cnpj = cnpj.replace(/[^\d]+/g, "");
|
|
29
|
-
if (cnpj.length !== 14)
|
|
30
|
-
return false;
|
|
31
|
-
if (cnpj === "00000000000000" || cnpj === "11111111111111" || cnpj === "22222222222222" || cnpj === "33333333333333" || cnpj === "44444444444444" || cnpj === "55555555555555" || cnpj === "66666666666666" || cnpj === "77777777777777" || cnpj === "88888888888888" || cnpj === "99999999999999")
|
|
32
|
-
return false;
|
|
33
|
-
let size = cnpj.length - 2;
|
|
34
|
-
let numbers = cnpj.substring(0, size);
|
|
35
|
-
const digits = cnpj.substring(size);
|
|
36
|
-
let sum = 0;
|
|
37
|
-
let position = size - 7;
|
|
38
|
-
for (let i = size; i >= 1; i--) {
|
|
39
|
-
sum += parseInt(numbers.charAt(size - i)) * position--;
|
|
40
|
-
if (position < 2)
|
|
41
|
-
position = 9;
|
|
42
|
-
}
|
|
43
|
-
let result = sum % 11 < 2 ? 0 : 11 - sum % 11;
|
|
44
|
-
if (result !== parseInt(digits.charAt(0)))
|
|
45
|
-
return false;
|
|
46
|
-
size += 1;
|
|
47
|
-
numbers = cnpj.substring(0, size);
|
|
48
|
-
sum = 0;
|
|
49
|
-
position = size - 7;
|
|
50
|
-
for (let i = size; i >= 1; i--) {
|
|
51
|
-
sum += parseInt(numbers.charAt(size - i)) * position--;
|
|
52
|
-
if (position < 2)
|
|
53
|
-
position = 9;
|
|
54
|
-
}
|
|
55
|
-
result = sum % 11 < 2 ? 0 : 11 - sum % 11;
|
|
56
|
-
if (result !== parseInt(digits.charAt(1)))
|
|
57
|
-
return false;
|
|
58
|
-
return true;
|
|
59
|
-
};
|
|
60
|
-
const emailIsValid = (email = "") => {
|
|
61
|
-
if (!email)
|
|
62
|
-
return false;
|
|
63
|
-
const isValid = email.toLowerCase().match(
|
|
64
|
-
/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
|
|
65
|
-
);
|
|
66
|
-
return !!isValid;
|
|
67
|
-
};
|
|
68
|
-
const validatePassword = (password = "", passwordSize = [8, 20], numberChar = false, specialCharacter = false, upperCaseChar = false) => {
|
|
69
|
-
const isLengthValid = password.length >= passwordSize[0] && password.length <= passwordSize[1];
|
|
70
|
-
const hasUpperCaseChar = !upperCaseChar || /[A-Z]/.test(password);
|
|
71
|
-
const hasSpecialCharacter = !specialCharacter || /[!@#$%^&*(),.?":{}|<>]/.test(password);
|
|
72
|
-
const hasNumberChar = !numberChar || /\d/.test(password);
|
|
73
|
-
return {
|
|
74
|
-
isLengthValid,
|
|
75
|
-
hasUpperCaseChar,
|
|
76
|
-
hasSpecialCharacter,
|
|
77
|
-
hasNumberChar
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
export {
|
|
81
|
-
cnpjIsValid,
|
|
82
|
-
cpfIsValid,
|
|
83
|
-
emailIsValid,
|
|
84
|
-
validatePassword
|
|
85
|
-
};
|
|
1
|
+
export { b as cnpjIsValid, a as cpfIsValid, c as emailIsValid, d as validatePassword } from '../chunk-Y5SERFBJ.js';
|
|
2
|
+
//# sourceMappingURL=out.js.map
|
|
86
3
|
//# sourceMappingURL=validators.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|