@zydon/common 2.2.42 → 2.2.44
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/components/ActionButton/index.js +36 -3
- package/dist/components/ActionButton/index.js.map +1 -0
- package/dist/components/Autocomplete/index.js +142 -3
- package/dist/components/Autocomplete/index.js.map +1 -0
- package/dist/components/AutocompleteDetailed/index.js +139 -3
- package/dist/components/AutocompleteDetailed/index.js.map +1 -0
- package/dist/components/BuilderLayout/index.js +24 -9
- package/dist/components/BuilderLayout/index.js.map +1 -0
- package/dist/components/BuilderSidebar/index.js +18 -7
- package/dist/components/BuilderSidebar/index.js.map +1 -0
- package/dist/components/ColorPickerInput/index.js +102 -2
- package/dist/components/ColorPickerInput/index.js.map +1 -0
- package/dist/components/ColoredLabel/index.js +42 -4
- package/dist/components/ColoredLabel/index.js.map +1 -0
- package/dist/components/Common/index.js +29 -19
- package/dist/components/Common/index.js.map +1 -0
- package/dist/components/Confirm/index.js +49 -8
- package/dist/components/Confirm/index.js.map +1 -0
- package/dist/components/CustomAvatar/index.js +63 -1
- package/dist/components/CustomAvatar/index.js.map +1 -0
- package/dist/components/CustomAvatarGroup/index.js +74 -4
- package/dist/components/CustomAvatarGroup/index.js.map +1 -0
- package/dist/components/DashedDivider/index.js +11 -1
- package/dist/components/DashedDivider/index.js.map +1 -0
- package/dist/components/DataCards/index.js +58 -18
- package/dist/components/DataCards/index.js.map +1 -0
- package/dist/components/DataGrid/index.js +76 -12
- package/dist/components/DataGrid/index.js.map +1 -0
- package/dist/components/DatePicker/index.js +40 -4
- package/dist/components/DatePicker/index.js.map +1 -0
- package/dist/components/DateRangePicker/index.js +48 -4
- package/dist/components/DateRangePicker/index.js.map +1 -0
- package/dist/components/DateTimePicker/index.js +38 -4
- package/dist/components/DateTimePicker/index.js.map +1 -0
- package/dist/components/Delayed/index.js +15 -2
- package/dist/components/Delayed/index.js.map +1 -0
- package/dist/components/Drawer/index.js +37 -9
- package/dist/components/Drawer/index.js.map +1 -0
- package/dist/components/EmptyContent/index.js +81 -3
- package/dist/components/EmptyContent/index.js.map +1 -0
- package/dist/components/EmptyView/index.js +35 -2
- package/dist/components/EmptyView/index.js.map +1 -0
- package/dist/components/Error/index.js +44 -7
- package/dist/components/Error/index.js.map +1 -0
- package/dist/components/ExpandableGroup/index.js +31 -10
- package/dist/components/ExpandableGroup/index.js.map +1 -0
- package/dist/components/FixedProgressBar/index.js +23 -1
- package/dist/components/FixedProgressBar/index.js.map +1 -0
- package/dist/components/FrameSkeleton/index.js +96 -13
- package/dist/components/FrameSkeleton/index.js.map +1 -0
- package/dist/components/HelpButton/index.js +23 -3
- package/dist/components/HelpButton/index.js.map +1 -0
- package/dist/components/Icon/index.js +404 -2
- package/dist/components/Icon/index.js.map +1 -0
- package/dist/components/ImageCrop/index.js +52 -1
- package/dist/components/ImageCrop/index.js.map +1 -0
- package/dist/components/ImageCropModal/index.js +131 -5
- package/dist/components/ImageCropModal/index.js.map +1 -0
- package/dist/components/Incrementer/index.js +158 -5
- package/dist/components/Incrementer/index.js.map +1 -0
- package/dist/components/Label/index.js +72 -6
- package/dist/components/Label/index.js.map +1 -0
- package/dist/components/LoadingScreen/index.js +9 -5
- package/dist/components/LoadingScreen/index.js.map +1 -0
- package/dist/components/MaskedInput/index.js +56 -1
- package/dist/components/MaskedInput/index.js.map +1 -0
- package/dist/components/MenuItem/index.js +22 -8
- package/dist/components/MenuItem/index.js.map +1 -0
- package/dist/components/MenuPopover/index.js +49 -1
- package/dist/components/MenuPopover/index.js.map +1 -0
- package/dist/components/Modal/index.js +34 -3
- package/dist/components/Modal/index.js.map +1 -0
- package/dist/components/ModalActions/index.js +9 -3
- package/dist/components/ModalActions/index.js.map +1 -0
- package/dist/components/MoreMenu/index.js +16 -8
- package/dist/components/MoreMenu/index.js.map +1 -0
- package/dist/components/NumberInput/index.js +108 -1
- package/dist/components/NumberInput/index.js.map +1 -0
- package/dist/components/PasswordRules/index.js +76 -8
- package/dist/components/PasswordRules/index.js.map +1 -0
- package/dist/components/PopoverSelect/index.js +44 -10
- package/dist/components/PopoverSelect/index.js.map +1 -0
- package/dist/components/Portal/index.js +29 -1
- package/dist/components/Portal/index.js.map +1 -0
- package/dist/components/Result/index.js +29 -1
- package/dist/components/Result/index.js.map +1 -0
- package/dist/components/SavedChanges/index.js +40 -4
- package/dist/components/SavedChanges/index.js.map +1 -0
- package/dist/components/Scrollbar/index.js +46 -1
- package/dist/components/Scrollbar/index.js.map +1 -0
- package/dist/components/SearchInput/index.js +74 -3
- package/dist/components/SearchInput/index.js.map +1 -0
- package/dist/components/SelectableCards/index.js +145 -8
- package/dist/components/SelectableCards/index.js.map +1 -0
- package/dist/components/SeoPreview/index.js +158 -10
- package/dist/components/SeoPreview/index.js.map +1 -0
- package/dist/components/SplashScreen/index.js +105 -5
- package/dist/components/SplashScreen/index.js.map +1 -0
- package/dist/components/Steps/index.js +69 -11
- package/dist/components/Steps/index.js.map +1 -0
- package/dist/components/StyledTab/index.js +88 -7
- package/dist/components/StyledTab/index.js.map +1 -0
- package/dist/components/StyledTabs/index.js +25 -4
- package/dist/components/StyledTabs/index.js.map +1 -0
- package/dist/components/Summary/index.js +13 -5
- package/dist/components/Summary/index.js.map +1 -0
- package/dist/components/SwapList/index.js +246 -18
- package/dist/components/SwapList/index.js.map +1 -0
- package/dist/components/TabPanel/index.js +32 -3
- package/dist/components/TabPanel/index.js.map +1 -0
- package/dist/components/TextMaxLine/index.js +50 -2
- package/dist/components/TextMaxLine/index.js.map +1 -0
- package/dist/components/TimePicker/index.js +40 -4
- package/dist/components/TimePicker/index.js.map +1 -0
- package/dist/components/ToggleButtonGroup/index.js +8 -4
- package/dist/components/ToggleButtonGroup/index.js.map +1 -0
- package/dist/components/Tooltip/index.js +6 -3
- package/dist/components/Tooltip/index.js.map +1 -0
- package/dist/components/WhiteBox/index.js +9 -1
- package/dist/components/WhiteBox/index.js.map +1 -0
- package/dist/components/animate/index.js +6 -2
- package/dist/components/animate/index.js.map +1 -0
- package/dist/components/carousel/index.js +11 -16
- package/dist/components/carousel/index.js.map +1 -0
- package/dist/components/form/Address/index.js +197 -12
- package/dist/components/form/Address/index.js.map +1 -0
- package/dist/components/form/Autocomplete/index.js +43 -4
- package/dist/components/form/Autocomplete/index.js.map +1 -0
- package/dist/components/form/AutocompleteDetailed/index.js +40 -6
- package/dist/components/form/AutocompleteDetailed/index.js.map +1 -0
- package/dist/components/form/Checkbox/index.js +49 -6
- package/dist/components/form/Checkbox/index.js.map +1 -0
- package/dist/components/form/Codes/index.js +84 -7
- package/dist/components/form/Codes/index.js.map +1 -0
- package/dist/components/form/ColorPicker/index.js +50 -5
- package/dist/components/form/ColorPicker/index.js.map +1 -0
- package/dist/components/form/DatePicker/index.js +61 -5
- package/dist/components/form/DatePicker/index.js.map +1 -0
- package/dist/components/form/DateRangePicker/index.js +75 -7
- package/dist/components/form/DateRangePicker/index.js.map +1 -0
- package/dist/components/form/DateTimePicker/index.js +59 -5
- package/dist/components/form/DateTimePicker/index.js.map +1 -0
- package/dist/components/form/Field/index.js +50 -1
- package/dist/components/form/Field/index.js.map +1 -0
- package/dist/components/form/Form/index.js +27 -4
- package/dist/components/form/Form/index.js.map +1 -0
- package/dist/components/form/Incrementer/index.js +36 -8
- package/dist/components/form/Incrementer/index.js.map +1 -0
- package/dist/components/form/InputTags/index.js +67 -6
- package/dist/components/form/InputTags/index.js.map +1 -0
- package/dist/components/form/MaskedInput/index.js +46 -2
- package/dist/components/form/MaskedInput/index.js.map +1 -0
- package/dist/components/form/MultiCheckbox/index.js +91 -9
- package/dist/components/form/MultiCheckbox/index.js.map +1 -0
- package/dist/components/form/MultiChipField/index.js +47 -5
- package/dist/components/form/MultiChipField/index.js.map +1 -0
- package/dist/components/form/NumberInput/index.js +41 -4
- package/dist/components/form/NumberInput/index.js.map +1 -0
- package/dist/components/form/Password/index.js +88 -9
- package/dist/components/form/Password/index.js.map +1 -0
- package/dist/components/form/RadioGroup/index.js +124 -9
- package/dist/components/form/RadioGroup/index.js.map +1 -0
- package/dist/components/form/SelectableCards/index.js +20 -11
- package/dist/components/form/SelectableCards/index.js.map +1 -0
- package/dist/components/form/Switch/index.js +66 -6
- package/dist/components/form/Switch/index.js.map +1 -0
- package/dist/components/form/TimePicker/index.js +62 -5
- package/dist/components/form/TimePicker/index.js.map +1 -0
- package/dist/components/form/UploadAvatarWithCrop/index.js +57 -17
- package/dist/components/form/UploadAvatarWithCrop/index.js.map +1 -0
- package/dist/components/form/UploadWithCrop/index.js +57 -20
- package/dist/components/form/UploadWithCrop/index.js.map +1 -0
- package/dist/components/form/Webhook/index.js +144 -16
- package/dist/components/form/Webhook/index.js.map +1 -0
- package/dist/components/lightbox/index.js +4 -16
- package/dist/components/lightbox/index.js.map +1 -0
- package/dist/components/table/index.js +11 -21
- package/dist/components/table/index.js.map +1 -0
- package/dist/components/upload/index.js +10 -23
- package/dist/components/upload/index.js.map +1 -0
- package/dist/hooks/useActiveElement.js +25 -2
- package/dist/hooks/useActiveElement.js.map +1 -0
- package/dist/hooks/useApiMessage.js +31 -2
- package/dist/hooks/useApiMessage.js.map +1 -0
- package/dist/hooks/useAutocomplete.js +58 -2
- package/dist/hooks/useAutocomplete.js.map +1 -0
- package/dist/hooks/useCopyToClipboard.js +20 -2
- package/dist/hooks/useCopyToClipboard.js.map +1 -0
- package/dist/hooks/useDatagrid.js +41 -2
- package/dist/hooks/useDatagrid.js.map +1 -0
- package/dist/hooks/useDebounceValue.js +16 -2
- package/dist/hooks/useDebounceValue.js.map +1 -0
- package/dist/hooks/useDeepCompareEffect.js +14 -3
- package/dist/hooks/useDeepCompareEffect.js.map +1 -0
- package/dist/hooks/useEventCallback.js +17 -2
- package/dist/hooks/useEventCallback.js.map +1 -0
- package/dist/hooks/useEventListener.js +25 -1
- package/dist/hooks/useEventListener.js.map +1 -0
- package/dist/hooks/useIsMounting.js +11 -2
- package/dist/hooks/useIsMounting.js.map +1 -0
- package/dist/hooks/useIsomorphicLayoutEffect.js +7 -1
- package/dist/hooks/useIsomorphicLayoutEffect.js.map +1 -0
- package/dist/hooks/useLocalStorage.js +86 -5
- package/dist/hooks/useLocalStorage.js.map +1 -0
- package/dist/hooks/useMount.js +7 -2
- package/dist/hooks/useMount.js.map +1 -0
- package/dist/hooks/useOnClickOutside.js +14 -3
- package/dist/hooks/useOnClickOutside.js.map +1 -0
- package/dist/hooks/usePagination.js +38 -2
- package/dist/hooks/usePagination.js.map +1 -0
- package/dist/hooks/usePopover.js +22 -1
- package/dist/hooks/usePopover.js.map +1 -0
- package/dist/hooks/useResponsive.js +35 -1
- package/dist/hooks/useResponsive.js.map +1 -0
- package/dist/hooks/useScrollOffSetTop.js +29 -2
- package/dist/hooks/useScrollOffSetTop.js.map +1 -0
- package/dist/hooks/useSnackbar.js +14 -1
- package/dist/hooks/useSnackbar.js.map +1 -0
- package/dist/hooks/useTabs.js +14 -2
- package/dist/hooks/useTabs.js.map +1 -0
- package/dist/hooks/useToggle.js +12 -1
- package/dist/hooks/useToggle.js.map +1 -0
- package/dist/hooks/useUpload.js +58 -1
- package/dist/hooks/useUpload.js.map +1 -0
- package/dist/hooks/useUploadImage.js +80 -2
- package/dist/hooks/useUploadImage.js.map +1 -0
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -0
- package/dist/locales/all-langs.js +34 -1
- package/dist/locales/all-langs.js.map +1 -0
- package/dist/theme/core/index.js +7 -3
- package/dist/theme/core/index.js.map +1 -0
- package/dist/theme/styles/index.js +4 -1
- package/dist/theme/styles/index.js.map +1 -0
- package/dist/theme/theme-provider.js +46 -7
- package/dist/theme/theme-provider.js.map +1 -0
- package/dist/theme/with-settings/index.js +3 -4
- package/dist/theme/with-settings/index.js.map +1 -0
- package/dist/types/addressProps.js +2 -0
- package/dist/types/addressProps.js.map +1 -0
- package/dist/types/api.js +2 -0
- package/dist/types/api.js.map +1 -0
- package/dist/types/autoComplete.js +2 -0
- package/dist/types/autoComplete.js.map +1 -0
- package/dist/types/autoCompleteProps.js +2 -0
- package/dist/types/autoCompleteProps.js.map +1 -0
- package/dist/types/baseField.js +2 -0
- package/dist/types/baseField.js.map +1 -0
- package/dist/types/dataGridProps.js +2 -0
- package/dist/types/dataGridProps.js.map +1 -0
- package/dist/types/datagrid.js +2 -0
- package/dist/types/datagrid.js.map +1 -0
- package/dist/types/datePickerProps.js +2 -0
- package/dist/types/datePickerProps.js.map +1 -0
- package/dist/types/dateRangePickerProps.js +2 -0
- package/dist/types/dateRangePickerProps.js.map +1 -0
- package/dist/types/dateTimePickerProps.js +2 -0
- package/dist/types/dateTimePickerProps.js.map +1 -0
- package/dist/types/fieldProps.js +2 -0
- package/dist/types/fieldProps.js.map +1 -0
- package/dist/types/icon.js +331 -1
- package/dist/types/icon.js.map +1 -0
- package/dist/types/iconProps.js +2 -0
- package/dist/types/iconProps.js.map +1 -0
- package/dist/types/incrementerProps.js +2 -0
- package/dist/types/incrementerProps.js.map +1 -0
- package/dist/types/item.js +2 -0
- package/dist/types/item.js.map +1 -0
- package/dist/types/multiCheckboxProps.js +2 -0
- package/dist/types/multiCheckboxProps.js.map +1 -0
- package/dist/types/numberInputProps.js +2 -0
- package/dist/types/numberInputProps.js.map +1 -0
- package/dist/types/option.js +2 -0
- package/dist/types/option.js.map +1 -0
- package/dist/types/radioGroupProps.js +2 -0
- package/dist/types/radioGroupProps.js.map +1 -0
- package/dist/types/searchInputProps.js +2 -0
- package/dist/types/searchInputProps.js.map +1 -0
- package/dist/types/sectionProps.js +2 -0
- package/dist/types/sectionProps.js.map +1 -0
- package/dist/types/switchProps.js +2 -0
- package/dist/types/switchProps.js.map +1 -0
- package/dist/types/timePickerProps.js +2 -0
- package/dist/types/timePickerProps.js.map +1 -0
- package/dist/types/upload.js +2 -0
- package/dist/types/upload.js.map +1 -0
- package/dist/types/webhook.js +35 -2
- package/dist/types/webhook.js.map +1 -0
- package/dist/utils/color.js +7 -1
- package/dist/utils/color.js.map +1 -0
- package/dist/utils/compare.js +7 -1
- package/dist/utils/compare.js.map +1 -0
- package/dist/utils/date.js +20 -4
- package/dist/utils/date.js.map +1 -0
- package/dist/utils/formatNumber.js +87 -1
- package/dist/utils/formatNumber.js.map +1 -0
- package/dist/utils/formatTime.js +157 -1
- package/dist/utils/formatTime.js.map +1 -0
- package/dist/utils/loadable.js +12 -4
- package/dist/utils/loadable.js.map +1 -0
- package/dist/utils/mask.js +38 -2
- package/dist/utils/mask.js.map +1 -0
- package/dist/utils/number.js +13 -1
- package/dist/utils/number.js.map +1 -0
- package/dist/utils/sort.js +22 -2
- package/dist/utils/sort.js.map +1 -0
- package/dist/utils/uuidv4.js +9 -2
- package/dist/utils/uuidv4.js.map +1 -0
- package/dist/utils/validators.js +83 -1
- package/dist/utils/validators.js.map +1 -0
- package/package.json +2 -1
- package/dist/chunk-2MVQI7NJ.js +0 -8
- package/dist/chunk-2MW433JI.js +0 -17
- package/dist/chunk-2Z4AFXGP.js +0 -10
- package/dist/chunk-3APKMSVD.js +0 -5
- package/dist/chunk-3E5A45HM.js +0 -3
- package/dist/chunk-3SFA4YEZ.js +0 -7
- package/dist/chunk-4INDXVIX.js +0 -5
- package/dist/chunk-4SHVMCT6.js +0 -7
- package/dist/chunk-5YJTSVA2.js +0 -6
- package/dist/chunk-7F56LFN2.js +0 -17
- package/dist/chunk-7KZ2UT76.js +0 -8
- package/dist/chunk-ANAHA3L6.js +0 -3
- package/dist/chunk-BUYQKDFG.js +0 -13
- package/dist/chunk-BYAPKKGB.js +0 -7
- package/dist/chunk-CFVUZ4S5.js +0 -5
- package/dist/chunk-CFYNJQGN.js +0 -43
- package/dist/chunk-CQDKXUUX.js +0 -3
- package/dist/chunk-D27ND54J.js +0 -16
- package/dist/chunk-E5MGOPPQ.js +0 -8
- package/dist/chunk-EFUFJKJD.js +0 -7
- package/dist/chunk-GA4A5P3S.js +0 -6
- package/dist/chunk-GOC7PC2S.js +0 -6
- package/dist/chunk-ILHUUK4X.js +0 -6
- package/dist/chunk-J76XIRCA.js +0 -18
- package/dist/chunk-JHCOHKLL.js +0 -7
- package/dist/chunk-KFZEM7KS.js +0 -5
- package/dist/chunk-M6QHAL4V.js +0 -7
- package/dist/chunk-MCT77MRN.js +0 -8
- package/dist/chunk-NF42ENKE.js +0 -9
- package/dist/chunk-OJKIWVED.js +0 -10
- package/dist/chunk-ORYAES3Q.js +0 -5
- package/dist/chunk-P4HPVV7B.js +0 -14
- package/dist/chunk-P5FKEHCD.js +0 -11
- package/dist/chunk-PIYBPQAC.js +0 -17
- package/dist/chunk-PPUFQMAW.js +0 -9
- package/dist/chunk-QCWALW56.js +0 -18
- package/dist/chunk-QNAXGE5H.js +0 -8
- package/dist/chunk-QQB3DGHT.js +0 -3
- package/dist/chunk-R6FUU7Z7.js +0 -7
- package/dist/chunk-REM462FC.js +0 -26
- package/dist/chunk-RLMWIJKJ.js +0 -10
- package/dist/chunk-SEVJABAI.js +0 -7
- package/dist/chunk-T7I256S6.js +0 -8
- package/dist/chunk-TRI6XGH4.js +0 -7
- package/dist/chunk-TWGGHTU5.js +0 -5
- package/dist/chunk-UGH5FWZQ.js +0 -13
- package/dist/chunk-VTHBHXM2.js +0 -7
- package/dist/chunk-VVMQMROT.js +0 -5
- package/dist/chunk-W3MYAMTH.js +0 -5
- package/dist/chunk-WAAV5ZRR.js +0 -13
- package/dist/chunk-WKD3OXUA.js +0 -6
- package/dist/chunk-YWEB6IAI.js +0 -6
- package/dist/chunk-Z2TDWMRU.js +0 -6
- package/dist/chunk-ZDHXW74M.js +0 -5
- package/dist/chunk-ZODC2MGF.js +0 -10
- package/dist/index.css +0 -10
|
@@ -1 +1,87 @@
|
|
|
1
|
-
|
|
1
|
+
const DEFAULT_LOCALE = { code: "pt-BR", currency: "BRL" };
|
|
2
|
+
function processInput(inputValue) {
|
|
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
|
+
|
|
85
|
+
export { fCurrency, fCurrencyBRL, fData, fNumber, fPercent, fShortenNumber, fTwoDigits, fWithDecimalPlacesOrNot };
|
|
86
|
+
//# sourceMappingURL=out.js.map
|
|
87
|
+
//# sourceMappingURL=formatNumber.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/formatNumber.ts"],"names":[],"mappings":"AAIA,MAAM,iBAAiB,EAAE,MAAM,SAAS,UAAU,MAAM;AAExD,SAAS,aAAa,YAA6C;AACjE,MAAI,cAAc,QAAQ,OAAO,MAAM,UAAU;AAAG,WAAO;AAC3D,SAAO,OAAO,UAAU;AAC1B;AAEO,SAAS,QAAQ,YAA8B,SAAmB;AACvE,QAAM,SAAS;AAEf,QAAM,SAAS,aAAa,UAAU;AACtC,MAAI,WAAW;AAAM,WAAO;AAE5B,QAAM,KAAK,IAAI,KAAK,aAAa,OAAO,MAAM;AAAA,IAC5C,uBAAuB;AAAA,IACvB,uBAAuB;AAAA,IACvB,GAAG;AAAA,EACL,CAAC,EAAE,OAAO,MAAM;AAEhB,SAAO;AACT;AAEO,SAAS,UAAU,YAA8B,SAAmB;AACzE,QAAM,SAAS;AAEf,QAAM,SAAS,aAAa,UAAU;AACtC,MAAI,WAAW;AAAM,WAAO;AAE5B,QAAM,KAAK,IAAI,KAAK,aAAa,OAAO,MAAM;AAAA,IAC5C,OAAO;AAAA,IACP,UAAU,OAAO;AAAA,IACjB,uBAAuB;AAAA,IACvB,uBAAuB;AAAA,IACvB,GAAG;AAAA,EACL,CAAC,EAAE,OAAO,MAAM;AAEhB,SAAO;AACT;AAEO,SAAS,SAAS,YAA8B,SAAmB;AACxE,QAAM,SAAS;AAEf,QAAM,SAAS,aAAa,UAAU;AACtC,MAAI,WAAW;AAAM,WAAO;AAE5B,QAAM,KAAK,IAAI,KAAK,aAAa,OAAO,MAAM;AAAA,IAC5C,OAAO;AAAA,IACP,uBAAuB;AAAA,IACvB,uBAAuB;AAAA,IACvB,GAAG;AAAA,EACL,CAAC,EAAE,OAAO,SAAS,GAAG;AAEtB,SAAO;AACT;AAEO,SAAS,eACd,YACA,SACA;AACA,QAAM,SAAS;AAEf,QAAM,SAAS,aAAa,UAAU;AACtC,MAAI,WAAW;AAAM,WAAO;AAE5B,QAAM,KAAK,IAAI,KAAK,aAAa,OAAO,MAAM;AAAA,IAC5C,UAAU;AAAA,IACV,uBAAuB;AAAA,IACvB,GAAG;AAAA,EACL,CAAC,EAAE,OAAO,MAAM;AAEhB,SAAO,GAAG,QAAQ,UAAU,WAAS,MAAM,YAAY,CAAC;AAC1D;AAEO,SAAS,MAAM,YAA8B;AAClD,QAAM,SAAS,aAAa,UAAU;AACtC,MAAI,WAAW,QAAQ,WAAW;AAAG,WAAO;AAE5C,QAAM,QAAQ,CAAC,SAAS,MAAM,MAAM,MAAM,MAAM,MAAM,MAAM,MAAM,IAAI;AACtE,QAAM,UAAU;AAChB,QAAM,YAAY;AAElB,QAAM,QAAQ,KAAK,MAAM,KAAK,IAAI,MAAM,IAAI,KAAK,IAAI,SAAS,CAAC;AAC/D,QAAM,KAAK,GAAG,YAAY,SAAS,aAAa,OAAO,QAAQ,OAAO,CAAC,KAAK,MAAM,KAAK;AAEvF,SAAO;AACT;AAEO,MAAM,0BAA0B,CACrC,OACA,gBAAwB,OACrB;AACH,SAAO,CAAC,OAAO,KAAK,EAAE,QAAQ,aAAa;AAC7C;AAEO,SAAS,WAAW,OAAwB;AACjD,MAAI,UAAU,KAAK,UAAU;AAAK,WAAO;AAEzC,MAAI,OAAO,UAAU,UAAU;AAC7B,WAAO,MAAM,SAAS,GAAG,GAAG;AAAA,EAC9B,OAAO;AACL,WAAO,MAAM,SAAS,EAAE,SAAS,GAAG,GAAG;AAAA,EACzC;AACF;AAEO,MAAM,eAAe,CAAC,UAC3B,IAAI,KAAK,aAAa,SAAS,EAAE,OAAO,YAAY,UAAU,MAAM,CAAC,EAAE;AAAA,EACrE,SAAS;AACX","sourcesContent":["export type InputNumberValue = string | number | null | undefined;\n\ntype Options = Intl.NumberFormatOptions | undefined;\n\nconst DEFAULT_LOCALE = { code: 'pt-BR', currency: 'BRL' };\n\nfunction processInput(inputValue: InputNumberValue): number | null {\n if (inputValue == null || Number.isNaN(inputValue)) return null;\n return Number(inputValue);\n}\n\nexport function fNumber(inputValue: InputNumberValue, options?: Options) {\n const locale = DEFAULT_LOCALE;\n\n const number = processInput(inputValue);\n if (number === null) return '';\n\n const fm = new Intl.NumberFormat(locale.code, {\n minimumFractionDigits: 0,\n maximumFractionDigits: 2,\n ...options,\n }).format(number);\n\n return fm;\n}\n\nexport function fCurrency(inputValue: InputNumberValue, options?: Options) {\n const locale = DEFAULT_LOCALE;\n\n const number = processInput(inputValue);\n if (number === null) return '';\n\n const fm = new Intl.NumberFormat(locale.code, {\n style: 'currency',\n currency: locale.currency,\n minimumFractionDigits: 0,\n maximumFractionDigits: 2,\n ...options,\n }).format(number);\n\n return fm;\n}\n\nexport function fPercent(inputValue: InputNumberValue, options?: Options) {\n const locale = DEFAULT_LOCALE;\n\n const number = processInput(inputValue);\n if (number === null) return '';\n\n const fm = new Intl.NumberFormat(locale.code, {\n style: 'percent',\n minimumFractionDigits: 0,\n maximumFractionDigits: 1,\n ...options,\n }).format(number / 100);\n\n return fm;\n}\n\nexport function fShortenNumber(\n inputValue: InputNumberValue,\n options?: Options,\n) {\n const locale = DEFAULT_LOCALE;\n\n const number = processInput(inputValue);\n if (number === null) return '';\n\n const fm = new Intl.NumberFormat(locale.code, {\n notation: 'compact',\n maximumFractionDigits: 2,\n ...options,\n }).format(number);\n\n return fm.replace(/[A-Z]/g, match => match.toLowerCase());\n}\n\nexport function fData(inputValue: InputNumberValue) {\n const number = processInput(inputValue);\n if (number === null || number === 0) return '0 bytes';\n\n const units = ['bytes', 'Kb', 'Mb', 'Gb', 'Tb', 'Pb', 'Eb', 'Zb', 'Yb'];\n const decimal = 2;\n const baseValue = 1024;\n\n const index = Math.floor(Math.log(number) / Math.log(baseValue));\n const fm = `${parseFloat((number / baseValue ** index).toFixed(decimal))} ${units[index]}`;\n\n return fm;\n}\n\nexport const fWithDecimalPlacesOrNot = (\n value: string | number,\n decimalPlaces: number = 12,\n) => {\n return +Number(value).toFixed(decimalPlaces);\n};\n\nexport function fTwoDigits(value: number | string) {\n if (value === 0 || value === '0') return '0';\n\n if (typeof value === 'string') {\n return value.padStart(2, '0');\n } else {\n return value.toString().padStart(2, '0');\n }\n}\n\nexport const fCurrencyBRL = (value?: number | null): string =>\n new Intl.NumberFormat('pt-BR', { style: 'currency', currency: 'BRL' }).format(\n value || 0,\n );\n"]}
|
package/dist/utils/formatTime.js
CHANGED
|
@@ -1 +1,157 @@
|
|
|
1
|
-
|
|
1
|
+
import dayjs from 'dayjs';
|
|
2
|
+
import duration from 'dayjs/plugin/duration';
|
|
3
|
+
import relativeTime from 'dayjs/plugin/relativeTime';
|
|
4
|
+
|
|
5
|
+
dayjs.extend(duration);
|
|
6
|
+
dayjs.extend(relativeTime);
|
|
7
|
+
const formatStr = {
|
|
8
|
+
dateTime: "DD/MM/YYYY HH:mm",
|
|
9
|
+
date: "DD/MM/YYYY",
|
|
10
|
+
time: "HH:mm",
|
|
11
|
+
split: {
|
|
12
|
+
dateTime: "DD/MM/YYYY HH:mm",
|
|
13
|
+
date: "DD/MM/YYYY"
|
|
14
|
+
},
|
|
15
|
+
paramCase: {
|
|
16
|
+
dateTime: "DD/MM/YYYY HH:mm",
|
|
17
|
+
date: "DD/MM/YYYY"
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
function today(format) {
|
|
21
|
+
return dayjs(/* @__PURE__ */ new Date()).startOf("day").format(format);
|
|
22
|
+
}
|
|
23
|
+
function fDateTime(date, format) {
|
|
24
|
+
if (!date) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
const isValid = dayjs(date).isValid();
|
|
28
|
+
return isValid ? dayjs(date).format(format ?? formatStr.dateTime) : "Invalid time value";
|
|
29
|
+
}
|
|
30
|
+
function fDate(date, format) {
|
|
31
|
+
if (!date) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
const isValid = dayjs(date).isValid();
|
|
35
|
+
return isValid ? dayjs(date).format(format ?? formatStr.date) : "Invalid time value";
|
|
36
|
+
}
|
|
37
|
+
function fTime(date, format) {
|
|
38
|
+
if (!date) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
const isValid = dayjs(date).isValid();
|
|
42
|
+
return isValid ? dayjs(date).format(format ?? formatStr.time) : "Invalid time value";
|
|
43
|
+
}
|
|
44
|
+
function fTimestamp(date) {
|
|
45
|
+
if (!date) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
const isValid = dayjs(date).isValid();
|
|
49
|
+
return isValid ? dayjs(date).valueOf() : "Invalid time value";
|
|
50
|
+
}
|
|
51
|
+
function fToNow(date) {
|
|
52
|
+
if (!date) {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
const isValid = dayjs(date).isValid();
|
|
56
|
+
return isValid ? dayjs(date).toNow(true) : "Invalid time value";
|
|
57
|
+
}
|
|
58
|
+
function fIsBetween(inputDate, startDate, endDate) {
|
|
59
|
+
if (!inputDate || !startDate || !endDate) {
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
const formattedInputDate = fTimestamp(inputDate);
|
|
63
|
+
const formattedStartDate = fTimestamp(startDate);
|
|
64
|
+
const formattedEndDate = fTimestamp(endDate);
|
|
65
|
+
if (formattedInputDate && formattedStartDate && formattedEndDate) {
|
|
66
|
+
return formattedInputDate >= formattedStartDate && formattedInputDate <= formattedEndDate;
|
|
67
|
+
}
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
function fIsAfter(startDate, endDate) {
|
|
71
|
+
return dayjs(startDate).isAfter(endDate);
|
|
72
|
+
}
|
|
73
|
+
function fIsSame(startDate, endDate, units) {
|
|
74
|
+
if (!startDate || !endDate) {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
const isValid = dayjs(startDate).isValid() && dayjs(endDate).isValid();
|
|
78
|
+
if (!isValid) {
|
|
79
|
+
return "Invalid time value";
|
|
80
|
+
}
|
|
81
|
+
return dayjs(startDate).isSame(endDate, units ?? "year");
|
|
82
|
+
}
|
|
83
|
+
function fDateRangeShortLabel(startDate, endDate, initial) {
|
|
84
|
+
const isValid = dayjs(startDate).isValid() && dayjs(endDate).isValid();
|
|
85
|
+
const isAfter = fIsAfter(startDate, endDate);
|
|
86
|
+
if (!isValid || isAfter) {
|
|
87
|
+
return "Invalid time value";
|
|
88
|
+
}
|
|
89
|
+
let label = `${fDate(startDate)} - ${fDate(endDate)}`;
|
|
90
|
+
if (initial) {
|
|
91
|
+
return label;
|
|
92
|
+
}
|
|
93
|
+
const isSameYear = fIsSame(startDate, endDate, "year");
|
|
94
|
+
const isSameMonth = fIsSame(startDate, endDate, "month");
|
|
95
|
+
const isSameDay = fIsSame(startDate, endDate, "day");
|
|
96
|
+
if (isSameYear && !isSameMonth) {
|
|
97
|
+
label = `${fDate(startDate, "DD MMM")} - ${fDate(endDate)}`;
|
|
98
|
+
} else if (isSameYear && isSameMonth && !isSameDay) {
|
|
99
|
+
label = `${fDate(startDate, "DD")} - ${fDate(endDate)}`;
|
|
100
|
+
} else if (isSameYear && isSameMonth && isSameDay) {
|
|
101
|
+
label = `${fDate(endDate)}`;
|
|
102
|
+
}
|
|
103
|
+
return label;
|
|
104
|
+
}
|
|
105
|
+
function fAdd({
|
|
106
|
+
years = 0,
|
|
107
|
+
months = 0,
|
|
108
|
+
days = 0,
|
|
109
|
+
hours = 0,
|
|
110
|
+
minutes = 0,
|
|
111
|
+
seconds = 0,
|
|
112
|
+
milliseconds = 0
|
|
113
|
+
}) {
|
|
114
|
+
const result = dayjs().add(
|
|
115
|
+
dayjs.duration({
|
|
116
|
+
years,
|
|
117
|
+
months,
|
|
118
|
+
days,
|
|
119
|
+
hours,
|
|
120
|
+
minutes,
|
|
121
|
+
seconds,
|
|
122
|
+
milliseconds
|
|
123
|
+
})
|
|
124
|
+
).format();
|
|
125
|
+
return result;
|
|
126
|
+
}
|
|
127
|
+
function fSub({
|
|
128
|
+
years = 0,
|
|
129
|
+
months = 0,
|
|
130
|
+
days = 0,
|
|
131
|
+
hours = 0,
|
|
132
|
+
minutes = 0,
|
|
133
|
+
seconds = 0,
|
|
134
|
+
milliseconds = 0
|
|
135
|
+
}) {
|
|
136
|
+
const result = dayjs().subtract(
|
|
137
|
+
dayjs.duration({
|
|
138
|
+
years,
|
|
139
|
+
months,
|
|
140
|
+
days,
|
|
141
|
+
hours,
|
|
142
|
+
minutes,
|
|
143
|
+
seconds,
|
|
144
|
+
milliseconds
|
|
145
|
+
})
|
|
146
|
+
).format();
|
|
147
|
+
return result;
|
|
148
|
+
}
|
|
149
|
+
const getDifferenceInDays = (startDate, endDate) => {
|
|
150
|
+
if (!startDate || !endDate)
|
|
151
|
+
return null;
|
|
152
|
+
return dayjs(endDate).diff(dayjs(startDate), "day");
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
export { fAdd, fDate, fDateRangeShortLabel, fDateTime, fIsAfter, fIsBetween, fIsSame, fSub, fTime, fTimestamp, fToNow, formatStr, getDifferenceInDays, today };
|
|
156
|
+
//# sourceMappingURL=out.js.map
|
|
157
|
+
//# sourceMappingURL=formatTime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/formatTime.ts"],"names":[],"mappings":"AACA,OAAO,WAAW;AAClB,OAAO,cAAc;AACrB,OAAO,kBAAkB;AAIzB,MAAM,OAAO,QAAQ;AACrB,MAAM,OAAO,YAAY;AAYlB,MAAM,YAAY;AAAA,EACvB,UAAU;AAAA,EACV,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,IACL,UAAU;AAAA,IACV,MAAM;AAAA,EACR;AAAA,EACA,WAAW;AAAA,IACT,UAAU;AAAA,IACV,MAAM;AAAA,EACR;AACF;AAEO,SAAS,MAAM,QAAiB;AACrC,SAAO,MAAM,oBAAI,KAAK,CAAC,EAAE,QAAQ,KAAK,EAAE,OAAO,MAAM;AACvD;AAEO,SAAS,UAAU,MAAwB,QAAiB;AACjE,MAAI,CAAC,MAAM;AACT,WAAO;AAAA,EACT;AAEA,QAAM,UAAU,MAAM,IAAI,EAAE,QAAQ;AAEpC,SAAO,UACH,MAAM,IAAI,EAAE,OAAO,UAAU,UAAU,QAAQ,IAC/C;AACN;AAEO,SAAS,MAAM,MAAwB,QAAiB;AAC7D,MAAI,CAAC,MAAM;AACT,WAAO;AAAA,EACT;AAEA,QAAM,UAAU,MAAM,IAAI,EAAE,QAAQ;AAEpC,SAAO,UACH,MAAM,IAAI,EAAE,OAAO,UAAU,UAAU,IAAI,IAC3C;AACN;AAEO,SAAS,MAAM,MAAwB,QAAiB;AAC7D,MAAI,CAAC,MAAM;AACT,WAAO;AAAA,EACT;AAEA,QAAM,UAAU,MAAM,IAAI,EAAE,QAAQ;AAEpC,SAAO,UACH,MAAM,IAAI,EAAE,OAAO,UAAU,UAAU,IAAI,IAC3C;AACN;AAEO,SAAS,WAAW,MAAwB;AACjD,MAAI,CAAC,MAAM;AACT,WAAO;AAAA,EACT;AAEA,QAAM,UAAU,MAAM,IAAI,EAAE,QAAQ;AAEpC,SAAO,UAAU,MAAM,IAAI,EAAE,QAAQ,IAAI;AAC3C;AAEO,SAAS,OAAO,MAAwB;AAC7C,MAAI,CAAC,MAAM;AACT,WAAO;AAAA,EACT;AAEA,QAAM,UAAU,MAAM,IAAI,EAAE,QAAQ;AAEpC,SAAO,UAAU,MAAM,IAAI,EAAE,MAAM,IAAI,IAAI;AAC7C;AAEO,SAAS,WACd,WACA,WACA,SACA;AACA,MAAI,CAAC,aAAa,CAAC,aAAa,CAAC,SAAS;AACxC,WAAO;AAAA,EACT;AAEA,QAAM,qBAAqB,WAAW,SAAS;AAC/C,QAAM,qBAAqB,WAAW,SAAS;AAC/C,QAAM,mBAAmB,WAAW,OAAO;AAE3C,MAAI,sBAAsB,sBAAsB,kBAAkB;AAChE,WACE,sBAAsB,sBACtB,sBAAsB;AAAA,EAE1B;AAEA,SAAO;AACT;AAEO,SAAS,SACd,WACA,SACA;AACA,SAAO,MAAM,SAAS,EAAE,QAAQ,OAAO;AACzC;AAEO,SAAS,QACd,WACA,SACA,OACA;AACA,MAAI,CAAC,aAAa,CAAC,SAAS;AAC1B,WAAO;AAAA,EACT;AAEA,QAAM,UAAU,MAAM,SAAS,EAAE,QAAQ,KAAK,MAAM,OAAO,EAAE,QAAQ;AAErE,MAAI,CAAC,SAAS;AACZ,WAAO;AAAA,EACT;AAEA,SAAO,MAAM,SAAS,EAAE,OAAO,SAAS,SAAS,MAAM;AACzD;AAEO,SAAS,qBACd,WACA,SACA,SACA;AACA,QAAM,UAAU,MAAM,SAAS,EAAE,QAAQ,KAAK,MAAM,OAAO,EAAE,QAAQ;AAErE,QAAM,UAAU,SAAS,WAAW,OAAO;AAE3C,MAAI,CAAC,WAAW,SAAS;AACvB,WAAO;AAAA,EACT;AAEA,MAAI,QAAQ,GAAG,MAAM,SAAS,OAAO,MAAM,OAAO;AAElD,MAAI,SAAS;AACX,WAAO;AAAA,EACT;AAEA,QAAM,aAAa,QAAQ,WAAW,SAAS,MAAM;AACrD,QAAM,cAAc,QAAQ,WAAW,SAAS,OAAO;AACvD,QAAM,YAAY,QAAQ,WAAW,SAAS,KAAK;AAEnD,MAAI,cAAc,CAAC,aAAa;AAC9B,YAAQ,GAAG,MAAM,WAAW,QAAQ,OAAO,MAAM,OAAO;AAAA,EAC1D,WAAW,cAAc,eAAe,CAAC,WAAW;AAClD,YAAQ,GAAG,MAAM,WAAW,IAAI,OAAO,MAAM,OAAO;AAAA,EACtD,WAAW,cAAc,eAAe,WAAW;AACjD,YAAQ,GAAG,MAAM,OAAO;AAAA,EAC1B;AAEA,SAAO;AACT;AAYO,SAAS,KAAK;AAAA,EACnB,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,UAAU;AAAA,EACV,eAAe;AACjB,GAAkB;AAChB,QAAM,SAAS,MAAM,EAClB;AAAA,IACC,MAAM,SAAS;AAAA,MACb;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAAA,EACH,EACC,OAAO;AAEV,SAAO;AACT;AAEO,SAAS,KAAK;AAAA,EACnB,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,UAAU;AAAA,EACV,eAAe;AACjB,GAAkB;AAChB,QAAM,SAAS,MAAM,EAClB;AAAA,IACC,MAAM,SAAS;AAAA,MACb;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAAA,EACH,EACC,OAAO;AAEV,SAAO;AACT;AAEO,MAAM,sBAAsB,CAAC,WAAkB,YAAmB;AACvE,MAAI,CAAC,aAAa,CAAC;AAAS,WAAO;AAEnC,SAAO,MAAM,OAAO,EAAE,KAAK,MAAM,SAAS,GAAG,KAAK;AACpD","sourcesContent":["import type { Dayjs, OpUnitType } from 'dayjs';\nimport dayjs from 'dayjs';\nimport duration from 'dayjs/plugin/duration';\nimport relativeTime from 'dayjs/plugin/relativeTime';\n\n// ----------------------------------------------------------------------\n\ndayjs.extend(duration);\ndayjs.extend(relativeTime);\n\n// ----------------------------------------------------------------------\n\nexport type DatePickerFormat =\n | Dayjs\n | Date\n | string\n | number\n | null\n | undefined;\n\nexport const formatStr = {\n dateTime: 'DD/MM/YYYY HH:mm',\n date: 'DD/MM/YYYY',\n time: 'HH:mm',\n split: {\n dateTime: 'DD/MM/YYYY HH:mm',\n date: 'DD/MM/YYYY',\n },\n paramCase: {\n dateTime: 'DD/MM/YYYY HH:mm',\n date: 'DD/MM/YYYY',\n },\n};\n\nexport function today(format?: string) {\n return dayjs(new Date()).startOf('day').format(format);\n}\n\nexport function fDateTime(date: DatePickerFormat, format?: string) {\n if (!date) {\n return null;\n }\n\n const isValid = dayjs(date).isValid();\n\n return isValid\n ? dayjs(date).format(format ?? formatStr.dateTime)\n : 'Invalid time value';\n}\n\nexport function fDate(date: DatePickerFormat, format?: string) {\n if (!date) {\n return null;\n }\n\n const isValid = dayjs(date).isValid();\n\n return isValid\n ? dayjs(date).format(format ?? formatStr.date)\n : 'Invalid time value';\n}\n\nexport function fTime(date: DatePickerFormat, format?: string) {\n if (!date) {\n return null;\n }\n\n const isValid = dayjs(date).isValid();\n\n return isValid\n ? dayjs(date).format(format ?? formatStr.time)\n : 'Invalid time value';\n}\n\nexport function fTimestamp(date: DatePickerFormat) {\n if (!date) {\n return null;\n }\n\n const isValid = dayjs(date).isValid();\n\n return isValid ? dayjs(date).valueOf() : 'Invalid time value';\n}\n\nexport function fToNow(date: DatePickerFormat) {\n if (!date) {\n return null;\n }\n\n const isValid = dayjs(date).isValid();\n\n return isValid ? dayjs(date).toNow(true) : 'Invalid time value';\n}\n\nexport function fIsBetween(\n inputDate: DatePickerFormat,\n startDate: DatePickerFormat,\n endDate: DatePickerFormat,\n) {\n if (!inputDate || !startDate || !endDate) {\n return false;\n }\n\n const formattedInputDate = fTimestamp(inputDate);\n const formattedStartDate = fTimestamp(startDate);\n const formattedEndDate = fTimestamp(endDate);\n\n if (formattedInputDate && formattedStartDate && formattedEndDate) {\n return (\n formattedInputDate >= formattedStartDate &&\n formattedInputDate <= formattedEndDate\n );\n }\n\n return false;\n}\n\nexport function fIsAfter(\n startDate: DatePickerFormat,\n endDate: DatePickerFormat,\n) {\n return dayjs(startDate).isAfter(endDate);\n}\n\nexport function fIsSame(\n startDate: DatePickerFormat,\n endDate: DatePickerFormat,\n units?: OpUnitType,\n) {\n if (!startDate || !endDate) {\n return false;\n }\n\n const isValid = dayjs(startDate).isValid() && dayjs(endDate).isValid();\n\n if (!isValid) {\n return 'Invalid time value';\n }\n\n return dayjs(startDate).isSame(endDate, units ?? 'year');\n}\n\nexport function fDateRangeShortLabel(\n startDate: DatePickerFormat,\n endDate: DatePickerFormat,\n initial?: boolean,\n) {\n const isValid = dayjs(startDate).isValid() && dayjs(endDate).isValid();\n\n const isAfter = fIsAfter(startDate, endDate);\n\n if (!isValid || isAfter) {\n return 'Invalid time value';\n }\n\n let label = `${fDate(startDate)} - ${fDate(endDate)}`;\n\n if (initial) {\n return label;\n }\n\n const isSameYear = fIsSame(startDate, endDate, 'year');\n const isSameMonth = fIsSame(startDate, endDate, 'month');\n const isSameDay = fIsSame(startDate, endDate, 'day');\n\n if (isSameYear && !isSameMonth) {\n label = `${fDate(startDate, 'DD MMM')} - ${fDate(endDate)}`;\n } else if (isSameYear && isSameMonth && !isSameDay) {\n label = `${fDate(startDate, 'DD')} - ${fDate(endDate)}`;\n } else if (isSameYear && isSameMonth && isSameDay) {\n label = `${fDate(endDate)}`;\n }\n\n return label;\n}\n\nexport type DurationProps = {\n years?: number;\n months?: number;\n days?: number;\n hours?: number;\n minutes?: number;\n seconds?: number;\n milliseconds?: number;\n};\n\nexport function fAdd({\n years = 0,\n months = 0,\n days = 0,\n hours = 0,\n minutes = 0,\n seconds = 0,\n milliseconds = 0,\n}: DurationProps) {\n const result = dayjs()\n .add(\n dayjs.duration({\n years,\n months,\n days,\n hours,\n minutes,\n seconds,\n milliseconds,\n }),\n )\n .format();\n\n return result;\n}\n\nexport function fSub({\n years = 0,\n months = 0,\n days = 0,\n hours = 0,\n minutes = 0,\n seconds = 0,\n milliseconds = 0,\n}: DurationProps) {\n const result = dayjs()\n .subtract(\n dayjs.duration({\n years,\n months,\n days,\n hours,\n minutes,\n seconds,\n milliseconds,\n }),\n )\n .format();\n\n return result;\n}\n\nexport const getDifferenceInDays = (startDate?: Date, endDate?: Date) => {\n if (!startDate || !endDate) return null;\n\n return dayjs(endDate).diff(dayjs(startDate), 'day');\n};\n"]}
|
package/dist/utils/loadable.js
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
import { a as a$1 } from '../chunk-YWEB6IAI.js';
|
|
2
|
-
import { Suspense } from 'react';
|
|
3
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Suspense } from 'react';
|
|
3
|
+
import FixedProgressBar from 'components/FixedProgressBar';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const loadable = (Component) => (
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7
|
+
function loader(props) {
|
|
8
|
+
return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(FixedProgressBar, {}), children: /* @__PURE__ */ jsx(Component, { ...props }) });
|
|
9
|
+
}
|
|
10
|
+
);
|
|
11
|
+
var loadable_default = loadable;
|
|
6
12
|
|
|
7
|
-
export {
|
|
13
|
+
export { loadable_default as default };
|
|
14
|
+
//# sourceMappingURL=out.js.map
|
|
15
|
+
//# sourceMappingURL=loadable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/loadable.tsx"],"names":[],"mappings":"AAQ0B;AAR1B,SAAsB,gBAAgB;AAEtC,OAAO,sBAAsB;AAE7B,MAAM,WAAW,CAAC;AAAA;AAAA,EAEhB,SAAS,OAAO,OAAY;AAC1B,WACE,oBAAC,YAAS,UAAU,oBAAC,oBAAiB,GACpC,8BAAC,aAAW,GAAG,OAAO,GACxB;AAAA,EAEJ;AAAA;AAEF,IAAO,mBAAQ","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,3 +1,39 @@
|
|
|
1
|
-
|
|
1
|
+
const applyMask = (value = "", mask) => {
|
|
2
|
+
let formattedString = "";
|
|
3
|
+
let j = 0;
|
|
4
|
+
[...mask].forEach((char) => {
|
|
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
|
+
};
|
|
2
36
|
|
|
3
|
-
export {
|
|
37
|
+
export { applyMask, cepMask, cnpjMask, cpfMask, cpfMaskOrCnpjMask, phoneMask };
|
|
38
|
+
//# sourceMappingURL=out.js.map
|
|
39
|
+
//# sourceMappingURL=mask.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/mask.ts"],"names":[],"mappings":"AAAO,MAAM,YAAY,CAAC,QAAQ,IAAI,SAAiB;AACrD,MAAI,kBAAkB;AACtB,MAAI,IAAI;AAGR,GAAC,GAAG,IAAI,EAAE,QAAQ,UAAQ;AAExB,uBAAmB,SAAS,MAAM,MAAM,GAAG,KAAK,MAAM;AAAA,EACxD,CAAC;AAED,SAAO;AACT;AAEO,MAAM,UAAU,CAAC,MAAc;AACpC,QAAM,QAAQ,KAAK;AACnB,SAAO,UAAU,MAAM,QAAQ,OAAO,EAAE,GAAG,gBAAgB;AAC7D;AAEO,MAAM,WAAW,CAAC,MAAc;AACrC,QAAM,QAAQ,KAAK;AACnB,SAAO,UAAU,MAAM,QAAQ,OAAO,EAAE,GAAG,oBAAoB;AACjE;AAEO,MAAM,UAAU,CAAC,MAAc;AACpC,QAAM,QAAQ,KAAK;AACnB,SAAO,UAAU,MAAM,QAAQ,OAAO,EAAE,GAAG,WAAW;AACxD;AAEO,MAAM,YAAY,CAAC,MAAc;AACtC,QAAM,QAAQ,KAAK;AACnB,QAAM,eAAe,MAAM,QAAQ,OAAO,EAAE;AAC5C,QAAM,OACJ,aAAa,WAAW,KAAK,oBAAoB;AAEnD,SAAO,UAAU,cAAc,IAAI;AACrC;AAEO,MAAM,oBAAoB,CAAC,MAAc;AAC9C,QAAM,QAAQ,KAAK;AACnB,QAAM,eAAe,SAAS,IAAI,QAAQ,OAAO,EAAE;AAEnD,MAAI,YAAY,WAAW;AAAI,WAAO,QAAQ,WAAW;AAEzD,MAAI,YAAY,WAAW;AAAI,WAAO,SAAS,WAAW;AAE1D,SAAO;AACT","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 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
function isMultiple(possibleMultiple, reference, exponent = 0) {
|
|
2
|
+
return Math.round(10 ** (exponent || 0) * possibleMultiple) % Math.round(10 ** (exponent || 0) * reference) === 0;
|
|
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
|
+
|
|
11
|
+
export { isMultiple, isNumeric, roundIfNecessary };
|
|
12
|
+
//# sourceMappingURL=out.js.map
|
|
13
|
+
//# sourceMappingURL=number.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/number.ts"],"names":[],"mappings":"AAAO,SAAS,WACd,kBACA,WACA,WAAW,GACX;AACA,SACE,KAAK,MAAM,OAAO,YAAY,KAAK,gBAAgB,IACjD,KAAK,MAAM,OAAO,YAAY,KAAK,SAAS,MAC9C;AAEJ;AAEO,SAAS,iBAAiB,QAAQ,GAAG;AAC1C,SAAO,KAAK,MAAM,QAAQ,GAAG,IAAI;AACnC;AAEO,MAAM,YAAY,CAAC,WAAmB;AAC3C,SAAO,qBAAqB,KAAK,MAAM;AACzC","sourcesContent":["export function isMultiple(\n possibleMultiple: number,\n reference: number,\n exponent = 0,\n) {\n return (\n Math.round(10 ** (exponent || 0) * possibleMultiple) %\n Math.round(10 ** (exponent || 0) * reference) ===\n 0\n );\n}\n\nexport function roundIfNecessary(value = 0) {\n return Math.round(value * 100) / 100;\n}\n\nexport const isNumeric = (string: string) => {\n return /^[+-]?\\d+(\\.\\d+)?$/.test(string);\n};\n"]}
|
package/dist/utils/sort.js
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
-
function
|
|
1
|
+
function sort(arr, prop, direction = "asc") {
|
|
2
|
+
return arr.slice().sort((a, b) => {
|
|
3
|
+
const aValue = a[prop];
|
|
4
|
+
const bValue = b[prop];
|
|
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
|
+
}
|
|
2
20
|
|
|
3
|
-
export {
|
|
21
|
+
export { sort, updatePosition };
|
|
22
|
+
//# sourceMappingURL=out.js.map
|
|
23
|
+
//# sourceMappingURL=sort.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/sort.ts"],"names":[],"mappings":"AAAA,SAAS,KACP,KACA,MACA,YAA4B,OACvB;AACL,SAAO,IAAI,MAAM,EAAE,KAAK,CAAC,GAAG,MAAM;AAChC,UAAM,SAAS,EAAE,IAAI;AACrB,UAAM,SAAS,EAAE,IAAI;AAErB,QAAI,SAAS,QAAQ;AACnB,aAAO,cAAc,QAAQ,KAAK;AAAA,IACpC;AAEA,QAAI,SAAS,QAAQ;AACnB,aAAO,cAAc,QAAQ,IAAI;AAAA,IACnC;AAEA,WAAO;AAAA,EACT,CAAC;AACH;AAEA,SAAS,eACP,cACA,UACA,MACK;AACL,QAAM,YAAY,CAAC,GAAG,IAAI;AAC1B,QAAM,MAAM,UAAU,OAAO,cAAc,CAAC,EAAE,CAAC;AAC/C,YAAU,OAAO,UAAU,GAAG,GAAG;AAEjC,SAAO;AACT","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,3 +1,10 @@
|
|
|
1
|
-
function
|
|
1
|
+
function uuidv4() {
|
|
2
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
|
|
3
|
+
const r = Math.random() * 16 | 0, v = c === "x" ? r : r & 3 | 8;
|
|
4
|
+
return v.toString(16);
|
|
5
|
+
});
|
|
6
|
+
}
|
|
2
7
|
|
|
3
|
-
export {
|
|
8
|
+
export { uuidv4 as default };
|
|
9
|
+
//# sourceMappingURL=out.js.map
|
|
10
|
+
//# sourceMappingURL=uuidv4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/uuidv4.ts"],"names":[],"mappings":"AAAe,SAAR,SAA0B;AAC/B,SAAO,uCAAuC,QAAQ,SAAS,SAAU,GAAG;AAC1E,UAAM,IAAK,KAAK,OAAO,IAAI,KAAM,GAC/B,IAAI,MAAM,MAAM,IAAK,IAAI,IAAO;AAClC,WAAO,EAAE,SAAS,EAAE;AAAA,EACtB,CAAC;AACH","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 +1,83 @@
|
|
|
1
|
-
|
|
1
|
+
const cpfIsValid = (cpf) => {
|
|
2
|
+
if (!cpf)
|
|
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
|
+
|
|
81
|
+
export { cnpjIsValid, cpfIsValid, emailIsValid, validatePassword };
|
|
82
|
+
//# sourceMappingURL=out.js.map
|
|
83
|
+
//# sourceMappingURL=validators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/validators.ts"],"names":[],"mappings":"AAAO,MAAM,aAAa,CAAC,QAAgB;AACzC,MAAI,CAAC;AAAK,WAAO;AACjB,QAAM,KAAK,QAAQ,WAAW,EAAE;AAChC,MACE,IAAI,WAAW,MACf,QAAQ,iBACR,QAAQ,iBACR,QAAQ,iBACR,QAAQ,iBACR,QAAQ,iBACR,QAAQ,iBACR,QAAQ,iBACR,QAAQ,iBACR,QAAQ,iBACR,QAAQ;AAER,WAAO;AACT,MAAI,MAAM;AACV,WAAS,IAAI,GAAG,IAAI,GAAG;AAAK,WAAO,SAAS,IAAI,OAAO,CAAC,CAAC,KAAK,KAAK;AACnE,MAAI,MAAM,KAAM,MAAM;AACtB,MAAI,QAAQ,MAAM,QAAQ;AAAI,UAAM;AACpC,MAAI,QAAQ,SAAS,IAAI,OAAO,CAAC,CAAC;AAAG,WAAO;AAC5C,QAAM;AACN,WAAS,IAAI,GAAG,IAAI,IAAI;AAAK,WAAO,SAAS,IAAI,OAAO,CAAC,CAAC,KAAK,KAAK;AACpE,QAAM,KAAM,MAAM;AAClB,MAAI,QAAQ,MAAM,QAAQ;AAAI,UAAM;AACpC,MAAI,QAAQ,SAAS,IAAI,OAAO,EAAE,CAAC;AAAG,WAAO;AAC7C,SAAO;AACT;AAEO,MAAM,cAAc,CAAC,SAAiB;AAC3C,MAAI,CAAC;AAAM,WAAO;AAClB,SAAO,KAAK,QAAQ,WAAW,EAAE;AAEjC,MAAI,KAAK,WAAW;AAAI,WAAO;AAE/B,MACE,SAAS,oBACT,SAAS,oBACT,SAAS,oBACT,SAAS,oBACT,SAAS,oBACT,SAAS,oBACT,SAAS,oBACT,SAAS,oBACT,SAAS,oBACT,SAAS;AAET,WAAO;AAET,MAAI,OAAO,KAAK,SAAS;AACzB,MAAI,UAAU,KAAK,UAAU,GAAG,IAAI;AACpC,QAAM,SAAS,KAAK,UAAU,IAAI;AAClC,MAAI,MAAM;AACV,MAAI,WAAW,OAAO;AACtB,WAAS,IAAI,MAAM,KAAK,GAAG,KAAK;AAC9B,WAAO,SAAS,QAAQ,OAAO,OAAO,CAAC,CAAC,IAAI;AAC5C,QAAI,WAAW;AAAG,iBAAW;AAAA,EAC/B;AACA,MAAI,SAAS,MAAM,KAAK,IAAI,IAAI,KAAM,MAAM;AAC5C,MAAI,WAAW,SAAS,OAAO,OAAO,CAAC,CAAC;AAAG,WAAO;AAElD,UAAQ;AACR,YAAU,KAAK,UAAU,GAAG,IAAI;AAChC,QAAM;AACN,aAAW,OAAO;AAClB,WAAS,IAAI,MAAM,KAAK,GAAG,KAAK;AAC9B,WAAO,SAAS,QAAQ,OAAO,OAAO,CAAC,CAAC,IAAI;AAC5C,QAAI,WAAW;AAAG,iBAAW;AAAA,EAC/B;AACA,WAAS,MAAM,KAAK,IAAI,IAAI,KAAM,MAAM;AACxC,MAAI,WAAW,SAAS,OAAO,OAAO,CAAC,CAAC;AAAG,WAAO;AAElD,SAAO;AACT;AAEO,MAAM,eAAe,CAAC,QAAQ,OAAO;AAC1C,MAAI,CAAC;AAAO,WAAO;AAEnB,QAAM,UAAU,MACb,YAAY,EACZ;AAAA,IACC;AAAA,EACF;AAEF,SAAO,CAAC,CAAC;AACX;AAEO,MAAM,mBAAmB,CAC9B,WAAW,IACX,eAAe,CAAC,GAAG,EAAE,GACrB,aAAa,OACb,mBAAmB,OACnB,gBAAgB,UACb;AACH,QAAM,gBACJ,SAAS,UAAU,aAAa,CAAC,KAAK,SAAS,UAAU,aAAa,CAAC;AACzE,QAAM,mBAAmB,CAAC,iBAAiB,QAAQ,KAAK,QAAQ;AAChE,QAAM,sBACJ,CAAC,oBAAoB,yBAAyB,KAAK,QAAQ;AAC7D,QAAM,gBAAgB,CAAC,cAAc,KAAK,KAAK,QAAQ;AAEvD,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF","sourcesContent":["export const cpfIsValid = (cpf: string) => {\n if (!cpf) return false;\n cpf = cpf?.replace(/[^\\d]+/g, '');\n if (\n cpf.length !== 11 ||\n cpf === '00000000000' ||\n cpf === '11111111111' ||\n cpf === '22222222222' ||\n cpf === '33333333333' ||\n cpf === '44444444444' ||\n cpf === '55555555555' ||\n cpf === '66666666666' ||\n cpf === '77777777777' ||\n cpf === '88888888888' ||\n cpf === '99999999999'\n )\n return false;\n let add = 0;\n for (let i = 0; i < 9; i++) add += parseInt(cpf.charAt(i)) * (10 - i);\n let rev = 11 - (add % 11);\n if (rev === 10 || rev === 11) rev = 0;\n if (rev !== parseInt(cpf.charAt(9))) return false;\n add = 0;\n for (let i = 0; i < 10; i++) add += parseInt(cpf.charAt(i)) * (11 - i);\n rev = 11 - (add % 11);\n if (rev === 10 || rev === 11) rev = 0;\n if (rev !== parseInt(cpf.charAt(10))) return false;\n return true;\n};\n\nexport const cnpjIsValid = (cnpj: string) => {\n if (!cnpj) return false;\n cnpj = cnpj.replace(/[^\\d]+/g, '');\n\n if (cnpj.length !== 14) return false;\n\n if (\n cnpj === '00000000000000' ||\n cnpj === '11111111111111' ||\n cnpj === '22222222222222' ||\n cnpj === '33333333333333' ||\n cnpj === '44444444444444' ||\n cnpj === '55555555555555' ||\n cnpj === '66666666666666' ||\n cnpj === '77777777777777' ||\n cnpj === '88888888888888' ||\n cnpj === '99999999999999'\n )\n return false;\n\n let size = cnpj.length - 2;\n let numbers = cnpj.substring(0, size);\n const digits = cnpj.substring(size);\n let sum = 0;\n let position = size - 7;\n for (let i = size; i >= 1; i--) {\n sum += parseInt(numbers.charAt(size - i)) * position--;\n if (position < 2) position = 9;\n }\n let result = sum % 11 < 2 ? 0 : 11 - (sum % 11);\n if (result !== parseInt(digits.charAt(0))) return false;\n\n size += 1;\n numbers = cnpj.substring(0, size);\n sum = 0;\n position = size - 7;\n for (let i = size; i >= 1; i--) {\n sum += parseInt(numbers.charAt(size - i)) * position--;\n if (position < 2) position = 9;\n }\n result = sum % 11 < 2 ? 0 : 11 - (sum % 11);\n if (result !== parseInt(digits.charAt(1))) return false;\n\n return true;\n};\n\nexport const emailIsValid = (email = '') => {\n if (!email) return false;\n\n const isValid = email\n .toLowerCase()\n .match(\n /^(([^<>()[\\]\\\\.,;:\\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,}))$/,\n );\n\n return !!isValid;\n};\n\nexport const validatePassword = (\n password = '',\n passwordSize = [8, 20],\n numberChar = false,\n specialCharacter = false,\n upperCaseChar = false,\n) => {\n const isLengthValid =\n password.length >= passwordSize[0] && password.length <= passwordSize[1];\n const hasUpperCaseChar = !upperCaseChar || /[A-Z]/.test(password);\n const hasSpecialCharacter =\n !specialCharacter || /[!@#$%^&*(),.?\":{}|<>]/.test(password);\n const hasNumberChar = !numberChar || /\\d/.test(password);\n\n return {\n isLengthValid,\n hasUpperCaseChar,\n hasSpecialCharacter,\n hasNumberChar,\n };\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zydon/common",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.44",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
},
|
|
67
67
|
"./styles.css": "./dist/index.css"
|
|
68
68
|
},
|
|
69
|
+
"sideEffects": false,
|
|
69
70
|
"devDependencies": {
|
|
70
71
|
"@emotion/react": "^11.13.3",
|
|
71
72
|
"@emotion/styled": "^11.13.0",
|
package/dist/chunk-2MVQI7NJ.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { a } from './chunk-ZDHXW74M.js';
|
|
2
|
-
import p from '@mui/material/Stack';
|
|
3
|
-
import i from '@mui/material/Typography';
|
|
4
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
|
-
|
|
6
|
-
var n=({text:r,sx:e})=>jsxs(p,{alignItems:"center",justifyContent:"center",gap:3.75,sx:{textAlign:"center",height:1,backgroundColor:"#fff",padding:2,borderRadius:2,"& svg":{width:"100%"},...e},children:[jsx(a,{}),jsx(i,{variant:"body1",sx:{color:"text.secondary"},children:r})]}),f=n;
|
|
7
|
-
|
|
8
|
-
export { f as a };
|
package/dist/chunk-2MW433JI.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { e } from './chunk-ANAHA3L6.js';
|
|
2
|
-
import { i, o } from './chunk-D27ND54J.js';
|
|
3
|
-
import { a } from './chunk-PPUFQMAW.js';
|
|
4
|
-
import B from '@mui/material/Box';
|
|
5
|
-
import J from '@mui/material/Paper';
|
|
6
|
-
import Q from '@mui/material/Typography';
|
|
7
|
-
import P from '@mui/material/ButtonBase';
|
|
8
|
-
import M from '@mui/material/IconButton';
|
|
9
|
-
import { styled, alpha, useTheme } from '@mui/material/styles';
|
|
10
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
11
|
-
import v from '@mui/material/Stack';
|
|
12
|
-
import $ from '@mui/material/Tooltip';
|
|
13
|
-
import ee from '@mui/material/CircularProgress';
|
|
14
|
-
|
|
15
|
-
function k({sx:t,...e}){let o$1=useTheme();return jsx(P,{sx:{p:0,top:0,right:0,width:1,height:1,zIndex:9,opacity:0,position:"absolute",color:"common.white",borderRadius:"inherit",transition:o$1.transitions.create(["opacity"]),"&:hover":{...o({color:i(o$1.vars.palette.grey["900Channel"],.64)}),opacity:1},...t},...e,children:jsx(a,{icon:"ARROW_DOWN_CICLE",width:24})})}function T({sx:t,...e}){return jsx(M,{size:"small",sx:{p:.35,top:4,right:4,position:"absolute",color:"common.white",bgcolor:o=>i(o.vars.palette.grey["900Channel"],.48),"&:hover":{bgcolor:o=>i(o.vars.palette.grey["900Channel"],.72)},...t},...e,children:jsx(a,{icon:"CLOSE_MARK_BUTTON",width:12})})}var s={root:"mnl__file__thumbnail__root",img:"mnl__file__thumbnail__img",icon:"mnl__file__thumbnail__icon",removeBtn:"mnl__file__thumbnail__remove__button",downloadBtn:"mnl__file__thumbnail__download__button"};var E=["pdf"],z=["txt"],L=["psd"],S=["doc","docx"],N=["xls","xlsx"],W=["zip","rar","iso"],j=["ai","esp"],U=["ppt","pptx"],X=["wav","aif","mp3","aac"],G=["jpg","jpeg","gif","bmp","png","svg","webp"],H=["m4v","avi","mpg","mp4","webm"];function u(t){let e,o=d(t);switch(t.includes(o)){case z.includes(o):e="txt";break;case W.includes(o):e="zip";break;case X.includes(o):e="audio";break;case G.includes(o):e="image";break;case H.includes(o):e="video";break;case S.includes(o):e="word";break;case N.includes(o):e="excel";break;case U.includes(o):e="powerpoint";break;case E.includes(o):e="pdf";break;case L.includes(o):e="photoshop";break;case j.includes(o):e="illustrator";break;case t?.startsWith("http"):e="image";break;default:e=d(t);}return e}function C(t){let e;switch(u(t)){case"folder":e="IC_FOLDER";break;case"txt":e="IC_TXT";break;case"zip":e="IC_ZIP";break;case"audio":e="IC_AUDIO";break;case"video":e="IC_VIDEO";break;case"word":e="IC_WORD";break;case"excel":e="IC_EXCEL";break;case"powerpoint":e="IC_POWER_POINT";break;case"pdf":e="IC_PDF";break;case"photoshop":e="IC_PTS";break;case"illustrator":e="IC_AI";break;case"image":e="IC_IMG";break;default:e="IC_FILE";}return e}function d(t){return t&&t.split(".").pop()||""}function V(t){return t.split("/").pop()}function l(t){return typeof t=="string"?{key:t,preview:t,name:V(t),type:d(t),size:void 0,path:t,lastModified:void 0,lastModifiedDate:void 0}:{key:`key:${t.name}`,name:t.name,size:t.size,path:t.path,type:t.type,preview:t.preview,lastModified:t.lastModified,lastModifiedDate:t.lastModifiedDate}}function ge({sx:t,file:e,tooltip:o,onRemove:i,imageView:m,slotProps:r,onDownload:b,...w}){let _=typeof e=="string"?e:URL.createObjectURL(e),{name:O,path:R}=l(e),g=u(R||_),F=jsx(B,{component:"img",src:_,className:s.img,sx:{width:1,height:1,objectFit:"cover",borderRadius:"inherit",...r?.img}}),A=jsx(a,{icon:C(g),sx:{width:32,height:32,flexShrink:0,...t}}),x=jsxs(v,{component:"span",className:s.root,sx:{width:36,height:36,flexShrink:0,borderRadius:1.25,alignItems:"center",position:"relative",display:"inline-flex",justifyContent:"center",...t},...w,children:[g==="image"&&m?F:A,i&&jsx(T,{onClick:i,className:s.removeBtn,sx:r?.removeBtn}),b&&jsx(k,{onClick:b,className:s.downloadBtn,sx:r?.downloadBtn})]});return o?jsx($,{arrow:!0,title:O,slotProps:{popper:{modifiers:[{name:"offset",options:{offset:[0,-12]}}]}},children:x}):x}function Ae({files:t}){return t.length?jsx(J,{variant:"outlined",sx:{py:1,px:2,mt:3,textAlign:"left",borderStyle:"dashed",borderColor:"error.main",bgcolor:e=>i(e.vars.palette.error.mainChannel,.08)},children:t.map(({file:e$1,errors:o})=>{let{path:i,size:m}=l(e$1);return jsxs(B,{sx:{my:1},children:[jsxs(Q,{variant:"subtitle2",noWrap:!0,children:[i," - ",m?e(m):""]}),o.map(r=>jsxs(B,{component:"span",sx:{typography:"caption"},children:["- ",r.message]},r.code))]},i)})}):null}var Le=styled(v)({position:"relative",width:"100%",borderRadius:8,overflow:"hidden","&:hover .actions":{display:"flex"}}),Se=styled(v)(({theme:t})=>({display:"none",position:"absolute",alignItems:"center",justifyContent:"center",flexDirection:"row",gap:12,width:"100%",height:"100%",backgroundColor:alpha(t.palette.primary.main,.9),zIndex:999,button:{"&, &:hover, &:focus":{backgroundColor:"#fff"}}})),Ne=styled(ee)({position:"absolute",width:"100%",height:"100%",zIndex:99,backgroundColor:"#fff",borderRadius:"50%"});
|
|
16
|
-
|
|
17
|
-
export { l as a, ge as b, Ae as c, Le as d, Se as e, Ne as f };
|
package/dist/chunk-2Z4AFXGP.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { a } from './chunk-PPUFQMAW.js';
|
|
2
|
-
import { useRef } from 'react';
|
|
3
|
-
import A from '@mui/material/IconButton';
|
|
4
|
-
import c from '@mui/material/InputAdornment';
|
|
5
|
-
import h from '@mui/material/TextField';
|
|
6
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
-
|
|
8
|
-
var g=({onSearch:n,onChange:p,trigger:l="click",iconPosition:r="end",tabIndex:d,InputProps:e,iconButtonAriaLabel:I="Buscar",...i})=>{let o=useRef(null),m=jsx(A,{color:"inherit",onClick:()=>{n(o.current?.value);},"aria-label":I,children:jsx(a,{icon:"SEARCH_MAGNIFYING_GLASS",width:20,height:20})});return jsx(h,{inputRef:o,InputProps:{...e,onKeyDown:t=>{t.key==="Enter"&&n(o.current?.value);},...r==="start"?{startAdornment:jsxs(c,{position:r,children:[m,e?.startAdornment]})}:{endAdornment:jsxs(c,{position:r,children:[m,e?.endAdornment]})}},inputProps:{tabIndex:d,...i.inputProps},onChange:t=>{if(l==="change"){n(t.target.value);return}t.target.value===""&&n(""),p&&p(t);},...i})},G=g;
|
|
9
|
-
|
|
10
|
-
export { G as a };
|
package/dist/chunk-3APKMSVD.js
DELETED
package/dist/chunk-3E5A45HM.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
var _=(E=>(E.CHECK_CIRCLE="CHECK_CIRCLE",E.USER_MULTIPLY="USER_MULTIPLY",E.LIST_BULLET_LEFT_TO_RIGHT="LIST_BULLET_LEFT_TO_RIGHT",E.USER_QUESTION_MARK="USER_QUESTION_MARK",E.HOME_START="HOME_START",E.SORTING_ASC="SORTING_ASC",E.SORTING_DESC="SORTING_DESC",E.REPEATE_ONE_02="REPEATE_ONE_02",E.SORTING_1_9="SORTING_1_9",E.SORTING_9_1="SORTING_9_1",E.BLOCKCHAIN="BLOCKCHAIN",E.CHART_LINE="CHART_LINE",E.COLUMN_CHART="COLUMN_CHART",E.ARROW_LEFT_RIGHT="ARROW_LEFT_RIGHT",E.MINUS_CIRCLE="MINUS_CIRCLE",E.SUBNODE_ADD="SUBNODE_ADD",E.CLEAN="CLEAN",E.BANK="BANK",E.ADD_CIRCLE="ADD_CIRCLE",E.EDIT_FILE="EDIT_FILE",E.DIRECTIONS="DIRECTIONS",E.DOLLAR_MONEY_CIPHER="DOLLAR_MONEY_CIPHER",E.CIRCLE_ARROW_UP_RIGHT="CIRCLE_ARROW_UP_RIGHT",E.CIRCLE_ARROW_DOWN_LEFT="CIRCLE_ARROW_DOWN_LEFT",E.MONEY_BAG_02="MONEY_BAG_02",E.MONEY_SECURITY="MONEY_SECURITY",E.DOLLAR_RECEIVE_01="DOLLAR_RECEIVE_01",E.PAYMENT_01="PAYMENT_01",E.TAXES="TAXES",E.CART_SHOPPING="CART_SHOPPING",E.SHOPPING_CART_ADD="SHOPPING_CART_ADD",E.SHOPPING_CART_CHECK_IN="SHOPPING_CART_CHECK_IN",E.SIMPLE_CHECK="SIMPLE_CHECK",E.REVERSE_WITHDRAWAL_01="REVERSE_WITHDRAWAL_01",E.ACCOUNT_SETTING_03="ACCOUNT_SETTING_03",E.SIMPLE_ADD="SIMPLE_ADD",E.CHECK_MARK_BADGE="CHECK_MARK_BADGE",E.SAVE_MARK="SAVE_MARK",E.SETTINGS="SETTINGS",E.PENCIL_EDIT="PENCIL_EDIT",E.DELETE_MARK_BUTTON_02="DELETE_MARK_BUTTON_02",E.SHARE_BUTTON_MARK="SHARE_BUTTON_MARK",E.CHEVRON_LEFT="CHEVRON_LEFT",E.CHEVRON_RIGHT="CHEVRON_RIGHT",E.SQUARE_FILL="SQUARE_FILL",E.CLOSE_MARK_BUTTON="CLOSE_MARK_BUTTON",E.ARROW_DOWN_CICLE="ARROW_DOWN_CICLE",E.HELP_CIRCLE="HELP_CIRCLE",E.VIEW_OFF="VIEW_OFF",E.VIEW_ON="VIEW_ON",E.INTERNET="INTERNET",E.DELETE_BUTTON_MARK="DELETE_BUTTON_MARK",E.SEARCH_IMAGE="SEARCH_IMAGE",E.MINUS_SIGN="MINUS_SIGN",E.WARNING_TRIANGULE="WARNING_TRIANGULE",E.WARNING_TRIANGLE="WARNING_TRIANGLE",E.WARNING_TRIANGLE_SOLID="WARNING_TRIANGLE_SOLID",E.SEARCH_MAGNIFYING_GLASS="SEARCH_MAGNIFYING_GLASS",E.ADD_IMAGE="ADD_IMAGE",E.CLOUD_UPLOAD="CLOUD_UPLOAD",E.INFO_CIRCLE="INFO_CIRCLE",E.COPY_CONTENT="COPY_CONTENT",E.MESSAGE_QUESTION="MESSAGE_QUESTION",E.COMPUTER_PROGRAMMING_02="COMPUTER_PROGRAMMING_02",E.ALERT_CIRCLE="ALERT_CIRCLE",E.WALLET="WALLET",E.TASK_ADD_01="TASK_ADD_01",E.PACKAGE="PACKAGE",E.PAINT_BOARD="PAINT_BOARD",E.CREATIVE_MARKET="CREATIVE_MARKET",E.RULER="RULER",E.ARROW_DOWN_SIMPLE="ARROW_DOWN_SIMPLE",E.ARROW_UP_SIMPLE="ARROW_UP_SIMPLE",E.ARROW_RIGHT_SIMPLE="ARROW_RIGHT_SIMPLE",E.ARROW_LEFT_SIMPLE="ARROW_LEFT_SIMPLE",E.DRAG_DROP_VERTICAL="DRAG_DROP_VERTICAL",E.COMPUTER="COMPUTER",E.SMART_PHONE_01="SMART_PHONE_01",E.PLAY_SIMPLE="PLAY_SIMPLE",E.CHEVRON_UP="CHEVRON_UP",E.TEXT_FIELDS_SMALL_CAPS="TEXT_FIELDS_SMALL_CAPS",E.LICENSE_ARTICLE="LICENSE_ARTICLE",E.CALENDAR_MINUS_02="CALENDAR_MINUS_02",E.LAYOUT_TABLE_02="LAYOUT_TABLE_02",E.PERCENT_CIRCLE="PERCENT_CIRCLE",E.PERCENT="PERCENT",E.CAROUSEL_HORIZONTAL="CAROUSEL_HORIZONTAL",E.BUBBLE_CHAT_QUESTION="BUBBLE_CHAT_QUESTION",E.USER_LIST="USER_LIST",E.USER_GROUP="USER_GROUP",E.USER_ACCOUNT="USER_ACCOUNT",E.HOME_START_04="HOME_START_04",E.MENU_01="MENU_01",E.MENU_07="MENU_07",E.CALENDAR_TODAY="CALENDAR_TODAY",E.SELECT_HOUR_CLOCK="SELECT_HOUR_CLOCK",E.COUNTER_CLOCK="COUNTER_CLOCK",E.SQUARE_LOCK_01="SQUARE_LOCK_01",E.TOGGLE_OFF="TOGGLE_OFF",E.TOGGLE_ON="TOGGLE_ON",E.TEXT_NUMBER_SIGN="TEXT_NUMBER_SIGN",E.INTERVAL_DATE="INTERVAL_DATE",E.LOCATION_SIMPLE_01="LOCATION_SIMPLE_01",E.USER_REQUEST_ACCESS="USER_REQUEST_ACCESS",E.FILTER_HORIZONTAL="FILTER_HORIZONTAL",E.EARTH_PUBLIC="EARTH_PUBLIC",E.FILTER_SIMPLE="FILTER_SIMPLE",E.CALCULATE_SIGNS="CALCULATE_SIGNS",E.LINK_HORIZONTAL="LINK_HORIZONTAL",E.ARROW_UP_DOWN="ARROW_UP_DOWN",E.ARROW_UP_02="ARROW_UP_02",E.PRINTER="PRINTER",E.DASHBOARD_WEB_01="DASHBOARD_WEB_01",E.CURSOR_IN_WINDOW="CURSOR_IN_WINDOW",E.FILTER_VERTICAL="FILTER_VERTICAL",E.WHATSAPP="WHATSAPP",E.MORE_OPTIONS_VERTICAL="MORE_OPTIONS_VERTICAL",E.FOLDER_01="FOLDER_01",E.ARROW_DOWN_02="ARROW_DOWN_02",E.DATABASE_SYMBOL="DATABASE_SYMBOL",E.RELOAD_REFRESH="RELOAD_REFRESH",E.LAYOUT_05="LAYOUT_05",E.LAYOUT_07="LAYOUT_07",E.DOWNLOAD_EXPORT_04="DOWNLOAD_EXPORT_04",E.REFRESH_CHANGE="REFRESH_CHANGE",E.PROFILE="PROFILE",E.HAND_BAG_BRIEFCASE="HAND_BAG_BRIEFCASE",E.SHOPPING_BASKET_ADD="SHOPPING_BASKET_ADD",E.SHOPPING_BASKET_03="SHOPPING_BASKET_03",E.SHARE_ANOTHER_MEANS="SHARE_ANOTHER_MEANS",E.CREDIT_CARD_INCLINED="CREDIT_CARD_INCLINED",E.OFFICE="OFFICE",E.CREDIT_CARD="CREDIT_CARD",E.CORPORATE="CORPORATE",E.MAIL="MAIL",E.ADD_USER_02="ADD_USER_02",E.DOLLAR_CIRCLE="DOLLAR_CIRCLE",E.CANCEL_CIRCLE="CANCEL_CIRCLE",E.CANCEL_CIRCLE_HALF_DOT="CANCEL_CIRCLE_HALF_DOT",E.SALE_TAG_02="SALE_TAG_02",E.SHOPPING_CART_REMOVE="SHOPPING_CART_REMOVE",E.ARROW_BACK="ARROW_BACK",E.MAIL_SEND_01="MAIL_SEND_01",E.DATABASE="DATABASE",E.TEXT_UNDERLINE="TEXT_UNDERLINE",E.ARROW_RELOAD_HORIZONTAL="ARROW_RELOAD_HORIZONTAL",E.DATABASE_SYNC="DATABASE_SYNC",E.EXPAND_FULL_SCREEN="EXPAND_FULL_SCREEN",E.PLAY_EXECUTE="PLAY_EXECUTE",E.SUMMATION="SUMMATION",E.TEXT_FORMAT="TEXT_FORMAT",E.LAYERS="LAYERS",E.SQL="SQL",E.LOGOUT_02="LOGOUT_02",E.AI_INNOVATION_02="AI_INNOVATION_02",E.SHOPPING_CART_02="SHOPPING_CART_02",E.XML_FILE_01="XML_FILE_01",E.INVOICE_01="INVOICE_01",E.INVOICE_02="INVOICE_02",E.INVOICE="INVOICE",E.USER="USER",E.USER_REMOVE_01="USER_REMOVE_01",E.TRUCK_DELIVERY="TRUCK_DELIVERY",E.OPEN_IN_NEW_TAB="OPEN_IN_NEW_TAB",E.NUMBER_ONE_OUTLINE="NUMBER_ONE_OUTLINE",E.DECIMAL_INCREASE="DECIMAL_INCREASE",E.FILE="FILE",E.DATE_TIME="DATE_TIME",E.TEXT="TEXT",E.TEXT_CREATION="TEXT_CREATION",E.RADIO_BUTTON_CHECKED="RADIO_BUTTON_CHECKED",E.CHECK_BOX="CHECK_BOX",E.DECIMAL="DECIMAL",E.CALENDAR_CLOCK="CALENDAR_CLOCK",E.INTEGER_NUMBER="INTEGER_NUMBER",E.LOW_PRIORITY="LOW_PRIORITY",E.FILTER_LIST="FILTER_LIST",E.CURRENCY_EXCHANGE="CURRENCY_EXCHANGE",E.CURRENCY_EXCHANGE_03="CURRENCY_EXCHANGE_03",E.ACCOUNT_BOX="ACCOUNT_BOX",E.FOLDER_OPEN="FOLDER_OPEN",E.HOURS_FILL="HOURS_FILL",E.FORM_SELECT="FORM_SELECT",E.ARROW_GO_BACK="ARROW_GO_BACK",E.ARROW_GO_FORWARD="ARROW_GO_FORWARD",E.VIEW_COLUMN="VIEW_COLUMN",E.BAR="BAR",E.COMPARE_ARROWS="COMPARE_ARROWS",E.DOT="DOT",E.HTML="HTML",E.DROPDOWN="DROPDOWN",E.ZOOM_IN="ZOOM_IN",E.ZOOM_OUT="ZOOM_OUT",E.PAUSE="PAUSE",E.MAXIMIZE_SCREEN="MAXIMIZE_SCREEN",E.MINIMIZE_SCREEN="MINIMIZE_SCREEN",E.JSON="JSON",E.SOURCE_CODE="SOURCE_CODE",E.BOX="BOX",E.GOOGLE="GOOGLE",E.DATABASE_BACKUP="DATABASE_BACKUP",E.PROPERTY_DELETE="PROPERTY_DELETE",E.DELIVERY_BOX="DELIVERY_BOX",E.DELIVERY_RETURN_01="DELIVERY_RETURN_01",E.DOCUMENT_CODE="DOCUMENT_CODE",E.ANALYTICS_UP="ANALYTICS_UP",E.ARROW_TURN_BACKWARD="ARROW_TURN_BACKWARD",E.ARROW_TURN_FORWARD="ARROW_TURN_FORWARD",E.COLUMN_INSERT="COLUMN_INSERT",E.USER_SWITCH="USER_SWITCH",E.ARTIFICIAL_INTELLIGENCE_04="ARTIFICIAL_INTELLIGENCE_04",E.FLOW_SQUARE="FLOW_SQUARE",E.FLOW_CHART_02="FLOW_CHART_02",E.HOT_PRICE="HOT_PRICE",E.TROLLEY="TROLLEY",E.STAR="STAR",E.STAR_02="STAR_02",E.BAR_CODE="BAR_CODE",E.PIX="PIX",E.TRADE_UP="TRADE_UP",E.TRADE_DOWN="TRADE_DOWN",E.HOURGLASS="HOURGLASS",E.USER_SQUARE="USER_SQUARE",E.ALIGN_BOX_MIDDLE_CENTER="ALIGN_BOX_MIDDLE_CENTER",E.ALIGN_BOX_MIDDLE_LEFT="ALIGN_BOX_MIDDLE_LEFT",E.WHATSAPP_ICON="WHATSAPP_ICON",E.PDF_ICON="PDF_ICON",E.FACTORY_02="FACTORY_02",E.DISTRIBUTION="DISTRIBUTION",E.MORE="MORE",E.BONE="BONE",E.BLENDER="BLENDER",E.VEGETARIAN_FOOD="VEGETARIAN_FOOD",E.AUTOMOTIVE_BATTERY_01="AUTOMOTIVE_BATTERY_01",E.LAPTOP="LAPTOP",E.NECKLACE="NECKLACE",E.VYNIL_02="VYNIL_02",E.GAMEBOY="GAMEBOY",E.BLUSH_BRUSH_01="BLUSH_BRUSH_01",E.RUNNING_SHOES="RUNNING_SHOES",E.WRENCH_01="WRENCH_01",E.BABY_BOY_DRESS="BABY_BOY_DRESS",E.MEDICINE_02="MEDICINE_02",E.CRANE="CRANE",E.WARDROBE_04="WARDROBE_04",E.PERFUME="PERFUME",E.LAMP_04="LAMP_04",E.STATIONERY="STATIONERY",E.SLIDERS_HORIZONTAL="SLIDERS_HORIZONTAL",E.SHIPPING_LOADING="SHIPPING_LOADING",E.LOCATION_05="LOCATION_05",E.ARROW_HORIZONTAL="ARROW_HORIZONTAL",E.ARROW_RIGHT="ARROW_RIGHT",E.DISCOUNT_TAG_01="DISCOUNT_TAG_01",E.CIRCLE="CIRCLE",E.PREFERENCE_HORIZONTAL="PREFERENCE_HORIZONTAL",E.FAVOURITE="FAVOURITE",E.FAVOURITE_ROUNDED="FAVOURITE_ROUNDED",E.BANNER="BANNER",E.MINI_BANNER="MINI_BANNER",E.PRODUCTS="PRODUCTS",E.ORDERS="ORDERS",E.CARDS="CARDS",E.PASSPORT_EXPIRED="PASSPORT_EXPIRED",E.PASSPORT_VALID="PASSPORT_VALID",E.FILE_02="FILE_02",E.SEND_FILE="SEND_FILE",E.CHECKED_FILE="CHECKED_FILE",E.ADD_FILE="ADD_FILE",E.SHARE_FILE="SHARE_FILE",E.ANNEXED_FILE="ANNEXED_FILE",E.SEARCH_FILE="SEARCH_FILE",E.BUILDING="BUILDING",E.AI_07="AI_07",E.ATTACHMENT="ATTACHMENT",E.FILE_PDF="FILE_PDF",E.FILE_XML="FILE_XML",E.NOTIFICATION="NOTIFICATION",E.DISCOUNT_01="DISCOUNT_01",E.MORE_BOLD="MORE_BOLD",E.MORE_GRID="MORE_GRID",E.QR_CODE="QR_CODE",E.MAGIC_AI="MAGIC_AI",E.CHATTING="CHATTING",E.SEARCH_VISUAL="SEARCH_VISUAL",E.GOOGLE_SHEET="GOOGLE_SHEET",E.SENT="SENT",E.DASHBOARD_SQUARE_02="DASHBOARD_SQUARE_02",E.PLUG_SOCKET="PLUG_SOCKET",E.PUZZLE_STROKE_ROUNDED_01="PUZZLE_STROKE_ROUNDED_01",E.COMPUTER_SETTINGS_STROKE_ROUNDED_O1="COMPUTER_SETTINGS_STROKE_ROUNDED_O1",E.CHART_RELATIONSHIP_STROKE_ROUNDED_01="CHART_RELATIONSHIP_STROKE_ROUNDED_01",E.MENTORING="MENTORING",E.PROMOTION="PROMOTION",E.MESSAGE_MULTIPLE="MESSAGE_MULTIPLE",E.ARROW_SHRINK="ARROW_SHRINK",E.DASHBOARD_SQUARE_01="DASHBOARD_SQUARE_01",E.GRID_VIEW="GRID_VIEW",E.CREDIT_CARD_ADD="CREDIT_CARD_ADD",E.TABLE="TABLE",E.PACKAGE_ADD="PACKAGE_ADD",E.PLAY_CIRCLE="PLAY_CIRCLE",E.MIC_01="MIC_01",E.COINS_DOLLAR="COINS_DOLLAR",E.STORE_02="STORE_02",E.STORE_REMOVE_02="STORE_REMOVE_02",E.HEADSET="HEADSET",E.MANAGER="MANAGER",E.COMPUTER_DOLLAR="COMPUTER_DOLLAR",E.IC_AI="IC_AI",E.IC_AUDIO="IC_AUDIO",E.IC_DOCUMENT="IC_DOCUMENT",E.IC_EXCEL="IC_EXCEL",E.IC_FILE="IC_FILE",E.IC_FOLDER="IC_FOLDER",E.IC_IMG="IC_IMG",E.IC_JS="IC_JS",E.IC_PDF="IC_PDF",E.IC_POWER_POINT="IC_POWER_POINT",E.IC_PTS="IC_PTS",E.IC_TXT="IC_TXT",E.IC_VIDEO="IC_VIDEO",E.IC_WORD="IC_WORD",E.IC_ZIP="IC_ZIP",E))(_||{});
|
|
2
|
-
|
|
3
|
-
export { _ as a };
|