@m4l/components 9.1.93 → 9.1.95

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 (107) hide show
  1. package/@types/types.d.ts +44 -35
  2. package/components/Chip/Chip.d.ts +2 -2
  3. package/components/Chip/ChipStyles.js +10 -10
  4. package/components/Chip/index.js +1 -0
  5. package/components/Chip/types.d.ts +3 -2
  6. package/components/Chip/types.js +1 -0
  7. package/components/Color/types.d.ts +8 -0
  8. package/components/CommonActions/components/ActionFormIntro/index.d.ts +2 -2
  9. package/components/DataGrid/dictionary.d.ts +1 -1
  10. package/components/DataGrid/subcomponents/Actions/index.d.ts +1 -1
  11. package/components/DataGrid/subcomponents/Actions/subcomponents/Density/index.d.ts +1 -1
  12. package/components/DataGrid/subcomponents/Actions/subcomponents/MobileMenuActions/index.d.ts +1 -1
  13. package/components/MenuActions/MenuActions.d.ts +1 -1
  14. package/components/MenuActions/MenuActions.js +2 -1
  15. package/components/MenuActions/MenuActions.styles.js +19 -5
  16. package/components/MenuActions/types.d.ts +10 -7
  17. package/components/Pager/Pager.d.ts +2 -2
  18. package/components/Pager/Pager.styles.js +8 -8
  19. package/components/Pager/subcomponents/CustomTablePagination/CustomTablePagination.d.ts +1 -1
  20. package/components/Pager/subcomponents/CustomTablePagination/types.d.ts +3 -3
  21. package/components/Pager/subcomponents/PagerActions/PagerActions.d.ts +1 -1
  22. package/components/PropertyValue/PropertyValue.js +1 -1
  23. package/components/ToastContainer/ToastContainer.d.ts +4 -0
  24. package/components/WindowBase/WindowBase.d.ts +1 -1
  25. package/components/WindowBase/subcomponents/Header/HeaderWindowBase.d.ts +1 -1
  26. package/components/WindowBase/types.d.ts +1 -1
  27. package/components/areas/components/AreasAdmin/AreasAdmin.d.ts +13 -0
  28. package/components/areas/components/AreasAdmin/AreasAdmin.js +163 -0
  29. package/components/areas/components/AreasAdmin/AreasAdmin.styles.d.ts +2 -0
  30. package/components/areas/components/AreasAdmin/AreasAdmin.styles.js +264 -0
  31. package/components/areas/components/AreasAdmin/classes/index.js +1 -2
  32. package/components/areas/components/AreasAdmin/constants.d.ts +1 -0
  33. package/components/areas/components/AreasAdmin/constants.js +4 -0
  34. package/components/areas/components/AreasAdmin/slots/AreasAdminEnum.d.ts +23 -0
  35. package/components/areas/components/AreasAdmin/slots/AreasAdminEnum.js +27 -0
  36. package/components/areas/components/AreasAdmin/slots/AreasAdminSlots.d.ts +63 -0
  37. package/components/areas/components/AreasAdmin/slots/AreasAdminSlots.js +116 -0
  38. package/components/areas/components/AreasAdmin/slots/index.d.ts +2 -0
  39. package/components/areas/components/AreasAdmin/slots/index.js +1 -0
  40. package/components/areas/components/AreasAdmin/subcomponents/AreaChip/{index.d.ts → AreaChip.d.ts} +4 -26
  41. package/components/areas/components/AreasAdmin/subcomponents/AreaChip/{index.js → AreaChip.js} +81 -88
  42. package/components/areas/components/AreasAdmin/subcomponents/AreaChip/subcomponents/ChipActionsMobile/ChipActionsMobile.d.ts +8 -0
  43. package/components/areas/components/AreasAdmin/subcomponents/AreaChip/subcomponents/ChipActionsMobile/ChipActionsMobile.js +53 -0
  44. package/components/areas/components/AreasAdmin/subcomponents/AreaChip/subcomponents/ChipActionsMobile/index.d.ts +1 -1
  45. package/components/areas/components/AreasAdmin/subcomponents/AreaChip/types.d.ts +18 -0
  46. package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/{index.d.ts → AreaChipMobile.d.ts} +1 -1
  47. package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/AreaChipMobile.js +81 -0
  48. package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/ChipMobile/ChipMobile.d.ts +2 -3
  49. package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/ChipMobile/ChipMobile.js +36 -78
  50. package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/PanelWindowPopUp/index.d.ts +1 -1
  51. package/components/areas/components/AreasAdmin/subcomponents/PanelWindowPopUp/{index.d.ts → PanelWindowPopUp.d.ts} +1 -1
  52. package/components/areas/components/AreasAdmin/types.d.ts +47 -0
  53. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/index.js +1 -1
  54. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/helper.d.ts +23 -3
  55. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/index.d.ts +1 -1
  56. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/index.js +7 -3
  57. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/subcomponents/WindowPopUpsList/index.d.ts +1 -1
  58. package/components/areas/components/index.d.ts +1 -1
  59. package/components/areas/contexts/AreasContext/helpers/generateModuleCount.d.ts +9 -0
  60. package/components/areas/contexts/AreasContext/helpers/generateModuleCount.js +16 -0
  61. package/components/areas/contexts/AreasContext/{helper.d.ts → helpers/helper.d.ts} +3 -3
  62. package/components/areas/contexts/AreasContext/{helper.js → helpers/helper.js} +5 -5
  63. package/components/areas/contexts/AreasContext/index.js +5 -2
  64. package/components/areas/contexts/AreasContext/store.d.ts +2 -2
  65. package/components/areas/contexts/AreasContext/store.js +175 -173
  66. package/components/areas/contexts/AreasContext/tests/AreasProvider.test.d.ts +1 -0
  67. package/components/areas/contexts/AreasContext/tests/Store.test.d.ts +1 -0
  68. package/components/areas/contexts/AreasContext/types.d.ts +6 -2
  69. package/components/areas/dictionary.d.ts +1 -0
  70. package/components/areas/dictionary.js +2 -1
  71. package/components/areas/icons.d.ts +2 -0
  72. package/components/areas/icons.js +3 -1
  73. package/components/areas/types.d.ts +6 -1
  74. package/components/hook-form/RHFAutocomplete/RFHAutocompleteStyles.js +4 -4
  75. package/components/hook-form/RHFAutocomplete/RHFAutocomplete.d.ts +2 -2
  76. package/components/hook-form/RHFCheckbox/RHFCheckbox.d.ts +5 -0
  77. package/components/hook-form/RHFDateTime/RHFDateTime.d.ts +2 -2
  78. package/components/hook-form/RHFDateTime/RHFDateTime.styles.js +2 -2
  79. package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useRowActionsGetter.d.ts +1 -1
  80. package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useRowActionsGetter.d.ts +1 -1
  81. package/components/mui_extended/Autocomplete/Autocomplete.styles.js +22 -14
  82. package/components/mui_extended/Badge/slots/BadgeSlots.d.ts +1 -1
  83. package/components/mui_extended/CheckBox/CheckBox.d.ts +4 -0
  84. package/components/mui_extended/DateTimePicker/DateTimePicker.d.ts +2 -2
  85. package/components/mui_extended/DateTimePicker/DateTimePicker.styles.js +14 -14
  86. package/components/mui_extended/Divider/Divider.d.ts +4 -0
  87. package/components/mui_extended/IconButton/IconButton.styles.js +6 -6
  88. package/components/mui_extended/IconButton/slots/IconButtonSlots.d.ts +1 -1
  89. package/components/mui_extended/MenuItem/MenuItem.styles.js +39 -8
  90. package/components/mui_extended/MenuItem/slots/MenuItemSlots.js +1 -1
  91. package/components/mui_extended/NavLink/NavLink.d.ts +4 -0
  92. package/components/mui_extended/NavLink/NavLink.styles.js +28 -6
  93. package/components/mui_extended/Popover/Popover.styles.js +4 -4
  94. package/components/mui_extended/Select/Select.styles.js +5 -5
  95. package/components/mui_extended/Select/types.d.ts +6 -0
  96. package/components/mui_extended/Stack/Stack.d.ts +4 -0
  97. package/index.js +1 -1
  98. package/package.json +2 -2
  99. package/components/areas/components/AreasAdmin/index.d.ts +0 -10
  100. package/components/areas/components/AreasAdmin/index.js +0 -95
  101. package/components/areas/components/AreasAdmin/styles.js +0 -17
  102. package/components/areas/components/AreasAdmin/subcomponents/AreaChip/styles.js +0 -29
  103. package/components/areas/components/AreasAdmin/subcomponents/AreaChip/subcomponents/ChipActionsMobile/index.js +0 -56
  104. package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/index.js +0 -96
  105. package/components/areas/components/AreasAdmin/subcomponents/PanelWindowPopUp/index.js +0 -54
  106. package/components/areas/utils/useOnClickOutside/index.js +0 -22
  107. /package/components/areas/{contexts/AreasContext/index.test.d.ts → components/AreasAdmin/test/AreasAdmin.test.d.ts} +0 -0
