@m4l/components 2.0.7 → 3.0.1
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/@types/export.d.ts +0 -3
- package/@types/types.d.ts +11 -1
- package/components/AccountPopover/{index.a5747746.js → index-BJWLsxYq.js} +7 -5
- package/components/AppBar/{index.2d458607.js → index-BdA-qQyV.js} +7 -5
- package/components/BaseModule/{index.3f266927.js → index-Bl0GPyrz.js} +1 -1
- package/components/CommonActions/components/ActionCancel/{index.c1185f46.js → index-BlaMdPmp.js} +2 -2
- package/components/CommonActions/components/ActionFormCancel/{index.7f76a6ba.js → index-C5ZI4ZPP.js} +5 -5
- package/components/CommonActions/components/ActionFormIntro/{index.8a23ec62.js → index-BbVMcr05.js} +2 -2
- package/components/CommonActions/components/ActionIntro/{index.185199da.js → index-DGooFqVu.js} +3 -3
- package/components/CommonActions/components/Actions/{index.ea4c273b.js → index-B_vOmNZT.js} +5 -3
- package/components/DataGrid/formatters/ColumnBooleanFormatter/{index.0739f098.js → index-0wqcK8ML.js} +1 -1
- package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/{index.d524f74c.js → index-Ozdfjlt2.js} +1 -1
- package/components/DataGrid/formatters/ColumnDateFormatter/{index.e00d0cf2.js → index-CKg8CJ6A.js} +1 -1
- package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/{index.addc6664.js → index-D-98uXfl.js} +1 -1
- package/components/DataGrid/formatters/ColumnNestedValueFormatter/{index.880e743b.js → index-BslXGK-A.js} +1 -1
- package/components/DataGrid/formatters/ColumnPointsFormatter/{index.ab152484.js → index-BXGW2CsK.js} +1 -1
- package/components/DataGrid/formatters/ColumnPriceFormatter/{index.bf9d9e60.js → index-O11tBykn.js} +1 -1
- package/components/DataGrid/formatters/ColumnSetCheckFormatter/{index.4045b2f2.js → index-BaCawLr1.js} +1 -1
- package/components/DataGrid/formatters/ColumnUncertaintyFormatter/{index.a87302d1.js → index-Cq7a-jnE.js} +1 -1
- package/components/DataGrid/formatters/{index.ee269cae.js → index-B5SJg0Qq.js} +2 -2
- package/components/DataGrid/{index.1feaab04.js → index-7vJWvQtu.js} +33 -26
- package/components/DataGrid/subcomponents/Actions/{index.06306495.js → index-C-p5O-cU.js} +22 -26
- package/components/DataGrid/subcomponents/editors/TextEditor/{index.3f0d9e28.js → index-BIFm8akr.js} +4 -0
- package/components/DragResizeWindow/{index.44fad985.js → index-D2jLYExo.js} +25 -6
- package/components/DynamicFilter/{dictionary.a55d5bc2.js → dictionary-DbRGLe8j.js} +2 -2
- package/components/DynamicFilter/{index.2033e755.js → index-D2CmPq_i.js} +7 -8
- package/components/DynamicFilter/slots/{dynamicFilterSlots.3ef5ec21.js → dynamicFilterSlots-BSCWv_Rw.js} +8 -8
- package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +1 -1
- package/components/DynamicFilter/store/{index.3cc06678.js → index-BcaPHLdk.js} +3 -3
- package/components/DynamicFilter/subcomponents/AppliedFilterChip/{index.db29f2ff.js → index-BZAxYAp1.js} +3 -3
- package/components/DynamicFilter/subcomponents/AppliedFilters/{index.2de720bc.js → index-DIFUGgys.js} +4 -4
- package/components/DynamicFilter/subcomponents/DynamicFilterBase/{index.7a9d4d33.js → index-D5BGKd5r.js} +8 -8
- package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/{index.a4269ba3.js → index-DFHDm1e4.js} +4 -3
- package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/{index.ebb6606c.js → index-Hn2Rzovd.js} +10 -9
- package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/{index.cd343ba0.js → index-B5F1Ji7m.js} +5 -4
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/{index.b5c31620.js → index-BQlxIk_N.js} +6 -6
- package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/{index.4c42f140.js → index-DF7EGeSx.js} +5 -4
- package/components/DynamicFilter/subcomponents/FieldTypes/{index.3e15fc1c.js → index-B6WQUIl7.js} +5 -5
- package/components/DynamicFilter/subcomponents/FilterActions/{index.0d687448.js → index-D5edNMdo.js} +3 -3
- package/components/DynamicFilter/subcomponents/InputFilter/{index.4c5bb297.js → index-bbdBrHj0.js} +33 -13
- package/components/DynamicFilter/subcomponents/PopoverFilter/{index.6c8c52ae.js → index-CD3aGB5S.js} +7 -6
- package/components/DynamicFilter/subcomponents/PopoverMenuFields/{index.9cf2bc44.js → index-MiYNpAu0.js} +2 -2
- package/components/DynamicFilter/types.d.ts +1 -1
- package/components/FieldLabel/{index.972f989e.js → index-BpW2AGJx.js} +6 -4
- package/components/GridLayout/{index.2b9bc85c.js → index-HK_hTGnZ.js} +51 -72
- package/components/GridLayout/subcomponents/Griditem/{index.684c3f3c.js → index-izY8S7ns.js} +11 -13
- package/components/GridLayout/subcomponents/Responsive/{index.dc0a1ce0.js → index-bpKDnaCd.js} +7 -7
- package/components/GridLayout/subcomponents/SizeProvider/{index.15d0ca85.js → index-OWN-RzRq.js} +15 -9
- package/components/HelperText/{index.2f4c6655.js → index-COWCXeJp.js} +10 -3
- package/components/Icon/{index.0f315ccd.js → index-CedboS6y.js} +9 -4
- package/components/Image/{index.32b58ce4.js → index-B7FhR9uF.js} +40 -31
- package/components/LanguagePopover/index-4kPWKmxk.js +179 -0
- package/components/LinearProgressIndeterminate/{index.6d1605ff.js → index-Do7CKcow.js} +5 -3
- package/components/Loadable/{index.e83cdb4e.js → index-BMbi9ISF.js} +1 -1
- package/components/LoadingError/{index.c5a70390.js → index-CNh7b1ew.js} +8 -6
- package/components/MFIsolationApp/constants.d.ts +1 -0
- package/components/MFIsolationApp/{index.56a12cde.js → index-DJ-MUHoQ.js} +48 -46
- package/components/MFLoader/{index.cc350d72.js → index-Bcg9TXnJ.js} +36 -15
- package/components/ModalDialog/{index.580a88dc.js → index-BuGRs967.js} +6 -6
- package/components/NavLink/{index.c6fd316b.js → index-B6Gmzyl0.js} +5 -3
- package/components/NoItemSelected/{index.7274cdb1.js → index-CMet73v_.js} +3 -1
- package/components/ObjectLogs/{index.1b51e5f2.js → index-_8l1PbEQ.js} +19 -12
- package/components/PDFViewer/{index.eed9494a.js → index-CV9x1XKR.js} +4 -2
- package/components/Page/{index.f6884847.js → index-DKQLs5le.js} +11 -8
- package/components/PaperForm/{index.86c1f1d6.js → index-DciWfnML.js} +4 -2
- package/components/Period/{index.5757802b.js → index-DxijnNw6.js} +20 -31
- package/components/PrintingSystem/{index.47e0ce83.js → index-sSZkZbrr.js} +16 -14
- package/components/PrintingSystem/subcomponents/BodyNode/{index.d58660a8.js → index-CxYjxWxL.js} +1 -1
- package/components/PrintingSystem/subcomponents/ChartNode/{index.8e010873.js → index-D85qi4Qz.js} +3 -1
- package/components/PrintingSystem/subcomponents/DividerNode/{index.13330f51.js → index-BA-IYLWh.js} +1 -1
- package/components/PrintingSystem/subcomponents/FooterNode/{index.05da3e1d.js → index-Bn9eNtAi.js} +1 -1
- package/components/PrintingSystem/subcomponents/GridNode/{index.d68b5460.js → index-gNEGVptD.js} +6 -2
- package/components/PrintingSystem/subcomponents/HeaderNode/{index.0ed11227.js → index-CiVr-jBF.js} +1 -1
- package/components/PrintingSystem/subcomponents/PaperNode/{index.0a0227e4.js → index-BGbvh0Xk.js} +1 -1
- package/components/PrintingSystem/subcomponents/PropertyValueNode/{index.18931b6e.js → index-DvhbyOo3.js} +1 -1
- package/components/PrintingSystem/subcomponents/SectionNode/{index.e80cce87.js → index-Cw8ZUwsm.js} +1 -1
- package/components/PrintingSystem/subcomponents/TextBoxNode/{index.7fc92f43.js → index-l9SFQ11V.js} +1 -1
- package/components/PropertyValue/{index.ee9cf342.js → index-hcXIE6qk.js} +7 -5
- package/components/Resizeable/{index.0ffd46bc.js → index-ObbOlXFx.js} +1 -1
- package/components/ScrollBar/{index.45b8db89.js → index-BpTjE7o3.js} +3 -1
- package/components/SideBar/{index.50868466.js → index-Cg1bZn8y.js} +100 -74
- package/components/SplitLayout/{index.c2b8dcb8.js → index-CYnKlhi5.js} +5 -3
- package/components/ToastContainer/ToastContainer.d.ts +1 -1
- package/components/ToastContainer/constants.d.ts +3 -0
- package/components/ToastContainer/helpers/toaster.d.ts +4 -0
- package/components/ToastContainer/icons.d.ts +9 -0
- package/components/ToastContainer/index-B5VGIn45.js +191 -0
- package/components/ToastContainer/index.d.ts +1 -0
- package/components/ToastContainer/slots/ToastContainerEnum.d.ts +13 -0
- package/components/ToastContainer/slots/index.d.ts +2 -0
- package/components/ToastContainer/slots/toastContainerSlots.d.ts +34 -0
- package/components/ToastContainer/subcomponents/ToastMessage/ToastMessage.d.ts +2 -0
- package/components/ToastContainer/subcomponents/ToastMessage/index.d.ts +1 -2
- package/components/ToastContainer/types.d.ts +39 -3
- package/components/animate/LoadingScreen/{index.31af02f8.js → index-CzDq3A0i.js} +1 -1
- package/components/animate/MotionContainer/{index.3032bd8f.js → index-eartnWyO.js} +1 -1
- package/components/animate/MotionLazyContainer/{index.d2902a6c.js → index-Be8osTiG.js} +1 -1
- package/components/animate/PropagateLoader/{index.a9da8d00.js → index-Bkq8V2SN.js} +1 -1
- package/components/animate/{index.160607f3.js → index-mH4o-crX.js} +1 -1
- package/components/animate/variants/{bounce.784aaaaa.js → bounce-DanQqHAX.js} +3 -1
- package/components/animate/variants/{fade.b561c0fc.js → fade-CAOJNn06.js} +3 -1
- package/components/areas/components/AreasAdmin/{index.cb60f940.js → index-qqSduaty.js} +21 -19
- package/components/areas/components/AreasViewer/classes/index.d.ts +1 -1
- package/components/areas/components/AreasViewer/classes/types.d.ts +0 -8
- package/components/areas/components/AreasViewer/{index.350ee032.js → index-D5If8gFK.js} +38 -105
- package/components/areas/contexts/AreasContext/helper.d.ts +2 -5
- package/components/areas/contexts/AreasContext/{index.1a5c5df1.js → index-Dyj8tCdG.js} +175 -130
- package/components/areas/contexts/AreasContext/types.d.ts +1 -4
- package/components/areas/contexts/WindowToolsMFContext/types.d.ts +3 -2
- package/components/areas/hooks/useAreas/{index.ba948f80.js → index-o0DvT3xZ.js} +2 -3
- package/components/areas/hooks/useDynamicMFParameters/{index.9e09e1e3.js → index-DhbcZPs9.js} +1 -1
- package/components/areas/hooks/useWindowToolsMF/{index.2fbae9dc.js → index-BECQfhbC.js} +2 -3
- package/components/areas/{icons.8266ccc8.js → icons-CwFr-alN.js} +0 -2
- package/components/areas/icons.d.ts +0 -2
- package/components/areas/index.d.ts +1 -1
- package/components/areas/types.d.ts +0 -40
- package/components/commercial/AppBarCommercial/{index.cdc42f41.js → index-DvigwCQP.js} +4 -2
- package/components/commercial/SectionCommercial/{index.a9265d42.js → index-CLHGooDg.js} +4 -2
- package/components/commercial/TopBar/{index.06c1e138.js → index-DJNYXgHq.js} +13 -11
- package/components/commercial/{index.163293c3.js → index-BLUHQfcA.js} +4 -4
- package/components/formatters/BooleanFormatter/{index.b224ae9b.js → index-DpF0x_xp.js} +3 -3
- package/components/formatters/DateFormatter/{index.2ef6f261.js → index-CGcRZ8BA.js} +1 -1
- package/components/formatters/PointsFormatter/{index.51cd6774.js → index-C7sR8iqk.js} +1 -1
- package/components/formatters/PriceFormatter/{index.97f75b4b.js → index-CsvRawmc.js} +1 -1
- package/components/formatters/UncertaintyFormatter/{index.c3ffdebc.js → index-B9ESVEVp.js} +4 -4
- package/components/formatters/{index.373a6ce1.js → index-CDt8LzvL.js} +13 -19
- package/components/hook-form/HelperError/{index.399e7338.js → index-D-_czK9n.js} +1 -1
- package/components/hook-form/RHFAutocomplete/{index.0d32fed5.js → index-BhbgwNUz.js} +20 -20
- package/components/hook-form/RHFAutocompleteAsync/{index.2622450c.js → index-BnUgdSnR.js} +5 -3
- package/components/hook-form/RHFCheckbox/{index.3229f16c.js → index-ubHFuH1F.js} +53 -46
- package/components/hook-form/RHFColorPicker/{index.86525787.js → index-DBpi0Zhe.js} +8 -6
- package/components/hook-form/RHFDateTime/{index.572079c5.js → index-BtfOlX4T.js} +7 -5
- package/components/hook-form/RHFPeriod/{index.1883d9f6.js → index-BicAIry0.js} +6 -4
- package/components/hook-form/RHFRadioGroup/{index.9eea0df1.js → index-Di37rp0B.js} +1 -1
- package/components/hook-form/RHFTextField/index-Cz7BMTLe.js +337 -0
- package/components/hook-form/RHFUpload/{index.cf63abf0.js → index-D52JNxDh.js} +10 -8
- package/components/maps/components/GpsTools/{index.7628172f.js → index-BP1dIwh6.js} +104 -34
- package/components/maps/components/Map/{index.df953487.js → index-CS6xr1Fl.js} +263 -73
- package/components/modal/{WindowBase.cb284225.js → WindowBase-CLBER1xc.js} +4 -4
- package/components/modal/{WindowConfirm.193cc75e.js → WindowConfirm-DraflAKP.js} +8 -7
- package/components/modal/{index.81eb6def.js → index-CydPIpKZ.js} +2 -0
- package/components/mui_extended/Accordion/{index.49007a43.js → index-ZFpEUCnw.js} +8 -6
- package/components/mui_extended/Avatar/{index.a2e1ca6d.js → index-Bk4Hq2nk.js} +5 -2
- package/components/mui_extended/Badge/{index.188ffbb4.js → index-D6F1o3k2.js} +4 -2
- package/components/mui_extended/Breadcrumbs/{index.4a44883c.js → index-DTS7rOZH.js} +1 -2
- package/components/mui_extended/Button/{index.ca15c36e.js → index-DlzpoczE.js} +33 -13
- package/components/mui_extended/{CheckBox.983e10e6.js → CheckBox-ByxYagHV.js} +4 -2
- package/components/mui_extended/IconButton/{index.caf17392.js → index-BfDbi0cC.js} +42 -22
- package/components/mui_extended/MenuActions/{index.c24bd476.js → index-CUz70BPj.js} +28 -24
- package/components/mui_extended/Pager/{index.f27033fc.js → index-CRgYDkV8.js} +8 -5
- package/components/mui_extended/Popover/{index.1fafd106.js → index-C6_2t4L1.js} +39 -27
- package/components/mui_extended/Stack/{index.b8c3b40b.js → index-CV2W-_eL.js} +3 -1
- package/components/mui_extended/Tab/{index.c2dca6dd.js → index-PyZxxeDt.js} +9 -3
- package/components/mui_extended/ToggleButton/{index.4b6f9c8e.js → index-X6htsgfF.js} +2 -2
- package/components/mui_extended/ToggleIconButton/{index.0513d9e6.js → index-mT-xXWg9.js} +3 -2
- package/components/mui_extended/Tooltip/{index.49bb5ee1.js → index-B8QUytCK.js} +2 -0
- package/components/mui_extended/Typography/{index.61dd3fc6.js → index-DKPqV11f.js} +4 -2
- package/components/popups/PopupsProvider/{index.9a23e1d0.js → index-DhSxmtfJ.js} +1 -2
- package/components/popups/PopupsViewer/{index.c6a0c277.js → index-D8iTb2JJ.js} +10 -7
- package/components/popups/PopupsViewer/slots/{popupsViewerSlots.0b92fc90.js → popupsViewerSlots-DEQAZ8fq.js} +4 -4
- package/contexts/ModalContext/{index.50cc9ba8.js → index-CMPcjPCy.js} +1 -1
- package/contexts/RHFormContext/{index.acc30d9b.js → index-B4a0h0fX.js} +3 -1
- package/hooks/useFormAddEdit/{index.daf5d0c8.js → index-DvRNtaub.js} +2 -2
- package/hooks/useModal/{index.6f5c238d.js → index-C9r1LQIz.js} +2 -3
- package/hooks/useSizeContainer/{index.3c48670c.js → index-D4hDjM1P.js} +2 -0
- package/hooks/useTab/{index.8c6646a4.js → index-DTbLh_DH.js} +1 -1
- package/index.js +149 -259
- package/package.json +2 -2
- package/{react-data-grid.c5377916.js → react-data-grid-BfYuZ6AK.js} +59 -110
- package/{react-draggable.df62ccbd.js → react-draggable-DsCPdgQP.js} +238 -57
- package/{react-json-view.57125fcf.js → react-json-view-bhqIAaNg.js} +277 -467
- package/{react-resizable.c746880c.js → react-resizable-eBbFl2dX.js} +75 -37
- package/{react-spinners.342a6578.js → react-spinners-TpKN9lZg.js} +6 -8
- package/{react-splitter-layout.8b1655c8.js → react-splitter-layout-C-JTsNGs.js} +14 -23
- package/style.css +1 -65
- package/styles/{DynamicFilter.f317726e.js → DynamicFilter-CJFsIegc.js} +1 -1
- package/styles/ToastContainer.styles.d.ts +2 -0
- package/styles/{index.ccd8acc4.js → index-Cc9p_h7i.js} +244 -49
- package/test/getNameDataTestId.d.ts +1 -1
- package/utils/{index.ebfbb70f.js → index-DiMrtgIu.js} +26 -51
- package/utils/index.d.ts +1 -1
- package/components/LanguagePopover/index.6ac2473a.js +0 -168
- package/components/ToastContainer/classes/constants.d.ts +0 -1
- package/components/ToastContainer/classes/index.d.ts +0 -8
- package/components/ToastContainer/classes/types.d.ts +0 -9
- package/components/ToastContainer/index.ed566312.js +0 -69
- package/components/ToastContainer/styles.d.ts +0 -2
- package/components/ToastContainer/subcomponents/ToastMessage/types.d.ts +0 -5
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Toasties/index.d.ts +0 -5
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Toasties/subcomponents/Toasty/index.d.ts +0 -6
- package/components/hook-form/RHFTextField/index.5b124af3.js +0 -296
- /package/{commonjs.565e6834.js → commonjs-BfYxJMv3.js} +0 -0
- /package/components/DataGrid/{constants.e334cd50.js → constants-8L7QgBKi.js} +0 -0
- /package/components/DynamicFilter/{constants.095f1dbb.js → constants-ByqmFATV.js} +0 -0
- /package/components/DynamicFilter/slots/{SlotsEnum.104a03d4.js → SlotsEnum-cawFeNzx.js} +0 -0
- /package/components/DynamicFilter/slots/{index.36b12be1.js → index-l0sNRNKZ.js} +0 -0
- /package/components/ScrollToTop/{index.e06f98f6.js → index-TxORk5dB.js} +0 -0
- /package/components/WrapperComponent/{index.57964195.js → index-BHV-CsDU.js} +0 -0
- /package/components/animate/{features.0fbf41e1.js → features-BbnE33u3.js} +0 -0
- /package/components/animate/variants/{container.11f82b76.js → container-Dmpr6tg5.js} +0 -0
- /package/components/animate/variants/{index.7a912140.js → index-l0sNRNKZ.js} +0 -0
- /package/components/animate/variants/{transition.bd46b9ce.js → transition-B9W5SWTa.js} +0 -0
- /package/components/areas/components/{index.558684b3.js → index-l0sNRNKZ.js} +0 -0
- /package/components/areas/{constants.66529246.js → constants-rqODZNZe.js} +0 -0
- /package/components/areas/contexts/DynamicMFParmsContext/{index.3d9ad0ad.js → index-22c6E7vK.js} +0 -0
- /package/components/areas/contexts/WindowToolsMFContext/{index.992ae7a3.js → index-DkE30fhm.js} +0 -0
- /package/components/areas/contexts/{index.24025b97.js → index-l0sNRNKZ.js} +0 -0
- /package/components/areas/{dictionary.08cfc4c9.js → dictionary-YUsP9beq.js} +0 -0
- /package/components/areas/hooks/{index.d9dc1e21.js → index-l0sNRNKZ.js} +0 -0
- /package/components/areas/{index.4cc6a221.js → index-B_Odny9h.js} +0 -0
- /package/components/hook-form/RHFMultiCheckbox/{index.437e6ba3.js → index-BARudV1A.js} +0 -0
- /package/components/hook-form/RHFSelect/{index.c6c60ecc.js → index-LdwRuFz-.js} +0 -0
- /package/components/maps/{index.13bb982c.js → index-Ci-7-FHg.js} +0 -0
- /package/components/mui_extended/BoxIcon/{index.d61e7ac5.js → index-BUTJ2tKw.js} +0 -0
- /package/components/mui_extended/CircularProgress/{index.967e70b7.js → index-Bnnti_G6.js} +0 -0
- /package/components/mui_extended/LinearProgress/{index.4092bb69.js → index-CGgW8jq2.js} +0 -0
- /package/components/mui_extended/LinkWithRoute/{index.288c51f3.js → index-BC2miUjR.js} +0 -0
- /package/components/mui_extended/{index.b606cd9d.js → index-l0sNRNKZ.js} +0 -0
- /package/components/popups/PopupsViewer/{constants.29247547.js → constants-DuyD7aCn.js} +0 -0
- /package/components/popups/PopupsViewer/{icons.066abd43.js → icons-BUujqqbu.js} +0 -0
- /package/components/popups/PopupsViewer/slots/{index.37ef2263.js → index-B98CiRLa.js} +0 -0
- /package/components/popups/{index.c5eae682.js → index-l0sNRNKZ.js} +0 -0
- /package/hocs/withToggle/{index.548aeace.js → index-C1_DMZD3.js} +0 -0
- /package/hooks/useFormReadyForUpdate/{index.f60f500e.js → index-B3HygFCM.js} +0 -0
- /package/hooks/useStateRef/{index.538edb89.js → index-C3P6ZK3m.js} +0 -0
- /package/test/{constants_no_mock.86c553a9.js → constants_no_mock-CF-669v-.js} +0 -0
- /package/test/{getNameDataTestId.0faeade8.js → getNameDataTestId-BaBTWhBr.js} +0 -0
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { O as NavItemMainRoot, Q as NavSubItemContentRoot, T as NavListSubItemRoot, U as ContainerListSubItem, V as ContentGroupsRoot, X as WrapperGroup, Y as WrapperGroupTitle, Z as CollapseButtonRoot, _ as WrapperContentMobile, $ as SideBarRoot } from "../../styles/index.
|
|
2
|
+
import { O as NavItemMainRoot, Q as NavSubItemContentRoot, T as NavListSubItemRoot, U as ContainerListSubItem, V as ContentGroupsRoot, X as WrapperGroup, Y as WrapperGroupTitle, Z as CollapseButtonRoot, _ as WrapperContentMobile, $ as SideBarRoot } from "../../styles/index-Cc9p_h7i.js";
|
|
3
3
|
import { createContext, useState, useContext, useEffect } from "react";
|
|
4
4
|
import { generateUtilityClasses, Collapse, Drawer as Drawer$1, useTheme } from "@mui/material";
|
|
5
5
|
import { unstable_composeClasses } from "@mui/base";
|
|
6
|
-
import { g as getComponentUtilityClass } from "../../utils/index.
|
|
7
|
-
import { T as TEST_PROP_ID } from "../../test/constants_no_mock
|
|
6
|
+
import { g as getComponentUtilityClass } from "../../utils/index-DiMrtgIu.js";
|
|
7
|
+
import { T as TEST_PROP_ID } from "../../test/constants_no_mock-CF-669v-.js";
|
|
8
8
|
import { useEnvironment, useBase, BaseProvider } from "@m4l/core";
|
|
9
9
|
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
10
|
-
import { I as Icon, A as ArrowIcon } from "../Icon/index.
|
|
11
|
-
import { T as Typography } from "../mui_extended/Typography/index.
|
|
10
|
+
import { I as Icon, A as ArrowIcon } from "../Icon/index-CedboS6y.js";
|
|
11
|
+
import { T as Typography } from "../mui_extended/Typography/index-DKPqV11f.js";
|
|
12
12
|
import clsx from "clsx";
|
|
13
13
|
import { useLocation } from "react-router-dom";
|
|
14
|
-
import { I as Image } from "../Image/index.
|
|
15
|
-
import { I as IconButton } from "../mui_extended/IconButton/index.
|
|
14
|
+
import { I as Image } from "../Image/index-B7FhR9uF.js";
|
|
15
|
+
import { I as IconButton } from "../mui_extended/IconButton/index-BfDbi0cC.js";
|
|
16
16
|
import { useResponsive } from "@m4l/styles";
|
|
17
17
|
const componentName = "M4LSideBar";
|
|
18
18
|
generateUtilityClasses(
|
|
19
19
|
componentName,
|
|
20
20
|
[
|
|
21
|
+
/* elements */
|
|
21
22
|
"root",
|
|
22
23
|
"containerSideBarLogo",
|
|
23
24
|
"contentDesktop",
|
|
@@ -54,6 +55,7 @@ generateUtilityClasses(
|
|
|
54
55
|
"drawer",
|
|
55
56
|
"popover",
|
|
56
57
|
"wrapperLogoFooter",
|
|
58
|
+
/* states or variants of elements */
|
|
57
59
|
"collapsed",
|
|
58
60
|
"visible",
|
|
59
61
|
"subItemActive",
|
|
@@ -62,6 +64,12 @@ generateUtilityClasses(
|
|
|
62
64
|
"variantComercial",
|
|
63
65
|
"overlapping"
|
|
64
66
|
]
|
|
67
|
+
/* returna un objeto igual a:
|
|
68
|
+
{
|
|
69
|
+
root: 'M4LSideBar-root',
|
|
70
|
+
|
|
71
|
+
}
|
|
72
|
+
*/
|
|
65
73
|
);
|
|
66
74
|
const getSideBarClassesByState = (ownerState) => {
|
|
67
75
|
const slots = {
|
|
@@ -122,6 +130,13 @@ const getSideBarClassesByState = (ownerState) => {
|
|
|
122
130
|
const composedClasses = unstable_composeClasses(slots, getComponentUtilityClass(componentName), {});
|
|
123
131
|
return {
|
|
124
132
|
...composedClasses
|
|
133
|
+
/* retorna un objeto para una variante de tipo = 'password':
|
|
134
|
+
{
|
|
135
|
+
input : "M4LRHFTextField-input"
|
|
136
|
+
root: "M4LRHFTextField-root M4LRHFTextField-variantPassword"
|
|
137
|
+
skeleton: "M4LRHFTextField-skeleton"
|
|
138
|
+
};
|
|
139
|
+
*/
|
|
125
140
|
};
|
|
126
141
|
};
|
|
127
142
|
const initialState = {
|
|
@@ -141,6 +156,7 @@ const initialState = {
|
|
|
141
156
|
},
|
|
142
157
|
isItemActive: () => false,
|
|
143
158
|
expandedWidth: "",
|
|
159
|
+
// Obtener las clases iniciales para la barra lateral
|
|
144
160
|
classes: getSideBarClassesByState({ collapsed: false, visible: true }),
|
|
145
161
|
companyName: ""
|
|
146
162
|
};
|
|
@@ -165,31 +181,33 @@ const SideBarProvider = (props) => {
|
|
|
165
181
|
classes,
|
|
166
182
|
companyName
|
|
167
183
|
} = value;
|
|
168
|
-
return
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
184
|
+
return (
|
|
185
|
+
// Proporcionar el contexto con las propiedades desestructuradas
|
|
186
|
+
/* @__PURE__ */ jsx(
|
|
187
|
+
SideBarContext.Provider,
|
|
188
|
+
{
|
|
189
|
+
value: {
|
|
190
|
+
collapsed,
|
|
191
|
+
visible,
|
|
192
|
+
onToggleCollapse,
|
|
193
|
+
onToggleVisible,
|
|
194
|
+
menuData,
|
|
195
|
+
onClick,
|
|
196
|
+
companyLogoNormalUrl,
|
|
197
|
+
companyLogoSmallUrl,
|
|
198
|
+
isItemActive,
|
|
199
|
+
expandedWidth,
|
|
200
|
+
classes,
|
|
201
|
+
companyName,
|
|
202
|
+
onToggleOverlay,
|
|
203
|
+
overlay
|
|
204
|
+
},
|
|
205
|
+
children
|
|
206
|
+
}
|
|
207
|
+
)
|
|
189
208
|
);
|
|
190
209
|
};
|
|
191
210
|
const useSideBar = () => useContext(SideBarContext);
|
|
192
|
-
const useSideBar$1 = useSideBar;
|
|
193
211
|
const SIDEBAR_PREFIX = "M4LSideBar";
|
|
194
212
|
const getNameDataTestId = (KEY) => {
|
|
195
213
|
return `${SIDEBAR_PREFIX}-${KEY}`;
|
|
@@ -198,7 +216,7 @@ const NavItemMainContent = (props) => {
|
|
|
198
216
|
const { item, onClick, handlerOpen, changeVisible, open } = props;
|
|
199
217
|
const { title, icon_url: icon, children } = item;
|
|
200
218
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
201
|
-
const { classes } = useSideBar
|
|
219
|
+
const { classes } = useSideBar();
|
|
202
220
|
const isDesktop = useResponsiveDesktop();
|
|
203
221
|
const handlerClick = (event) => {
|
|
204
222
|
onClick && onClick(item);
|
|
@@ -231,7 +249,7 @@ const NavItemMainContent = (props) => {
|
|
|
231
249
|
function NavItemMain(props) {
|
|
232
250
|
const { item, setOpen, open } = props;
|
|
233
251
|
const { children } = item;
|
|
234
|
-
const { onClick, isItemActive, onToggleVisible, classes } = useSideBar
|
|
252
|
+
const { onClick, isItemActive, onToggleVisible, classes } = useSideBar();
|
|
235
253
|
const active = isItemActive(item);
|
|
236
254
|
if (children) {
|
|
237
255
|
return /* @__PURE__ */ jsx(
|
|
@@ -267,7 +285,7 @@ const NavSubItemContent = (props) => {
|
|
|
267
285
|
const { item, onClick, closePopover = () => {
|
|
268
286
|
}, setOpenSub, openSub } = props;
|
|
269
287
|
const { title, icon_url } = item;
|
|
270
|
-
const { isItemActive, onToggleVisible, classes } = useSideBar
|
|
288
|
+
const { isItemActive, onToggleVisible, classes } = useSideBar();
|
|
271
289
|
const active = isItemActive(item);
|
|
272
290
|
const isDesktop = useResponsiveDesktop();
|
|
273
291
|
const hasChildren = item.children && Array.isArray(item.children) && item.children.length > 0;
|
|
@@ -308,7 +326,7 @@ const NavSubItemContent = (props) => {
|
|
|
308
326
|
};
|
|
309
327
|
function NavSubItem(props) {
|
|
310
328
|
const { item, closePopover, setOpenSub, openSub } = props;
|
|
311
|
-
const { onClick } = useSideBar
|
|
329
|
+
const { onClick } = useSideBar();
|
|
312
330
|
return /* @__PURE__ */ jsx(
|
|
313
331
|
NavSubItemContent,
|
|
314
332
|
{
|
|
@@ -325,7 +343,7 @@ function NavListSubItem(props) {
|
|
|
325
343
|
} } = props;
|
|
326
344
|
const { setAncestorActive } = useBase();
|
|
327
345
|
const [internalItemActive, setInternalItemActive] = useState(false);
|
|
328
|
-
const { classes, isItemActive } = useSideBar
|
|
346
|
+
const { classes, isItemActive } = useSideBar();
|
|
329
347
|
const active = isItemActive(list);
|
|
330
348
|
const [openSub, setOpenSub] = useState(false);
|
|
331
349
|
const hasChildren = list.children && Array.isArray(list.children) && list.children.length > 0;
|
|
@@ -386,7 +404,7 @@ function NavListSubItem(props) {
|
|
|
386
404
|
}
|
|
387
405
|
function ItemListMain(props) {
|
|
388
406
|
const { list } = props;
|
|
389
|
-
const { isItemActive, classes } = useSideBar
|
|
407
|
+
const { isItemActive, classes } = useSideBar();
|
|
390
408
|
const location = useLocation();
|
|
391
409
|
const [internalItemActive, setInternalItemActive] = useState(false);
|
|
392
410
|
const [active, setActive] = useState(false);
|
|
@@ -465,7 +483,7 @@ function ItemListMain(props) {
|
|
|
465
483
|
);
|
|
466
484
|
}
|
|
467
485
|
const ContentGroups = () => {
|
|
468
|
-
const { menuData, classes } = useSideBar
|
|
486
|
+
const { menuData, classes } = useSideBar();
|
|
469
487
|
const [itemMainActive, setItemMainActive] = useState(-1);
|
|
470
488
|
if (menuData && menuData.length > 0) {
|
|
471
489
|
return /* @__PURE__ */ jsxs(
|
|
@@ -509,7 +527,7 @@ const ContentGroups = () => {
|
|
|
509
527
|
);
|
|
510
528
|
};
|
|
511
529
|
function FooterSidebar(_props) {
|
|
512
|
-
const { classes, companyLogoNormalUrl } = useSideBar
|
|
530
|
+
const { classes, companyLogoNormalUrl } = useSideBar();
|
|
513
531
|
return /* @__PURE__ */ jsx(
|
|
514
532
|
CollapseButtonRoot,
|
|
515
533
|
{
|
|
@@ -531,7 +549,7 @@ function FooterSidebar(_props) {
|
|
|
531
549
|
const MENU_COLLAPSED_SIZE = "14px";
|
|
532
550
|
const MENU_COLLAPSED_CONTAINER_SIZE = "15px";
|
|
533
551
|
const ContentComponent = () => {
|
|
534
|
-
const { collapsed, onToggleCollapse, classes, onToggleOverlay, overlay } = useSideBar
|
|
552
|
+
const { collapsed, onToggleCollapse, classes, onToggleOverlay, overlay } = useSideBar();
|
|
535
553
|
const handlerOnMouseEnter = () => {
|
|
536
554
|
if (collapsed) {
|
|
537
555
|
onToggleOverlay(true);
|
|
@@ -592,7 +610,7 @@ const ContentComponent = () => {
|
|
|
592
610
|
);
|
|
593
611
|
};
|
|
594
612
|
const ContentDesktop = () => {
|
|
595
|
-
const { classes, collapsed, expandedWidth, overlay } = useSideBar
|
|
613
|
+
const { classes, collapsed, expandedWidth, overlay } = useSideBar();
|
|
596
614
|
const areaExpandMenuSize = collapsed ? !overlay ? MENU_COLLAPSED_SIZE : expandedWidth : expandedWidth;
|
|
597
615
|
return /* @__PURE__ */ jsx("div", { className: classes.areaExpandMenu, style: { width: areaExpandMenuSize }, children: /* @__PURE__ */ jsx(ContentComponent, {}) });
|
|
598
616
|
};
|
|
@@ -609,7 +627,7 @@ const ContentMobile = () => {
|
|
|
609
627
|
collapsed,
|
|
610
628
|
classes,
|
|
611
629
|
companyName
|
|
612
|
-
} = useSideBar
|
|
630
|
+
} = useSideBar();
|
|
613
631
|
const theme = useTheme();
|
|
614
632
|
return /* @__PURE__ */ jsx(
|
|
615
633
|
Drawer,
|
|
@@ -690,43 +708,51 @@ const SideBar = (props) => {
|
|
|
690
708
|
variantStyle
|
|
691
709
|
};
|
|
692
710
|
const classes = getSideBarClassesByState(ownerState);
|
|
693
|
-
return
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
711
|
+
return (
|
|
712
|
+
/**
|
|
713
|
+
* Componente SideBarRoot.
|
|
714
|
+
* Este componente representa la raíz de la barra lateral.
|
|
715
|
+
*
|
|
716
|
+
*/
|
|
717
|
+
/* @__PURE__ */ jsx(
|
|
718
|
+
SideBarRoot,
|
|
719
|
+
{
|
|
720
|
+
className: classes.root,
|
|
721
|
+
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("root") } : {},
|
|
722
|
+
children: /* @__PURE__ */ jsx(
|
|
723
|
+
SideBarProvider,
|
|
724
|
+
{
|
|
725
|
+
value: {
|
|
726
|
+
// Propiedades y funciones proporcionadas a través del contexto
|
|
727
|
+
collapsed,
|
|
728
|
+
visible,
|
|
729
|
+
onToggleCollapse,
|
|
730
|
+
onToggleVisible,
|
|
731
|
+
menuData,
|
|
732
|
+
onClick,
|
|
733
|
+
companyLogoNormalUrl,
|
|
734
|
+
companyLogoSmallUrl,
|
|
735
|
+
isItemActive,
|
|
736
|
+
expandedWidth,
|
|
737
|
+
classes,
|
|
738
|
+
companyName
|
|
739
|
+
},
|
|
740
|
+
children: /* @__PURE__ */ jsx(
|
|
741
|
+
"div",
|
|
742
|
+
{
|
|
743
|
+
className: classes.wrapperSideBar,
|
|
744
|
+
style: { width: collapsed ? MENU_COLLAPSED_SIZE : expandedWidth },
|
|
745
|
+
children: !isMobile ? /* @__PURE__ */ jsx(ContentDesktop, {}) : /* @__PURE__ */ jsx(ContentMobile, {})
|
|
746
|
+
}
|
|
747
|
+
)
|
|
748
|
+
}
|
|
749
|
+
)
|
|
750
|
+
}
|
|
751
|
+
)
|
|
726
752
|
);
|
|
727
753
|
};
|
|
728
754
|
export {
|
|
729
755
|
SideBar as S,
|
|
730
756
|
getNameDataTestId as g,
|
|
731
|
-
useSideBar
|
|
757
|
+
useSideBar as u
|
|
732
758
|
};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { a0 as SplitLayoutRoot, a1 as SplitMaster, a2 as SplitDetail } from "../../styles/index.
|
|
2
|
+
import { a0 as SplitLayoutRoot, a1 as SplitMaster, a2 as SplitDetail } from "../../styles/index-Cc9p_h7i.js";
|
|
3
3
|
import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
4
4
|
import { unstable_composeClasses } from "@mui/base";
|
|
5
5
|
import clsx from "clsx";
|
|
6
|
-
import { T as TEST_PROP_ID } from "../../test/constants_no_mock
|
|
7
|
-
import { S as SplitterLayout } from "../../react-splitter-layout.
|
|
6
|
+
import { T as TEST_PROP_ID } from "../../test/constants_no_mock-CF-669v-.js";
|
|
7
|
+
import { S as SplitterLayout } from "../../react-splitter-layout-C-JTsNGs.js";
|
|
8
8
|
const componentName = "M4LSplitLayout";
|
|
9
9
|
generateUtilityClasses(componentName, [
|
|
10
|
+
/* elements */
|
|
10
11
|
"root",
|
|
11
12
|
"firstPart",
|
|
12
13
|
"secondPart",
|
|
14
|
+
/* states or variants of elements */
|
|
13
15
|
"stateVertical",
|
|
14
16
|
"stateHorizontal"
|
|
15
17
|
]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ToastContainerProps } from './types';
|
|
1
|
+
import type { ToastContainerProps } from './types';
|
|
2
2
|
export declare const ToastContainer: (props: ToastContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ToastContainer as ToastContainer$1, toast } from "react-toastify";
|
|
3
|
+
import { a as getPropDataTestId } from "../../test/getNameDataTestId-BaBTWhBr.js";
|
|
4
|
+
import "react-toastify/dist/ReactToastify.min.css";
|
|
5
|
+
import { useState } from "react";
|
|
6
|
+
import { useEnvironment } from "@m4l/core";
|
|
7
|
+
import { styled } from "@mui/material/styles";
|
|
8
|
+
import { a3 as toastStyles } from "../../styles/index-Cc9p_h7i.js";
|
|
9
|
+
import { I as Icon } from "../Icon/index-CedboS6y.js";
|
|
10
|
+
var ToastContainerSlots = /* @__PURE__ */ ((ToastContainerSlots2) => {
|
|
11
|
+
ToastContainerSlots2["root"] = "root";
|
|
12
|
+
ToastContainerSlots2["messageRoot"] = "messageRoot";
|
|
13
|
+
ToastContainerSlots2["messageHeader"] = "messageHeader";
|
|
14
|
+
ToastContainerSlots2["messageIconRoot"] = "messageIconRoot";
|
|
15
|
+
ToastContainerSlots2["messageIcon"] = "messageIcon";
|
|
16
|
+
ToastContainerSlots2["messageTitle"] = "messageTitle";
|
|
17
|
+
ToastContainerSlots2["messageDescription"] = "messageDescription";
|
|
18
|
+
ToastContainerSlots2["messageCloseButton"] = "messageCloseButton";
|
|
19
|
+
ToastContainerSlots2["messageCloseButtonIcon"] = "messageCloseButtonIcon";
|
|
20
|
+
ToastContainerSlots2["messagePinButton"] = "messagePinButton";
|
|
21
|
+
ToastContainerSlots2["messagePinButtonIcon"] = "messagePinButtonIcon";
|
|
22
|
+
return ToastContainerSlots2;
|
|
23
|
+
})(ToastContainerSlots || {});
|
|
24
|
+
const TOAST_KEY_COMPONENT = "M4LToastContainer";
|
|
25
|
+
const DEFAULT_CLOSE_TIME = 3e4;
|
|
26
|
+
const ICONS_PATH = "frontend/components/toast/assets/icons";
|
|
27
|
+
const RootStyled = styled("div", {
|
|
28
|
+
name: TOAST_KEY_COMPONENT,
|
|
29
|
+
slot: ToastContainerSlots.root
|
|
30
|
+
})(toastStyles?.root);
|
|
31
|
+
const MessageRootStyled = styled("div", {
|
|
32
|
+
name: TOAST_KEY_COMPONENT,
|
|
33
|
+
slot: ToastContainerSlots.messageRoot
|
|
34
|
+
})(toastStyles?.messageRoot);
|
|
35
|
+
const MessageHeaderStyled = styled("div", {
|
|
36
|
+
name: TOAST_KEY_COMPONENT,
|
|
37
|
+
slot: ToastContainerSlots.messageHeader
|
|
38
|
+
})(toastStyles?.messageHeader);
|
|
39
|
+
const MessageIconRootStyled = styled("div", {
|
|
40
|
+
name: TOAST_KEY_COMPONENT,
|
|
41
|
+
slot: ToastContainerSlots.messageIconRoot
|
|
42
|
+
})(toastStyles?.messageIconRoot);
|
|
43
|
+
const MessageIconStyled = styled(Icon, {
|
|
44
|
+
name: TOAST_KEY_COMPONENT,
|
|
45
|
+
slot: ToastContainerSlots.messageIcon
|
|
46
|
+
})(toastStyles?.messageIcon);
|
|
47
|
+
const MessageTitleStyled = styled("strong", {
|
|
48
|
+
name: TOAST_KEY_COMPONENT,
|
|
49
|
+
slot: ToastContainerSlots.messageTitle
|
|
50
|
+
})(toastStyles?.messageTitle);
|
|
51
|
+
const MessageDescriptionStyled = styled("p", {
|
|
52
|
+
name: TOAST_KEY_COMPONENT,
|
|
53
|
+
slot: ToastContainerSlots.messageDescription
|
|
54
|
+
})(toastStyles?.messageDescription);
|
|
55
|
+
const MessageCloseButtonStyled = styled("button", {
|
|
56
|
+
name: TOAST_KEY_COMPONENT,
|
|
57
|
+
slot: ToastContainerSlots.messageCloseButton
|
|
58
|
+
})(toastStyles?.messageCloseButton);
|
|
59
|
+
const MessageCloseButtonIconStyled = styled(Icon, {
|
|
60
|
+
name: TOAST_KEY_COMPONENT,
|
|
61
|
+
slot: ToastContainerSlots.messageCloseButtonIcon
|
|
62
|
+
})(toastStyles?.messageCloseButtonIcon);
|
|
63
|
+
const MessagePinButtonStyled = styled("button", {
|
|
64
|
+
name: TOAST_KEY_COMPONENT,
|
|
65
|
+
slot: ToastContainerSlots.messagePinButton
|
|
66
|
+
})(toastStyles?.messagePinButton);
|
|
67
|
+
const MessagePinButtonIconStyled = styled(Icon, {
|
|
68
|
+
name: TOAST_KEY_COMPONENT,
|
|
69
|
+
slot: ToastContainerSlots.messagePinButtonIcon
|
|
70
|
+
})(toastStyles?.messagePinButtonIcon);
|
|
71
|
+
const ToastContainer = (props) => {
|
|
72
|
+
const { children, fixed = true, dataTestId, ...restProps } = props;
|
|
73
|
+
const ownerState = { fixed };
|
|
74
|
+
return /* @__PURE__ */ jsxs(
|
|
75
|
+
RootStyled,
|
|
76
|
+
{
|
|
77
|
+
ownerState,
|
|
78
|
+
...getPropDataTestId(dataTestId, ToastContainerSlots.root),
|
|
79
|
+
children: [
|
|
80
|
+
/* @__PURE__ */ jsx(
|
|
81
|
+
ToastContainer$1,
|
|
82
|
+
{
|
|
83
|
+
stacked: true,
|
|
84
|
+
icon: false,
|
|
85
|
+
closeButton: false,
|
|
86
|
+
autoClose: DEFAULT_CLOSE_TIME,
|
|
87
|
+
theme: "light",
|
|
88
|
+
...restProps
|
|
89
|
+
}
|
|
90
|
+
),
|
|
91
|
+
children
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
};
|
|
96
|
+
const ICONS = {
|
|
97
|
+
SUCCESS: "success.svg",
|
|
98
|
+
INFO: "info.svg",
|
|
99
|
+
WARNING: "warning.svg",
|
|
100
|
+
ERROR: "error.svg",
|
|
101
|
+
DEFAULT: "info.svg",
|
|
102
|
+
CLOSE: "close.svg",
|
|
103
|
+
PIN: "pin.svg"
|
|
104
|
+
};
|
|
105
|
+
const iconTypes = {
|
|
106
|
+
default: ICONS.DEFAULT,
|
|
107
|
+
info: ICONS.INFO,
|
|
108
|
+
success: ICONS.SUCCESS,
|
|
109
|
+
warning: ICONS.WARNING,
|
|
110
|
+
error: ICONS.ERROR
|
|
111
|
+
};
|
|
112
|
+
const ToastMessage = (props) => {
|
|
113
|
+
const [isPinned, setIsPinned] = useState(false);
|
|
114
|
+
const { type, title, description, closeToast, toastId, containerId } = props;
|
|
115
|
+
const ownerState = { type };
|
|
116
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
117
|
+
const iconToShow = iconTypes?.[type || "default"] || iconTypes.default;
|
|
118
|
+
const iconTypePath = `${host_static_assets}/${environment_assets}/${ICONS_PATH}/${iconToShow}`;
|
|
119
|
+
const iconClosePath = `${host_static_assets}/${environment_assets}/${ICONS_PATH}/${ICONS.CLOSE}`;
|
|
120
|
+
const iconPinPath = `${host_static_assets}/${environment_assets}/${ICONS_PATH}/${ICONS.PIN}`;
|
|
121
|
+
function pinToast() {
|
|
122
|
+
if (toastId) {
|
|
123
|
+
toast.update(toastId, { containerId, autoClose: false, closeOnClick: false });
|
|
124
|
+
setIsPinned(true);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return /* @__PURE__ */ jsxs(MessageRootStyled, { ownerState, children: [
|
|
128
|
+
/* @__PURE__ */ jsxs(MessageHeaderStyled, { ownerState, children: [
|
|
129
|
+
/* @__PURE__ */ jsx(MessageIconRootStyled, { ownerState, children: /* @__PURE__ */ jsx(MessageIconStyled, { src: iconTypePath, ownerState }) }),
|
|
130
|
+
/* @__PURE__ */ jsx(MessageTitleStyled, { ownerState, children: title }),
|
|
131
|
+
!isPinned && /* @__PURE__ */ jsx(
|
|
132
|
+
MessagePinButtonStyled,
|
|
133
|
+
{
|
|
134
|
+
onClick: pinToast,
|
|
135
|
+
ownerState,
|
|
136
|
+
"aria-describedby": `${TOAST_KEY_COMPONENT}-pin`,
|
|
137
|
+
children: /* @__PURE__ */ jsx(MessagePinButtonIconStyled, { src: iconPinPath, size: "small", ownerState })
|
|
138
|
+
}
|
|
139
|
+
),
|
|
140
|
+
/* @__PURE__ */ jsx(
|
|
141
|
+
MessageCloseButtonStyled,
|
|
142
|
+
{
|
|
143
|
+
onClick: closeToast,
|
|
144
|
+
ownerState,
|
|
145
|
+
"aria-describedby": `${TOAST_KEY_COMPONENT}-close`,
|
|
146
|
+
children: /* @__PURE__ */ jsx(MessageCloseButtonIconStyled, { src: iconClosePath, size: "small", ownerState })
|
|
147
|
+
}
|
|
148
|
+
)
|
|
149
|
+
] }),
|
|
150
|
+
description && /* @__PURE__ */ jsx(MessageDescriptionStyled, { ownerState, children: description })
|
|
151
|
+
] });
|
|
152
|
+
};
|
|
153
|
+
function optionsToProps(toastProps, containerId) {
|
|
154
|
+
return {
|
|
155
|
+
containerId,
|
|
156
|
+
type: toastProps?.type,
|
|
157
|
+
toastId: toastProps?.toastId,
|
|
158
|
+
autoClose: toastProps?.autoClose
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
function triggerToast({ props, toastOptions, containerId, type = "default" }) {
|
|
162
|
+
const currentContainerId = containerId || toastOptions?.containerId;
|
|
163
|
+
const allProps = { ...props, ...optionsToProps(toastOptions, currentContainerId) };
|
|
164
|
+
const toastFn = type === "default" || type === void 0 ? toast : toast[type];
|
|
165
|
+
const id = toastFn(/* @__PURE__ */ jsx(ToastMessage, { ...allProps }), {
|
|
166
|
+
...toastOptions,
|
|
167
|
+
containerId: currentContainerId
|
|
168
|
+
});
|
|
169
|
+
if (!toastOptions?.toastId) {
|
|
170
|
+
toast.update(id, {
|
|
171
|
+
containerId: currentContainerId,
|
|
172
|
+
render: /* @__PURE__ */ jsx(ToastMessage, { ...allProps, toastId: id })
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
return toastOptions?.toastId || id;
|
|
176
|
+
}
|
|
177
|
+
function createToaster(containerId) {
|
|
178
|
+
const toaster = (props, toastOptions = {}) => {
|
|
179
|
+
return triggerToast({ props, toastOptions, containerId });
|
|
180
|
+
};
|
|
181
|
+
toaster.success = (props, toastOptions = {}) => triggerToast({ props, toastOptions, type: "success", containerId });
|
|
182
|
+
toaster.info = (props, toastOptions = {}) => triggerToast({ props, toastOptions, type: "info", containerId });
|
|
183
|
+
toaster.warning = (props, toastOptions = {}) => triggerToast({ props, toastOptions, type: "warning", containerId });
|
|
184
|
+
toaster.error = (props, toastOptions = {}) => triggerToast({ props, toastOptions, type: "error", containerId });
|
|
185
|
+
return toaster;
|
|
186
|
+
}
|
|
187
|
+
export {
|
|
188
|
+
ToastContainer as T,
|
|
189
|
+
ToastMessage as a,
|
|
190
|
+
createToaster as c
|
|
191
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare enum ToastContainerSlots {
|
|
2
|
+
root = "root",
|
|
3
|
+
messageRoot = "messageRoot",
|
|
4
|
+
messageHeader = "messageHeader",
|
|
5
|
+
messageIconRoot = "messageIconRoot",
|
|
6
|
+
messageIcon = "messageIcon",
|
|
7
|
+
messageTitle = "messageTitle",
|
|
8
|
+
messageDescription = "messageDescription",
|
|
9
|
+
messageCloseButton = "messageCloseButton",
|
|
10
|
+
messageCloseButtonIcon = "messageCloseButtonIcon",
|
|
11
|
+
messagePinButton = "messagePinButton",
|
|
12
|
+
messagePinButtonIcon = "messagePinButtonIcon"
|
|
13
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const RootStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Partial<import("../types").ToastContainerProps> & Record<string, unknown> & {
|
|
3
|
+
ownerState: Partial<import("../types").ToastContainerProps> & Record<string, unknown>;
|
|
4
|
+
}, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement>>, {}>;
|
|
5
|
+
export declare const MessageRootStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Partial<import("../types").ToastContainerProps> & Record<string, unknown> & {
|
|
6
|
+
ownerState: Partial<import("../types").ToastContainerProps> & Record<string, unknown>;
|
|
7
|
+
}, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement>>, {}>;
|
|
8
|
+
export declare const MessageHeaderStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Partial<import("../types").ToastContainerProps> & Record<string, unknown> & {
|
|
9
|
+
ownerState: Partial<import("../types").ToastContainerProps> & Record<string, unknown>;
|
|
10
|
+
}, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement>>, {}>;
|
|
11
|
+
export declare const MessageIconRootStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Partial<import("../types").ToastContainerProps> & Record<string, unknown> & {
|
|
12
|
+
ownerState: Partial<import("../types").ToastContainerProps> & Record<string, unknown>;
|
|
13
|
+
}, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement>>, {}>;
|
|
14
|
+
export declare const MessageIconStyled: import("@emotion/styled").StyledComponent<Pick<import("../../Icon").IconProps, keyof import("../../Icon").IconProps> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Partial<import("../types").ToastContainerProps> & Record<string, unknown> & {
|
|
15
|
+
ownerState: Partial<import("../types").ToastContainerProps> & Record<string, unknown>;
|
|
16
|
+
}, {}, {}>;
|
|
17
|
+
export declare const MessageTitleStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Partial<import("../types").ToastContainerProps> & Record<string, unknown> & {
|
|
18
|
+
ownerState: Partial<import("../types").ToastContainerProps> & Record<string, unknown>;
|
|
19
|
+
}, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, keyof import("react").ClassAttributes<HTMLElement> | keyof import("react").HTMLAttributes<HTMLElement>>, {}>;
|
|
20
|
+
export declare const MessageDescriptionStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Partial<import("../types").ToastContainerProps> & Record<string, unknown> & {
|
|
21
|
+
ownerState: Partial<import("../types").ToastContainerProps> & Record<string, unknown>;
|
|
22
|
+
}, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, keyof import("react").ClassAttributes<HTMLParagraphElement> | keyof import("react").HTMLAttributes<HTMLParagraphElement>>, {}>;
|
|
23
|
+
export declare const MessageCloseButtonStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Partial<import("../types").ToastContainerProps> & Record<string, unknown> & {
|
|
24
|
+
ownerState: Partial<import("../types").ToastContainerProps> & Record<string, unknown>;
|
|
25
|
+
}, Pick<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, keyof import("react").ClassAttributes<HTMLButtonElement> | keyof import("react").ButtonHTMLAttributes<HTMLButtonElement>>, {}>;
|
|
26
|
+
export declare const MessageCloseButtonIconStyled: import("@emotion/styled").StyledComponent<Pick<import("../../Icon").IconProps, keyof import("../../Icon").IconProps> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Partial<import("../types").ToastContainerProps> & Record<string, unknown> & {
|
|
27
|
+
ownerState: Partial<import("../types").ToastContainerProps> & Record<string, unknown>;
|
|
28
|
+
}, {}, {}>;
|
|
29
|
+
export declare const MessagePinButtonStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Partial<import("../types").ToastContainerProps> & Record<string, unknown> & {
|
|
30
|
+
ownerState: Partial<import("../types").ToastContainerProps> & Record<string, unknown>;
|
|
31
|
+
}, Pick<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, keyof import("react").ClassAttributes<HTMLButtonElement> | keyof import("react").ButtonHTMLAttributes<HTMLButtonElement>>, {}>;
|
|
32
|
+
export declare const MessagePinButtonIconStyled: import("@emotion/styled").StyledComponent<Pick<import("../../Icon").IconProps, keyof import("../../Icon").IconProps> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Partial<import("../types").ToastContainerProps> & Record<string, unknown> & {
|
|
33
|
+
ownerState: Partial<import("../types").ToastContainerProps> & Record<string, unknown>;
|
|
34
|
+
}, {}, {}>;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const ToastMessage: (props: ToastMessageProps) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
export { ToastMessage } from './ToastMessage';
|