@m4l/components 0.1.75 → 0.1.77
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 +97 -1
- package/components/AccountPopover/classes/index.d.ts +5 -0
- package/components/AccountPopover/classes/types.d.ts +5 -0
- package/components/AccountPopover/{index.93aefccd.js → index.3a79c395.js} +151 -142
- package/components/AccountPopover/subcomponents/MyAvatar/createAvatar.d.ts +1 -1
- package/components/AccountPopover/subcomponents/PopOver/types.d.ts +0 -4
- package/components/AppBar/classes/index.d.ts +1 -0
- package/components/AppBar/classes/types.d.ts +1 -0
- package/components/AppBar/{index.cc974d56.js → index.71b38ee9.js} +25 -15
- package/components/CommonActions/components/ActionCancel/{index.574ea031.js → index.b748a38e.js} +2 -2
- package/components/CommonActions/components/ActionFormCancel/{index.e62db5d3.js → index.27ad09e1.js} +25 -22
- package/components/CommonActions/components/ActionFormIntro/{index.304da410.js → index.2556f054.js} +2 -2
- package/components/CommonActions/components/ActionIntro/{index.d635cbc4.js → index.a7d92e66.js} +2 -2
- package/components/CommonActions/components/Actions/{index.37ffde59.js → index.3eba9d91.js} +20 -20
- package/components/DataGrid/{index.c0c626cd.js → index.545b492f.js} +50 -30
- package/components/DataGrid/types.d.ts +5 -1
- package/components/DraggableWindow/{index.b95a678e.js → index.c702d3f2.js} +1 -1
- package/components/DynamicFilter/{index.3034c6ba.js → index.d7be0f37.js} +46 -39
- package/components/DynamicFilter/subcomponents/InnerForHooks/index.d.ts +2 -1
- package/components/DynamicFilter/subcomponents/InnerForHooks/types.d.ts +2 -0
- package/components/DynamicFilter/tests/contants.d.ts +1 -1
- package/components/DynamicFilter/types.d.ts +4 -0
- package/components/GridLayout/GridLayout.d.ts +6 -0
- package/components/GridLayout/Responsive/index.a12a8cec.js +335 -0
- package/components/GridLayout/WidthProvider/index.8ff65909.js +67 -0
- package/components/GridLayout/calculateUtils.d.ts +42 -0
- package/components/GridLayout/index.4ba3767a.js +1400 -0
- package/components/GridLayout/index.d.ts +6 -0
- package/components/GridLayout/subcomponents/GridItem/index.d.ts +25 -0
- package/components/GridLayout/subcomponents/GridItem/types.d.ts +76 -0
- package/components/GridLayout/subcomponents/Responsive/index.d.ts +3 -0
- package/components/GridLayout/subcomponents/Responsive/responsiveUtils.d.ts +61 -0
- package/components/GridLayout/subcomponents/Responsive/types.d.ts +71 -0
- package/components/GridLayout/subcomponents/WidthProvider/index.d.ts +16 -0
- package/components/GridLayout/types.d.ts +355 -0
- package/components/GridLayout/utils.d.ts +123 -0
- package/components/HelperText/{index.ec9b3e6a.js → index.ef31df1f.js} +12 -10
- package/components/Icon/{index.f9119f5e.js → index.ecb63e65.js} +1 -1
- package/components/Image/{index.8aae9322.js → index.c18ebf5a.js} +6 -7
- package/components/Image/types.d.ts +1 -4
- package/components/LanguagePopover/{index.491e1306.js → index.0023d069.js} +12 -10
- package/components/LinearProgressIndeterminate/LinearProgressIndeterminate.d.ts +2 -0
- package/components/LinearProgressIndeterminate/classes/constants.d.ts +1 -0
- package/components/LinearProgressIndeterminate/classes/index.d.ts +3 -0
- package/components/LinearProgressIndeterminate/classes/types.d.ts +7 -0
- package/components/LinearProgressIndeterminate/index.60dabc06.js +43 -0
- package/components/LinearProgressIndeterminate/index.d.ts +1 -0
- package/components/LinearProgressIndeterminate/tests/constants.d.ts +1 -0
- package/components/LinearProgressIndeterminate/tests/utils.d.ts +2 -0
- package/components/ModalDialog/{index.f652ea12.js → index.d880e685.js} +21 -60
- package/components/NavLink/{index.f8aee9f4.js → index.cd92eceb.js} +12 -10
- package/components/NoItemSelected/{index.cce86db4.js → index.23dfc897.js} +1 -1
- package/components/ObjectLogs/{index.c31b3f8b.js → index.f174c542.js} +31 -21
- package/components/PaperForm/classes/constants.d.ts +1 -0
- package/components/PaperForm/classes/index.d.ts +11 -0
- package/components/PaperForm/classes/types.d.ts +10 -0
- package/components/PaperForm/{index.d79c6f76.js → index.1bd86ee5.js} +58 -25
- package/components/PaperForm/types.d.ts +5 -2
- package/components/Period/Period.d.ts +3 -0
- package/components/Period/classes/constants.d.ts +1 -0
- package/components/Period/classes/index.d.ts +10 -0
- package/components/Period/classes/types.d.ts +13 -0
- package/components/Period/index.711db043.js +321 -0
- package/components/Period/index.d.ts +2 -3
- package/components/Period/tests/constants.d.ts +1 -0
- package/components/Period/tests/utils.d.ts +2 -0
- package/components/Period/types.d.ts +3 -4
- package/components/PropertyValue/classes/constants.d.ts +1 -0
- package/components/PropertyValue/classes/index.d.ts +9 -0
- package/components/PropertyValue/classes/types.d.ts +9 -0
- package/components/PropertyValue/{index.dfcfe1ba.js → index.8a1adf3e.js} +60 -10
- package/components/PropertyValue/skeleton.d.ts +2 -1
- package/components/PropertyValue/tests/constants.d.ts +1 -0
- package/components/PropertyValue/tests/utils.d.ts +2 -0
- package/components/PropertyValue/types.d.ts +4 -0
- package/components/Resizeable/{index.41a8048b.js → index.9a9c79a4.js} +1 -1
- package/components/SideBar/{index.1ae13a73.js → index.c5ce0bad.js} +6 -6
- package/components/areas/components/AreasAdmin/classes/index.d.ts +1 -1
- package/components/areas/components/AreasAdmin/classes/types.d.ts +6 -0
- package/components/areas/components/AreasAdmin/index.cc4cbf56.js +463 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/subcomponents/ChipActionsMobile/index.d.ts +3 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/subcomponents/ChipActionsMobile/types.d.ts +4 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/types.d.ts +0 -1
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/index.d.ts +2 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/PanelWindowPopUp/index.d.ts +3 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/PanelWindowPopUp/types.d.ts +3 -0
- package/components/areas/components/AreasViewer/classes/index.d.ts +1 -1
- package/components/areas/components/AreasViewer/classes/types.d.ts +15 -0
- package/components/areas/components/AreasViewer/{index.621c0de4.js → index.9c2aaaeb.js} +611 -541
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/{GridLayout → AreaGridLayout}/index.d.ts +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/index.d.ts +2 -2
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/helper.d.ts +13 -2
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/index.d.ts +1 -7
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/subcomponents/WindowPopUpsList/index.d.ts +3 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/subcomponents/WindowPopUpsList/types.d.ts +2 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/types.d.ts +6 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader/helper.d.ts +18 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader/subcomponents/ProggessLoadingMF/index.d.ts +3 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader/subcomponents/ProggessLoadingMF/types.d.ts +4 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/types.d.ts +1 -1
- package/components/areas/components/AreasViewer/subcomponents/AreasLoadingError/index.d.ts +3 -0
- package/components/areas/components/AreasViewer/subcomponents/AreasLoadingError/types.d.ts +5 -0
- package/components/areas/components/index.0f7ac464.js +29 -0
- package/components/areas/contexts/AreasContext/helper.d.ts +6 -16
- package/components/areas/contexts/AreasContext/{index.d98b89fc.js → index.c8147e8e.js} +282 -352
- package/components/areas/contexts/AreasContext/types.d.ts +28 -24
- package/components/areas/contexts/WindowToolsMFContext/types.d.ts +3 -2
- package/components/areas/contexts/{index.79d1912d.js → index.02336412.js} +1 -1
- package/components/areas/{dictionary.e72db809.js → dictionary.afb7e3d9.js} +10 -2
- package/components/areas/dictionary.d.ts +9 -1
- package/components/areas/hooks/useAreas/{index.a7b597fb.js → index.3406a6cb.js} +1 -1
- package/components/areas/{icons.3ec589d3.js → icons.8266ccc8.js} +8 -1
- package/components/areas/icons.d.ts +7 -0
- package/components/areas/index.6f2e5dab.js +31 -0
- package/components/areas/types.d.ts +34 -22
- package/components/formatters/BooleanFormatter/{index.60aa1c9d.js → index.5268b024.js} +1 -1
- package/components/formatters/{index.1f0efb32.js → index.137169d8.js} +2 -2
- package/components/hook-form/RHFAutocomplete/{index.af3296ac.js → index.ac2b1fae.js} +13 -11
- package/components/hook-form/RHFAutocompleteAsync/{index.76864056.js → index.8b4ccc8d.js} +1 -1
- package/components/hook-form/RHFCheckbox/classes/types.d.ts +1 -0
- package/components/hook-form/RHFCheckbox/{index.865ba239.js → index.acef119c.js} +20 -13
- package/components/hook-form/RHFCheckbox/subcomponents/Skeleton/types.d.ts +1 -0
- package/components/hook-form/RHFCheckbox/test/utils.d.ts +1 -1
- package/components/hook-form/RHFCheckbox/types.d.ts +3 -1
- package/components/hook-form/RHFDateTime/{index.fd9c5aca.js → index.5b080342.js} +14 -12
- package/components/hook-form/RHFPeriod/classes/constants.d.ts +1 -0
- package/components/hook-form/RHFPeriod/classes/index.d.ts +6 -0
- package/components/hook-form/RHFPeriod/classes/types.d.ts +6 -0
- package/components/hook-form/RHFPeriod/index.5304e3bd.js +77 -0
- package/components/hook-form/RHFPeriod/types.d.ts +2 -1
- package/components/hook-form/RHFTextField/index.d.ts +1 -0
- package/components/hook-form/RHFTextField/{index.abcbc2d3.js → index.e751dca7.js} +9 -6
- package/components/hook-form/RHFUpload/RHFUploadImage/classes/constants.d.ts +1 -0
- package/components/hook-form/RHFUpload/RHFUploadImage/classes/index.d.ts +19 -0
- package/components/hook-form/RHFUpload/RHFUploadImage/classes/types.d.ts +18 -0
- package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/subcomponents/Skeleton/index.d.ts +2 -1
- package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/subcomponents/Skeleton/types.d.ts +3 -0
- package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/types.d.ts +5 -0
- package/components/hook-form/RHFUpload/RHFUploadImage/tests/constants.d.ts +1 -0
- package/components/hook-form/RHFUpload/RHFUploadImage/tests/utils.d.ts +2 -0
- package/components/hook-form/RHFUpload/index.25db0511.js +261 -0
- package/components/hook-form/RHFUpload/index.d.ts +1 -1
- package/components/index.d.ts +4 -3
- package/components/modal/WindowBase/subcomponents/Header/types.d.ts +4 -1
- package/components/modal/WindowBase/types.d.ts +0 -3
- package/components/modal/WindowBase.850ea31a.js +82 -0
- package/components/modal/WindowConfirm/subcomponents/MessageIlustration/types.d.ts +3 -5
- package/components/modal/WindowConfirm/types.d.ts +3 -2
- package/components/modal/WindowConfirm.cb37bc58.js +122 -0
- package/components/modal/classes/constants.d.ts +1 -0
- package/components/modal/classes/index.d.ts +19 -0
- package/components/modal/classes/types.d.ts +22 -0
- package/components/modal/index.a0978193.js +84 -0
- package/components/modal/index.d.ts +2 -1
- package/components/mui_extended/Accordion/classes/constants.d.ts +1 -0
- package/components/mui_extended/Accordion/classes/index.d.ts +10 -0
- package/components/mui_extended/Accordion/classes/types.d.ts +10 -0
- package/components/mui_extended/Accordion/index.12b1339a.js +127 -0
- package/components/mui_extended/Accordion/tests/constants.d.ts +1 -0
- package/components/mui_extended/Accordion/tests/utils.d.ts +2 -0
- package/components/mui_extended/Accordion/types.d.ts +2 -1
- package/components/mui_extended/Avatar/{index.1e1a91a3.js → index.75e6ed57.js} +3 -1
- package/components/mui_extended/Badge/Badge.d.ts +3 -0
- package/components/mui_extended/Badge/classes/constants.d.ts +1 -0
- package/components/mui_extended/Badge/classes/index.d.ts +6 -0
- package/components/mui_extended/Badge/classes/types.d.ts +6 -0
- package/components/mui_extended/Badge/index.8c2b8b66.js +36 -0
- package/components/mui_extended/Badge/index.d.ts +2 -0
- package/components/mui_extended/Badge/tests/constants.d.ts +1 -0
- package/components/mui_extended/Badge/tests/utils.d.ts +2 -0
- package/components/mui_extended/Badge/types.d.ts +4 -0
- package/components/mui_extended/Button/{index.aebbab34.js → index.4288f9fc.js} +10 -5
- package/components/mui_extended/IconButton/{index.3b05af71.js → index.fc5b7c2d.js} +1 -1
- package/components/mui_extended/LoadingButton/tests/constants.d.ts +1 -1
- package/components/mui_extended/MenuActions/{index.ca5ce35a.js → index.f5b1c022.js} +30 -11
- package/components/mui_extended/MenuActions/types.d.ts +10 -2
- package/components/mui_extended/Pager/{index.80ec975a.js → index.435af0df.js} +1 -1
- package/components/mui_extended/Tab/classes/constants.d.ts +1 -0
- package/components/mui_extended/Tab/classes/index.d.ts +7 -0
- package/components/mui_extended/Tab/classes/types.d.ts +7 -0
- package/components/mui_extended/Tab/index.9e2f6e34.js +71 -0
- package/components/mui_extended/Tab/tests/constants.d.ts +1 -0
- package/components/mui_extended/Tab/tests/utils.d.ts +2 -0
- package/components/mui_extended/Tooltip/Tooltip.d.ts +3 -0
- package/components/mui_extended/Tooltip/classes/constants.d.ts +1 -0
- package/components/mui_extended/Tooltip/classes/index.d.ts +6 -0
- package/components/mui_extended/Tooltip/classes/types.d.ts +6 -0
- package/components/mui_extended/Tooltip/index.5a795dcd.js +43 -0
- package/components/mui_extended/Tooltip/index.d.ts +2 -0
- package/components/mui_extended/Tooltip/types.d.ts +6 -0
- package/components/mui_extended/index.83979b6a.js +22 -0
- package/components/mui_extended/index.d.ts +3 -1
- package/contexts/ModalContext/{index.a0de81f0.js → index.dee85a61.js} +1 -1
- package/contexts/ModalContext/types.d.ts +2 -0
- package/contexts/RHFormContext/classes/constants.d.ts +1 -0
- package/contexts/RHFormContext/classes/index.d.ts +9 -0
- package/contexts/RHFormContext/classes/types.d.ts +6 -0
- package/contexts/RHFormContext/{index.a7511399.js → index.fe175bab.js} +33 -9
- package/hooks/useModal/{index.26075cdd.js → index.de522a10.js} +1 -1
- package/index.js +138 -119
- package/node_modules.d73a220d.js +363 -0
- package/package.json +4 -3
- package/{react-draggable.e625b0d1.js → react-draggable.7abb5d0a.js} +3 -2
- package/{react-resizable.24367d77.js → react-resizable.ba08699a.js} +13 -12
- package/utils/{index.b61dccbe.js → index.c43a95f4.js} +0 -27
- package/utils/types.d.ts +1 -1
- package/components/AccountPopover/style.d.ts +0 -2
- package/components/AppBar/styles.d.ts +0 -2
- package/components/CommonActions/components/Actions/styles.d.ts +0 -2
- package/components/DataGrid/styles.d.ts +0 -3
- package/components/DataGrid/subcomponents/Actions/styles.d.ts +0 -2
- package/components/DataGrid/subcomponents/Actions/subcomponents/Density/styles.d.ts +0 -3
- package/components/DataGrid/subcomponents/Actions/subcomponents/Filter/styles.d.ts +0 -2
- package/components/DataGrid/subcomponents/Actions/subcomponents/RowsCount/styles.d.ts +0 -4
- package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/styles.d.ts +0 -2
- package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/styles.d.ts +0 -8
- package/components/DataGrid/subcomponents/Table/styles.d.ts +0 -3
- package/components/DataGrid/subcomponents/Table/subcomponents/SkeletonFormatter/styles.d.ts +0 -2
- package/components/DataGrid/subcomponents/editors/TextEditor/index.d.ts +0 -6
- package/components/DynamicFilter/subcomponents/ApplyedFilters/styles.d.ts +0 -3
- package/components/DynamicFilter/subcomponents/ApplyedFilters/subcomponents/ApplyedFilter/styles.d.ts +0 -6
- package/components/DynamicFilter/subcomponents/ClearFilters/styles.d.ts +0 -3
- package/components/DynamicFilter/subcomponents/FilterButton/styles.d.ts +0 -3
- package/components/DynamicFilter/subcomponents/InnerForHooks/styles.d.ts +0 -3
- package/components/DynamicFilter/subcomponents/PopoverFilter/styles.d.ts +0 -2
- package/components/HelperText/styles.d.ts +0 -2
- package/components/Icon/styles.d.ts +0 -4
- package/components/Image/styles.d.ts +0 -3
- package/components/Image/subcomponents/LazyLoadComponent/styles.d.ts +0 -2
- package/components/Image/subcomponents/Skeleton/styles.d.ts +0 -2
- package/components/LanguagePopover/styles.d.ts +0 -6
- package/components/NavLink/styles.d.ts +0 -2
- package/components/NoItemSelected/styles.d.ts +0 -5
- package/components/ObjectLogs/components/DetailDialog/styles.d.ts +0 -3
- package/components/ObjectLogs/styles.d.ts +0 -4
- package/components/PaperForm/styles.d.ts +0 -7
- package/components/Period/index.ff110093.js +0 -280
- package/components/Period/styles.d.ts +0 -7
- package/components/PropertyValue/styles.d.ts +0 -6
- package/components/ResizeableWindow/styles.d.ts +0 -5
- package/components/ScrollBar/styles.d.ts +0 -8
- package/components/SideBar/styles.d.ts +0 -5
- package/components/SideBar/subcomponents/ContentDesktop/style.d.ts +0 -2
- package/components/SideBar/subcomponents/ContentDesktop/subcomponents/CollapseButton/styles.d.ts +0 -3
- package/components/SideBar/subcomponents/ContentGroups/styles.d.ts +0 -5
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/styles.d.ts +0 -2
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/ArrowIcon/styles.d.ts +0 -2
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavItemRoot/styles.d.ts +0 -9
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavItemRoot/subcomponents/NavItemRootContent/styles.d.ts +0 -3
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/styles.d.ts +0 -2
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/subcomponents/NavItemSub/subcomponents/NavItemSubContent/styles.d.ts +0 -22
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/Skeleton/styles.d.ts +0 -6
- package/components/SideBar/subcomponents/ContentMobile/styles.d.ts +0 -3
- package/components/SplitLayout/styles.d.ts +0 -4
- package/components/animate/LoadingScreen/styles.d.ts +0 -3
- package/components/animate/PropagateLoader/syles.d.ts +0 -2
- package/components/areas/components/AreasAdmin/index.158621e0.js +0 -289
- package/components/areas/components/AreasAdmin/styles.d.ts +0 -2
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/styles.d.ts +0 -4
- package/components/areas/components/AreasViewer/styles.d.ts +0 -2
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/styles.d.ts +0 -2
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/styles.d.ts +0 -9
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader/subcomponents/LoadingMF/index.d.ts +0 -3
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader/subcomponents/LoadingMF/styles.d.ts +0 -2
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader/subcomponents/LoadingMF/subcomponents/NotFound/index.d.ts +0 -3
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader/subcomponents/LoadingMF/subcomponents/NotFound/styles.d.ts +0 -2
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader/subcomponents/LoadingMF/subcomponents/NotFound/types.d.ts +0 -2
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader/subcomponents/LoadingMF/types.d.ts +0 -6
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/WindowModal/styles.d.ts +0 -3
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/WindowPopUp/index.d.ts +0 -4
- package/components/areas/components/index.2ed9d60b.js +0 -14
- package/components/areas/index.d6b8e205.js +0 -16
- package/components/hook-form/RHFAutocomplete/styles.d.ts +0 -2
- package/components/hook-form/RHFAutocomplete/subcomponents/RenderOption/styles.d.ts +0 -2
- package/components/hook-form/RHFAutocomplete/subcomponents/Skeleton/styles.d.ts +0 -4
- package/components/hook-form/RHFAutocompleteAsync/styles.d.ts +0 -5
- package/components/hook-form/RHFCheckbox/styles.d.ts +0 -15
- package/components/hook-form/RHFCheckbox/subcomponents/Skeleton/styles.d.ts +0 -3
- package/components/hook-form/RHFDateTime/styles.d.ts +0 -2
- package/components/hook-form/RHFDateTime/subcomponents/Skeleton/styles.d.ts +0 -2
- package/components/hook-form/RHFPeriod/index.77486f61.js +0 -55
- package/components/hook-form/RHFPeriod/styles.d.ts +0 -2
- package/components/hook-form/RHFTextField/styles.d.ts +0 -3
- package/components/hook-form/RHFTextField/subcomponents/Skeleton/styles.d.ts +0 -3
- package/components/hook-form/RHFTextFieldPassword/styles.d.ts +0 -2
- package/components/hook-form/RHFUpload/RHFUploadImage/styles.d.ts +0 -2
- package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/styles.d.ts +0 -12
- package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/subcomponents/Skeleton/styles.d.ts +0 -2
- package/components/hook-form/RHFUpload/index.522bcad5.js +0 -283
- package/components/modal/ModalDialog/styles.d.ts +0 -9
- package/components/modal/ModalDialog/types.d.ts +0 -7
- package/components/modal/WindowBase/styles.d.ts +0 -2
- package/components/modal/WindowBase/subcomponents/Header/styles.d.ts +0 -6
- package/components/modal/WindowBase.c223e4da.js +0 -126
- package/components/modal/WindowConfirm/subcomponents/MessageIlustration/styles.d.ts +0 -6
- package/components/modal/WindowConfirm.023e293f.js +0 -132
- package/components/modal/index.dbce0cab.js +0 -36
- package/components/mui_extended/Accordion/components/AccordionLabel.d.ts +0 -3
- package/components/mui_extended/Accordion/index.03bd0e2a.js +0 -107
- package/components/mui_extended/Accordion/styles.d.ts +0 -4
- package/components/mui_extended/Avatar/styles.d.ts +0 -2
- package/components/mui_extended/Button/styles.d.ts +0 -13
- package/components/mui_extended/IconButton/styles.d.ts +0 -2
- package/components/mui_extended/ImageButton/styles.d.ts +0 -2
- package/components/mui_extended/LoadingButton/styles.d.ts +0 -2
- package/components/mui_extended/MenuActions/styles.d.ts +0 -30
- package/components/mui_extended/Pager/components/PagerActions/styles.d.ts +0 -2
- package/components/mui_extended/Pager/styles.d.ts +0 -6
- package/components/mui_extended/Popover/styles.d.ts +0 -1
- package/components/mui_extended/Popover/subcomponts/ArrowIcon/index.d.ts +0 -3
- package/components/mui_extended/Tab/index.e0653a0a.js +0 -32
- package/components/mui_extended/Tab/styles.d.ts +0 -2
- package/components/mui_extended/Typography/styles.d.ts +0 -2
- package/components/mui_extended/index.6dcdbb1f.js +0 -20
- package/contexts/RHFormContext/styles.d.ts +0 -2
- /package/components/PaperForm/{index.d.ts → PaperForm.d.ts} +0 -0
- /package/components/PropertyValue/{index.d.ts → PropertyValue.d.ts} +0 -0
- /package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/{GridLayout → AreaGridLayout}/types.d.ts +0 -0
- /package/components/hook-form/RHFUpload/RHFUploadImage/{index.d.ts → RHFUploadImage.d.ts} +0 -0
- /package/components/mui_extended/Accordion/{index.d.ts → Accordion.d.ts} +0 -0
|
@@ -5,22 +5,23 @@ import { useResponsiveDesktop, useFirstRender } from "@m4l/graphics";
|
|
|
5
5
|
import { useHostTools, useModuleDictionary, useNetwork, useModuleSkeleton, EmitEvents } from "@m4l/core";
|
|
6
6
|
import { devtools } from "zustand/middleware";
|
|
7
7
|
import { immer } from "zustand/middleware/immer";
|
|
8
|
-
import { u as useAreasViewerUtilityClasses
|
|
9
|
-
import { u as useAreasAdminUtilityClasses } from "../../components/AreasAdmin/index.
|
|
8
|
+
import { u as useAreasViewerUtilityClasses } from "../../components/AreasViewer/index.9c2aaaeb.js";
|
|
9
|
+
import { u as useAreasAdminUtilityClasses } from "../../components/AreasAdmin/index.cc4cbf56.js";
|
|
10
10
|
import { c as createDynamicMFStore } from "../DynamicMFParmsContext/index.1607c78e.js";
|
|
11
|
-
import { g as getAreasDictionary } from "../../dictionary.
|
|
12
|
-
import
|
|
11
|
+
import { g as getAreasDictionary, D as DICCTIONARY } from "../../dictionary.afb7e3d9.js";
|
|
12
|
+
import "clsx";
|
|
13
|
+
import "../../../GridLayout/index.4ba3767a.js";
|
|
13
14
|
import { jsx } from "react/jsx-runtime";
|
|
15
|
+
import { a as addLayoutItemToBreakPointIfNoExists, b as addLayoutItemToBreakPoints } from "../../../GridLayout/Responsive/index.a12a8cec.js";
|
|
16
|
+
import { debounce, cloneDeep } from "lodash";
|
|
14
17
|
const ROW_HEIGTH_GRIDLAYOUT = 20;
|
|
15
|
-
const
|
|
18
|
+
const PADDING_GRIDLAYOUT = 3;
|
|
16
19
|
const MARGIN_GRIDLAYOUT = 5;
|
|
17
20
|
const DEBOUCED_SAVE_TIME = 500;
|
|
18
|
-
const THROTTLE_RESIZE_TIME = 300;
|
|
19
21
|
const COOKIE_BREAKPOINT_LAYOUTS = "layoutPros";
|
|
20
22
|
const COOKIE_WINDOWS = "windows";
|
|
21
|
-
const BREAKPOINT_SIZES = { lg: 1200, md: 996, sm: 768, xs: 480, xxs:
|
|
22
|
-
const NORMALIZED_COLS = { lg:
|
|
23
|
-
const MAXIMIZED_COLS = { lg: 24, md: 20, sm: 12, xs: 8, xxs: 1 };
|
|
23
|
+
const BREAKPOINT_SIZES = { lg: 1200, md: 996, sm: 768, xs: 480, xxs: 1 };
|
|
24
|
+
const NORMALIZED_COLS = { lg: 64, md: 48, sm: 32, xs: 24, xxs: 1 };
|
|
24
25
|
const DEFAULT_WINDOW = {
|
|
25
26
|
status: "init",
|
|
26
27
|
moduleActions: [],
|
|
@@ -33,12 +34,9 @@ const DEFAULT_WINDOW = {
|
|
|
33
34
|
const DEFAULT_AREA = {
|
|
34
35
|
status: "init",
|
|
35
36
|
zPopUpIndex: 0,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
windowsPopUps: [],
|
|
40
|
-
hashWindowsPopups: {},
|
|
41
|
-
hashWindowsLayouts: {},
|
|
37
|
+
layouts: {},
|
|
38
|
+
colapsedItems: {},
|
|
39
|
+
hashLayoutItems: [],
|
|
42
40
|
currentLayoutId: "",
|
|
43
41
|
currentPopUpId: "",
|
|
44
42
|
breakpoints: BREAKPOINT_SIZES,
|
|
@@ -46,15 +44,14 @@ const DEFAULT_AREA = {
|
|
|
46
44
|
};
|
|
47
45
|
const addArea = (state) => {
|
|
48
46
|
const areaId = `area_${new Date().getTime()}_${(Math.random() * 1e3).toFixed(0)}`;
|
|
49
|
-
const labelNewArea = state.getLabel(getAreasDictionary(
|
|
47
|
+
const labelNewArea = state.getLabel(getAreasDictionary(DICCTIONARY.label_new_area));
|
|
50
48
|
let isFree;
|
|
51
49
|
let name = `${labelNewArea} 1`;
|
|
52
50
|
for (let indexNames = 1; indexNames <= state.areas.length + 1; indexNames++) {
|
|
53
51
|
name = `${labelNewArea} ${indexNames + state.areas.length}`;
|
|
54
52
|
isFree = true;
|
|
55
53
|
for (let index = 0; index < state.areas.length; index++) {
|
|
56
|
-
|
|
57
|
-
if (area.name === name) {
|
|
54
|
+
if (state.hashAreas[state.areas[index]].name === name) {
|
|
58
55
|
isFree = false;
|
|
59
56
|
break;
|
|
60
57
|
}
|
|
@@ -67,10 +64,9 @@ const addArea = (state) => {
|
|
|
67
64
|
id: areaId,
|
|
68
65
|
name,
|
|
69
66
|
loadWindows: false,
|
|
70
|
-
viewMode: state.ownerState.isMobile ? "single" : "multiple",
|
|
71
67
|
...DEFAULT_AREA
|
|
72
68
|
};
|
|
73
|
-
state.areas.push(
|
|
69
|
+
state.areas.push(areaId);
|
|
74
70
|
state.hashAreas[areaId] = newArea;
|
|
75
71
|
if (state.loadAreasFromNetwork) {
|
|
76
72
|
state.networkOperation({
|
|
@@ -100,23 +96,8 @@ const getParmsFromValue = (key, data) => {
|
|
|
100
96
|
}
|
|
101
97
|
return void 0;
|
|
102
98
|
};
|
|
103
|
-
function setAddBreakPoints(state, newLayout) {
|
|
104
|
-
const layoutsBreakPoints = state.breakPointsLayouts;
|
|
105
|
-
const beforeMaximizebreakpointsLayouts = state.beforeMaximizebreakpointsLayouts;
|
|
106
|
-
for (const key in layoutsBreakPoints) {
|
|
107
|
-
const layoutBreakpoint = layoutsBreakPoints[key];
|
|
108
|
-
layoutBreakpoint.unshift(newLayout);
|
|
109
|
-
}
|
|
110
|
-
if (state.viewMode === "single") {
|
|
111
|
-
for (const key in beforeMaximizebreakpointsLayouts) {
|
|
112
|
-
const beforeLayoutBreakpoint = beforeMaximizebreakpointsLayouts[key];
|
|
113
|
-
beforeLayoutBreakpoint.push(newLayout);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
return layoutsBreakPoints;
|
|
117
|
-
}
|
|
118
99
|
function deleteLayoutFromBreakPoints(state, layoutId) {
|
|
119
|
-
const layoutsBreakPoints = state.
|
|
100
|
+
const layoutsBreakPoints = state.layouts;
|
|
120
101
|
for (const key in layoutsBreakPoints) {
|
|
121
102
|
const layoutBreakpoint = layoutsBreakPoints[key];
|
|
122
103
|
for (let index = 0; index < layoutBreakpoint.length; index++) {
|
|
@@ -128,61 +109,32 @@ function deleteLayoutFromBreakPoints(state, layoutId) {
|
|
|
128
109
|
}
|
|
129
110
|
}
|
|
130
111
|
}
|
|
131
|
-
function setBreakPointsMaximized(state, layoutId) {
|
|
132
|
-
const layoutsBreakPoints = state.breakPointsLayouts;
|
|
133
|
-
const container = document.getElementsByClassName(
|
|
134
|
-
`${areasViewerClasses.areaGridLayout}-${state.id}`
|
|
135
|
-
)[0];
|
|
136
|
-
console.log("setBreakPointsMaximized", container);
|
|
137
|
-
if (container) {
|
|
138
|
-
const clientHeight = container.clientHeight;
|
|
139
|
-
for (const key in layoutsBreakPoints) {
|
|
140
|
-
const layoutBreakpoint = layoutsBreakPoints[key];
|
|
141
|
-
const cols = key in MAXIMIZED_COLS ? MAXIMIZED_COLS[key] : 1;
|
|
142
|
-
const heigthUnits = (clientHeight + MARGIN_GRIDLAYOUT - 2 * CONTAINER_PADDING_GRIDLAYOUT) / (ROW_HEIGTH_GRIDLAYOUT + MARGIN_GRIDLAYOUT);
|
|
143
|
-
for (let index = 0; index < layoutBreakpoint.length; index++) {
|
|
144
|
-
const l = layoutBreakpoint[index];
|
|
145
|
-
if (l.i === layoutId) {
|
|
146
|
-
l.x = 0;
|
|
147
|
-
l.y = 0;
|
|
148
|
-
l.h = heigthUnits;
|
|
149
|
-
l.w = cols;
|
|
150
|
-
l.minW = 0;
|
|
151
|
-
l.maxW = cols;
|
|
152
|
-
l.minH = 0;
|
|
153
|
-
l.maxH = heigthUnits;
|
|
154
|
-
l.isResizable = false;
|
|
155
|
-
l.isDraggable = false;
|
|
156
|
-
} else {
|
|
157
|
-
l.x = 0;
|
|
158
|
-
l.y = 1;
|
|
159
|
-
l.h = 0;
|
|
160
|
-
l.w = 0;
|
|
161
|
-
l.minW = 0;
|
|
162
|
-
l.maxW = 0;
|
|
163
|
-
l.minH = 0;
|
|
164
|
-
l.maxH = 0;
|
|
165
|
-
}
|
|
166
|
-
l.isResizable = false;
|
|
167
|
-
l.isDraggable = false;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
return layoutsBreakPoints;
|
|
172
|
-
}
|
|
173
112
|
function getDataFromResponse(data, state, areaId) {
|
|
174
|
-
|
|
113
|
+
let newBreakPointsLayouts = getParmsFromValue(COOKIE_BREAKPOINT_LAYOUTS, data);
|
|
175
114
|
const windows = getParmsFromValue(COOKIE_WINDOWS, data);
|
|
176
|
-
const
|
|
177
|
-
const
|
|
115
|
+
const newWindowsLayoutsIds = [];
|
|
116
|
+
const newHashLayoutItems = [];
|
|
117
|
+
if (!newBreakPointsLayouts) {
|
|
118
|
+
newBreakPointsLayouts = {};
|
|
119
|
+
}
|
|
120
|
+
console.log(
|
|
121
|
+
"getDataFromResponse before start",
|
|
122
|
+
windows,
|
|
123
|
+
newBreakPointsLayouts,
|
|
124
|
+
BREAKPOINT_SIZES
|
|
125
|
+
);
|
|
126
|
+
for (const breakPoint in BREAKPOINT_SIZES) {
|
|
127
|
+
if (!newBreakPointsLayouts[breakPoint]) {
|
|
128
|
+
newBreakPointsLayouts[breakPoint] = [];
|
|
129
|
+
}
|
|
130
|
+
}
|
|
178
131
|
if (windows) {
|
|
179
132
|
for (const key in windows) {
|
|
180
133
|
const element = windows[key];
|
|
181
|
-
if (element && element["
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
newHashWindowLayouts[key] = {
|
|
134
|
+
if (element && element["mfProps"] && element["emergeType"] === "layout" && element["winType"] === "microfrontend") {
|
|
135
|
+
newWindowsLayoutsIds.push(key);
|
|
136
|
+
const onClose = state.areaActions.closeLayout;
|
|
137
|
+
state.hashWindows[key] = {
|
|
186
138
|
...DEFAULT_WINDOW,
|
|
187
139
|
...element,
|
|
188
140
|
windowId: key,
|
|
@@ -194,14 +146,42 @@ function getDataFromResponse(data, state, areaId) {
|
|
|
194
146
|
}),
|
|
195
147
|
onClose: () => onClose(areaId, key)
|
|
196
148
|
};
|
|
197
|
-
|
|
149
|
+
newHashLayoutItems.push(key);
|
|
150
|
+
for (const breakPoint in BREAKPOINT_SIZES) {
|
|
151
|
+
addLayoutItemToBreakPointIfNoExists(
|
|
152
|
+
newBreakPointsLayouts,
|
|
153
|
+
breakPoint,
|
|
154
|
+
{ i: element.windowId, x: 0, y: 0, w: 5, h: 5 },
|
|
155
|
+
NORMALIZED_COLS,
|
|
156
|
+
[MARGIN_GRIDLAYOUT, MARGIN_GRIDLAYOUT],
|
|
157
|
+
[PADDING_GRIDLAYOUT, PADDING_GRIDLAYOUT],
|
|
158
|
+
ROW_HEIGTH_GRIDLAYOUT
|
|
159
|
+
);
|
|
160
|
+
console.log(
|
|
161
|
+
"addLayoutItemToBreakPointIfNoExists",
|
|
162
|
+
element,
|
|
163
|
+
breakPoint,
|
|
164
|
+
key,
|
|
165
|
+
newBreakPointsLayouts[breakPoint]
|
|
166
|
+
);
|
|
167
|
+
}
|
|
198
168
|
}
|
|
199
169
|
}
|
|
170
|
+
for (const breakPoint in BREAKPOINT_SIZES) {
|
|
171
|
+
newBreakPointsLayouts[breakPoint] = newBreakPointsLayouts[breakPoint].filter((li) => {
|
|
172
|
+
return newWindowsLayoutsIds.indexOf(li.i) > -1;
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
} else {
|
|
176
|
+
for (const breakPoint in BREAKPOINT_SIZES) {
|
|
177
|
+
newBreakPointsLayouts[breakPoint] = [];
|
|
178
|
+
}
|
|
200
179
|
}
|
|
180
|
+
console.log("newBreakPointsLayouts", newBreakPointsLayouts, windows);
|
|
201
181
|
return {
|
|
202
182
|
newBreakPointsLayouts,
|
|
203
|
-
|
|
204
|
-
|
|
183
|
+
newWindowsLayoutsIds,
|
|
184
|
+
newHashLayoutItems
|
|
205
185
|
};
|
|
206
186
|
}
|
|
207
187
|
function getCookiesContainer(data, containerId) {
|
|
@@ -278,11 +258,10 @@ const createAreasStore = (initProps) => {
|
|
|
278
258
|
const newArea = {
|
|
279
259
|
...DEFAULT_AREA,
|
|
280
260
|
...response.data[i],
|
|
281
|
-
loadWindows: true
|
|
282
|
-
viewMode: otherState.ownerState.isMobile ? "single" : "multiple"
|
|
261
|
+
loadWindows: true
|
|
283
262
|
};
|
|
284
|
-
otherState.areas.push(newArea);
|
|
285
263
|
otherState.hashAreas[newArea.id] = newArea;
|
|
264
|
+
otherState.areas.push(newArea.id);
|
|
286
265
|
}
|
|
287
266
|
} else {
|
|
288
267
|
addArea(otherState);
|
|
@@ -294,7 +273,7 @@ const createAreasStore = (initProps) => {
|
|
|
294
273
|
updateOwnerStateClasses(state2);
|
|
295
274
|
});
|
|
296
275
|
if (get().areas.length > 0) {
|
|
297
|
-
get().areasActions.selectArea(get().areas[0]
|
|
276
|
+
get().areasActions.selectArea(get().areas[0]);
|
|
298
277
|
}
|
|
299
278
|
});
|
|
300
279
|
});
|
|
@@ -303,9 +282,8 @@ const createAreasStore = (initProps) => {
|
|
|
303
282
|
},
|
|
304
283
|
editArea: (idArea, newName) => {
|
|
305
284
|
set((state) => {
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
state.areas[index].name = newName;
|
|
285
|
+
if (state.hashAreas[idArea]) {
|
|
286
|
+
state.hashAreas[idArea].name = newName;
|
|
309
287
|
state.networkOperation({
|
|
310
288
|
method: "PATCH",
|
|
311
289
|
endPoint: `areas/${idArea}`,
|
|
@@ -327,7 +305,7 @@ const createAreasStore = (initProps) => {
|
|
|
327
305
|
deleteArea: (areaId) => {
|
|
328
306
|
let selectNewAreaId = "";
|
|
329
307
|
set((state) => {
|
|
330
|
-
const removeIndex = state.areas.
|
|
308
|
+
const removeIndex = state.areas.indexOf(areaId);
|
|
331
309
|
if (removeIndex > -1) {
|
|
332
310
|
for (const key in state.hashWindows) {
|
|
333
311
|
if (state.hashWindows[key].areaId === areaId) {
|
|
@@ -339,7 +317,7 @@ const createAreasStore = (initProps) => {
|
|
|
339
317
|
}
|
|
340
318
|
if (state.currentAreaId === areaId) {
|
|
341
319
|
if (state.areas.length > 0) {
|
|
342
|
-
selectNewAreaId = state.areas[0]
|
|
320
|
+
selectNewAreaId = state.areas[0];
|
|
343
321
|
} else {
|
|
344
322
|
state.currentAreaId = "";
|
|
345
323
|
}
|
|
@@ -376,9 +354,8 @@ const createAreasStore = (initProps) => {
|
|
|
376
354
|
});
|
|
377
355
|
}
|
|
378
356
|
}
|
|
379
|
-
if (get().hashAreas[areaId].
|
|
380
|
-
|
|
381
|
-
}
|
|
357
|
+
if (get().hashAreas[areaId].maximizedId !== void 0)
|
|
358
|
+
;
|
|
382
359
|
},
|
|
383
360
|
setHandlerGetLabel: (newHandler) => {
|
|
384
361
|
set((state) => {
|
|
@@ -395,14 +372,8 @@ const createAreasStore = (initProps) => {
|
|
|
395
372
|
areaActions: {
|
|
396
373
|
addWindow: (newWindowProps) => {
|
|
397
374
|
const windowId = `${get().currentAreaId}_window_${new Date().getTime()}_${(Math.random() * 1e3).toFixed(0)}`;
|
|
398
|
-
if (newWindowProps.emergeType === "layout") {
|
|
399
|
-
get().areaActions.
|
|
400
|
-
get().currentAreaId,
|
|
401
|
-
windowId,
|
|
402
|
-
newWindowProps
|
|
403
|
-
);
|
|
404
|
-
} else if (newWindowProps.emergeType === "popup") {
|
|
405
|
-
get().areaActions.addWindowPopUp(
|
|
375
|
+
if (newWindowProps.emergeType === "layout" || newWindowProps.emergeType === "popup") {
|
|
376
|
+
get().areaActions.addLayout(
|
|
406
377
|
get().currentAreaId,
|
|
407
378
|
windowId,
|
|
408
379
|
newWindowProps
|
|
@@ -415,178 +386,93 @@ const createAreasStore = (initProps) => {
|
|
|
415
386
|
);
|
|
416
387
|
}
|
|
417
388
|
},
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
});
|
|
429
|
-
},
|
|
430
|
-
addWindowModal: (areaId, windowId, newWindowModalProps) => {
|
|
431
|
-
set((state) => {
|
|
432
|
-
const dynamicMFStore = createDynamicMFStore({
|
|
433
|
-
dynamicMFParameters: newWindowModalProps.dynamicParams,
|
|
434
|
-
windowId
|
|
435
|
-
});
|
|
436
|
-
state.windowsModals.push(windowId);
|
|
437
|
-
state.hashWindowsModals[windowId] = {
|
|
438
|
-
...newWindowModalProps,
|
|
439
|
-
areaId,
|
|
440
|
-
windowId,
|
|
441
|
-
...DEFAULT_WINDOW,
|
|
442
|
-
onClose: get().areaActions.closeWindowModal,
|
|
443
|
-
dynamicMFStore
|
|
444
|
-
};
|
|
445
|
-
state.hashWindows[windowId] = state.hashWindowsModals[windowId];
|
|
446
|
-
});
|
|
447
|
-
},
|
|
448
|
-
closeWindowPopUp: (areaId, removePopUpId) => {
|
|
449
|
-
set((state) => {
|
|
450
|
-
const area = state.hashAreas[areaId];
|
|
451
|
-
if (!area) {
|
|
452
|
-
return;
|
|
453
|
-
}
|
|
454
|
-
const removeIndex = area.windowsPopUps.findIndex(
|
|
455
|
-
(wpId) => wpId === removePopUpId
|
|
456
|
-
);
|
|
457
|
-
if (removeIndex > -1) {
|
|
458
|
-
area.windowsPopUps.splice(removeIndex, 1);
|
|
459
|
-
}
|
|
460
|
-
delete area.hashWindowsPopups[removePopUpId];
|
|
461
|
-
delete state.hashWindows[removePopUpId];
|
|
462
|
-
});
|
|
463
|
-
},
|
|
464
|
-
selectWindowPopUp: (areaId, popUpId) => {
|
|
465
|
-
set((state) => {
|
|
466
|
-
state.hashAreas[areaId].zPopUpIndex++;
|
|
467
|
-
state.hashAreas[areaId].currentPopUpId = popUpId;
|
|
468
|
-
state.hashAreas[areaId].zPopUpIndex++;
|
|
469
|
-
state.hashAreas[areaId].currentPopUpId = popUpId;
|
|
470
|
-
state.hashAreas[areaId].hashWindowsPopups[popUpId].zIndex = state.hashAreas[areaId].zPopUpIndex;
|
|
471
|
-
if (state.hashAreas[areaId].hashWindowsPopups[popUpId].parentLayoutId && state.hashAreas[areaId].hashWindowsPopups[popUpId].parentLayoutId !== "") {
|
|
472
|
-
state.hashAreas[areaId].currentLayoutId = state.hashAreas[areaId].hashWindowsPopups[popUpId].parentLayoutId;
|
|
473
|
-
} else {
|
|
474
|
-
state.hashAreas[areaId].currentLayoutId = "";
|
|
475
|
-
}
|
|
476
|
-
});
|
|
477
|
-
setTimeout(() => {
|
|
478
|
-
const container = document.getElementsByClassName(
|
|
479
|
-
`${areasViewerClasses.areaGridLayoutPanelContainer}-${areaId}`
|
|
480
|
-
)[0];
|
|
481
|
-
const element = document.getElementsByClassName(
|
|
482
|
-
`${areasViewerClasses.windowPopupRoot}-${popUpId}`
|
|
483
|
-
)[0];
|
|
484
|
-
if (element && container) {
|
|
485
|
-
const { top, left } = element.getBoundingClientRect();
|
|
486
|
-
const { top: containerTop, left: containerLeft } = container.getBoundingClientRect();
|
|
487
|
-
container.scrollTop = container.scrollTop + top - containerTop;
|
|
488
|
-
container.scrollLeft = container.scrollLeft + left - containerLeft;
|
|
489
|
-
}
|
|
490
|
-
}, 100);
|
|
491
|
-
},
|
|
492
|
-
addWindowPopUp: (areaId, windowId, newWindowPopupProps) => {
|
|
493
|
-
let popUpId = windowId;
|
|
389
|
+
addLayout: (areaId, windowId, newWindowProps) => {
|
|
390
|
+
let previousId = windowId;
|
|
391
|
+
const freeMove = newWindowProps.emergeType === "popup" ? true : false;
|
|
392
|
+
const newLayoutItem = {
|
|
393
|
+
...newWindowProps.layoutProps,
|
|
394
|
+
i: windowId,
|
|
395
|
+
isDraggable: true,
|
|
396
|
+
isResizable: true,
|
|
397
|
+
freeMove
|
|
398
|
+
};
|
|
494
399
|
set((state) => {
|
|
495
400
|
const area = state.hashAreas[areaId];
|
|
496
401
|
if (!area) {
|
|
497
402
|
return;
|
|
498
403
|
}
|
|
499
|
-
if (
|
|
500
|
-
for (
|
|
501
|
-
const
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
404
|
+
if (newWindowProps.replaceMeId) {
|
|
405
|
+
for (let index = 0; index < area.hashLayoutItems.length; index++) {
|
|
406
|
+
const key = area.hashLayoutItems[index];
|
|
407
|
+
const WindoPopUp = state.hashWindows[key];
|
|
408
|
+
if (WindoPopUp.replaceMeId === newWindowProps.replaceMeId) {
|
|
409
|
+
previousId = key;
|
|
410
|
+
WindoPopUp.dynamicMFStore.getState().actions.changeData(newWindowProps.dynamicParams);
|
|
505
411
|
break;
|
|
506
412
|
}
|
|
507
413
|
}
|
|
508
414
|
}
|
|
509
|
-
if (
|
|
415
|
+
if (previousId === windowId) {
|
|
510
416
|
const dynamicMFStore = createDynamicMFStore({
|
|
511
|
-
dynamicMFParameters:
|
|
417
|
+
dynamicMFParameters: newWindowProps.dynamicParams,
|
|
512
418
|
windowId
|
|
513
419
|
});
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
...newWindowPopupProps,
|
|
517
|
-
emergeType: "popup",
|
|
518
|
-
windowId,
|
|
420
|
+
state.hashWindows[windowId] = {
|
|
421
|
+
...newWindowProps,
|
|
519
422
|
areaId,
|
|
520
|
-
|
|
521
|
-
|
|
423
|
+
windowId,
|
|
424
|
+
onClose: (removeLayoutId) => {
|
|
425
|
+
get().areaActions.closeLayout(areaId, removeLayoutId);
|
|
426
|
+
},
|
|
522
427
|
...DEFAULT_WINDOW,
|
|
523
428
|
dynamicMFStore
|
|
524
429
|
};
|
|
525
|
-
|
|
526
|
-
|
|
430
|
+
area.hashLayoutItems.push(windowId);
|
|
431
|
+
if (newWindowProps.emergeType === "layout") {
|
|
432
|
+
area.currentLayoutId = windowId;
|
|
433
|
+
if (area.maximizedId) {
|
|
434
|
+
area.maximizedId = windowId;
|
|
435
|
+
}
|
|
436
|
+
} else {
|
|
437
|
+
area.currentPopUpId = windowId;
|
|
438
|
+
}
|
|
439
|
+
area.layouts = addLayoutItemToBreakPoints(
|
|
440
|
+
area.layouts,
|
|
441
|
+
newLayoutItem,
|
|
442
|
+
NORMALIZED_COLS,
|
|
443
|
+
[MARGIN_GRIDLAYOUT, MARGIN_GRIDLAYOUT],
|
|
444
|
+
[PADDING_GRIDLAYOUT, PADDING_GRIDLAYOUT],
|
|
445
|
+
ROW_HEIGTH_GRIDLAYOUT,
|
|
446
|
+
area.containerHeight
|
|
447
|
+
);
|
|
527
448
|
}
|
|
528
449
|
});
|
|
529
|
-
get().areaActions.
|
|
450
|
+
get().areaActions.saveLayouts(areaId);
|
|
530
451
|
},
|
|
531
|
-
|
|
452
|
+
closeLayout: (areaId, removeLayoutId) => {
|
|
532
453
|
set((state) => {
|
|
533
454
|
const area = state.hashAreas[areaId];
|
|
534
455
|
if (!area) {
|
|
535
456
|
return;
|
|
536
457
|
}
|
|
537
|
-
const removeIndex = area.
|
|
538
|
-
(gl) => gl.i === removeLayoutId
|
|
539
|
-
);
|
|
458
|
+
const removeIndex = area.hashLayoutItems.indexOf(removeLayoutId);
|
|
540
459
|
if (removeIndex > -1) {
|
|
541
|
-
area.
|
|
460
|
+
area.hashLayoutItems.splice(removeIndex, 1);
|
|
542
461
|
}
|
|
543
462
|
deleteLayoutFromBreakPoints(area, removeLayoutId);
|
|
544
463
|
delete state.hashWindows[removeLayoutId];
|
|
545
|
-
delete area.hashWindowsLayouts[removeLayoutId];
|
|
546
464
|
});
|
|
547
465
|
get().areaActions.saveLayouts(areaId);
|
|
548
|
-
if (get().hashAreas[areaId].
|
|
466
|
+
if (get().hashAreas[areaId].maximizedId === removeLayoutId) {
|
|
549
467
|
get().areaActions.maximizeLayout(areaId);
|
|
550
468
|
}
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
isDraggable: true,
|
|
557
|
-
isResizable: true,
|
|
558
|
-
winType: newWindow.winType
|
|
559
|
-
};
|
|
560
|
-
set((state) => {
|
|
561
|
-
const area = state.hashAreas[areaId];
|
|
562
|
-
if (!area) {
|
|
563
|
-
return;
|
|
469
|
+
for (let index = 0; index < get().hashAreas[areaId].hashLayoutItems.length; index++) {
|
|
470
|
+
const layoutItemId = get().hashAreas[areaId].hashLayoutItems[index];
|
|
471
|
+
const layoutItem = get().hashWindows[layoutItemId];
|
|
472
|
+
if (layoutItem.parentLayoutId === removeLayoutId) {
|
|
473
|
+
get().areaActions.closeLayout(areaId, layoutItem.windowId);
|
|
564
474
|
}
|
|
565
|
-
const dynamicMFStore = createDynamicMFStore({
|
|
566
|
-
dynamicMFParameters: newWindow.dynamicParams,
|
|
567
|
-
windowId
|
|
568
|
-
});
|
|
569
|
-
area.windowsLayouts.push(newLayout);
|
|
570
|
-
area.hashWindowsLayouts[windowId] = {
|
|
571
|
-
...newWindow,
|
|
572
|
-
areaId,
|
|
573
|
-
windowId,
|
|
574
|
-
emergeType: "layout",
|
|
575
|
-
onClose: (removeLayoutId) => {
|
|
576
|
-
get().areaActions.closeWindowLayout(areaId, removeLayoutId);
|
|
577
|
-
},
|
|
578
|
-
...DEFAULT_WINDOW,
|
|
579
|
-
dynamicMFStore
|
|
580
|
-
};
|
|
581
|
-
state.hashWindows[windowId] = area.hashWindowsLayouts[windowId];
|
|
582
|
-
setAddBreakPoints(area, newLayout);
|
|
583
|
-
});
|
|
584
|
-
get().areaActions.selectWindowLayout(areaId, windowId);
|
|
585
|
-
if (get().hashAreas[areaId].viewMode === "single" || newWindow?.openType === "maximized") {
|
|
586
|
-
get().areaActions.maximizeLayout(areaId, windowId);
|
|
587
475
|
}
|
|
588
|
-
get().areaActions.saveLayouts(areaId);
|
|
589
|
-
get().areaActions.bouncedSaveBreakpointsLayouts(areaId);
|
|
590
476
|
},
|
|
591
477
|
saveLayouts: (areaId) => {
|
|
592
478
|
let nrKeys = 0;
|
|
@@ -594,18 +480,33 @@ const createAreasStore = (initProps) => {
|
|
|
594
480
|
if (!area) {
|
|
595
481
|
return;
|
|
596
482
|
}
|
|
483
|
+
console.log("saveLayouts before", areaId, area.hashLayoutItems);
|
|
597
484
|
const saveObjetc = {};
|
|
598
|
-
for (
|
|
599
|
-
const
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
485
|
+
for (let index = 0; index < area.hashLayoutItems.length; index++) {
|
|
486
|
+
const key = area.hashLayoutItems[index];
|
|
487
|
+
console.log("saveLayouts", areaId, key, get().hashWindows[key]);
|
|
488
|
+
if (get().hashWindows[key] && get().hashWindows[key].winType === "microfrontend") {
|
|
489
|
+
const element = get().hashWindows[key];
|
|
490
|
+
const hasPropsToSave = {
|
|
491
|
+
winType: true,
|
|
492
|
+
emergeType: true,
|
|
493
|
+
title: true,
|
|
494
|
+
url_icon: true,
|
|
495
|
+
windowOptions: true,
|
|
496
|
+
moduleId: true,
|
|
497
|
+
windowId: true,
|
|
498
|
+
mfProps: true
|
|
499
|
+
};
|
|
500
|
+
const newElement = {};
|
|
501
|
+
for (const keyToSave in hasPropsToSave) {
|
|
502
|
+
newElement[keyToSave] = element[keyToSave];
|
|
503
|
+
}
|
|
604
504
|
saveObjetc[key] = newElement;
|
|
605
505
|
nrKeys++;
|
|
606
506
|
}
|
|
607
507
|
}
|
|
608
508
|
if (nrKeys > 0) {
|
|
509
|
+
console.log("SaveLayouyts", saveObjetc);
|
|
609
510
|
get().networkOperation({
|
|
610
511
|
method: "PUT",
|
|
611
512
|
endPoint: `cookies/${area.id}/${COOKIE_WINDOWS}`,
|
|
@@ -625,10 +526,40 @@ const createAreasStore = (initProps) => {
|
|
|
625
526
|
});
|
|
626
527
|
}
|
|
627
528
|
},
|
|
529
|
+
closeWindowModal: (removeModalId) => {
|
|
530
|
+
set((state) => {
|
|
531
|
+
const removeIndex = state.windowsModals.findIndex(
|
|
532
|
+
(w) => w === removeModalId
|
|
533
|
+
);
|
|
534
|
+
if (removeIndex > -1) {
|
|
535
|
+
state.windowsModals.splice(removeIndex, 1);
|
|
536
|
+
}
|
|
537
|
+
delete state.hashWindows[removeModalId];
|
|
538
|
+
delete state.hashWindowsModals[removeModalId];
|
|
539
|
+
});
|
|
540
|
+
},
|
|
541
|
+
addWindowModal: (areaId, windowId, newWindowModalProps) => {
|
|
542
|
+
set((state) => {
|
|
543
|
+
const dynamicMFStore = createDynamicMFStore({
|
|
544
|
+
dynamicMFParameters: newWindowModalProps.dynamicParams,
|
|
545
|
+
windowId
|
|
546
|
+
});
|
|
547
|
+
state.windowsModals.push(windowId);
|
|
548
|
+
state.hashWindowsModals[windowId] = {
|
|
549
|
+
...newWindowModalProps,
|
|
550
|
+
areaId,
|
|
551
|
+
windowId,
|
|
552
|
+
...DEFAULT_WINDOW,
|
|
553
|
+
onClose: get().areaActions.closeWindowModal,
|
|
554
|
+
dynamicMFStore
|
|
555
|
+
};
|
|
556
|
+
state.hashWindows[windowId] = state.hashWindowsModals[windowId];
|
|
557
|
+
});
|
|
558
|
+
},
|
|
628
559
|
bouncedSaveBreakpointsLayouts: debounce(
|
|
629
560
|
(areaId) => {
|
|
630
561
|
const purgedLayouts = {
|
|
631
|
-
...get().hashAreas[areaId].
|
|
562
|
+
...get().hashAreas[areaId].layouts
|
|
632
563
|
};
|
|
633
564
|
const finalLayouts = {};
|
|
634
565
|
for (const key in purgedLayouts) {
|
|
@@ -637,7 +568,7 @@ const createAreasStore = (initProps) => {
|
|
|
637
568
|
if (l.i === "none") {
|
|
638
569
|
return false;
|
|
639
570
|
}
|
|
640
|
-
if (get().hashAreas[areaId].
|
|
571
|
+
if (get().hashAreas[areaId].hashLayoutItems.indexOf(l.i) > -1) {
|
|
641
572
|
return true;
|
|
642
573
|
}
|
|
643
574
|
return false;
|
|
@@ -658,101 +589,91 @@ const createAreasStore = (initProps) => {
|
|
|
658
589
|
});
|
|
659
590
|
}
|
|
660
591
|
},
|
|
661
|
-
DEBOUCED_SAVE_TIME
|
|
592
|
+
DEBOUCED_SAVE_TIME,
|
|
593
|
+
{
|
|
594
|
+
leading: true,
|
|
595
|
+
trailing: true
|
|
596
|
+
}
|
|
662
597
|
),
|
|
663
|
-
onBreakpointsLayoutsChange: (areaId,
|
|
598
|
+
onBreakpointsLayoutsChange: (areaId, _currentLayout, newAllLayouts) => {
|
|
599
|
+
console.log("onBreakpointsLayoutsChange", areaId, newAllLayouts);
|
|
664
600
|
set((state) => {
|
|
665
|
-
state.hashAreas[areaId].
|
|
601
|
+
state.hashAreas[areaId].layouts = cloneDeep(newAllLayouts);
|
|
666
602
|
});
|
|
667
|
-
if (!get().hashAreas[areaId].
|
|
603
|
+
if (!get().hashAreas[areaId].maximizedId) {
|
|
668
604
|
get().areaActions.bouncedSaveBreakpointsLayouts(areaId);
|
|
669
605
|
}
|
|
670
606
|
},
|
|
671
|
-
|
|
607
|
+
onContainerChange: (areaId, e) => {
|
|
608
|
+
console.log("onContainerChange Store", areaId, e.containerHeight);
|
|
672
609
|
set((state) => {
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
state.currentModuleId = state.hashWindows[layoutId].moduleId;
|
|
676
|
-
if (area.currentPopUpId !== "" && area.hashWindowsPopups[area.currentPopUpId]) {
|
|
677
|
-
const windowPopup = area.hashWindowsPopups[area.currentPopUpId];
|
|
678
|
-
if (windowPopup.parentLayoutId !== layoutId) {
|
|
679
|
-
area.currentPopUpId = "";
|
|
680
|
-
}
|
|
681
|
-
}
|
|
610
|
+
state.hashAreas[areaId].containerHeight = e.containerHeight;
|
|
611
|
+
state.hashAreas[areaId].currentBreakpoint = e.breakpoint;
|
|
682
612
|
});
|
|
683
613
|
},
|
|
684
|
-
|
|
685
|
-
let finalLayoutId = layoutId;
|
|
614
|
+
selectLayout: (areaId, layoutId) => {
|
|
686
615
|
set((state) => {
|
|
687
616
|
const area = state.hashAreas[areaId];
|
|
688
|
-
if (
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
area.
|
|
692
|
-
area.
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
617
|
+
if (state.hashWindows[layoutId].emergeType === "layout") {
|
|
618
|
+
area.currentLayoutId = layoutId;
|
|
619
|
+
state.currentModuleId = state.hashWindows[layoutId].moduleId;
|
|
620
|
+
if (area.currentPopUpId !== "" && state.hashWindows[area.currentPopUpId]) {
|
|
621
|
+
if (state.hashWindows[area.currentPopUpId].parentLayoutId !== layoutId) {
|
|
622
|
+
area.currentPopUpId = "";
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
} else {
|
|
626
|
+
state.hashAreas[areaId].currentPopUpId = layoutId;
|
|
627
|
+
const parentLayoutId = state.hashWindows[layoutId]?.parentLayoutId;
|
|
628
|
+
if (parentLayoutId && state.hashWindows[parentLayoutId]) {
|
|
629
|
+
area.currentLayoutId = parentLayoutId;
|
|
630
|
+
state.currentModuleId = state.hashWindows[parentLayoutId].moduleId;
|
|
631
|
+
} else {
|
|
632
|
+
area.currentLayoutId = "";
|
|
633
|
+
state.currentModuleId = "";
|
|
698
634
|
}
|
|
699
635
|
}
|
|
700
|
-
area.viewMode = "single";
|
|
701
|
-
area.singleId = finalLayoutId;
|
|
702
|
-
setTimeout(() => {
|
|
703
|
-
set((state2) => {
|
|
704
|
-
setBreakPointsMaximized(
|
|
705
|
-
state2.hashAreas[areaId],
|
|
706
|
-
finalLayoutId
|
|
707
|
-
);
|
|
708
|
-
});
|
|
709
|
-
}, 100);
|
|
710
636
|
});
|
|
711
|
-
|
|
712
|
-
|
|
637
|
+
},
|
|
638
|
+
unColapseLayoutItem: (areaId, layoutId) => {
|
|
639
|
+
if (get().hashWindows[layoutId] && get().hashAreas[areaId].colapsedItems[layoutId]) {
|
|
640
|
+
set((state) => {
|
|
641
|
+
state.hashAreas[areaId].colapsedItems = {
|
|
642
|
+
...state.hashAreas[areaId].colapsedItems
|
|
643
|
+
};
|
|
644
|
+
delete state.hashAreas[areaId].colapsedItems[layoutId];
|
|
645
|
+
state.hashWindows[layoutId].colapsed = false;
|
|
646
|
+
});
|
|
713
647
|
}
|
|
714
648
|
},
|
|
715
|
-
|
|
649
|
+
colapseLayoutItem: (areaId, layoutId) => {
|
|
650
|
+
if (!get().hashAreas[areaId].maximizedId && get().hashWindows[layoutId]) {
|
|
651
|
+
set((state) => {
|
|
652
|
+
state.hashAreas[areaId].colapsedItems = {
|
|
653
|
+
...state.hashAreas[areaId].colapsedItems
|
|
654
|
+
};
|
|
655
|
+
state.hashAreas[areaId].colapsedItems[layoutId] = true;
|
|
656
|
+
state.hashWindows[layoutId].colapsed = true;
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
},
|
|
660
|
+
maximizeLayout: (areaId, layoutId) => {
|
|
716
661
|
set((state) => {
|
|
717
662
|
const area = state.hashAreas[areaId];
|
|
718
663
|
if (!area)
|
|
719
664
|
return;
|
|
720
|
-
|
|
721
|
-
return;
|
|
722
|
-
}
|
|
723
|
-
if (area.viewMode === "single" && area.currentLayoutId !== "") {
|
|
724
|
-
console.log("Rezigning", areaId);
|
|
725
|
-
const layoutsBreakPoints = area.breakPointsLayouts;
|
|
726
|
-
const container = document.getElementsByClassName(
|
|
727
|
-
`${areasViewerClasses.areaGridLayout}-${area.id}`
|
|
728
|
-
)[0];
|
|
729
|
-
window.dispatchEvent(new Event("resize"));
|
|
730
|
-
for (const key in layoutsBreakPoints) {
|
|
731
|
-
const layoutBreakpoint = layoutsBreakPoints[key];
|
|
732
|
-
if (layoutBreakpoint) {
|
|
733
|
-
const clientHeight = container.clientHeight;
|
|
734
|
-
const heigthUnits = (clientHeight + MARGIN_GRIDLAYOUT - 2 * CONTAINER_PADDING_GRIDLAYOUT) / (ROW_HEIGTH_GRIDLAYOUT + MARGIN_GRIDLAYOUT);
|
|
735
|
-
for (let index = 0; index < layoutBreakpoint.length; index++) {
|
|
736
|
-
const l = layoutBreakpoint[index];
|
|
737
|
-
if (l.i === area.currentLayoutId) {
|
|
738
|
-
l.h = heigthUnits;
|
|
739
|
-
l.maxH = heigthUnits;
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
|
-
}
|
|
665
|
+
area.maximizedId = layoutId;
|
|
745
666
|
});
|
|
667
|
+
if (layoutId) {
|
|
668
|
+
get().areaActions.selectLayout(areaId, layoutId);
|
|
669
|
+
}
|
|
746
670
|
},
|
|
747
671
|
normalizeLayouts: (areaId) => {
|
|
748
672
|
set((state) => {
|
|
749
|
-
|
|
673
|
+
const area = state.hashAreas[areaId];
|
|
674
|
+
if (!area)
|
|
750
675
|
return;
|
|
751
|
-
|
|
752
|
-
state.hashAreas[areaId].viewMode = "multiple";
|
|
753
|
-
state.hashAreas[areaId].singleId = void 0;
|
|
754
|
-
state.hashAreas[areaId].breakPointsLayouts = state.hashAreas[areaId].beforeMaximizebreakpointsLayouts;
|
|
755
|
-
}
|
|
676
|
+
area.maximizedId = void 0;
|
|
756
677
|
});
|
|
757
678
|
},
|
|
758
679
|
loadWindowsFromApi: (areaId) => {
|
|
@@ -787,27 +708,19 @@ const createAreasStore = (initProps) => {
|
|
|
787
708
|
const area3 = state.hashAreas[areaId];
|
|
788
709
|
const {
|
|
789
710
|
newBreakPointsLayouts,
|
|
790
|
-
|
|
791
|
-
|
|
711
|
+
newWindowsLayoutsIds,
|
|
712
|
+
newHashLayoutItems
|
|
792
713
|
} = getDataFromResponse(response.data, state, areaId);
|
|
793
|
-
area3.
|
|
794
|
-
|
|
795
|
-
area3.beforeMaximizebreakpointsLayouts = newBreakPointsLayouts;
|
|
796
|
-
}
|
|
797
|
-
area3.windowsLayouts = newWindowsLayouts;
|
|
798
|
-
area3.hashWindowsLayouts = newHashWindowLayouts;
|
|
714
|
+
area3.layouts = newBreakPointsLayouts;
|
|
715
|
+
area3.hashLayoutItems = newHashLayoutItems;
|
|
799
716
|
area3.status = "loaded";
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
717
|
+
console.log(
|
|
718
|
+
"loadWindowsFromApi",
|
|
719
|
+
newBreakPointsLayouts,
|
|
720
|
+
newHashLayoutItems,
|
|
721
|
+
newWindowsLayoutsIds
|
|
805
722
|
);
|
|
806
|
-
}
|
|
807
|
-
console.log("loadWindowsFromApi", area2.viewMode);
|
|
808
|
-
if (area2.viewMode === "single") {
|
|
809
|
-
get().areaActions.maximizeLayout(area2.id);
|
|
810
|
-
}
|
|
723
|
+
});
|
|
811
724
|
}).catch((_response) => {
|
|
812
725
|
set((state) => {
|
|
813
726
|
state.hashAreas[areaId].status = "loaded";
|
|
@@ -825,6 +738,11 @@ const createAreasStore = (initProps) => {
|
|
|
825
738
|
});
|
|
826
739
|
},
|
|
827
740
|
getCookie: (windowId, id) => {
|
|
741
|
+
console.log(
|
|
742
|
+
"getCookie",
|
|
743
|
+
get().hashWindows[windowId].cookies.windowCookies[id],
|
|
744
|
+
get().hashWindows[windowId].cookies.moduleCookies[id]
|
|
745
|
+
);
|
|
828
746
|
if (get().hashWindows[windowId]) {
|
|
829
747
|
return get().hashWindows[windowId].cookies.windowCookies[id] || get().hashWindows[windowId].cookies.moduleCookies[id];
|
|
830
748
|
}
|
|
@@ -870,10 +788,17 @@ const createAreasStore = (initProps) => {
|
|
|
870
788
|
}
|
|
871
789
|
}
|
|
872
790
|
},
|
|
873
|
-
|
|
791
|
+
startProgress: (windowId) => {
|
|
874
792
|
set((state) => {
|
|
875
793
|
if (state.hashWindows[windowId]) {
|
|
876
|
-
state.hashWindows[windowId].loading =
|
|
794
|
+
state.hashWindows[windowId].loading = true;
|
|
795
|
+
}
|
|
796
|
+
});
|
|
797
|
+
},
|
|
798
|
+
stopProgress: (windowId) => {
|
|
799
|
+
set((state) => {
|
|
800
|
+
if (state.hashWindows[windowId]) {
|
|
801
|
+
state.hashWindows[windowId].loading = false;
|
|
877
802
|
}
|
|
878
803
|
});
|
|
879
804
|
},
|
|
@@ -907,6 +832,11 @@ const createAreasStore = (initProps) => {
|
|
|
907
832
|
response.data,
|
|
908
833
|
windowId
|
|
909
834
|
);
|
|
835
|
+
console.log(
|
|
836
|
+
"cookies",
|
|
837
|
+
hWs.cookies.windowCookies,
|
|
838
|
+
hWs.cookies.moduleCookies
|
|
839
|
+
);
|
|
910
840
|
hWs.status = "loaded";
|
|
911
841
|
}
|
|
912
842
|
});
|
|
@@ -957,9 +887,10 @@ const createAreasStore = (initProps) => {
|
|
|
957
887
|
});
|
|
958
888
|
}
|
|
959
889
|
},
|
|
960
|
-
|
|
890
|
+
toast: (windowId, options) => {
|
|
961
891
|
const hW = get().hashWindows[windowId];
|
|
962
892
|
if (hW) {
|
|
893
|
+
console.log("replaceMeId", options.replaceMeId);
|
|
963
894
|
if (options.replaceMeId) {
|
|
964
895
|
for (const key in hW.hashToasties) {
|
|
965
896
|
const t = hW.hashToasties[key];
|
|
@@ -1009,12 +940,12 @@ const createAreasStore = (initProps) => {
|
|
|
1009
940
|
});
|
|
1010
941
|
}
|
|
1011
942
|
},
|
|
1012
|
-
|
|
943
|
+
closeToast: (windowId, toastyId) => {
|
|
1013
944
|
set((state) => {
|
|
1014
945
|
verifyRemoveToasty(state.hashWindows[windowId], toastyId, true);
|
|
1015
946
|
});
|
|
1016
947
|
},
|
|
1017
|
-
|
|
948
|
+
pinToast: (windowId, toastyId) => {
|
|
1018
949
|
set((state) => {
|
|
1019
950
|
const t = state.hashWindows[windowId].hashToasties[toastyId];
|
|
1020
951
|
if (t) {
|
|
@@ -1087,9 +1018,9 @@ function AreasProvider(props) {
|
|
|
1087
1018
|
setExternalState
|
|
1088
1019
|
} = useStore(areasStoreRef.current, (state) => state.areasActions, shallow);
|
|
1089
1020
|
const addWindow = useCallback((newWindow) => {
|
|
1090
|
-
const
|
|
1021
|
+
const currentAreaId = areasStoreRef.current?.getState().currentAreaId;
|
|
1091
1022
|
const areas = areasStoreRef.current?.getState().areas;
|
|
1092
|
-
if (
|
|
1023
|
+
if (currentAreaId && areas) {
|
|
1093
1024
|
areasStoreRef.current?.getState().areaActions.addWindow(newWindow);
|
|
1094
1025
|
}
|
|
1095
1026
|
}, []);
|
|
@@ -1133,9 +1064,8 @@ function AreasProvider(props) {
|
|
|
1133
1064
|
}
|
|
1134
1065
|
export {
|
|
1135
1066
|
AreasContext as A,
|
|
1136
|
-
CONTAINER_PADDING_GRIDLAYOUT as C,
|
|
1137
1067
|
MARGIN_GRIDLAYOUT as M,
|
|
1068
|
+
PADDING_GRIDLAYOUT as P,
|
|
1138
1069
|
ROW_HEIGTH_GRIDLAYOUT as R,
|
|
1139
|
-
THROTTLE_RESIZE_TIME as T,
|
|
1140
1070
|
AreasProvider as a
|
|
1141
1071
|
};
|