@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,11 +1,11 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { g as ImageRoot } from "../../styles/index.
|
|
3
|
-
import { T as TEST_PROP_ID } from "../../test/constants_no_mock
|
|
2
|
+
import { g as ImageRoot } from "../../styles/index-Cc9p_h7i.js";
|
|
3
|
+
import { T as TEST_PROP_ID } from "../../test/constants_no_mock-CF-669v-.js";
|
|
4
4
|
import clsx from "clsx";
|
|
5
5
|
import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
6
6
|
import { unstable_composeClasses } from "@mui/base";
|
|
7
7
|
import { useBase, useEnvironment, evaluateWithContext } from "@m4l/core";
|
|
8
|
-
import { c as classes, g as getSize } from "../PrintingSystem/index.
|
|
8
|
+
import { c as classes, g as getSize } from "../PrintingSystem/index-sSZkZbrr.js";
|
|
9
9
|
import QRCode from "qrcode.react";
|
|
10
10
|
const ratioOptions = {
|
|
11
11
|
"1.168:1": {
|
|
@@ -74,8 +74,10 @@ const getNameDataTestId = (KEY) => {
|
|
|
74
74
|
};
|
|
75
75
|
const componentName = "M4LImage";
|
|
76
76
|
generateUtilityClasses(componentName, [
|
|
77
|
+
/* elements */
|
|
77
78
|
"root",
|
|
78
79
|
"img"
|
|
80
|
+
/* states or variants of elements */
|
|
79
81
|
]);
|
|
80
82
|
function getImagenClassesUtilityClass(slot) {
|
|
81
83
|
return generateUtilityClass(componentName, slot);
|
|
@@ -94,24 +96,28 @@ function Image(props) {
|
|
|
94
96
|
const { src, alt, width, height, ratio = "1:1", className } = props;
|
|
95
97
|
const ratioImage = getRatioValues(ratio);
|
|
96
98
|
const classes2 = useUtilityClasses();
|
|
97
|
-
return
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
"
|
|
105
|
-
{
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
99
|
+
return (
|
|
100
|
+
/* BaseProvider: Es el contexto de valores propio del componente, se usa para propagar información dentro de su estructura evitando así implementar
|
|
101
|
+
una asignación por propiedades. */
|
|
102
|
+
/* @__PURE__ */ jsx(
|
|
103
|
+
ImageRoot,
|
|
104
|
+
{
|
|
105
|
+
className: clsx(classes2.root, className),
|
|
106
|
+
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("root") } : {},
|
|
107
|
+
style: width && height ? { minWidth: width, minHeight: height, width, height } : { width: "100%", height: "100%" },
|
|
108
|
+
children: /* @__PURE__ */ jsx(
|
|
109
|
+
"img",
|
|
110
|
+
{
|
|
111
|
+
alt,
|
|
112
|
+
src,
|
|
113
|
+
className: classes2.img,
|
|
114
|
+
width: !width ? "100%" : ratioImage.width,
|
|
115
|
+
height: !height ? "100%" : ratioImage.height,
|
|
116
|
+
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("img") } : {}
|
|
117
|
+
}
|
|
118
|
+
)
|
|
119
|
+
}
|
|
120
|
+
)
|
|
115
121
|
);
|
|
116
122
|
}
|
|
117
123
|
const ImageNode = (props) => {
|
|
@@ -119,17 +125,20 @@ const ImageNode = (props) => {
|
|
|
119
125
|
const { unitSize, sourceData } = useBase();
|
|
120
126
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
121
127
|
const resourceImg = evaluateWithContext(sourceData, src);
|
|
122
|
-
return
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
128
|
+
return (
|
|
129
|
+
// eslint-disable-next-line jsx-a11y/alt-text
|
|
130
|
+
/* @__PURE__ */ jsx(
|
|
131
|
+
"img",
|
|
132
|
+
{
|
|
133
|
+
src: `${host_static_assets}/${environment_assets}/${resourceImg}`,
|
|
134
|
+
className: clsx(classes.imageNodeRoot, className),
|
|
135
|
+
style: {
|
|
136
|
+
width: getSize(width, unitSize),
|
|
137
|
+
height: getSize(height, unitSize),
|
|
138
|
+
...style
|
|
139
|
+
}
|
|
131
140
|
}
|
|
132
|
-
|
|
141
|
+
)
|
|
133
142
|
);
|
|
134
143
|
};
|
|
135
144
|
const convertToPx = (size, magnitud) => {
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect } from "react";
|
|
3
|
+
import { generateUtilityClasses, generateUtilityClass, Stack, MenuItem } from "@mui/material";
|
|
4
|
+
import { I as Image } from "../Image/index-B7FhR9uF.js";
|
|
5
|
+
import { useLocales } from "@m4l/graphics";
|
|
6
|
+
import { L as LanguagePopoverRoot, h as ContainerMenuItems, i as ContainerProgress, j as ContainerImage, k as LabelItem } from "../../styles/index-Cc9p_h7i.js";
|
|
7
|
+
import { I as ImageButton } from "../mui_extended/Button/index-DlzpoczE.js";
|
|
8
|
+
import { useEnvironment, useNetwork } from "@m4l/core";
|
|
9
|
+
import { unstable_composeClasses } from "@mui/base";
|
|
10
|
+
import { T as TEST_PROP_ID } from "../../test/constants_no_mock-CF-669v-.js";
|
|
11
|
+
import { C as CircularProgress } from "../mui_extended/CircularProgress/index-Bnnti_G6.js";
|
|
12
|
+
import { P as Popover } from "../mui_extended/Popover/index-C6_2t4L1.js";
|
|
13
|
+
const componentName = "M4LanguagePopover";
|
|
14
|
+
generateUtilityClasses(
|
|
15
|
+
componentName,
|
|
16
|
+
[
|
|
17
|
+
/* elements */
|
|
18
|
+
"root",
|
|
19
|
+
"containerItems",
|
|
20
|
+
"containerProgress",
|
|
21
|
+
"labelItem",
|
|
22
|
+
"imageButton"
|
|
23
|
+
/* states or variants of elements */
|
|
24
|
+
]
|
|
25
|
+
);
|
|
26
|
+
function getM4LanguagePopoverClassesUtilityClass(slot) {
|
|
27
|
+
return generateUtilityClass(componentName, slot);
|
|
28
|
+
}
|
|
29
|
+
const useUtilityClasses = () => {
|
|
30
|
+
const slots = {
|
|
31
|
+
root: ["root"],
|
|
32
|
+
containerItems: ["containerItems"],
|
|
33
|
+
containerProgress: ["containerProgress"],
|
|
34
|
+
labelItem: ["labelItem"]
|
|
35
|
+
};
|
|
36
|
+
const composedClasses = unstable_composeClasses(slots, getM4LanguagePopoverClassesUtilityClass, {});
|
|
37
|
+
return {
|
|
38
|
+
...composedClasses
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
const LANGUAGEPOPOVER_PREFIX = "LanguagePopover";
|
|
42
|
+
const getNameDataTestId = (KEY) => {
|
|
43
|
+
return `${LANGUAGEPOPOVER_PREFIX}-${KEY}`;
|
|
44
|
+
};
|
|
45
|
+
function LanguagePopover(props) {
|
|
46
|
+
const { testingProps } = props;
|
|
47
|
+
const { currentLocale, onChangeLocale } = useLocales();
|
|
48
|
+
const { domain_token } = useEnvironment();
|
|
49
|
+
const { networkOperation } = useNetwork();
|
|
50
|
+
const [open, setOpen] = useState(testingProps?.open || null);
|
|
51
|
+
const [loading, setLoading] = useState(testingProps?.loading || false);
|
|
52
|
+
const [allLocales, setAllLocales] = useState(
|
|
53
|
+
testingProps?.allLocales || []
|
|
54
|
+
);
|
|
55
|
+
const handleOpen = (event) => {
|
|
56
|
+
setOpen(event.currentTarget);
|
|
57
|
+
};
|
|
58
|
+
const handleClose = () => {
|
|
59
|
+
setOpen(null);
|
|
60
|
+
};
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
let mounted = true;
|
|
63
|
+
if (open === null || loading || allLocales.length > 0) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
setLoading(true);
|
|
67
|
+
networkOperation({
|
|
68
|
+
method: "GET",
|
|
69
|
+
endPoint: `na/locales`,
|
|
70
|
+
parms: { domain_token }
|
|
71
|
+
}).then((response) => {
|
|
72
|
+
if (mounted) {
|
|
73
|
+
!testingProps && setAllLocales(response.data);
|
|
74
|
+
}
|
|
75
|
+
}).finally(() => {
|
|
76
|
+
setLoading(false);
|
|
77
|
+
});
|
|
78
|
+
return function cleanUp() {
|
|
79
|
+
mounted = false;
|
|
80
|
+
};
|
|
81
|
+
}, [open]);
|
|
82
|
+
const classes = useUtilityClasses();
|
|
83
|
+
return (
|
|
84
|
+
/* LanguagePopoverRoot: Contenedor principal del componente, es usado para aplicar los estilos css de los overrides que
|
|
85
|
+
provienen del objeto del tema. Se usa para garantizar de que estos estilos no se propaguen a otros componentes
|
|
86
|
+
de la plataforna web. */
|
|
87
|
+
/* @__PURE__ */ jsxs(
|
|
88
|
+
LanguagePopoverRoot,
|
|
89
|
+
{
|
|
90
|
+
className: classes.root,
|
|
91
|
+
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("root") } : {},
|
|
92
|
+
children: [
|
|
93
|
+
/* @__PURE__ */ jsx(
|
|
94
|
+
ImageButton,
|
|
95
|
+
{
|
|
96
|
+
className: classes.imageButton,
|
|
97
|
+
onClick: handleOpen,
|
|
98
|
+
sx: {
|
|
99
|
+
width: 28,
|
|
100
|
+
height: 28,
|
|
101
|
+
...open && { bgcolor: "action.selected" }
|
|
102
|
+
},
|
|
103
|
+
src: currentLocale?.url_icon || "",
|
|
104
|
+
alt: currentLocale?.name,
|
|
105
|
+
width: "24px",
|
|
106
|
+
height: "24px",
|
|
107
|
+
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("imageButton") } : {}
|
|
108
|
+
}
|
|
109
|
+
),
|
|
110
|
+
/* @__PURE__ */ jsx(
|
|
111
|
+
Popover,
|
|
112
|
+
{
|
|
113
|
+
arrowType: "top-right",
|
|
114
|
+
open: Boolean(open),
|
|
115
|
+
anchorEl: open,
|
|
116
|
+
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
117
|
+
onClose: handleClose,
|
|
118
|
+
sx: {
|
|
119
|
+
mt: 1.5,
|
|
120
|
+
ml: 0.75,
|
|
121
|
+
width: 180,
|
|
122
|
+
rowGap: "100px",
|
|
123
|
+
"& .MuiMenuItem-root": { px: 1, typography: "body2", borderRadius: 0.75 }
|
|
124
|
+
},
|
|
125
|
+
children: /* @__PURE__ */ jsxs(
|
|
126
|
+
ContainerMenuItems,
|
|
127
|
+
{
|
|
128
|
+
className: classes.containerItems,
|
|
129
|
+
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("containerItems") } : {},
|
|
130
|
+
children: [
|
|
131
|
+
allLocales.length === 0 && /* CircularProgress: Componente extendido que proporciona una animación de carga circular, el cual
|
|
132
|
+
será visible hasta que se complete la operación de red asociada a la lista de idiomas disponibles. */
|
|
133
|
+
/* @__PURE__ */ jsx(
|
|
134
|
+
ContainerProgress,
|
|
135
|
+
{
|
|
136
|
+
className: classes.containerProgress,
|
|
137
|
+
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("containerProgress") } : {},
|
|
138
|
+
children: /* @__PURE__ */ jsx(CircularProgress, { size: "20px" })
|
|
139
|
+
}
|
|
140
|
+
),
|
|
141
|
+
allLocales.length > 0 && /* Stack, MenuItem, Image, LabelItem: El grupo de componentes conforma las opciones del menú de idioma,
|
|
142
|
+
se replica dependiendo de la cantidad de elementos que existan en la lista allLocales */
|
|
143
|
+
/* @__PURE__ */ jsx(Stack, { spacing: 0.75, children: allLocales.map((option) => /* @__PURE__ */ jsxs(
|
|
144
|
+
MenuItem,
|
|
145
|
+
{
|
|
146
|
+
selected: option.lang === currentLocale?.lang && option?.script === currentLocale?.script && option?.region === currentLocale?.region,
|
|
147
|
+
onClick: () => {
|
|
148
|
+
onChangeLocale(option);
|
|
149
|
+
handleClose();
|
|
150
|
+
},
|
|
151
|
+
children: [
|
|
152
|
+
/* @__PURE__ */ jsx(ContainerImage, { children: /* @__PURE__ */ jsx(Image, { alt: option.name, src: option.url_icon, ratio: "1:1" }) }),
|
|
153
|
+
/* @__PURE__ */ jsx(
|
|
154
|
+
LabelItem,
|
|
155
|
+
{
|
|
156
|
+
className: classes.labelItem,
|
|
157
|
+
...process.env.NODE_ENV !== "production" ? {
|
|
158
|
+
[TEST_PROP_ID]: getNameDataTestId("labelItem")
|
|
159
|
+
} : {},
|
|
160
|
+
children: option.name
|
|
161
|
+
}
|
|
162
|
+
)
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
option.lang || option.script || option.region
|
|
166
|
+
)) })
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
)
|
|
170
|
+
}
|
|
171
|
+
)
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
)
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
export {
|
|
178
|
+
LanguagePopover as L
|
|
179
|
+
};
|
|
@@ -2,15 +2,17 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { generateUtilityClasses } from "@mui/material";
|
|
4
4
|
import { unstable_composeClasses } from "@mui/base";
|
|
5
|
-
import { g as getComponentUtilityClass } from "../../utils/index.
|
|
6
|
-
import { l as LinearProgressIndeterminateRoot } from "../../styles/index.
|
|
7
|
-
import { T as TEST_PROP_ID } from "../../test/constants_no_mock
|
|
5
|
+
import { g as getComponentUtilityClass } from "../../utils/index-DiMrtgIu.js";
|
|
6
|
+
import { l as LinearProgressIndeterminateRoot } from "../../styles/index-Cc9p_h7i.js";
|
|
7
|
+
import { T as TEST_PROP_ID } from "../../test/constants_no_mock-CF-669v-.js";
|
|
8
8
|
const LINEAR_PROGRESS_INDETERMINATE_CLASS_NAME = "M4LinearProgressIndeterminate";
|
|
9
9
|
generateUtilityClasses(
|
|
10
10
|
LINEAR_PROGRESS_INDETERMINATE_CLASS_NAME,
|
|
11
11
|
[
|
|
12
|
+
/* elements */
|
|
12
13
|
"root",
|
|
13
14
|
"windowLinearProgressBar"
|
|
15
|
+
/* states or variants of elements */
|
|
14
16
|
],
|
|
15
17
|
LINEAR_PROGRESS_INDETERMINATE_CLASS_NAME
|
|
16
18
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Suspense } from "react";
|
|
3
|
-
import { P as PropagateLoader } from "../animate/PropagateLoader/index.
|
|
3
|
+
import { P as PropagateLoader } from "../animate/PropagateLoader/index-Bkq8V2SN.js";
|
|
4
4
|
const Loadable = (Component) => function EmbededLoadable(props) {
|
|
5
5
|
return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(PropagateLoader, {}), children: /* @__PURE__ */ jsx(Component, { ...props }) });
|
|
6
6
|
};
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
3
|
-
import { I as ICONS } from "../areas/icons.
|
|
3
|
+
import { I as ICONS } from "../areas/icons-CwFr-alN.js";
|
|
4
4
|
import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
5
5
|
import { unstable_composeClasses } from "@mui/base";
|
|
6
|
-
import { m as LoadingErrorRoot } from "../../styles/index.
|
|
7
|
-
import { L as LinearProgressIndeterminate } from "../LinearProgressIndeterminate/index.
|
|
8
|
-
import { I as Icon } from "../Icon/index.
|
|
9
|
-
import { T as Typography } from "../mui_extended/Typography/index.
|
|
10
|
-
import { B as Button } from "../mui_extended/Button/index.
|
|
6
|
+
import { m as LoadingErrorRoot } from "../../styles/index-Cc9p_h7i.js";
|
|
7
|
+
import { L as LinearProgressIndeterminate } from "../LinearProgressIndeterminate/index-Do7CKcow.js";
|
|
8
|
+
import { I as Icon } from "../Icon/index-CedboS6y.js";
|
|
9
|
+
import { T as Typography } from "../mui_extended/Typography/index-DKPqV11f.js";
|
|
10
|
+
import { B as Button } from "../mui_extended/Button/index-DlzpoczE.js";
|
|
11
11
|
const componentName = "M4LoadingError";
|
|
12
12
|
generateUtilityClasses(componentName, [
|
|
13
|
+
/* elements */
|
|
13
14
|
"root",
|
|
14
15
|
"loadingErrorLoading",
|
|
15
16
|
"loadingError",
|
|
@@ -19,6 +20,7 @@ generateUtilityClasses(componentName, [
|
|
|
19
20
|
"loadingErrorDivider",
|
|
20
21
|
"loadingErrorTextAction",
|
|
21
22
|
"titleDescription"
|
|
23
|
+
/* states or variants of elements */
|
|
22
24
|
]);
|
|
23
25
|
function getLoadingErrorUtilityClass(slot) {
|
|
24
26
|
return generateUtilityClass(componentName, slot);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TOAST_CONTAINER_ID = "toast-host";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useMemo, useCallback } from "react";
|
|
3
3
|
import { unstable_HistoryRouter } from "react-router-dom";
|
|
4
|
-
import { ToastContainer, toast } from "react-toastify";
|
|
5
4
|
import { createBrowserHistory } from "history";
|
|
6
5
|
import EventEmitter from "eventemitter3";
|
|
7
6
|
import NProgress from "nprogress";
|
|
8
7
|
import { HostThemeProvider, FormatterProvider, LocalesProvider, getLocaleFromNetwork, ResponsiveContainerProvider } from "@m4l/graphics";
|
|
9
8
|
import { useAuth, DomainCountryProvider, EnvironmentProvider, HostToolsProvider, NetworkProvider, axiosOperation, AuthProvider } from "@m4l/core";
|
|
9
|
+
import { c as createToaster, T as ToastContainer } from "../ToastContainer/index-B5VGIn45.js";
|
|
10
10
|
import { format } from "date-fns";
|
|
11
11
|
import { defaultThemeOptions, fnComponentsOverrides } from "@m4l/styles";
|
|
12
|
-
import { B as BaseModule } from "../BaseModule/index.
|
|
13
|
-
import { A as AreasProvider } from "../areas/contexts/AreasContext/index.
|
|
12
|
+
import { B as BaseModule } from "../BaseModule/index-Bl0GPyrz.js";
|
|
13
|
+
import { A as AreasProvider } from "../areas/contexts/AreasContext/index-Dyj8tCdG.js";
|
|
14
14
|
function MFAuthApp(props) {
|
|
15
15
|
const { children, user, pwd } = props;
|
|
16
16
|
const { isAuthenticated, isInitialized, login, user: authUser } = useAuth();
|
|
@@ -19,8 +19,7 @@ function MFAuthApp(props) {
|
|
|
19
19
|
login(user, pwd, false);
|
|
20
20
|
}
|
|
21
21
|
}, [isInitialized, isAuthenticated]);
|
|
22
|
-
if (!isAuthenticated)
|
|
23
|
-
return /* @__PURE__ */ jsx("div", { children: "Pendiente por autenticarse" });
|
|
22
|
+
if (!isAuthenticated) return /* @__PURE__ */ jsx("div", { children: "Pendiente por autenticarse" });
|
|
24
23
|
const domianCountry = {
|
|
25
24
|
id: 1,
|
|
26
25
|
currency: "USD",
|
|
@@ -35,32 +34,30 @@ function MFAuthApp(props) {
|
|
|
35
34
|
domianCountry.decimal_symbol = authUser?.domain_country.decimal_symbol ?? domianCountry.decimal_symbol;
|
|
36
35
|
domianCountry.thousands_symbol = authUser?.domain_country?.thousands_symbol ?? domianCountry.thousands_symbol;
|
|
37
36
|
}
|
|
38
|
-
return /* @__PURE__ */
|
|
37
|
+
return /* @__PURE__ */ jsx(
|
|
39
38
|
HostThemeProvider,
|
|
40
39
|
{
|
|
41
40
|
hostThemeOptions: defaultThemeOptions,
|
|
42
41
|
fnComponentsOverrides,
|
|
43
42
|
isMicroFrontEnd: true,
|
|
44
|
-
children:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
{
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
) })
|
|
60
|
-
]
|
|
43
|
+
children: /* @__PURE__ */ jsx(DomainCountryProvider, { ...domianCountry, isMicroFrontEnd: false, children: /* @__PURE__ */ jsx(
|
|
44
|
+
FormatterProvider,
|
|
45
|
+
{
|
|
46
|
+
isMicroFrontEnd: false,
|
|
47
|
+
dateFormatter: {
|
|
48
|
+
formatDate: format
|
|
49
|
+
},
|
|
50
|
+
currencyFormatter: {
|
|
51
|
+
code: domianCountry.currency,
|
|
52
|
+
decimalDigits: domianCountry.currency_decimal_digits
|
|
53
|
+
},
|
|
54
|
+
children
|
|
55
|
+
}
|
|
56
|
+
) })
|
|
61
57
|
}
|
|
62
58
|
);
|
|
63
59
|
}
|
|
60
|
+
const TOAST_CONTAINER_ID = "toast-host";
|
|
64
61
|
const history = createBrowserHistory({ window });
|
|
65
62
|
function MFIsolationApp(props) {
|
|
66
63
|
const {
|
|
@@ -68,6 +65,7 @@ function MFIsolationApp(props) {
|
|
|
68
65
|
user,
|
|
69
66
|
pwd,
|
|
70
67
|
database = "domain",
|
|
68
|
+
// 'domain
|
|
71
69
|
host_api_local,
|
|
72
70
|
host_api_remote,
|
|
73
71
|
host_static_assets,
|
|
@@ -127,10 +125,11 @@ function MFIsolationApp(props) {
|
|
|
127
125
|
}),
|
|
128
126
|
[]
|
|
129
127
|
);
|
|
128
|
+
const toaster = createToaster(TOAST_CONTAINER_ID);
|
|
130
129
|
const hostTools = useMemo(
|
|
131
130
|
() => ({
|
|
132
131
|
history,
|
|
133
|
-
toast,
|
|
132
|
+
toast: toaster,
|
|
134
133
|
startProgress,
|
|
135
134
|
stopProgress,
|
|
136
135
|
events_add_listener,
|
|
@@ -139,28 +138,31 @@ function MFIsolationApp(props) {
|
|
|
139
138
|
}),
|
|
140
139
|
[]
|
|
141
140
|
);
|
|
142
|
-
return /* @__PURE__ */ jsx(EnvironmentProvider, { ...environment, children: /* @__PURE__ */ jsx(HostToolsProvider, { ...hostTools, children: /* @__PURE__ */ jsx(NetworkProvider, { axiosOperation, children: /* @__PURE__ */ jsx(unstable_HistoryRouter, { history, children: /* @__PURE__ */ jsx(LocalesProvider, { isMicroFrontEnd: false, getLocaleFromNetwork, children: /* @__PURE__ */ jsx(AuthProvider, { children: /* @__PURE__ */
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
141
|
+
return /* @__PURE__ */ jsx(EnvironmentProvider, { ...environment, children: /* @__PURE__ */ jsx(HostToolsProvider, { ...hostTools, children: /* @__PURE__ */ jsx(NetworkProvider, { axiosOperation, children: /* @__PURE__ */ jsx(unstable_HistoryRouter, { history, children: /* @__PURE__ */ jsx(LocalesProvider, { isMicroFrontEnd: false, getLocaleFromNetwork, children: /* @__PURE__ */ jsx(AuthProvider, { children: /* @__PURE__ */ jsxs(MFAuthApp, { user, pwd, children: [
|
|
142
|
+
/* @__PURE__ */ jsx(ToastContainer, { containerId: TOAST_CONTAINER_ID }),
|
|
143
|
+
/* @__PURE__ */ jsx(
|
|
144
|
+
BaseModule,
|
|
145
|
+
{
|
|
146
|
+
moduleId,
|
|
147
|
+
privileges,
|
|
148
|
+
skeletonFlags,
|
|
149
|
+
componentsDictionary,
|
|
150
|
+
moduleNameField,
|
|
151
|
+
children: /* @__PURE__ */ jsx(
|
|
152
|
+
AreasProvider,
|
|
153
|
+
{
|
|
154
|
+
onLoad,
|
|
155
|
+
loadAreasFromNetwork: activeAreasNetwork,
|
|
156
|
+
loadCookiesFromNetwork: activeCookiesFromNetwork,
|
|
157
|
+
onSelectLayout: (modId) => {
|
|
158
|
+
console.log("onSelectLayout", modId);
|
|
159
|
+
},
|
|
160
|
+
children: /* @__PURE__ */ jsx(ResponsiveContainerProvider, { observedDivRef, children })
|
|
161
|
+
}
|
|
162
|
+
)
|
|
163
|
+
}
|
|
164
|
+
)
|
|
165
|
+
] }) }) }) }) }) }) });
|
|
164
166
|
}
|
|
165
167
|
export {
|
|
166
168
|
MFIsolationApp as M
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) =>
|
|
4
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
5
|
import { useState, useCallback, useEffect } from "react";
|
|
9
6
|
import { useNetwork, useEnvironment, useHostTools, axiosOperation } from "@m4l/core";
|
|
@@ -11,13 +8,15 @@ import { useHostTheme, useFormatter, useLocales, useFirstRender } from "@m4l/gra
|
|
|
11
8
|
import debounce from "lodash/debounce";
|
|
12
9
|
import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
13
10
|
import { unstable_composeClasses } from "@mui/base";
|
|
14
|
-
import { L as LinearProgress } from "../mui_extended/LinearProgress/index.
|
|
15
|
-
import { L as LoadingError } from "../LoadingError/index.
|
|
16
|
-
import { M as MFLoaderRoot } from "../../styles/index.
|
|
11
|
+
import { L as LinearProgress } from "../mui_extended/LinearProgress/index-CGgW8jq2.js";
|
|
12
|
+
import { L as LoadingError } from "../LoadingError/index-CNh7b1ew.js";
|
|
13
|
+
import { M as MFLoaderRoot } from "../../styles/index-Cc9p_h7i.js";
|
|
17
14
|
const componentName = "M4LMFLoader";
|
|
18
15
|
const mfLoaderClasses = generateUtilityClasses(componentName, [
|
|
16
|
+
/* elements */
|
|
19
17
|
"root",
|
|
20
18
|
"containerLinearProgress"
|
|
19
|
+
/* states or variants of elements */
|
|
21
20
|
]);
|
|
22
21
|
function getMFLoaderUtilityClass(slot) {
|
|
23
22
|
return generateUtilityClass(componentName, slot);
|
|
@@ -47,6 +46,8 @@ class ObservableLoaderMF {
|
|
|
47
46
|
__publicField(this, "host");
|
|
48
47
|
__publicField(this, "isRemote");
|
|
49
48
|
__publicField(this, "eventStatus");
|
|
49
|
+
// private prefix: string;
|
|
50
|
+
// private moduleId: string;
|
|
50
51
|
__publicField(this, "scriptId");
|
|
51
52
|
__publicField(this, "networkOperation");
|
|
52
53
|
__publicField(this, "subscribers");
|
|
@@ -73,6 +74,7 @@ class ObservableLoaderMF {
|
|
|
73
74
|
});
|
|
74
75
|
}
|
|
75
76
|
}
|
|
77
|
+
//Metodo para arrancar la ejecución
|
|
76
78
|
async start() {
|
|
77
79
|
let percentCompleted = 0;
|
|
78
80
|
this.notify("progress", percentCompleted);
|
|
@@ -92,14 +94,14 @@ class ObservableLoaderMF {
|
|
|
92
94
|
endPoint: urlFile,
|
|
93
95
|
isRemote: this.isRemote,
|
|
94
96
|
headers: { "Content-Type": "application/json" },
|
|
97
|
+
// La propiedad es un método nativo de axios usado para conocer el estado descarga para una solicitud de red.
|
|
95
98
|
onDownloadProgress: (progressEvent) => {
|
|
96
99
|
try {
|
|
97
100
|
if (progressEvent.lengthComputable) {
|
|
98
101
|
percentCompleted = 10 + Math.round(progressEvent.loaded * 90 / progressEvent.total);
|
|
99
102
|
} else {
|
|
100
103
|
percentCompleted = 10 + progressEvent.loaded / 15e5 * 90;
|
|
101
|
-
if (percentCompleted > 95)
|
|
102
|
-
percentCompleted = 95;
|
|
104
|
+
if (percentCompleted > 95) percentCompleted = 95;
|
|
103
105
|
}
|
|
104
106
|
} catch (error) {
|
|
105
107
|
}
|
|
@@ -116,7 +118,7 @@ class ObservableLoaderMF {
|
|
|
116
118
|
});
|
|
117
119
|
if (ret == "ok") {
|
|
118
120
|
const script = document.createElement("script");
|
|
119
|
-
const startTime = new Date().getTime();
|
|
121
|
+
const startTime = (/* @__PURE__ */ new Date()).getTime();
|
|
120
122
|
script.id = this.scriptId;
|
|
121
123
|
script.crossOrigin = "";
|
|
122
124
|
script.type = "module";
|
|
@@ -128,16 +130,19 @@ class ObservableLoaderMF {
|
|
|
128
130
|
console.debug("Script appened", startTime);
|
|
129
131
|
}
|
|
130
132
|
}
|
|
133
|
+
// Método para suscribirse al objeto observable
|
|
131
134
|
subscribe(subscriber) {
|
|
132
135
|
this.subscribers.push(subscriber);
|
|
133
136
|
this.tryAgain();
|
|
134
137
|
}
|
|
138
|
+
// Método para cancelar la suscripción a objeto observable
|
|
135
139
|
unsubscribe(subscriber) {
|
|
136
140
|
const index = this.subscribers.indexOf(subscriber);
|
|
137
141
|
if (index !== -1) {
|
|
138
142
|
this.subscribers.splice(index, 1);
|
|
139
143
|
}
|
|
140
144
|
}
|
|
145
|
+
// Método para notificar a los suscriptores cuando algo cambie
|
|
141
146
|
notify(newEvent, progress) {
|
|
142
147
|
this.eventStatus = newEvent;
|
|
143
148
|
this.subscribers.forEach((subscriber) => {
|
|
@@ -146,12 +151,23 @@ class ObservableLoaderMF {
|
|
|
146
151
|
}
|
|
147
152
|
}
|
|
148
153
|
function getDivScritId(prefix, moduleId) {
|
|
149
|
-
const rotational_id = `${Math.round(new Date().getTime() / 1e3)}_rnd_${Math.round(
|
|
154
|
+
const rotational_id = `${Math.round((/* @__PURE__ */ new Date()).getTime() / 1e3)}_rnd_${Math.round(
|
|
150
155
|
Math.random() * 1e3
|
|
151
156
|
)}`;
|
|
152
157
|
return {
|
|
158
|
+
// Esta propiedad es usada para asociarse al elemento div que retorna el componente MFLoader.
|
|
159
|
+
// Nota: este valor es importante porque cuando se requiera cargar el microfrontend, se utilizará la referencia id del elemento para crear un react render de la aplicación foranea.
|
|
160
|
+
/**
|
|
161
|
+
* Identificador único del contenedor HTML donde se renderizará el microfrontend.
|
|
162
|
+
*/
|
|
153
163
|
divContainerId: `container_${prefix}_${moduleId}_${rotational_id}`,
|
|
164
|
+
/**
|
|
165
|
+
* Identificador único del script HTML asociado al microfrontend.
|
|
166
|
+
*/
|
|
154
167
|
scriptId: `script_${moduleId}_${rotational_id}`,
|
|
168
|
+
/**
|
|
169
|
+
* Identificador único del módulo del microfrontend.
|
|
170
|
+
*/
|
|
155
171
|
moduleId
|
|
156
172
|
};
|
|
157
173
|
}
|
|
@@ -222,8 +238,7 @@ function MFLoader(props) {
|
|
|
222
238
|
useEffect(() => {
|
|
223
239
|
if (!isFirstRender) {
|
|
224
240
|
debouncedSetDivScript(moduleId + "");
|
|
225
|
-
if (moduleId !== divScript.moduleId)
|
|
226
|
-
;
|
|
241
|
+
if (moduleId !== divScript.moduleId) ;
|
|
227
242
|
}
|
|
228
243
|
return () => {
|
|
229
244
|
};
|
|
@@ -265,8 +280,14 @@ function MFLoader(props) {
|
|
|
265
280
|
}
|
|
266
281
|
}, [statusLoader]);
|
|
267
282
|
return /* @__PURE__ */ jsxs(MFLoaderRoot, { id: divScript.divContainerId, className: classes.root, children: [
|
|
268
|
-
statusLoader === "progress" ? /* @__PURE__ */ jsx(ProggessLoadingMF, { loadingProgress }) :
|
|
269
|
-
|
|
283
|
+
statusLoader === "progress" ? /* @__PURE__ */ jsx(ProggessLoadingMF, { loadingProgress }) : (
|
|
284
|
+
// <div>{networkProgress}</div>
|
|
285
|
+
null
|
|
286
|
+
),
|
|
287
|
+
statusLoader === "error" ? /* @__PURE__ */ jsx(LoadingError, { status: statusLoader, action: tryAgainOnError }) : (
|
|
288
|
+
// <div>{networkProgress}</div>
|
|
289
|
+
null
|
|
290
|
+
)
|
|
270
291
|
] });
|
|
271
292
|
}
|
|
272
293
|
function getMFLoaderComponentsDictionary() {
|