@zydon/common 2.2.47 → 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.d.ts +2 -2
- 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.d.ts +91 -91
- 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.d.ts +1 -1
- package/dist/hooks/useDatagrid.js +7 -43
- 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.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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/PopoverSelect/index.tsx"],"sourcesContent":["import MenuItem from '@mui/material/MenuItem';\n\nimport MenuPopover from 'components/MenuPopover';\nimport { PopoverSelectProps } from 'components/PopoverSelect/props';\nimport {\n StyledBox,\n StyledButton,\n StyledIcon,\n} from 'components/PopoverSelect/styles';\nimport usePopover from 'hooks/usePopover';\n\nconst PopoverSelect = ({\n selectedTitle,\n onSelect,\n options,\n}: PopoverSelectProps) => {\n const popover = usePopover();\n\n return (\n <>\n <StyledButton\n disableRipple\n color=\"inherit\"\n onClick={popover.onOpen}\n endIcon={\n <StyledIcon\n icon={popover.open ? 'CHEVRON_UP' : 'ARROW_DOWN_SIMPLE'}\n />\n }\n >\n <StyledBox component=\"span\">{selectedTitle.label}</StyledBox>\n </StyledButton>\n\n <MenuPopover open={popover.open} onClose={popover.onClose}>\n {options.map(option => (\n <MenuItem\n key={option.value}\n selected={option.value === selectedTitle.value}\n onClick={() => {\n popover.onClose();\n onSelect(option.value);\n }}\n >\n {option.label}\n </MenuItem>\n ))}\n </MenuPopover>\n </>\n );\n};\n\nexport default PopoverSelect;\n"
|
|
1
|
+
{"version":3,"sources":["../../../src/components/PopoverSelect/index.tsx","../../../src/components/PopoverSelect/styles.ts"],"names":["MenuItem","Box","Button","styled","StyledBox","StyledButton","StyledIcon","Icon_default","theme","Fragment","jsx","jsxs","PopoverSelect","selectedTitle","onSelect","options","popover","usePopover_default","MenuPopover_default","option","PopoverSelect_default"],"mappings":"oKAAA,OAAOA,MAAc,yBCArB,OAAOC,MAAS,oBAChB,OAAOC,MAAY,uBACnB,OAAS,UAAAC,MAAc,uBAIhB,IAAMC,EAAYD,EAAOF,CAAG,EAAE,KAAO,CAC1C,WAAY,MACZ,WAAY,gBACd,EAAE,EAEWI,EAAeF,EAAOD,CAAM,EAAE,KAAO,CAChD,WAAY,oBACd,EAAE,EAEWI,EAAaH,EAAOI,CAAI,EAAE,CAAC,CAAE,MAAAC,CAAM,KAAO,CACrD,MAAOA,EAAM,QAAQ,QAAQ,IAC/B,EAAE,EDEE,mBAAAC,EAMM,OAAAC,EANN,QAAAC,MAAA,oBARJ,IAAMC,EAAgB,CAAC,CACrB,cAAAC,EACA,SAAAC,EACA,QAAAC,CACF,IAA0B,CACxB,IAAMC,EAAUC,EAAW,EAE3B,OACEN,EAAAF,EAAA,CACE,UAAAC,EAACL,EAAA,CACC,cAAa,GACb,MAAM,UACN,QAASW,EAAQ,OACjB,QACEN,EAACJ,EAAA,CACC,KAAMU,EAAQ,KAAO,aAAe,oBACtC,EAGF,SAAAN,EAACN,EAAA,CAAU,UAAU,OAAQ,SAAAS,EAAc,MAAM,EACnD,EAEAH,EAACQ,EAAA,CAAY,KAAMF,EAAQ,KAAM,QAASA,EAAQ,QAC/C,SAAAD,EAAQ,IAAII,GACXT,EAACV,EAAA,CAEC,SAAUmB,EAAO,QAAUN,EAAc,MACzC,QAAS,IAAM,CACbG,EAAQ,QAAQ,EAChBF,EAASK,EAAO,KAAK,CACvB,EAEC,SAAAA,EAAO,OAPHA,EAAO,KAQd,CACD,EACH,GACF,CAEJ,EAEOC,EAAQR","sourcesContent":["import MenuItem from '@mui/material/MenuItem';\n\nimport MenuPopover from 'components/MenuPopover';\nimport { PopoverSelectProps } from 'components/PopoverSelect/props';\nimport {\n StyledBox,\n StyledButton,\n StyledIcon,\n} from 'components/PopoverSelect/styles';\nimport usePopover from 'hooks/usePopover';\n\nconst PopoverSelect = ({\n selectedTitle,\n onSelect,\n options,\n}: PopoverSelectProps) => {\n const popover = usePopover();\n\n return (\n <>\n <StyledButton\n disableRipple\n color=\"inherit\"\n onClick={popover.onOpen}\n endIcon={\n <StyledIcon\n icon={popover.open ? 'CHEVRON_UP' : 'ARROW_DOWN_SIMPLE'}\n />\n }\n >\n <StyledBox component=\"span\">{selectedTitle.label}</StyledBox>\n </StyledButton>\n\n <MenuPopover open={popover.open} onClose={popover.onClose}>\n {options.map(option => (\n <MenuItem\n key={option.value}\n selected={option.value === selectedTitle.value}\n onClick={() => {\n popover.onClose();\n onSelect(option.value);\n }}\n >\n {option.label}\n </MenuItem>\n ))}\n </MenuPopover>\n </>\n );\n};\n\nexport default PopoverSelect;\n","import Box from '@mui/material/Box';\nimport Button from '@mui/material/Button';\nimport { styled } from '@mui/material/styles';\n\nimport Icon from 'components/Icon';\n\nexport const StyledBox = styled(Box)(() => ({\n marginLeft: '4px',\n fontWeight: 'fontWeightBold',\n}));\n\nexport const StyledButton = styled(Button)(() => ({\n fontWeight: 'fontWeightSemiBold',\n}));\n\nexport const StyledIcon = styled(Icon)(({ theme }) => ({\n color: theme.palette.primary.main,\n}));\n"]}
|
|
@@ -1,28 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const Portal = ({
|
|
4
|
-
children,
|
|
5
|
-
container,
|
|
6
|
-
waitBeforeShow = 50
|
|
7
|
-
}) => {
|
|
8
|
-
const [isShown, setIsShown] = useState(false);
|
|
9
|
-
useEffect(() => {
|
|
10
|
-
const timer = setTimeout(() => setIsShown(true), waitBeforeShow);
|
|
11
|
-
return () => clearTimeout(timer);
|
|
12
|
-
}, [waitBeforeShow]);
|
|
13
|
-
if (!waitBeforeShow) {
|
|
14
|
-
return createPortal(
|
|
15
|
-
children,
|
|
16
|
-
document.getElementById(container) || document.body
|
|
17
|
-
);
|
|
18
|
-
}
|
|
19
|
-
return isShown ? createPortal(
|
|
20
|
-
children,
|
|
21
|
-
document.getElementById(container) || document.body
|
|
22
|
-
) : null;
|
|
23
|
-
};
|
|
24
|
-
var Portal_default = Portal;
|
|
25
|
-
export {
|
|
26
|
-
Portal_default as default
|
|
27
|
-
};
|
|
1
|
+
export { a as default } from '../../chunk-IN7SP2ND.js';
|
|
2
|
+
//# sourceMappingURL=out.js.map
|
|
28
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -1,28 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
isFetching,
|
|
4
|
-
fetching,
|
|
5
|
-
isLoading,
|
|
6
|
-
loading,
|
|
7
|
-
anError,
|
|
8
|
-
error,
|
|
9
|
-
isEmpty,
|
|
10
|
-
empty,
|
|
11
|
-
children
|
|
12
|
-
}) => {
|
|
13
|
-
if (isLoading)
|
|
14
|
-
return loading || "Carregando...";
|
|
15
|
-
if (anError)
|
|
16
|
-
return error || "Error";
|
|
17
|
-
if (isEmpty)
|
|
18
|
-
return empty || "Nenhum resultado";
|
|
19
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
20
|
-
isFetching && /* @__PURE__ */ jsx(Fragment, { children: fetching || "Carregando..." }),
|
|
21
|
-
children
|
|
22
|
-
] });
|
|
23
|
-
};
|
|
24
|
-
var Result_default = Result;
|
|
25
|
-
export {
|
|
26
|
-
Result_default as default
|
|
27
|
-
};
|
|
1
|
+
export { a as default } from '../../chunk-KNQKOMWB.js';
|
|
2
|
+
//# sourceMappingURL=out.js.map
|
|
28
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -1,42 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
component: "span",
|
|
10
|
-
fontWeight: 600,
|
|
11
|
-
color: "text.primary",
|
|
12
|
-
children
|
|
13
|
-
}
|
|
14
|
-
);
|
|
15
|
-
};
|
|
16
|
-
const SavedChanges = ({ updatedAt }) => {
|
|
17
|
-
const today = /* @__PURE__ */ new Date();
|
|
18
|
-
const date = new Date(updatedAt);
|
|
19
|
-
const isToday = date.getDate() === today.getDate() && date.getMonth() === today.getMonth() && date.getFullYear() === today.getFullYear();
|
|
20
|
-
const lastSavedHour = fDate(date, "HH:mm");
|
|
21
|
-
if (isToday) {
|
|
22
|
-
return /* @__PURE__ */ jsxs(Typography, { variant: "body2", color: "text.disabled", children: [
|
|
23
|
-
"Altera\xE7\xF5es salvas ",
|
|
24
|
-
/* @__PURE__ */ jsx(HighlightText, { children: "Hoje" }),
|
|
25
|
-
" \xE0s",
|
|
26
|
-
" ",
|
|
27
|
-
/* @__PURE__ */ jsx(HighlightText, { children: lastSavedHour })
|
|
28
|
-
] });
|
|
29
|
-
}
|
|
30
|
-
return /* @__PURE__ */ jsxs(Typography, { variant: "body2", color: "text.disabled", children: [
|
|
31
|
-
"Altera\xE7\xF5es salvas em ",
|
|
32
|
-
/* @__PURE__ */ jsx(HighlightText, { children: fDate(date) }),
|
|
33
|
-
" \xE0s",
|
|
34
|
-
" ",
|
|
35
|
-
/* @__PURE__ */ jsx(HighlightText, { children: lastSavedHour })
|
|
36
|
-
] });
|
|
37
|
-
};
|
|
38
|
-
var SavedChanges_default = SavedChanges;
|
|
39
|
-
export {
|
|
40
|
-
SavedChanges_default as default
|
|
41
|
-
};
|
|
1
|
+
import { d } from '../../chunk-N7IK5EUP.js';
|
|
2
|
+
import s from '@mui/material/Typography';
|
|
3
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var o=({children:a})=>jsx(s,{variant:"body2",component:"span",fontWeight:600,color:"text.primary",children:a}),l=({updatedAt:a})=>{let r=new Date,t=new Date(a),n=t.getDate()===r.getDate()&&t.getMonth()===r.getMonth()&&t.getFullYear()===r.getFullYear(),g=d(t,"HH:mm");return n?jsxs(s,{variant:"body2",color:"text.disabled",children:["Altera\xE7\xF5es salvas ",jsx(o,{children:"Hoje"})," \xE0s"," ",jsx(o,{children:g})]}):jsxs(s,{variant:"body2",color:"text.disabled",children:["Altera\xE7\xF5es salvas em ",jsx(o,{children:d(t)})," \xE0s"," ",jsx(o,{children:g})]})},y=l;
|
|
6
|
+
|
|
7
|
+
export { y as default };
|
|
8
|
+
//# sourceMappingURL=out.js.map
|
|
42
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/SavedChanges/index.tsx"],"sourcesContent":["import { PropsWithChildren } from 'react';\nimport Typography from '@mui/material/Typography';\n\nimport { fDate } from 'utils/formatTime';\n\nimport { SavedChangesProps } from './props';\n\nconst HighlightText = ({ children }: PropsWithChildren) => {\n return (\n <Typography\n variant=\"body2\"\n component=\"span\"\n fontWeight={600}\n color=\"text.primary\"\n >\n {children}\n </Typography>\n );\n};\n\nconst SavedChanges = ({ updatedAt }: SavedChangesProps) => {\n const today = new Date();\n const date = new Date(updatedAt);\n const isToday =\n date.getDate() === today.getDate() &&\n date.getMonth() === today.getMonth() &&\n date.getFullYear() === today.getFullYear();\n const lastSavedHour = fDate(date, 'HH:mm');\n\n if (isToday) {\n return (\n <Typography variant=\"body2\" color=\"text.disabled\">\n Alterações salvas <HighlightText>Hoje</HighlightText> às{' '}\n <HighlightText>{lastSavedHour}</HighlightText>\n </Typography>\n );\n }\n\n return (\n <Typography variant=\"body2\" color=\"text.disabled\">\n Alterações salvas em <HighlightText>{fDate(date)}</HighlightText> às{' '}\n <HighlightText>{lastSavedHour}</HighlightText>\n </Typography>\n );\n};\n\nexport default SavedChanges;\n"]
|
|
1
|
+
{"version":3,"sources":["../../../src/components/SavedChanges/index.tsx"],"names":["Typography","jsx","jsxs","HighlightText","children","SavedChanges","updatedAt","today","date","isToday","lastSavedHour","fDate","SavedChanges_default"],"mappings":"4CACA,OAAOA,MAAgB,2BAQnB,cAAAC,EAsBE,QAAAC,MAtBF,oBAFJ,IAAMC,EAAgB,CAAC,CAAE,SAAAC,CAAS,IAE9BH,EAACD,EAAA,CACC,QAAQ,QACR,UAAU,OACV,WAAY,IACZ,MAAM,eAEL,SAAAI,EACH,EAIEC,EAAe,CAAC,CAAE,UAAAC,CAAU,IAAyB,CACzD,IAAMC,EAAQ,IAAI,KACZC,EAAO,IAAI,KAAKF,CAAS,EACzBG,EACJD,EAAK,QAAQ,IAAMD,EAAM,QAAQ,GACjCC,EAAK,SAAS,IAAMD,EAAM,SAAS,GACnCC,EAAK,YAAY,IAAMD,EAAM,YAAY,EACrCG,EAAgBC,EAAMH,EAAM,OAAO,EAEzC,OAAIC,EAEAP,EAACF,EAAA,CAAW,QAAQ,QAAQ,MAAM,gBAAgB,qCAC9BC,EAACE,EAAA,CAAc,gBAAI,EAAgB,SAAI,IACzDF,EAACE,EAAA,CAAe,SAAAO,EAAc,GAChC,EAKFR,EAACF,EAAA,CAAW,QAAQ,QAAQ,MAAM,gBAAgB,wCAC3BC,EAACE,EAAA,CAAe,SAAAQ,EAAMH,CAAI,EAAE,EAAgB,SAAI,IACrEP,EAACE,EAAA,CAAe,SAAAO,EAAc,GAChC,CAEJ,EAEOE,EAAQP","sourcesContent":["import { PropsWithChildren } from 'react';\nimport Typography from '@mui/material/Typography';\n\nimport { fDate } from 'utils/formatTime';\n\nimport { SavedChangesProps } from './props';\n\nconst HighlightText = ({ children }: PropsWithChildren) => {\n return (\n <Typography\n variant=\"body2\"\n component=\"span\"\n fontWeight={600}\n color=\"text.primary\"\n >\n {children}\n </Typography>\n );\n};\n\nconst SavedChanges = ({ updatedAt }: SavedChangesProps) => {\n const today = new Date();\n const date = new Date(updatedAt);\n const isToday =\n date.getDate() === today.getDate() &&\n date.getMonth() === today.getMonth() &&\n date.getFullYear() === today.getFullYear();\n const lastSavedHour = fDate(date, 'HH:mm');\n\n if (isToday) {\n return (\n <Typography variant=\"body2\" color=\"text.disabled\">\n Alterações salvas <HighlightText>Hoje</HighlightText> às{' '}\n <HighlightText>{lastSavedHour}</HighlightText>\n </Typography>\n );\n }\n\n return (\n <Typography variant=\"body2\" color=\"text.disabled\">\n Alterações salvas em <HighlightText>{fDate(date)}</HighlightText> às{' '}\n <HighlightText>{lastSavedHour}</HighlightText>\n </Typography>\n );\n};\n\nexport default SavedChanges;\n"]}
|
|
@@ -1,45 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import Box from "@mui/material/Box";
|
|
4
|
-
import SimpleBar from "simplebar-react";
|
|
5
|
-
import { scrollbarClasses } from "./classes";
|
|
6
|
-
const Scrollbar = forwardRef(
|
|
7
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
8
|
-
({ slotProps, children, fillContent, naturalScroll, sx, ...other }, ref) => /* @__PURE__ */ jsx(
|
|
9
|
-
Box,
|
|
10
|
-
{
|
|
11
|
-
component: SimpleBar,
|
|
12
|
-
scrollableNodeProps: { ref },
|
|
13
|
-
clickOnTrack: false,
|
|
14
|
-
className: scrollbarClasses.root,
|
|
15
|
-
sx: {
|
|
16
|
-
minWidth: 0,
|
|
17
|
-
minHeight: 0,
|
|
18
|
-
flexGrow: 1,
|
|
19
|
-
display: "flex",
|
|
20
|
-
flexDirection: "column",
|
|
21
|
-
"& .simplebar-wrapper": slotProps?.wrapper,
|
|
22
|
-
"& .simplebar-content-wrapper": slotProps?.contentWrapper,
|
|
23
|
-
"& .simplebar-content": {
|
|
24
|
-
...fillContent && {
|
|
25
|
-
minHeight: 1,
|
|
26
|
-
display: "flex",
|
|
27
|
-
flex: "1 1 auto",
|
|
28
|
-
flexDirection: "column"
|
|
29
|
-
},
|
|
30
|
-
...slotProps?.content
|
|
31
|
-
},
|
|
32
|
-
...sx
|
|
33
|
-
},
|
|
34
|
-
tabIndex: -1,
|
|
35
|
-
...other,
|
|
36
|
-
children
|
|
37
|
-
}
|
|
38
|
-
)
|
|
39
|
-
);
|
|
40
|
-
Scrollbar.displayName = "Scrollbar";
|
|
41
|
-
var Scrollbar_default = Scrollbar;
|
|
42
|
-
export {
|
|
43
|
-
Scrollbar_default as default
|
|
44
|
-
};
|
|
1
|
+
export { a as default } from '../../chunk-LTMBAS4K.js';
|
|
2
|
+
//# sourceMappingURL=out.js.map
|
|
45
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -1,73 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import TextField from "@mui/material/TextField";
|
|
6
|
-
import Icon from "../Icon";
|
|
7
|
-
const SearchInput = ({
|
|
8
|
-
onSearch,
|
|
9
|
-
onChange,
|
|
10
|
-
trigger = "click",
|
|
11
|
-
iconPosition = "end",
|
|
12
|
-
tabIndex,
|
|
13
|
-
InputProps,
|
|
14
|
-
iconButtonAriaLabel = "Buscar",
|
|
15
|
-
...other
|
|
16
|
-
}) => {
|
|
17
|
-
const inputRef = useRef(null);
|
|
18
|
-
const seachIcon = /* @__PURE__ */ jsx(
|
|
19
|
-
IconButton,
|
|
20
|
-
{
|
|
21
|
-
color: "inherit",
|
|
22
|
-
onClick: () => {
|
|
23
|
-
onSearch(inputRef.current?.value);
|
|
24
|
-
},
|
|
25
|
-
"aria-label": iconButtonAriaLabel,
|
|
26
|
-
children: /* @__PURE__ */ jsx(Icon, { icon: "SEARCH_MAGNIFYING_GLASS", width: 20, height: 20 })
|
|
27
|
-
}
|
|
28
|
-
);
|
|
29
|
-
return /* @__PURE__ */ jsx(
|
|
30
|
-
TextField,
|
|
31
|
-
{
|
|
32
|
-
inputRef,
|
|
33
|
-
InputProps: {
|
|
34
|
-
...InputProps,
|
|
35
|
-
onKeyDown: (e) => {
|
|
36
|
-
if (e.key === "Enter")
|
|
37
|
-
onSearch(inputRef.current?.value);
|
|
38
|
-
},
|
|
39
|
-
...iconPosition === "start" ? {
|
|
40
|
-
startAdornment: /* @__PURE__ */ jsxs(InputAdornment, { position: iconPosition, children: [
|
|
41
|
-
seachIcon,
|
|
42
|
-
InputProps?.startAdornment
|
|
43
|
-
] })
|
|
44
|
-
} : {
|
|
45
|
-
endAdornment: /* @__PURE__ */ jsxs(InputAdornment, { position: iconPosition, children: [
|
|
46
|
-
seachIcon,
|
|
47
|
-
InputProps?.endAdornment
|
|
48
|
-
] })
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
inputProps: {
|
|
52
|
-
tabIndex,
|
|
53
|
-
...other.inputProps
|
|
54
|
-
},
|
|
55
|
-
onChange: (e) => {
|
|
56
|
-
if (trigger === "change") {
|
|
57
|
-
onSearch(e.target.value);
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
if (e.target.value === "")
|
|
61
|
-
onSearch("");
|
|
62
|
-
if (onChange)
|
|
63
|
-
onChange(e);
|
|
64
|
-
},
|
|
65
|
-
...other
|
|
66
|
-
}
|
|
67
|
-
);
|
|
68
|
-
};
|
|
69
|
-
var SearchInput_default = SearchInput;
|
|
70
|
-
export {
|
|
71
|
-
SearchInput_default as default
|
|
72
|
-
};
|
|
1
|
+
export { a as default } from '../../chunk-SBSJC4QO.js';
|
|
2
|
+
import '../../chunk-FU42GMHJ.js';
|
|
3
|
+
import '../../chunk-ZK4R7GDN.js';
|
|
4
|
+
//# sourceMappingURL=out.js.map
|
|
73
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -1,144 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
import Result from "components/Result";
|
|
11
|
-
import Scrollbar from "components/Scrollbar";
|
|
12
|
-
import SearchInput from "components/SearchInput";
|
|
13
|
-
import { StyledCard } from "./style";
|
|
14
|
-
const SelectableCards = ({
|
|
15
|
-
title,
|
|
16
|
-
action,
|
|
17
|
-
loading,
|
|
18
|
-
items,
|
|
19
|
-
values,
|
|
20
|
-
onChange
|
|
21
|
-
}) => {
|
|
22
|
-
const [search, setSearch] = useState();
|
|
23
|
-
const isSelected = (itemId) => {
|
|
24
|
-
return values.includes(itemId);
|
|
25
|
-
};
|
|
26
|
-
const filteredItems = search ? items.filter(
|
|
27
|
-
(item) => item.title.toLowerCase().includes(search.toLowerCase())
|
|
28
|
-
) : items;
|
|
29
|
-
const onSelectItem = (item) => {
|
|
30
|
-
const isItemAlreadySelected = isSelected(item.value);
|
|
31
|
-
let newSelectedOptions;
|
|
32
|
-
if (isItemAlreadySelected) {
|
|
33
|
-
newSelectedOptions = values.filter((element) => element !== item.value);
|
|
34
|
-
} else {
|
|
35
|
-
newSelectedOptions = [...values, item.value];
|
|
36
|
-
}
|
|
37
|
-
onChange(newSelectedOptions);
|
|
38
|
-
};
|
|
39
|
-
const selectAllItems = () => {
|
|
40
|
-
if (values.length === items.length) {
|
|
41
|
-
onChange([]);
|
|
42
|
-
} else {
|
|
43
|
-
onChange(items.map((item) => item.value));
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
const enCardinalRules = new Intl.PluralRules("pt-BR");
|
|
47
|
-
const strings = /* @__PURE__ */ new Map([
|
|
48
|
-
["one", "selecionado"],
|
|
49
|
-
["other", "selecionados"]
|
|
50
|
-
]);
|
|
51
|
-
const formatStrings = (n) => {
|
|
52
|
-
const rule = enCardinalRules.select(n);
|
|
53
|
-
const suffix = strings.get(rule);
|
|
54
|
-
return `${n} ${suffix}`;
|
|
55
|
-
};
|
|
56
|
-
return /* @__PURE__ */ jsxs(Stack, { gap: 1.5, height: 450, children: [
|
|
57
|
-
/* @__PURE__ */ jsxs(Stack, { direction: "row", justifyContent: "space-between", children: [
|
|
58
|
-
typeof title === "string" ? /* @__PURE__ */ jsx(Typography, { variant: "overline", color: "text.disabled", children: title }) : title,
|
|
59
|
-
/* @__PURE__ */ jsx(Typography, { variant: "overline", color: "text.disabled", children: values.length === 0 ? "nenhum selecionado" : formatStrings(values.length) })
|
|
60
|
-
] }),
|
|
61
|
-
/* @__PURE__ */ jsxs(Stack, { direction: "row", alignItems: "center", spacing: 1.5, children: [
|
|
62
|
-
/* @__PURE__ */ jsx(
|
|
63
|
-
SearchInput,
|
|
64
|
-
{
|
|
65
|
-
fullWidth: true,
|
|
66
|
-
size: "small",
|
|
67
|
-
iconPosition: "start",
|
|
68
|
-
placeholder: "Buscar",
|
|
69
|
-
trigger: "change",
|
|
70
|
-
onSearch: (value) => setSearch(value),
|
|
71
|
-
onKeyDown: (event) => {
|
|
72
|
-
if (event.key === "Enter") {
|
|
73
|
-
event.preventDefault();
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
),
|
|
78
|
-
action ? /* @__PURE__ */ jsx(Fragment, { children: action }) : /* @__PURE__ */ jsx(Button, { onClick: selectAllItems, size: "small", children: /* @__PURE__ */ jsx(Typography, { variant: "overline", children: "TODOS" }) })
|
|
79
|
-
] }),
|
|
80
|
-
/* @__PURE__ */ jsx(Scrollbar, { children: /* @__PURE__ */ jsx(Stack, { flex: 1, mb: 2, children: /* @__PURE__ */ jsx(
|
|
81
|
-
Result,
|
|
82
|
-
{
|
|
83
|
-
isLoading: loading,
|
|
84
|
-
loading: /* @__PURE__ */ jsx(Stack, { alignItems: "center", mt: 3, children: /* @__PURE__ */ jsx(CircularProgress, {}) }),
|
|
85
|
-
isEmpty: items.length === 0,
|
|
86
|
-
empty: /* @__PURE__ */ jsx(
|
|
87
|
-
EmptyView,
|
|
88
|
-
{
|
|
89
|
-
sx: { svg: { height: 140 } },
|
|
90
|
-
text: search ? `N\xE3o foi possivel encontrar o item "${search}"` : "Nenhum item dispon\xEDvel"
|
|
91
|
-
}
|
|
92
|
-
),
|
|
93
|
-
children: /* @__PURE__ */ jsx(Grid, { container: true, spacing: 1.5, children: filteredItems.map((item) => /* @__PURE__ */ jsx(Grid, { item: true, xs: 4, children: /* @__PURE__ */ jsx(
|
|
94
|
-
StyledCard,
|
|
95
|
-
{
|
|
96
|
-
active: isSelected(item.value),
|
|
97
|
-
onClick: () => onSelectItem(item),
|
|
98
|
-
children: /* @__PURE__ */ jsxs(Stack, { padding: 1.5, width: "100%", children: [
|
|
99
|
-
/* @__PURE__ */ jsxs(
|
|
100
|
-
Stack,
|
|
101
|
-
{
|
|
102
|
-
direction: "row",
|
|
103
|
-
alignItems: "center",
|
|
104
|
-
justifyContent: "space-between",
|
|
105
|
-
children: [
|
|
106
|
-
/* @__PURE__ */ jsx(
|
|
107
|
-
Typography,
|
|
108
|
-
{
|
|
109
|
-
color: isSelected(item.value) ? "primary.main" : "text.primary",
|
|
110
|
-
variant: "subtitle2",
|
|
111
|
-
textAlign: "left",
|
|
112
|
-
noWrap: true,
|
|
113
|
-
children: item.title
|
|
114
|
-
}
|
|
115
|
-
),
|
|
116
|
-
isSelected(item.value) && /* @__PURE__ */ jsx(Icon, { icon: "CHECK_CIRCLE", width: 24 })
|
|
117
|
-
]
|
|
118
|
-
}
|
|
119
|
-
),
|
|
120
|
-
item.options.map((option) => /* @__PURE__ */ jsx(
|
|
121
|
-
Typography,
|
|
122
|
-
{
|
|
123
|
-
mt: 1,
|
|
124
|
-
variant: "body2",
|
|
125
|
-
color: "text.disabled",
|
|
126
|
-
fontSize: 12,
|
|
127
|
-
textAlign: "left",
|
|
128
|
-
noWrap: true,
|
|
129
|
-
children: `${option.label}: ${option.value}`
|
|
130
|
-
},
|
|
131
|
-
option.label
|
|
132
|
-
))
|
|
133
|
-
] })
|
|
134
|
-
}
|
|
135
|
-
) }, item.title)) })
|
|
136
|
-
}
|
|
137
|
-
) }) })
|
|
138
|
-
] });
|
|
139
|
-
};
|
|
140
|
-
var SelectableCards_default = SelectableCards;
|
|
141
|
-
export {
|
|
142
|
-
SelectableCards_default as default
|
|
143
|
-
};
|
|
1
|
+
export { a as default } from '../../chunk-KZQ3J2KO.js';
|
|
2
|
+
import '../../chunk-SBSJC4QO.js';
|
|
3
|
+
import '../../chunk-KNQKOMWB.js';
|
|
4
|
+
import '../../chunk-LTMBAS4K.js';
|
|
5
|
+
import '../../chunk-OWUHSZYH.js';
|
|
6
|
+
import '../../chunk-QQRH32JC.js';
|
|
7
|
+
import '../../chunk-FU42GMHJ.js';
|
|
8
|
+
import '../../chunk-ZK4R7GDN.js';
|
|
9
|
+
//# sourceMappingURL=out.js.map
|
|
144
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|