@zydon/common 2.8.49 → 2.8.51
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-VITOOMKK.js → chunk-2A4XOLBZ.js} +5 -5
- package/dist/chunk-2A4XOLBZ.js.map +1 -0
- package/dist/{chunk-TCZOZ4MN.js → chunk-3XKGAQNO.js} +5 -5
- package/dist/{chunk-355PADXP.js → chunk-CMNW65VY.js} +2 -2
- package/dist/{chunk-ZPA4ILBJ.js → chunk-DRJ5UDF6.js} +2 -2
- package/dist/chunk-E3JTZTUB.js +34 -0
- package/dist/chunk-E3JTZTUB.js.map +1 -0
- package/dist/{chunk-QNSWRP73.js → chunk-EDO23OCC.js} +3 -3
- package/dist/chunk-EDO23OCC.js.map +1 -0
- package/dist/{chunk-TQ6SCWDM.js → chunk-EFAF33PQ.js} +2 -2
- package/dist/{chunk-37WASMP5.js → chunk-EWGZ2KSI.js} +5 -5
- package/dist/{chunk-37WASMP5.js.map → chunk-EWGZ2KSI.js.map} +1 -1
- package/dist/{chunk-GAFRG4ZI.js → chunk-GYABWIFG.js} +3 -3
- package/dist/chunk-GYABWIFG.js.map +1 -0
- package/dist/{chunk-TRYKRIZ4.js → chunk-HVH6MGHX.js} +2 -2
- package/dist/{chunk-MIUGCFD4.js → chunk-NR6PQELF.js} +2 -2
- package/dist/{chunk-55QAZ4P7.js → chunk-PVI5BAUW.js} +2 -2
- package/dist/{chunk-LRSF3YE6.js → chunk-PVVI43BW.js} +3 -3
- package/dist/chunk-PVVI43BW.js.map +1 -0
- package/dist/{chunk-QSRQZF6W.js → chunk-QT4ZQ2CJ.js} +4 -4
- package/dist/chunk-QT4ZQ2CJ.js.map +1 -0
- package/dist/{chunk-G2UA2MTH.js → chunk-RD6YLEVF.js} +2 -2
- package/dist/{chunk-NISJYXPQ.js → chunk-SKFBUMRN.js} +2 -2
- package/dist/{chunk-WRGRGZEM.js → chunk-UOIOBXCP.js} +2 -2
- package/dist/{chunk-LBIUKLXL.js → chunk-UOR22KQX.js} +3 -3
- package/dist/{chunk-I65HERAA.js → chunk-V7EE5E2H.js} +3 -3
- package/dist/{chunk-FTYHXGXC.js → chunk-VCK3DKB3.js} +2 -2
- package/dist/{chunk-DAK2RNNS.js → chunk-VKBDPAV4.js} +2 -2
- package/dist/{chunk-4GMBTAO6.js → chunk-VURAUMLN.js} +5 -5
- package/dist/chunk-VURAUMLN.js.map +1 -0
- package/dist/{chunk-QXFG6QNJ.js → chunk-YG74GZPD.js} +2 -2
- package/dist/{chunk-UOC2EFJ4.js → chunk-ZXK32CSF.js} +2 -2
- package/dist/components/ActionButton/index.js +3 -3
- package/dist/components/Actions/index.js +6 -2
- package/dist/components/Actions/index.js.map +1 -1
- package/dist/components/Autocomplete/index.js +3 -3
- package/dist/components/AvatarButton/index.d.ts +2 -2
- package/dist/components/AvatarButton/index.js +8 -8
- package/dist/components/BuilderLayout/index.js +3 -3
- package/dist/components/BuilderSidebar/index.js +2 -2
- package/dist/components/BulkEditModal/index.js +5 -5
- package/dist/components/BulkEditModal/index.js.map +1 -1
- package/dist/components/CardBrand/index.d.ts +1 -0
- package/dist/components/CardBrand/index.js +2 -2
- package/dist/components/Common/index.js +8 -8
- package/dist/components/Common/index.js.map +1 -1
- package/dist/components/CopyButton/index.js +3 -3
- package/dist/components/DataCards/index.js +1 -1
- package/dist/components/DataView/index.js +4 -4
- package/dist/components/DragButton/index.js +3 -3
- package/dist/components/Drawer/index.js +4 -4
- package/dist/components/Drawer/index.js.map +1 -1
- package/dist/components/DynamicDataView/index.d.ts +8 -8
- package/dist/components/DynamicDataView/index.js +8 -8
- package/dist/components/DynamicDataView/index.js.map +1 -1
- package/dist/components/EasyCropModal/index.js +4 -4
- package/dist/components/Error/index.js +2 -2
- package/dist/components/ExpandableGroup/index.js +4 -4
- package/dist/components/ExpandableGroup/index.js.map +1 -1
- package/dist/components/FileUpload/index.js +9 -9
- package/dist/components/FrameSkeleton/index.js +3 -3
- package/dist/components/FrameSkeleton/index.js.map +1 -1
- package/dist/components/HelpButton/index.js +3 -3
- package/dist/components/Icon/index.js +2 -2
- package/dist/components/IconButton/index.d.ts +2 -2
- package/dist/components/IconButton/index.js +3 -3
- package/dist/components/ImageCropModal/index.js +3 -3
- package/dist/components/Incrementer/index.js +3 -3
- package/dist/components/InfoCircle/index.d.ts +2 -2
- package/dist/components/InfoCircle/index.js +2 -2
- package/dist/components/ListBundles/index.js +3 -3
- package/dist/components/MenuItem/index.d.ts +2 -2
- package/dist/components/MenuItem/index.js +2 -2
- package/dist/components/Modal/index.js +3 -3
- package/dist/components/MoreMenu/index.js +2 -2
- package/dist/components/NotFound/index.js +2 -2
- package/dist/components/PasswordRules/index.js +2 -2
- package/dist/components/PopoverSelect/index.js +2 -2
- package/dist/components/SearchInput/index.js +3 -3
- package/dist/components/SelectList/index.js +5 -5
- package/dist/components/SelectableCards/index.js +4 -4
- package/dist/components/SeoPreview/index.js +2 -2
- package/dist/components/StateDisplay/index.js +3 -3
- package/dist/components/Steps/index.js +2 -2
- package/dist/components/StyledTab/index.js +2 -2
- package/dist/components/SwapList/index.js +3 -3
- package/dist/components/ToggleTheme/index.js +6 -6
- package/dist/components/WebhookCard/index.js +6 -6
- package/dist/components/WebhookCard/index.js.map +1 -1
- package/dist/components/animate/index.d.ts +1 -0
- package/dist/components/animate/index.js +1 -1
- package/dist/components/carousel/index.d.ts +8 -4
- package/dist/components/carousel/index.js +3 -3
- package/dist/components/form/Address/index.js +4 -4
- package/dist/components/form/Autocomplete/index.js +4 -4
- package/dist/components/form/FileUpload/index.js +9 -9
- package/dist/components/form/Incrementer/index.js +3 -3
- package/dist/components/form/Password/index.js +2 -2
- package/dist/components/form/SelectList/index.js +5 -5
- package/dist/components/form/SelectableCards/index.js +4 -4
- package/dist/components/form/Webhook/index.js +8 -8
- package/dist/components/form/Webhook/index.js.map +1 -1
- package/dist/components/lightbox/index.d.ts +4 -4
- package/dist/components/lightbox/index.js +3 -3
- package/dist/components/lightbox/index.js.map +1 -1
- package/dist/components/table/index.js +3 -3
- package/dist/hooks/useThemeToggle.js +6 -6
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.js +6 -6
- package/dist/theme/core/index.js +2 -2
- package/dist/theme/theme-provider.js +6 -6
- package/dist/theme/with-settings/index.js +2 -2
- package/dist/types/icon.d.ts +14 -2
- package/dist/types/icon.js +1 -1
- package/dist/types/iconProps.d.ts +5 -3
- package/dist/types/option.d.ts +2 -2
- package/dist/utils/buildExportPayload.js +1 -1
- package/dist/utils/loadable.js +2 -2
- package/dist/utils/loadable.js.map +1 -1
- package/package.json +3 -2
- package/dist/chunk-4GMBTAO6.js.map +0 -1
- package/dist/chunk-7W2HCCEV.js +0 -34
- package/dist/chunk-7W2HCCEV.js.map +0 -1
- package/dist/chunk-GAFRG4ZI.js.map +0 -1
- package/dist/chunk-IPPNUP2X.js +0 -7
- package/dist/chunk-IPPNUP2X.js.map +0 -1
- package/dist/chunk-LRSF3YE6.js.map +0 -1
- package/dist/chunk-QNSWRP73.js.map +0 -1
- package/dist/chunk-QSRQZF6W.js.map +0 -1
- package/dist/chunk-VITOOMKK.js.map +0 -1
- package/dist/components/CardBrandText/index.d.ts +0 -7
- package/dist/components/CardBrandText/index.js +0 -9
- package/dist/components/CardBrandText/index.js.map +0 -1
- package/dist/components/DragContainer/index.d.ts +0 -25
- package/dist/components/DragContainer/index.js +0 -8
- package/dist/components/DragContainer/index.js.map +0 -1
- package/dist/components/DrawerActions/index.d.ts +0 -3
- package/dist/components/DrawerActions/index.js +0 -3
- package/dist/components/DrawerActions/index.js.map +0 -1
- package/dist/components/ModalActions/index.d.ts +0 -3
- package/dist/components/ModalActions/index.js +0 -3
- package/dist/components/ModalActions/index.js.map +0 -1
- /package/dist/{chunk-TCZOZ4MN.js.map → chunk-3XKGAQNO.js.map} +0 -0
- /package/dist/{chunk-355PADXP.js.map → chunk-CMNW65VY.js.map} +0 -0
- /package/dist/{chunk-ZPA4ILBJ.js.map → chunk-DRJ5UDF6.js.map} +0 -0
- /package/dist/{chunk-TQ6SCWDM.js.map → chunk-EFAF33PQ.js.map} +0 -0
- /package/dist/{chunk-TRYKRIZ4.js.map → chunk-HVH6MGHX.js.map} +0 -0
- /package/dist/{chunk-MIUGCFD4.js.map → chunk-NR6PQELF.js.map} +0 -0
- /package/dist/{chunk-55QAZ4P7.js.map → chunk-PVI5BAUW.js.map} +0 -0
- /package/dist/{chunk-G2UA2MTH.js.map → chunk-RD6YLEVF.js.map} +0 -0
- /package/dist/{chunk-NISJYXPQ.js.map → chunk-SKFBUMRN.js.map} +0 -0
- /package/dist/{chunk-WRGRGZEM.js.map → chunk-UOIOBXCP.js.map} +0 -0
- /package/dist/{chunk-LBIUKLXL.js.map → chunk-UOR22KQX.js.map} +0 -0
- /package/dist/{chunk-I65HERAA.js.map → chunk-V7EE5E2H.js.map} +0 -0
- /package/dist/{chunk-FTYHXGXC.js.map → chunk-VCK3DKB3.js.map} +0 -0
- /package/dist/{chunk-DAK2RNNS.js.map → chunk-VKBDPAV4.js.map} +0 -0
- /package/dist/{chunk-QXFG6QNJ.js.map → chunk-YG74GZPD.js.map} +0 -0
- /package/dist/{chunk-UOC2EFJ4.js.map → chunk-ZXK32CSF.js.map} +0 -0
package/dist/theme/core/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { b as defaultFont, c as primaryFont, d as secondaryFont, a as shadows, e as typography } from '../../chunk-
|
|
2
|
-
export { l as action, k as background, m as basePalette, p as colorSchemes, i as common, a as components, q as createShadowColor, r as customShadows, o as darkPalette, h as error, b as grey, e as info, n as lightPalette, c as primary, d as secondary, f as success, j as text, g as warning } from '../../chunk-
|
|
1
|
+
export { b as defaultFont, c as primaryFont, d as secondaryFont, a as shadows, e as typography } from '../../chunk-VCK3DKB3.js';
|
|
2
|
+
export { l as action, k as background, m as basePalette, p as colorSchemes, i as common, a as components, q as createShadowColor, r as customShadows, o as darkPalette, h as error, b as grey, e as info, n as lightPalette, c as primary, d as secondary, f as success, j as text, g as warning } from '../../chunk-PVVI43BW.js';
|
|
3
3
|
import '../../chunk-HBOBTNB5.js';
|
|
4
4
|
import '../../chunk-GLRLKFPS.js';
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { b as default } from '../chunk-
|
|
1
|
+
export { b as default } from '../chunk-3XKGAQNO.js';
|
|
2
2
|
import '../chunk-373WGZZL.js';
|
|
3
|
-
|
|
4
|
-
import '../chunk-FTYHXGXC.js';
|
|
5
|
-
import '../chunk-WRGRGZEM.js';
|
|
3
|
+
import '../chunk-UOIOBXCP.js';
|
|
6
4
|
import '../chunk-KYV74QIT.js';
|
|
7
|
-
import '../chunk-LRSF3YE6.js';
|
|
8
|
-
import '../chunk-HBOBTNB5.js';
|
|
9
5
|
import '../chunk-WUFEPE2G.js';
|
|
6
|
+
export { b as useSettingsContext } from '../chunk-BX2DSNRV.js';
|
|
7
|
+
import '../chunk-VCK3DKB3.js';
|
|
8
|
+
import '../chunk-PVVI43BW.js';
|
|
9
|
+
import '../chunk-HBOBTNB5.js';
|
|
10
10
|
export { a as THEME_CONFIG } from '../chunk-GLRLKFPS.js';
|
|
11
11
|
//# sourceMappingURL=theme-provider.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { c as buildPrimaryColors, b as updateComponentsWithSettings, a as updateCoreWithSettings } from '../../chunk-
|
|
1
|
+
export { c as buildPrimaryColors, b as updateComponentsWithSettings, a as updateCoreWithSettings } from '../../chunk-UOIOBXCP.js';
|
|
2
2
|
import '../../chunk-KYV74QIT.js';
|
|
3
|
-
import '../../chunk-
|
|
3
|
+
import '../../chunk-PVVI43BW.js';
|
|
4
4
|
import '../../chunk-HBOBTNB5.js';
|
|
5
5
|
import '../../chunk-GLRLKFPS.js';
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
package/dist/types/icon.d.ts
CHANGED
|
@@ -435,6 +435,7 @@ declare enum Icon {
|
|
|
435
435
|
CANCEL_CIRCLE_SOLID = "CANCEL_CIRCLE_SOLID",
|
|
436
436
|
SORTING_AZ_02 = "SORTING_AZ_02",
|
|
437
437
|
DASHBOARD_SQUARE_03 = "DASHBOARD_SQUARE_03",
|
|
438
|
+
DOWNLOAD = "DOWNLOAD",
|
|
438
439
|
MEDIA_VIDEO_FILES = "MEDIA_VIDEO_FILES",
|
|
439
440
|
MEDIA_IMAGE_FILES = "MEDIA_IMAGE_FILES",
|
|
440
441
|
MEDIA_PDF_FILES = "MEDIA_PDF_FILES",
|
|
@@ -491,6 +492,17 @@ declare enum Icon {
|
|
|
491
492
|
VISA_BADGE = "VISA_BADGE",
|
|
492
493
|
TRANSACTION_HISTORY = "TRANSACTION_HISTORY"
|
|
493
494
|
}
|
|
494
|
-
declare const ICON_ALIASES:
|
|
495
|
+
declare const ICON_ALIASES: {
|
|
496
|
+
readonly ARROW_LEFT_SIMPLE: Icon.CHEVRON_LEFT;
|
|
497
|
+
readonly ARROW_RIGHT_SIMPLE: Icon.CHEVRON_RIGHT;
|
|
498
|
+
readonly ARROW_UP_SIMPLE: Icon.CHEVRON_UP;
|
|
499
|
+
readonly WARNING_TRIANGULE: Icon.WARNING_TRIANGLE;
|
|
500
|
+
readonly BOX: Icon.PACKAGE;
|
|
501
|
+
readonly PLAY_EXECUTE: Icon.PLAY_SIMPLE;
|
|
502
|
+
readonly USER_REQUEST_ACCESS: Icon.USER;
|
|
503
|
+
readonly LIST_CLOCK: Icon.TRANSACTION_HISTORY;
|
|
504
|
+
readonly DOWNLOAD_EXPORT_04: Icon.DOWNLOAD;
|
|
505
|
+
};
|
|
506
|
+
type IconName = keyof typeof Icon | keyof typeof ICON_ALIASES;
|
|
495
507
|
|
|
496
|
-
export { ICON_ALIASES, Icon };
|
|
508
|
+
export { ICON_ALIASES, Icon, IconName };
|
package/dist/types/icon.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { b as ICON_ALIASES, a as Icon } from '../chunk-
|
|
1
|
+
export { b as ICON_ALIASES, a as Icon } from '../chunk-EDO23OCC.js';
|
|
2
2
|
//# sourceMappingURL=icon.js.map
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
1
2
|
import { BoxProps } from '@mui/material/Box';
|
|
2
|
-
import {
|
|
3
|
+
import { IconName } from './icon.js';
|
|
3
4
|
|
|
4
5
|
interface IconProps extends BoxProps {
|
|
5
|
-
icon:
|
|
6
|
+
icon: IconName;
|
|
6
7
|
}
|
|
8
|
+
type IconsMap = Record<string, ComponentType>;
|
|
7
9
|
|
|
8
|
-
export { IconProps };
|
|
10
|
+
export { IconProps, IconsMap };
|
package/dist/types/option.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IconName } from './icon.js';
|
|
2
2
|
|
|
3
3
|
interface FieldValue {
|
|
4
4
|
label: string;
|
|
@@ -14,7 +14,7 @@ interface Option {
|
|
|
14
14
|
field3?: FieldValue;
|
|
15
15
|
field4?: FieldValue;
|
|
16
16
|
field5?: FieldValue;
|
|
17
|
-
icon?:
|
|
17
|
+
icon?: IconName;
|
|
18
18
|
[key: string]: unknown;
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import '../chunk-VL4W63YA.js';
|
|
2
1
|
import '../chunk-4P2L7UJA.js';
|
|
2
|
+
import '../chunk-VL4W63YA.js';
|
|
3
3
|
|
|
4
4
|
var u=(t,e)=>{if(!(!t?.fields||!e))return t.fields.find(r=>r.name===e||r.filter_field_name===e)},i=(t,e)=>{if(!e)return;let r=u(t,e);return t?.fields?r?.filter_field_name||r?.name:e},f=(t,e)=>{if(!(!t?.fields||!e||e.length===0))return e.filter(r=>r!=="ACTIONS")},l=(t,e)=>{let r=e?.trim();if(!r)return;let n=i(t,t?.description_field_name)||i(t,"name");if(n)return {operator:"AND",groups:[{operator:"AND",conditionals:[{fieldName:n,conditional:"LIKE",value:[r]}]}]}},p=(t,e,r)=>{if(!e||!r)return;let n=i(t,e);if(n)return {fieldName:n,sortType:r==="desc"?"DESC":"ASC"}},c=({metadata:t,visibleFieldNames:e,search:r,sort:n,dir:s})=>{let o=f(t,e),d=l(t,r),a=p(t,n,s);return {...o&&{criteria:o},...d&&{filter:d},...a&&{sort:a}}},y=c;
|
|
5
5
|
|
package/dist/utils/loadable.js
CHANGED
|
@@ -2,7 +2,7 @@ import { a } from '../chunk-6U5LS7MP.js';
|
|
|
2
2
|
import { Suspense, Component, useEffect } from 'react';
|
|
3
3
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var p=()=>(useEffect(()=>{window.location.reload();},[]),null),s=p;var o=class extends Component{constructor(r){super(r),this.state={hasError:!1,reloadPage:!1};}static getDerivedStateFromError(r){return r.message.startsWith("Failed to fetch dynamically imported module:")?{hasError:!0,reloadPage:!0}:{hasError:!0,reloadPage:!1}}componentDidCatch(r,a){console.error("Error caught in error boundary:",r,a);}render(){return this.state.hasError&&this.state.reloadPage?jsx(s,{}):this.state.hasError?this.props.fallback||jsx(Fragment,{children:"Ocorreu um erro inesperado. Atualize a p\xE1gina e tente novamente."}):this.props.children}},u=o;var c=(t,r=!0)=>function(i){return jsx(u,{children:jsx(Suspense,{fallback:r?jsx(a,{}):void 0,children:jsx(t,{...i})})})},F=c;
|
|
6
6
|
|
|
7
|
-
export {
|
|
7
|
+
export { F as default };
|
|
8
8
|
//# sourceMappingURL=loadable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/loadable.tsx","../../src/components/ErrorBoundary/index.tsx","../../src/components/ReloadPage/index.
|
|
1
|
+
{"version":3,"sources":["../../src/utils/loadable.tsx","../../src/components/ErrorBoundary/index.tsx","../../src/components/ReloadPage/index.ts"],"names":["Suspense","Component","useEffect","ReloadPage","ReloadPage_default","Fragment","jsx","ErrorBoundary","props","err","error","errorInfo","ErrorBoundary_default","loadable","LazyComponent","showLoading","FixedProgressBar_default","loadable_default"],"mappings":"yCACA,OAAsB,YAAAA,MAAgB,QCAtC,OAAS,aAAAC,MAAuC,QCDhD,OAAS,aAAAC,MAAiB,QAE1B,IAAMC,EAAa,KACjBD,EAAU,IAAM,CACd,OAAO,SAAS,OAAO,CACzB,EAAG,CAAC,CAAC,EAEE,MAGFE,EAAQD,EDmBF,OAMH,YAAAE,EANG,OAAAC,MAAA,oBAtBb,IAAMC,EAAN,cAA4BN,CAAkD,CAC5E,YAAYO,EAA2B,CACrC,MAAMA,CAAK,EACX,KAAK,MAAQ,CAAE,SAAU,GAAO,WAAY,EAAM,CACpD,CAEA,OAAO,yBAAyBC,EAAgC,CAC9D,OACEA,EAAI,QAAQ,WAAW,8CAA8C,EAE9D,CAAE,SAAU,GAAM,WAAY,EAAK,EAGrC,CAAE,SAAU,GAAM,WAAY,EAAM,CAC7C,CAEA,kBAAkBC,EAAcC,EAA4B,CAC1D,QAAQ,MAAM,kCAAmCD,EAAOC,CAAS,CACnE,CAEA,QAAoB,CAClB,OAAI,KAAK,MAAM,UAAY,KAAK,MAAM,WAC7BL,EAACF,EAAA,EAAW,EAGjB,KAAK,MAAM,SAEX,KAAK,MAAM,UACTE,EAAAD,EAAA,CAAE,+EAAgE,EAIjE,KAAK,MAAM,QACpB,CACF,EAEOO,EAAQL,EDjC2B,cAAAD,MAAA,oBAJ1C,IAAMO,EAAW,CAACC,EAA4BC,EAAc,KACnD,SAAgBP,EAAgC,CACrD,OACEF,EAACM,EAAA,CACC,SAAAN,EAACN,EAAA,CAAS,SAAUe,EAAcT,EAACU,EAAA,EAAiB,EAAK,OACvD,SAAAV,EAACQ,EAAA,CAAe,GAAGN,EAAO,EAC5B,EACF,CAEJ,EAGKS,EAAQJ","sourcesContent":["/* eslint-disable react/function-component-definition */\nimport { ElementType, Suspense } from 'react';\n\nimport ErrorBoundary from 'components/ErrorBoundary';\nimport FixedProgressBar from 'components/FixedProgressBar';\n\nconst loadable = (LazyComponent: ElementType, showLoading = true) => {\n return function Loader(props: Record<string, unknown>) {\n return (\n <ErrorBoundary>\n <Suspense fallback={showLoading ? <FixedProgressBar /> : undefined}>\n <LazyComponent {...props} />\n </Suspense>\n </ErrorBoundary>\n );\n };\n};\n\nexport default loadable;\n","/* eslint-disable no-console */\nimport { Component, ErrorInfo, ReactNode } from 'react';\n\nimport ReloadPage from 'components/ReloadPage';\n\nimport type { ErrorBoundaryProps, ErrorBoundaryState } from './props';\n\nclass ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {\n constructor(props: ErrorBoundaryProps) {\n super(props);\n this.state = { hasError: false, reloadPage: false };\n }\n\n static getDerivedStateFromError(err: Error): ErrorBoundaryState {\n if (\n err.message.startsWith('Failed to fetch dynamically imported module:')\n ) {\n return { hasError: true, reloadPage: true };\n }\n\n return { hasError: true, reloadPage: false };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo): void {\n console.error('Error caught in error boundary:', error, errorInfo);\n }\n\n render(): ReactNode {\n if (this.state.hasError && this.state.reloadPage) {\n return <ReloadPage />;\n }\n\n if (this.state.hasError)\n return (\n this.props.fallback || (\n <>Ocorreu um erro inesperado. Atualize a página e tente novamente.</>\n )\n );\n\n return this.props.children;\n }\n}\n\nexport default ErrorBoundary;\n","import { useEffect } from 'react';\n\nconst ReloadPage = () => {\n useEffect(() => {\n window.location.reload();\n }, []);\n\n return null;\n};\n\nexport default ReloadPage;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zydon/common",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.51",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"build": "tsup && node scripts/fix-sourcemaps.cjs",
|
|
28
28
|
"build:watch": "tsup --watch",
|
|
29
29
|
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
30
|
-
"lint:fix": "eslint --fix
|
|
30
|
+
"lint:fix": "eslint --fix . --ext ts,tsx",
|
|
31
31
|
"format": "prettier --write \"**/*.*\""
|
|
32
32
|
},
|
|
33
33
|
"exports": {
|
|
@@ -122,6 +122,7 @@
|
|
|
122
122
|
"eslint": "^8.47.0",
|
|
123
123
|
"eslint-config-prettier": "^9.0.0",
|
|
124
124
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
125
|
+
"eslint-plugin-local-rules": "^3.0.2",
|
|
125
126
|
"eslint-plugin-prettier": "^5.0.0",
|
|
126
127
|
"eslint-plugin-react": "^7.33.2",
|
|
127
128
|
"eslint-plugin-react-hooks": "^4.6.0",
|