@@ -3,10 +3,11 @@ import { devtools } from "zustand/middleware";
3
3
  import { immer } from "zustand/middleware/immer";
4
4
  import { u as useAreasViewerUtilityClasses } from "../../components/AreasViewer/classes/index.js";
5
5
  import { u as useAreasAdminUtilityClasses } from "../../components/AreasAdmin/classes/index.js";
6
- import { u as updateOwnerStateClasses, C as COOKIE_AREAS_ADMIN_CONTAINER_ID, b as COOKIE_AREAS_ADMIN_ID, D as DEFAULT_AREA, c as addArea, g as getSelectedAreaIdFromCookies, d as DEFAULT_WINDOW, a as RESPONSIVE_ROW_HEIGHTS, P as PADDING_GRIDLAYOUT, M as MARGIN_GRIDLAYOUT, N as NORMALIZED_COLS, e as deleteLayoutFromBreakPoints, f as COOKIE_WINDOWS, h as COOKIE_BREAKPOINT_LAYOUTS, i as DEBOUCED_SAVE_TIME, s as setColapsedLayoutBreakPoints, j as getDataFromResponse, k as getCookiesContainer } from "./helper.js";
6
+ import { u as updateOwnerStateClasses, C as COOKIE_AREAS_ADMIN_CONTAINER_ID, b as COOKIE_AREAS_ADMIN_ID, D as DEFAULT_AREA, c as addArea, g as getSelectedAreaIdFromCookies, d as DEFAULT_WINDOW, a as RESPONSIVE_ROW_HEIGHTS, P as PADDING_GRIDLAYOUT, M as MARGIN_GRIDLAYOUT, N as NORMALIZED_COLS, e as deleteLayoutFromBreakPoints, f as COOKIE_WINDOWS, h as COOKIE_BREAKPOINT_LAYOUTS, i as DEBOUCED_SAVE_TIME, s as setColapsedLayoutBreakPoints, j as getDataFromResponse, k as getCookiesContainer } from "./helpers/helper.js";
7
7
  import { c as createDynamicMFStore } from "../DynamicMFParmsContext/store.js";
