@zydon/common 2.2.42 → 2.2.43
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 +8 -3
- package/dist/components/Autocomplete/index.js +12 -3
- package/dist/components/AutocompleteDetailed/index.js +13 -3
- package/dist/components/BuilderLayout/index.js +5 -9
- package/dist/components/BuilderSidebar/index.js +5 -7
- package/dist/components/ColorPickerInput/index.js +12 -2
- package/dist/components/ColoredLabel/index.js +5 -4
- package/dist/components/Common/index.js +6 -19
- package/dist/components/Confirm/index.js +3 -3
- package/dist/components/CustomAvatar/index.js +9 -1
- package/dist/components/CustomAvatarGroup/index.js +3 -3
- package/dist/components/DashedDivider/index.js +6 -1
- package/dist/components/DataCards/index.js +12 -18
- package/dist/components/DataGrid/index.js +8 -12
- package/dist/components/DatePicker/index.js +3 -3
- package/dist/components/DateRangePicker/index.js +3 -3
- package/dist/components/DateTimePicker/index.js +3 -3
- package/dist/components/Delayed/index.js +2 -2
- package/dist/components/Drawer/index.js +8 -9
- package/dist/components/EmptyContent/index.js +10 -3
- package/dist/components/EmptyView/index.js +8 -2
- package/dist/components/Error/index.js +7 -7
- package/dist/components/ExpandableGroup/index.js +8 -10
- package/dist/components/FixedProgressBar/index.js +6 -1
- package/dist/components/FrameSkeleton/index.js +10 -13
- package/dist/components/HelpButton/index.js +7 -3
- package/dist/components/Icon/index.js +58 -2
- package/dist/components/ImageCrop/index.js +7 -1
- package/dist/components/ImageCropModal/index.js +14 -5
- package/dist/components/Incrementer/index.js +11 -5
- package/dist/components/Label/index.js +7 -6
- package/dist/components/LoadingScreen/index.js +4 -5
- package/dist/components/MaskedInput/index.js +8 -1
- package/dist/components/MenuItem/index.js +7 -8
- package/dist/components/MenuPopover/index.js +8 -1
- package/dist/components/Modal/index.js +11 -3
- package/dist/components/ModalActions/index.js +3 -3
- package/dist/components/MoreMenu/index.js +7 -8
- package/dist/components/NumberInput/index.js +8 -1
- package/dist/components/PasswordRules/index.js +5 -7
- package/dist/components/PopoverSelect/index.js +6 -10
- package/dist/components/Portal/index.js +6 -1
- package/dist/components/Result/index.js +5 -1
- package/dist/components/SavedChanges/index.js +4 -4
- package/dist/components/Scrollbar/index.js +9 -1
- package/dist/components/SearchInput/index.js +10 -3
- package/dist/components/SelectableCards/index.js +17 -8
- package/dist/components/SeoPreview/index.js +8 -10
- package/dist/components/SplashScreen/index.js +4 -4
- package/dist/components/Steps/index.js +9 -11
- package/dist/components/StyledTab/index.js +6 -7
- package/dist/components/StyledTabs/index.js +3 -3
- package/dist/components/Summary/index.js +3 -5
- package/dist/components/SwapList/index.js +13 -17
- package/dist/components/TabPanel/index.js +3 -3
- package/dist/components/TextMaxLine/index.js +9 -2
- package/dist/components/TimePicker/index.js +3 -3
- package/dist/components/ToggleButtonGroup/index.js +3 -4
- package/dist/components/Tooltip/index.js +2 -2
- package/dist/components/WhiteBox/index.js +6 -1
- package/dist/components/animate/index.js +4 -2
- package/dist/components/carousel/index.js +9 -16
- package/dist/components/form/Address/index.js +8 -12
- package/dist/components/form/Autocomplete/index.js +7 -4
- package/dist/components/form/AutocompleteDetailed/index.js +4 -6
- package/dist/components/form/Checkbox/index.js +3 -3
- package/dist/components/form/Codes/index.js +7 -7
- package/dist/components/form/ColorPicker/index.js +4 -5
- package/dist/components/form/DatePicker/index.js +3 -3
- package/dist/components/form/DateRangePicker/index.js +3 -3
- package/dist/components/form/DateTimePicker/index.js +3 -3
- package/dist/components/form/Field/index.js +7 -1
- package/dist/components/form/Form/index.js +3 -3
- package/dist/components/form/Incrementer/index.js +4 -8
- package/dist/components/form/InputTags/index.js +3 -3
- package/dist/components/form/MaskedInput/index.js +7 -2
- package/dist/components/form/MultiCheckbox/index.js +3 -3
- package/dist/components/form/MultiChipField/index.js +3 -3
- package/dist/components/form/NumberInput/index.js +4 -4
- package/dist/components/form/Password/index.js +8 -9
- package/dist/components/form/RadioGroup/index.js +3 -3
- package/dist/components/form/SelectableCards/index.js +4 -11
- package/dist/components/form/Switch/index.js +3 -3
- package/dist/components/form/TimePicker/index.js +3 -3
- package/dist/components/form/UploadAvatarWithCrop/index.js +6 -17
- package/dist/components/form/UploadWithCrop/index.js +6 -20
- package/dist/components/form/Webhook/index.js +15 -16
- package/dist/components/lightbox/index.js +2 -16
- package/dist/components/table/index.js +9 -21
- package/dist/components/upload/index.js +8 -23
- package/dist/hooks/useActiveElement.js +1 -1
- package/dist/hooks/useApiMessage.js +1 -1
- package/dist/hooks/useAutocomplete.js +2 -2
- package/dist/hooks/useCopyToClipboard.js +1 -1
- package/dist/hooks/useDatagrid.js +1 -1
- package/dist/hooks/useDebounceValue.js +1 -1
- package/dist/hooks/useDeepCompareEffect.js +2 -2
- package/dist/hooks/useEventCallback.js +6 -2
- package/dist/hooks/useEventListener.js +5 -1
- package/dist/hooks/useIsMounting.js +1 -1
- package/dist/hooks/useIsomorphicLayoutEffect.js +5 -1
- package/dist/hooks/useLocalStorage.js +3 -4
- package/dist/hooks/useMount.js +1 -1
- package/dist/hooks/useOnClickOutside.js +3 -3
- package/dist/hooks/usePagination.js +1 -1
- package/dist/hooks/usePopover.js +5 -1
- package/dist/hooks/useResponsive.js +6 -1
- package/dist/hooks/useScrollOffSetTop.js +1 -1
- package/dist/hooks/useSnackbar.js +5 -1
- package/dist/hooks/useTabs.js +1 -1
- package/dist/hooks/useToggle.js +5 -1
- package/dist/hooks/useUpload.js +6 -1
- package/dist/hooks/useUploadImage.js +7 -2
- package/dist/index.js +4 -2
- package/dist/locales/all-langs.js +7 -1
- package/dist/theme/core/index.js +5 -3
- package/dist/theme/styles/index.js +2 -1
- package/dist/theme/theme-provider.js +10 -7
- package/dist/theme/with-settings/index.js +1 -4
- package/dist/types/icon.js +3 -1
- package/dist/types/webhook.js +2 -2
- package/dist/utils/color.js +5 -1
- package/dist/utils/compare.js +5 -1
- package/dist/utils/date.js +1 -1
- package/dist/utils/formatNumber.js +3 -1
- package/dist/utils/formatTime.js +7 -1
- package/dist/utils/loadable.js +3 -3
- package/dist/utils/mask.js +1 -1
- package/dist/utils/number.js +3 -1
- package/dist/utils/sort.js +1 -1
- package/dist/utils/uuidv4.js +1 -1
- package/dist/utils/validators.js +3 -1
- 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,20 +1,9 @@
|
|
|
1
|
-
import { b } from '../../../chunk-QCWALW56.js';
|
|
2
|
-
import '../../../chunk-2MW433JI.js';
|
|
3
|
-
import '../../../chunk-P4HPVV7B.js';
|
|
4
|
-
import '../../../chunk-WAAV5ZRR.js';
|
|
5
|
-
import '../../../chunk-T7I256S6.js';
|
|
6
|
-
import '../../../chunk-ANAHA3L6.js';
|
|
7
|
-
import '../../../chunk-D27ND54J.js';
|
|
8
|
-
import '../../../chunk-PPUFQMAW.js';
|
|
9
|
-
import '../../../chunk-3E5A45HM.js';
|
|
10
|
-
import '../../../chunk-KFZEM7KS.js';
|
|
11
|
-
import { a } from '../../../chunk-GA4A5P3S.js';
|
|
12
|
-
import '../../../chunk-M6QHAL4V.js';
|
|
13
|
-
import '../../../chunk-W3MYAMTH.js';
|
|
14
|
-
import { useFormContext, Controller } from 'react-hook-form';
|
|
15
|
-
import W from '@mui/material/FormHelperText';
|
|
16
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useFormContext, Controller } from 'react-hook-form';
|
|
3
|
+
import h from '@mui/material/FormHelperText';
|
|
4
|
+
import A from 'components/upload/upload-avatar-with-crop';
|
|
5
|
+
import W from 'hooks/useUpload';
|
|
17
6
|
|
|
18
|
-
|
|
7
|
+
const v=({name:e,rules:i,helperText:r,aspect:d,label:m,image:n,onFileCropped:a,onImageUploaded:f,onCancel:l,...s})=>{const{control:u}=useFormContext(),{uploadFile:c,file:C,setFileValue:U}=W(e);return jsx(Controller,{name:e,control:u,rules:i,render:({field:{value:g},fieldState:{error:o}})=>jsx(A,{accept:{"image/*":[]},file:g?C:void 0,onFileCropped:p=>{c(p),a&&a(p);},onImageUploaded:f,onCancel:()=>{U(void 0),l&&l();},error:!!o,disableMultiple:!0,helperText:(!!o||r)&&jsx(h,{error:!!o,sx:{px:2},children:o?o?.message:r}),aspect:d,label:m,image:n,"data-intercom-target":e,...s})})};var S=v;
|
|
19
8
|
|
|
20
|
-
export {
|
|
9
|
+
export { S as default };
|
|
@@ -1,23 +1,9 @@
|
|
|
1
|
-
import { e } from '../../../chunk-REM462FC.js';
|
|
2
|
-
import '../../../chunk-2MW433JI.js';
|
|
3
|
-
import '../../../chunk-P4HPVV7B.js';
|
|
4
|
-
import '../../../chunk-WAAV5ZRR.js';
|
|
5
|
-
import '../../../chunk-T7I256S6.js';
|
|
6
|
-
import '../../../chunk-ANAHA3L6.js';
|
|
7
|
-
import '../../../chunk-YWEB6IAI.js';
|
|
8
|
-
import '../../../chunk-OJKIWVED.js';
|
|
9
|
-
import '../../../chunk-D27ND54J.js';
|
|
10
|
-
import '../../../chunk-PPUFQMAW.js';
|
|
11
|
-
import '../../../chunk-3E5A45HM.js';
|
|
12
|
-
import '../../../chunk-ILHUUK4X.js';
|
|
13
|
-
import '../../../chunk-KFZEM7KS.js';
|
|
14
|
-
import { a } from '../../../chunk-GA4A5P3S.js';
|
|
15
|
-
import '../../../chunk-M6QHAL4V.js';
|
|
16
|
-
import '../../../chunk-W3MYAMTH.js';
|
|
17
|
-
import { useFormContext, Controller } from 'react-hook-form';
|
|
18
|
-
import b from '@mui/material/FormHelperText';
|
|
19
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useFormContext, Controller } from 'react-hook-form';
|
|
3
|
+
import h from '@mui/material/FormHelperText';
|
|
4
|
+
import W from 'components/upload/upload-with-crop';
|
|
5
|
+
import b from 'hooks/useUpload';
|
|
20
6
|
|
|
21
|
-
|
|
7
|
+
const H=({name:e,rules:a,helperText:l,aspect:d,label:m,image:n,onFileCropped:p,onImageUploaded:f,onCancel:r,...s})=>{const{control:u}=useFormContext(),{uploadFile:c,file:C,setFileValue:U}=b(e);return jsx(Controller,{name:e,control:u,rules:a,render:({field:{value:g},fieldState:{error:o}})=>jsx(W,{accept:{"image/*":[]},file:g?C:void 0,onFileCropped:i=>{c(i),p&&p(i);},onImageUploaded:f,onCancel:()=>{U(void 0),r&&r();},error:!!o,disableMultiple:!0,helperText:(!!o||l)&&jsx(h,{error:!!o,sx:{px:2},children:o?o?.message:l}),aspect:d,label:m,image:n,"data-intercom-target":e,...s})})};var k=H;
|
|
22
8
|
|
|
23
|
-
export {
|
|
9
|
+
export { k as default };
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import { a } from '../../../chunk-VTHBHXM2.js';
|
|
2
|
-
import { a as a$2 } from '../../../chunk-JHCOHKLL.js';
|
|
3
|
-
import { a as a$3 } from '../../../chunk-R6FUU7Z7.js';
|
|
4
|
-
import '../../../chunk-PIYBPQAC.js';
|
|
5
|
-
import { a as a$1 } from '../../../chunk-PPUFQMAW.js';
|
|
6
|
-
import '../../../chunk-3E5A45HM.js';
|
|
7
|
-
import { useFormContext, useFieldArray } from 'react-hook-form';
|
|
8
|
-
import D from '@mui/material/Divider';
|
|
9
|
-
import T from '@mui/material/IconButton';
|
|
10
|
-
import q from '@mui/material/InputAdornment';
|
|
11
|
-
import l from '@mui/material/Stack';
|
|
12
|
-
import O from '@mui/material/Typography';
|
|
13
|
-
import I from '@mui/material/Alert';
|
|
14
|
-
import { styled, alpha } from '@mui/material/styles';
|
|
15
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useFormContext, useFieldArray } from 'react-hook-form';
|
|
3
|
+
import T from '@mui/material/Divider';
|
|
4
|
+
import k from '@mui/material/IconButton';
|
|
5
|
+
import y from '@mui/material/InputAdornment';
|
|
6
|
+
import t from '@mui/material/Stack';
|
|
7
|
+
import C from '@mui/material/Typography';
|
|
8
|
+
import I from 'components/ActionButton';
|
|
9
|
+
import l from 'components/Icon';
|
|
10
|
+
import m from '../Autocomplete';
|
|
11
|
+
import o from '../Field';
|
|
12
|
+
import { ContentTypeOptions, HttpMethodOptions } from './props';
|
|
13
|
+
import { SyledIconButton } from './styles';
|
|
14
|
+
import _ from './WebhookAlert';
|
|
16
15
|
|
|
17
|
-
|
|
16
|
+
const q=({webhookData:i,isEditing:n=!1,haveTip:p=!1})=>{const{control:c}=useFormContext(),{fields:s,append:u,remove:b}=useFieldArray({name:"headers",control:c}),f=()=>{u({value:"",name:""});};return jsxs(Fragment,{children:[p&&jsx(_,{}),n&&jsx(o,{name:"name",label:"Nome do webhook"}),jsxs(t,{direction:"row",gap:2,children:[jsx(o,{name:"url",label:"URL de endpoint",rules:{required:{value:!0,message:"Url \xE9 obrigat\xF3rio"}}}),jsx(o,{name:"filter",label:"Filtro"})]}),n&&i&&jsxs(Fragment,{children:[jsx(o,{variant:"filled",name:"solution",label:"Solu\xE7\xE3o",disabled:!0}),jsxs(t,{direction:"row",gap:2,children:[jsx(o,{variant:"filled",name:"resource",label:"Origem",disabled:!0}),jsx(o,{variant:"filled",name:"resource_id",label:"ID origem",disabled:!0,InputProps:{endAdornment:jsx(y,{position:"end",children:jsx(SyledIconButton,{onClick:()=>navigator.clipboard.writeText(i.resource_id),children:jsx(l,{className:"copyIcon",icon:"COPY_CONTENT"})})})}}),jsx(o,{variant:"filled",name:"event",label:"Evento",disabled:!0})]})]}),jsxs(t,{direction:"row",gap:2,alignItems:"center",children:[jsx(m,{fullWidth:!0,options:ContentTypeOptions,name:"content_type",label:"Tipo de conte\xFAdo",required:!0,rules:{required:{value:!0,message:"Campo Tipo de conte\xFAdo \xE9 obrigat\xF3rio"}}}),jsx(m,{fullWidth:!0,options:HttpMethodOptions,name:"http_method",label:"M\xE9todo HTTP",required:!0,rules:{required:{value:!0,message:"Campo M\xE9todo HTTP \xE9 obrigat\xF3rio"}}})]}),jsx(C,{variant:"overline",color:"grey",children:"Cabe\xE7alho"}),s?.map((h,a)=>jsxs(t,{direction:"row",gap:2,alignItems:"center",children:[jsx(o,{name:`headers.${a}.name`,label:"Chave",required:!0,rules:{required:{value:!0,message:""}}}),jsx(o,{name:`headers.${a}.value`,label:"Valor"}),jsx(k,{color:"error",onClick:()=>b(a),children:jsx(l,{icon:"DELETE_MARK_BUTTON_02"})})]},h.id)),jsx(I,{actionType:"NEW",size:"large",variant:"outlined",color:"inherit",fullWidth:!0,onClick:()=>f(),children:"Adicionar novo cabe\xE7alho"}),jsx(T,{})]})};var z=q;
|
|
18
17
|
|
|
19
|
-
export {
|
|
18
|
+
export { z as default };
|
|
@@ -1,16 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import w from '@mui/material/Box';
|
|
4
|
-
import C, { useLightboxState } from 'yet-another-react-lightbox';
|
|
5
|
-
import d from 'yet-another-react-lightbox/plugins/captions';
|
|
6
|
-
import h from 'yet-another-react-lightbox/plugins/fullscreen';
|
|
7
|
-
import u from 'yet-another-react-lightbox/plugins/slideshow';
|
|
8
|
-
import x from 'yet-another-react-lightbox/plugins/thumbnails';
|
|
9
|
-
import g from 'yet-another-react-lightbox/plugins/video';
|
|
10
|
-
import y from 'yet-another-react-lightbox/plugins/zoom';
|
|
11
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
12
|
-
import { useState, useCallback } from 'react';
|
|
13
|
-
|
|
14
|
-
var f={root:"mnl__lightbox__root"};function H({slides:i,disableZoom:l,disableVideo:n,disableTotal:p,disableCaptions:c,disableSlideshow:s,disableThumbnails:o,disableFullscreen:t,onGetCurrentIndex:a$1,render:I,...E}){let m=i?i.length:0;return jsx(C,{slides:i,animation:{swipe:240},carousel:{finite:m<5},controller:{closeOnBackdropClick:!0},plugins:L({disableZoom:l,disableVideo:n,disableCaptions:c,disableSlideshow:s,disableThumbnails:o,disableFullscreen:t}),on:{view:({index:_})=>{a$1&&a$1(_);}},toolbar:{buttons:[jsx(P,{totalItems:m,disableTotal:p},0),"close"]},render:{iconClose:()=>jsx(a,{width:24,icon:"CLOSE_MARK_BUTTON"}),iconZoomIn:()=>jsx(a,{width:24,icon:"ZOOM_IN"}),iconZoomOut:()=>jsx(a,{width:24,icon:"ZOOM_OUT"}),iconSlideshowPlay:()=>jsx(a,{width:24,icon:"PLAY_EXECUTE"}),iconSlideshowPause:()=>jsx(a,{width:24,icon:"PAUSE"}),iconPrev:()=>jsx(a,{width:32,icon:"CHEVRON_LEFT"}),iconNext:()=>jsx(a,{width:32,icon:"CHEVRON_RIGHT"}),iconExitFullscreen:()=>jsx(a,{width:24,icon:"MINIMIZE_SCREEN"}),iconEnterFullscreen:()=>jsx(a,{width:24,icon:"MAXIMIZE_SCREEN"}),...I},className:f.root,...E})}function L({disableZoom:i,disableVideo:l,disableCaptions:n,disableSlideshow:p,disableThumbnails:c,disableFullscreen:s}){let o=[d,h,u,x,g,y];return c&&(o=o.filter(t=>t!==x)),n&&(o=o.filter(t=>t!==d)),s&&(o=o.filter(t=>t!==h)),p&&(o=o.filter(t=>t!==u)),i&&(o=o.filter(t=>t!==y)),l&&(o=o.filter(t=>t!==g)),o}function P({totalItems:i,disableTotal:l}){let{currentIndex:n}=useLightboxState();return l?null:jsxs(w,{component:"span",className:"yarl__button",sx:{typography:"body2",alignItems:"center",display:"inline-flex",justifyContent:"center"},children:[jsxs("strong",{children:[" ",n+1," "]})," / ",i]})}function j(i){let[l,n]=useState(-1),p=useCallback(s=>{let o=i.findIndex(t=>t.type==="video"?t.poster===s:t.src===s);n(o);},[i]),c=useCallback(()=>{n(-1);},[]);return {selected:l,open:l>=0,onOpen:p,onClose:c,setSelected:n}}
|
|
15
|
-
|
|
16
|
-
export { P as DisplayTotal, H as Lightbox, L as getPlugins, j as useLightBox };
|
|
1
|
+
export * from './lightbox';
|
|
2
|
+
export * from './use-light-box';
|
|
@@ -1,21 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import Z from '@mui/material/TableSortLabel';
|
|
11
|
-
import oe from '@mui/material/FormControlLabel';
|
|
12
|
-
import re from '@mui/material/Switch';
|
|
13
|
-
import ae from '@mui/material/TablePagination';
|
|
14
|
-
import me from '@mui/material/Stack';
|
|
15
|
-
import pe from '@mui/material/Typography';
|
|
16
|
-
import T from '@mui/material/Skeleton';
|
|
17
|
-
import { useState, useCallback } from 'react';
|
|
18
|
-
|
|
19
|
-
var G=({emptyRows:e,height:o})=>e?jsx(F,{sx:{...o&&{height:o*e}},children:jsx(C,{colSpan:9})}):null,q=G;var _={border:0,margin:-1,padding:0,width:"1px",height:"1px",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",clip:"rect(0 0 0 0)"},$=({sx:e,order:o,onSort:t,orderBy:r,headLabel:l,rowCount:s=0,numSelected:p=0,onSelectAllRows:c})=>jsx(X,{sx:e,children:jsxs(F,{children:[c&&jsx(C,{padding:"checkbox",children:jsx(Q,{indeterminate:!!p&&p<s,checked:!!s&&p===s,onChange:n=>c(n.target.checked),inputProps:{name:"select-all-rows","aria-label":"select all rows"}})}),l.map(n=>jsx(C,{align:n.align||"left",sortDirection:r===n.id?o:!1,sx:{width:n.width,minWidth:n.minWidth},children:t?jsxs(Z,{hideSortIcon:!0,active:r===n.id,direction:r===n.id?o:"asc",onClick:()=>t(n.id),children:[n.label,r===n.id?jsx(J,{sx:{..._},children:o==="desc"?"sorted descending":"sorted ascending"}):null]}):n.label},n.id))]})}),B=$;var j=({notFound:e,sx:o})=>jsx(F,{children:e?jsx(C,{colSpan:12,children:jsx(a,{filled:!0,sx:{py:10,...o}})}):jsx(C,{colSpan:12,sx:{p:0}})}),ee=j;var ne=({sx:e,dense:o,onChangeDense:t,rowsPerPageOptions:r=[5,10,25],...l})=>jsxs(J,{sx:{position:"relative",...e},children:[jsx(ae,{rowsPerPageOptions:r,component:"div",...l,sx:{borderTopColor:"transparent"}}),t&&jsx(oe,{label:"Dense",control:jsx(re,{name:"dense",checked:o,onChange:t}),sx:{pl:2,py:1.5,top:0,position:{sm:"absolute"}}})]}),le=ne;var ce=({dense:e,action:o,rowCount:t,numSelected:r,onSelectAllRows:l,sx:s,...p})=>r?jsxs(me,{direction:"row",alignItems:"center",sx:{pl:1,pr:2,top:0,left:0,width:1,zIndex:9,height:58,position:"absolute",bgcolor:"primary.lighter",...e&&{height:38},...s},...p,children:[jsx(Q,{indeterminate:!!r&&r<t,checked:!!t&&r===t,onChange:c=>l(c.target.checked)}),jsxs(pe,{variant:"subtitle2",sx:{ml:2,flexGrow:1,color:"primary.main",...e&&{ml:3}},children:[r," selected"]}),o&&o]}):null,fe=ce;var ge=({...e})=>jsx(F,{...e,children:jsx(C,{colSpan:12,children:jsxs(me,{spacing:3,direction:"row",alignItems:"center",children:[jsx(T,{sx:{borderRadius:1.5,width:48,height:48,flexShrink:0}}),jsx(T,{sx:{width:1,height:12}}),jsx(T,{sx:{width:180,height:12}}),jsx(T,{sx:{width:160,height:12}}),jsx(T,{sx:{width:140,height:12}}),jsx(T,{sx:{width:120,height:12}})]})})}),he=ge;var we=e=>{let[o,t]=useState(!!e?.defaultDense),[r,l]=useState(e?.defaultCurrentPage||0),[s,p]=useState(e?.defaultOrderBy||"name"),[c,n]=useState(e?.defaultRowsPerPage||5),[w,R]=useState(e?.defaultOrder||"asc"),[b,d]=useState(e?.defaultSelected||[]),H=useCallback(a=>{a!==""&&(R(s===a&&w==="asc"?"desc":"asc"),p(a));},[w,s]),I=useCallback(a=>{let i=b.includes(a)?b.filter(u=>u!==a):[...b,a];d(i);},[b]),L=useCallback(a=>{l(0),n(parseInt(a.target.value,10));},[]),O=useCallback(a=>{t(a.target.checked);},[]),A=useCallback((a,i)=>{if(a){d(i);return}d([]);},[]),M=useCallback((a,i)=>{l(i);},[]),U=useCallback(()=>{l(0);},[]),K=useCallback(a=>{d([]),r&&a<2&&l(r-1);},[r]),N=useCallback(({totalRowsInPage:a,totalRowsFiltered:i})=>{let u=b.length;if(d([]),r){if(u===a)l(r-1);else if(u===i)l(0);else if(u>a){let W=Math.ceil((i-u)/c)-1;l(W);}}},[r,c,b.length]);return {dense:o,order:w,page:r,orderBy:s,rowsPerPage:c,selected:b,onSelectRow:I,onSelectAllRows:A,onSort:H,onChangePage:M,onChangeDense:O,onResetPage:U,onChangeRowsPerPage:L,onUpdatePageDeleteRow:K,onUpdatePageDeleteRows:N,setPage:l,setDense:t,setOrder:R,setOrderBy:p,setSelected:d,setRowsPerPage:n}},Pe=we;function at(e,o,t){return e.slice(o*t,o*t+t)}function nt(e,o,t){return e?Math.max(0,(1+e)*o-t):0}function D(e,o,t){return e[t]?!o[t]||o[t]<e[t]?-1:o[t]>e[t]?1:0:1}function lt(e,o){return e==="desc"?(t,r)=>D(t,r,o):(t,r)=>-D(t,r,o)}
|
|
20
|
-
|
|
21
|
-
export { q as TableEmptyRows, B as TableHeadCustom, ee as TableNoData, le as TablePaginationCustom, fe as TableSelectedAction, he as TableSkeleton, nt as emptyRows, lt as getComparator, at as rowInPage, Pe as useTable };
|
|
1
|
+
export { default as TableEmptyRows } from './TableEmptyRows';
|
|
2
|
+
export { default as TableHeadCustom } from './TableHeadCustom';
|
|
3
|
+
export { default as TableNoData } from './TableNoData';
|
|
4
|
+
export { default as TablePaginationCustom } from './TablePaginationCustom';
|
|
5
|
+
export { default as TableSelectedAction } from './TableSelectedAction';
|
|
6
|
+
export { default as TableSkeleton } from './TableSkeleton';
|
|
7
|
+
export * from './types';
|
|
8
|
+
export { default as useTable } from './useTable';
|
|
9
|
+
export * from './utils';
|
|
@@ -1,23 +1,8 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import '../../chunk-OJKIWVED.js';
|
|
10
|
-
import { i } from '../../chunk-D27ND54J.js';
|
|
11
|
-
import '../../chunk-PPUFQMAW.js';
|
|
12
|
-
import '../../chunk-3E5A45HM.js';
|
|
13
|
-
import '../../chunk-ILHUUK4X.js';
|
|
14
|
-
import '../../chunk-KFZEM7KS.js';
|
|
15
|
-
import '../../chunk-M6QHAL4V.js';
|
|
16
|
-
import '../../chunk-W3MYAMTH.js';
|
|
17
|
-
import { useDropzone } from 'react-dropzone';
|
|
18
|
-
import h from '@mui/material/Box';
|
|
19
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
20
|
-
|
|
21
|
-
function R({error:t,disabled:e,sx:p,...a}){let{getRootProps:n,getInputProps:i$1,isDragActive:l,isDragReject:s}=useDropzone({disabled:e,...a}),m=s||t;return jsxs(h,{...n(),sx:{width:64,height:64,flexShrink:0,display:"flex",borderRadius:1,cursor:"pointer",alignItems:"center",color:"text.disabled",justifyContent:"center",bgcolor:o=>i(o.vars.palette.grey["500Channel"],.08),border:o=>`dashed 1px ${i(o.vars.palette.grey["500Channel"],.16)}`,...l&&{opacity:.72},...e&&{opacity:.48,pointerEvents:"none"},...m&&{color:"error.main",borderColor:"error.main",bgcolor:o=>i(o.vars.palette.error.mainChannel,.08)},"&:hover":{opacity:.72},...p},children:[jsx("input",{...i$1()}),"Selecionar arquivo"]})}
|
|
22
|
-
|
|
23
|
-
export { R as UploadBox };
|
|
1
|
+
export * from './components/preview-multi-file';
|
|
2
|
+
export * from './components/preview-single-file';
|
|
3
|
+
export * from './components/rejection-files';
|
|
4
|
+
export { default as Upload } from './Upload';
|
|
5
|
+
export * from './upload-avatar';
|
|
6
|
+
export { default as UploadAvatarWithCrop } from './upload-avatar-with-crop';
|
|
7
|
+
export * from './upload-box';
|
|
8
|
+
export { default as UploadWithCrop } from './upload-with-crop';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState, useEffect } from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const i=()=>{const[o,r]=useState(!1),[u,e]=useState(document.activeElement);return useEffect(()=>{const t=l=>e(l.target),n=()=>e(null);return window.addEventListener("focus",t,!0),window.addEventListener("blur",n,!0),r(!0),()=>{window.removeEventListener("focus",t),window.removeEventListener("blur",n);}},[]),{activeElement:u,listenersReady:o}};var d=i;
|
|
4
4
|
|
|
5
5
|
export { d as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { toast } from 'sonner';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const c=()=>({showSuccessMessage:a=>{toast.success(a);},showErrorMessage:(a,n)=>{toast.error(i(a,n));}});var o=c;const i=(s,t)=>{try{return "message"in s?s.message||t:"data"in s&&s.data&&typeof s.data=="object"&&"message"in s.data&&typeof s.data.message=="string"?s.data.message:t}catch{return t}};
|
|
4
4
|
|
|
5
5
|
export { o as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
2
|
import { debounce } from '@mui/material/utils';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
const h=d=>{const[o,i]=useState(!1),[s,l]=useState(),[p,a]=useState(),O=debounce(e=>{l(e),i(!1);},500),S=e=>{e&&i(!0),O(e);},c=()=>{i(!1),l(void 0);};return {search:s,searching:o,buildOptions:(e=[],r=!1)=>{const t=p||d;if(!t||s!==void 0)return e.filter(n=>n.value!==null&&n.value!==void 0);if(o||r)return [];const f=[...Array.isArray(t)?t:[t],...e];return Array.from(new Set(f.map(n=>n.value))).map(n=>f.find(m=>m.value===n)).filter(n=>n.value!==null&&n.value!==void 0)},onSearch:S,onSelectValue:(e=[],r)=>{if(!r||Array.isArray(r)&&r.length===0){a(void 0);return}Array.isArray(r)?a(e.filter(t=>r.includes(t.value))):a(e.find(t=>t.value===r)),c();},finishSearch:c}};var x=h;
|
|
5
5
|
|
|
6
|
-
export {
|
|
6
|
+
export { x as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const p=()=>{const[o,e]=useState(null);return {copiedText:o,copy:async t=>{if(!navigator?.clipboard)return !1;try{return await navigator.clipboard.writeText(t),e(t),!0}catch{return e(null),!1}}}};var l=p;
|
|
4
4
|
|
|
5
5
|
export { l as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
2
|
import { useGridApiRef } from '@mui/x-data-grid-premium';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
const b=({page:c,perPage:o,dir:i,search:p,searchValue:d,sort:u}={page:0,perPage:25})=>{const n=useGridApiRef(),[r,t]=useState({page:c,perPage:o,dir:i,search:p,searchValue:d,sort:u}),g=({pageSize:e=25,page:a=0})=>{t(s=>({...s,page:a,perPage:e}));},h=e=>t(a=>({...a,page:0,search:e})),l=e=>t(a=>({...a,searchValue:e})),P=()=>t(e=>({...e,page:0,search:e.searchValue})),S=(e,a)=>t(s=>({...s,sort:e,dir:a})),f=()=>{n.current.setPage(0),g({page:0});};return {...r,apiRef:n,page:r.page||0,perPage:r.perPage||25,handlePaginationModelChange:g,handleSearch:h,handleSort:S,handleSearchValue:l,applySearchValue:P,goToPageFirstPage:f}};var y=b;
|
|
5
5
|
|
|
6
6
|
export { y as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState, useEffect } from 'react';
|
|
2
2
|
|
|
3
|
-
function s(e,t){
|
|
3
|
+
function s(e,t){const[u,n]=useState(e);return useEffect(()=>{const o=setTimeout(()=>{n(e);},t);return ()=>{clearTimeout(o);}},[e,t]),u}var f=s;
|
|
4
4
|
|
|
5
5
|
export { f as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a } from '../chunk-VVMQMROT.js';
|
|
2
1
|
import { useEffect, useRef } from 'react';
|
|
2
|
+
import { isEqual } from 'utils/compare';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
const f=n=>{const e=useRef();return isEqual(n,e.current)||(e.current=n),e.current},o=(n,e)=>{useEffect(n,e.map(f));};var m=o;
|
|
5
5
|
|
|
6
6
|
export { m as default };
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import '
|
|
1
|
+
import { useRef, useCallback } from 'react';
|
|
2
|
+
import a from './useIsomorphicLayoutEffect';
|
|
3
|
+
|
|
4
|
+
function o(e){const n=useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return a(()=>{n.current=e;},[e]),useCallback((...r)=>n.current?.(...r),[n])}var f=o;
|
|
5
|
+
|
|
6
|
+
export { f as default, o as useEventCallback };
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { useRef, useEffect, useLayoutEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
const a=typeof window<"u"?useLayoutEffect:useEffect;function u(n,t,o,d){const i=useRef(t);a(()=>{i.current=t;},[t]),useEffect(()=>{const e=o?.current||window;if(!(e&&e.addEventListener))return;const v=E=>i.current(E);return e.addEventListener(n,v,d),()=>{e.removeEventListener(n,v);}},[n,o,d]);}var L=u;
|
|
4
|
+
|
|
5
|
+
export { L as default };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { a } from '../chunk-Z2TDWMRU.js';
|
|
2
|
-
import '../chunk-3APKMSVD.js';
|
|
3
|
-
import { a as a$1 } from '../chunk-4INDXVIX.js';
|
|
4
1
|
import { useCallback, useState, useEffect } from 'react';
|
|
2
|
+
import { useEventCallback } from './useEventCallback';
|
|
3
|
+
import g from './useEventListener';
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
const h=typeof window>"u",p=(r,t,o={})=>{const{initializeWithValue:l=!0}=o,S=useCallback(e=>o.serializer?o.serializer(e):JSON.stringify(e),[o]),i=useCallback(e=>{if(o.deserializer)return o.deserializer(e);if(e==="undefined")return;const n=t instanceof Function?t():t;let d;try{d=JSON.parse(e);}catch{return n}return d},[o,t]),a=useCallback(()=>{const e=t instanceof Function?t():t;if(h)return e;try{const n=window.localStorage.getItem(r);return n?i(n):e}catch{return e}},[t,r,i]),[w,s]=useState(()=>l?a():t instanceof Function?t():t),T=useEventCallback(e=>{try{const n=e instanceof Function?e(a()):e;window.localStorage.setItem(r,S(n)),s(n),window.dispatchEvent(new StorageEvent("local-storage",{key:r}));}catch{}}),m=useEventCallback(()=>{const e=t instanceof Function?t():t;window.localStorage.removeItem(r),s(e),window.dispatchEvent(new StorageEvent("local-storage",{key:r}));});useEffect(()=>{s(a());},[r]);const u=useCallback(e=>{e.key&&e.key!==r||s(a());},[r,a]);return g("storage",u),g("local-storage",u),[w,T,m]};var I=p;
|
|
7
6
|
|
|
8
7
|
export { I as default };
|
package/dist/hooks/useMount.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import s from './useEventListener';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const u=(n,o,r="mousedown")=>{s(r,e=>{const t=n?.current;!t||t.contains(e.target)||o(e);});};var c=u;
|
|
4
4
|
|
|
5
|
-
export {
|
|
5
|
+
export { c as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
2
|
|
|
3
|
-
function s({items:r,itemsPerPage:n}){
|
|
3
|
+
function s({items:r,itemsPerPage:n}){const[t,a]=useState(1),o=Math.ceil(r.length/n),g=r.slice((t-1)*n,t*n);return {currentPage:t,totalPages:o,currentItems:g,goToPage:e=>{e>0&&e<=o&&a(e);},nextPage:()=>{t<o&&a(e=>e+1);},prevPage:()=>{t>1&&a(e=>e-1);}}}var f=s;
|
|
4
4
|
|
|
5
5
|
export { f as default };
|
package/dist/hooks/usePopover.js
CHANGED
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { useState, useCallback } from 'react';
|
|
2
|
+
|
|
3
|
+
const p=()=>{const[t,e]=useState(null),o=useCallback(s=>{e(s.currentTarget);},[]),l=useCallback(()=>{e(null);},[]);return {open:t,onOpen:o,onClose:l,setOpen:e}};var v=p;
|
|
4
|
+
|
|
5
|
+
export { v as default };
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { useTheme } from '@mui/material/styles';
|
|
2
|
+
import o from '@mui/material/useMediaQuery';
|
|
3
|
+
|
|
4
|
+
const l=(n,t,r)=>{const e=useTheme(),a=o(e.breakpoints.up(t)),s=o(e.breakpoints.down(t)),p=o(e.breakpoints.between(t,r)),i=o(e.breakpoints.only(t));return n==="up"?a:n==="down"?s:n==="between"?p:i};function y(){const n=useTheme();return [...n.breakpoints.keys].reverse().reduce((r,e)=>{const a=o(n.breakpoints.up(e));return !r&&a?e:r},null)||"xs"}var b=l;
|
|
5
|
+
|
|
6
|
+
export { b as default, y as useWidth };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useRef, useState, useCallback, useMemo } from 'react';
|
|
2
2
|
import { useScroll, useMotionValueEvent } from 'framer-motion';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
const R=(t=0)=>{const e=useRef(null),{scrollY:r}=useScroll(),[o,l]=useState(!1),n=useCallback(c=>{const f=Math.round(c);if(e?.current){const u=e.current.getBoundingClientRect(),a=Math.round(u.top);l(a<t);}else l(f>t);},[e,t]);return useMotionValueEvent(r,"change",useMemo(()=>n,[n])),useMemo(()=>({elementRef:e,offsetTop:o}),[o])};var g=R;
|
|
5
5
|
|
|
6
6
|
export { g as default };
|
package/dist/hooks/useTabs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const s=(e="")=>{const[n,t]=useState(e);return {currentTab:n,onChangeTab:(u,r)=>{t(r);},setCurrentTab:t}};var b=s;
|
|
4
4
|
|
|
5
5
|
export { b as default };
|
package/dist/hooks/useToggle.js
CHANGED
package/dist/hooks/useUpload.js
CHANGED
|
@@ -1 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { useFormContext } from 'react-hook-form';
|
|
3
|
+
|
|
4
|
+
function F(t,i){const{watch:r,setValue:n}=useFormContext(),[u,o]=useState(i),l=r(t)||[];return {uploadFile:async e=>{if(!e){n(t,void 0),o(void 0);return}n(t,e),o(Object.assign(e,{preview:URL.createObjectURL(e)}));},uploadFiles:async e=>{n(t,[...l,...e.map(s=>Object.assign(s,{preview:URL.createObjectURL(s)}))]);},handleDeleteFile:()=>{n(t,void 0),o(void 0);},handleRemoveAll:()=>{n(t,void 0);},handleRemove:e=>{const s=l.filter(a=>a!==e);n(t,s);},file:u,setFileValue:o}}var j=F;
|
|
5
|
+
|
|
6
|
+
export { j as default };
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import '
|
|
1
|
+
import { useId, useState } from 'react';
|
|
2
|
+
import w from 'browser-image-compression';
|
|
3
|
+
import I from './useToggle';
|
|
4
|
+
|
|
5
|
+
const h=5242880,y=({onFileCropped:o,onImageUploaded:c,onCancel:i})=>{const d=useId(),[e,l]=useState(),[m,a,s]=I(),[f,r]=useState(),[u,g]=useState(!1);return {id:d,setCropModalOpen:s,handleRemove:()=>{o(void 0),c(void 0),s(!1);},toggleCropModalOpen:a,cropModalOpen:m,cancelChanges:()=>{i&&i(),s(!1);},saveChanges:()=>{e!==void 0&&e.getCroppedCanvas().toBlob(async p=>{try{if(!p)return;g(!0);const n=new File([p],"imagem.png",{type:"image/png"});if(console.log({file:n}),n.size>h){const v=await w(n,{maxSizeMB:5});o(v),a();return}o(n),a();}finally{g(!1);}},"image/png",1);},previewImage:()=>{e!==void 0&&r(e.getCroppedCanvas().toDataURL());},setCropper:l,preview:f,closePreviewImage:()=>r(void 0),saving:u}};var x=y;
|
|
6
|
+
|
|
7
|
+
export { x as default };
|
package/dist/index.js
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { ptBR } from '@mui/material/locale';
|
|
2
|
+
import { enUS as enUS$1, ptBR as ptBR$2 } from '@mui/x-data-grid/locales';
|
|
3
|
+
import { enUS, ptBR as ptBR$1 } from '@mui/x-date-pickers-pro/locales';
|
|
4
|
+
|
|
5
|
+
const m=[{value:"en",label:"English",countryCode:"GB",adapterLocale:"en",numberFormat:{code:"en-US",currency:"USD"},systemValue:{components:{...enUS.components,...enUS$1.components}}},{value:"br",label:"Portug\xEAs",countryCode:"BR",adapterLocale:"br",numberFormat:{code:"pt-Br",currency:"R$"},systemValue:{components:{...ptBR.components,...ptBR$1.components,...ptBR$2.components}}}];
|
|
6
|
+
|
|
7
|
+
export { m as allLangs };
|
package/dist/theme/core/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
|
|
1
|
+
export * from './components';
|
|
2
|
+
export * from './custom-shadows';
|
|
3
|
+
export * from './palette';
|
|
4
|
+
export * from './shadows';
|
|
5
|
+
export * from './typography';
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './mixins';
|
|
2
|
+
export * from './utils';
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import '
|
|
3
|
-
import '
|
|
4
|
-
import '
|
|
5
|
-
import '
|
|
6
|
-
import '
|
|
7
|
-
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import a from '@mui/material/CssBaseline';
|
|
3
|
+
import { Experimental_CssVarsProvider } from '@mui/material/styles';
|
|
4
|
+
import { allLangs } from 'locales/all-langs';
|
|
5
|
+
import { schemeConfig } from './color-scheme-script';
|
|
6
|
+
import { createTheme } from './create-theme';
|
|
7
|
+
|
|
8
|
+
const h=({primaryColor:e,children:r,colorScheme:t="light",contrast:o="default",cssVarPrefix:m})=>{const i=createTheme(allLangs[1].systemValue,{primaryColor:e,colorScheme:t,contrast:o,navLayout:"vertical",navColor:"integrate",compactLayout:!0,fontFamily:"Public Sans"},m);return jsxs(Experimental_CssVarsProvider,{theme:i,defaultMode:"light",defaultColorScheme:"light",modeStorageKey:schemeConfig.modeStorageKey,children:[jsx(a,{}),r]})};var S=h;
|
|
9
|
+
|
|
10
|
+
export { S as default };
|
package/dist/types/icon.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
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 Icon };
|
package/dist/types/webhook.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var e=[{label:"JSON",value:"JSON"},{label:"XML",value:"XML"},{label:"BIN\xC1RIO",value:"BYTEA"}],
|
|
1
|
+
var n=(t=>(t.XML="XML",t.JSON="JSON",t.BYTEA="BYTEA",t))(n||{}),a=(e=>(e.GET="GET",e.POST="POST",e.PATCH="PATCH",e.DELETE="DELETE",e.PUT="PUT",e))(a||{});const r=[{label:"JSON",value:"JSON"},{label:"XML",value:"XML"},{label:"BIN\xC1RIO",value:"BYTEA"}],l=[{label:"PUT",value:"PUT"},{label:"POST",value:"POST"},{label:"GET",value:"GET"},{label:"DELETE",value:"DELETE"}];
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { r as contentType, l as httpMethods };
|
package/dist/utils/color.js
CHANGED
package/dist/utils/compare.js
CHANGED
package/dist/utils/date.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import r from 'dayjs';
|
|
2
2
|
import s from 'dayjs/plugin/customParseFormat';
|
|
3
3
|
|
|
4
|
-
r.extend(s);
|
|
4
|
+
r.extend(s);const l=t=>t?r(t).isValid():!1,a=(t,e="DD/MM/YYYY HH:mm:ss")=>{if(!t)return null;const n=r(t,e);return n.isValid()?n.toDate():null},u=(t,e)=>r(t).isAfter(r(e));
|
|
5
5
|
|
|
6
6
|
export { u as isAfter, l as isValidDate, a as stringToDate };
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
const i={code:"pt-BR",currency:"BRL"};function u(t){return t==null||Number.isNaN(t)?null:Number(t)}function s(t,n){const e=i,r=u(t);return r===null?"":new Intl.NumberFormat(e.code,{minimumFractionDigits:0,maximumFractionDigits:2,...n}).format(r)}function a(t,n){const e=i,r=u(t);return r===null?"":new Intl.NumberFormat(e.code,{style:"currency",currency:e.currency,minimumFractionDigits:0,maximumFractionDigits:2,...n}).format(r)}function l(t,n){const e=i,r=u(t);return r===null?"":new Intl.NumberFormat(e.code,{style:"percent",minimumFractionDigits:0,maximumFractionDigits:1,...n}).format(r/100)}function f(t,n){const e=i,r=u(t);return r===null?"":new Intl.NumberFormat(e.code,{notation:"compact",maximumFractionDigits:2,...n}).format(r).replace(/[A-Z]/g,m=>m.toLowerCase())}function b(t){const n=u(t);if(n===null||n===0)return "0 bytes";const e=["bytes","Kb","Mb","Gb","Tb","Pb","Eb","Zb","Yb"],r=2,o=1024,m=Math.floor(Math.log(n)/Math.log(o));return `${parseFloat((n/o**m).toFixed(r))} ${e[m]}`}const p=(t,n=12)=>+Number(t).toFixed(n);function N(t){return t===0||t==="0"?"0":typeof t=="string"?t.padStart(2,"0"):t.toString().padStart(2,"0")}const g=t=>new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"}).format(t||0);
|
|
2
|
+
|
|
3
|
+
export { a as fCurrency, g as fCurrencyBRL, b as fData, s as fNumber, l as fPercent, f as fShortenNumber, N as fTwoDigits, p as fWithDecimalPlacesOrNot };
|
package/dist/utils/formatTime.js
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import t from 'dayjs';
|
|
2
|
+
import p from 'dayjs/plugin/duration';
|
|
3
|
+
import D from 'dayjs/plugin/relativeTime';
|
|
4
|
+
|
|
5
|
+
t.extend(p),t.extend(D);const l={dateTime:"DD/MM/YYYY HH:mm",date:"DD/MM/YYYY",time:"HH:mm",split:{dateTime:"DD/MM/YYYY HH:mm",date:"DD/MM/YYYY"},paramCase:{dateTime:"DD/MM/YYYY HH:mm",date:"DD/MM/YYYY"}};function P(r){return t(new Date).startOf("day").format(r)}function v(r,i){return r?t(r).isValid()?t(r).format(i??l.dateTime):"Invalid time value":null}function u(r,i){return r?t(r).isValid()?t(r).format(i??l.date):"Invalid time value":null}function M(r,i){return r?t(r).isValid()?t(r).format(i??l.time):"Invalid time value":null}function f(r){return r?t(r).isValid()?t(r).valueOf():"Invalid time value":null}function k(r){return r?t(r).isValid()?t(r).toNow(!0):"Invalid time value":null}function F(r,i,e){if(!r||!i||!e)return !1;const o=f(r),a=f(i),n=f(e);return o&&a&&n?o>=a&&o<=n:!1}function Y(r,i){return t(r).isAfter(i)}function c(r,i,e){return !r||!i?!1:t(r).isValid()&&t(i).isValid()?t(r).isSame(i,e??"year"):"Invalid time value"}function b(r,i,e){const o=t(r).isValid()&&t(i).isValid(),a=Y(r,i);if(!o||a)return "Invalid time value";let n=`${u(r)} - ${u(i)}`;if(e)return n;const m=c(r,i,"year"),s=c(r,i,"month"),d=c(r,i,"day");return m&&!s?n=`${u(r,"DD MMM")} - ${u(i)}`:m&&s&&!d?n=`${u(r,"DD")} - ${u(i)}`:m&&s&&d&&(n=`${u(i)}`),n}function I({years:r=0,months:i=0,days:e=0,hours:o=0,minutes:a=0,seconds:n=0,milliseconds:m=0}){return t().add(t.duration({years:r,months:i,days:e,hours:o,minutes:a,seconds:n,milliseconds:m})).format()}function T({years:r=0,months:i=0,days:e=0,hours:o=0,minutes:a=0,seconds:n=0,milliseconds:m=0}){return t().subtract(t.duration({years:r,months:i,days:e,hours:o,minutes:a,seconds:n,milliseconds:m})).format()}const S=(r,i)=>!r||!i?null:t(i).diff(t(r),"day");
|
|
6
|
+
|
|
7
|
+
export { I as fAdd, u as fDate, b as fDateRangeShortLabel, v as fDateTime, Y as fIsAfter, F as fIsBetween, c as fIsSame, T as fSub, M as fTime, f as fTimestamp, k as fToNow, l as formatStr, S as getDifferenceInDays, P as today };
|