@m4l/components 9.3.24-JT04112025.beta.1 → 9.3.24-JT04112025.beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/export.d.ts +6 -0
- package/@types/types.d.ts +26 -1
- package/components/CommonActions/components/ActionFormCancel/ActionFormCancel.js +8 -17
- package/components/CommonActions/components/ActionFormCancel/types.d.ts +0 -9
- package/components/DataGrid/DataGrid.js +6 -2
- package/components/DataGrid/Datagrid.styles.js +67 -18
- package/components/DataGrid/constants.d.ts +19 -0
- package/components/DataGrid/formatters/ColumnIconFormatter/formatter.d.ts +1 -2
- package/components/DataGrid/formatters/ColumnIconFormatter/formatter.js +3 -6
- package/components/DataGrid/formatters/ColumnIconFormatter/index.d.ts +0 -1
- package/components/DataGrid/formatters/ColumnIconFormatter/types.d.ts +2 -4
- package/components/DataGrid/formatters/ColumnSetCheckFormatter/formatter.js +7 -1
- package/components/DataGrid/formatters/ColumnSetCheckFormatter/types.d.ts +1 -0
- package/components/DataGrid/formatters/ColumnTagsFormatter/formatter.d.ts +8 -0
- package/components/DataGrid/formatters/ColumnTagsFormatter/formatter.js +16 -0
- package/components/DataGrid/formatters/ColumnTagsFormatter/index.d.ts +3 -0
- package/components/DataGrid/formatters/ColumnTagsFormatter/index.js +1 -0
- package/components/DataGrid/formatters/ColumnTagsFormatter/types.d.ts +5 -0
- package/components/DataGrid/formatters/ColumnTagsFormatter/useColumnTags.d.ts +9 -0
- package/components/DataGrid/formatters/ColumnTagsFormatter/useColumnTags.js +60 -0
- package/components/DataGrid/formatters/index.d.ts +1 -0
- package/components/DataGrid/hooks/useModalCardDetail.d.ts +2 -2
- package/components/DataGrid/hooks/useModalCardDetail.js +49 -48
- package/components/DataGrid/index.d.ts +1 -1
- package/components/DataGrid/slots/DataGridEnum.d.ts +2 -0
- package/components/DataGrid/slots/DataGridEnum.js +2 -0
- package/components/DataGrid/slots/DataGridSlot.d.ts +3 -1
- package/components/DataGrid/slots/DataGridSlot.js +45 -37
- package/components/DataGrid/subcomponents/Cards/helpers/calculateCardHeight.d.ts +18 -0
- package/components/DataGrid/subcomponents/Cards/helpers/calculateCardHeight.js +10 -0
- package/components/DataGrid/subcomponents/Cards/helpers/scrollToCardElement.d.ts +9 -0
- package/components/DataGrid/subcomponents/Cards/helpers/scrollToCardElement.js +25 -0
- package/components/DataGrid/subcomponents/Cards/hooks/useCardContent.d.ts +1 -2
- package/components/DataGrid/subcomponents/Cards/hooks/useCardContent.js +62 -73
- package/components/DataGrid/subcomponents/Cards/index.js +71 -16
- package/components/DataGrid/subcomponents/Cards/subcomponents/CardDetails/index.js +36 -18
- package/components/DataGrid/subcomponents/Cards/subcomponents/CardHeader/index.d.ts +1 -1
- package/components/DataGrid/subcomponents/Cards/subcomponents/CardHeader/index.js +13 -20
- package/components/DataGrid/subcomponents/Cards/subcomponents/CardRow/index.d.ts +6 -1
- package/components/DataGrid/subcomponents/Cards/subcomponents/CardRow/index.js +67 -36
- package/components/DataGrid/subcomponents/Cards/subcomponents/IntersectCard/index.js +9 -2
- package/components/DataGrid/subcomponents/Cards/subcomponents/LazyLoadCard/index.js +4 -2
- package/components/DataGrid/subcomponents/Cards/types.d.ts +50 -1
- package/components/DataGrid/subcomponents/CheckboxCellAdapter/index.js +5 -2
- package/components/DataGrid/subcomponents/ControlNavigate/ControlNavigate.js +1 -1
- package/components/DataGrid/subcomponents/HeaderActions/index.js +1 -1
- package/components/DataGrid/subcomponents/HeaderActions/subcomponents/RowsCount/index.js +1 -1
- package/components/DataGrid/subcomponents/HeaderActions/subcomponents/Settings/subcomponents/ColumnsConfig/index.js +1 -1
- package/components/DataGrid/subcomponents/HeaderActions/subcomponents/Settings/subcomponents/ColumnsConfigCards/index.js +1 -1
- package/components/DataGrid/subcomponents/HeaderActions/subcomponents/ViewMode/index.js +1 -1
- package/components/DataGrid/subcomponents/HeaderActions/subcomponents/hooks/useModalSettings/index.js +1 -1
- package/components/DataGrid/subcomponents/HeaderActions/subcomponents/hooks/useModalSettingsCards/index.js +1 -1
- package/components/DataGrid/subcomponents/Table/index.js +60 -41
- package/components/DataGrid/subcomponents/Table/subcomponents/CheckboxFormatter.js +16 -18
- package/components/DataGrid/subcomponents/Table/subcomponents/DraggableHeaderRenderer.js +3 -3
- package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/HeaderRenderClick.js +1 -1
- package/components/DataGrid/subcomponents/editors/TextEditor/index.js +1 -1
- package/components/DataGrid/tests/helpers/types.d.ts +3 -0
- package/components/DataGrid/types.d.ts +17 -4
- package/components/Label/Label.js +1 -1
- package/components/ObjectLogs/slots/ObjectLogsSlots.js +3 -5
- package/components/PaperForm/PaperForm.js +1 -1
- package/components/PaperForm/components/Header.js +7 -9
- package/components/PaperForm/styles.js +4 -9
- package/components/PaperForm/types.d.ts +2 -3
- package/components/Stepper/Stepper.styles.js +0 -2
- package/components/Stepper/dictionary.js +1 -0
- package/components/Stepper/subcomponents/StepArea/index.js +115 -7
- package/components/Stepper/subcomponents/StepperButtons/StepperCancelButton/index.d.ts +2 -2
- package/components/Stepper/subcomponents/StepperButtons/StepperCancelButton/index.js +53 -3
- package/components/Stepper/subcomponents/StepperButtons/StepperNextButton/index.js +2 -3
- package/components/Stepper/subcomponents/StepperButtons/StepperPrevButton/index.js +2 -3
- package/components/Stepper/subcomponents/StepperButtons/StepperSubmitButton/index.js +5 -24
- package/components/Stepper/subcomponents/StepperContent/subcomponents/Step/index.js +51 -2
- package/components/Stepper/types.d.ts +0 -4
- package/components/ToastContainer/ToastContainer.js +0 -1
- package/components/ToastContainer/constants.d.ts +1 -1
- package/components/ToastContainer/constants.js +1 -1
- package/components/WindowBase/contexts/WindowToolsMFContext/WindowToolsMFContext.js +3 -47
- package/components/WindowBase/contexts/WindowToolsMFContext/types.d.ts +1 -1
- package/components/WindowBase/subcomponents/Component/index.d.ts +1 -12
- package/components/WindowBase/subcomponents/Component/index.js +2 -56
- package/components/WindowBase/subcomponents/Component/types.d.ts +0 -1
- package/components/WindowBase/types.d.ts +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.js +0 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useWindow.js +1 -1
- package/components/areas/contexts/AreasContext/store.js +1 -5
- package/components/areas/contexts/AreasContext/types.d.ts +1 -1
- package/components/formatters/IconsFormatter/IconsFormatter.d.ts +6 -0
- package/components/formatters/IconsFormatter/IconsFormatter.js +22 -0
- package/components/formatters/IconsFormatter/IconsFormatter.styles.d.ts +2 -0
- package/components/formatters/IconsFormatter/IconsFormatter.styles.js +29 -0
- package/components/formatters/IconsFormatter/constants.d.ts +1 -0
- package/components/formatters/IconsFormatter/constants.js +4 -0
- package/components/{DataGrid/formatters/ColumnIconFormatter → formatters/IconsFormatter}/helpers/renderIcon.d.ts +2 -2
- package/components/formatters/IconsFormatter/helpers/renderIcon.js +24 -0
- package/components/formatters/IconsFormatter/helpers/renderMultipleIcons.d.ts +7 -0
- package/components/formatters/IconsFormatter/helpers/renderMultipleIcons.js +16 -0
- package/components/formatters/IconsFormatter/index.d.ts +3 -0
- package/components/formatters/IconsFormatter/index.js +1 -0
- package/components/formatters/IconsFormatter/slots/IconsFormatterEnum.d.ts +5 -0
- package/components/formatters/IconsFormatter/slots/IconsFormatterEnum.js +9 -0
- package/components/formatters/IconsFormatter/slots/IconsFormatterSlots.d.ts +9 -0
- package/components/formatters/IconsFormatter/slots/IconsFormatterSlots.js +22 -0
- package/components/formatters/IconsFormatter/types.d.ts +57 -0
- package/components/formatters/IconsFormatter/types.js +1 -0
- package/components/formatters/TagsFormatter/TagsFormatter.d.ts +5 -0
- package/components/formatters/TagsFormatter/TagsFormatter.js +28 -0
- package/components/formatters/TagsFormatter/TagsFormatter.styles.d.ts +2 -0
- package/components/formatters/TagsFormatter/TagsFormatter.styles.js +41 -0
- package/components/formatters/TagsFormatter/constants.d.ts +5 -0
- package/components/formatters/TagsFormatter/constants.js +11 -0
- package/components/formatters/TagsFormatter/helpers/renderMultipleTag.d.ts +8 -0
- package/components/formatters/TagsFormatter/helpers/renderMultipleTag.js +19 -0
- package/components/formatters/TagsFormatter/helpers/renderTag.d.ts +7 -0
- package/components/formatters/TagsFormatter/helpers/renderTag.js +9 -0
- package/components/formatters/TagsFormatter/helpers/validateHexColor.d.ts +8 -0
- package/components/formatters/TagsFormatter/helpers/validateHexColor.js +9 -0
- package/components/formatters/TagsFormatter/index.d.ts +2 -0
- package/components/formatters/TagsFormatter/index.js +1 -0
- package/components/formatters/TagsFormatter/slots/TagsFormatterEnum.d.ts +5 -0
- package/components/formatters/TagsFormatter/slots/TagsFormatterEnum.js +9 -0
- package/components/formatters/TagsFormatter/slots/TagsFormatterSlots.d.ts +6 -0
- package/components/formatters/TagsFormatter/slots/TagsFormatterSlots.js +16 -0
- package/components/formatters/TagsFormatter/subcomponents/Tag/Tag.d.ts +5 -0
- package/components/formatters/TagsFormatter/subcomponents/Tag/Tag.js +35 -0
- package/components/formatters/TagsFormatter/subcomponents/Tag/index.d.ts +0 -0
- package/components/formatters/TagsFormatter/types.d.ts +47 -0
- package/components/formatters/index.d.ts +6 -5
- package/components/hook-form/RHFormContext/styles.js +1 -2
- package/components/mui_extended/CircularProgress/types.d.ts +1 -1
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/store.js +1 -5
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/types.d.ts +1 -1
- package/components/popups/components/PopupsProvider/hooks/usePopups.d.ts +4 -2
- package/components/popups/components/PopupsProvider/hooks/usePopups.js +7 -19
- package/components/popups/components/PopupsViewer/PopupsViewer.js +1 -1
- package/components/popups/components/PopupsViewer/PopupsViewer.styles.js +1 -1
- package/components/popups/components/PopupsViewer/subcomponents/Popup/Popup.js +21 -32
- package/contexts/ModalContext/index.js +5 -5
- package/index.js +32 -28
- package/package.json +1 -1
- package/components/DataGrid/formatters/ColumnIconFormatter/constants.js +0 -4
- package/components/DataGrid/formatters/ColumnIconFormatter/helpers/renderIcon.js +0 -58
- package/components/DataGrid/formatters/ColumnIconFormatter/helpers/renderMultipleIcons.d.ts +0 -7
- package/components/DataGrid/formatters/ColumnIconFormatter/helpers/renderMultipleIcons.js +0 -19
- package/components/Stepper/subcomponents/StepArea/hooks/useStepArea.d.ts +0 -13
- package/components/Stepper/subcomponents/StepArea/hooks/useStepArea.js +0 -111
- package/components/Stepper/subcomponents/StepArea/hooks/useVisibileSteps.d.ts +0 -8
- package/components/Stepper/subcomponents/StepArea/hooks/useVisibileSteps.js +0 -79
- package/components/Stepper/subcomponents/StepperContent/subcomponents/Step/hooks/useIsStepVisible.d.ts +0 -8
- package/components/Stepper/subcomponents/StepperContent/subcomponents/Step/hooks/useIsStepVisible.js +0 -93
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef, useRef, useEffect
|
|
2
|
+
import { forwardRef, useRef, useEffect } from "react";
|
|
3
3
|
import { shallow } from "zustand/shallow";
|
|
4
4
|
import { u as usePopupsStore } from "../../../PopupsProvider/hooks/usePopupsStore.js";
|
|
5
5
|
import { P as PopupDragWindowRootStyled } from "../../slots/popupsViewerSlots.js";
|
|
@@ -9,11 +9,10 @@ import { a as POPUPS_VIEWER_CLASS_NAME } from "../../constants.js";
|
|
|
9
9
|
import { a as getNameDataTestId } from "../../../../../../test/getNameDataTestId.js";
|
|
10
10
|
import { M as MemonizedWindowBaseMicroFrontend } from "../../../../../WindowBase/subcomponents/MicroFrontend/MicroFrontend.js";
|
|
11
11
|
import { W as WindowBaseComponent } from "../../../../../WindowBase/subcomponents/Component/index.js";
|
|
12
|
-
import { d as deepShallow } from "../../../../../../utils/deepShallow.js";
|
|
13
12
|
import { W as WindowBase } from "../../../../../WindowBase/WindowBase.js";
|
|
14
13
|
const Popup = forwardRef((props, ref) => {
|
|
15
14
|
const { popupId, containerElement, containerSize, style, onResizeStart, onResizeStop, onDragStart, onDragStop, loggedUser } = props;
|
|
16
|
-
const popup = usePopupsStore((state) => state.hashPopups[popupId],
|
|
15
|
+
const popup = usePopupsStore((state) => state.hashPopups[popupId], shallow);
|
|
17
16
|
const { bringPopupOnFront } = usePopupsStore((state) => state.popupsActions, shallow);
|
|
18
17
|
const { close } = usePopupsStore((state) => state.popupActions, shallow);
|
|
19
18
|
const refHandler = useRef(null);
|
|
@@ -33,7 +32,6 @@ const Popup = forwardRef((props, ref) => {
|
|
|
33
32
|
windowTools,
|
|
34
33
|
mfProps,
|
|
35
34
|
component,
|
|
36
|
-
componentProps,
|
|
37
35
|
//onTouch,
|
|
38
36
|
memoizedActions,
|
|
39
37
|
loading,
|
|
@@ -77,33 +75,6 @@ const Popup = forwardRef((props, ref) => {
|
|
|
77
75
|
refHandler.current?.ensureVisible();
|
|
78
76
|
}
|
|
79
77
|
}, [popup.enforceVisibleCount, popupId]);
|
|
80
|
-
const memoComponent = useMemo(() => {
|
|
81
|
-
if (winType === "microfrontend") {
|
|
82
|
-
return /* @__PURE__ */ jsx(
|
|
83
|
-
MemonizedWindowBaseMicroFrontend,
|
|
84
|
-
{
|
|
85
|
-
emergeType: "popup",
|
|
86
|
-
moduleId,
|
|
87
|
-
dynamicMFStore,
|
|
88
|
-
windowTools,
|
|
89
|
-
loggedUser,
|
|
90
|
-
...mfProps ?? { debugPort: 0, prefix: "" }
|
|
91
|
-
}
|
|
92
|
-
);
|
|
93
|
-
} else {
|
|
94
|
-
return /* @__PURE__ */ jsx(
|
|
95
|
-
WindowBaseComponent,
|
|
96
|
-
{
|
|
97
|
-
id: popupId,
|
|
98
|
-
emergeType: "popup",
|
|
99
|
-
dynamicMFStore,
|
|
100
|
-
windowTools,
|
|
101
|
-
component,
|
|
102
|
-
componentProps
|
|
103
|
-
}
|
|
104
|
-
);
|
|
105
|
-
}
|
|
106
|
-
}, [winType, component, componentProps, moduleId, dynamicMFStore, windowTools, loggedUser, mfProps, popupId]);
|
|
107
78
|
if (!popup) {
|
|
108
79
|
return null;
|
|
109
80
|
}
|
|
@@ -155,7 +126,25 @@ const Popup = forwardRef((props, ref) => {
|
|
|
155
126
|
"root"
|
|
156
127
|
)
|
|
157
128
|
} : {},
|
|
158
|
-
children:
|
|
129
|
+
children: winType === "microfrontend" ? /* @__PURE__ */ jsx(
|
|
130
|
+
MemonizedWindowBaseMicroFrontend,
|
|
131
|
+
{
|
|
132
|
+
emergeType: "popup",
|
|
133
|
+
moduleId,
|
|
134
|
+
dynamicMFStore,
|
|
135
|
+
windowTools,
|
|
136
|
+
loggedUser,
|
|
137
|
+
...mfProps ?? { debugPort: 0, prefix: "" }
|
|
138
|
+
}
|
|
139
|
+
) : /* @__PURE__ */ jsx(
|
|
140
|
+
WindowBaseComponent,
|
|
141
|
+
{
|
|
142
|
+
emergeType: "popup",
|
|
143
|
+
dynamicMFStore,
|
|
144
|
+
windowTools,
|
|
145
|
+
component
|
|
146
|
+
}
|
|
147
|
+
)
|
|
159
148
|
}
|
|
160
149
|
)
|
|
161
150
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { createContext, useState } from "react";
|
|
2
|
+
import { createContext, useState, useCallback } from "react";
|
|
3
3
|
import { M as ModalDialog } from "../../components/ModalDialog/ModalDialog.js";
|
|
4
4
|
const ModalContext = createContext(null);
|
|
5
5
|
function ModalProvider({ children }) {
|
|
@@ -7,7 +7,7 @@ function ModalProvider({ children }) {
|
|
|
7
7
|
open: false,
|
|
8
8
|
fullScreen: false
|
|
9
9
|
});
|
|
10
|
-
const openModal = (modalOpenProps) => {
|
|
10
|
+
const openModal = useCallback((modalOpenProps) => {
|
|
11
11
|
setModalOptions({
|
|
12
12
|
open: true,
|
|
13
13
|
initialWidth: 300,
|
|
@@ -15,10 +15,10 @@ function ModalProvider({ children }) {
|
|
|
15
15
|
...modalOpenProps,
|
|
16
16
|
isCloseable: modalOpenProps.isCloseable
|
|
17
17
|
});
|
|
18
|
-
};
|
|
19
|
-
const closeModal = () => {
|
|
18
|
+
}, []);
|
|
19
|
+
const closeModal = useCallback(() => {
|
|
20
20
|
setModalOptions((last) => ({ ...last, open: false }));
|
|
21
|
-
};
|
|
21
|
+
}, []);
|
|
22
22
|
return /* @__PURE__ */ jsxs(
|
|
23
23
|
ModalContext.Provider,
|
|
24
24
|
{
|
package/index.js
CHANGED
|
@@ -43,21 +43,22 @@ import { u as u3 } from "./components/DataGrid/formatters/ColumnConcatenatedValu
|
|
|
43
43
|
import { C as C6 } from "./components/DataGrid/formatters/ColumnDateFormatter/formatter.js";
|
|
44
44
|
import { u as u4 } from "./components/DataGrid/formatters/ColumnDateFormatter/useColumnDate.js";
|
|
45
45
|
import { C as C7 } from "./components/DataGrid/formatters/ColumnIconFormatter/formatter.js";
|
|
46
|
-
import { u as u5 } from "./components/DataGrid/formatters/ColumnIconFormatter/useColumnIcon.js";
|
|
47
46
|
import { C as C8 } from "./components/DataGrid/formatters/ColumnInteractiveCheckFormatter/formatter.js";
|
|
48
|
-
import { u as
|
|
47
|
+
import { u as u5 } from "./components/DataGrid/formatters/ColumnInteractiveCheckFormatter/useColumnInteractiveCheck.js";
|
|
49
48
|
import { C as C9 } from "./components/DataGrid/formatters/ColumnNestedValueFormatter/formatter.js";
|
|
50
|
-
import { u as
|
|
49
|
+
import { u as u6 } from "./components/DataGrid/formatters/ColumnNestedValueFormatter/useColumnNestedValue.js";
|
|
51
50
|
import { C as C10 } from "./components/DataGrid/formatters/ColumnPointsFormatter/formatter.js";
|
|
52
|
-
import { u as
|
|
51
|
+
import { u as u7 } from "./components/DataGrid/formatters/ColumnPointsFormatter/useColumnPoints.js";
|
|
53
52
|
import { C as C11 } from "./components/DataGrid/formatters/ColumnPriceFormatter/formatter.js";
|
|
54
|
-
import { u as
|
|
53
|
+
import { u as u8 } from "./components/DataGrid/formatters/ColumnPriceFormatter/useColumnPrice.js";
|
|
55
54
|
import { C as C12 } from "./components/DataGrid/formatters/ColumnSetCheckFormatter/formatter.js";
|
|
56
|
-
import { u as
|
|
55
|
+
import { u as u9 } from "./components/DataGrid/formatters/ColumnSetCheckFormatter/useColumnSetCheck.js";
|
|
57
56
|
import { C as C13 } from "./components/DataGrid/formatters/ColumnUncertaintyFormatter/formatter.js";
|
|
58
|
-
import { u as
|
|
57
|
+
import { u as u10 } from "./components/DataGrid/formatters/ColumnUncertaintyFormatter/useColumnUncertainty.js";
|
|
59
58
|
import { C as C14 } from "./components/DataGrid/formatters/ColumnChipStatusFormatter/formatter.js";
|
|
60
|
-
import { u as
|
|
59
|
+
import { u as u11 } from "./components/DataGrid/formatters/ColumnChipStatusFormatter/useColumnChipStatus.js";
|
|
60
|
+
import { C as C15 } from "./components/DataGrid/formatters/ColumnTagsFormatter/formatter.js";
|
|
61
|
+
import { u as u12 } from "./components/DataGrid/formatters/ColumnTagsFormatter/useColumnTags.js";
|
|
61
62
|
import { D as D3 } from "./components/DragResizeWindowRND/DragResizeWindowRND.js";
|
|
62
63
|
import { d as d2 } from "./components/DragResizeWindowRND/classes/index.js";
|
|
63
64
|
import { W } from "./components/DragResizeWindowRND/constants.js";
|
|
@@ -79,7 +80,7 @@ import { R as R3 } from "./components/extended/React-Json-Viewer/ReactJsonViewer
|
|
|
79
80
|
import { A as A14 } from "./components/mui_extended/Avatar/Avatar.js";
|
|
80
81
|
import { B as B2 } from "./components/mui_extended/BoxIcon/index.js";
|
|
81
82
|
import { B as B3 } from "./components/mui_extended/Breadcrumbs/index.js";
|
|
82
|
-
import { C as
|
|
83
|
+
import { C as C16 } from "./components/mui_extended/CircularProgress/CircularProgress.js";
|
|
83
84
|
import { B as B4 } from "./components/mui_extended/Badge/Badge.js";
|
|
84
85
|
import { L as L3 } from "./components/mui_extended/LinearProgress/index.js";
|
|
85
86
|
import { L as L4 } from "./components/mui_extended/LinkWithRoute/index.js";
|
|
@@ -89,7 +90,7 @@ import { A as A15 } from "./components/mui_extended/Accordion/Accordion.js";
|
|
|
89
90
|
import { T as T3 } from "./components/mui_extended/Tooltip/Tooltip.js";
|
|
90
91
|
import { I as I2 } from "./components/mui_extended/IconButton/IconButton.js";
|
|
91
92
|
import { B as B5 } from "./components/mui_extended/Button/Button.js";
|
|
92
|
-
import { C as
|
|
93
|
+
import { C as C17 } from "./components/mui_extended/CheckBox/CheckBox.js";
|
|
93
94
|
import { I as I3 } from "./components/mui_extended/ImageButton/ImageButton.js";
|
|
94
95
|
import { P as P2 } from "./components/mui_extended/Popover/Popover.js";
|
|
95
96
|
import { S as S4 } from "./components/mui_extended/Select/Select.js";
|
|
@@ -117,10 +118,11 @@ import { B as B6 } from "./components/formatters/BooleanFormatter/BooleanFormatt
|
|
|
117
118
|
import { D as D8, g as g12 } from "./components/formatters/DateFormatter/DateFormatter.js";
|
|
118
119
|
import { U, g as g13 } from "./components/formatters/UncertaintyFormatter/UncertaintyFormatter.js";
|
|
119
120
|
import { P as P3, g as g14 } from "./components/formatters/PointsFormatter/PointsFormatter.js";
|
|
120
|
-
import { C as
|
|
121
|
+
import { C as C18, g as g15 } from "./components/formatters/ConcatenatedFormatter/ConcatenatedFormatter.js";
|
|
121
122
|
import { P as P4, u as u13 } from "./components/formatters/PeriodFormatter/PeriodFormatter.js";
|
|
122
123
|
import { P as P5, g as g16 } from "./components/formatters/PriceFormatter/PriceFormatter.js";
|
|
123
|
-
import {
|
|
124
|
+
import { T as T17 } from "./components/formatters/TagsFormatter/TagsFormatter.js";
|
|
125
|
+
import { C as C19 } from "./components/formatters/ChipStatusFormatter/ChipStatusFormatter.js";
|
|
124
126
|
import { g as g17 } from "./components/formatters/DistanceToNowFormatter/dictionary.js";
|
|
125
127
|
import { D as D9 } from "./components/formatters/DistanceToNowFormatter/DistanceToNowFormatter.js";
|
|
126
128
|
import { u as u14 } from "./components/formatters/DistanceToNowFormatter/hooks/useDistanceToNowFormatter.js";
|
|
@@ -184,8 +186,8 @@ import { P as P11 } from "./components/PrintingSystem/PrintingSystem.js";
|
|
|
184
186
|
import { P as P12 } from "./components/PropertyValue/PropertyValue.js";
|
|
185
187
|
import { S as S8 } from "./components/ScrollBar/ScrollBar.js";
|
|
186
188
|
import { S as S9 } from "./components/SideBar/SideBar.js";
|
|
187
|
-
import { T as
|
|
188
|
-
import { T as
|
|
189
|
+
import { T as T18 } from "./components/ToastContainer/ToastContainer.js";
|
|
190
|
+
import { T as T19 } from "./components/ToastContainer/subcomponents/ToastMessage/ToastMessage.js";
|
|
189
191
|
import { W as W2 } from "./components/WindowBase/WindowBase.js";
|
|
190
192
|
import { u as u16 } from "./components/WindowBase/hooks/useWindowToolsMF/index.js";
|
|
191
193
|
import { u as u17, a as a11 } from "./components/WindowBase/hooks/useDynamicMFParameters/index.js";
|
|
@@ -271,10 +273,10 @@ export {
|
|
|
271
273
|
B3 as Breadcrumbs,
|
|
272
274
|
B5 as Button,
|
|
273
275
|
C as Card,
|
|
274
|
-
|
|
276
|
+
C17 as CheckBox,
|
|
275
277
|
C2 as Chip,
|
|
276
|
-
|
|
277
|
-
|
|
278
|
+
C19 as ChipStatusFormatter,
|
|
279
|
+
C16 as CircularProgress,
|
|
278
280
|
C4 as ColumnBooleanFormatter,
|
|
279
281
|
C14 as ColumnChipStatusFormatter,
|
|
280
282
|
C5 as ColumnConcatenatedValueFormatter,
|
|
@@ -285,8 +287,9 @@ export {
|
|
|
285
287
|
C10 as ColumnPointsFormatter,
|
|
286
288
|
C11 as ColumnPriceFormatter,
|
|
287
289
|
C12 as ColumnSetCheckFormatter,
|
|
290
|
+
C15 as ColumnTagsFormatter,
|
|
288
291
|
C13 as ColumnUncertaintyFormatter,
|
|
289
|
-
|
|
292
|
+
C18 as ConcatenatedFormatter,
|
|
290
293
|
C3 as ContainerFlow,
|
|
291
294
|
b3 as DATAGRID_ROW_HEADER_HEIGHTS,
|
|
292
295
|
a4 as DATAGRID_ROW_HEIGHTS,
|
|
@@ -409,9 +412,10 @@ export {
|
|
|
409
412
|
T7 as TabContext,
|
|
410
413
|
a7 as TabProvider,
|
|
411
414
|
T5 as Tabs,
|
|
415
|
+
T17 as TagsFormatter,
|
|
412
416
|
T2 as TextEditor,
|
|
413
|
-
|
|
414
|
-
|
|
417
|
+
T18 as ToastContainer,
|
|
418
|
+
T19 as ToastMessage,
|
|
415
419
|
T9 as ToggleButton,
|
|
416
420
|
T12 as ToggleButtonRootStyled,
|
|
417
421
|
T11 as ToggleButtonSlots,
|
|
@@ -495,16 +499,16 @@ export {
|
|
|
495
499
|
u20 as useAppearanceComponentStore,
|
|
496
500
|
u as useAreasStore,
|
|
497
501
|
u2 as useColumnBoolean,
|
|
498
|
-
|
|
502
|
+
u11 as useColumnChipStatus,
|
|
499
503
|
u3 as useColumnConcatenatedValue,
|
|
500
504
|
u4 as useColumnDate,
|
|
501
|
-
u5 as
|
|
502
|
-
u6 as
|
|
503
|
-
u7 as
|
|
504
|
-
u8 as
|
|
505
|
-
u9 as
|
|
506
|
-
|
|
507
|
-
|
|
505
|
+
u5 as useColumnInteractiveCheck,
|
|
506
|
+
u6 as useColumnNestedValue,
|
|
507
|
+
u7 as useColumnPoints,
|
|
508
|
+
u8 as useColumnPrice,
|
|
509
|
+
u9 as useColumnSetCheck,
|
|
510
|
+
u12 as useColumnTags,
|
|
511
|
+
u10 as useColumnUncertanity,
|
|
508
512
|
u26 as useComponentSize,
|
|
509
513
|
u19 as useCustomForm,
|
|
510
514
|
u31 as useDataGridPersistence,
|
package/package.json
CHANGED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { C as COLUMN_ICON_KEY_COMPONENT } from "../constants.js";
|
|
4
|
-
import { g as getPropDataTestId } from "../../../../../test/getNameDataTestId.js";
|
|
5
|
-
import { I as IconClickeableStyled, a as IconStyled } from "../../../../ObjectLogs/slots/ObjectLogsSlots.js";
|
|
6
|
-
function renderIcon(iconConfig, key) {
|
|
7
|
-
const {
|
|
8
|
-
iconUrl,
|
|
9
|
-
onClick,
|
|
10
|
-
tooltip,
|
|
11
|
-
dataTestId,
|
|
12
|
-
Component,
|
|
13
|
-
componentProps,
|
|
14
|
-
color,
|
|
15
|
-
visible,
|
|
16
|
-
size
|
|
17
|
-
} = iconConfig;
|
|
18
|
-
if (visible === false) {
|
|
19
|
-
return /* @__PURE__ */ jsx(Fragment, { children: "-" });
|
|
20
|
-
}
|
|
21
|
-
const IconComponent = onClick ? IconClickeableStyled : IconStyled;
|
|
22
|
-
if (Component && Component !== React.Fragment) {
|
|
23
|
-
return /* @__PURE__ */ jsx(
|
|
24
|
-
Component,
|
|
25
|
-
{
|
|
26
|
-
...componentProps,
|
|
27
|
-
...getPropDataTestId(COLUMN_ICON_KEY_COMPONENT, "container", dataTestId),
|
|
28
|
-
children: /* @__PURE__ */ jsx(
|
|
29
|
-
IconComponent,
|
|
30
|
-
{
|
|
31
|
-
src: iconUrl,
|
|
32
|
-
...onClick && { onClick },
|
|
33
|
-
tooltipContent: tooltip,
|
|
34
|
-
instaceDataTestId: dataTestId,
|
|
35
|
-
color,
|
|
36
|
-
size
|
|
37
|
-
}
|
|
38
|
-
)
|
|
39
|
-
},
|
|
40
|
-
key
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
return /* @__PURE__ */ jsx(
|
|
44
|
-
IconComponent,
|
|
45
|
-
{
|
|
46
|
-
src: iconUrl,
|
|
47
|
-
...onClick && { onClick },
|
|
48
|
-
tooltipContent: tooltip,
|
|
49
|
-
instaceDataTestId: dataTestId,
|
|
50
|
-
color,
|
|
51
|
-
size
|
|
52
|
-
},
|
|
53
|
-
key
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
export {
|
|
57
|
-
renderIcon as r
|
|
58
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ColumnIconResponse } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Helper que renderiza múltiples iconos
|
|
4
|
-
* @param iconsConfig - Array de configuraciones de iconos
|
|
5
|
-
* @returns Componente contenedor con múltiples iconos
|
|
6
|
-
*/
|
|
7
|
-
export declare function renderMultipleIcons(iconsConfig: ColumnIconResponse[]): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { a as ColumnIconFormatterStyled } from "../../../slots/DataGridSlot.js";
|
|
3
|
-
import { r as renderIcon } from "./renderIcon.js";
|
|
4
|
-
function renderMultipleIcons(iconsConfig) {
|
|
5
|
-
if (!iconsConfig || iconsConfig.length === 0) {
|
|
6
|
-
return /* @__PURE__ */ jsx(Fragment, { children: "-" });
|
|
7
|
-
}
|
|
8
|
-
const visibleIcons = iconsConfig.filter((icon) => icon.visible !== false);
|
|
9
|
-
if (visibleIcons.length === 0) {
|
|
10
|
-
return /* @__PURE__ */ jsx(Fragment, { children: "-" });
|
|
11
|
-
}
|
|
12
|
-
if (visibleIcons.length === 1) {
|
|
13
|
-
return renderIcon(visibleIcons[0]);
|
|
14
|
-
}
|
|
15
|
-
return /* @__PURE__ */ jsx(ColumnIconFormatterStyled, { children: visibleIcons.map((iconConfig, index) => renderIcon(iconConfig, index)) });
|
|
16
|
-
}
|
|
17
|
-
export {
|
|
18
|
-
renderMultipleIcons as r
|
|
19
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Step } from '../../../types';
|
|
2
|
-
/**
|
|
3
|
-
* useStepArea hook is responsible for managing the step area of the stepper
|
|
4
|
-
*/
|
|
5
|
-
export declare function useStepArea(props: {
|
|
6
|
-
visibleSteps: Step[];
|
|
7
|
-
}): {
|
|
8
|
-
visibleTitle: boolean | undefined;
|
|
9
|
-
orientation: import('../../../types').Orientation | undefined;
|
|
10
|
-
handleStepClick: (targetIndex: number) => Promise<void>;
|
|
11
|
-
steps: Step[];
|
|
12
|
-
currentStep: number;
|
|
13
|
-
};
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { useCallback, useMemo } from "react";
|
|
2
|
-
import { useFormContext } from "react-hook-form";
|
|
3
|
-
import { u as useStepper } from "../../../hooks/useStepper/index.js";
|
|
4
|
-
import { u as useDynamicValidation } from "../../../hooks/useDynamicValidation/index.js";
|
|
5
|
-
import { d as deepShallow } from "../../../../../utils/deepShallow.js";
|
|
6
|
-
function useStepArea(props) {
|
|
7
|
-
const { visibleSteps } = props;
|
|
8
|
-
const { trigger, clearErrors } = useFormContext();
|
|
9
|
-
const {
|
|
10
|
-
activateFieldsValidation,
|
|
11
|
-
startExternalValidation,
|
|
12
|
-
endExternalValidation
|
|
13
|
-
} = useDynamicValidation();
|
|
14
|
-
const {
|
|
15
|
-
currentStep,
|
|
16
|
-
steps,
|
|
17
|
-
visibleTitle,
|
|
18
|
-
setCurrentStep,
|
|
19
|
-
orientation,
|
|
20
|
-
setStepValidationStatus,
|
|
21
|
-
stepValidationStatus
|
|
22
|
-
} = useStepper(
|
|
23
|
-
(state) => ({
|
|
24
|
-
currentStep: state.currentStep,
|
|
25
|
-
steps: state.steps,
|
|
26
|
-
visibleTitle: state.visibleTitle,
|
|
27
|
-
setCurrentStep: state.actions.setCurrentStep,
|
|
28
|
-
indicatorType: state.indicatorType,
|
|
29
|
-
orientation: state.orientation,
|
|
30
|
-
setStepValidationStatus: state.actions.setStepValidationStatus,
|
|
31
|
-
stepValidationStatus: state.stepValidationStatus
|
|
32
|
-
}),
|
|
33
|
-
deepShallow
|
|
34
|
-
);
|
|
35
|
-
const handleStepClick = useCallback(async (targetIndex) => {
|
|
36
|
-
const currentIndex = visibleSteps.findIndex(
|
|
37
|
-
(step) => step.key === steps[currentStep].key
|
|
38
|
-
);
|
|
39
|
-
if (targetIndex === currentIndex) {
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
const isNavigatingForward = targetIndex > currentIndex;
|
|
43
|
-
const targetOriginalIndex = steps.findIndex(
|
|
44
|
-
(s) => s.key === visibleSteps[targetIndex].key
|
|
45
|
-
);
|
|
46
|
-
if (!isNavigatingForward) {
|
|
47
|
-
setCurrentStep(targetOriginalIndex);
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
const isSkippingSteps = targetIndex > currentIndex + 1;
|
|
51
|
-
if (isSkippingSteps) {
|
|
52
|
-
for (let i = currentIndex; i < targetIndex; i++) {
|
|
53
|
-
const step = visibleSteps[i];
|
|
54
|
-
const stepOriginalIndex = steps.findIndex((s) => s.key === step.key);
|
|
55
|
-
startExternalValidation();
|
|
56
|
-
const isValid = await trigger(step.validationFields);
|
|
57
|
-
endExternalValidation();
|
|
58
|
-
if (!isValid) {
|
|
59
|
-
setCurrentStep(stepOriginalIndex);
|
|
60
|
-
setStepValidationStatus(stepOriginalIndex, false);
|
|
61
|
-
activateFieldsValidation(step.validationFields || []);
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
setStepValidationStatus(stepOriginalIndex, true);
|
|
65
|
-
}
|
|
66
|
-
} else {
|
|
67
|
-
const currentStepData = visibleSteps[currentIndex];
|
|
68
|
-
const currentStepOriginalIndex = steps.findIndex(
|
|
69
|
-
(s) => s.key === currentStepData.key
|
|
70
|
-
);
|
|
71
|
-
startExternalValidation();
|
|
72
|
-
const isCurrentValid = await trigger(currentStepData.validationFields);
|
|
73
|
-
endExternalValidation();
|
|
74
|
-
if (!isCurrentValid) {
|
|
75
|
-
setStepValidationStatus(currentStepOriginalIndex, false);
|
|
76
|
-
activateFieldsValidation(currentStepData.validationFields || []);
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
setStepValidationStatus(currentStepOriginalIndex, true);
|
|
80
|
-
}
|
|
81
|
-
setCurrentStep(targetOriginalIndex);
|
|
82
|
-
if (isNavigatingForward) {
|
|
83
|
-
const currentStepData = visibleSteps[currentIndex];
|
|
84
|
-
const currentStepOriginalIndex = steps.findIndex(
|
|
85
|
-
(s) => s.key === currentStepData.key
|
|
86
|
-
);
|
|
87
|
-
const isCurrentStepValid = stepValidationStatus[currentStepOriginalIndex] !== false;
|
|
88
|
-
if (isCurrentStepValid) {
|
|
89
|
-
const targetStep = visibleSteps[targetIndex];
|
|
90
|
-
const targetStepFields = targetStep.validationFields || [];
|
|
91
|
-
if (targetStepFields.length > 0) {
|
|
92
|
-
clearErrors(targetStepFields);
|
|
93
|
-
setTimeout(() => {
|
|
94
|
-
clearErrors(targetStepFields);
|
|
95
|
-
setStepValidationStatus(targetOriginalIndex, true);
|
|
96
|
-
}, 100);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}, [visibleSteps, steps, setCurrentStep, currentStep, startExternalValidation, trigger, endExternalValidation, setStepValidationStatus, activateFieldsValidation, stepValidationStatus, clearErrors]);
|
|
101
|
-
return useMemo(() => ({
|
|
102
|
-
visibleTitle,
|
|
103
|
-
orientation,
|
|
104
|
-
handleStepClick,
|
|
105
|
-
steps,
|
|
106
|
-
currentStep
|
|
107
|
-
}), [visibleTitle, orientation, handleStepClick, steps, currentStep]);
|
|
108
|
-
}
|
|
109
|
-
export {
|
|
110
|
-
useStepArea as u
|
|
111
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Step as StepType } from '../../../types';
|
|
2
|
-
/**
|
|
3
|
-
* useVisibileSteps hook is responsible for calculating the visible steps based on the form values and the visibility data
|
|
4
|
-
* Optimizado con useSyncExternalStore para evitar re-renders innecesarios
|
|
5
|
-
*/
|
|
6
|
-
export declare function useVisibileSteps(): {
|
|
7
|
-
visibleSteps: StepType[];
|
|
8
|
-
};
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { useRef, useCallback, useSyncExternalStore, useMemo } from "react";
|
|
2
|
-
import { useFormContext } from "react-hook-form";
|
|
3
|
-
import { u as useStepper } from "../../../hooks/useStepper/index.js";
|
|
4
|
-
import { e as evaluateVisibilityStepCondition } from "../../../helpers/evaluateVisibilityStepCondition/index.js";
|
|
5
|
-
import { d as deepShallow } from "../../../../../utils/deepShallow.js";
|
|
6
|
-
function calculateVisibleSteps(steps, formValues, visibilityData) {
|
|
7
|
-
return steps.filter(
|
|
8
|
-
(step) => evaluateVisibilityStepCondition(step, formValues || {}, visibilityData || {})
|
|
9
|
-
);
|
|
10
|
-
}
|
|
11
|
-
function generateStepsKey(steps) {
|
|
12
|
-
return steps.map((step) => step.key).join(",");
|
|
13
|
-
}
|
|
14
|
-
function useVisibileSteps() {
|
|
15
|
-
const formContext = useFormContext();
|
|
16
|
-
const {
|
|
17
|
-
steps,
|
|
18
|
-
visibilityData
|
|
19
|
-
} = useStepper(
|
|
20
|
-
(state) => ({
|
|
21
|
-
steps: state.steps,
|
|
22
|
-
visibilityData: state.visibilityData
|
|
23
|
-
}),
|
|
24
|
-
deepShallow
|
|
25
|
-
);
|
|
26
|
-
const previousStepsKeyRef = useRef(null);
|
|
27
|
-
const cachedVisibleStepsRef = useRef([]);
|
|
28
|
-
const listenersRef = useRef(/* @__PURE__ */ new Set());
|
|
29
|
-
const subscribe = useCallback((callback) => {
|
|
30
|
-
listenersRef.current.add(callback);
|
|
31
|
-
const { unsubscribe } = formContext.watch((formValues) => {
|
|
32
|
-
const newVisibleSteps = calculateVisibleSteps(
|
|
33
|
-
steps,
|
|
34
|
-
formValues,
|
|
35
|
-
visibilityData
|
|
36
|
-
);
|
|
37
|
-
const newStepsKey = generateStepsKey(newVisibleSteps);
|
|
38
|
-
if (newStepsKey !== previousStepsKeyRef.current) {
|
|
39
|
-
previousStepsKeyRef.current = newStepsKey;
|
|
40
|
-
cachedVisibleStepsRef.current = newVisibleSteps;
|
|
41
|
-
listenersRef.current.forEach((listener) => listener());
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
return () => {
|
|
45
|
-
listenersRef.current.delete(callback);
|
|
46
|
-
unsubscribe();
|
|
47
|
-
};
|
|
48
|
-
}, [formContext, steps, visibilityData]);
|
|
49
|
-
const getSnapshot = useCallback(() => {
|
|
50
|
-
const formValues = formContext.getValues();
|
|
51
|
-
const currentVisibleSteps = calculateVisibleSteps(
|
|
52
|
-
steps,
|
|
53
|
-
formValues,
|
|
54
|
-
visibilityData
|
|
55
|
-
);
|
|
56
|
-
const stepsKey = generateStepsKey(currentVisibleSteps);
|
|
57
|
-
if (previousStepsKeyRef.current === null) {
|
|
58
|
-
previousStepsKeyRef.current = stepsKey;
|
|
59
|
-
cachedVisibleStepsRef.current = currentVisibleSteps;
|
|
60
|
-
}
|
|
61
|
-
if (stepsKey === previousStepsKeyRef.current) {
|
|
62
|
-
return cachedVisibleStepsRef.current;
|
|
63
|
-
}
|
|
64
|
-
previousStepsKeyRef.current = stepsKey;
|
|
65
|
-
cachedVisibleStepsRef.current = currentVisibleSteps;
|
|
66
|
-
return currentVisibleSteps;
|
|
67
|
-
}, [formContext, steps, visibilityData]);
|
|
68
|
-
const visibleSteps = useSyncExternalStore(
|
|
69
|
-
subscribe,
|
|
70
|
-
getSnapshot,
|
|
71
|
-
getSnapshot
|
|
72
|
-
);
|
|
73
|
-
return useMemo(() => ({
|
|
74
|
-
visibleSteps
|
|
75
|
-
}), [visibleSteps]);
|
|
76
|
-
}
|
|
77
|
-
export {
|
|
78
|
-
useVisibileSteps as u
|
|
79
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { StepProps } from '../../../../../types';
|
|
2
|
-
/**
|
|
3
|
-
* Hook que determina si un step debe ser visible
|
|
4
|
-
* Usa useSyncExternalStore para optimizar re-renders:
|
|
5
|
-
* - Solo re-renderiza el componente si el valor booleano cambia realmente
|
|
6
|
-
* - Aunque el formulario cambie, si la visibilidad sigue siendo la misma, no re-renderiza
|
|
7
|
-
*/
|
|
8
|
-
export declare function useIsStepVisible(props: Pick<StepProps, 'stepKey'>): boolean;
|