@m4l/components 9.1.127 → 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/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/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
package/index.js
CHANGED
|
@@ -99,7 +99,7 @@ import { W as W3 } from "./components/WindowBase/WindowBase.js";
|
|
|
99
99
|
import { W as W4 } from "./components/WindowBase/constants.js";
|
|
100
100
|
import { I as I4 } from "./components/WindowBase/icons.js";
|
|
101
101
|
import { W as W5 } from "./components/WindowBase/slots/WindowBaseEnum.js";
|
|
102
|
-
import { C as C13,
|
|
102
|
+
import { a as a7, C as C13, b as b3, H as H2, I as I5, e as e2, L as L7, M as M4, c as c4, P as P6, S as S3, d as d5, T as T3, W as W6 } from "./components/WindowBase/slots/WindowBaseSlots.js";
|
|
103
103
|
import { H as H3 } from "./components/WindowBase/subcomponents/Header/HeaderWindowBase.js";
|
|
104
104
|
import { L as L8 } from "./components/LoadingError/LoadingError.js";
|
|
105
105
|
import { g as g16 } from "./components/LoadingError/dictionary.js";
|
|
@@ -199,7 +199,7 @@ import { g as g28 } from "./utils/getSizeStyles/getSizeStyles.js";
|
|
|
199
199
|
import { O as O2 } from "./utils/ObjectQueue.js";
|
|
200
200
|
import { g as g29, a as a15 } from "./utils/getComponentSlotRoot.js";
|
|
201
201
|
import { f } from "./utils/formatDistanceToNow/formatDistanteToNow.js";
|
|
202
|
-
import { W as W7, c as c6, b as b4, a as a16, e as
|
|
202
|
+
import { W as W7, c as c6, b as b4, a as a16, e as e3, d as d7, f as f2 } from "./vendor.js";
|
|
203
203
|
export {
|
|
204
204
|
A5 as AREAS_DICCTIONARY,
|
|
205
205
|
a4 as AREAS_DICTIONARY_ID,
|
|
@@ -239,6 +239,7 @@ export {
|
|
|
239
239
|
C11 as ColumnSetCheckFormatter,
|
|
240
240
|
C3 as ColumnUncertaintyFormatter,
|
|
241
241
|
C2 as ConcatenatedFormatter,
|
|
242
|
+
a7 as ContentEditionInfoStyled,
|
|
242
243
|
C13 as ContentWindowStyled,
|
|
243
244
|
D6 as DICTIONARY,
|
|
244
245
|
D as DataGrid,
|
|
@@ -253,7 +254,7 @@ export {
|
|
|
253
254
|
F2 as FormProviderCustom,
|
|
254
255
|
G as GridLayout,
|
|
255
256
|
H5 as HamburgerMenu,
|
|
256
|
-
|
|
257
|
+
b3 as HeaderContentStyled,
|
|
257
258
|
H3 as HeaderWindowBase,
|
|
258
259
|
H2 as HeaderWindowComponentStyled,
|
|
259
260
|
H4 as HelmetPage,
|
|
@@ -263,7 +264,7 @@ export {
|
|
|
263
264
|
I6 as IconButton,
|
|
264
265
|
I2 as IconButtonAnimate,
|
|
265
266
|
I5 as IconWindowStyled,
|
|
266
|
-
|
|
267
|
+
e2 as IconsWrapperStyled,
|
|
267
268
|
I3 as Image,
|
|
268
269
|
I7 as ImageButton,
|
|
269
270
|
L2 as LABEL_FILTER_BUTTON,
|
|
@@ -298,7 +299,7 @@ export {
|
|
|
298
299
|
P7 as PaperForm,
|
|
299
300
|
P3 as PeriodFormatter,
|
|
300
301
|
P as PeriodRootStyled,
|
|
301
|
-
|
|
302
|
+
c4 as PointIconStyled,
|
|
302
303
|
P6 as PointStyled,
|
|
303
304
|
P2 as PointsFormatter,
|
|
304
305
|
P14 as Popover,
|
|
@@ -341,7 +342,7 @@ export {
|
|
|
341
342
|
S4 as SplitLayout,
|
|
342
343
|
S9 as Stack,
|
|
343
344
|
S3 as SubtitleContainerStyled,
|
|
344
|
-
|
|
345
|
+
d5 as SubtitleWindowStyled,
|
|
345
346
|
T14 as TOGGLE_BUTTON_KEY_COMPONENT,
|
|
346
347
|
T18 as TOGGLE_ICON_BUTTON_KEY_COMPONENT,
|
|
347
348
|
T7 as Tab,
|
|
@@ -376,7 +377,7 @@ export {
|
|
|
376
377
|
c6 as WithFormAutoValidation,
|
|
377
378
|
b4 as WithForms,
|
|
378
379
|
a16 as WithPopupsProvider,
|
|
379
|
-
|
|
380
|
+
e3 as WithScaleIcons,
|
|
380
381
|
d7 as WithWindowsContainer,
|
|
381
382
|
f2 as WithWrapper,
|
|
382
383
|
c3 as addLayoutItemToBreakPointIfNoExists,
|
package/mockServiceWorker.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* - Please do NOT serve this file on production.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
const PACKAGE_VERSION = '2.7.
|
|
11
|
+
const PACKAGE_VERSION = '2.7.0'
|
|
12
12
|
const INTEGRITY_CHECKSUM = '00729d72e3b82faf54ca8b9621dbb96f'
|
|
13
13
|
const IS_MOCKED_RESPONSE = Symbol('isMockedResponse')
|
|
14
14
|
const activeClientIds = new Set()
|
package/package.json
CHANGED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Meta } from '@storybook/react';
|
|
2
|
-
import { PopupsViewer } from '../PopupsViewer';
|
|
3
|
-
import { StoryPopusProviderType } from './types';
|
|
4
|
-
declare const meta: Meta<typeof PopupsViewer>;
|
|
5
|
-
export default meta;
|
|
6
|
-
/**
|
|
7
|
-
* PopupsViewer con los 3 diferentes tipos de cabeceras que puede tener un popup
|
|
8
|
-
* - Popup sólo con titulo
|
|
9
|
-
* - Popup con titulo y subtitulo
|
|
10
|
-
* - Popup con titulo y Edition info
|
|
11
|
-
*/
|
|
12
|
-
export declare const Base: StoryPopusProviderType;
|
|
13
|
-
/**
|
|
14
|
-
* PopupsViewer en version small con los 3 diferentes tipos de cabeceras que puede tener un popup
|
|
15
|
-
* - Popup sólo con titulo
|
|
16
|
-
* - Popup con titulo y subtitulo
|
|
17
|
-
* - Popup con titulo y Edition info
|
|
18
|
-
*/
|
|
19
|
-
export declare const VariantSmall: StoryPopusProviderType;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { PopupsProviderProps } from '../../PopupsProvider/contexts/PopupsContext/types';
|
|
2
|
-
export declare const heightWindow = 180;
|
|
3
|
-
export declare const widthWindow = 260;
|
|
4
|
-
export declare const marginWindow = 10;
|
|
5
|
-
export declare const baseIntialPopups: PopupsProviderProps['initialPopups'];
|
|
6
|
-
export declare const variantSmallIntialPopups: PopupsProviderProps['initialPopups'];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const PopupsViewerDictionary: string[];
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
|
-
import { shallow } from "zustand/shallow";
|
|
4
|
-
import { H as Header } from "./subcomponents/Header/index.js";
|
|
5
|
-
import { u as usePopupsStore } from "../../../PopupsProvider/hooks/usePopupsStore/index.js";
|
|
6
|
-
import { E as EditionInfo } from "./subcomponents/EditionInfo/index.js";
|
|
7
|
-
import { P as PopupDragWindowRootStyled, a as PopupContentRootStyled, b as PopupContentWrapperStyled } from "../../slots/popupsViewerSlots.js";
|
|
8
|
-
const Popup = forwardRef((props, ref) => {
|
|
9
|
-
const { popupId, containerElement, containerSize, style } = props;
|
|
10
|
-
const popup = usePopupsStore((state) => state.hashPopups[popupId], shallow);
|
|
11
|
-
const { setPopupOnFront: setPopupOnTop } = usePopupsStore((state) => state.popupsActions, shallow);
|
|
12
|
-
const {
|
|
13
|
-
status,
|
|
14
|
-
subTitle,
|
|
15
|
-
editionInfo,
|
|
16
|
-
zIndex,
|
|
17
|
-
variant = "normal",
|
|
18
|
-
draggable = true,
|
|
19
|
-
resizable = true,
|
|
20
|
-
defaultPosition,
|
|
21
|
-
bounds,
|
|
22
|
-
onMouseDown,
|
|
23
|
-
...others
|
|
24
|
-
} = popup || {};
|
|
25
|
-
const ownerState = {
|
|
26
|
-
status,
|
|
27
|
-
variant,
|
|
28
|
-
subTitle,
|
|
29
|
-
editionInfo,
|
|
30
|
-
zIndex
|
|
31
|
-
};
|
|
32
|
-
const onMouseDownLocal = (e) => {
|
|
33
|
-
setPopupOnTop(popupId);
|
|
34
|
-
if (onMouseDown) {
|
|
35
|
-
onMouseDown(e);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
if (!popup) {
|
|
39
|
-
return null;
|
|
40
|
-
}
|
|
41
|
-
return /* @__PURE__ */ jsxs(
|
|
42
|
-
PopupDragWindowRootStyled,
|
|
43
|
-
{
|
|
44
|
-
ownerState,
|
|
45
|
-
ref,
|
|
46
|
-
hidden: popup.status === "hidden",
|
|
47
|
-
onMouseDown: onMouseDownLocal,
|
|
48
|
-
containerElement,
|
|
49
|
-
containerSize,
|
|
50
|
-
bounds,
|
|
51
|
-
draggable,
|
|
52
|
-
resizeable: resizable,
|
|
53
|
-
defaultPosition,
|
|
54
|
-
style: { ...style, zIndex },
|
|
55
|
-
...others,
|
|
56
|
-
children: [
|
|
57
|
-
/* @__PURE__ */ jsx(Header, { popupId: popup.popupId }),
|
|
58
|
-
/* @__PURE__ */ jsxs(PopupContentRootStyled, { ownerState, children: [
|
|
59
|
-
popup.editionInfo && /* @__PURE__ */ jsx(EditionInfo, { editionInfo: popup.editionInfo }),
|
|
60
|
-
/* @__PURE__ */ jsx(PopupContentWrapperStyled, { ownerState, children: popup.functionComponent && popup.functionComponent({ ...popup.componentProps }) })
|
|
61
|
-
] })
|
|
62
|
-
]
|
|
63
|
-
}
|
|
64
|
-
);
|
|
65
|
-
});
|
|
66
|
-
export {
|
|
67
|
-
Popup as P
|
|
68
|
-
};
|
package/components/popups/components/PopupsViewer/subcomponents/Popup/subcomponents/Header/index.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useEnvironment } from "@m4l/core";
|
|
3
|
-
import { shallow } from "zustand/shallow";
|
|
4
|
-
import { u as usePopupsStore } from "../../../../../PopupsProvider/hooks/usePopupsStore/index.js";
|
|
5
|
-
import { P as POPUPS_ICONS } from "../../../../icons.js";
|
|
6
|
-
import { d as PopupHeaderContainerStyled, e as PopupHeaderTitleStyled, f as PopupHeaderSubTitleStyled } from "../../../../slots/popupsViewerSlots.js";
|
|
7
|
-
import { d as dragResizeWindowClasses } from "../../../../../../../DragResizeWindow/classes/index.js";
|
|
8
|
-
import { I as IconButton } from "../../../../../../../mui_extended/IconButton/IconButton.js";
|
|
9
|
-
import { I as Icon } from "../../../../../../../Icon/Icon.js";
|
|
10
|
-
const Header = (props) => {
|
|
11
|
-
const { popupId } = props;
|
|
12
|
-
const { host_static_assets, environment_assets } = useEnvironment();
|
|
13
|
-
const popup = usePopupsStore((state) => state.hashPopups[popupId], shallow);
|
|
14
|
-
const { status, subTitle, zIndex, variant } = popup || {};
|
|
15
|
-
const ownerState = {
|
|
16
|
-
status,
|
|
17
|
-
variant,
|
|
18
|
-
subTitle,
|
|
19
|
-
zIndex
|
|
20
|
-
};
|
|
21
|
-
const { closePopup } = usePopupsStore((state) => state.popupsActions, shallow);
|
|
22
|
-
const { iconUrl } = popup || {};
|
|
23
|
-
const onClose = () => {
|
|
24
|
-
closePopup(popupId);
|
|
25
|
-
};
|
|
26
|
-
if (!popup) {
|
|
27
|
-
return null;
|
|
28
|
-
}
|
|
29
|
-
return /* @__PURE__ */ jsxs(
|
|
30
|
-
PopupHeaderContainerStyled,
|
|
31
|
-
{
|
|
32
|
-
ownerState,
|
|
33
|
-
className: dragResizeWindowClasses.draggableHandle,
|
|
34
|
-
children: [
|
|
35
|
-
/* @__PURE__ */ jsx(Icon, { src: iconUrl, size: "small" }),
|
|
36
|
-
/* @__PURE__ */ jsx(PopupHeaderTitleStyled, { ownerState: { ...popup }, children: popup.title }),
|
|
37
|
-
popup.subTitle && /* @__PURE__ */ jsx(PopupHeaderSubTitleStyled, { ownerState, children: popup.subTitle }),
|
|
38
|
-
/* @__PURE__ */ jsx(
|
|
39
|
-
IconButton,
|
|
40
|
-
{
|
|
41
|
-
className: dragResizeWindowClasses.draggableCancel,
|
|
42
|
-
onClick: onClose,
|
|
43
|
-
"aria-label": "click",
|
|
44
|
-
src: `${host_static_assets}/${environment_assets}/frontend/commons/assets/icons/${POPUPS_ICONS.CLOSE}`
|
|
45
|
-
}
|
|
46
|
-
)
|
|
47
|
-
]
|
|
48
|
-
}
|
|
49
|
-
);
|
|
50
|
-
};
|
|
51
|
-
export {
|
|
52
|
-
Header as H
|
|
53
|
-
};
|
/package/components/popups/components/PopupsViewer/subcomponents/Popup/{index.d.ts → Popup.d.ts}
RENAMED
|
File without changes
|