@m4l/components 2.0.7 → 3.0.0

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.
Files changed (165) hide show
  1. package/@types/export.d.ts +266 -269
  2. package/@types/types.d.ts +47 -37
  3. package/components/AccountPopover/{index.a5747746.js → index.af5aae0e.js} +3 -3
  4. package/components/AppBar/{index.2d458607.js → index.b8f22046.js} +4 -4
  5. package/components/BaseModule/{index.3f266927.js → index.f7a04fe7.js} +1 -1
  6. package/components/CommonActions/components/ActionCancel/{index.c1185f46.js → index.e67885bc.js} +2 -2
  7. package/components/CommonActions/components/ActionFormCancel/{index.7f76a6ba.js → index.92988013.js} +4 -4
  8. package/components/CommonActions/components/ActionFormIntro/{index.8a23ec62.js → index.f8867ae9.js} +2 -2
  9. package/components/CommonActions/components/ActionIntro/{index.185199da.js → index.e58eb0c4.js} +2 -2
  10. package/components/CommonActions/components/Actions/{index.ea4c273b.js → index.f674be30.js} +2 -2
  11. package/components/DataGrid/assets/icons/datagrid.svg +4 -4
  12. package/components/DataGrid/formatters/ColumnBooleanFormatter/{index.0739f098.js → index.89a59c52.js} +1 -1
  13. package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/{index.d524f74c.js → index.d619d1db.js} +1 -1
  14. package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/{index.addc6664.js → index.557bc8a5.js} +1 -1
  15. package/components/DataGrid/formatters/{index.ee269cae.js → index.06c18753.js} +2 -2
  16. package/components/DataGrid/{index.1feaab04.js → index.b37d6cab.js} +4 -4
  17. package/components/DataGrid/subcomponents/Actions/{index.06306495.js → index.c3b1c1e2.js} +11 -11
  18. package/components/DragResizeWindow/DragResizeWindow.d.ts +1 -1
  19. package/components/DragResizeWindow/{index.44fad985.js → index.a4bcaab8.js} +2 -2
  20. package/components/DynamicFilter/{dictionary.a55d5bc2.js → dictionary.94a74eb3.js} +2 -2
  21. package/components/DynamicFilter/{index.2033e755.js → index.b07b567a.js} +4 -4
  22. package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +1 -1
  23. package/components/DynamicFilter/slots/{dynamicFilterSlots.3ef5ec21.js → dynamicFilterSlots.dd5824d5.js} +6 -6
  24. package/components/DynamicFilter/store/{index.3cc06678.js → index.49d1b77f.js} +1 -1
  25. package/components/DynamicFilter/subcomponents/AppliedFilterChip/{index.db29f2ff.js → index.9e8fcc8c.js} +3 -3
  26. package/components/DynamicFilter/subcomponents/AppliedFilters/{index.2de720bc.js → index.3e52c5d7.js} +4 -4
  27. package/components/DynamicFilter/subcomponents/DynamicFilterBase/{index.7a9d4d33.js → index.68d855e9.js} +6 -6
  28. package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/{index.a4269ba3.js → index.11f588b4.js} +2 -2
  29. package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/{index.ebb6606c.js → index.77555163.js} +4 -4
  30. package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/{index.cd343ba0.js → index.1c8454db.js} +3 -3
  31. package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/{index.b5c31620.js → index.cb31333a.js} +4 -4
  32. package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/{index.4c42f140.js → index.0ae3d439.js} +3 -3
  33. package/components/DynamicFilter/subcomponents/FieldTypes/{index.3e15fc1c.js → index.5a0c7b12.js} +5 -5
  34. package/components/DynamicFilter/subcomponents/FilterActions/{index.0d687448.js → index.50c175e7.js} +3 -3
  35. package/components/DynamicFilter/subcomponents/InputFilter/{index.4c5bb297.js → index.82d4ac5a.js} +4 -4
  36. package/components/DynamicFilter/subcomponents/PopoverFilter/{index.6c8c52ae.js → index.fa62a6c3.js} +6 -6
  37. package/components/DynamicFilter/subcomponents/PopoverMenuFields/{index.9cf2bc44.js → index.e5e439f1.js} +2 -2
  38. package/components/DynamicFilter/types.d.ts +1 -1
  39. package/components/FieldLabel/{index.972f989e.js → index.9a979def.js} +4 -4
  40. package/components/GridLayout/{index.2b9bc85c.js → index.dd291886.js} +2 -2
  41. package/components/GridLayout/subcomponents/Griditem/{index.684c3f3c.js → index.10278655.js} +3 -3
  42. package/components/GridLayout/subcomponents/Responsive/{index.dc0a1ce0.js → index.24857a52.js} +1 -1
  43. package/components/GridLayout/subcomponents/SizeProvider/{index.15d0ca85.js → index.2f762118.js} +1 -1
  44. package/components/HelperText/{index.2f4c6655.js → index.6818980e.js} +2 -2
  45. package/components/Icon/{index.0f315ccd.js → index.c06685f4.js} +3 -3
  46. package/components/Image/{index.32b58ce4.js → index.ae542f70.js} +2 -2
  47. package/components/LanguagePopover/{index.6ac2473a.js → index.2a7e40fc.js} +4 -4
  48. package/components/LinearProgressIndeterminate/{index.6d1605ff.js → index.ca78fd37.js} +2 -2
  49. package/components/LoadingError/{index.c5a70390.js → index.765ff885.js} +6 -6
  50. package/components/MFIsolationApp/constants.d.ts +1 -0
  51. package/components/MFIsolationApp/{index.56a12cde.js → index.677d9e93.js} +46 -44
  52. package/components/MFLoader/{index.cc350d72.js → index.6af7729c.js} +2 -2
  53. package/components/ModalDialog/{index.580a88dc.js → index.a57ee020.js} +4 -4
  54. package/components/NavLink/{index.c6fd316b.js → index.dd723dfd.js} +2 -2
  55. package/components/NoItemSelected/{index.7274cdb1.js → index.b3e365b1.js} +1 -1
  56. package/components/ObjectLogs/{index.1b51e5f2.js → index.54fdee14.js} +9 -9
  57. package/components/PDFViewer/{index.eed9494a.js → index.7932d07b.js} +2 -2
  58. package/components/Page/{index.f6884847.js → index.5f2963f3.js} +1 -1
  59. package/components/PaperForm/{index.86c1f1d6.js → index.cdb1f846.js} +2 -2
  60. package/components/Period/{index.5757802b.js → index.b0b2a03b.js} +4 -4
  61. package/components/PrintingSystem/{index.47e0ce83.js → index.800a7957.js} +14 -14
  62. package/components/PrintingSystem/subcomponents/BodyNode/{index.d58660a8.js → index.60ad80bd.js} +1 -1
  63. package/components/PrintingSystem/subcomponents/ChartNode/{index.8e010873.js → index.d4aa116e.js} +1 -1
  64. package/components/PrintingSystem/subcomponents/DividerNode/{index.13330f51.js → index.142bbf1a.js} +1 -1
  65. package/components/PrintingSystem/subcomponents/FooterNode/{index.05da3e1d.js → index.d16d2c5e.js} +1 -1
  66. package/components/PrintingSystem/subcomponents/GridNode/{index.d68b5460.js → index.044363bf.js} +1 -1
  67. package/components/PrintingSystem/subcomponents/HeaderNode/{index.0ed11227.js → index.5581a84d.js} +1 -1
  68. package/components/PrintingSystem/subcomponents/PaperNode/{index.0a0227e4.js → index.2994c128.js} +1 -1
  69. package/components/PrintingSystem/subcomponents/PropertyValueNode/{index.18931b6e.js → index.166d7264.js} +1 -1
  70. package/components/PrintingSystem/subcomponents/SectionNode/{index.e80cce87.js → index.642ab1b7.js} +1 -1
  71. package/components/PrintingSystem/subcomponents/TextBoxNode/{index.7fc92f43.js → index.d8a2a0af.js} +1 -1
  72. package/components/PropertyValue/{index.ee9cf342.js → index.d81eae0a.js} +3 -3
  73. package/components/Resizeable/{index.0ffd46bc.js → index.df2f3bb8.js} +1 -1
  74. package/components/ScrollBar/{index.45b8db89.js → index.11feff65.js} +1 -1
  75. package/components/SideBar/{index.50868466.js → index.990e8667.js} +6 -6
  76. package/components/SplitLayout/{index.c2b8dcb8.js → index.b247de95.js} +1 -1
  77. package/components/ToastContainer/ToastContainer.d.ts +1 -1
  78. package/components/ToastContainer/constants.d.ts +3 -0
  79. package/components/ToastContainer/helpers/toaster.d.ts +4 -0
  80. package/components/ToastContainer/icons.d.ts +9 -0
  81. package/components/ToastContainer/index.c1657bde.js +191 -0
  82. package/components/ToastContainer/index.d.ts +1 -0
  83. package/components/ToastContainer/slots/ToastContainerEnum.d.ts +13 -0
  84. package/components/ToastContainer/slots/index.d.ts +2 -0
  85. package/components/ToastContainer/slots/toastContainerSlots.d.ts +34 -0
  86. package/components/ToastContainer/subcomponents/ToastMessage/ToastMessage.d.ts +2 -0
  87. package/components/ToastContainer/subcomponents/ToastMessage/index.d.ts +1 -2
  88. package/components/ToastContainer/types.d.ts +39 -3
  89. package/components/animate/LoadingScreen/{index.31af02f8.js → index.36a63311.js} +1 -1
  90. package/components/animate/{index.160607f3.js → index.ceb7669a.js} +1 -1
  91. package/components/areas/components/AreasAdmin/{index.cb60f940.js → index.b232384d.js} +16 -16
  92. package/components/areas/components/AreasViewer/classes/index.d.ts +1 -1
  93. package/components/areas/components/AreasViewer/classes/types.d.ts +0 -8
  94. package/components/areas/components/AreasViewer/{index.350ee032.js → index.d45bfcd2.js} +19 -97
  95. package/components/areas/contexts/AreasContext/helper.d.ts +2 -5
  96. package/components/areas/contexts/AreasContext/{index.1a5c5df1.js → index.9edd84c3.js} +5 -119
  97. package/components/areas/contexts/AreasContext/types.d.ts +1 -4
  98. package/components/areas/contexts/WindowToolsMFContext/types.d.ts +3 -2
  99. package/components/areas/hooks/useAreas/{index.ba948f80.js → index.5a57ab76.js} +1 -1
  100. package/components/areas/{icons.8266ccc8.js → icons.01fa3bcc.js} +0 -2
  101. package/components/areas/icons.d.ts +0 -2
  102. package/components/areas/index.d.ts +1 -1
  103. package/components/areas/types.d.ts +0 -40
  104. package/components/commercial/AppBarCommercial/{index.cdc42f41.js → index.b4f6147e.js} +2 -2
  105. package/components/commercial/SectionCommercial/{index.a9265d42.js → index.a250338c.js} +2 -2
  106. package/components/commercial/TopBar/{index.06c1e138.js → index.4fdd66e5.js} +6 -6
  107. package/components/commercial/{index.163293c3.js → index.be1af158.js} +3 -3
  108. package/components/formatters/BooleanFormatter/{index.b224ae9b.js → index.91435984.js} +2 -2
  109. package/components/formatters/{index.373a6ce1.js → index.64017cc1.js} +2 -2
  110. package/components/hook-form/HelperError/{index.399e7338.js → index.360f8fb7.js} +1 -1
  111. package/components/hook-form/RHFAutocomplete/{index.0d32fed5.js → index.089af1b8.js} +6 -6
  112. package/components/hook-form/RHFAutocompleteAsync/{index.2622450c.js → index.f05b6fe3.js} +2 -2
  113. package/components/hook-form/RHFCheckbox/{index.3229f16c.js → index.4cefbad2.js} +3 -3
  114. package/components/hook-form/RHFColorPicker/{index.86525787.js → index.ed380b30.js} +6 -6
  115. package/components/hook-form/RHFDateTime/{index.572079c5.js → index.118ebe6d.js} +4 -4
  116. package/components/hook-form/RHFPeriod/{index.1883d9f6.js → index.404ba4c6.js} +4 -4
  117. package/components/hook-form/RHFRadioGroup/{index.9eea0df1.js → index.591f779d.js} +1 -1
  118. package/components/hook-form/RHFTextField/{index.5b124af3.js → index.80b98b98.js} +5 -5
  119. package/components/hook-form/RHFUpload/{index.cf63abf0.js → index.7b7ee732.js} +5 -5
  120. package/components/maps/components/GpsTools/{index.7628172f.js → index.c1198f79.js} +24 -24
  121. package/components/maps/components/Map/external/googleMutant/index.d.ts +159 -159
  122. package/components/maps/components/Map/{index.df953487.js → index.8c947175.js} +13 -13
  123. package/components/maps/leaflet-geoman.d.ts +1476 -1476
  124. package/components/modal/{WindowBase.cb284225.js → WindowBase.00b9e5f1.js} +3 -3
  125. package/components/modal/{WindowConfirm.193cc75e.js → WindowConfirm.abf49573.js} +6 -6
  126. package/components/mui_extended/Accordion/{index.49007a43.js → index.26524ecd.js} +4 -4
  127. package/components/mui_extended/Avatar/{index.a2e1ca6d.js → index.e7bcc850.js} +1 -1
  128. package/components/mui_extended/Badge/{index.188ffbb4.js → index.48948839.js} +1 -1
  129. package/components/mui_extended/Button/{index.ca15c36e.js → index.3d14e3e9.js} +3 -3
  130. package/components/mui_extended/{CheckBox.983e10e6.js → CheckBox.5dc01b37.js} +2 -2
  131. package/components/mui_extended/IconButton/{index.caf17392.js → index.7b6c1ee3.js} +2 -2
  132. package/components/mui_extended/MenuActions/{index.c24bd476.js → index.11d777bb.js} +5 -5
  133. package/components/mui_extended/Pager/{index.f27033fc.js → index.b28a2103.js} +4 -4
  134. package/components/mui_extended/Popover/{index.1fafd106.js → index.a7da93f1.js} +1 -1
  135. package/components/mui_extended/Stack/{index.b8c3b40b.js → index.99de8138.js} +1 -1
  136. package/components/mui_extended/Tab/{index.c2dca6dd.js → index.5c6a6801.js} +1 -1
  137. package/components/mui_extended/ToggleButton/{index.4b6f9c8e.js → index.86098567.js} +1 -1
  138. package/components/mui_extended/ToggleIconButton/{index.0513d9e6.js → index.cbfe1cad.js} +1 -1
  139. package/components/mui_extended/Typography/{index.61dd3fc6.js → index.8c0801e4.js} +1 -1
  140. package/components/popups/PopupsViewer/{index.c6a0c277.js → index.52653047.js} +4 -4
  141. package/components/popups/PopupsViewer/slots/{popupsViewerSlots.0b92fc90.js → popupsViewerSlots.69dd2614.js} +2 -2
  142. package/contexts/ModalContext/{index.50cc9ba8.js → index.799110fe.js} +1 -1
  143. package/contexts/RHFormContext/{index.acc30d9b.js → index.f9d41b99.js} +1 -1
  144. package/hooks/useFormAddEdit/{index.daf5d0c8.js → index.8947ee59.js} +2 -2
  145. package/hooks/useModal/{index.6f5c238d.js → index.eb857f6e.js} +1 -1
  146. package/hooks/useTab/{index.8c6646a4.js → index.9ad15247.js} +1 -1
  147. package/index.js +158 -156
  148. package/package.json +2 -2
  149. package/{react-draggable.df62ccbd.js → react-draggable.079122b0.js} +1 -1
  150. package/{react-resizable.c746880c.js → react-resizable.330f1499.js} +2 -2
  151. package/styles/{DynamicFilter.f317726e.js → DynamicFilter.0713a406.js} +1 -1
  152. package/styles/ToastContainer.styles.d.ts +2 -0
  153. package/styles/{index.ccd8acc4.js → index.db9e7ddb.js} +201 -43
  154. package/test/getNameDataTestId.d.ts +1 -1
  155. package/utils/index.d.ts +1 -1
  156. package/vite-env.d.ts +4 -4
  157. package/components/ToastContainer/classes/constants.d.ts +0 -1
  158. package/components/ToastContainer/classes/index.d.ts +0 -8
  159. package/components/ToastContainer/classes/types.d.ts +0 -9
  160. package/components/ToastContainer/index.ed566312.js +0 -69
  161. package/components/ToastContainer/styles.d.ts +0 -2
  162. package/components/ToastContainer/subcomponents/ToastMessage/types.d.ts +0 -5
  163. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Toasties/index.d.ts +0 -5
  164. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Toasties/subcomponents/Toasty/index.d.ts +0 -6
  165. /package/utils/{index.ebfbb70f.js → index.f77cc2ab.js} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { a0 as SplitLayoutRoot, a1 as SplitMaster, a2 as SplitDetail } from "../../styles/index.ccd8acc4.js";
