@omnitron-dev/prism 0.3.0 → 0.3.2
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/README.md +216 -2
- package/THIRD-PARTY-NOTICES.txt +26 -0
- package/dist/accessibility/index.js +2 -0
- package/dist/accessibility/index.js.map +1 -1
- package/dist/auth/index.d.ts +4 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +4 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/blocks/auth-block/guards.d.ts +3 -2
- package/dist/blocks/auth-block/guards.d.ts.map +1 -1
- package/dist/blocks/dashboard-block/dashboard-block.d.ts.map +1 -1
- package/dist/blocks/dashboard-block/types.d.ts +4 -2
- package/dist/blocks/dashboard-block/types.d.ts.map +1 -1
- package/dist/blocks/dashboard-block/use-dashboard-block.d.ts +2 -2
- package/dist/blocks/dashboard-block/use-dashboard-block.d.ts.map +1 -1
- package/dist/blocks/data-grid-block/data-grid-block.d.ts.map +1 -1
- package/dist/blocks/data-grid-block/types.d.ts +3 -0
- package/dist/blocks/data-grid-block/types.d.ts.map +1 -1
- package/dist/blocks/index.js +80 -253
- package/dist/blocks/index.js.map +1 -1
- package/dist/chunk-2AB7VGPW.js +447 -0
- package/dist/chunk-2AB7VGPW.js.map +1 -0
- package/dist/{chunk-WFD54GQQ.js → chunk-2E67PQ4T.js} +14 -573
- package/dist/chunk-2E67PQ4T.js.map +1 -0
- package/dist/chunk-2KG2NI73.js +84 -0
- package/dist/chunk-2KG2NI73.js.map +1 -0
- package/dist/chunk-2UYRW6X3.js +44 -0
- package/dist/chunk-2UYRW6X3.js.map +1 -0
- package/dist/chunk-36C5H56C.js +208 -0
- package/dist/chunk-36C5H56C.js.map +1 -0
- package/dist/chunk-36FOXX25.js +73 -0
- package/dist/chunk-36FOXX25.js.map +1 -0
- package/dist/chunk-3VSM7NZG.js +562 -0
- package/dist/chunk-3VSM7NZG.js.map +1 -0
- package/dist/chunk-4B2LTPK2.js +826 -0
- package/dist/chunk-4B2LTPK2.js.map +1 -0
- package/dist/chunk-4HUGZJKU.js +108 -0
- package/dist/chunk-4HUGZJKU.js.map +1 -0
- package/dist/chunk-4Q5L7LDG.js +74 -0
- package/dist/chunk-4Q5L7LDG.js.map +1 -0
- package/dist/{chunk-BRDWQVRT.js → chunk-4R7EZ7GQ.js} +3 -2
- package/dist/chunk-4R7EZ7GQ.js.map +1 -0
- package/dist/chunk-6IANOSMD.js +185 -0
- package/dist/chunk-6IANOSMD.js.map +1 -0
- package/dist/chunk-7ATBURW2.js +206 -0
- package/dist/chunk-7ATBURW2.js.map +1 -0
- package/dist/{chunk-6AHI4GSV.js → chunk-AATAOOSF.js} +4 -3
- package/dist/chunk-AATAOOSF.js.map +1 -0
- package/dist/chunk-AKLRKCYH.js +128 -0
- package/dist/chunk-AKLRKCYH.js.map +1 -0
- package/dist/chunk-CT46KJOR.js +133 -0
- package/dist/chunk-CT46KJOR.js.map +1 -0
- package/dist/{chunk-YQW43BDH.js → chunk-D4GFAJAZ.js} +1168 -6354
- package/dist/chunk-D4GFAJAZ.js.map +1 -0
- package/dist/chunk-D5J3KW6Q.js +106 -0
- package/dist/chunk-D5J3KW6Q.js.map +1 -0
- package/dist/chunk-DEPJRTVT.js +3 -0
- package/dist/{chunk-FU52GL2E.js.map → chunk-DEPJRTVT.js.map} +1 -1
- package/dist/{chunk-S6SEGBX6.js → chunk-DHTYHUYI.js} +85 -107
- package/dist/chunk-DHTYHUYI.js.map +1 -0
- package/dist/chunk-E7WM2RXA.js +249 -0
- package/dist/chunk-E7WM2RXA.js.map +1 -0
- package/dist/chunk-F6RZ7LW6.js +1271 -0
- package/dist/chunk-F6RZ7LW6.js.map +1 -0
- package/dist/chunk-FOGY3HA4.js +217 -0
- package/dist/chunk-FOGY3HA4.js.map +1 -0
- package/dist/chunk-G2GANYMW.js +139 -0
- package/dist/chunk-G2GANYMW.js.map +1 -0
- package/dist/chunk-I6DILPFE.js +293 -0
- package/dist/chunk-I6DILPFE.js.map +1 -0
- package/dist/chunk-IRYU3NTG.js +573 -0
- package/dist/chunk-IRYU3NTG.js.map +1 -0
- package/dist/chunk-JTIUGPW5.js +284 -0
- package/dist/chunk-JTIUGPW5.js.map +1 -0
- package/dist/{chunk-GUFHFEPZ.js → chunk-JZBSPDED.js} +2 -2
- package/dist/{chunk-GUFHFEPZ.js.map → chunk-JZBSPDED.js.map} +1 -1
- package/dist/chunk-KPY7TA4D.js +191 -0
- package/dist/chunk-KPY7TA4D.js.map +1 -0
- package/dist/{chunk-OBJ244BO.js → chunk-LFWKGNCX.js} +50 -656
- package/dist/chunk-LFWKGNCX.js.map +1 -0
- package/dist/chunk-LH4ZZZYB.js +37 -0
- package/dist/chunk-LH4ZZZYB.js.map +1 -0
- package/dist/chunk-NFJ7CPG3.js +13 -0
- package/dist/chunk-NFJ7CPG3.js.map +1 -0
- package/dist/chunk-NFPOIHD4.js +3 -0
- package/dist/{chunk-AYYFMTMI.js.map → chunk-NFPOIHD4.js.map} +1 -1
- package/dist/{chunk-XIXSSI3B.js → chunk-NJM5AVBM.js} +3 -2
- package/dist/chunk-NJM5AVBM.js.map +1 -0
- package/dist/{chunk-Z5OSPAOC.js → chunk-NSNM53WI.js} +196 -175
- package/dist/chunk-NSNM53WI.js.map +1 -0
- package/dist/chunk-NTREGTG7.js +31 -0
- package/dist/chunk-NTREGTG7.js.map +1 -0
- package/dist/{chunk-ADG4HZEP.js → chunk-OKJA6SJM.js} +4 -4
- package/dist/chunk-OKJA6SJM.js.map +1 -0
- package/dist/chunk-Q6JDNFSG.js +303 -0
- package/dist/chunk-Q6JDNFSG.js.map +1 -0
- package/dist/chunk-RPOGINR5.js +115 -0
- package/dist/chunk-RPOGINR5.js.map +1 -0
- package/dist/{chunk-ZTATTUH7.js → chunk-RSWVYIXK.js} +282 -683
- package/dist/chunk-RSWVYIXK.js.map +1 -0
- package/dist/chunk-SSEHL5VP.js +110 -0
- package/dist/chunk-SSEHL5VP.js.map +1 -0
- package/dist/chunk-TEIGUOWN.js +523 -0
- package/dist/chunk-TEIGUOWN.js.map +1 -0
- package/dist/{chunk-AYYFMTMI.js → chunk-TJ7DHXUX.js} +2 -2
- package/dist/chunk-TJ7DHXUX.js.map +1 -0
- package/dist/chunk-TZHWYT34.js +590 -0
- package/dist/chunk-TZHWYT34.js.map +1 -0
- package/dist/chunk-TZWHELY4.js +45 -0
- package/dist/chunk-TZWHELY4.js.map +1 -0
- package/dist/{chunk-BZOL7GMU.js → chunk-UEINJFLS.js} +7 -7
- package/dist/chunk-UEINJFLS.js.map +1 -0
- package/dist/chunk-URFQX3I6.js +129 -0
- package/dist/chunk-URFQX3I6.js.map +1 -0
- package/dist/chunk-VG6FOMOH.js +187 -0
- package/dist/chunk-VG6FOMOH.js.map +1 -0
- package/dist/chunk-VQVVHMPG.js +106 -0
- package/dist/chunk-VQVVHMPG.js.map +1 -0
- package/dist/{chunk-DRFNMZLG.js → chunk-VUKOT432.js} +3 -2
- package/dist/chunk-VUKOT432.js.map +1 -0
- package/dist/chunk-WD4N72DL.js +315 -0
- package/dist/chunk-WD4N72DL.js.map +1 -0
- package/dist/chunk-XBYMG4QK.js +119 -0
- package/dist/chunk-XBYMG4QK.js.map +1 -0
- package/dist/chunk-YHM6GIHV.js +3 -0
- package/dist/chunk-YHM6GIHV.js.map +1 -0
- package/dist/{chunk-SNZK5X6F.js → chunk-Z2AN43YU.js} +4 -2
- package/dist/chunk-Z2AN43YU.js.map +1 -0
- package/dist/chunk-ZNWHMQRM.js +171 -0
- package/dist/chunk-ZNWHMQRM.js.map +1 -0
- package/dist/{chunk-YSIG2XYH.js → chunk-ZRJYQN6Y.js} +2 -2
- package/dist/{chunk-YSIG2XYH.js.map → chunk-ZRJYQN6Y.js.map} +1 -1
- package/dist/{chunk-AD4W7HYC.js → chunk-ZYI3MHLE.js} +3 -2
- package/dist/chunk-ZYI3MHLE.js.map +1 -0
- package/dist/cli/index.js +66 -423
- package/dist/cli/index.js.map +1 -1
- package/dist/components/accordion/accordion.d.ts.map +1 -1
- package/dist/components/admin-filters/admin-data-table.d.ts +7 -1
- package/dist/components/admin-filters/admin-data-table.d.ts.map +1 -1
- package/dist/components/admin-filters/filter-toolbar.d.ts.map +1 -1
- package/dist/components/admin-filters/index.js +8 -0
- package/dist/components/admin-filters/index.js.map +1 -0
- package/dist/components/alert/alert.d.ts.map +1 -1
- package/dist/components/alert/index.js +5 -0
- package/dist/components/alert/index.js.map +1 -0
- package/dist/components/animate/index.js +5 -0
- package/dist/components/animate/index.js.map +1 -0
- package/dist/components/breadcrumbs/breadcrumbs.d.ts.map +1 -1
- package/dist/components/breadcrumbs/index.js +4 -0
- package/dist/components/breadcrumbs/index.js.map +1 -0
- package/dist/components/card/index.js +4 -0
- package/dist/components/card/index.js.map +1 -0
- package/dist/components/chart/chart.d.ts.map +1 -1
- package/dist/components/chart/index.css +52 -0
- package/dist/components/chart/index.css.map +1 -0
- package/dist/components/chart/index.js +5 -0
- package/dist/components/chart/index.js.map +1 -0
- package/dist/components/chart/types.d.ts +3 -1
- package/dist/components/chart/types.d.ts.map +1 -1
- package/dist/components/chart/use-chart.d.ts.map +1 -1
- package/dist/components/command-palette/command-palette.d.ts +3 -1
- package/dist/components/command-palette/command-palette.d.ts.map +1 -1
- package/dist/components/command-palette/index.js +4 -0
- package/dist/components/command-palette/index.js.map +1 -0
- package/dist/components/confirm-dialog/index.js +4 -0
- package/dist/components/confirm-dialog/index.js.map +1 -0
- package/dist/components/date-input/date-input.d.ts +28 -0
- package/dist/components/date-input/date-input.d.ts.map +1 -0
- package/dist/components/date-input/index.d.ts +3 -0
- package/dist/components/date-input/index.d.ts.map +1 -0
- package/dist/components/date-input/value.d.ts +9 -0
- package/dist/components/date-input/value.d.ts.map +1 -0
- package/dist/components/doc-layout/doc-sidebar.d.ts +4 -1
- package/dist/components/doc-layout/doc-sidebar.d.ts.map +1 -1
- package/dist/components/doc-layout/index.js +7 -0
- package/dist/components/doc-layout/index.js.map +1 -0
- package/dist/components/editor/editor.d.ts.map +1 -1
- package/dist/components/editor/icons/index.d.ts +32 -40
- package/dist/components/editor/icons/index.d.ts.map +1 -1
- package/dist/components/editor/index.js +4 -1
- package/dist/components/editor/index.js.map +1 -1
- package/dist/components/emoji-picker/index.js +2 -1
- package/dist/components/emoji-picker/index.js.map +1 -1
- package/dist/components/empty-content/empty-content.d.ts.map +1 -1
- package/dist/components/empty-content/index.js +4 -0
- package/dist/components/empty-content/index.js.map +1 -0
- package/dist/components/error-boundary/error-boundary.d.ts.map +1 -1
- package/dist/components/error-boundary/index.js +6 -0
- package/dist/components/error-boundary/index.js.map +1 -0
- package/dist/components/index.css +17 -10
- package/dist/components/index.css.map +1 -1
- package/dist/components/index.d.ts +5 -4
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +47 -11
- package/dist/components/index.js.map +1 -1
- package/dist/components/knowledge-graph/edge-labels.d.ts +14 -0
- package/dist/components/knowledge-graph/edge-labels.d.ts.map +1 -0
- package/dist/components/knowledge-graph/graph.d.ts +56 -0
- package/dist/components/knowledge-graph/graph.d.ts.map +1 -0
- package/dist/components/knowledge-graph/index.css +176 -0
- package/dist/components/knowledge-graph/index.css.map +1 -0
- package/dist/components/knowledge-graph/index.d.ts +3 -0
- package/dist/components/knowledge-graph/index.d.ts.map +1 -0
- package/dist/components/knowledge-graph/index.js +797 -0
- package/dist/components/knowledge-graph/index.js.map +1 -0
- package/dist/components/knowledge-graph/label-layout.d.ts +28 -0
- package/dist/components/knowledge-graph/label-layout.d.ts.map +1 -0
- package/dist/components/knowledge-graph/label-store.d.ts +15 -0
- package/dist/components/knowledge-graph/label-store.d.ts.map +1 -0
- package/dist/components/knowledge-graph/model.d.ts +92 -0
- package/dist/components/knowledge-graph/model.d.ts.map +1 -0
- package/dist/components/label/index.js +5 -0
- package/dist/components/label/index.js.map +1 -0
- package/dist/components/label/label.d.ts.map +1 -1
- package/dist/components/lightbox/lightbox.d.ts.map +1 -1
- package/dist/components/loading-screen/index.js +4 -0
- package/dist/components/loading-screen/index.js.map +1 -0
- package/dist/components/map/Map.d.ts +19 -43
- package/dist/components/map/Map.d.ts.map +1 -1
- package/dist/components/map/MapCoverageLayer.d.ts +1 -1
- package/dist/components/map/MapCoverageLayer.d.ts.map +1 -1
- package/dist/components/map/MapMarker.d.ts +1 -1
- package/dist/components/map/MapMarker.d.ts.map +1 -1
- package/dist/components/map/MapPlaceSearch.d.ts +33 -0
- package/dist/components/map/MapPlaceSearch.d.ts.map +1 -0
- package/dist/components/map/MapPointPicker.d.ts +21 -12
- package/dist/components/map/MapPointPicker.d.ts.map +1 -1
- package/dist/components/map/coordinates.d.ts +10 -0
- package/dist/components/map/coordinates.d.ts.map +1 -0
- package/dist/components/map/index.css +4 -0
- package/dist/components/map/index.css.map +1 -0
- package/dist/components/map/index.d.ts +7 -2
- package/dist/components/map/index.d.ts.map +1 -1
- package/dist/components/map/index.js +4 -0
- package/dist/components/map/index.js.map +1 -0
- package/dist/components/nav-card/nav-card.d.ts.map +1 -1
- package/dist/components/navigation-progress/index.js +4 -0
- package/dist/components/navigation-progress/index.js.map +1 -0
- package/dist/components/page-content/index.js +4 -0
- package/dist/components/page-content/index.js.map +1 -0
- package/dist/components/popover/index.js +4 -0
- package/dist/components/popover/index.js.map +1 -0
- package/dist/components/rail/rail.d.ts.map +1 -1
- package/dist/components/research/diagram-image.d.ts +11 -0
- package/dist/components/research/diagram-image.d.ts.map +1 -0
- package/dist/components/research/diagram.d.ts +8 -0
- package/dist/components/research/diagram.d.ts.map +1 -0
- package/dist/components/research/document.d.ts +33 -0
- package/dist/components/research/document.d.ts.map +1 -0
- package/dist/components/research/frontmatter.d.ts +15 -0
- package/dist/components/research/frontmatter.d.ts.map +1 -0
- package/dist/components/research/index.css +51 -0
- package/dist/components/research/index.css.map +1 -0
- package/dist/components/research/index.d.ts +3 -0
- package/dist/components/research/index.d.ts.map +1 -0
- package/dist/components/research/index.js +8 -0
- package/dist/components/research/index.js.map +1 -0
- package/dist/components/research/parse.d.ts +29 -0
- package/dist/components/research/parse.d.ts.map +1 -0
- package/dist/components/research-editor/block-commands.d.ts +20 -0
- package/dist/components/research-editor/block-commands.d.ts.map +1 -0
- package/dist/components/research-editor/block-controls.d.ts +13 -0
- package/dist/components/research-editor/block-controls.d.ts.map +1 -0
- package/dist/components/research-editor/editor.d.ts +75 -0
- package/dist/components/research-editor/editor.d.ts.map +1 -0
- package/dist/components/research-editor/extensions.d.ts +14 -0
- package/dist/components/research-editor/extensions.d.ts.map +1 -0
- package/dist/components/research-editor/index.css +332 -0
- package/dist/components/research-editor/index.css.map +1 -0
- package/dist/components/research-editor/index.d.ts +5 -0
- package/dist/components/research-editor/index.d.ts.map +1 -0
- package/dist/components/research-editor/index.js +1593 -0
- package/dist/components/research-editor/index.js.map +1 -0
- package/dist/components/research-editor/math-input.d.ts +32 -0
- package/dist/components/research-editor/math-input.d.ts.map +1 -0
- package/dist/components/research-editor/math-markup.d.ts +4 -0
- package/dist/components/research-editor/math-markup.d.ts.map +1 -0
- package/dist/components/research-editor/math-navigation.d.ts +6 -0
- package/dist/components/research-editor/math-navigation.d.ts.map +1 -0
- package/dist/components/research-editor/math-node.d.ts +11 -0
- package/dist/components/research-editor/math-node.d.ts.map +1 -0
- package/dist/components/research-editor/source.d.ts +19 -0
- package/dist/components/research-editor/source.d.ts.map +1 -0
- package/dist/components/scroll-to-top/index.js +4 -0
- package/dist/components/scroll-to-top/index.js.map +1 -0
- package/dist/components/scrollbar/scrollbar.d.ts +4 -2
- package/dist/components/scrollbar/scrollbar.d.ts.map +1 -1
- package/dist/components/search-input/index.js +7 -0
- package/dist/components/search-input/index.js.map +1 -0
- package/dist/components/search-input/search-input.d.ts +3 -11
- package/dist/components/search-input/search-input.d.ts.map +1 -1
- package/dist/components/skeleton/index.js +4 -0
- package/dist/components/skeleton/index.js.map +1 -0
- package/dist/components/snackbar/index.js +6 -0
- package/dist/components/snackbar/index.js.map +1 -0
- package/dist/components/stepper/index.js +4 -0
- package/dist/components/stepper/index.js.map +1 -0
- package/dist/components/table/index.d.ts +1 -0
- package/dist/components/table/index.d.ts.map +1 -1
- package/dist/components/table/index.js +5 -0
- package/dist/components/table/index.js.map +1 -0
- package/dist/components/table/table-viewport.d.ts +13 -0
- package/dist/components/table/table-viewport.d.ts.map +1 -0
- package/dist/components/table/table.d.ts +3 -1
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/tabs/index.js +6 -0
- package/dist/components/tabs/index.js.map +1 -0
- package/dist/components/tabs/tabs.d.ts +12 -1
- package/dist/components/tabs/tabs.d.ts.map +1 -1
- package/dist/components/tiptap-renderer/tiptap-renderer.d.ts +4 -3
- package/dist/components/tiptap-renderer/tiptap-renderer.d.ts.map +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +12 -6
- package/dist/core/index.js.map +1 -1
- package/dist/core/provider.d.ts +7 -2
- package/dist/core/provider.d.ts.map +1 -1
- package/dist/forms/index.js +2 -0
- package/dist/forms/index.js.map +1 -1
- package/dist/forms/schema-provider.d.ts +3 -3
- package/dist/forms/schema-utils.d.ts +3 -3
- package/dist/hooks/index.js +14 -8
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/use-config-from-query.d.ts +2 -0
- package/dist/hooks/use-config-from-query.d.ts.map +1 -1
- package/dist/hooks/use-image-dimensions.d.ts.map +1 -1
- package/dist/hooks/use-keyboard-shortcut.d.ts.map +1 -1
- package/dist/hooks/use-scroll-position.d.ts.map +1 -1
- package/dist/hooks/use-window-size.d.ts.map +1 -1
- package/dist/icons/context.d.ts +17 -0
- package/dist/icons/context.d.ts.map +1 -0
- package/dist/icons/controls.d.ts +51 -0
- package/dist/icons/controls.d.ts.map +1 -0
- package/dist/icons/index.d.ts +3 -0
- package/dist/icons/index.d.ts.map +1 -0
- package/dist/icons/index.js +5 -0
- package/dist/icons/index.js.map +1 -0
- package/dist/icons/theme.d.ts +4 -0
- package/dist/icons/theme.d.ts.map +1 -0
- package/dist/index.css +17 -10
- package/dist/index.css.map +1 -1
- package/dist/index.js +57 -20
- package/dist/index.js.map +1 -1
- package/dist/internal/research-parser.js +3 -0
- package/dist/internal/research-parser.js.map +1 -0
- package/dist/layouts/core/header-section.d.ts +1 -0
- package/dist/layouts/core/header-section.d.ts.map +1 -1
- package/dist/layouts/dashboard/labels.d.ts +12 -0
- package/dist/layouts/dashboard/labels.d.ts.map +1 -0
- package/dist/layouts/dashboard/layout.d.ts +9 -1
- package/dist/layouts/dashboard/layout.d.ts.map +1 -1
- package/dist/layouts/dashboard/sidenav.d.ts +7 -3
- package/dist/layouts/dashboard/sidenav.d.ts.map +1 -1
- package/dist/layouts/index.d.ts +5 -0
- package/dist/layouts/index.d.ts.map +1 -1
- package/dist/layouts/index.js +9 -3
- package/dist/layouts/index.js.map +1 -1
- package/dist/layouts/panel-layout.d.ts +35 -0
- package/dist/layouts/panel-layout.d.ts.map +1 -0
- package/dist/layouts/sidebar-toggle.d.ts +11 -0
- package/dist/layouts/sidebar-toggle.d.ts.map +1 -0
- package/dist/netron/index.js +2 -1
- package/dist/netron/index.js.map +1 -1
- package/dist/registry/index.js +1 -1
- package/dist/state/create-store.d.ts.map +1 -1
- package/dist/state/index.js +3 -2
- package/dist/state/index.js.map +1 -1
- package/dist/state/settings-version.d.ts.map +1 -1
- package/dist/state/stores/auth.d.ts +4 -16
- package/dist/state/stores/auth.d.ts.map +1 -1
- package/dist/state/stores/ui.d.ts +7 -105
- package/dist/state/stores/ui.d.ts.map +1 -1
- package/dist/theme/components/Button.d.ts.map +1 -1
- package/dist/theme/components/Chip.d.ts.map +1 -1
- package/dist/theme/components/Dialog.d.ts.map +1 -1
- package/dist/theme/components/FormControls.d.ts +3 -12
- package/dist/theme/components/FormControls.d.ts.map +1 -1
- package/dist/theme/components/TextField.d.ts.map +1 -1
- package/dist/theme/components/index.d.ts.map +1 -1
- package/dist/theme/components/theme-utils.d.ts +2 -2
- package/dist/theme/components/theme-utils.d.ts.map +1 -1
- package/dist/theme/create-theme.d.ts +5 -17
- package/dist/theme/create-theme.d.ts.map +1 -1
- package/dist/theme/index.js +8 -2
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/mixins.d.ts +3 -1
- package/dist/theme/mixins.d.ts.map +1 -1
- package/dist/theme/palette/overrides.d.ts +24 -0
- package/dist/theme/palette/overrides.d.ts.map +1 -0
- package/dist/theme/semantic-surface.d.ts +8 -0
- package/dist/theme/semantic-surface.d.ts.map +1 -0
- package/dist/types/index.js +2 -2
- package/dist/ui/index.d.ts +18 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +149 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/utils/async-lock.d.ts.map +1 -1
- package/package.json +200 -47
- package/dist/chunk-6AHI4GSV.js.map +0 -1
- package/dist/chunk-AD4W7HYC.js.map +0 -1
- package/dist/chunk-ADG4HZEP.js.map +0 -1
- package/dist/chunk-BRDWQVRT.js.map +0 -1
- package/dist/chunk-BZOL7GMU.js.map +0 -1
- package/dist/chunk-DRFNMZLG.js.map +0 -1
- package/dist/chunk-FU52GL2E.js +0 -3
- package/dist/chunk-OBJ244BO.js.map +0 -1
- package/dist/chunk-S6SEGBX6.js.map +0 -1
- package/dist/chunk-SNZK5X6F.js.map +0 -1
- package/dist/chunk-WFD54GQQ.js.map +0 -1
- package/dist/chunk-XIXSSI3B.js.map +0 -1
- package/dist/chunk-YQW43BDH.js.map +0 -1
- package/dist/chunk-Z5OSPAOC.js.map +0 -1
- package/dist/chunk-ZTATTUH7.js.map +0 -1
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import InputBase from '@mui/material/InputBase';
|
|
3
|
-
import InputAdornment from '@mui/material/InputAdornment';
|
|
4
|
-
import Tooltip from '@mui/material/Tooltip';
|
|
5
|
-
import Box8 from '@mui/material/Box';
|
|
6
|
-
import { useTheme, alpha } from '@mui/material/styles';
|
|
7
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
|
-
import Stack from '@mui/material/Stack';
|
|
9
|
-
import Typography3 from '@mui/material/Typography';
|
|
1
|
+
import { useId, useMemo, useRef, useCallback, useState, useEffect } from 'react';
|
|
10
2
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
11
3
|
import TextField from '@mui/material/TextField';
|
|
4
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
12
5
|
import MenuItem from '@mui/material/MenuItem';
|
|
13
6
|
import Checkbox from '@mui/material/Checkbox';
|
|
14
7
|
import FormControlLabel from '@mui/material/FormControlLabel';
|
|
@@ -20,345 +13,26 @@ import Radio from '@mui/material/Radio';
|
|
|
20
13
|
import RadioGroup from '@mui/material/RadioGroup';
|
|
21
14
|
import Autocomplete from '@mui/material/Autocomplete';
|
|
22
15
|
import Chip from '@mui/material/Chip';
|
|
16
|
+
import Box6 from '@mui/material/Box';
|
|
23
17
|
import Rating from '@mui/material/Rating';
|
|
24
18
|
import Slider from '@mui/material/Slider';
|
|
19
|
+
import Typography2 from '@mui/material/Typography';
|
|
25
20
|
import { DatePicker } from '@mui/x-date-pickers/DatePicker';
|
|
26
21
|
import dayjs from 'dayjs';
|
|
27
22
|
import { TimePicker } from '@mui/x-date-pickers/TimePicker';
|
|
28
23
|
import { DateTimePicker } from '@mui/x-date-pickers/DateTimePicker';
|
|
29
24
|
import FormGroup from '@mui/material/FormGroup';
|
|
30
25
|
import { useDropzone } from 'react-dropzone';
|
|
31
|
-
import
|
|
26
|
+
import Stack from '@mui/material/Stack';
|
|
27
|
+
import IconButton from '@mui/material/IconButton';
|
|
32
28
|
import Avatar from '@mui/material/Avatar';
|
|
29
|
+
import { useTheme, alpha } from '@mui/material/styles';
|
|
30
|
+
import InputAdornment from '@mui/material/InputAdornment';
|
|
33
31
|
import Menu from '@mui/material/Menu';
|
|
34
32
|
import ListItemIcon from '@mui/material/ListItemIcon';
|
|
35
33
|
import ListItemText from '@mui/material/ListItemText';
|
|
36
|
-
import Button from '@mui/material/Button';
|
|
37
|
-
import Collapse from '@mui/material/Collapse';
|
|
38
|
-
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
|
39
|
-
import ContentCopyIcon from '@mui/icons-material/ContentCopy';
|
|
40
34
|
|
|
41
|
-
|
|
42
|
-
return /* @__PURE__ */ jsxs(
|
|
43
|
-
"svg",
|
|
44
|
-
{
|
|
45
|
-
width: size,
|
|
46
|
-
height: size,
|
|
47
|
-
viewBox: "0 0 24 24",
|
|
48
|
-
fill: "none",
|
|
49
|
-
stroke: "currentColor",
|
|
50
|
-
strokeWidth: "2",
|
|
51
|
-
strokeLinecap: "round",
|
|
52
|
-
strokeLinejoin: "round",
|
|
53
|
-
children: [
|
|
54
|
-
/* @__PURE__ */ jsx("circle", { cx: "11", cy: "11", r: "8" }),
|
|
55
|
-
/* @__PURE__ */ jsx("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })
|
|
56
|
-
]
|
|
57
|
-
}
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
function ClearIcon() {
|
|
61
|
-
return /* @__PURE__ */ jsxs(
|
|
62
|
-
"svg",
|
|
63
|
-
{
|
|
64
|
-
width: "14",
|
|
65
|
-
height: "14",
|
|
66
|
-
viewBox: "0 0 24 24",
|
|
67
|
-
fill: "none",
|
|
68
|
-
stroke: "currentColor",
|
|
69
|
-
strokeWidth: "2.5",
|
|
70
|
-
strokeLinecap: "round",
|
|
71
|
-
strokeLinejoin: "round",
|
|
72
|
-
children: [
|
|
73
|
-
/* @__PURE__ */ jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
74
|
-
/* @__PURE__ */ jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
75
|
-
]
|
|
76
|
-
}
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
function SearchInput({
|
|
80
|
-
value: controlledValue,
|
|
81
|
-
onChange,
|
|
82
|
-
placeholder = "Search...",
|
|
83
|
-
debounce = 0,
|
|
84
|
-
compact = false,
|
|
85
|
-
fullWidth = true,
|
|
86
|
-
width,
|
|
87
|
-
minWidth,
|
|
88
|
-
clearTooltip = "Clear",
|
|
89
|
-
autoFocus,
|
|
90
|
-
onFocus,
|
|
91
|
-
onBlur,
|
|
92
|
-
onKeyDown,
|
|
93
|
-
sx,
|
|
94
|
-
ref
|
|
95
|
-
}) {
|
|
96
|
-
const theme = useTheme();
|
|
97
|
-
const [localValue, setLocalValue] = useState(controlledValue ?? "");
|
|
98
|
-
const timerRef = useRef(void 0);
|
|
99
|
-
useEffect(() => {
|
|
100
|
-
if (controlledValue !== void 0) {
|
|
101
|
-
setLocalValue(controlledValue);
|
|
102
|
-
}
|
|
103
|
-
}, [controlledValue]);
|
|
104
|
-
const displayValue = controlledValue !== void 0 && debounce === 0 ? controlledValue : localValue;
|
|
105
|
-
const handleChange = (e) => {
|
|
106
|
-
const val = e.target.value;
|
|
107
|
-
setLocalValue(val);
|
|
108
|
-
if (debounce > 0) {
|
|
109
|
-
clearTimeout(timerRef.current);
|
|
110
|
-
timerRef.current = setTimeout(() => onChange?.(val), debounce);
|
|
111
|
-
} else {
|
|
112
|
-
onChange?.(val);
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
const handleClear = () => {
|
|
116
|
-
setLocalValue("");
|
|
117
|
-
clearTimeout(timerRef.current);
|
|
118
|
-
onChange?.("");
|
|
119
|
-
};
|
|
120
|
-
useEffect(() => () => clearTimeout(timerRef.current), []);
|
|
121
|
-
const py = compact ? 0.625 : 0.75;
|
|
122
|
-
const px = compact ? 1.25 : 1.5;
|
|
123
|
-
const inputPy = compact ? "3px" : "4px";
|
|
124
|
-
return /* @__PURE__ */ jsx(
|
|
125
|
-
InputBase,
|
|
126
|
-
{
|
|
127
|
-
ref,
|
|
128
|
-
fullWidth,
|
|
129
|
-
placeholder,
|
|
130
|
-
value: displayValue,
|
|
131
|
-
onChange: handleChange,
|
|
132
|
-
autoFocus,
|
|
133
|
-
onFocus,
|
|
134
|
-
onBlur,
|
|
135
|
-
onKeyDown,
|
|
136
|
-
startAdornment: /* @__PURE__ */ jsx(InputAdornment, { position: "start", sx: { color: "text.disabled", mr: compact ? 0.75 : 1 }, children: /* @__PURE__ */ jsx(SearchIcon, { size: compact ? 16 : 18 }) }),
|
|
137
|
-
endAdornment: displayValue ? /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx(Tooltip, { title: clearTooltip, children: /* @__PURE__ */ jsx(
|
|
138
|
-
Box8,
|
|
139
|
-
{
|
|
140
|
-
component: "button",
|
|
141
|
-
type: "button",
|
|
142
|
-
onClick: handleClear,
|
|
143
|
-
sx: {
|
|
144
|
-
p: 0.25,
|
|
145
|
-
border: "none",
|
|
146
|
-
background: "none",
|
|
147
|
-
cursor: "pointer",
|
|
148
|
-
color: "text.disabled",
|
|
149
|
-
display: "flex",
|
|
150
|
-
alignItems: "center",
|
|
151
|
-
borderRadius: "50%",
|
|
152
|
-
"&:hover": { color: "text.secondary" }
|
|
153
|
-
},
|
|
154
|
-
children: /* @__PURE__ */ jsx(ClearIcon, {})
|
|
155
|
-
}
|
|
156
|
-
) }) }) : null,
|
|
157
|
-
sx: {
|
|
158
|
-
px,
|
|
159
|
-
py,
|
|
160
|
-
borderRadius: 1,
|
|
161
|
-
fontSize: "0.875rem",
|
|
162
|
-
bgcolor: alpha(theme.palette.grey[500], 0.08),
|
|
163
|
-
transition: theme.transitions.create(["background-color"], {
|
|
164
|
-
duration: theme.transitions.duration.shorter
|
|
165
|
-
}),
|
|
166
|
-
"&:hover": {
|
|
167
|
-
bgcolor: alpha(theme.palette.grey[500], 0.12)
|
|
168
|
-
},
|
|
169
|
-
"&.Mui-focused": {
|
|
170
|
-
bgcolor: alpha(theme.palette.grey[500], 0.16)
|
|
171
|
-
},
|
|
172
|
-
"& .MuiInputBase-input": {
|
|
173
|
-
py: inputPy,
|
|
174
|
-
px: 0,
|
|
175
|
-
overflow: "visible",
|
|
176
|
-
"&::placeholder": {
|
|
177
|
-
opacity: 0.64
|
|
178
|
-
}
|
|
179
|
-
},
|
|
180
|
-
...width != null && { width },
|
|
181
|
-
...minWidth != null && { minWidth },
|
|
182
|
-
...!fullWidth && { width: width ?? "auto" },
|
|
183
|
-
...Array.isArray(sx) ? Object.assign({}, ...sx) : sx
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
);
|
|
187
|
-
}
|
|
188
|
-
function IconWrapper({ icon, color = "primary.main", size = 64 }) {
|
|
189
|
-
return /* @__PURE__ */ jsx(
|
|
190
|
-
Box8,
|
|
191
|
-
{
|
|
192
|
-
sx: {
|
|
193
|
-
width: size,
|
|
194
|
-
height: size,
|
|
195
|
-
borderRadius: "50%",
|
|
196
|
-
display: "flex",
|
|
197
|
-
alignItems: "center",
|
|
198
|
-
justifyContent: "center",
|
|
199
|
-
bgcolor: (theme) => {
|
|
200
|
-
const parts = color.split(".");
|
|
201
|
-
let resolved = theme.palette;
|
|
202
|
-
for (const part of parts) {
|
|
203
|
-
resolved = resolved?.[part];
|
|
204
|
-
}
|
|
205
|
-
return typeof resolved === "string" ? alpha(resolved, 0.08) : alpha(theme.palette.primary.main, 0.08);
|
|
206
|
-
}
|
|
207
|
-
},
|
|
208
|
-
children: icon
|
|
209
|
-
}
|
|
210
|
-
);
|
|
211
|
-
}
|
|
212
|
-
function EmptyContent({
|
|
213
|
-
illustration,
|
|
214
|
-
icon,
|
|
215
|
-
iconColor = "primary.main",
|
|
216
|
-
iconSize = 64,
|
|
217
|
-
title = "No data",
|
|
218
|
-
description,
|
|
219
|
-
action,
|
|
220
|
-
actions,
|
|
221
|
-
maxWidth = 400,
|
|
222
|
-
filled = false,
|
|
223
|
-
sx,
|
|
224
|
-
illustrationSx,
|
|
225
|
-
slotProps,
|
|
226
|
-
compact = false
|
|
227
|
-
}) {
|
|
228
|
-
const visual = icon ? /* @__PURE__ */ jsx(IconWrapper, { icon, color: iconColor, size: iconSize }) : illustration ? /* @__PURE__ */ jsx(Box8, { sx: illustrationSx, children: illustration }) : null;
|
|
229
|
-
const allActions = [...actions ?? [], ...action ? [action] : []];
|
|
230
|
-
return /* @__PURE__ */ jsx(
|
|
231
|
-
Stack,
|
|
232
|
-
{
|
|
233
|
-
sx: {
|
|
234
|
-
alignItems: "center",
|
|
235
|
-
justifyContent: "center",
|
|
236
|
-
textAlign: "center",
|
|
237
|
-
py: compact ? 4 : 8,
|
|
238
|
-
px: 2,
|
|
239
|
-
// Default non-compact behavior: vertically center inside the
|
|
240
|
-
// available "main content" area. Two complementary anchors:
|
|
241
|
-
// * `flex: 1, alignSelf: 'stretch'` — when the parent IS a
|
|
242
|
-
// flex column with explicit height (DashboardLayout main,
|
|
243
|
-
// full-height page wrappers), EmptyContent grows to fill
|
|
244
|
-
// the column and the inner `justifyContent: center` puts
|
|
245
|
-
// the message in the middle of that column.
|
|
246
|
-
// * `minHeight: calc(100vh - 240px)` — fallback for the
|
|
247
|
-
// common case where the page wrapper is just a content-
|
|
248
|
-
// sized `<Stack>` or `<Box>`. 240px is the typical
|
|
249
|
-
// vertical chrome (header ~64 + breadcrumbs ~60 + page
|
|
250
|
-
// padding ~80 + a small margin), so this leaves enough
|
|
251
|
-
// space below the breadcrumbs for the message to sit at
|
|
252
|
-
// the optical center of the visible viewport.
|
|
253
|
-
//
|
|
254
|
-
// `compact` keeps the inline-sized behavior for callers that
|
|
255
|
-
// drop EmptyContent inside a card cell or sidebar.
|
|
256
|
-
// `filled` is the explicit "fill my parent" mode and shares
|
|
257
|
-
// the same fallback so the visual is consistent.
|
|
258
|
-
...!compact && {
|
|
259
|
-
flex: 1,
|
|
260
|
-
alignSelf: "stretch",
|
|
261
|
-
minHeight: "calc(100vh - 240px)"
|
|
262
|
-
},
|
|
263
|
-
...filled && { height: "100%" },
|
|
264
|
-
...sx
|
|
265
|
-
},
|
|
266
|
-
children: /* @__PURE__ */ jsxs(
|
|
267
|
-
Box8,
|
|
268
|
-
{
|
|
269
|
-
sx: {
|
|
270
|
-
maxWidth,
|
|
271
|
-
display: "flex",
|
|
272
|
-
flexDirection: "column",
|
|
273
|
-
alignItems: "center",
|
|
274
|
-
gap: compact ? 1.5 : 2.5
|
|
275
|
-
},
|
|
276
|
-
children: [
|
|
277
|
-
visual,
|
|
278
|
-
/* @__PURE__ */ jsxs(Stack, { spacing: 0.5, sx: {
|
|
279
|
-
alignItems: "center"
|
|
280
|
-
}, children: [
|
|
281
|
-
title && /* @__PURE__ */ jsx(
|
|
282
|
-
Typography3,
|
|
283
|
-
{
|
|
284
|
-
variant: compact ? "subtitle1" : "h6",
|
|
285
|
-
sx: {
|
|
286
|
-
color: "text.secondary",
|
|
287
|
-
fontWeight: 600,
|
|
288
|
-
...slotProps?.title
|
|
289
|
-
},
|
|
290
|
-
children: title
|
|
291
|
-
}
|
|
292
|
-
),
|
|
293
|
-
description && /* @__PURE__ */ jsx(
|
|
294
|
-
Typography3,
|
|
295
|
-
{
|
|
296
|
-
variant: "body2",
|
|
297
|
-
sx: {
|
|
298
|
-
color: "text.disabled",
|
|
299
|
-
lineHeight: 1.6,
|
|
300
|
-
...slotProps?.description
|
|
301
|
-
},
|
|
302
|
-
children: description
|
|
303
|
-
}
|
|
304
|
-
)
|
|
305
|
-
] }),
|
|
306
|
-
allActions.length > 0 && /* @__PURE__ */ jsx(
|
|
307
|
-
Stack,
|
|
308
|
-
{
|
|
309
|
-
direction: "row",
|
|
310
|
-
spacing: 1,
|
|
311
|
-
sx: { mt: compact ? 0.5 : 1, flexWrap: "wrap", justifyContent: "center", ...slotProps?.actions },
|
|
312
|
-
children: allActions.map((a, i) => /* @__PURE__ */ jsx(Box8, { children: a }, i))
|
|
313
|
-
}
|
|
314
|
-
)
|
|
315
|
-
]
|
|
316
|
-
}
|
|
317
|
-
)
|
|
318
|
-
}
|
|
319
|
-
);
|
|
320
|
-
}
|
|
321
|
-
function SearchEmptyContent({
|
|
322
|
-
query,
|
|
323
|
-
...props
|
|
324
|
-
}) {
|
|
325
|
-
return /* @__PURE__ */ jsx(
|
|
326
|
-
EmptyContent,
|
|
327
|
-
{
|
|
328
|
-
title: "No results found",
|
|
329
|
-
description: query ? `Your search for "${query}" did not match any results.` : "Try adjusting your search criteria.",
|
|
330
|
-
...props
|
|
331
|
-
}
|
|
332
|
-
);
|
|
333
|
-
}
|
|
334
|
-
function LoadingEmptyContent({ ...props }) {
|
|
335
|
-
return /* @__PURE__ */ jsx(
|
|
336
|
-
EmptyContent,
|
|
337
|
-
{
|
|
338
|
-
title: "Loading...",
|
|
339
|
-
illustration: /* @__PURE__ */ jsx(
|
|
340
|
-
Box8,
|
|
341
|
-
{
|
|
342
|
-
sx: {
|
|
343
|
-
width: 64,
|
|
344
|
-
height: 64,
|
|
345
|
-
borderRadius: "50%",
|
|
346
|
-
border: "3px solid",
|
|
347
|
-
borderColor: "divider",
|
|
348
|
-
borderTopColor: "primary.main",
|
|
349
|
-
animation: "spin 1s linear infinite",
|
|
350
|
-
"@keyframes spin": {
|
|
351
|
-
from: { transform: "rotate(0deg)" },
|
|
352
|
-
to: { transform: "rotate(360deg)" }
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
),
|
|
357
|
-
compact: true,
|
|
358
|
-
...props
|
|
359
|
-
}
|
|
360
|
-
);
|
|
361
|
-
}
|
|
35
|
+
// src/components/field/field-text.tsx
|
|
362
36
|
function FieldText({
|
|
363
37
|
name,
|
|
364
38
|
helperText,
|
|
@@ -1017,7 +691,7 @@ function FieldRating({
|
|
|
1017
691
|
const hasHelper = !!(error?.message || helperText);
|
|
1018
692
|
return /* @__PURE__ */ jsxs(FormControl8, { error: !!error, ...formControlProps, children: [
|
|
1019
693
|
label && /* @__PURE__ */ jsx(FormLabel6, { id: labelId, sx: { mb: 1 }, children: label }),
|
|
1020
|
-
/* @__PURE__ */ jsxs(
|
|
694
|
+
/* @__PURE__ */ jsxs(Box6, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
1021
695
|
/* @__PURE__ */ jsx(
|
|
1022
696
|
Rating,
|
|
1023
697
|
{
|
|
@@ -1036,7 +710,7 @@ function FieldRating({
|
|
|
1036
710
|
}
|
|
1037
711
|
),
|
|
1038
712
|
showValue && /* @__PURE__ */ jsxs(
|
|
1039
|
-
|
|
713
|
+
Box6,
|
|
1040
714
|
{
|
|
1041
715
|
component: "span",
|
|
1042
716
|
sx: {
|
|
@@ -1089,9 +763,9 @@ function FieldSlider({
|
|
|
1089
763
|
render: ({ field, fieldState: { error } }) => {
|
|
1090
764
|
const hasHelper = !!(error?.message || helperText);
|
|
1091
765
|
return /* @__PURE__ */ jsxs(FormControl8, { error: !!error, fullWidth: true, ...formControlProps, children: [
|
|
1092
|
-
(label || showValue) && /* @__PURE__ */ jsxs(
|
|
766
|
+
(label || showValue) && /* @__PURE__ */ jsxs(Box6, { sx: { display: "flex", justifyContent: "space-between", alignItems: "center", mb: 1 }, children: [
|
|
1093
767
|
label && /* @__PURE__ */ jsx(FormLabel6, { id: labelId, children: label }),
|
|
1094
|
-
showValue && /* @__PURE__ */ jsx(
|
|
768
|
+
showValue && /* @__PURE__ */ jsx(Typography2, { variant: "body2", sx: {
|
|
1095
769
|
color: "text.secondary"
|
|
1096
770
|
}, children: displayValue(field.value ?? (Array.isArray(other.defaultValue) ? [min, max] : min)) })
|
|
1097
771
|
] }),
|
|
@@ -1377,7 +1051,7 @@ function FieldMultiCheckbox({
|
|
|
1377
1051
|
children: label
|
|
1378
1052
|
}
|
|
1379
1053
|
),
|
|
1380
|
-
/* @__PURE__ */ jsx(
|
|
1054
|
+
/* @__PURE__ */ jsx(Box6, { ...slotProps?.container, children: /* @__PURE__ */ jsx(FormGroup, { row, ...other, children: options.map((option) => /* @__PURE__ */ jsx(
|
|
1381
1055
|
FormControlLabel,
|
|
1382
1056
|
{
|
|
1383
1057
|
label: option.label,
|
|
@@ -1446,7 +1120,7 @@ function FieldMultiSwitch({
|
|
|
1446
1120
|
children: label
|
|
1447
1121
|
}
|
|
1448
1122
|
),
|
|
1449
|
-
/* @__PURE__ */ jsx(
|
|
1123
|
+
/* @__PURE__ */ jsx(Box6, { ...slotProps?.container, children: /* @__PURE__ */ jsx(FormGroup, { row, ...other, children: options.map((option) => /* @__PURE__ */ jsx(
|
|
1450
1124
|
FormControlLabel,
|
|
1451
1125
|
{
|
|
1452
1126
|
label: option.label,
|
|
@@ -1557,9 +1231,9 @@ function FieldCode({
|
|
|
1557
1231
|
}
|
|
1558
1232
|
};
|
|
1559
1233
|
const hasHelper = !!(error?.message || helperText);
|
|
1560
|
-
return /* @__PURE__ */ jsxs(
|
|
1234
|
+
return /* @__PURE__ */ jsxs(Box6, { role: "group", "aria-label": `${name} code input`, ...slotProps?.wrapper, children: [
|
|
1561
1235
|
/* @__PURE__ */ jsx(
|
|
1562
|
-
|
|
1236
|
+
Box6,
|
|
1563
1237
|
{
|
|
1564
1238
|
sx: {
|
|
1565
1239
|
display: "flex",
|
|
@@ -1660,7 +1334,7 @@ function UploadPlaceholder({ isDragActive, disabled }) {
|
|
|
1660
1334
|
},
|
|
1661
1335
|
children: [
|
|
1662
1336
|
/* @__PURE__ */ jsx(
|
|
1663
|
-
|
|
1337
|
+
Box6,
|
|
1664
1338
|
{
|
|
1665
1339
|
component: "span",
|
|
1666
1340
|
sx: {
|
|
@@ -1677,10 +1351,10 @@ function UploadPlaceholder({ isDragActive, disabled }) {
|
|
|
1677
1351
|
children: "\u{1F4C1}"
|
|
1678
1352
|
}
|
|
1679
1353
|
),
|
|
1680
|
-
/* @__PURE__ */ jsx(
|
|
1354
|
+
/* @__PURE__ */ jsx(Typography2, { variant: "body2", component: "span", children: isDragActive ? "Drop files here" : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1681
1355
|
"Drag & drop files here, or",
|
|
1682
1356
|
" ",
|
|
1683
|
-
/* @__PURE__ */ jsx(
|
|
1357
|
+
/* @__PURE__ */ jsx(Typography2, { component: "span", variant: "body2", sx: { color: "primary.main", textDecoration: "underline" }, children: "browse" })
|
|
1684
1358
|
] }) })
|
|
1685
1359
|
]
|
|
1686
1360
|
}
|
|
@@ -1693,7 +1367,7 @@ function FilePreview({ files, thumbnail, onRemove }) {
|
|
|
1693
1367
|
const fileName = getFileName(file);
|
|
1694
1368
|
const fileSize = file instanceof File ? formatFileSize(file.size) : "";
|
|
1695
1369
|
return /* @__PURE__ */ jsxs(
|
|
1696
|
-
|
|
1370
|
+
Box6,
|
|
1697
1371
|
{
|
|
1698
1372
|
sx: {
|
|
1699
1373
|
p: 1,
|
|
@@ -1707,7 +1381,7 @@ function FilePreview({ files, thumbnail, onRemove }) {
|
|
|
1707
1381
|
},
|
|
1708
1382
|
children: [
|
|
1709
1383
|
previewUrl && /* @__PURE__ */ jsx(
|
|
1710
|
-
|
|
1384
|
+
Box6,
|
|
1711
1385
|
{
|
|
1712
1386
|
component: "img",
|
|
1713
1387
|
src: previewUrl,
|
|
@@ -1721,14 +1395,14 @@ function FilePreview({ files, thumbnail, onRemove }) {
|
|
|
1721
1395
|
}
|
|
1722
1396
|
}
|
|
1723
1397
|
),
|
|
1724
|
-
/* @__PURE__ */ jsxs(
|
|
1725
|
-
/* @__PURE__ */ jsx(
|
|
1726
|
-
fileSize && /* @__PURE__ */ jsx(
|
|
1398
|
+
/* @__PURE__ */ jsxs(Box6, { sx: { flexGrow: 1, minWidth: 0 }, children: [
|
|
1399
|
+
/* @__PURE__ */ jsx(Typography2, { variant: "body2", noWrap: true, children: fileName }),
|
|
1400
|
+
fileSize && /* @__PURE__ */ jsx(Typography2, { variant: "caption", sx: {
|
|
1727
1401
|
color: "text.secondary"
|
|
1728
1402
|
}, children: fileSize })
|
|
1729
1403
|
] }),
|
|
1730
1404
|
onRemove && /* @__PURE__ */ jsx(
|
|
1731
|
-
|
|
1405
|
+
IconButton,
|
|
1732
1406
|
{
|
|
1733
1407
|
size: "small",
|
|
1734
1408
|
onClick: () => onRemove(file),
|
|
@@ -1745,8 +1419,8 @@ function FilePreview({ files, thumbnail, onRemove }) {
|
|
|
1745
1419
|
}
|
|
1746
1420
|
function RejectionFiles({ rejections }) {
|
|
1747
1421
|
if (rejections.length === 0) return null;
|
|
1748
|
-
return /* @__PURE__ */ jsx(
|
|
1749
|
-
|
|
1422
|
+
return /* @__PURE__ */ jsx(Box6, { sx: { mt: 2 }, children: rejections.map(({ file, errors }) => /* @__PURE__ */ jsxs(
|
|
1423
|
+
Box6,
|
|
1750
1424
|
{
|
|
1751
1425
|
sx: {
|
|
1752
1426
|
p: 1,
|
|
@@ -1757,8 +1431,8 @@ function RejectionFiles({ rejections }) {
|
|
|
1757
1431
|
borderColor: "error.light"
|
|
1758
1432
|
},
|
|
1759
1433
|
children: [
|
|
1760
|
-
/* @__PURE__ */ jsx(
|
|
1761
|
-
errors.map((error) => /* @__PURE__ */ jsx(
|
|
1434
|
+
/* @__PURE__ */ jsx(Typography2, { variant: "body2", color: "error", children: file.name }),
|
|
1435
|
+
errors.map((error) => /* @__PURE__ */ jsx(Typography2, { variant: "caption", color: "error", children: error.message }, error.code))
|
|
1762
1436
|
]
|
|
1763
1437
|
},
|
|
1764
1438
|
file.name
|
|
@@ -1818,9 +1492,9 @@ function FieldUploadInner({
|
|
|
1818
1492
|
});
|
|
1819
1493
|
const hasError = !!error;
|
|
1820
1494
|
const hasFiles = files.length > 0;
|
|
1821
|
-
return /* @__PURE__ */ jsxs(
|
|
1495
|
+
return /* @__PURE__ */ jsxs(Box6, { ...slotProps?.wrapper, children: [
|
|
1822
1496
|
/* @__PURE__ */ jsxs(
|
|
1823
|
-
|
|
1497
|
+
Box6,
|
|
1824
1498
|
{
|
|
1825
1499
|
...getRootProps(),
|
|
1826
1500
|
sx: {
|
|
@@ -1847,8 +1521,8 @@ function FieldUploadInner({
|
|
|
1847
1521
|
),
|
|
1848
1522
|
/* @__PURE__ */ jsx(RejectionFiles, { rejections }),
|
|
1849
1523
|
/* @__PURE__ */ jsx(FilePreview, { files, thumbnail, onRemove: handleRemove }),
|
|
1850
|
-
hasFiles && multiple && onRemoveAll && /* @__PURE__ */ jsx(
|
|
1851
|
-
|
|
1524
|
+
hasFiles && multiple && onRemoveAll && /* @__PURE__ */ jsx(Box6, { sx: { mt: 1, textAlign: "right" }, children: /* @__PURE__ */ jsx(
|
|
1525
|
+
Typography2,
|
|
1852
1526
|
{
|
|
1853
1527
|
component: "button",
|
|
1854
1528
|
variant: "caption",
|
|
@@ -1935,9 +1609,9 @@ function FieldUploadBoxInner({
|
|
|
1935
1609
|
});
|
|
1936
1610
|
const previewUrl = value ? getPreviewUrl(value) : null;
|
|
1937
1611
|
const hasError = !!error;
|
|
1938
|
-
return /* @__PURE__ */ jsxs(
|
|
1612
|
+
return /* @__PURE__ */ jsxs(Box6, { children: [
|
|
1939
1613
|
/* @__PURE__ */ jsxs(
|
|
1940
|
-
|
|
1614
|
+
Box6,
|
|
1941
1615
|
{
|
|
1942
1616
|
...getRootProps(),
|
|
1943
1617
|
sx: {
|
|
@@ -1963,7 +1637,7 @@ function FieldUploadBoxInner({
|
|
|
1963
1637
|
children: [
|
|
1964
1638
|
/* @__PURE__ */ jsx("input", { ...getInputProps() }),
|
|
1965
1639
|
!previewUrl && /* @__PURE__ */ jsx(
|
|
1966
|
-
|
|
1640
|
+
Typography2,
|
|
1967
1641
|
{
|
|
1968
1642
|
sx: {
|
|
1969
1643
|
fontSize: size / 3,
|
|
@@ -2038,9 +1712,9 @@ function FieldUploadAvatarInner({
|
|
|
2038
1712
|
});
|
|
2039
1713
|
const previewUrl = value ? getPreviewUrl(value) : null;
|
|
2040
1714
|
const hasError = !!error;
|
|
2041
|
-
return /* @__PURE__ */ jsxs(
|
|
1715
|
+
return /* @__PURE__ */ jsxs(Box6, { sx: { display: "inline-flex", flexDirection: "column", alignItems: "center" }, children: [
|
|
2042
1716
|
/* @__PURE__ */ jsxs(
|
|
2043
|
-
|
|
1717
|
+
Box6,
|
|
2044
1718
|
{
|
|
2045
1719
|
...getRootProps(),
|
|
2046
1720
|
sx: {
|
|
@@ -2069,11 +1743,11 @@ function FieldUploadAvatarInner({
|
|
|
2069
1743
|
height: "100%",
|
|
2070
1744
|
bgcolor: "background.neutral"
|
|
2071
1745
|
},
|
|
2072
|
-
children: !previewUrl && /* @__PURE__ */ jsx(
|
|
1746
|
+
children: !previewUrl && /* @__PURE__ */ jsx(Typography2, { sx: { fontSize: size / 4, color: "text.disabled" }, children: "\u{1F4F7}" })
|
|
2073
1747
|
}
|
|
2074
1748
|
),
|
|
2075
1749
|
/* @__PURE__ */ jsxs(
|
|
2076
|
-
|
|
1750
|
+
Box6,
|
|
2077
1751
|
{
|
|
2078
1752
|
className: "upload-overlay",
|
|
2079
1753
|
sx: {
|
|
@@ -2089,8 +1763,8 @@ function FieldUploadAvatarInner({
|
|
|
2089
1763
|
transition: theme.transitions.create("opacity")
|
|
2090
1764
|
},
|
|
2091
1765
|
children: [
|
|
2092
|
-
/* @__PURE__ */ jsx(
|
|
2093
|
-
/* @__PURE__ */ jsx(
|
|
1766
|
+
/* @__PURE__ */ jsx(Typography2, { sx: { fontSize: size / 6 }, children: "\u{1F4F7}" }),
|
|
1767
|
+
/* @__PURE__ */ jsx(Typography2, { variant: "caption", children: previewUrl ? "Update" : "Upload" })
|
|
2094
1768
|
]
|
|
2095
1769
|
}
|
|
2096
1770
|
)
|
|
@@ -2273,7 +1947,7 @@ function FieldPhone({
|
|
|
2273
1947
|
input: {
|
|
2274
1948
|
startAdornment: !hideCountrySelect && /* @__PURE__ */ jsxs(InputAdornment, { position: "start", children: [
|
|
2275
1949
|
/* @__PURE__ */ jsx(
|
|
2276
|
-
|
|
1950
|
+
IconButton,
|
|
2277
1951
|
{
|
|
2278
1952
|
ref: anchorRef,
|
|
2279
1953
|
onClick: handleOpenMenu,
|
|
@@ -2285,7 +1959,7 @@ function FieldPhone({
|
|
|
2285
1959
|
"aria-expanded": menuOpen,
|
|
2286
1960
|
sx: { mr: -0.5 },
|
|
2287
1961
|
children: /* @__PURE__ */ jsx(
|
|
2288
|
-
|
|
1962
|
+
Box6,
|
|
2289
1963
|
{
|
|
2290
1964
|
component: "span",
|
|
2291
1965
|
sx: {
|
|
@@ -2300,7 +1974,7 @@ function FieldPhone({
|
|
|
2300
1974
|
}
|
|
2301
1975
|
),
|
|
2302
1976
|
/* @__PURE__ */ jsx(
|
|
2303
|
-
|
|
1977
|
+
Typography2,
|
|
2304
1978
|
{
|
|
2305
1979
|
variant: "body2",
|
|
2306
1980
|
sx: {
|
|
@@ -2596,7 +2270,7 @@ function FieldCountrySelect({
|
|
|
2596
2270
|
isOptionEqualToValue: (option, value) => option.code === value.code,
|
|
2597
2271
|
renderOption: (props, option) => {
|
|
2598
2272
|
const { key, ...optionProps } = props;
|
|
2599
|
-
return /* @__PURE__ */ jsxs(
|
|
2273
|
+
return /* @__PURE__ */ jsxs(Box6, { component: "li", sx: { "& > span": { mr: 1.5, flexShrink: 0 } }, ...optionProps, children: [
|
|
2600
2274
|
/* @__PURE__ */ jsx("span", { style: { fontSize: "1.25rem" }, children: option.flag }),
|
|
2601
2275
|
option.label,
|
|
2602
2276
|
" (",
|
|
@@ -2848,287 +2522,7 @@ var Field = {
|
|
|
2848
2522
|
/** Headless editor field with render prop */
|
|
2849
2523
|
CustomEditor: FieldCustomEditor
|
|
2850
2524
|
};
|
|
2851
|
-
function parseStackFrame(line) {
|
|
2852
|
-
const patterns = [
|
|
2853
|
-
// Named function with file: at functionName (file:line:col)
|
|
2854
|
-
// Also covers the bundler-rewritten form `(file?v=hash:line:col)`: the
|
|
2855
|
-
// lazy `(.+?)` swallows the query string, which `cleanFilePath` strips.
|
|
2856
|
-
/at\s+(?:async\s+)?([^\s(]+)\s+\((.+?):(\d+):(\d+)\)/,
|
|
2857
|
-
// Anonymous at file: at file:line:col
|
|
2858
|
-
/at\s+(.+?):(\d+):(\d+)/
|
|
2859
|
-
];
|
|
2860
|
-
for (const pattern of patterns) {
|
|
2861
|
-
const match = line.match(pattern);
|
|
2862
|
-
if (match) {
|
|
2863
|
-
const [, funcOrFile, file, lineStr, colStr] = match;
|
|
2864
|
-
const hasFile = colStr !== void 0;
|
|
2865
|
-
const functionName = hasFile ? funcOrFile : null;
|
|
2866
|
-
const filePath = hasFile ? file : funcOrFile;
|
|
2867
|
-
const lineNumber = parseInt(hasFile ? lineStr : file, 10);
|
|
2868
|
-
const columnNumber = parseInt(hasFile ? colStr : lineStr, 10);
|
|
2869
|
-
const isAppCode = !filePath.includes("node_modules") && filePath.includes("src/");
|
|
2870
|
-
return {
|
|
2871
|
-
functionName: functionName || null,
|
|
2872
|
-
filePath: cleanFilePath(filePath),
|
|
2873
|
-
lineNumber: isNaN(lineNumber) ? null : lineNumber,
|
|
2874
|
-
columnNumber: isNaN(columnNumber) ? null : columnNumber,
|
|
2875
|
-
isAppCode
|
|
2876
|
-
};
|
|
2877
|
-
}
|
|
2878
|
-
}
|
|
2879
|
-
return null;
|
|
2880
|
-
}
|
|
2881
|
-
function cleanFilePath(path) {
|
|
2882
|
-
const cleaned = path.replace(/\?.*$/, "");
|
|
2883
|
-
const srcIndex = cleaned.indexOf("/src/");
|
|
2884
|
-
if (srcIndex !== -1) {
|
|
2885
|
-
return cleaned.slice(srcIndex + 1);
|
|
2886
|
-
}
|
|
2887
|
-
const parts = cleaned.split("/");
|
|
2888
|
-
if (parts.length > 3) {
|
|
2889
|
-
return parts.slice(-3).join("/");
|
|
2890
|
-
}
|
|
2891
|
-
return cleaned;
|
|
2892
|
-
}
|
|
2893
|
-
function parseStackTrace(stack) {
|
|
2894
|
-
if (!stack) {
|
|
2895
|
-
return { primary: null, frames: [], raw: "" };
|
|
2896
|
-
}
|
|
2897
|
-
const lines = stack.split("\n");
|
|
2898
|
-
const frames = [];
|
|
2899
|
-
for (const line of lines) {
|
|
2900
|
-
const frame = parseStackFrame(line.trim());
|
|
2901
|
-
if (frame) {
|
|
2902
|
-
frames.push(frame);
|
|
2903
|
-
}
|
|
2904
|
-
}
|
|
2905
|
-
const primary = frames.find((f) => f.isAppCode) ?? frames[0] ?? null;
|
|
2906
|
-
return { primary, frames, raw: stack };
|
|
2907
|
-
}
|
|
2908
|
-
function getErrorLocation(error) {
|
|
2909
|
-
const parsed = parseStackTrace(error.stack);
|
|
2910
|
-
const { primary } = parsed;
|
|
2911
|
-
if (!primary) {
|
|
2912
|
-
return "Unknown location";
|
|
2913
|
-
}
|
|
2914
|
-
const parts = [];
|
|
2915
|
-
if (primary.functionName) {
|
|
2916
|
-
parts.push(`in ${primary.functionName}`);
|
|
2917
|
-
}
|
|
2918
|
-
if (primary.filePath) {
|
|
2919
|
-
const location = primary.lineNumber ? `${primary.filePath}:${primary.lineNumber}` : primary.filePath;
|
|
2920
|
-
parts.push(`(${location})`);
|
|
2921
|
-
}
|
|
2922
|
-
return parts.join(" ") || "Unknown location";
|
|
2923
|
-
}
|
|
2924
|
-
function DefaultErrorFallback({
|
|
2925
|
-
error,
|
|
2926
|
-
parsedStack,
|
|
2927
|
-
resetErrorBoundary,
|
|
2928
|
-
sx,
|
|
2929
|
-
showDetails
|
|
2930
|
-
}) {
|
|
2931
|
-
const [expanded, setExpanded] = useState(false);
|
|
2932
|
-
const [copied, setCopied] = useState(false);
|
|
2933
|
-
const shouldShowDetails = showDetails ?? (typeof process !== "undefined" && process.env.NODE_ENV === "development");
|
|
2934
|
-
const handleCopyStack = async () => {
|
|
2935
|
-
try {
|
|
2936
|
-
const text = [
|
|
2937
|
-
`Error: ${error.message}`,
|
|
2938
|
-
`Location: ${getErrorLocation(error)}`,
|
|
2939
|
-
"",
|
|
2940
|
-
"Stack Trace:",
|
|
2941
|
-
parsedStack.raw
|
|
2942
|
-
].join("\n");
|
|
2943
|
-
await navigator.clipboard.writeText(text);
|
|
2944
|
-
setCopied(true);
|
|
2945
|
-
setTimeout(() => setCopied(false), 2e3);
|
|
2946
|
-
} catch {
|
|
2947
|
-
}
|
|
2948
|
-
};
|
|
2949
|
-
return /* @__PURE__ */ jsxs(
|
|
2950
|
-
Box8,
|
|
2951
|
-
{
|
|
2952
|
-
sx: {
|
|
2953
|
-
display: "flex",
|
|
2954
|
-
flexDirection: "column",
|
|
2955
|
-
alignItems: "center",
|
|
2956
|
-
justifyContent: "center",
|
|
2957
|
-
minHeight: 200,
|
|
2958
|
-
p: 3,
|
|
2959
|
-
textAlign: "center",
|
|
2960
|
-
...sx
|
|
2961
|
-
},
|
|
2962
|
-
children: [
|
|
2963
|
-
/* @__PURE__ */ jsx(Typography3, { variant: "h6", color: "error", gutterBottom: true, children: "Something went wrong" }),
|
|
2964
|
-
/* @__PURE__ */ jsx(
|
|
2965
|
-
Typography3,
|
|
2966
|
-
{
|
|
2967
|
-
variant: "body2",
|
|
2968
|
-
sx: {
|
|
2969
|
-
color: "text.secondary",
|
|
2970
|
-
mb: 1,
|
|
2971
|
-
maxWidth: 400
|
|
2972
|
-
},
|
|
2973
|
-
children: error.message || "An unexpected error occurred"
|
|
2974
|
-
}
|
|
2975
|
-
),
|
|
2976
|
-
shouldShowDetails && parsedStack.primary && /* @__PURE__ */ jsxs(
|
|
2977
|
-
Typography3,
|
|
2978
|
-
{
|
|
2979
|
-
variant: "caption",
|
|
2980
|
-
sx: {
|
|
2981
|
-
color: "text.secondary",
|
|
2982
|
-
mb: 2,
|
|
2983
|
-
fontFamily: "monospace"
|
|
2984
|
-
},
|
|
2985
|
-
children: [
|
|
2986
|
-
parsedStack.primary.filePath,
|
|
2987
|
-
parsedStack.primary.lineNumber && `:${parsedStack.primary.lineNumber}`,
|
|
2988
|
-
parsedStack.primary.functionName && ` (${parsedStack.primary.functionName})`
|
|
2989
|
-
]
|
|
2990
|
-
}
|
|
2991
|
-
),
|
|
2992
|
-
/* @__PURE__ */ jsxs(Box8, { sx: { display: "flex", gap: 1, mb: 2 }, children: [
|
|
2993
|
-
/* @__PURE__ */ jsx(Button, { variant: "outlined", onClick: resetErrorBoundary, children: "Try Again" }),
|
|
2994
|
-
shouldShowDetails && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2995
|
-
/* @__PURE__ */ jsx(
|
|
2996
|
-
IconButton3,
|
|
2997
|
-
{
|
|
2998
|
-
size: "small",
|
|
2999
|
-
onClick: () => setExpanded(!expanded),
|
|
3000
|
-
"aria-label": expanded ? "Hide stack trace" : "Show stack trace",
|
|
3001
|
-
"aria-expanded": expanded,
|
|
3002
|
-
sx: {
|
|
3003
|
-
transform: expanded ? "rotate(180deg)" : "rotate(0deg)",
|
|
3004
|
-
transition: "transform 0.2s"
|
|
3005
|
-
},
|
|
3006
|
-
children: /* @__PURE__ */ jsx(ExpandMoreIcon, {})
|
|
3007
|
-
}
|
|
3008
|
-
),
|
|
3009
|
-
/* @__PURE__ */ jsx(IconButton3, { size: "small", onClick: handleCopyStack, title: "Copy error details", children: /* @__PURE__ */ jsx(ContentCopyIcon, { fontSize: "small" }) }),
|
|
3010
|
-
copied && /* @__PURE__ */ jsx(
|
|
3011
|
-
Typography3,
|
|
3012
|
-
{
|
|
3013
|
-
variant: "caption",
|
|
3014
|
-
sx: {
|
|
3015
|
-
color: "success.main",
|
|
3016
|
-
alignSelf: "center"
|
|
3017
|
-
},
|
|
3018
|
-
children: "Copied!"
|
|
3019
|
-
}
|
|
3020
|
-
)
|
|
3021
|
-
] })
|
|
3022
|
-
] }),
|
|
3023
|
-
shouldShowDetails && /* @__PURE__ */ jsx(Collapse, { in: expanded, children: /* @__PURE__ */ jsx(
|
|
3024
|
-
Box8,
|
|
3025
|
-
{
|
|
3026
|
-
sx: {
|
|
3027
|
-
mt: 1,
|
|
3028
|
-
p: 2,
|
|
3029
|
-
// Theme-aware: `grey.100` is a light value in both modes,
|
|
3030
|
-
// which put dark text on a near-white block in dark mode.
|
|
3031
|
-
bgcolor: "action.hover",
|
|
3032
|
-
borderRadius: 1,
|
|
3033
|
-
maxWidth: 600,
|
|
3034
|
-
maxHeight: 300,
|
|
3035
|
-
overflow: "auto",
|
|
3036
|
-
textAlign: "left"
|
|
3037
|
-
},
|
|
3038
|
-
children: /* @__PURE__ */ jsx(Typography3, { variant: "caption", component: "pre", sx: { fontFamily: "monospace", m: 0 }, children: parsedStack.frames.map((frame, i) => /* @__PURE__ */ jsxs(
|
|
3039
|
-
Box8,
|
|
3040
|
-
{
|
|
3041
|
-
component: "span",
|
|
3042
|
-
sx: {
|
|
3043
|
-
display: "block",
|
|
3044
|
-
color: frame.isAppCode ? "error.main" : "text.secondary",
|
|
3045
|
-
fontWeight: frame.isAppCode ? 600 : 400
|
|
3046
|
-
},
|
|
3047
|
-
children: [
|
|
3048
|
-
frame.functionName || "(anonymous)",
|
|
3049
|
-
" at ",
|
|
3050
|
-
frame.filePath || "unknown",
|
|
3051
|
-
frame.lineNumber && `:${frame.lineNumber}`
|
|
3052
|
-
]
|
|
3053
|
-
},
|
|
3054
|
-
i
|
|
3055
|
-
)) })
|
|
3056
|
-
}
|
|
3057
|
-
) })
|
|
3058
|
-
]
|
|
3059
|
-
}
|
|
3060
|
-
);
|
|
3061
|
-
}
|
|
3062
|
-
var ErrorBoundary = class extends Component {
|
|
3063
|
-
constructor(props) {
|
|
3064
|
-
super(props);
|
|
3065
|
-
this.state = {
|
|
3066
|
-
hasError: false,
|
|
3067
|
-
error: null,
|
|
3068
|
-
errorInfo: null
|
|
3069
|
-
};
|
|
3070
|
-
}
|
|
3071
|
-
static getDerivedStateFromError(error) {
|
|
3072
|
-
return {
|
|
3073
|
-
hasError: true,
|
|
3074
|
-
error
|
|
3075
|
-
};
|
|
3076
|
-
}
|
|
3077
|
-
componentDidCatch(error, errorInfo) {
|
|
3078
|
-
const parsedStack = parseStackTrace(error.stack);
|
|
3079
|
-
this.setState({ errorInfo });
|
|
3080
|
-
this.props.onError?.(error, errorInfo, parsedStack);
|
|
3081
|
-
}
|
|
3082
|
-
componentDidUpdate(prevProps) {
|
|
3083
|
-
const { resetKeys } = this.props;
|
|
3084
|
-
const { hasError } = this.state;
|
|
3085
|
-
if (hasError && resetKeys) {
|
|
3086
|
-
const previous = prevProps.resetKeys;
|
|
3087
|
-
const hasKeyChanged = previous === void 0 || previous.length !== resetKeys.length || resetKeys.some((key, index) => key !== previous[index]);
|
|
3088
|
-
if (hasKeyChanged) {
|
|
3089
|
-
this.resetErrorBoundary();
|
|
3090
|
-
}
|
|
3091
|
-
}
|
|
3092
|
-
}
|
|
3093
|
-
resetErrorBoundary = () => {
|
|
3094
|
-
this.props.onReset?.();
|
|
3095
|
-
this.setState({
|
|
3096
|
-
hasError: false,
|
|
3097
|
-
error: null,
|
|
3098
|
-
errorInfo: null
|
|
3099
|
-
});
|
|
3100
|
-
};
|
|
3101
|
-
render() {
|
|
3102
|
-
const { hasError, error, errorInfo } = this.state;
|
|
3103
|
-
const { children, fallback, sx, showDetails } = this.props;
|
|
3104
|
-
if (hasError && error) {
|
|
3105
|
-
const parsedStack = parseStackTrace(error.stack);
|
|
3106
|
-
const fallbackProps = {
|
|
3107
|
-
error,
|
|
3108
|
-
errorInfo,
|
|
3109
|
-
parsedStack,
|
|
3110
|
-
resetErrorBoundary: this.resetErrorBoundary
|
|
3111
|
-
};
|
|
3112
|
-
if (typeof fallback === "function") {
|
|
3113
|
-
return fallback(fallbackProps);
|
|
3114
|
-
}
|
|
3115
|
-
if (fallback) {
|
|
3116
|
-
return fallback;
|
|
3117
|
-
}
|
|
3118
|
-
return /* @__PURE__ */ jsx(DefaultErrorFallback, { ...fallbackProps, sx, showDetails });
|
|
3119
|
-
}
|
|
3120
|
-
return children;
|
|
3121
|
-
}
|
|
3122
|
-
};
|
|
3123
|
-
function useErrorBoundary() {
|
|
3124
|
-
const [, setError] = useState(null);
|
|
3125
|
-
return (error) => {
|
|
3126
|
-
setError(() => {
|
|
3127
|
-
throw error;
|
|
3128
|
-
});
|
|
3129
|
-
};
|
|
3130
|
-
}
|
|
3131
2525
|
|
|
3132
|
-
export {
|
|
3133
|
-
//# sourceMappingURL=chunk-
|
|
3134
|
-
//# sourceMappingURL=chunk-
|
|
2526
|
+
export { Field, FieldAutocomplete, FieldCheckbox, FieldCode, FieldCountrySelect, FieldCustomEditor, FieldDatePicker, FieldDateTimePicker, FieldEditor, FieldMultiCheckbox, FieldMultiSelect, FieldMultiSwitch, FieldNumber, FieldPhone, FieldRadio, FieldRating, FieldSelect, FieldSlider, FieldSwitch, FieldText, FieldTimePicker, FieldUpload, FieldUploadAvatar, FieldUploadBox, clampNumber, createNumberInputHandlers, parseNumber, roundToDecimals, transformForDisplay, transformOnBlur, transformOnChange };
|
|
2527
|
+
//# sourceMappingURL=chunk-LFWKGNCX.js.map
|
|
2528
|
+
//# sourceMappingURL=chunk-LFWKGNCX.js.map
|