@m4l/components 9.17.1-beta-feature-731-m4l-components-code-editor.0 → 9.18.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.
- package/@types/types.d.ts +0 -11
- package/components/CommonActions/components/ActionFormCancel/ActionFormCancel.d.ts +2 -1
- package/components/CommonActions/components/ActionFormCancel/ActionFormCancel.d.ts.map +1 -1
- package/components/CommonActions/components/ActionFormCancel/ActionFormCancel.js +30 -41
- package/components/CommonActions/components/ActionFormCancel/types.d.ts +2 -2
- package/components/CommonActions/index.d.ts +1 -0
- package/components/CommonActions/index.d.ts.map +1 -1
- package/components/DragResizeWindowRND/DragResizeWindowRND.d.ts +3 -14
- package/components/DragResizeWindowRND/DragResizeWindowRND.d.ts.map +1 -1
- package/components/DragResizeWindowRND/DragResizeWindowRND.js +105 -119
- package/components/DragResizeWindowRND/helpers/index.d.ts +1 -0
- package/components/DragResizeWindowRND/helpers/index.d.ts.map +1 -1
- package/components/DragResizeWindowRND/helpers/resizeHandles.d.ts +15 -0
- package/components/DragResizeWindowRND/helpers/resizeHandles.d.ts.map +1 -0
- package/components/DragResizeWindowRND/helpers/resizeHandles.js +68 -0
- package/components/DragResizeWindowRND/types.d.ts +3 -1
- package/components/DragResizeWindowRND/types.d.ts.map +1 -1
- package/components/WindowBase/WindowBase.d.ts.map +1 -1
- package/components/WindowBase/WindowBase.js +49 -49
- package/components/WindowBase/WindowBase.styles.d.ts +1 -1
- package/components/WindowBase/WindowBase.styles.d.ts.map +1 -1
- package/components/WindowBase/WindowBase.styles.js +37 -12
- package/components/WindowBase/contexts/WindowToolsMFContext/types.d.ts +19 -34
- package/components/WindowBase/contexts/WindowToolsMFContext/types.d.ts.map +1 -1
- package/components/WindowBase/subcomponents/Header/HeaderWindowBase.js +18 -18
- package/components/areas/components/AreasAdmin/AreasAdmin.d.ts +2 -5
- package/components/areas/components/AreasAdmin/AreasAdmin.d.ts.map +1 -1
- package/components/areas/components/AreasAdmin/AreasAdmin.js +24 -24
- package/components/areas/components/AreasAdmin/helper.d.ts +1 -4
- package/components/areas/components/AreasAdmin/helper.d.ts.map +1 -1
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/AreaChip.d.ts +2 -26
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/AreaChip.d.ts.map +1 -1
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/AreaChip.js +72 -71
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/AreaChipMobile.d.ts +1 -1
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/AreaChipMobile.js +17 -17
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/ChipMobile/ChipMobile.d.ts +2 -24
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/ChipMobile/ChipMobile.d.ts.map +1 -1
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/ChipMobile/ChipMobile.js +58 -57
- package/components/areas/components/AreasAdmin/types.d.ts +9 -9
- package/components/areas/components/AreasViewer/AreasViewer.styles.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/AreasViewer.styles.js +174 -6
- package/components/areas/components/AreasViewer/constants.d.ts +12 -0
- package/components/areas/components/AreasViewer/constants.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/constants.js +5 -2
- package/components/areas/components/AreasViewer/slots/AreasViewerEnum.d.ts +9 -0
- package/components/areas/components/AreasViewer/slots/AreasViewerEnum.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/slots/AreasViewerEnum.js +2 -2
- package/components/areas/components/AreasViewer/slots/AreasViewerSlots.d.ts +27 -0
- package/components/areas/components/AreasViewer/slots/AreasViewerSlots.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/slots/AreasViewerSlots.js +62 -25
- package/components/areas/components/AreasViewer/subcomponents/Area/Area.d.ts +1 -4
- package/components/areas/components/AreasViewer/subcomponents/Area/Area.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/Area.js +4 -4
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/AreaGridLayout.d.ts +1 -2
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/AreaGridLayout.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/BaseArea.d.ts +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/BaseArea.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/BaseArea.js +12 -11
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/helpers/panelRuntime.d.ts +78 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/helpers/panelRuntime.d.ts.map +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/helpers/panelRuntime.js +86 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/useOverlayPanelResize.d.ts +33 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/useOverlayPanelResize.d.ts.map +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/useOverlayPanelResize.js +91 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/usePanelsByArea.d.ts +6 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/usePanelsByArea.d.ts.map +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/usePanelsByArea.js +45 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/usePinnedPanelResize.d.ts +16 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/usePinnedPanelResize.d.ts.map +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/usePinnedPanelResize.js +105 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/AreaPanels.d.ts +6 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/AreaPanels.d.ts.map +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/AreaPanels.js +158 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelResizeInteractionLayer.d.ts +15 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelResizeInteractionLayer.d.ts.map +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelResizeInteractionLayer.js +19 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelResizeRail.d.ts +14 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelResizeRail.d.ts.map +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelResizeRail.js +35 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelWindow.d.ts +7 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelWindow.d.ts.map +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelWindow.js +68 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/types.d.ts +61 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/types.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.d.ts +3 -6
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.js +45 -45
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useHeaderActions.d.ts +1 -3
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useHeaderActions.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useRightActions.d.ts +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useRightActions.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useRightActions.js +68 -40
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useWindow.d.ts +6 -11
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useWindow.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useWindow.js +77 -76
- package/components/areas/contexts/AreasContext/helpers/generateModuleCount.d.ts +3 -5
- package/components/areas/contexts/AreasContext/helpers/generateModuleCount.d.ts.map +1 -1
- package/components/areas/contexts/AreasContext/helpers/helper.d.ts +20 -15
- package/components/areas/contexts/AreasContext/helpers/helper.d.ts.map +1 -1
- package/components/areas/contexts/AreasContext/helpers/helper.js +8 -7
- package/components/areas/contexts/AreasContext/index.d.ts.map +1 -1
- package/components/areas/contexts/AreasContext/index.js +51 -48
- package/components/areas/contexts/AreasContext/store.d.ts +2 -3
- package/components/areas/contexts/AreasContext/store.d.ts.map +1 -1
- package/components/areas/contexts/AreasContext/store.js +397 -290
- package/components/areas/contexts/AreasContext/types.d.ts +109 -85
- package/components/areas/contexts/AreasContext/types.d.ts.map +1 -1
- package/components/areas/dictionary.d.ts +3 -0
- package/components/areas/dictionary.d.ts.map +1 -1
- package/components/areas/dictionary.js +9 -6
- package/components/areas/hooks/useAreas/index.d.ts +2 -2
- package/components/areas/hooks/useAreas/index.js +4 -4
- package/components/areas/types.d.ts +173 -47
- package/components/areas/types.d.ts.map +1 -1
- package/components/areas/utils/useOnClickOutside/index.d.ts +2 -1
- package/components/areas/utils/useOnClickOutside/index.d.ts.map +1 -1
- package/components/areas/utils/useOnClickOutside/index.js +15 -0
- package/components/extended/index.d.ts +0 -1
- package/components/extended/index.d.ts.map +1 -1
- package/components/hook-form/index.d.ts +0 -1
- package/components/hook-form/index.d.ts.map +1 -1
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/types.d.ts +5 -4
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/types.d.ts.map +1 -1
- package/components/popups/components/PopupsProvider/hooks/usePopups.js +2 -2
- package/hooks/index.d.ts +1 -0
- package/hooks/index.d.ts.map +1 -1
- package/hooks/useWindowCloseGuard/index.d.ts +18 -0
- package/hooks/useWindowCloseGuard/index.d.ts.map +1 -0
- package/hooks/useWindowCloseGuard/index.js +56 -0
- package/index.js +664 -675
- package/package.json +7 -10
- package/test/mocks/dictionary-mock.d.ts +2 -0
- package/test/mocks/dictionary-mock.d.ts.map +1 -1
- package/components/extended/ReactSimpleCodeEditor/CodeEditor.d.ts +0 -6
- package/components/extended/ReactSimpleCodeEditor/CodeEditor.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/CodeEditor.js +0 -247
- package/components/extended/ReactSimpleCodeEditor/CodeEditor.styles.d.ts +0 -3
- package/components/extended/ReactSimpleCodeEditor/CodeEditor.styles.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/CodeEditor.styles.js +0 -297
- package/components/extended/ReactSimpleCodeEditor/constants.d.ts +0 -82
- package/components/extended/ReactSimpleCodeEditor/constants.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/constants.js +0 -149
- package/components/extended/ReactSimpleCodeEditor/dictionary.d.ts +0 -11
- package/components/extended/ReactSimpleCodeEditor/dictionary.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/dictionary.js +0 -7
- package/components/extended/ReactSimpleCodeEditor/helpers/highlighting.d.ts +0 -59
- package/components/extended/ReactSimpleCodeEditor/helpers/highlighting.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/helpers/highlighting.js +0 -1063
- package/components/extended/ReactSimpleCodeEditor/helpers/languageIcon.d.ts +0 -6
- package/components/extended/ReactSimpleCodeEditor/helpers/languageIcon.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/helpers/languageIcon.js +0 -7
- package/components/extended/ReactSimpleCodeEditor/index.d.ts +0 -4
- package/components/extended/ReactSimpleCodeEditor/index.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorEnum.d.ts +0 -18
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorEnum.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorEnum.js +0 -4
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorSlots.d.ts +0 -84
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorSlots.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorSlots.js +0 -63
- package/components/extended/ReactSimpleCodeEditor/slots/index.d.ts +0 -3
- package/components/extended/ReactSimpleCodeEditor/slots/index.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/storybookRuntime.d.ts +0 -15
- package/components/extended/ReactSimpleCodeEditor/storybookRuntime.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/types.d.ts +0 -127
- package/components/extended/ReactSimpleCodeEditor/types.d.ts.map +0 -1
- package/components/hook-form/RHFCodeEditor/RHFCodeEditor.d.ts +0 -7
- package/components/hook-form/RHFCodeEditor/RHFCodeEditor.d.ts.map +0 -1
- package/components/hook-form/RHFCodeEditor/RHFCodeEditor.js +0 -6
- package/components/hook-form/RHFCodeEditor/index.d.ts +0 -3
- package/components/hook-form/RHFCodeEditor/index.d.ts.map +0 -1
|
@@ -7,130 +7,157 @@ import { PopupAddProps } from '../popups/components/PopupsProvider/contexts/Popu
|
|
|
7
7
|
import { DragResizeWindowPropsRND } from '../DragResizeWindowRND/types';
|
|
8
8
|
import { JSX_REACT_NODE, WindowOptions, WinType } from '../WindowBase/types';
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Supported window emergence modes.
|
|
11
11
|
*/
|
|
12
|
-
export type EmergeType = 'layout' | 'popup' | 'modal';
|
|
12
|
+
export type EmergeType = 'layout' | 'popup' | 'modal' | 'panel';
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* Supported window opening modes.
|
|
15
15
|
*/
|
|
16
16
|
export type OpenType = 'normal' | 'maximized';
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Supported docking sides for panel windows.
|
|
19
|
+
*/
|
|
20
|
+
export type PanelSide = 'left' | 'right' | 'top' | 'bottom';
|
|
21
|
+
/**
|
|
22
|
+
* Cookie scopes supported by the Areas runtime.
|
|
19
23
|
*/
|
|
20
24
|
export type CookieType = 'window' | 'module';
|
|
21
25
|
/**
|
|
22
|
-
*
|
|
26
|
+
* Window-level and module-level cookie bags stored per window instance.
|
|
23
27
|
*/
|
|
24
28
|
export type Cookies = {
|
|
25
29
|
moduleCookies: Record<string, any>;
|
|
26
30
|
windowCookies: Record<string, any>;
|
|
27
31
|
};
|
|
28
32
|
/**
|
|
29
|
-
*
|
|
33
|
+
* Window loading lifecycle state.
|
|
30
34
|
*/
|
|
31
35
|
export type WindowStatus = 'init' | 'loading' | 'loaded' | 'error';
|
|
36
|
+
/**
|
|
37
|
+
* Reasons that can trigger a guarded window-close request.
|
|
38
|
+
*/
|
|
39
|
+
export type WindowQueryCloseReason = 'user-close' | 'same-side-replace';
|
|
40
|
+
/**
|
|
41
|
+
* Controls exposed to content that wants to intercept a close request.
|
|
42
|
+
*/
|
|
43
|
+
export type WindowQueryCloseRequest = {
|
|
44
|
+
reason: WindowQueryCloseReason;
|
|
45
|
+
proceed: () => void;
|
|
46
|
+
cancel: () => void;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Optional window-close guard registered by mounted content.
|
|
50
|
+
*/
|
|
51
|
+
export type WindowQueryCloseHandler = (request?: WindowQueryCloseRequest) => void;
|
|
32
52
|
export type WindowState = {
|
|
33
53
|
/**
|
|
34
|
-
*
|
|
54
|
+
* Current loading lifecycle status.
|
|
35
55
|
*/
|
|
36
56
|
status: WindowStatus;
|
|
37
57
|
dynamicMFStore: DynamicMFStore;
|
|
38
58
|
/**
|
|
39
|
-
*
|
|
59
|
+
* Whether the progress bar is visible.
|
|
40
60
|
*/
|
|
41
61
|
loading: boolean;
|
|
42
62
|
/**
|
|
43
|
-
*
|
|
63
|
+
* Microfrontend version reported by the mounted content.
|
|
44
64
|
*/
|
|
45
65
|
version?: string;
|
|
46
66
|
/**
|
|
47
|
-
*
|
|
67
|
+
* Microfrontend build time reported by the mounted content.
|
|
48
68
|
*/
|
|
49
69
|
buildTime?: string;
|
|
50
70
|
/**
|
|
51
|
-
*
|
|
71
|
+
* Actions exposed by the mounted module.
|
|
52
72
|
*/
|
|
53
73
|
moduleActions: ModuleAction[];
|
|
54
74
|
/**
|
|
55
|
-
*
|
|
75
|
+
* Window and module cookies.
|
|
56
76
|
*/
|
|
57
77
|
cookies: Cookies;
|
|
58
78
|
/**
|
|
59
|
-
*
|
|
60
|
-
* @returns void
|
|
79
|
+
* Optional close-confirmation override used by flows such as add/edit MFs.
|
|
61
80
|
*/
|
|
62
|
-
fnQueryClose?:
|
|
81
|
+
fnQueryClose?: WindowQueryCloseHandler;
|
|
63
82
|
/**
|
|
64
|
-
*
|
|
65
|
-
* la ventana cuando se repite un módulo en una misma área
|
|
83
|
+
* Visible module duplicate counter inside the same area.
|
|
66
84
|
*/
|
|
67
85
|
moduleCount?: number;
|
|
68
86
|
};
|
|
69
87
|
/**
|
|
70
|
-
*
|
|
88
|
+
* Base payload fields for a new window emitted through the host event bus.
|
|
71
89
|
*/
|
|
72
90
|
export interface EmmitNewWindowBase {
|
|
73
91
|
/**
|
|
74
|
-
*
|
|
92
|
+
* Emergence mode used to render the window.
|
|
75
93
|
*/
|
|
76
94
|
emergeType: EmergeType;
|
|
77
95
|
/**
|
|
78
|
-
*
|
|
96
|
+
* Window content kind.
|
|
79
97
|
*/
|
|
80
98
|
winType: WinType;
|
|
81
99
|
/**
|
|
82
|
-
*
|
|
100
|
+
* Backend module identifier.
|
|
83
101
|
*/
|
|
84
102
|
moduleId: string;
|
|
85
103
|
/**
|
|
86
|
-
*
|
|
87
|
-
* Los parametros pueden ser datos tipo string, number, boolean, object, array, etc. y tambien pueden ser funciones.
|
|
104
|
+
* Runtime parameters passed to the mounted module or local component.
|
|
88
105
|
*/
|
|
89
106
|
dynamicParams: DynamicMFParameters;
|
|
90
107
|
/**
|
|
91
|
-
*
|
|
108
|
+
* Module icon URL.
|
|
92
109
|
*/
|
|
93
110
|
iconUrl: string;
|
|
94
111
|
/**
|
|
95
|
-
*
|
|
112
|
+
* Window title.
|
|
96
113
|
*/
|
|
97
114
|
title: string;
|
|
98
115
|
/**
|
|
99
|
-
*
|
|
116
|
+
* Optional window subtitle.
|
|
100
117
|
*/
|
|
101
118
|
subTitle?: string;
|
|
102
119
|
/**
|
|
103
|
-
*
|
|
120
|
+
* Optional edit-context label displayed in the shell.
|
|
104
121
|
*/
|
|
105
122
|
editionInfo?: string;
|
|
106
123
|
/**
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
* TODO: Se daño con la migración de ventanas a WindowBase, se debe revisar
|
|
124
|
+
* Window-level options such as cookie persistence controls.
|
|
125
|
+
* TODO: Revisit this after the WindowBase migration.
|
|
110
126
|
*/
|
|
111
127
|
windowOptions?: WindowOptions;
|
|
112
128
|
/**
|
|
113
|
-
*
|
|
129
|
+
* Optional parent window identifier.
|
|
114
130
|
*/
|
|
115
131
|
parentId?: string;
|
|
116
132
|
/**
|
|
117
|
-
*
|
|
133
|
+
* Opening mode.
|
|
118
134
|
*/
|
|
119
135
|
openType?: OpenType;
|
|
120
136
|
/**
|
|
121
|
-
*
|
|
137
|
+
* Reuse key that updates an existing window instead of opening a duplicate.
|
|
122
138
|
*/
|
|
123
139
|
replaceMeId?: string;
|
|
124
140
|
}
|
|
125
141
|
/**
|
|
126
|
-
*
|
|
142
|
+
* Base fields added by the Areas store after a window is created.
|
|
127
143
|
*/
|
|
128
144
|
export interface AreaWindowBaseProps extends EmmitNewWindowBase {
|
|
129
145
|
areaId: string;
|
|
146
|
+
/**
|
|
147
|
+
* Persisted window identifier. Rehydrated windows can receive this value from storage or the backend.
|
|
148
|
+
*/
|
|
130
149
|
windowId: string;
|
|
131
150
|
onClose?: (windowId: string) => void;
|
|
151
|
+
/**
|
|
152
|
+
* Debug-only cookie snapshot used by isolation and local troubleshooting flows.
|
|
153
|
+
*/
|
|
132
154
|
devCookies?: Cookies;
|
|
133
155
|
}
|
|
156
|
+
/**
|
|
157
|
+
* Runtime-managed fields injected by the Areas store after it accepts a launch payload.
|
|
158
|
+
* Emitters must not send these values through the public `NewWindow` contract.
|
|
159
|
+
*/
|
|
160
|
+
type AreaRuntimeManagedKeys = 'windowId' | 'onClose' | 'areaId';
|
|
134
161
|
export interface AreaLayoutBaseProps extends AreaWindowBaseProps {
|
|
135
162
|
emergeType: 'layout';
|
|
136
163
|
layoutProps: Omit<LayoutItem, 'i'>;
|
|
@@ -145,17 +172,23 @@ export interface AreaLayoutComponentProps extends AreaLayoutBaseProps {
|
|
|
145
172
|
}
|
|
146
173
|
export type AreaLayoutProps = AreaLayoutMFProps | AreaLayoutComponentProps;
|
|
147
174
|
export type AreaLayoutStateProps = AreaLayoutProps & WindowState;
|
|
148
|
-
export type EmmitNewLayoutProps = Omit<AreaLayoutMFProps, 'windowId' | 'onClose' | 'areaId'> | Omit<AreaLayoutComponentProps, 'windowId' | 'onClose' | 'areaId'> & {
|
|
149
|
-
winType: string;
|
|
150
|
-
emergeType: string;
|
|
151
|
-
layoutProps: Omit<LayoutItem, 'i'>;
|
|
152
|
-
moduleId: string;
|
|
153
|
-
dynamicParams: Record<string, any>;
|
|
154
|
-
iconUrl: string;
|
|
155
|
-
title: string;
|
|
156
|
-
};
|
|
157
175
|
/**
|
|
158
|
-
*
|
|
176
|
+
* Layout payloads emitted by callers before the Areas store adds runtime state.
|
|
177
|
+
* Keep this derived from the stored layout branches so the omitted runtime-owned
|
|
178
|
+
* fields stay visible in the public contract.
|
|
179
|
+
*/
|
|
180
|
+
export type EmmitNewLayoutBaseProps = Omit<AreaLayoutBaseProps, AreaRuntimeManagedKeys>;
|
|
181
|
+
export type EmmitNewLayoutMFProps = Omit<AreaLayoutMFProps, AreaRuntimeManagedKeys>;
|
|
182
|
+
export type EmmitNewLayoutComponentProps = Omit<AreaLayoutComponentProps, AreaRuntimeManagedKeys>;
|
|
183
|
+
export type EmmitNewLayoutProps = EmmitNewLayoutMFProps | EmmitNewLayoutComponentProps;
|
|
184
|
+
/**
|
|
185
|
+
* Popup-only shell props that do not already travel through the Areas event payload.
|
|
186
|
+
* This intentionally excludes popup store-managed fields such as `popupId`,
|
|
187
|
+
* `groupId`, `dynamicMFStore`, rendered content, and close callbacks.
|
|
188
|
+
* It also preserves the old contract boundary where popup payload authors do
|
|
189
|
+
* not provide shell-owned values such as `title`, `winType`, `mfProps`,
|
|
190
|
+
* `component`, `dynamicParams`, `iconUrl`, `subTitle`, `windowOptions`,
|
|
191
|
+
* `parentLayoutId`, `openType`, `replaceMeId`, `onRemove`, or `parentId`.
|
|
159
192
|
*/
|
|
160
193
|
type PopupPropsForAdd = Partial<Pick<PopupAddProps, 'bounds' | 'defaultPosition' | 'minWidth' | 'minHeight' | 'maxWidth' | 'maxHeight' | 'resizable' | 'draggable'>>;
|
|
161
194
|
export type Position = {
|
|
@@ -167,6 +200,9 @@ export type Position = {
|
|
|
167
200
|
export interface AreaPopupBaseProps extends AreaWindowBaseProps {
|
|
168
201
|
emergeType: 'popup';
|
|
169
202
|
popupProps: PopupPropsForAdd;
|
|
203
|
+
/**
|
|
204
|
+
* Explicit reuse key for popup windows that refresh an existing shell instead of opening a duplicate.
|
|
205
|
+
*/
|
|
170
206
|
replaceMeId?: string;
|
|
171
207
|
}
|
|
172
208
|
export interface AreaPopupMFProps extends AreaPopupBaseProps {
|
|
@@ -193,6 +229,94 @@ export type EmmitNewPopupProps = EmmitNewPopupMFProps | EmmitNewPopupComponentPr
|
|
|
193
229
|
export interface HashWindowsByLayouts {
|
|
194
230
|
[P: string]: AreaLayoutStateProps;
|
|
195
231
|
}
|
|
232
|
+
/**
|
|
233
|
+
* Shared panel-shell props regardless of which side owns the emergence.
|
|
234
|
+
*/
|
|
235
|
+
type AreaPanelBasePropsForAdd = {
|
|
236
|
+
/**
|
|
237
|
+
* Whether the panel should stay docked inside the area flow.
|
|
238
|
+
* Unpinned panels render as overlays.
|
|
239
|
+
*/
|
|
240
|
+
pinned?: boolean;
|
|
241
|
+
};
|
|
242
|
+
/**
|
|
243
|
+
* Horizontal panel props.
|
|
244
|
+
* Left/right panels only accept width-based sizing because they steal or
|
|
245
|
+
* overlay horizontal space inside the work area.
|
|
246
|
+
*/
|
|
247
|
+
export type AreaHorizontalPanelPropsForAdd = AreaPanelBasePropsForAdd & {
|
|
248
|
+
/**
|
|
249
|
+
* Side of the work area where the panel should appear.
|
|
250
|
+
*/
|
|
251
|
+
side: 'left' | 'right';
|
|
252
|
+
/**
|
|
253
|
+
* Preferred panel width for left/right placement.
|
|
254
|
+
*/
|
|
255
|
+
width?: number;
|
|
256
|
+
/**
|
|
257
|
+
* Optional width ceiling used by the panel-only resize affordance.
|
|
258
|
+
*/
|
|
259
|
+
maxWidth?: number;
|
|
260
|
+
/**
|
|
261
|
+
* Horizontal panels do not expose height-based sizing.
|
|
262
|
+
*/
|
|
263
|
+
height?: never;
|
|
264
|
+
/**
|
|
265
|
+
* Horizontal panels do not expose height-based sizing.
|
|
266
|
+
*/
|
|
267
|
+
maxHeight?: never;
|
|
268
|
+
};
|
|
269
|
+
/**
|
|
270
|
+
* Vertical panel props.
|
|
271
|
+
* Top/bottom panels only accept height-based sizing because they steal or
|
|
272
|
+
* overlay vertical space inside the work area.
|
|
273
|
+
*/
|
|
274
|
+
export type AreaVerticalPanelPropsForAdd = AreaPanelBasePropsForAdd & {
|
|
275
|
+
/**
|
|
276
|
+
* Side of the work area where the panel should appear.
|
|
277
|
+
*/
|
|
278
|
+
side: 'top' | 'bottom';
|
|
279
|
+
/**
|
|
280
|
+
* Preferred panel height for top/bottom placement.
|
|
281
|
+
*/
|
|
282
|
+
height?: number;
|
|
283
|
+
/**
|
|
284
|
+
* Optional height ceiling used by the panel-only resize affordance.
|
|
285
|
+
*/
|
|
286
|
+
maxHeight?: number;
|
|
287
|
+
/**
|
|
288
|
+
* Vertical panels do not expose width-based sizing.
|
|
289
|
+
*/
|
|
290
|
+
width?: never;
|
|
291
|
+
/**
|
|
292
|
+
* Vertical panels do not expose width-based sizing.
|
|
293
|
+
*/
|
|
294
|
+
maxWidth?: never;
|
|
295
|
+
};
|
|
296
|
+
/**
|
|
297
|
+
* Panel-specific shell props.
|
|
298
|
+
* Panels can float above the main layout flow or stay pinned inside it.
|
|
299
|
+
*/
|
|
300
|
+
export type AreaPanelPropsForAdd = AreaHorizontalPanelPropsForAdd | AreaVerticalPanelPropsForAdd;
|
|
301
|
+
/**
|
|
302
|
+
* Narrow size updates written back by the panel resize flow.
|
|
303
|
+
* Each branch mirrors the public panel contract so the store only accepts the
|
|
304
|
+
* axis that belongs to the target side.
|
|
305
|
+
*/
|
|
306
|
+
export type AreaPanelSizeUpdate = Pick<AreaHorizontalPanelPropsForAdd, 'width' | 'maxWidth'> | Pick<AreaVerticalPanelPropsForAdd, 'height' | 'maxHeight'>;
|
|
307
|
+
export interface AreaPanelBaseProps extends AreaWindowBaseProps {
|
|
308
|
+
emergeType: 'panel';
|
|
309
|
+
panelProps: AreaPanelPropsForAdd;
|
|
310
|
+
}
|
|
311
|
+
export interface AreaPanelMFProps extends AreaPanelBaseProps {
|
|
312
|
+
winType: 'microfrontend';
|
|
313
|
+
mfProps: MFBaseProps;
|
|
314
|
+
}
|
|
315
|
+
export interface AreaPanelComponentProps extends AreaPanelBaseProps {
|
|
316
|
+
winType: 'component';
|
|
317
|
+
component: JSX_REACT_NODE;
|
|
318
|
+
}
|
|
319
|
+
export type EmmitNewPanelProps = Omit<AreaPanelMFProps, AreaRuntimeManagedKeys> | Omit<AreaPanelComponentProps, AreaRuntimeManagedKeys>;
|
|
196
320
|
type AreaModalPropsForAdd = Pick<DOMRect, 'width' | 'height'> & Pick<DragResizeWindowPropsRND, 'minWindowWidth' | 'minWindowHeight'>;
|
|
197
321
|
export interface AreaModalBaseProps extends AreaWindowBaseProps {
|
|
198
322
|
emergeType: 'modal';
|
|
@@ -207,12 +331,14 @@ export interface AreaModalComponentProps extends AreaModalBaseProps {
|
|
|
207
331
|
winType: 'component';
|
|
208
332
|
component: JSX_REACT_NODE;
|
|
209
333
|
}
|
|
210
|
-
export type EmmitNewModalProps = Omit<AreaModalMFProps,
|
|
211
|
-
export type
|
|
334
|
+
export type EmmitNewModalProps = Omit<AreaModalMFProps, AreaRuntimeManagedKeys> | Omit<AreaModalComponentProps, AreaRuntimeManagedKeys>;
|
|
335
|
+
export type AreaMFWindowProps = (AreaLayoutMFProps & WindowState) | (AreaPopupMFProps & WindowState) | (AreaPanelMFProps & WindowState) | (AreaModalMFProps & WindowState);
|
|
336
|
+
export type AreaComponentWindowProps = (AreaLayoutComponentProps & WindowState) | (AreaPopupComponentProps & WindowState) | (AreaPanelComponentProps & WindowState) | (AreaModalComponentProps & WindowState);
|
|
337
|
+
export type AreaWindowProps = AreaMFWindowProps | AreaComponentWindowProps;
|
|
212
338
|
export interface HashWindows {
|
|
213
339
|
[P: string]: AreaWindowProps;
|
|
214
340
|
}
|
|
215
|
-
export type EmmitNewWindowProps = EmmitNewLayoutProps | EmmitNewPopupProps | EmmitNewModalProps;
|
|
341
|
+
export type EmmitNewWindowProps = EmmitNewLayoutProps | EmmitNewPopupProps | EmmitNewPanelProps | EmmitNewModalProps;
|
|
216
342
|
export type AddWindow = (newWindow: EmmitNewWindowProps) => string;
|
|
217
343
|
export {};
|
|
218
344
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/areas/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oDAAoD,CAAC;AAC9F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oDAAoD,CAAC;AACzF,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,kEAAkE,CAAC;AACjG,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAG7E;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/areas/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oDAAoD,CAAC;AAC9F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oDAAoD,CAAC;AACzF,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,kEAAkE,CAAC;AACj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M,WAAW,gBAAiB,SAAQ,kBAAkB;IAC1D,OAAO,EAAE,eAAe,CAAC;IACzB,OAAO,EAAE,WAAW,CAAC;CACtB;AACD,MAAM,WAAW,uBAAwB,SAAQ,kBAAkB;IACjE,OAAO,EAAE,WAAW,CAAC;IACrB,SAAS,EAAE,cAAc,CAAC;CAC3B;AAGD,MAAM,MAAM,kBAAkB,GAC1B,IAAI,CAAC,gBAAgB,EAAE,sBAAsB,CAAC,GAC9C,IAAI,CAAC,uBAAuB,EAAE,sBAAsB,CAAC,CAAC;AAG1D,MAAM,MAAM,iBAAiB,GACzB,CAAC,iBAAiB,GAAG,WAAW,CAAC,GACjC,CAAC,gBAAgB,GAAG,WAAW,CAAC,GAChC,CAAC,gBAAgB,GAAG,WAAW,CAAC,GAChC,CAAC,gBAAgB,GAAG,WAAW,CAAC,CAAC;AAErC,MAAM,MAAM,wBAAwB,GAChC,CAAC,wBAAwB,GAAG,WAAW,CAAC,GACxC,CAAC,uBAAuB,GAAG,WAAW,CAAC,GACvC,CAAC,uBAAuB,GAAG,WAAW,CAAC,GACvC,CAAC,uBAAuB,GAAG,WAAW,CAAC,CAAC;AAG5C,MAAM,MAAM,eAAe,GAAG,iBAAiB,GAAG,wBAAwB,CAAC;AAG3E,MAAM,WAAW,WAAW;IAC1B,CAAC,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC;CAC9B;AACD,MAAM,MAAM,mBAAmB,GAC3B,mBAAmB,GACnB,kBAAkB,GAClB,kBAAkB,GAClB,kBAAkB,CAAC;AACvB,MAAM,MAAM,SAAS,GAAG,CAAC,SAAS,EAAE,mBAAmB,KAAK,MAAM,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
2
|
type AnyEvent = MouseEvent | TouchEvent;
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Run a handler when a mouse or touch interaction happens outside the target ref.
|
|
5
|
+
* The optional `noRef` acts as an exclusion zone that should not trigger the outside handler.
|
|
5
6
|
*/
|
|
6
7
|
declare function useOnClickOutside<T extends HTMLElement = HTMLElement>(ref: RefObject<T>, handler: (event: AnyEvent) => void, noRef?: RefObject<T>): void;
|
|
7
8
|
export default useOnClickOutside;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/areas/utils/useOnClickOutside/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AAC7C,KAAK,QAAQ,GAAG,UAAU,GAAG,UAAU,CAAC;AACxC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/areas/utils/useOnClickOutside/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AAC7C,KAAK,QAAQ,GAAG,UAAU,GAAG,UAAU,CAAC;AACxC;;;GAGG;AACH,iBAAS,iBAAiB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EAC5D,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC,EACjB,OAAO,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,EAClC,KAAK,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,QA2BrB;AACD,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useEffect as c } from "react";
|
|
2
|
+
function i(e, n, s) {
|
|
3
|
+
c(() => {
|
|
4
|
+
const t = (o) => {
|
|
5
|
+
const r = e?.current, u = s?.current;
|
|
6
|
+
!r || r.contains(o.target) || u || n(o);
|
|
7
|
+
};
|
|
8
|
+
return document.addEventListener("mousedown", t), document.addEventListener("touchstart", t), () => {
|
|
9
|
+
document.removeEventListener("mousedown", t), document.removeEventListener("touchstart", t);
|
|
10
|
+
};
|
|
11
|
+
}, [e, n]);
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
i as default
|
|
15
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/extended/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/extended/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,OAAO,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { RHFAutocomplete } from './RHFAutocomplete/RHFAutocomplete';
|
|
2
2
|
export * from './RHFColorPicker';
|
|
3
|
-
export * from './RHFCodeEditor';
|
|
4
3
|
export { getRHFAutocompleteComponentsDictionary } from './RHFAutocomplete/dictionary';
|
|
5
4
|
export { RHFAutocompleteAsync } from './RHFAutocompleteAsync/RHFAutocompleteAsync';
|
|
6
5
|
export * from './RHFImageSelector';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/hook-form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,cAAc,kBAAkB,CAAC;AACjC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/hook-form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,sCAAsC,EAAE,MAAM,8BAA8B,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACnF,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,2CAA2C,EAAE,MAAM,mCAAmC,CAAC;AAChG,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,qDAAqD,CAAC;AAC1F,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC"}
|
|
@@ -4,6 +4,7 @@ import { PopupStatus } from '../../../PopupsViewer/types';
|
|
|
4
4
|
import { MFBaseProps } from '../../../../../MFLoader/types';
|
|
5
5
|
import { JSX_REACT_NODE, ModuleAction, WindowOptions } from '../../../../../WindowBase/types';
|
|
6
6
|
import { DynamicMFStore } from '../../../../../WindowBase/contexts/DynamicMFParmsContext/store';
|
|
7
|
+
import { WindowQueryCloseHandler } from '../../../../../areas/types';
|
|
7
8
|
export type PopupVariantType = 'normal' | 'small' | 'large';
|
|
8
9
|
type PartialExcept<T, K extends keyof T> = Partial<Omit<T, K>> & Pick<T, K>;
|
|
9
10
|
type PopupSelectedReason = 'add' | 'remove' | 'select';
|
|
@@ -81,9 +82,9 @@ export interface PopupStorePropsBase extends PartialExcept<Pick<DragResizeWindow
|
|
|
81
82
|
*/
|
|
82
83
|
buildTime?: string;
|
|
83
84
|
/**
|
|
84
|
-
*
|
|
85
|
+
* Optional close-confirmation override registered by the mounted content.
|
|
85
86
|
*/
|
|
86
|
-
fnQueryClose?:
|
|
87
|
+
fnQueryClose?: WindowQueryCloseHandler;
|
|
87
88
|
/**
|
|
88
89
|
* "dynamicMFStore" Almacén de microfrontends din
|
|
89
90
|
*/
|
|
@@ -264,9 +265,9 @@ export interface PopupsProviderStoreStateWithActions extends PopupsProviderStore
|
|
|
264
265
|
*/
|
|
265
266
|
bringPopupOnFront: (popupId: string, withEnforceVisible?: boolean) => void;
|
|
266
267
|
/**
|
|
267
|
-
*
|
|
268
|
+
* Replace the default popup close flow with a guarded close handler.
|
|
268
269
|
*/
|
|
269
|
-
setFnQueryClose: (popupId: string, fn:
|
|
270
|
+
setFnQueryClose: (popupId: string, fn: WindowQueryCloseHandler) => void;
|
|
270
271
|
/**
|
|
271
272
|
* removePopupsByGroupId: Elimina los popups de un grupo
|
|
272
273
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/components/src/components/popups/components/PopupsProvider/contexts/PopupsContext/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAC9F,OAAO,EAAE,cAAc,EAAE,MAAM,gEAAgE,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/components/src/components/popups/components/PopupsProvider/contexts/PopupsContext/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAC9F,OAAO,EAAE,cAAc,EAAE,MAAM,gEAAgE,CAAC;AAChG,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAE1E,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC;AAE5D,KAAK,aAAa,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAE5E,KAAK,mBAAmB,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEvD,MAAM,WAAW,mBAAoB,SAAS,aAAa,CAAC,IAAI,CAAC,wBAAwB,EACrF,QAAQ,GACR,iBAAiB,GACjB,UAAU,GACV,WAAW,GACX,UAAU,GACV,WAAW,GACX,WAAW,GACX,WAAW,GACX,4BAA4B,GAC5B,2BAA2B,CAC9B,EAAE,iBAAiB,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,OAAO,EAAE,eAAe,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,KAAK,IAAI,CAAC;QACxC;;WAEG;QACH,UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,EAAG,OAAO,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;KACvG,CAAC;CACH;AACD,MAAM,MAAM,uBAAuB,GAAG,wBAAwB,CAAC;AAC/D,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,wBAAwB,EAAE,YAAY,GAAG,SAAS,CAAC,CAAC;AAE/F,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,wBAAwB,EAAE,YAAY,GAAG,SAAS,CAAC;IACnG;;OAEG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;OAEG;IACH,aAAa,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACpC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CAErB"}
|
|
@@ -61,12 +61,12 @@ const p = (e) => {
|
|
|
61
61
|
m(e, o, P, K);
|
|
62
62
|
},
|
|
63
63
|
/**
|
|
64
|
-
* TODO:
|
|
64
|
+
* TODO: Implement this when popup cookies become first-class runtime data.
|
|
65
65
|
*/
|
|
66
66
|
getCookie: () => {
|
|
67
67
|
},
|
|
68
68
|
/**
|
|
69
|
-
* TODO:
|
|
69
|
+
* TODO: Implement this when popup cookies become first-class runtime data.
|
|
70
70
|
*/
|
|
71
71
|
getCookies: () => ({}),
|
|
72
72
|
setCookie: (o, P) => {
|
package/hooks/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export { getformAddEditDictionary } from './useFormAddEdit/dictionary';
|
|
|
5
5
|
export { useFormFocus } from './useFormFocus';
|
|
6
6
|
export { useInterval } from './useInterval';
|
|
7
7
|
export { useComponentSize } from './useComponentSize';
|
|
8
|
+
export { useWindowCloseGuard } from './useWindowCloseGuard';
|
|
8
9
|
export * from './useSvgColor';
|
|
9
10
|
export { useFormReadyForUpdate } from './useFormReadyForUpdate';
|
|
10
11
|
export { useStateRef } from './useStateRef';
|
package/hooks/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/components/src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/components/src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { WindowQueryCloseRequest } from '../../components/WindowBase/contexts/WindowToolsMFContext/types';
|
|
2
|
+
export type UseWindowCloseGuardParams = {
|
|
3
|
+
confirmMessage: string;
|
|
4
|
+
confirmTitle: string;
|
|
5
|
+
isDirty: boolean;
|
|
6
|
+
linkToCloseWindow?: boolean;
|
|
7
|
+
onAfterClose?: () => void;
|
|
8
|
+
onCancelClose?: (request?: WindowQueryCloseRequest) => void;
|
|
9
|
+
onConfirmClose?: (request?: WindowQueryCloseRequest) => void;
|
|
10
|
+
};
|
|
11
|
+
export type UseWindowCloseGuardResult = {
|
|
12
|
+
requestClose: (request?: WindowQueryCloseRequest) => void;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Provide a reusable guarded-close flow that can also register itself as the window close handler.
|
|
16
|
+
*/
|
|
17
|
+
export declare const useWindowCloseGuard: ({ confirmMessage, confirmTitle, isDirty, linkToCloseWindow, onAfterClose, onCancelClose, onConfirmClose, }: UseWindowCloseGuardParams) => UseWindowCloseGuardResult;
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/hooks/useWindowCloseGuard/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iEAAiE,CAAC;AAG/G,MAAM,MAAM,yBAAyB,GAAG;IACtC,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,aAAa,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,uBAAuB,KAAK,IAAI,CAAC;IAC5D,cAAc,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,uBAAuB,KAAK,IAAI,CAAC;CAC9D,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,YAAY,EAAE,CAAC,OAAO,CAAC,EAAE,uBAAuB,KAAK,IAAI,CAAC;CAC3D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,4GAQjC,yBAAyB,KAAG,yBAgF9B,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { jsx as k } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useRef as n, useCallback as s, useEffect as v } from "react";
|
|
3
|
+
import { useWindowToolsMF as x } from "../../components/WindowBase/hooks/useWindowToolsMF/index.js";
|
|
4
|
+
import { useModal as F } from "../useModal/index.js";
|
|
5
|
+
import { WindowConfirm as M } from "../../components/WindowConfirm/WindowConfirm.js";
|
|
6
|
+
const G = ({
|
|
7
|
+
confirmMessage: f,
|
|
8
|
+
confirmTitle: l,
|
|
9
|
+
isDirty: i,
|
|
10
|
+
linkToCloseWindow: u = !1,
|
|
11
|
+
onAfterClose: a,
|
|
12
|
+
onCancelClose: m,
|
|
13
|
+
onConfirmClose: C
|
|
14
|
+
}) => {
|
|
15
|
+
const { openModal: d } = F(), { close: p, setFnQueryClose: w } = x(), R = n(i), g = n(a), o = n(m), e = n(C);
|
|
16
|
+
R.current = i, g.current = a, o.current = m, e.current = C;
|
|
17
|
+
const t = s((r) => {
|
|
18
|
+
if (e.current) {
|
|
19
|
+
e.current(r);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
r ? r.proceed() : p(!1), g.current?.();
|
|
23
|
+
}, [p]), h = s((r) => {
|
|
24
|
+
if (o.current) {
|
|
25
|
+
o.current(r);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
r?.cancel();
|
|
29
|
+
}, []), c = s((r) => {
|
|
30
|
+
if (R.current) {
|
|
31
|
+
d({
|
|
32
|
+
window: /* @__PURE__ */ k(
|
|
33
|
+
M,
|
|
34
|
+
{
|
|
35
|
+
variant: "warning",
|
|
36
|
+
title: l,
|
|
37
|
+
msg: f,
|
|
38
|
+
onClickIntro: () => t(r),
|
|
39
|
+
onClickCancel: () => h(r)
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
variant: "warning"
|
|
43
|
+
});
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
t(r);
|
|
47
|
+
}, [f, l, h, t, d]);
|
|
48
|
+
return v(() => {
|
|
49
|
+
u && w(c);
|
|
50
|
+
}, [u, c, w]), {
|
|
51
|
+
requestClose: c
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
export {
|
|
55
|
+
G as useWindowCloseGuard
|
|
56
|
+
};
|