2
+ import { a0 as SplitLayoutRoot, a1 as SplitMaster, a2 as SplitDetail } from "../../styles/index.db9e7ddb.js";
3
3
  import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
4
4
  import { unstable_composeClasses } from "@mui/base";
5
5
  import clsx from "clsx";
@@ -1,2 +1,2 @@
1
- import { ToastContainerProps } from './types';
1
+ import type { ToastContainerProps } from './types';
2
2
  export declare const ToastContainer: (props: ToastContainerProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare const TOAST_KEY_COMPONENT = "M4LToastContainer";
2
+ export declare const DEFAULT_CLOSE_TIME = 30000;
3
+ export declare const ICONS_PATH = "frontend/components/toast/assets/icons";
@@ -0,0 +1,4 @@
1
+ import { ToastOptions } from 'react-toastify';
2
+ import { Toaster } from '@m4l/core';
3
+ declare function createToaster(containerId: ToastOptions['containerId']): Toaster;
4
+ export default createToaster;
@@ -0,0 +1,9 @@
1
+ export declare const ICONS: {
2
+ readonly SUCCESS: "success.svg";
3
+ readonly INFO: "info.svg";
4
+ readonly WARNING: "warning.svg";
5
+ readonly ERROR: "error.svg";
6
+ readonly DEFAULT: "info.svg";
7
+ readonly CLOSE: "close.svg";
8
+ readonly PIN: "pin.svg";
9
+ };
@@ -0,0 +1,191 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { ToastContainer as ToastContainer$1, toast } from "react-toastify";
3
+ import { a as getPropDataTestId } from "../../test/getNameDataTestId.0faeade8.js";
4
+ import "react-toastify/dist/ReactToastify.min.css";
5
+ import { useState } from "react";
6
+ import { useEnvironment } from "@m4l/core";
7
+ import { styled } from "@mui/material/styles";
8
+ import { a3 as toastStyles } from "../../styles/index.db9e7ddb.js";
9
+ import { I as Icon } from "../Icon/index.c06685f4.js";
10
+ var ToastContainerSlots = /* @__PURE__ */ ((ToastContainerSlots2) => {
11
+ ToastContainerSlots2["root"] = "root";
12
+ ToastContainerSlots2["messageRoot"] = "messageRoot";
13
+ ToastContainerSlots2["messageHeader"] = "messageHeader";
14
+ ToastContainerSlots2["messageIconRoot"] = "messageIconRoot";
15
+ ToastContainerSlots2["messageIcon"] = "messageIcon";
16
+ ToastContainerSlots2["messageTitle"] = "messageTitle";
17
+ ToastContainerSlots2["messageDescription"] = "messageDescription";
18
+ ToastContainerSlots2["messageCloseButton"] = "messageCloseButton";
19
+ ToastContainerSlots2["messageCloseButtonIcon"] = "messageCloseButtonIcon";
20
+ ToastContainerSlots2["messagePinButton"] = "messagePinButton";
21
+ ToastContainerSlots2["messagePinButtonIcon"] = "messagePinButtonIcon";
22
+ return ToastContainerSlots2;
23
+ })(ToastContainerSlots || {});
24
+ const TOAST_KEY_COMPONENT = "M4LToastContainer";
25
+ const DEFAULT_CLOSE_TIME = 3e4;
26
+ const ICONS_PATH = "frontend/components/toast/assets/icons";
27
+ const RootStyled = styled("div", {
28
+ name: TOAST_KEY_COMPONENT,
29
+ slot: ToastContainerSlots.root
30
+ })(toastStyles?.root);
31
+ const MessageRootStyled = styled("div", {
32
+ name: TOAST_KEY_COMPONENT,
33
+ slot: ToastContainerSlots.messageRoot
34
+ })(toastStyles?.messageRoot);
35
+ const MessageHeaderStyled = styled("div", {
36
+ name: TOAST_KEY_COMPONENT,
37
+ slot: ToastContainerSlots.messageHeader
38
+ })(toastStyles?.messageHeader);
39
+ const MessageIconRootStyled = styled("div", {
40
+ name: TOAST_KEY_COMPONENT,
41
+ slot: ToastContainerSlots.messageIconRoot
42
+ })(toastStyles?.messageIconRoot);
43
+ const MessageIconStyled = styled(Icon, {
44
+ name: TOAST_KEY_COMPONENT,
45
+ slot: ToastContainerSlots.messageIcon
46
+ })(toastStyles?.messageIcon);
47
+ const MessageTitleStyled = styled("strong", {
48
+ name: TOAST_KEY_COMPONENT,
49
+ slot: ToastContainerSlots.messageTitle
50
+ })(toastStyles?.messageTitle);
51
+ const MessageDescriptionStyled = styled("p", {
52
+ name: TOAST_KEY_COMPONENT,
53
+ slot: ToastContainerSlots.messageDescription
54
+ })(toastStyles?.messageDescription);
55
+ const MessageCloseButtonStyled = styled("button", {
56
+ name: TOAST_KEY_COMPONENT,
57
+ slot: ToastContainerSlots.messageCloseButton
58
+ })(toastStyles?.messageCloseButton);
59
+ const MessageCloseButtonIconStyled = styled(Icon, {
60
+ name: TOAST_KEY_COMPONENT,
61
+ slot: ToastContainerSlots.messageCloseButtonIcon
62
+ })(toastStyles?.messageCloseButtonIcon);
63
+ const MessagePinButtonStyled = styled("button", {
64
+ name: TOAST_KEY_COMPONENT,
65
+ slot: ToastContainerSlots.messagePinButton
66
+ })(toastStyles?.messagePinButton);
67
+ const MessagePinButtonIconStyled = styled(Icon, {
68
+ name: TOAST_KEY_COMPONENT,
69
+ slot: ToastContainerSlots.messagePinButtonIcon
70
+ })(toastStyles?.messagePinButtonIcon);
71
+ const ToastContainer = (props) => {
72
+ const { children, fixed = true, dataTestId, ...restProps } = props;
73
+ const ownerState = { fixed };
74
+ return /* @__PURE__ */ jsxs(
75
+ RootStyled,
76
+ {
77
+ ownerState,
78
+ ...getPropDataTestId(dataTestId, ToastContainerSlots.root),
79
+ children: [
80
+ /* @__PURE__ */ jsx(
81
+ ToastContainer$1,
82
+ {
83
+ stacked: true,
84
+ icon: false,
85
+ closeButton: false,
86
+ autoClose: DEFAULT_CLOSE_TIME,
87
+ theme: "light",
88
+ ...restProps
89
+ }
90
+ ),
91
+ children
92
+ ]
93
+ }
94
+ );
95
+ };
96
+ const ICONS = {
97
+ SUCCESS: "success.svg",
98
+ INFO: "info.svg",
99
+ WARNING: "warning.svg",
100
+ ERROR: "error.svg",
101
+ DEFAULT: "info.svg",
102
+ CLOSE: "close.svg",
103
+ PIN: "pin.svg"
104
+ };
105
+ const iconTypes = {
106
+ default: ICONS.DEFAULT,
107
+ info: ICONS.INFO,
108
+ success: ICONS.SUCCESS,
109
+ warning: ICONS.WARNING,
110
+ error: ICONS.ERROR
111
+ };
112
+ const ToastMessage = (props) => {
113
+ const [isPinned, setIsPinned] = useState(false);
114
+ const { type, title, description, closeToast, toastId, containerId } = props;
115
+ const ownerState = { type };
116
+ const { host_static_assets, environment_assets } = useEnvironment();
117
+ const iconToShow = iconTypes?.[type || "default"] || iconTypes.default;
118
+ const iconTypePath = `${host_static_assets}/${environment_assets}/${ICONS_PATH}/${iconToShow}`;
119
+ const iconClosePath = `${host_static_assets}/${environment_assets}/${ICONS_PATH}/${ICONS.CLOSE}`;
120
+ const iconPinPath = `${host_static_assets}/${environment_assets}/${ICONS_PATH}/${ICONS.PIN}`;
121
+ function pinToast() {
122
+ if (toastId) {
123
+ toast.update(toastId, { containerId, autoClose: false, closeOnClick: false });
124
+ setIsPinned(true);
125
+ }
126
+ }
127
+ return /* @__PURE__ */ jsxs(MessageRootStyled, { ownerState, children: [
128
+ /* @__PURE__ */ jsxs(MessageHeaderStyled, { ownerState, children: [
129
+ /* @__PURE__ */ jsx(MessageIconRootStyled, { ownerState, children: /* @__PURE__ */ jsx(MessageIconStyled, { src: iconTypePath, ownerState }) }),
130
+ /* @__PURE__ */ jsx(MessageTitleStyled, { ownerState, children: title }),
131
+ !isPinned && /* @__PURE__ */ jsx(
132
+ MessagePinButtonStyled,
133
+ {
134
+ onClick: pinToast,
135
+ ownerState,
136
+ "aria-describedby": `${TOAST_KEY_COMPONENT}-pin`,
137
+ children: /* @__PURE__ */ jsx(MessagePinButtonIconStyled, { src: iconPinPath, size: "small", ownerState })
138
+ }
139
+ ),
140
+ /* @__PURE__ */ jsx(
141
+ MessageCloseButtonStyled,
142
+ {
143
+ onClick: closeToast,
144
+ ownerState,
145
+ "aria-describedby": `${TOAST_KEY_COMPONENT}-close`,
146
+ children: /* @__PURE__ */ jsx(MessageCloseButtonIconStyled, { src: iconClosePath, size: "small", ownerState })
147
+ }
148
+ )
149
+ ] }),
150
+ description && /* @__PURE__ */ jsx(MessageDescriptionStyled, { ownerState, children: description })
151
+ ] });
152
+ };
153
+ function optionsToProps(toastProps, containerId) {
154
+ return {
155
+ containerId,
156
+ type: toastProps?.type,
157
+ toastId: toastProps?.toastId,
158
+ autoClose: toastProps?.autoClose
159
+ };
160
+ }
161
+ function triggerToast({ props, toastOptions, containerId, type = "default" }) {
162
+ const currentContainerId = containerId || toastOptions?.containerId;
163
+ const allProps = { ...props, ...optionsToProps(toastOptions, currentContainerId) };
164
+ const toastFn = type === "default" || type === void 0 ? toast : toast[type];
165
+ const id = toastFn(/* @__PURE__ */ jsx(ToastMessage, { ...allProps }), {
166
+ ...toastOptions,
167
+ containerId: currentContainerId
168
+ });
169
+ if (!toastOptions?.toastId) {
170
+ toast.update(id, {
171
+ containerId: currentContainerId,
172
+ render: /* @__PURE__ */ jsx(ToastMessage, { ...allProps, toastId: id })
173
+ });
174
+ }
175
+ return toastOptions?.toastId || id;
176
+ }
177
+ function createToaster(containerId) {
178
+ const toaster = (props, toastOptions = {}) => {
179
+ return triggerToast({ props, toastOptions, containerId });
180
+ };
181
+ toaster.success = (props, toastOptions = {}) => triggerToast({ props, toastOptions, type: "success", containerId });
182
+ toaster.info = (props, toastOptions = {}) => triggerToast({ props, toastOptions, type: "info", containerId });
183
+ toaster.warning = (props, toastOptions = {}) => triggerToast({ props, toastOptions, type: "warning", containerId });
184
+ toaster.error = (props, toastOptions = {}) => triggerToast({ props, toastOptions, type: "error", containerId });
185
+ return toaster;
186
+ }
187
+ export {
188
+ ToastContainer as T,
189
+ ToastMessage as a,
190
+ createToaster as c
191
+ };
@@ -1,2 +1,3 @@
1
1
  export { ToastContainer } from './ToastContainer';
2
+ export { default as createToaster } from './helpers/toaster';
2
3
  export { ToastMessage } from './subcomponents/ToastMessage';
@@ -0,0 +1,13 @@
1
+ export declare enum ToastContainerSlots {
2
+ root = "root",
3
+ messageRoot = "messageRoot",
4
+ messageHeader = "messageHeader",
5
+ messageIconRoot = "messageIconRoot",
6
+ messageIcon = "messageIcon",
7
+ messageTitle = "messageTitle",
8
+ messageDescription = "messageDescription",
9
+ messageCloseButton = "messageCloseButton",
10
+ messageCloseButtonIcon = "messageCloseButtonIcon",
11
+ messagePinButton = "messagePinButton",
12
+ messagePinButtonIcon = "messagePinButtonIcon"
13
+ }
@@ -0,0 +1,2 @@
1
+ export * from './toastContainerSlots';
2
+ export { ToastContainerSlots } from './ToastContainerEnum';
@@ -0,0 +1,34 @@
1
+ /// <reference types="react" />
2
+ export declare const RootStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Partial<import("../types").ToastContainerProps> & Record<string, unknown> & {
3
+ ownerState: Partial<import("../types").ToastContainerProps> & Record<string, unknown>;
4
+ }, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement>>, {}>;
5
+ export declare const MessageRootStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Partial<import("../types").ToastContainerProps> & Record<string, unknown> & {
6
+ ownerState: Partial<import("../types").ToastContainerProps> & Record<string, unknown>;
7
+ }, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement>>, {}>;
8
+ export declare const MessageHeaderStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Partial<import("../types").ToastContainerProps> & Record<string, unknown> & {
9
+ ownerState: Partial<import("../types").ToastContainerProps> & Record<string, unknown>;
10
+ }, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement>>, {}>;
11
+ export declare const MessageIconRootStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Partial<import("../types").ToastContainerProps> & Record<string, unknown> & {
12
+ ownerState: Partial<import("../types").ToastContainerProps> & Record<string, unknown>;
13
+ }, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement>>, {}>;
14
+ export declare const MessageIconStyled: import("@emotion/styled").StyledComponent<Pick<import("../../Icon").IconProps, keyof import("../../Icon").IconProps> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Partial<import("../types").ToastContainerProps> & Record<string, unknown> & {
15
+ ownerState: Partial<import("../types").ToastContainerProps> & Record<string, unknown>;
16
+ }, {}, {}>;
17
+ export declare const MessageTitleStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Partial<import("../types").ToastContainerProps> & Record<string, unknown> & {
18
+ ownerState: Partial<import("../types").ToastContainerProps> & Record<string, unknown>;
19
+ }, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, keyof import("react").ClassAttributes<HTMLElement> | keyof import("react").HTMLAttributes<HTMLElement>>, {}>;
20
+ export declare const MessageDescriptionStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Partial<import("../types").ToastContainerProps> & Record<string, unknown> & {
21
+ ownerState: Partial<import("../types").ToastContainerProps> & Record<string, unknown>;
22
+ }, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, keyof import("react").ClassAttributes<HTMLParagraphElement> | keyof import("react").HTMLAttributes<HTMLParagraphElement>>, {}>;
23
+ export declare const MessageCloseButtonStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Partial<import("../types").ToastContainerProps> & Record<string, unknown> & {
24
+ ownerState: Partial<import("../types").ToastContainerProps> & Record<string, unknown>;
25
+ }, Pick<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, keyof import("react").ClassAttributes<HTMLButtonElement> | keyof import("react").ButtonHTMLAttributes<HTMLButtonElement>>, {}>;
26
+ export declare const MessageCloseButtonIconStyled: import("@emotion/styled").StyledComponent<Pick<import("../../Icon").IconProps, keyof import("../../Icon").IconProps> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Partial<import("../types").ToastContainerProps> & Record<string, unknown> & {
27
+ ownerState: Partial<import("../types").ToastContainerProps> & Record<string, unknown>;
28
+ }, {}, {}>;
29
+ export declare const MessagePinButtonStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Partial<import("../types").ToastContainerProps> & Record<string, unknown> & {
30
+ ownerState: Partial<import("../types").ToastContainerProps> & Record<string, unknown>;
31
+ }, Pick<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, keyof import("react").ClassAttributes<HTMLButtonElement> | keyof import("react").ButtonHTMLAttributes<HTMLButtonElement>>, {}>;
32
+ export declare const MessagePinButtonIconStyled: import("@emotion/styled").StyledComponent<Pick<import("../../Icon").IconProps, keyof import("../../Icon").IconProps> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Partial<import("../types").ToastContainerProps> & Record<string, unknown> & {
33
+ ownerState: Partial<import("../types").ToastContainerProps> & Record<string, unknown>;
34
+ }, {}, {}>;
@@ -0,0 +1,2 @@
1
+ import { ToastMessageProps } from '../../types';
2
+ export declare const ToastMessage: (props: ToastMessageProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1 @@
1
- import { ToastMessageProps } from './types';
2
- export declare const ToastMessage: (props: ToastMessageProps) => import("react/jsx-runtime").JSX.Element;
1
+ export { ToastMessage } from './ToastMessage';
@@ -1,4 +1,40 @@
1
- import { ReactNode } from 'react';
2
- export interface ToastContainerProps {
3
- children: ReactNode;
1
+ import type { ReactNode } from 'react';
2
+ import { ToastContentProps, ToastContainerProps as ToastContainerReactToastifyProps, ToastOptions } from 'react-toastify';
3
+ import { OverridesStyleRules } from '@mui/material/styles/overrides';
4
+ import { Theme } from '@mui/material/styles';
5
+ import { ToasterFunctionProps } from '@m4l/core';
6
+ import type { ToastContainerSlots } from './slots';
7
+ import { TOAST_KEY_COMPONENT } from './constants';
8
+ export declare type ToastTypes = 'info' | 'success' | 'warning' | 'error' | 'default';
9
+ export interface ToastMessageProps extends Partial<ToastContentProps>, ToasterFunctionProps {
10
+ type?: ToastTypes;
11
+ toastId?: ToastOptions['toastId'];
12
+ containerId?: ToastOptions['containerId'];
13
+ autoClose?: ToastOptions['autoClose'];
4
14
  }
15
+ export interface ToastContainerProps extends Omit<ToastContainerReactToastifyProps, 'containerId'> {
16
+ /**
17
+ * Se utiliza para identificar el `<ToastContainer />` cuando se trabaja con varios contenedores.
18
+ * También se utiliza para establecer el atributo `id`
19
+ */
20
+ containerId: Required<ToastOptions['containerId']>;
21
+ /**
22
+ * Cuando es `true` el mensaje sale con position `fixed`, útil para usar a nivel general de toda la aplicación.
23
+ * Cuando es `false` el mensaje sale con position `sticky`, útil para usar a nivel de ventana
24
+ *
25
+ * @default true
26
+ */
27
+ fixed?: boolean;
28
+ /** Key único para las pruebas del componente. */
29
+ dataTestId?: string;
30
+ children?: ReactNode;
31
+ }
32
+ export interface TriggerToast {
33
+ props: ToasterFunctionProps;
34
+ toastOptions: ToastOptions;
35
+ containerId: ToastOptions['containerId'];
36
+ type?: ToastOptions['type'];
37
+ }
38
+ export declare type ToastContainerOwnerState = ToastContainerProps;
39
+ export declare type ToastContainerSlotsType = keyof typeof ToastContainerSlots;
40
+ export declare type ToastContainerStyles = Partial<OverridesStyleRules<ToastContainerSlotsType, typeof TOAST_KEY_COMPONENT, Theme> | undefined> | undefined;
@@ -2,7 +2,7 @@ import { jsx, Fragment, jsxs } from "react/jsx-runtime";
2
2
  import { m } from "framer-motion";
3
3
  import { alpha } from "@mui/material/styles";
4
4
  import { Box } from "@mui/material";
5
- import { a4 as RootStyle } from "../../../styles/index.ccd8acc4.js";
5
+ import { a4 as RootStyle } from "../../../styles/index.db9e7ddb.js";
6
6
  function LoadingScreen(props) {
7
7
  const { isDashboard, variant = "fullpage", ...other } = props;
8
8
  return /* @__PURE__ */ jsx(Fragment, { children: !isDashboard && /* @__PURE__ */ jsxs(RootStyle, { variant, ...other, children: [
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { m } from "framer-motion";
3
3
  import { forwardRef, useRef } from "react";
4
4
  import { IconButton, Box } from "@mui/material";
5
- import { a5 as AnimatedScrollRoot } from "../../styles/index.ccd8acc4.js";
5
+ import { a5 as AnimatedScrollRoot } from "../../styles/index.db9e7ddb.js";
6
6
  const varSmall = {
7
7
  hover: { scale: 1.1 },
8
8
  tap: { scale: 0.95 }
@@ -1,31 +1,31 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
- import { u as useAreasStore } from "../../hooks/useAreas/index.ba948f80.js";
2
+ import { u as useAreasStore } from "../../hooks/useAreas/index.5a57ab76.js";
3
3
  import { useEnvironment, useModuleDictionary } from "@m4l/core";
4
4
  import { useState, useRef, useMemo } from "react";
5
5
  import * as Yup from "yup";
6
6
  import clsx from "clsx";
7
7
  import { generateUtilityClasses, useTheme } from "@mui/material";
8
8
  import { unstable_composeClasses } from "@mui/base";
9
- import { g as getComponentUtilityClass } from "../../../../utils/index.ebfbb70f.js";
9
+ import { g as getComponentUtilityClass } from "../../../../utils/index.f77cc2ab.js";
10
10
  import { A as AREAS_ADMIN_CLASS_NAME } from "../../constants.66529246.js";
11
- import { I as ICONS } from "../../icons.8266ccc8.js";
11
+ import { I as ICONS } from "../../icons.01fa3bcc.js";
12
12
  import { g as getAreasDictionary, D as DICCTIONARY } from "../../dictionary.08cfc4c9.js";
13
- import { a6 as EditAreaHeader, a7 as AreasAdminRoot } from "../../../../styles/index.ccd8acc4.js";
13
+ import { a6 as EditAreaHeader, a7 as AreasAdminRoot } from "../../../../styles/index.db9e7ddb.js";
14
14
  import { useResponsiveDesktop } from "@m4l/graphics";
15
15
  import { shallow } from "zustand/shallow";
16
- import { M as MenuActions } from "../../../mui_extended/MenuActions/index.c24bd476.js";
17
- import { R as RHFormProvider } from "../../../../contexts/RHFormContext/index.acc30d9b.js";
18
- import { R as RHFTextField } from "../../../hook-form/RHFTextField/index.5b124af3.js";
19
- import { A as Actions } from "../../../CommonActions/components/Actions/index.ea4c273b.js";
20
- import { A as ActionCancel } from "../../../CommonActions/components/ActionCancel/index.c1185f46.js";
21
- import { A as ActionIntro } from "../../../CommonActions/components/ActionIntro/index.185199da.js";
22
- import { I as IconButton } from "../../../mui_extended/IconButton/index.caf17392.js";
23
- import { P as Popover } from "../../../mui_extended/Popover/index.1fafd106.js";
24
- import { T as Typography } from "../../../mui_extended/Typography/index.61dd3fc6.js";
25
- import { S as ScrollBar } from "../../../ScrollBar/index.45b8db89.js";
16
+ import { M as MenuActions } from "../../../mui_extended/MenuActions/index.11d777bb.js";
17
+ import { R as RHFormProvider } from "../../../../contexts/RHFormContext/index.f9d41b99.js";
18
+ import { R as RHFTextField } from "../../../hook-form/RHFTextField/index.80b98b98.js";
19
+ import { A as Actions } from "../../../CommonActions/components/Actions/index.f674be30.js";
20
+ import { A as ActionCancel } from "../../../CommonActions/components/ActionCancel/index.e67885bc.js";
21
+ import { A as ActionIntro } from "../../../CommonActions/components/ActionIntro/index.e58eb0c4.js";
22
+ import { I as IconButton } from "../../../mui_extended/IconButton/index.7b6c1ee3.js";
23
+ import { P as Popover } from "../../../mui_extended/Popover/index.a7da93f1.js";
24
+ import { T as Typography } from "../../../mui_extended/Typography/index.8c0801e4.js";
25
+ import { S as ScrollBar } from "../../../ScrollBar/index.11feff65.js";
26
26
  import TouchRipple from "@mui/material/ButtonBase/TouchRipple";
27
- import { B as Button } from "../../../mui_extended/Button/index.ca15c36e.js";
28
- import { I as Icon } from "../../../Icon/index.0f315ccd.js";
27
+ import { B as Button } from "../../../mui_extended/Button/index.3d14e3e9.js";
28
+ import { I as Icon } from "../../../Icon/index.c06685f4.js";
29
29
  import { u as useOnClickOutside } from "../../index.4cc6a221.js";
30
30
  const areasAdminClasses = generateUtilityClasses(
31
31
  AREAS_ADMIN_CLASS_NAME,
@@ -1,5 +1,5 @@
1
1
  import { AreasViewerClasses } from './types';
2
2
  import { OwnerState } from '../../../contexts/AreasContext/types';
3
3
  export declare const areasViewerClasses: AreasViewerClasses;
4
- export declare const useAreasViewerUtilityClasses: (ownerState: OwnerState) => Record<"root" | "resizeHandle" | "windowLinearProgressBar" | "windowContent" | "areaRoot" | "areasLoadingErrorRoot" | "areasLoadingErrorLoading" | "areasLoadingError" | "areasLoadingErrorIcon" | "areasLoadingErrorTitle" | "areasLoadingErrorDescription" | "areasLoadingErrorDivider" | "areaGridLayoutPanelContainer" | "areaGridLayout" | "areaGridLayoutPopupsContainer" | "areasWindowPopUpList" | "windowRoot" | "windowRootContainer" | "windowHeader" | "windowHeaderTitle" | "windowHeaderMainActions" | "windowHeaderCancelHandle" | "windowLinearProgressRoot" | "windowPopupRoot" | "windowModalRoot" | "selectedWindow" | "windowToastiesContainer" | "windowToastiesContainerTostys" | "windowToastyMeesageButtonsContainer" | "windowToastyMessage" | "windowToastyButtonsContainer" | "windowToastyPin" | "windowToastyClose" | "panelWindowsRoot" | "panelWindowsButtonContainer" | "panelWindowsSeparator" | "loaderContainer" | "containerComponent" | "windowToastyContainer", string>;
4
+ export declare const useAreasViewerUtilityClasses: (ownerState: OwnerState) => Record<"root" | "resizeHandle" | "windowLinearProgressBar" | "windowContent" | "areaRoot" | "areasLoadingErrorRoot" | "areasLoadingErrorLoading" | "areasLoadingError" | "areasLoadingErrorIcon" | "areasLoadingErrorTitle" | "areasLoadingErrorDescription" | "areasLoadingErrorDivider" | "areaGridLayoutPanelContainer" | "areaGridLayout" | "areaGridLayoutPopupsContainer" | "areasWindowPopUpList" | "windowRoot" | "windowRootContainer" | "windowHeader" | "windowHeaderTitle" | "windowHeaderMainActions" | "windowHeaderCancelHandle" | "windowLinearProgressRoot" | "windowPopupRoot" | "windowModalRoot" | "selectedWindow" | "panelWindowsRoot" | "panelWindowsButtonContainer" | "panelWindowsSeparator" | "loaderContainer" | "containerComponent", string>;
5
5
  export declare type ViwerClasses = ReturnType<typeof useAreasViewerUtilityClasses>;
@@ -17,14 +17,6 @@ export interface AreasViewerClasses {
17
17
  windowLinearProgressBar: string;
18
18
  windowPopupRoot: string;
19
19
  windowModalRoot: string;
20
- windowToastiesContainer: string;
21
- windowToastiesContainerTostys: string;
22
- windowToastyContainer: string;
23
- windowToastyMeesageButtonsContainer: string;
24
- windowToastyMessage: string;
25
- windowToastyButtonsContainer: string;
26
- windowToastyPin: string;
27
- windowToastyClose: string;
28
20
  panelWindowsRoot: string;
29
21
  panelWindowsButtonContainer: string;
30
22
  panelWindowsSeparator: string;
@@ -1,35 +1,35 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
- import { a8 as WindowRoot, a9 as WrapperWindowModal, aa as AreasViewerRoot } from "../../../../styles/index.ccd8acc4.js";
2
+ import { a8 as WindowRoot, a9 as WrapperWindowModal, aa as AreasViewerRoot } from "../../../../styles/index.db9e7ddb.js";
3
3
  import { shallow } from "zustand/shallow";
4
4
  import React__default, { useMemo, useEffect } from "react";
5
5
  import clsx from "clsx";
6
- import { u as useAreasStore } from "../../hooks/useAreas/index.ba948f80.js";
6
+ import { u as useAreasStore } from "../../hooks/useAreas/index.5a57ab76.js";
7
7
  import { generateUtilityClasses, Skeleton } from "@mui/material";
8
8
  import { unstable_composeClasses } from "@mui/base";
9
- import { g as getComponentUtilityClass } from "../../../../utils/index.ebfbb70f.js";
9
+ import { g as getComponentUtilityClass } from "../../../../utils/index.f77cc2ab.js";
10
10
  import { a as AREAS_VIEWER_CLASS_NAME } from "../../constants.66529246.js";
11
11
  import { useModuleDictionary, useEnvironment, useModuleSkeleton } from "@m4l/core";
12
- import { a as MemonizedMenuActions } from "../../../mui_extended/MenuActions/index.c24bd476.js";
12
+ import { a as MemonizedMenuActions } from "../../../mui_extended/MenuActions/index.11d777bb.js";
13
13
  import { useResponsiveDesktop } from "@m4l/graphics";
14
- import { I as ICONS } from "../../icons.8266ccc8.js";
14
+ import { I as ICONS } from "../../icons.01fa3bcc.js";
15
15
  import { g as getAreasDictionary, D as DICCTIONARY } from "../../dictionary.08cfc4c9.js";
16
- import { I as IconButton } from "../../../mui_extended/IconButton/index.caf17392.js";
17
- import { L as LinearProgressIndeterminate } from "../../../LinearProgressIndeterminate/index.6d1605ff.js";
18
- import { I as Icon } from "../../../Icon/index.0f315ccd.js";
19
- import { T as Typography } from "../../../mui_extended/Typography/index.61dd3fc6.js";
20
- import { M as MFLoader } from "../../../MFLoader/index.cc350d72.js";
16
+ import { I as IconButton } from "../../../mui_extended/IconButton/index.7b6c1ee3.js";
17
+ import { L as LinearProgressIndeterminate } from "../../../LinearProgressIndeterminate/index.ca78fd37.js";
18
+ import { I as Icon } from "../../../Icon/index.c06685f4.js";
19
+ import { T as Typography } from "../../../mui_extended/Typography/index.8c0801e4.js";
20
+ import { M as MFLoader } from "../../../MFLoader/index.6af7729c.js";
21
21
  import { W as WindowToolsMFProvider } from "../../contexts/WindowToolsMFContext/index.992ae7a3.js";
22
22
  import { D as DynamicMFParmsProvider } from "../../contexts/DynamicMFParmsContext/index.3d9ad0ad.js";
23
- import { L as LinearProgress } from "../../../mui_extended/LinearProgress/index.4092bb69.js";
24
23
  import { T as TEST_PROP_ID } from "../../../../test/constants_no_mock.86c553a9.js";
25
24
  import { g as getNameDataTestId } from "../../../../test/getNameDataTestId.0faeade8.js";
26
- import { R as RESPONSIVE_COLAPSED_HEIGHTS, a as RESPONSIVE_ROW_HEIGHTS, M as MARGIN_GRIDLAYOUT, P as PADDING_GRIDLAYOUT } from "../../contexts/AreasContext/index.1a5c5df1.js";
27
- import { w as withSizeProvider } from "../../../GridLayout/subcomponents/SizeProvider/index.15d0ca85.js";
28
- import { R as Responsive } from "../../../GridLayout/subcomponents/Responsive/index.dc0a1ce0.js";
25
+ import { c as createToaster, T as ToastContainer } from "../../../ToastContainer/index.c1657bde.js";
26
+ import { R as RESPONSIVE_COLAPSED_HEIGHTS, a as RESPONSIVE_ROW_HEIGHTS, M as MARGIN_GRIDLAYOUT, P as PADDING_GRIDLAYOUT } from "../../contexts/AreasContext/index.9edd84c3.js";
27
+ import { w as withSizeProvider } from "../../../GridLayout/subcomponents/SizeProvider/index.2f762118.js";
28
+ import { R as Responsive } from "../../../GridLayout/subcomponents/Responsive/index.24857a52.js";
29
29
  import { useLocation } from "react-router-dom";
30
- import { L as LoadingError } from "../../../LoadingError/index.c5a70390.js";
31
- import { c as cjs } from "../../../../react-draggable.df62ccbd.js";
32
- import { R as ResizeableWindow } from "../../../Resizeable/index.0ffd46bc.js";
30
+ import { L as LoadingError } from "../../../LoadingError/index.765ff885.js";
31
+ import { c as cjs } from "../../../../react-draggable.079122b0.js";
32
+ import { R as ResizeableWindow } from "../../../Resizeable/index.df2f3bb8.js";
33
33
  const areasViewerClasses = generateUtilityClasses(
34
34
  AREAS_VIEWER_CLASS_NAME,
35
35
  [
@@ -51,14 +51,6 @@ const areasViewerClasses = generateUtilityClasses(
51
51
  "windowLinearProgressRoot",
52
52
  "windowLinearProgressBar",
53
53
  "windowRootContainer",
54
- "windowToastiesContainer",
55
- "windowToastiesContainerTostys",
56
- "windowToastyContainer",
57
- "windowToastyMeesageButtonsContainer",
58
- "windowToastyMessage",
59
- "windowToastyButtonsContainer",
60
- "windowToastyPin",
61
- "windowToastyClose",
62
54
  "panelWindowsRoot",
63
55
  "panelWindowsButtonContainer",
64
56
  "panelWindowsSeparator",
@@ -111,14 +103,6 @@ const useAreasViewerUtilityClasses = (ownerState) => {
111
103
  windowPopupRoot: ["windowPopupRoot"],
112
104
  windowModalRoot: ["windowModalRoot"],
113
105
  selectedWindow: ["selectedWindow"],
114
- windowToastiesContainer: ["windowToastiesContainer"],
115
- windowToastiesContainerTostys: ["windowToastiesContainerTostys"],
116
- windowToastyContainer: ["windowToastiesContainer"],
117
- windowToastyMeesageButtonsContainer: ["windowToastyMeesageButtonsContainer"],
118
- windowToastyMessage: ["windowToastyMessage"],
119
- windowToastyButtonsContainer: ["windowToastyButtonsContainer"],
120
- windowToastyPin: ["windowToastyPin"],
121
- windowToastyClose: ["windowToastyClose"],
122
106
  panelWindowsRoot: ["panelWindowsRoot"],
123
107
  panelWindowsButtonContainer: ["panelWindowsButtonContainer"],
124
108
  panelWindowsSeparator: ["panelWindowsSeparator"],
@@ -405,65 +389,6 @@ const Component = (props) => {
405
389
  return /* @__PURE__ */ jsx(WindowToolsMFProvider, { ...windowTools, children: /* @__PURE__ */ jsx(DynamicMFParmsProvider, { store: dynamicMFStore, children: /* @__PURE__ */ jsx("div", { className: areasViewerClasses.containerComponent, children: typeof component === "function" ? component({ windowTools, dynamicMFStore }) : component }) }) });
406
390
  };
407
391
  React__default.memo(Component);
408
- function Toasty(props) {
409
- const { windowId, toastyId } = props;
410
- const toasty = useAreasStore(
411
- (state) => state.hashWindows[windowId].hashToasties[toastyId],
412
- shallow
413
- );
414
- const { pinToast: pinToasty, closeToast: closeToasty } = useAreasStore(
415
- (state) => state.windowActions,
416
- shallow
417
- );
418
- const { host_static_assets, environment_assets } = useEnvironment();
419
- return /* @__PURE__ */ jsx(
420
- "div",
421
- {
422
- className: clsx(areasViewerClasses.windowToastyContainer, areasViewerClasses[toasty.type]),
423
- children: /* @__PURE__ */ jsxs("div", { className: areasViewerClasses.windowToastyMeesageButtonsContainer, children: [
424
- /* @__PURE__ */ jsxs("div", { className: areasViewerClasses.windowToastyMessage, children: [
425
- toasty.timer ? /* @__PURE__ */ jsx(LinearProgress, { variant: "determinate", value: toasty.percentExecuted }) : null,
426
- toasty.message
427
- ] }),
428
- /* @__PURE__ */ jsxs("div", { className: areasViewerClasses.windowToastyButtonsContainer, children: [
429
- /* @__PURE__ */ jsx(
430
- IconButton,
431
- {
432
- className: clsx(
433
- areasViewerClasses.windowToastyPin,
434
- toasty.timer ? null : areasViewerClasses.pinIn
435
- ),
436
- onClick: () => {
437
- pinToasty(windowId, toastyId);
438
- },
439
- src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.TOASTY_PIN}`
440
- }
441
- ),
442
- /* @__PURE__ */ jsx(
443
- IconButton,
444
- {
445
- className: areasViewerClasses.windowToastyClose,
446
- onClick: () => {
447
- closeToasty(windowId, toastyId);
448
- },
449
- src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.TOASTY_CLOSE}`
450
- }
451
- )
452
- ] })
453
- ] })
454
- }
455
- );
456
- }
457
- function Toasties(props) {
458
- const { windowId } = props;
459
- const tosties = useAreasStore((state) => state.hashWindows[windowId].toasties, shallow);
460
- if (tosties.length === 0) {
461
- return null;
462
- }
463
- return /* @__PURE__ */ jsx("div", { className: areasViewerClasses.windowToastiesContainer, children: /* @__PURE__ */ jsx("div", { className: areasViewerClasses.windowToastiesContainerTostys, children: tosties.map((t) => {
464
- return /* @__PURE__ */ jsx(Toasty, { windowId, toastyId: t.id }, t.id);
465
- }) }) });
466
- }
467
392
  const Window = (props) => {
468
393
  const { areaId, windowId } = props;
469
394
  const [emergeType, moduleId, winType] = useAreasStore((state) => {
@@ -495,7 +420,6 @@ const Window = (props) => {
495
420
  close,
496
421
  startProgress,
497
422
  stopProgress,
498
- toast,
499
423
  setFnQueryClose
500
424
  } = useAreasStore((state) => state.windowActions, shallow);
501
425
  const { selectLayout } = useAreasStore((state) => state.areaActions, shallow);
@@ -522,9 +446,7 @@ const Window = (props) => {
522
446
  setFnQueryClose: (fnQueryClose) => {
523
447
  setFnQueryClose(windowId, fnQueryClose);
524
448
  },
525
- toast: (toastyOptions) => {
526
- toast(windowId, toastyOptions);
527
- }
449
+ toast: createToaster(windowId)
528
450
  }),
529
451
  []
530
452
  );
@@ -557,7 +479,7 @@ const Window = (props) => {
557
479
  } : {},
558
480
  children: /* @__PURE__ */ jsxs("div", { className: areasViewerClasses.windowRootContainer, children: [
559
481
  /* @__PURE__ */ jsx(Header, { areaId, windowId, emergeType }),
560
- /* @__PURE__ */ jsx(Toasties, { windowId }),
482
+ /* @__PURE__ */ jsx(ToastContainer, { fixed: false, position: "top-center", containerId: windowId }),
561
483
  /* @__PURE__ */ jsxs(
562
484
  "div",
563
485
  {