8
8
  import cloneDeep from "lodash-es/cloneDeep";
9
9
  import debounce from "lodash-es/debounce";
10
+ import { g as generateModuleCount } from "./helpers/generateModuleCount.js";
10
11
  import { g as getCookie, s as setCookie, d as deleteCookie } from "../../../../helpers/cookies/cookies.js";
11
12
  import { d as addLayoutItemToBreakPoints, e as cloneLayouts } from "../../../GridLayout/subcomponents/Responsive/responsiveUtils.js";
12
13
  import { k as isEqualLayouts } from "../../../GridLayout/utils.js";
@@ -32,8 +33,8 @@ const createAreasStore = (initProps) => {
32
33
  * Inicializa el store de areas
33
34
  * @author Bruce Escobar - automatic
34
35
  * @createdAt 2024-10-22 09:41:31 - automatic
35
- * @updatedAt 2024-12-30 14:36:10 - automatic
36
- * @updatedUser Andrés Quintero - automatic
36
+ * @updatedAt 2025-01-29 16:33:53 - automatic
37
+ * @updatedUser cesar - automatic
37
38
  */
38
39
  init: () => {
39
40
  if (get().ownerState.status !== "init") {
@@ -102,139 +103,7 @@ const createAreasStore = (initProps) => {
102
103
  });
103
104
  },
104
105
  /**
105
- * TODO: Documentar
106
- * @updatedUser Andrés Quintero - automatic
107
- * @updatedUser Andrés Quintero - automatic
108
- * @updatedUser Andrés Quintero - automatic
109
- * @updatedUser Andrés Quintero - automatic
110
- * @updatedUser Andrés Quintero - automatic
111
- * @updatedUser Andrés Quintero - automatic
112
- * @updatedUser Andrés Quintero - automatic
113
- * @updatedUser Andrés Quintero - automatic
114
- * @updatedUser Andrés Quintero - automatic
115
- * @updatedUser Andrés Quintero - automatic
116
- * @updatedUser Andrés Quintero - automatic
117
- * @updatedUser Andrés Quintero - automatic
118
- * @updatedUser Andrés Quintero - automatic
119
- * @updatedUser Andrés Quintero - automatic
120
- * @updatedUser Andrés Quintero - automatic
121
- * @updatedUser Andrés Quintero - automatic
122
- * @updatedUser Andrés Quintero - automatic
123
- * @updatedUser Andrés Quintero - automatic
124
- * @updatedUser Andrés Quintero - automatic
125
- * @updatedUser Andrés Quintero - automatic
126
- * @updatedUser Andrés Quintero - automatic
127
- * @updatedUser Andrés Quintero - automatic
128
- * @updatedUser Andrés Quintero - automatic
129
- * @updatedUser Andrés Quintero - automatic
130
- * @updatedUser Andrés Quintero - automatic
131
- * @updatedUser Andrés Quintero - automatic
132
- * @updatedUser Andrés Quintero - automatic
133
- * @updatedUser Andrés Quintero - automatic
134
- * @updatedUser Andrés Quintero - automatic
135
- * @updatedUser Andrés Quintero - automatic
136
- * @updatedUser Andrés Quintero - automatic
137
- * @updatedUser Andrés Quintero - automatic
138
- * @updatedAt 2024-12-30 14:36:10 - automatic
139
- * @updatedAt 2024-12-30 14:36:10 - automatic
140
- * @updatedAt 2024-12-30 14:36:10 - automatic
141
- * @updatedAt 2024-12-30 14:36:10 - automatic
142
- * @updatedAt 2024-12-30 14:36:10 - automatic
143
- * @updatedAt 2024-12-30 14:36:10 - automatic
144
- * @updatedAt 2024-12-30 14:36:10 - automatic
145
- * @updatedAt 2024-12-30 14:36:10 - automatic
146
- * @updatedAt 2024-12-30 14:36:10 - automatic
147
- * @updatedAt 2024-12-30 14:36:10 - automatic
148
- * @updatedAt 2024-12-30 14:36:10 - automatic
149
- * @updatedAt 2024-12-30 14:36:10 - automatic
150
- * @updatedAt 2024-12-30 14:36:10 - automatic
151
- * @updatedAt 2024-12-30 14:36:10 - automatic
152
- * @updatedAt 2024-12-30 14:36:10 - automatic
153
- * @updatedAt 2024-12-30 14:36:10 - automatic
154
- * @updatedAt 2024-12-30 14:36:10 - automatic
155
- * @updatedAt 2024-12-30 14:36:10 - automatic
156
- * @updatedAt 2024-12-30 14:36:10 - automatic
157
- * @updatedAt 2024-12-30 14:36:10 - automatic
158
- * @updatedAt 2024-12-30 14:36:10 - automatic
159
- * @updatedAt 2024-12-30 14:36:10 - automatic
160
- * @updatedAt 2024-12-30 14:36:10 - automatic
161
- * @updatedAt 2024-12-30 14:36:10 - automatic
162
- * @updatedAt 2024-12-30 14:36:10 - automatic
163
- * @updatedAt 2024-12-30 14:36:10 - automatic
164
- * @updatedAt 2024-12-30 14:36:10 - automatic
165
- * @updatedAt 2024-12-30 14:36:10 - automatic
166
- * @updatedAt 2024-12-30 14:36:10 - automatic
167
- * @updatedAt 2024-12-30 14:36:10 - automatic
168
- * @updatedAt 2024-12-30 14:36:10 - automatic
169
- * @updatedAt 2024-12-30 14:36:10 - automatic
170
- * @createdAt 2024-12-30 14:36:06 - automatic
171
- * @createdAt 2024-12-30 14:36:06 - automatic
172
- * @createdAt 2024-12-30 14:36:06 - automatic
173
- * @createdAt 2024-12-30 14:36:06 - automatic
174
- * @createdAt 2024-12-30 14:36:06 - automatic
175
- * @createdAt 2024-12-30 14:36:06 - automatic
176
- * @createdAt 2024-12-30 14:36:06 - automatic
177
- * @createdAt 2024-12-30 14:36:06 - automatic
178
- * @createdAt 2024-12-30 14:36:06 - automatic
179
- * @createdAt 2024-12-30 14:36:06 - automatic
180
- * @createdAt 2024-12-30 14:36:06 - automatic
181
- * @createdAt 2024-12-30 14:36:06 - automatic
182
- * @createdAt 2024-12-30 14:36:06 - automatic
183
- * @createdAt 2024-12-30 14:36:06 - automatic
184
- * @createdAt 2024-12-30 14:36:06 - automatic
185
- * @createdAt 2024-12-30 14:36:06 - automatic
186
- * @createdAt 2024-12-30 14:36:06 - automatic
187
- * @createdAt 2024-12-30 14:36:06 - automatic
188
- * @createdAt 2024-12-30 14:36:06 - automatic
189
- * @createdAt 2024-12-30 14:36:06 - automatic
190
- * @createdAt 2024-12-30 14:36:06 - automatic
191
- * @createdAt 2024-12-30 14:36:06 - automatic
192
- * @createdAt 2024-12-30 14:36:06 - automatic
193
- * @createdAt 2024-12-30 14:36:06 - automatic
194
- * @createdAt 2024-12-30 14:36:06 - automatic
195
- * @createdAt 2024-12-30 14:36:06 - automatic
196
- * @createdAt 2024-12-30 14:36:06 - automatic
197
- * @createdAt 2024-12-30 14:36:06 - automatic
198
- * @createdAt 2024-12-30 14:36:06 - automatic
199
- * @createdAt 2024-12-30 14:36:06 - automatic
200
- * @createdAt 2024-12-30 14:36:06 - automatic
201
- * @createdAt 2024-12-30 14:36:06 - automatic
202
- * @author Andrés Quintero - automatic
203
- * @author Andrés Quintero - automatic
204
- * @author Andrés Quintero - automatic
205
- * @author Andrés Quintero - automatic
206
- * @author Andrés Quintero - automatic
207
- * @author Andrés Quintero - automatic
208
- * @author Andrés Quintero - automatic
209
- * @author Andrés Quintero - automatic
210
- * @author Andrés Quintero - automatic
211
- * @author Andrés Quintero - automatic
212
- * @author Andrés Quintero - automatic
213
- * @author Andrés Quintero - automatic
214
- * @author Andrés Quintero - automatic
215
- * @author Andrés Quintero - automatic
216
- * @author Andrés Quintero - automatic
217
- * @author Andrés Quintero - automatic
218
- * @author Andrés Quintero - automatic
219
- * @author Andrés Quintero - automatic
220
- * @author Andrés Quintero - automatic
221
- * @author Andrés Quintero - automatic
222
- * @author Andrés Quintero - automatic
223
- * @author Andrés Quintero - automatic
224
- * @author Andrés Quintero - automatic
225
- * @author Andrés Quintero - automatic
226
- * @author Andrés Quintero - automatic
227
- * @author Andrés Quintero - automatic
228
- * @author Andrés Quintero - automatic
229
- * @author Andrés Quintero - automatic
230
- * @author Andrés Quintero - automatic
231
- * @author Andrés Quintero - automatic
232
- * @author Andrés Quintero - automatic
233
- * @author Andrés Quintero - automatic
234
- * @author Andrés Quintero - automatic
235
- * @createdAt 2024-12-30 14:36:06 - automatic
236
- * @updatedAt 2024-12-30 14:36:10 - automatic
237
- * @updatedUser Andrés Quintero - automatic
106
+ * Acción encargada de añadir un área de trabajo en blanco
238
107
  */
239
108
  addArea: () => {
240
109
  let newId = "";
@@ -245,7 +114,11 @@ const createAreasStore = (initProps) => {
245
114
  return newId;
246
115
  },
247
116
  /**
248
- * TODO: Documentar
117
+ * editArea store
118
+ * @author cesar - automatic
119
+ * @createdAt 2025-01-29 16:33:52 - automatic
120
+ * @updatedAt 2025-01-29 16:33:53 - automatic
121
+ * @updatedUser cesar - automatic
249
122
  */
250
123
  editArea: (areaId, newName) => {
251
124
  set((state) => {
@@ -264,7 +137,11 @@ const createAreasStore = (initProps) => {
264
137
  });
265
138
  },
266
139
  /**
267
- * TODO: Documentar
140
+ * deleteArea store
141
+ * @author cesar - automatic
142
+ * @createdAt 2025-01-29 16:33:52 - automatic
143
+ * @updatedAt 2025-01-29 16:33:53 - automatic
144
+ * @updatedUser cesar - automatic
268
145
  */
269
146
  deleteArea: (areaId) => {
270
147
  let selectNewAreaId = "";
@@ -280,11 +157,12 @@ const createAreasStore = (initProps) => {
280
157
  delete state.hashWindows[key];
281
158
  }
282
159
  }
160
+ const indexDeleteArea = state.areasIds.findIndex((elementAreaId) => elementAreaId === areaId);
283
161
  state.areasIds.splice(removeIndex, 1);
284
162
  delete state.hashAreas[areaId];
285
- }
286
- if (state.currentAreaId === areaId) {
287
- selectNewAreaId = state.areasIds[0];
163
+ if (state.currentAreaId === areaId) {
164
+ selectNewAreaId = state.areasIds[indexDeleteArea <= state.areasIds.length - 1 ? indexDeleteArea : state.areasIds.length - 1];
165
+ }
288
166
  }
289
167
  if (state.loadAreasFromNetwork) {
290
168
  state.networkOperation({
@@ -301,7 +179,11 @@ const createAreasStore = (initProps) => {
301
179
  }
302
180
  },
303
181
  /**
304
- * TODO: Documentar
182
+ * selectArea store
183
+ * @author cesar - automatic
184
+ * @createdAt 2025-01-29 16:33:52 - automatic
185
+ * @updatedAt 2025-01-29 16:33:53 - automatic
186
+ * @updatedUser cesar - automatic
305
187
  */
306
188
  selectArea: (areaId) => {
307
189
  set((state) => {
@@ -329,7 +211,11 @@ const createAreasStore = (initProps) => {
329
211
  });
330
212
  },
331
213
  /**
332
- * TODO: Documentar
214
+ * setHandlerGetLabel
215
+ * @author cesar - automatic
216
+ * @createdAt 2025-01-29 16:33:52 - automatic
217
+ * @updatedAt 2025-01-29 16:33:53 - automatic
218
+ * @updatedUser cesar - automatic
333
219
  */
334
220
  setHandlerGetLabel: (newHandler) => {
335
221
  set((state) => {
@@ -337,7 +223,11 @@ const createAreasStore = (initProps) => {
337
223
  });
338
224
  },
339
225
  /**
340
- * TODO: Documentar
226
+ * setExternalState
227
+ * @author cesar - automatic
228
+ * @createdAt 2025-01-29 16:33:52 - automatic
229
+ * @updatedAt 2025-01-29 16:33:53 - automatic
230
+ * @updatedUser cesar - automatic
341
231
  */
342
232
  setExternalState: (newExternalState) => {
343
233
  set((state) => {
@@ -348,7 +238,11 @@ const createAreasStore = (initProps) => {
348
238
  },
349
239
  areaActions: {
350
240
  /**
351
- * TODO: Documentar
241
+ * addWindow store
242
+ * @author cesar - automatic
243
+ * @createdAt 2025-01-29 16:33:52 - automatic
244
+ * @updatedAt 2025-01-29 16:33:53 - automatic
245
+ * @updatedUser cesar - automatic
352
246
  */
353
247
  addWindow: (newWindowProps) => {
354
248
  const windowId = `${get().currentAreaId}_window_${(/* @__PURE__ */ new Date()).getTime()}_${(Math.random() * 1e3).toFixed(0)}`;
@@ -359,11 +253,16 @@ const createAreasStore = (initProps) => {
359
253
  }
360
254
  },
361
255
  /**
362
- * TODO: Documentar
256
+ * addLayout store
257
+ * @author cesar - automatic
258
+ * @createdAt 2025-01-29 16:33:52 - automatic
259
+ * @updatedAt 2025-01-29 16:33:53 - automatic
260
+ * @updatedUser cesar - automatic
363
261
  */
364
262
  addLayout: (areaId, windowId, newWindowProps) => {
365
263
  let previousId = windowId;
366
264
  const freeMove = newWindowProps.emergeType === "popup";
265
+ const moduleCount = generateModuleCount(get().currentAreaId, newWindowProps.moduleId, get().hashWindows);
367
266
  const newLayoutItem = {
368
267
  ...newWindowProps.layoutProps,
369
268
  i: windowId,
@@ -400,7 +299,8 @@ const createAreasStore = (initProps) => {
400
299
  get().areaActions.closeLayout(areaId, removeLayoutId);
401
300
  },
402
301
  ...DEFAULT_WINDOW,
403
- dynamicMFStore
302
+ dynamicMFStore,
303
+ moduleCount
404
304
  };
405
305
  area.layoutItemsIds.push(windowId);
406
306
  if (newWindowProps.emergeType === "layout") {
@@ -430,7 +330,11 @@ const createAreasStore = (initProps) => {
430
330
  get().areaActions.bouncedSaveBreakpointsLayouts(areaId);
431
331
  },
432
332
  /**
433
- * TODO: Documentar
333
+ * closeLayout
334
+ * @author cesar - automatic
335
+ * @createdAt 2025-01-29 16:33:52 - automatic
336
+ * @updatedAt 2025-01-29 16:33:53 - automatic
337
+ * @updatedUser cesar - automatic
434
338
  */
435
339
  closeLayout: (areaId, removeLayoutId) => {
436
340
  set((state) => {
@@ -458,7 +362,11 @@ const createAreasStore = (initProps) => {
458
362
  }
459
363
  },
460
364
  /**
461
- * TODO: Documentar
365
+ * saveLayouts
366
+ * @author cesar - automatic
367
+ * @createdAt 2025-01-29 16:33:52 - automatic
368
+ * @updatedAt 2025-01-29 16:33:53 - automatic
369
+ * @updatedUser cesar - automatic
462
370
  */
463
371
  saveLayouts: (areaId) => {
464
372
  let nrKeys = 0;
@@ -504,7 +412,11 @@ const createAreasStore = (initProps) => {
504
412
  }
505
413
  },
506
414
  /**
507
- * TODO: Documentar
415
+ * closeWindowModal
416
+ * @author cesar - automatic
417
+ * @createdAt 2025-01-29 16:33:52 - automatic
418
+ * @updatedAt 2025-01-29 16:33:53 - automatic
419
+ * @updatedUser cesar - automatic
508
420
  */
509
421
  closeWindowModal: (removeModalId) => {
510
422
  set((state) => {
@@ -517,7 +429,11 @@ const createAreasStore = (initProps) => {
517
429
  });
518
430
  },
519
431
  /**
520
- * TODO: Documentar
432
+ * addWindowModal
433
+ * @author cesar - automatic
434
+ * @createdAt 2025-01-29 16:33:52 - automatic
435
+ * @updatedAt 2025-01-29 16:33:53 - automatic
436
+ * @updatedUser cesar - automatic
521
437
  */
522
438
  addWindowModal: (areaId, windowId, newWindowModalProps) => {
523
439
  set((state) => {
@@ -526,13 +442,15 @@ const createAreasStore = (initProps) => {
526
442
  windowId
527
443
  });
528
444
  state.windowsModals.push(windowId);
445
+ const moduleCount = generateModuleCount(get().currentAreaId, newWindowModalProps.moduleId, get().hashWindows);
529
446
  state.hashWindowsModals[windowId] = {
530
447
  ...newWindowModalProps,
531
448
  areaId,
532
449
  windowId,
533
450
  ...DEFAULT_WINDOW,
534
451
  onClose: get().areaActions.closeWindowModal,
535
- dynamicMFStore
452
+ dynamicMFStore,
453
+ moduleCount
536
454
  };
537
455
  state.hashWindows[windowId] = state.hashWindowsModals[windowId];
538
456
  });
@@ -573,7 +491,11 @@ const createAreasStore = (initProps) => {
573
491
  }
574
492
  ),
575
493
  /**
576
- * TODO: Documentar
494
+ * onBreakpointsLayoutsChange
495
+ * @author cesar - automatic
496
+ * @createdAt 2025-01-29 16:33:52 - automatic
497
+ * @updatedAt 2025-01-29 16:33:53 - automatic
498
+ * @updatedUser cesar - automatic
577
499
  */
578
500
  onBreakpointsLayoutsChange: (areaId, _currentLayout, newAllLayouts) => {
579
501
  if (!isEqualLayouts(get().hashAreas[areaId].layouts, newAllLayouts)) {
@@ -586,7 +508,11 @@ const createAreasStore = (initProps) => {
586
508
  }
587
509
  },
588
510
  /**
589
- * TODO: Documentar
511
+ * containerChange
512
+ * @author cesar - automatic
513
+ * @createdAt 2025-01-29 16:33:52 - automatic
514
+ * @updatedAt 2025-01-29 16:33:53 - automatic
515
+ * @updatedUser cesar - automatic
590
516
  */
591
517
  onContainerChange: (areaId, e) => {
592
518
  set((state) => {
@@ -595,7 +521,11 @@ const createAreasStore = (initProps) => {
595
521
  });
596
522
  },
597
523
  /**
598
- * TODO: Documentar
524
+ * selectLayout
525
+ * @author cesar - automatic
526
+ * @createdAt 2025-01-29 16:33:52 - automatic
527
+ * @updatedAt 2025-01-29 16:33:53 - automatic
528
+ * @updatedUser cesar - automatic
599
529
  */
600
530
  selectLayout: (areaId, layoutId) => {
601
531
  set((state) => {
@@ -622,7 +552,11 @@ const createAreasStore = (initProps) => {
622
552
  });
623
553
  },
624
554
  /**
625
- * TODO: Documentar
555
+ * unColapseLayoutItem
556
+ * @author cesar - automatic
557
+ * @createdAt 2025-01-29 16:33:52 - automatic
558
+ * @updatedAt 2025-01-29 16:33:53 - automatic
559
+ * @updatedUser cesar - automatic
626
560
  */
627
561
  unColapseLayoutItem: (areaId, layoutId) => {
628
562
  set((state) => {
@@ -630,7 +564,11 @@ const createAreasStore = (initProps) => {
630
564
  });
631
565
  },
632
566
  /**
633
- * TODO: Documentar
567
+ * colapseLayoutItem
568
+ * @author cesar - automatic
569
+ * @createdAt 2025-01-29 16:33:52 - automatic
570
+ * @updatedAt 2025-01-29 16:33:53 - automatic
571
+ * @updatedUser cesar - automatic
634
572
  */
635
573
  colapseLayoutItem: (areaId, layoutId) => {
636
574
  if (!get().hashAreas[areaId].maximizedId && get().hashWindows[layoutId]) {
@@ -640,7 +578,11 @@ const createAreasStore = (initProps) => {
640
578
  }
641
579
  },
642
580
  /**
643
- * TODO: Documentar
581
+ * minimizeLayout
582
+ * @author cesar - automatic
583
+ * @createdAt 2025-01-29 16:33:52 - automatic
584
+ * @updatedAt 2025-01-29 16:33:53 - automatic
585
+ * @updatedUser cesar - automatic
644
586
  */
645
587
  maximizeLayout: (areaId, layoutId) => {
646
588
  set((state) => {
@@ -660,7 +602,11 @@ const createAreasStore = (initProps) => {
660
602
  }
661
603
  },
662
604
  /**
663
- * TODO: Documentar
605
+ * normalizeLayouts
606
+ * @author cesar - automatic
607
+ * @createdAt 2025-01-29 16:33:52 - automatic
608
+ * @updatedAt 2025-01-29 16:33:53 - automatic
609
+ * @updatedUser cesar - automatic
664
610
  */
665
611
  normalizeLayouts: (areaId) => {
666
612
  set((state) => {
@@ -678,7 +624,11 @@ const createAreasStore = (initProps) => {
678
624
  });
679
625
  },
680
626
  /**
681
- * TODO: Documentar
627
+ * loadWindowsFromApi
628
+ * @author cesar - automatic
629
+ * @createdAt 2025-01-29 16:33:52 - automatic
630
+ * @updatedAt 2025-01-29 16:33:53 - automatic
631
+ * @updatedUser cesar - automatic
682
632
  */
683
633
  loadWindowsFromApi: (areaId) => {
684
634
  const area = get().hashAreas[areaId];
@@ -877,7 +827,11 @@ const createAreasStore = (initProps) => {
877
827
  },
878
828
  windowActions: {
879
829
  /**
880
- * TODO: Documentar
830
+ * setActions
831
+ * @author cesar - automatic
832
+ * @createdAt 2025-01-29 16:33:52 - automatic
833
+ * @updatedAt 2025-01-29 16:33:53 - automatic
834
+ * @updatedUser cesar - automatic
881
835
  */
882
836
  setActions: (windowId, newActions, version) => {
883
837
  set((state) => {
@@ -888,7 +842,11 @@ const createAreasStore = (initProps) => {
888
842
  });
889
843
  },
890
844
  /**
891
- * TODO: Documentar
845
+ * getCookie
846
+ * @author cesar - automatic
847
+ * @createdAt 2025-01-29 16:33:52 - automatic
848
+ * @updatedAt 2025-01-29 16:33:53 - automatic
849
+ * @updatedUser cesar - automatic
892
850
  */
893
851
  getCookie: (windowId, id) => {
894
852
  if (get().hashWindows[windowId]) {
@@ -897,7 +855,11 @@ const createAreasStore = (initProps) => {
897
855
  return {};
898
856
  },
899
857
  /**
900
- * TODO: Documentar
858
+ * getCookies
859
+ * @author cesar - automatic
860
+ * @createdAt 2025-01-29 16:33:52 - automatic
861
+ * @updatedAt 2025-01-29 16:33:53 - automatic
862
+ * @updatedUser cesar - automatic
901
863
  */
902
864
  getCookies: (windowId, type) => {
903
865
  if (get().hashWindows[windowId]) {
@@ -910,7 +872,11 @@ const createAreasStore = (initProps) => {
910
872
  return {};
911
873
  },
912
874
  /**
913
- * TODO: Documentar
875
+ * setCookie
876
+ * @author cesar - automatic
877
+ * @createdAt 2025-01-29 16:33:52 - automatic
878
+ * @updatedAt 2025-01-29 16:33:53 - automatic
879
+ * @updatedUser cesar - automatic
914
880
  */
915
881
  setCookie: (windowId, id, type, cookie) => {
916
882
  set((state) => {
@@ -930,7 +896,11 @@ const createAreasStore = (initProps) => {
930
896
  });
931
897
  },
932
898
  /**
933
- * TODO: Documentar
899
+ * close window
900
+ * @author cesar - automatic
901
+ * @createdAt 2025-01-29 16:33:52 - automatic
902
+ * @updatedAt 2025-01-29 16:33:53 - automatic
903
+ * @updatedUser cesar - automatic
934
904
  */
935
905
  close: (windowId) => {
936
906
  const hW = get().hashWindows[windowId];
@@ -942,7 +912,11 @@ const createAreasStore = (initProps) => {
942
912
  }
943
913
  },
944
914
  /**
945
- * TODO: Documentar
915
+ * startProgress
916
+ * @author cesar - automatic
917
+ * @createdAt 2025-01-29 16:33:52 - automatic
918
+ * @updatedAt 2025-01-29 16:33:53 - automatic
919
+ * @updatedUser cesar - automatic
946
920
  */
947
921
  startProgress: (windowId) => {
948
922
  set((state) => {
@@ -952,7 +926,11 @@ const createAreasStore = (initProps) => {
952
926
  });
953
927
  },
954
928
  /**
955
- * TODO: Documentar
929
+ * stopProgress
930
+ * @author cesar - automatic
931
+ * @createdAt 2025-01-29 16:33:52 - automatic
932
+ * @updatedAt 2025-01-29 16:33:53 - automatic
933
+ * @updatedUser cesar - automatic
956
934
  */
957
935
  stopProgress: (windowId) => {
958
936
  set((state) => {
@@ -962,7 +940,11 @@ const createAreasStore = (initProps) => {
962
940
  });
963
941
  },
964
942
  /**
965
- * TODO: Documentar
943
+ * loadCookiesFromApi
944
+ * @author cesar - automatic
945
+ * @createdAt 2025-01-29 16:33:52 - automatic
946
+ * @updatedAt 2025-01-29 16:33:53 - automatic
947
+ * @updatedUser cesar - automatic
966
948
  */
967
949
  loadCookiesFromApi: (windowId) => {
968
950
  const hW = get().hashWindows[windowId];
@@ -1002,7 +984,11 @@ const createAreasStore = (initProps) => {
1002
984
  }
1003
985
  },
1004
986
  /**
1005
- * TODO: Documentar
987
+ * saveModuleCookies
988
+ * @author cesar - automatic
989
+ * @createdAt 2025-01-29 16:33:52 - automatic
990
+ * @updatedAt 2025-01-29 16:33:53 - automatic
991
+ * @updatedUser cesar - automatic
1006
992
  */
1007
993
  saveModuleCookies: (windowId) => {
1008
994
  const hW = get().hashWindows[windowId];
@@ -1018,7 +1004,11 @@ const createAreasStore = (initProps) => {
1018
1004
  }
1019
1005
  },
1020
1006
  /**
1021
- * TODO: Documentar
1007
+ * setModuleCookies
1008
+ * @author cesar - automatic
1009
+ * @createdAt 2025-01-29 16:33:52 - automatic
1010
+ * @updatedAt 2025-01-29 16:33:53 - automatic
1011
+ * @updatedUser cesar - automatic
1022
1012
  */
1023
1013
  resetModuleCookies: (windowId) => {
1024
1014
  const hW = get().hashWindows[windowId];
@@ -1038,7 +1028,11 @@ const createAreasStore = (initProps) => {
1038
1028
  }
1039
1029
  },
1040
1030
  /**
1041
- * TODO: Documentar
1031
+ * setFnQueryClose
1032
+ * @author cesar - automatic
1033
+ * @createdAt 2025-01-29 16:33:52 - automatic
1034
+ * @updatedAt 2025-01-29 16:33:53 - automatic
1035
+ * @updatedUser cesar - automatic
1042
1036
  */
1043
1037
  setFnQueryClose: (windowId, fnQueryClose) => {
1044
1038
  set((state) => {
@@ -1046,7 +1040,11 @@ const createAreasStore = (initProps) => {
1046
1040
  });
1047
1041
  },
1048
1042
  /**
1049
- * TODO: Documentar
1043
+ * setWindowTitle
1044
+ * @author cesar - automatic
1045
+ * @createdAt 2025-01-29 16:33:52 - automatic
1046
+ * @updatedAt 2025-01-29 16:33:53 - automatic
1047
+ * @updatedUser cesar - automatic
1050
1048
  */
1051
1049
  setWindowTitle: (windowId, title) => {
1052
1050
  set((state) => {
@@ -1056,7 +1054,11 @@ const createAreasStore = (initProps) => {
1056
1054
  },
1057
1055
  areaAdminActions: {
1058
1056
  /**
1059
- * TODO: Documentar
1057
+ * setFocus
1058
+ * @author cesar - automatic
1059
+ * @createdAt 2025-01-29 16:33:52 - automatic
1060
+ * @updatedAt 2025-01-29 16:33:53 - automatic
1061
+ * @updatedUser cesar - automatic
1060
1062
  */
1061
1063
  setFocus: (newValue) => {
1062
1064
  set((state) => {
@@ -47,6 +47,10 @@ export type OwnerState = {
47
47
  * "isSkeleton" indica si el componente está en skeleton.
48
48
  */
49
49
  status: AreasStatus;
50
+ /**
51
+ * "readyForHooks" indica si el componente ejecutó el efecto de carga y se suscrubió al eventemitter. Utilizado normalmente en storybook
52
+ */
53
+ readyForHooks: boolean;
50
54
  /**
51
55
  * "isMobile" cuando el navegador está en modo celular
52
56
  */
@@ -64,7 +68,7 @@ export type OwnerState = {
64
68
  /**
65
69
  * Estados que se actulizan por fuera del store, a través de hooks
66
70
  */
67
- export type ExternalOwnerState = Pick<OwnerState, 'isMobile' | 'isSkeleton'>;
71
+ export type ExternalOwnerState = Pick<OwnerState, 'isMobile' | 'isSkeleton' | 'readyForHooks'>;
68
72
  /**
69
73
  * Interface que define el estado del componente (variables y funciones )
70
74
  */
@@ -171,7 +175,7 @@ export interface AreasStateWithActions extends AreasState {
171
175
  * @param newIsMobile
172
176
  * @returns
173
177
  */
174
- setExternalState: (newExternalState: ExternalOwnerState) => void;
178
+ setExternalState: (newExternalState: Partial<ExternalOwnerState>) => void;
175
179
  };
176
180
  areaActions: {
177
181
  addWindow: (newWindow: NewWindowProps) => void;
@@ -21,6 +21,7 @@ export declare const AREAS_DICCTIONARY: {
21
21
  readonly label_collapse_window: "label_collapse_window";
22
22
  readonly label_uncollapse_window: "label_uncollapse_window";
23
23
  readonly label_module_actions: "label_module_actions";
24
+ readonly label_window: "label_window";
24
25
  };
25
26
  export type AreasDictionaryType = typeof AREAS_DICCTIONARY;
26
27
  export declare const getAreasDictionary: (key: keyof AreasDictionaryType) => string;
@@ -22,7 +22,8 @@ const AREAS_DICCTIONARY = {
22
22
  label_minimize_window: "label_minimize_window",
23
23
  label_collapse_window: "label_collapse_window",
24
24
  label_uncollapse_window: "label_uncollapse_window",
25
- label_module_actions: "label_module_actions"
25
+ label_module_actions: "label_module_actions",
26
+ label_window: "label_window"
26
27
  };
27
28
  const getAreasDictionary = (key) => {
28
29
  return `${AREAS_DICTIONARY_ID}.${key}`;
@@ -18,4 +18,6 @@ export declare const ICONS: {
18
18
  CHEVRON_DOWN: string;
19
19
  MODULE: string;
20
20
  POPUP: string;
21
+ PENDING_ORDER: string;
22
+ MORE_VERTICAL: string;
21
23
  };