@m4l/components 9.1.126 → 9.1.128
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/.storybook/constants.d.ts +1 -0
- package/.storybook/utils/getStylesColorsByMode.d.ts +4 -4
- package/@types/export.d.ts +0 -3
- package/components/LanguagePopover/LanguagePopover.d.ts +14 -7
- package/components/LanguagePopover/LanguagePopover.js +67 -134
- package/components/LanguagePopover/LanguagePopover.styles.d.ts +2 -0
- package/components/LanguagePopover/LanguagePopover.styles.js +19 -0
- package/components/LanguagePopover/constants.d.ts +1 -0
- package/components/LanguagePopover/constants.js +4 -0
- package/components/LanguagePopover/slots/LanguagePopoverEnum.d.ts +5 -0
- package/components/LanguagePopover/slots/LanguagePopoverEnum.js +9 -0
- package/components/LanguagePopover/slots/LanguagePopoverSlots.d.ts +5 -0
- package/components/LanguagePopover/slots/LanguagePopoverSlots.js +24 -0
- package/components/LanguagePopover/tests/LanguagePopover.test.d.ts +1 -0
- package/components/LanguagePopover/types.d.ts +17 -7
- package/components/MFIsolationApp/MFIsolationApp.js +4 -4
- package/components/MenuActions/MenuActions.js +23 -6
- package/components/MenuActions/MenuActions.styles.js +1 -1
- package/components/MenuActions/types.d.ts +6 -1
- package/components/ToastContainer/ToastContainer.styles.js +1 -1
- package/components/WindowBase/WindowBase.js +37 -36
- package/components/WindowBase/WindowBase.styles.js +14 -0
- package/components/WindowBase/slots/WindowBaseEnum.d.ts +2 -1
- package/components/WindowBase/slots/WindowBaseEnum.js +1 -0
- package/components/WindowBase/slots/WindowBaseSlots.d.ts +3 -0
- package/components/WindowBase/slots/WindowBaseSlots.js +9 -4
- package/components/{popups/components/PopupsViewer/subcomponents/Popup/subcomponents/EditionInfo/index.d.ts → WindowBase/subcomponents/EditionInfo/EditionInfo.d.ts} +1 -1
- package/components/{popups/components/PopupsViewer/subcomponents/Popup/subcomponents/EditionInfo/index.js → WindowBase/subcomponents/EditionInfo/EditionInfo.js} +4 -4
- package/components/WindowBase/subcomponents/EditionInfo/types.d.ts +2 -0
- package/components/WindowBase/subcomponents/Header/HeaderWindowBase.js +1 -1
- package/components/WindowBase/types.d.ts +4 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useHeaderActions/useHeaderActions.d.ts +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useHeaderActions/useHeaderActions.js +7 -7
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useWindow/useWindow.js +10 -1
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/PopupsContext.d.ts +3 -9
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/store.d.ts +2 -8
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/store.js +216 -131
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/types.d.ts +75 -0
- package/components/popups/components/PopupsProvider/hooks/useHeaderActionsPopups/helper.d.ts +28 -0
- package/components/popups/components/PopupsProvider/hooks/useHeaderActionsPopups/helper.js +44 -0
- package/components/popups/components/PopupsProvider/hooks/useHeaderActionsPopups/useHeaderActionsPopups.d.ts +21 -0
- package/components/popups/components/PopupsProvider/hooks/useHeaderActionsPopups/useHeaderActionsPopups.js +157 -0
- package/components/popups/components/PopupsProvider/hooks/usePopops/usePopups.d.ts +28 -0
- package/components/popups/components/PopupsProvider/hooks/usePopops/usePopups.js +117 -0
- package/components/popups/components/PopupsProvider/tests/PopupsProvider.test.d.ts +1 -0
- package/components/popups/components/PopupsViewer/PopupsViewer.d.ts +27 -4
- package/components/popups/components/PopupsViewer/PopupsViewer.js +2 -3
- package/components/popups/components/PopupsViewer/PopupsViewer.styles.js +7 -10
- package/components/popups/components/PopupsViewer/constants.d.ts +1 -0
- package/components/popups/components/PopupsViewer/constants.js +3 -1
- package/components/popups/components/PopupsViewer/slots/popupsViewerSlots.d.ts +3 -3
- package/components/popups/components/PopupsViewer/slots/popupsViewerSlots.js +10 -15
- package/components/popups/components/PopupsViewer/slots/slots.d.ts +2 -2
- package/components/popups/components/PopupsViewer/slots/slots.js +1 -1
- package/components/popups/components/PopupsViewer/subcomponents/Popup/Popup.js +134 -0
- package/components/popups/components/PopupsViewer/tests/PopupsViewer.test.d.ts +1 -0
- package/components/popups/components/PopupsViewer/types.d.ts +2 -0
- package/index.js +8 -7
- package/mockServiceWorker.js +1 -1
- package/package.json +1 -1
- package/vendor.js +2 -1
- package/components/LanguagePopover/classes/constants.d.ts +0 -1
- package/components/LanguagePopover/classes/constants.js +0 -4
- package/components/LanguagePopover/classes/index.d.ts +0 -12
- package/components/LanguagePopover/classes/index.js +0 -33
- package/components/LanguagePopover/classes/types.d.ts +0 -8
- package/components/LanguagePopover/styles.d.ts +0 -5
- package/components/LanguagePopover/styles.js +0 -30
- package/components/LanguagePopover/tests/constants.d.ts +0 -1
- package/components/LanguagePopover/tests/constants.js +0 -4
- package/components/popups/components/PopupsViewer/stories/basic.stories.d.ts +0 -19
- package/components/popups/components/PopupsViewer/stories/constants.d.ts +0 -6
- package/components/popups/components/PopupsViewer/stories/dictionary.d.ts +0 -1
- package/components/popups/components/PopupsViewer/stories/subcomponents/PopupContentExample.d.ts +0 -4
- package/components/popups/components/PopupsViewer/stories/types.d.ts +0 -3
- package/components/popups/components/PopupsViewer/subcomponents/Popup/index.js +0 -68
- package/components/popups/components/PopupsViewer/subcomponents/Popup/subcomponents/EditionInfo/types.d.ts +0 -2
- package/components/popups/components/PopupsViewer/subcomponents/Popup/subcomponents/Header/index.d.ts +0 -5
- package/components/popups/components/PopupsViewer/subcomponents/Popup/subcomponents/Header/index.js +0 -53
- package/components/popups/components/PopupsViewer/subcomponents/Popup/subcomponents/Header/types.d.ts +0 -2
- /package/components/popups/components/PopupsViewer/subcomponents/Popup/{index.d.ts → Popup.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { u as useComponentSize } from "../../hooks/useComponentSize/useComponentSize.js";
|
|
3
3
|
import { A as AppearanceComponentProvider } from "../../contexts/AppearanceComponentContext/AppearanceComponentContext.js";
|
|
4
4
|
import { g as getPropDataTestId } from "../../test/getNameDataTestId.js";
|
|
@@ -6,9 +6,10 @@ import { W as WINDOW_BASE_KEY_COMPONENT } from "./constants.js";
|
|
|
6
6
|
import { a as getComponentSlotRoot } from "../../utils/getComponentSlotRoot.js";
|
|
7
7
|
import clsx from "clsx";
|
|
8
8
|
import { H as HeaderWindowBase } from "./subcomponents/Header/HeaderWindowBase.js";
|
|
9
|
-
import {
|
|
9
|
+
import { E as EditionInfo } from "./subcomponents/EditionInfo/EditionInfo.js";
|
|
10
10
|
import { W as WindowBaseStyled, C as ContentWindowStyled, L as LinearProgressIndeterminateStyled } from "./slots/WindowBaseSlots.js";
|
|
11
11
|
import { W as WindowBaseSlots } from "./slots/WindowBaseEnum.js";
|
|
12
|
+
import { T as ToastContainer } from "../ToastContainer/ToastContainer.js";
|
|
12
13
|
const WindowBase = (props) => {
|
|
13
14
|
const {
|
|
14
15
|
children,
|
|
@@ -23,6 +24,7 @@ const WindowBase = (props) => {
|
|
|
23
24
|
isLoading,
|
|
24
25
|
windowId,
|
|
25
26
|
onMouseDown,
|
|
27
|
+
editionInfo,
|
|
26
28
|
...other
|
|
27
29
|
} = props;
|
|
28
30
|
const { currentSize } = useComponentSize(size);
|
|
@@ -33,40 +35,39 @@ const WindowBase = (props) => {
|
|
|
33
35
|
windowBaseVariant: variant,
|
|
34
36
|
windowBaseSize: normalizedSize
|
|
35
37
|
};
|
|
36
|
-
return /* @__PURE__ */
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
] });
|
|
38
|
+
return /* @__PURE__ */ jsx(AppearanceComponentProvider, { defaultSize: currentSize, children: /* @__PURE__ */ jsxs(
|
|
39
|
+
WindowBaseStyled,
|
|
40
|
+
{
|
|
41
|
+
className: clsx(getComponentSlotRoot(WINDOW_BASE_KEY_COMPONENT), className),
|
|
42
|
+
...getPropDataTestId(WINDOW_BASE_KEY_COMPONENT, WindowBaseSlots.wrapperWindowBase, dataTestId),
|
|
43
|
+
ownerState,
|
|
44
|
+
onMouseDown,
|
|
45
|
+
children: [
|
|
46
|
+
/* @__PURE__ */ jsx(
|
|
47
|
+
HeaderWindowBase,
|
|
48
|
+
{
|
|
49
|
+
...getPropDataTestId(WINDOW_BASE_KEY_COMPONENT, WindowBaseSlots.headerContentWindowBase, dataTestId),
|
|
50
|
+
version,
|
|
51
|
+
size,
|
|
52
|
+
selected,
|
|
53
|
+
onClose,
|
|
54
|
+
...other
|
|
55
|
+
}
|
|
56
|
+
),
|
|
57
|
+
/* @__PURE__ */ jsx(ToastContainer, { fixed: false, position: "top-right", containerId: windowId }),
|
|
58
|
+
editionInfo && /* @__PURE__ */ jsx(EditionInfo, { editionInfo }),
|
|
59
|
+
/* @__PURE__ */ jsx(
|
|
60
|
+
ContentWindowStyled,
|
|
61
|
+
{
|
|
62
|
+
...getPropDataTestId(WINDOW_BASE_KEY_COMPONENT, WindowBaseSlots.contentWindowBase, dataTestId),
|
|
63
|
+
ownerState,
|
|
64
|
+
children
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
isLoading && /* @__PURE__ */ jsx(LinearProgressIndeterminateStyled, { ownerState: {} })
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
) });
|
|
70
71
|
};
|
|
71
72
|
export {
|
|
72
73
|
WindowBase as W
|
|
@@ -9,6 +9,7 @@ const windowBaseStyles = {
|
|
|
9
9
|
display: "flex",
|
|
10
10
|
flexDirection: "column",
|
|
11
11
|
borderRadius: theme.vars.size.borderRadius.r1,
|
|
12
|
+
overflow: "hidden",
|
|
12
13
|
...ownerState?.windowBaseVariant === "outlined" && {
|
|
13
14
|
border: theme.vars.size.borderStroke.container,
|
|
14
15
|
...ownerState?.windowBaseSelected ? {
|
|
@@ -183,6 +184,19 @@ const windowBaseStyles = {
|
|
|
183
184
|
linearProgressIndeterminate: ({ theme }) => ({
|
|
184
185
|
borderBottomRightRadius: theme.vars.size.borderRadius.r0,
|
|
185
186
|
borderBottomLeftRadius: theme.vars.size.borderRadius.r0
|
|
187
|
+
}),
|
|
188
|
+
/**
|
|
189
|
+
* Styles for the content of the edition info.
|
|
190
|
+
*/
|
|
191
|
+
contentEditionInfo: ({ theme }) => ({
|
|
192
|
+
display: "flex",
|
|
193
|
+
alignItems: "center",
|
|
194
|
+
flexDirection: "row",
|
|
195
|
+
justifyContent: "flex-end",
|
|
196
|
+
alignSelf: "stretch",
|
|
197
|
+
gap: theme.vars.size.baseSpacings.sp2,
|
|
198
|
+
paddingRight: theme.vars.size.baseSpacings.sp3,
|
|
199
|
+
color: theme.vars.palette.text.secondary
|
|
186
200
|
})
|
|
187
201
|
};
|
|
188
202
|
export {
|
|
@@ -11,5 +11,6 @@ export declare enum WindowBaseSlots {
|
|
|
11
11
|
menuActionsWindowBase = "menuActionsWindowBase",
|
|
12
12
|
iconsWrapperWindowBase = "iconsWrapperWindowBase",
|
|
13
13
|
headerWindowComponent = "headerWindowComponent",
|
|
14
|
-
linearProgressIndeterminate = "linearProgressIndeterminate"
|
|
14
|
+
linearProgressIndeterminate = "linearProgressIndeterminate",
|
|
15
|
+
contentEditionInfo = "contentEditionInfo"
|
|
15
16
|
}
|
|
@@ -12,6 +12,7 @@ var WindowBaseSlots = /* @__PURE__ */ ((WindowBaseSlots2) => {
|
|
|
12
12
|
WindowBaseSlots2["iconsWrapperWindowBase"] = "iconsWrapperWindowBase";
|
|
13
13
|
WindowBaseSlots2["headerWindowComponent"] = "headerWindowComponent";
|
|
14
14
|
WindowBaseSlots2["linearProgressIndeterminate"] = "linearProgressIndeterminate";
|
|
15
|
+
WindowBaseSlots2["contentEditionInfo"] = "contentEditionInfo";
|
|
15
16
|
return WindowBaseSlots2;
|
|
16
17
|
})(WindowBaseSlots || {});
|
|
17
18
|
export {
|
|
@@ -79,3 +79,6 @@ export declare const MenuActionsWindowsStyled: import('@emotion/styled').StyledC
|
|
|
79
79
|
export declare const LinearProgressIndeterminateStyled: import('@emotion/styled').StyledComponent<Pick<import('../../LinearProgressIndeterminate/types').LinearProgressIndeterminateProps, keyof import('../../LinearProgressIndeterminate/types').LinearProgressIndeterminateProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('..').WindowBaseOwnerState> & Record<string, unknown> & {
|
|
80
80
|
ownerState: Partial<import('..').WindowBaseOwnerState> & Record<string, unknown>;
|
|
81
81
|
}, {}, {}>;
|
|
82
|
+
export declare const ContentEditionInfoStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('..').WindowBaseOwnerState> & Record<string, unknown> & {
|
|
83
|
+
ownerState: Partial<import('..').WindowBaseOwnerState> & Record<string, unknown>;
|
|
84
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('react').ClassAttributes<HTMLDivElement>>, {}>;
|
|
@@ -58,6 +58,10 @@ const LinearProgressIndeterminateStyled = styled(LinearProgressIndeterminate, {
|
|
|
58
58
|
name: WINDOW_BASE_KEY_COMPONENT,
|
|
59
59
|
slot: WindowBaseSlots.linearProgressIndeterminate
|
|
60
60
|
})(windowBaseStyles.linearProgressIndeterminate);
|
|
61
|
+
const ContentEditionInfoStyled = styled("div", {
|
|
62
|
+
name: WINDOW_BASE_KEY_COMPONENT,
|
|
63
|
+
slot: WindowBaseSlots.contentEditionInfo
|
|
64
|
+
})(windowBaseStyles?.contentEditionInfo);
|
|
61
65
|
export {
|
|
62
66
|
ContentWindowStyled as C,
|
|
63
67
|
HeaderWindowComponentStyled as H,
|
|
@@ -68,8 +72,9 @@ export {
|
|
|
68
72
|
SubtitleContainerStyled as S,
|
|
69
73
|
TitleWindowStyled as T,
|
|
70
74
|
WindowBaseStyled as W,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
+
ContentEditionInfoStyled as a,
|
|
76
|
+
HeaderContentStyled as b,
|
|
77
|
+
PointIconStyled as c,
|
|
78
|
+
SubtitleWindowStyled as d,
|
|
79
|
+
IconsWrapperStyled as e
|
|
75
80
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEnvironment } from "@m4l/core";
|
|
3
|
-
import { P as POPUPS_ICONS } from "
|
|
4
|
-
import {
|
|
5
|
-
import { I as Icon } from "
|
|
3
|
+
import { P as POPUPS_ICONS } from "../../../popups/components/PopupsViewer/icons.js";
|
|
4
|
+
import { a as ContentEditionInfoStyled } from "../../slots/WindowBaseSlots.js";
|
|
5
|
+
import { I as Icon } from "../../../Icon/Icon.js";
|
|
6
6
|
const EditionInfo = (props) => {
|
|
7
7
|
const { editionInfo } = props;
|
|
8
8
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
9
|
-
return /* @__PURE__ */ jsxs(
|
|
9
|
+
return /* @__PURE__ */ jsxs(ContentEditionInfoStyled, { ownerState: { editionInfo }, children: [
|
|
10
10
|
/* @__PURE__ */ jsx(
|
|
11
11
|
Icon,
|
|
12
12
|
{
|
|
@@ -6,7 +6,7 @@ import { d as dragResizeWindowClasses } from "../../../DragResizeWindow/classes/
|
|
|
6
6
|
import { I as IconButton } from "../../../mui_extended/IconButton/IconButton.js";
|
|
7
7
|
import { deepEqual } from "fast-equals";
|
|
8
8
|
import { M as MemoizedIconButton } from "../MemoizedIconButton/MemoizedIconButton.js";
|
|
9
|
-
import { H as HeaderWindowComponentStyled,
|
|
9
|
+
import { H as HeaderWindowComponentStyled, b as HeaderContentStyled, I as IconWindowStyled, T as TitleWindowStyled, S as SubtitleContainerStyled, P as PointStyled, c as PointIconStyled, d as SubtitleWindowStyled, e as IconsWrapperStyled, M as MenuActionsWindowsStyled } from "../../slots/WindowBaseSlots.js";
|
|
10
10
|
const HeaderWindowBase = (props) => {
|
|
11
11
|
const {
|
|
12
12
|
title,
|
|
@@ -132,6 +132,10 @@ export interface WindowBaseProps {
|
|
|
132
132
|
* "onMouseDown" event handler for the window.
|
|
133
133
|
*/
|
|
134
134
|
onMouseDown?: React.MouseEventHandler<HTMLDivElement>;
|
|
135
|
+
/**
|
|
136
|
+
* Additional information displayed in the window.
|
|
137
|
+
*/
|
|
138
|
+
editionInfo?: string;
|
|
135
139
|
}
|
|
136
140
|
/**
|
|
137
141
|
* Type representing the possible values of `WindowBaseSlots`.
|
|
@@ -15,9 +15,9 @@ interface UseHeaderActionsParams {
|
|
|
15
15
|
* @returns {Object} Un objeto con tres arrays: leftActions, menuActions y rightActions.
|
|
16
16
|
* @example
|
|
17
17
|
* const { leftActions, menuActions, rightActions } = useHeaderActions({
|
|
18
|
-
* moduleActions: misAcciones,
|
|
19
18
|
* windowId: 'win_456',
|
|
20
19
|
* areaId: 'area_123',
|
|
20
|
+
* menuActions: [],
|
|
21
21
|
* });
|
|
22
22
|
*/
|
|
23
23
|
export declare const useHeaderActions: ({ windowId, areaId, menuActions, }: UseHeaderActionsParams) => {
|
|
@@ -74,18 +74,18 @@ const useHeaderActions = ({
|
|
|
74
74
|
}, [menuActions]);
|
|
75
75
|
const collapsed = useAreasStore(
|
|
76
76
|
(state) => {
|
|
77
|
-
const
|
|
78
|
-
if (currentBreakpoint) {
|
|
79
|
-
return
|
|
77
|
+
const area = state.hashAreas[areaId];
|
|
78
|
+
if (area && area.currentBreakpoint && area.layouts && area.layouts[area.currentBreakpoint]) {
|
|
79
|
+
return area.layouts[area.currentBreakpoint].find(
|
|
80
80
|
(li) => li.i === windowId
|
|
81
|
-
)?.colapsed;
|
|
81
|
+
)?.colapsed || false;
|
|
82
82
|
}
|
|
83
83
|
return false;
|
|
84
84
|
},
|
|
85
85
|
shallow
|
|
86
86
|
);
|
|
87
87
|
const maximizedId = useAreasStore(
|
|
88
|
-
(state) => state.hashAreas[areaId]
|
|
88
|
+
(state) => state.hashAreas[areaId]?.maximizedId,
|
|
89
89
|
shallow
|
|
90
90
|
);
|
|
91
91
|
const { maximizeLayout, normalizeLayouts, colapseLayoutItem, unColapseLayoutItem } = useAreasStore((state) => state.areaActions);
|
|
@@ -97,7 +97,7 @@ const useHeaderActions = ({
|
|
|
97
97
|
iconUrl: maximizedId ? `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.NORMALIZE}` : `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.MAXIMIZE}`,
|
|
98
98
|
label: maximizedId ? getLabel(getAreasDictionary(AREAS_DICCTIONARY.label_minimize_window)) : getLabel(getAreasDictionary(AREAS_DICCTIONARY.label_maximize_window)),
|
|
99
99
|
/**
|
|
100
|
-
*
|
|
100
|
+
* Acción de maximize/normalize.
|
|
101
101
|
*/
|
|
102
102
|
onClick: () => {
|
|
103
103
|
if (maximizedId) {
|
|
@@ -115,7 +115,7 @@ const useHeaderActions = ({
|
|
|
115
115
|
iconUrl: !collapsed ? `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.COLAPSE}` : `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.UNCOLPASE}`,
|
|
116
116
|
label: !collapsed ? getLabel(getAreasDictionary(AREAS_DICCTIONARY.label_collapse_window)) : getLabel(getAreasDictionary(AREAS_DICCTIONARY.label_uncollapse_window)),
|
|
117
117
|
/**
|
|
118
|
-
*
|
|
118
|
+
* Acción de collapse/expand.
|
|
119
119
|
*/
|
|
120
120
|
onClick: () => {
|
|
121
121
|
if (collapsed) {
|
|
@@ -47,7 +47,16 @@ const useWindow = (areaId, windowId) => {
|
|
|
47
47
|
stopProgress: () => stopProgress(windowId),
|
|
48
48
|
setFnQueryClose: (fnQueryClose) => setFnQueryClose(windowId, fnQueryClose),
|
|
49
49
|
toast: createToaster(windowId),
|
|
50
|
-
setWindowTitle: (newTitle) => setWindowTitle(windowId, newTitle)
|
|
50
|
+
setWindowTitle: (newTitle) => setWindowTitle(windowId, newTitle),
|
|
51
|
+
setEditionInfo: (editionInfo) => {
|
|
52
|
+
throw new Error(`setEditionInfo not implemented: ${editionInfo}`);
|
|
53
|
+
},
|
|
54
|
+
hide: () => {
|
|
55
|
+
throw new Error("hide not implemented");
|
|
56
|
+
},
|
|
57
|
+
show: () => {
|
|
58
|
+
throw new Error("show not implemented");
|
|
59
|
+
}
|
|
51
60
|
}),
|
|
52
61
|
[windowId, version, setActions, getCookie, getCookies, setCookie, close, startProgress, stopProgress, setFnQueryClose, setWindowTitle]
|
|
53
62
|
);
|
package/components/popups/components/PopupsProvider/contexts/PopupsContext/PopupsContext.d.ts
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { PopupsProviderProps } from './types';
|
|
3
|
-
declare const PopupsContext: React.Context<(Omit<
|
|
4
|
-
setState<
|
|
5
|
-
type: unknown;
|
|
6
|
-
}>(partial: import('./types').PopupsStateWithActions | Partial<import('./types').PopupsStateWithActions> | ((state: import('./types').PopupsStateWithActions) => import('./types').PopupsStateWithActions | Partial<import('./types').PopupsStateWithActions>), replace?: boolean | undefined, action?: A | undefined): void;
|
|
7
|
-
}, "setState"> & {
|
|
8
|
-
setState(nextStateOrUpdater: import('./types').PopupsStateWithActions | Partial<import('./types').PopupsStateWithActions> | ((state: import('immer/dist/internal').WritableDraft<import('./types').PopupsStateWithActions>) => void), shouldReplace?: boolean | undefined, action?: string | {
|
|
9
|
-
type: unknown;
|
|
10
|
-
} | undefined): void;
|
|
3
|
+
declare const PopupsContext: React.Context<(Omit<import('zustand').StoreApi<import('./types').PopupsStateWithActions>, "setState"> & {
|
|
4
|
+
setState(nextStateOrUpdater: import('./types').PopupsStateWithActions | Partial<import('./types').PopupsStateWithActions> | ((state: import('immer/dist/internal').WritableDraft<import('./types').PopupsStateWithActions>) => void), shouldReplace?: boolean | undefined): void;
|
|
11
5
|
}) | null>;
|
|
12
6
|
/**
|
|
13
7
|
* Provedor del contexto de los popups.
|
|
@@ -16,7 +10,7 @@ declare const PopupsContext: React.Context<(Omit<Omit<import('zustand').StoreApi
|
|
|
16
10
|
* @returns
|
|
17
11
|
*/
|
|
18
12
|
/**
|
|
19
|
-
*
|
|
13
|
+
* Proveedor de los popups
|
|
20
14
|
*/
|
|
21
15
|
declare function PopupsProvider(props: PopupsProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
22
16
|
export { PopupsProvider, PopupsContext };
|
|
@@ -7,13 +7,7 @@ import { PopupsStateWithActions, InitialPopupsStoreProps } from './types';
|
|
|
7
7
|
/**
|
|
8
8
|
* Crea el store de los popups
|
|
9
9
|
*/
|
|
10
|
-
export declare const createPopupsStore: (initProps: InitialPopupsStoreProps) => Omit<
|
|
11
|
-
setState<
|
|
12
|
-
type: unknown;
|
|
13
|
-
}>(partial: PopupsStateWithActions | Partial<PopupsStateWithActions> | ((state: PopupsStateWithActions) => PopupsStateWithActions | Partial<PopupsStateWithActions>), replace?: boolean | undefined, action?: A | undefined): void;
|
|
14
|
-
}, "setState"> & {
|
|
15
|
-
setState(nextStateOrUpdater: PopupsStateWithActions | Partial<PopupsStateWithActions> | ((state: import('immer/dist/internal').WritableDraft<PopupsStateWithActions>) => void), shouldReplace?: boolean | undefined, action?: string | {
|
|
16
|
-
type: unknown;
|
|
17
|
-
} | undefined): void;
|
|
10
|
+
export declare const createPopupsStore: (initProps: InitialPopupsStoreProps) => Omit<import('zustand').StoreApi<PopupsStateWithActions>, "setState"> & {
|
|
11
|
+
setState(nextStateOrUpdater: PopupsStateWithActions | Partial<PopupsStateWithActions> | ((state: import('immer/dist/internal').WritableDraft<PopupsStateWithActions>) => void), shouldReplace?: boolean | undefined): void;
|
|
18
12
|
};
|
|
19
13
|
export type PopupsStoreWithActionsType = ReturnType<typeof createPopupsStore>;
|