@m4l/components 9.1.108 → 9.1.110
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/components/NoItemSelected/dictionary.js +5 -1
- package/components/NoItemSelected/index.d.ts +2 -0
- package/components/NoItemSelected/index.js +1 -0
- package/components/Pager/subcomponents/CustomTablePagination/CustomTablePagination.js +6 -1
- package/components/areas/components/AreasAdmin/AreasAdmin.js +39 -34
- package/components/areas/components/AreasAdmin/AreasAdmin.styles.js +5 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/index.js +1 -1
- package/components/areas/contexts/AreasContext/helpers/helper.js +1 -1
- package/components/index.d.ts +1 -1
- package/index.js +14 -12
- package/package.json +1 -1
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
function getNoItemSelectedComponentsDictionary() {
|
|
2
|
+
return ["no_item_selected"];
|
|
3
|
+
}
|
|
1
4
|
const DICTIONARY = {
|
|
2
5
|
LABEL_TITLE: "no_item_selected.title",
|
|
3
6
|
LABEL_DETAIL: "no_item_selected.detail"
|
|
4
7
|
};
|
|
5
8
|
export {
|
|
6
|
-
DICTIONARY as D
|
|
9
|
+
DICTIONARY as D,
|
|
10
|
+
getNoItemSelectedComponentsDictionary as g
|
|
7
11
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -87,7 +87,12 @@ const CustomTablePagination = (props) => {
|
|
|
87
87
|
count: countTotal,
|
|
88
88
|
page: currentPage,
|
|
89
89
|
rowsPerPage: localRowsPerPage,
|
|
90
|
-
onPageChange: (
|
|
90
|
+
onPageChange: (event, newPage) => {
|
|
91
|
+
setLocalPage(newPage);
|
|
92
|
+
if (onPageChange) {
|
|
93
|
+
onPageChange(event, newPage);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
91
96
|
}
|
|
92
97
|
)
|
|
93
98
|
] })
|
|
@@ -50,6 +50,12 @@ const AreasAdmin = (props) => {
|
|
|
50
50
|
}) ?? [],
|
|
51
51
|
shallow
|
|
52
52
|
);
|
|
53
|
+
const moduleCounts = useAreasStore((state) => {
|
|
54
|
+
return windowsLayouts.reduce((acc, element) => {
|
|
55
|
+
acc[element.i] = state.hashWindows[element.i]?.moduleCount;
|
|
56
|
+
return acc;
|
|
57
|
+
}, {});
|
|
58
|
+
}, shallow);
|
|
53
59
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
54
60
|
const { getLabel } = useModuleDictionary();
|
|
55
61
|
const divRef = useRef(null);
|
|
@@ -66,10 +72,11 @@ const AreasAdmin = (props) => {
|
|
|
66
72
|
maximizeLayout(currentAreaId, layoutId);
|
|
67
73
|
};
|
|
68
74
|
const menuActions = windowsLayouts.map((element) => {
|
|
75
|
+
const moduleCount = moduleCounts[element.i];
|
|
69
76
|
return {
|
|
70
77
|
type: "menuItem",
|
|
71
78
|
onClick: () => onTouched(element.i),
|
|
72
|
-
label: element.title
|
|
79
|
+
label: `${element.title}${moduleCount ? `:${moduleCount}` : ""}`,
|
|
73
80
|
urlIcon: element.url_icon,
|
|
74
81
|
checkable: true,
|
|
75
82
|
checked: maximizedId === element.i
|
|
@@ -102,39 +109,37 @@ const AreasAdmin = (props) => {
|
|
|
102
109
|
size: normalizedSize,
|
|
103
110
|
ownerState: {},
|
|
104
111
|
children: !isMobile ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
105
|
-
/* @__PURE__ */ jsx(
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
] }) }),
|
|
137
|
-
maximizedId && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(ContainerAdminWindowsStyled, { size: normalizedSize, ownerState, children: [
|
|
112
|
+
/* @__PURE__ */ jsx(
|
|
113
|
+
IconButtonAddAreaStyled,
|
|
114
|
+
{
|
|
115
|
+
"aria-label": "Agregar área",
|
|
116
|
+
size: normalizedSize,
|
|
117
|
+
variant: "contained",
|
|
118
|
+
ownerState,
|
|
119
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.ADD_AREA}`,
|
|
120
|
+
onClick: addArea,
|
|
121
|
+
tooltip: getLabel(getAreasDictionary(AREAS_DICCTIONARY.area_add_new))
|
|
122
|
+
}
|
|
123
|
+
),
|
|
124
|
+
/* @__PURE__ */ jsx(ScrollBar, { children: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
125
|
+
AreaContentChipStyled,
|
|
126
|
+
{
|
|
127
|
+
size: normalizedSize,
|
|
128
|
+
ownerState: {},
|
|
129
|
+
children: Array.isArray(areas) && areas.length > 0 && areas.map((areaId) => /* @__PURE__ */ jsx(
|
|
130
|
+
AreaChip,
|
|
131
|
+
{
|
|
132
|
+
size: normalizedSize,
|
|
133
|
+
color,
|
|
134
|
+
areaId,
|
|
135
|
+
selected: areaId === currentAreaId,
|
|
136
|
+
disabled: areasLength === 1
|
|
137
|
+
},
|
|
138
|
+
areaId
|
|
139
|
+
))
|
|
140
|
+
}
|
|
141
|
+
) }) }),
|
|
142
|
+
maximizedId && windowsLayouts.length > 1 && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(ContainerAdminWindowsStyled, { size: normalizedSize, ownerState, children: [
|
|
138
143
|
/* @__PURE__ */ jsx(Typography, { size: normalizedSize, children: getLabel(getAreasDictionary(AREAS_DICCTIONARY.label_window)) }),
|
|
139
144
|
/* @__PURE__ */ jsx(
|
|
140
145
|
MenuActions,
|
|
@@ -12,6 +12,9 @@ const areasAdminStyles = {
|
|
|
12
12
|
flexDirection: "row",
|
|
13
13
|
gap: theme.vars.size.baseSpacings.sp2,
|
|
14
14
|
alignItems: "center"
|
|
15
|
+
},
|
|
16
|
+
"& .simplebar-placeholder": {
|
|
17
|
+
width: "100% !important"
|
|
15
18
|
}
|
|
16
19
|
}),
|
|
17
20
|
/**
|
|
@@ -39,7 +42,8 @@ const areasAdminStyles = {
|
|
|
39
42
|
*/
|
|
40
43
|
areaContainerContentChips: () => ({
|
|
41
44
|
display: "flex",
|
|
42
|
-
flexDirection: "row"
|
|
45
|
+
flexDirection: "row",
|
|
46
|
+
alignItems: "center"
|
|
43
47
|
}),
|
|
44
48
|
/**
|
|
45
49
|
* Root area content chip Styles
|
package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/index.js
CHANGED
|
@@ -33,7 +33,7 @@ const Window = (props) => {
|
|
|
33
33
|
return /* @__PURE__ */ jsx(
|
|
34
34
|
WindowBase,
|
|
35
35
|
{
|
|
36
|
-
title: `${title}${moduleCount ? `:${moduleCount}` :
|
|
36
|
+
title: `${title}${moduleCount ? `:${moduleCount}` : ""}`,
|
|
37
37
|
iconUrl,
|
|
38
38
|
isLoading: loading,
|
|
39
39
|
onClose: () => windowTools.close(),
|
|
@@ -134,7 +134,7 @@ function getDataFromResponse(data, state, areaId) {
|
|
|
134
134
|
if (windows) {
|
|
135
135
|
for (const key in windows) {
|
|
136
136
|
const element = windows[key];
|
|
137
|
-
if (element && // element['layoutProps'] && //Garantizar que venga con los LayoutProps de la venta
|
|
137
|
+
if (element && element.moduleCount && // element['layoutProps'] && //Garantizar que venga con los LayoutProps de la venta
|
|
138
138
|
element["mfProps"] && //Garantizar que venga con los mfProps de la venta
|
|
139
139
|
element["emergeType"] === "layout" && element["winType"] === "microfrontend") {
|
|
140
140
|
newWindowsLayoutsIds.push(key);
|
package/components/index.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export * from './modal';
|
|
|
29
29
|
export * from './LoadingError';
|
|
30
30
|
export * from './MFLoader';
|
|
31
31
|
export { NavLink } from './mui_extended/NavLink';
|
|
32
|
-
export * from './NoItemSelected
|
|
32
|
+
export * from './NoItemSelected';
|
|
33
33
|
export * from './ObjectLogs';
|
|
34
34
|
export * from './ObjectLogs/dictionary';
|
|
35
35
|
export * from './PaperForm/PaperForm';
|
package/index.js
CHANGED
|
@@ -123,8 +123,9 @@ import { g as g19 } from "./components/LoadingError/dictionary.js";
|
|
|
123
123
|
import { M as M10 } from "./components/MFLoader/MFLoader.js";
|
|
124
124
|
import { g as g20 } from "./components/MFLoader/dictionary.js";
|
|
125
125
|
import { N as N3 } from "./components/NoItemSelected/NoItemSelected.js";
|
|
126
|
+
import { g as g21 } from "./components/NoItemSelected/dictionary.js";
|
|
126
127
|
import { O } from "./components/ObjectLogs/index.js";
|
|
127
|
-
import { d as d6, g as
|
|
128
|
+
import { d as d6, g as g22 } from "./components/ObjectLogs/dictionary.js";
|
|
128
129
|
import { P as P9 } from "./components/PaperForm/PaperForm.js";
|
|
129
130
|
import { P as P10 } from "./components/PDFViewer/PDFViewer.js";
|
|
130
131
|
import { H as H4 } from "./components/HelmetPage/index.js";
|
|
@@ -139,9 +140,9 @@ import { T as T4 } from "./components/ToastContainer/ToastContainer.js";
|
|
|
139
140
|
import { T as T5 } from "./components/ToastContainer/subcomponents/ToastMessage/ToastMessage.js";
|
|
140
141
|
import { S as S6 } from "./components/SideBar/SideBar.js";
|
|
141
142
|
import { A as A11 } from "./components/AppBar/AppBar.js";
|
|
142
|
-
import { g as
|
|
143
|
+
import { g as g23 } from "./components/AppBar/dictionary.js";
|
|
143
144
|
import { A as A12 } from "./components/AccountPopover/AccountPopover.js";
|
|
144
|
-
import { g as
|
|
145
|
+
import { g as g24 } from "./components/AccountPopover/dictionary.js";
|
|
145
146
|
import { u as u8 } from "./components/popups/components/PopupsProvider/hooks/usePopupsStore/index.js";
|
|
146
147
|
import { a as a11, P as P12 } from "./components/popups/components/PopupsProvider/contexts/PopupsContext/PopupsContext.js";
|
|
147
148
|
import { P as P13 } from "./components/popups/components/PopupsViewer/PopupsViewer.js";
|
|
@@ -161,7 +162,7 @@ import { L as L9 } from "./components/mui_extended/LinearProgress/index.js";
|
|
|
161
162
|
import { L as L10 } from "./components/mui_extended/LinkWithRoute/index.js";
|
|
162
163
|
import { L as L11 } from "./components/mui_extended/LoadingButton/LoadingButton.js";
|
|
163
164
|
import { P as P14 } from "./components/Pager/Pager.js";
|
|
164
|
-
import { g as
|
|
165
|
+
import { g as g25 } from "./components/Pager/dicctionary.js";
|
|
165
166
|
import { T as T7 } from "./components/mui_extended/Tab/Tab.js";
|
|
166
167
|
import { T as T8 } from "./components/mui_extended/Tooltip/Tooltip.js";
|
|
167
168
|
import { I as I6 } from "./components/mui_extended/IconButton/IconButton.js";
|
|
@@ -187,7 +188,7 @@ import { T as T19 } from "./components/mui_extended/ToggleIconButton/slots/Toggl
|
|
|
187
188
|
import { T as T20 } from "./components/mui_extended/ToggleIconButton/slots/ToggleIconButtonSlots.js";
|
|
188
189
|
import { a as a13, D as D7, M as M13 } from "./components/areas/contexts/DynamicMFParmsContext/index.js";
|
|
189
190
|
import { F, R as R22, u as u9 } from "./components/hook-form/RHFormContext/index.js";
|
|
190
|
-
import { g as
|
|
191
|
+
import { g as g26 } from "./components/hook-form/RHFormContext/dictionary.js";
|
|
191
192
|
import { u as u10 } from "./contexts/AppearanceComponentContext/useAppearanceComponentStore.js";
|
|
192
193
|
import { A as A16 } from "./contexts/AppearanceComponentContext/AppearanceComponentContext.js";
|
|
193
194
|
import { a as a14, M as M14 } from "./contexts/ModalContext/index.js";
|
|
@@ -195,7 +196,7 @@ import { a as a15, R as R23 } from "./contexts/RealTimeContext/RealTimeContext.j
|
|
|
195
196
|
import { u as u11 } from "./hooks/useFormAddEdit/index.js";
|
|
196
197
|
import { u as u12 } from "./hooks/useModal/index.js";
|
|
197
198
|
import { u as u13 } from "./hooks/useTab/index.js";
|
|
198
|
-
import { g as
|
|
199
|
+
import { g as g27 } from "./hooks/useFormAddEdit/dictionary.js";
|
|
199
200
|
import { u as u14 } from "./hooks/useFormFocus/index.js";
|
|
200
201
|
import { u as u15 } from "./hooks/useInterval/index.js";
|
|
201
202
|
import { u as u16 } from "./hooks/useComponentSize/useComponentSize.js";
|
|
@@ -387,8 +388,8 @@ export {
|
|
|
387
388
|
d4 as defaultModalDialogDictionary,
|
|
388
389
|
d6 as defaultObjectLogDictionary,
|
|
389
390
|
d2 as draggableWindowClasses,
|
|
390
|
-
|
|
391
|
-
|
|
391
|
+
g24 as getAccountPopoverDictionary,
|
|
392
|
+
g23 as getAppBarDictionary,
|
|
392
393
|
b2 as getAreasComponentsDictionary,
|
|
393
394
|
g3 as getAreasDictionary,
|
|
394
395
|
g13 as getCommonActionsDictionary,
|
|
@@ -396,7 +397,7 @@ export {
|
|
|
396
397
|
g2 as getDataGridRowsFromSet,
|
|
397
398
|
g11 as getDistanceToNowFormatterComponentsDictionary,
|
|
398
399
|
a5 as getDynamicFilterComponentsDictionary,
|
|
399
|
-
|
|
400
|
+
g26 as getFormComponentsDictionary,
|
|
400
401
|
g9 as getFormatConcatenated,
|
|
401
402
|
u4 as getFormatDate,
|
|
402
403
|
g8 as getFormatPoints,
|
|
@@ -410,13 +411,14 @@ export {
|
|
|
410
411
|
a9 as getMenuActionsComponentsDictionary,
|
|
411
412
|
g18 as getModalDialogComponentsDictionary,
|
|
412
413
|
g17 as getModalDictionary,
|
|
413
|
-
g21 as
|
|
414
|
-
|
|
414
|
+
g21 as getNoItemSelectedComponentsDictionary,
|
|
415
|
+
g22 as getObjectLogsComponentsDictionary,
|
|
416
|
+
g25 as getPagerComponentsDictionary,
|
|
415
417
|
g6 as getPeriodComponetsDictionary,
|
|
416
418
|
g5 as getRHFAutocompleteAsyncComponentsDictionary,
|
|
417
419
|
g4 as getRHFAutocompleteComponentsDictionary,
|
|
418
420
|
g7 as getUncertaintyFormat,
|
|
419
|
-
|
|
421
|
+
g27 as getformAddEditDictionary,
|
|
420
422
|
i as isEqualLayout,
|
|
421
423
|
k as isEqualLayouts,
|
|
422
424
|
i2 as isFeature,
|