@m4l/components 9.1.92 → 9.1.94
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 +44 -35
- package/components/Chip/Chip.d.ts +2 -2
- package/components/Chip/ChipStyles.js +10 -10
- package/components/Chip/index.js +1 -0
- package/components/Chip/types.d.ts +3 -2
- package/components/Chip/types.js +1 -0
- package/components/Color/types.d.ts +8 -0
- package/components/CommonActions/components/ActionFormIntro/index.d.ts +2 -2
- package/components/DataGrid/dictionary.d.ts +1 -1
- package/components/DataGrid/subcomponents/Actions/index.d.ts +1 -1
- package/components/DataGrid/subcomponents/Actions/subcomponents/Density/index.d.ts +1 -1
- package/components/DataGrid/subcomponents/Actions/subcomponents/MobileMenuActions/index.d.ts +1 -1
- package/components/MenuActions/MenuActions.d.ts +1 -1
- package/components/MenuActions/MenuActions.js +2 -1
- package/components/MenuActions/MenuActions.styles.js +19 -5
- package/components/MenuActions/types.d.ts +10 -7
- package/components/Pager/Pager.d.ts +2 -2
- package/components/Pager/Pager.styles.js +8 -8
- package/components/Pager/subcomponents/CustomTablePagination/CustomTablePagination.d.ts +1 -1
- package/components/Pager/subcomponents/CustomTablePagination/types.d.ts +3 -3
- package/components/Pager/subcomponents/PagerActions/PagerActions.d.ts +1 -1
- package/components/PropertyValue/PropertyValue.js +1 -1
- package/components/ToastContainer/ToastContainer.d.ts +4 -0
- package/components/WindowBase/WindowBase.d.ts +1 -1
- package/components/WindowBase/WindowBase.js +36 -31
- package/components/WindowBase/subcomponents/Header/HeaderWindowBase.d.ts +1 -1
- package/components/WindowBase/types.d.ts +6 -1
- package/components/areas/components/AreasAdmin/AreasAdmin.d.ts +13 -0
- package/components/areas/components/AreasAdmin/AreasAdmin.js +163 -0
- package/components/areas/components/AreasAdmin/AreasAdmin.styles.d.ts +2 -0
- package/components/areas/components/AreasAdmin/AreasAdmin.styles.js +264 -0
- package/components/areas/components/AreasAdmin/classes/index.js +1 -2
- package/components/areas/components/AreasAdmin/constants.d.ts +1 -0
- package/components/areas/components/AreasAdmin/constants.js +4 -0
- package/components/areas/components/AreasAdmin/slots/AreasAdminEnum.d.ts +23 -0
- package/components/areas/components/AreasAdmin/slots/AreasAdminEnum.js +27 -0
- package/components/areas/components/AreasAdmin/slots/AreasAdminSlots.d.ts +63 -0
- package/components/areas/components/AreasAdmin/slots/AreasAdminSlots.js +116 -0
- package/components/areas/components/AreasAdmin/slots/index.d.ts +2 -0
- package/components/areas/components/AreasAdmin/slots/index.js +1 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/{index.d.ts → AreaChip.d.ts} +4 -26
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/{index.js → AreaChip.js} +81 -88
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/subcomponents/ChipActionsMobile/ChipActionsMobile.d.ts +8 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/subcomponents/ChipActionsMobile/ChipActionsMobile.js +53 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/subcomponents/ChipActionsMobile/index.d.ts +1 -1
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/types.d.ts +18 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/{index.d.ts → AreaChipMobile.d.ts} +1 -1
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/AreaChipMobile.js +81 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/ChipMobile/ChipMobile.d.ts +2 -3
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/ChipMobile/ChipMobile.js +36 -78
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/PanelWindowPopUp/index.d.ts +1 -1
- package/components/areas/components/AreasAdmin/subcomponents/PanelWindowPopUp/{index.d.ts → PanelWindowPopUp.d.ts} +1 -1
- package/components/areas/components/AreasAdmin/test/AreasAdmin.test.d.ts +1 -0
- package/components/areas/components/AreasAdmin/types.d.ts +47 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/helper.d.ts +23 -3
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/index.d.ts +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/subcomponents/WindowPopUpsList/index.d.ts +1 -1
- package/components/areas/components/index.d.ts +1 -1
- package/components/areas/contexts/AreasContext/index.js +2 -0
- package/components/areas/contexts/AreasContext/store.d.ts +2 -2
- package/components/areas/contexts/AreasContext/store.js +166 -166
- package/components/areas/contexts/AreasContext/types.d.ts +6 -2
- package/components/areas/dictionary.d.ts +1 -0
- package/components/areas/dictionary.js +2 -1
- package/components/areas/icons.d.ts +2 -0
- package/components/areas/icons.js +3 -1
- package/components/areas/types.d.ts +1 -1
- package/components/hook-form/RHFAutocomplete/RFHAutocompleteStyles.js +4 -4
- package/components/hook-form/RHFAutocomplete/RHFAutocomplete.d.ts +2 -2
- package/components/hook-form/RHFCheckbox/RHFCheckbox.d.ts +5 -0
- package/components/hook-form/RHFDateTime/RHFDateTime.d.ts +2 -2
- package/components/hook-form/RHFDateTime/RHFDateTime.styles.js +2 -2
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useRowActionsGetter.d.ts +1 -1
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useRowActionsGetter.d.ts +1 -1
- package/components/mui_extended/Autocomplete/Autocomplete.styles.js +22 -14
- package/components/mui_extended/Badge/slots/BadgeSlots.d.ts +1 -1
- package/components/mui_extended/CheckBox/CheckBox.d.ts +4 -0
- package/components/mui_extended/DateTimePicker/DateTimePicker.d.ts +2 -2
- package/components/mui_extended/DateTimePicker/DateTimePicker.styles.js +14 -14
- package/components/mui_extended/Divider/Divider.d.ts +4 -0
- package/components/mui_extended/IconButton/IconButton.styles.js +6 -6
- package/components/mui_extended/IconButton/slots/IconButtonSlots.d.ts +1 -1
- package/components/mui_extended/MenuItem/MenuItem.styles.js +39 -8
- package/components/mui_extended/MenuItem/slots/MenuItemSlots.js +1 -1
- package/components/mui_extended/NavLink/NavLink.d.ts +4 -0
- package/components/mui_extended/NavLink/NavLink.styles.js +28 -6
- package/components/mui_extended/Popover/Popover.styles.js +4 -4
- package/components/mui_extended/Select/Select.styles.js +5 -5
- package/components/mui_extended/Select/types.d.ts +6 -0
- package/components/mui_extended/Stack/Stack.d.ts +4 -0
- package/index.js +1 -1
- package/package.json +1 -1
- package/components/areas/components/AreasAdmin/index.d.ts +0 -10
- package/components/areas/components/AreasAdmin/index.js +0 -95
- package/components/areas/components/AreasAdmin/styles.js +0 -17
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/styles.js +0 -29
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/subcomponents/ChipActionsMobile/index.js +0 -56
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/index.js +0 -96
- package/components/areas/components/AreasAdmin/subcomponents/PanelWindowPopUp/index.js +0 -54
- package/components/areas/utils/useOnClickOutside/index.js +0 -22
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs, jsx } 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,6 +6,7 @@ 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 { T as ToastContainer } from "../ToastContainer/ToastContainer.js";
|
|
9
10
|
import { W as WindowBaseStyled, C as ContentWindowStyled, L as LinearProgressIndeterminateStyled } from "./slots/WindowBaseSlots.js";
|
|
10
11
|
import { W as WindowBaseSlots } from "./slots/WindowBaseEnum.js";
|
|
11
12
|
const WindowBase = (props) => {
|
|
@@ -20,6 +21,7 @@ const WindowBase = (props) => {
|
|
|
20
21
|
onClose,
|
|
21
22
|
className,
|
|
22
23
|
isLoading,
|
|
24
|
+
windowId,
|
|
23
25
|
...other
|
|
24
26
|
} = props;
|
|
25
27
|
const { currentSize } = useComponentSize(size);
|
|
@@ -30,36 +32,39 @@ const WindowBase = (props) => {
|
|
|
30
32
|
windowBaseVariant: variant,
|
|
31
33
|
windowBaseSize: normalizedSize
|
|
32
34
|
};
|
|
33
|
-
return /* @__PURE__ */
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
-
|
|
35
|
+
return /* @__PURE__ */ jsxs(AppearanceComponentProvider, { defaultSize: currentSize, children: [
|
|
36
|
+
/* @__PURE__ */ jsx(ToastContainer, { fixed: false, position: "top-center", containerId: windowId }),
|
|
37
|
+
/* @__PURE__ */ jsxs(
|
|
38
|
+
WindowBaseStyled,
|
|
39
|
+
{
|
|
40
|
+
className: clsx(getComponentSlotRoot(WINDOW_BASE_KEY_COMPONENT), className),
|
|
41
|
+
...getPropDataTestId(WINDOW_BASE_KEY_COMPONENT, WindowBaseSlots.wrapperWindowBase, dataTestId),
|
|
42
|
+
ownerState,
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ jsx(
|
|
45
|
+
HeaderWindowBase,
|
|
46
|
+
{
|
|
47
|
+
...getPropDataTestId(WINDOW_BASE_KEY_COMPONENT, WindowBaseSlots.headerContentWindowBase, dataTestId),
|
|
48
|
+
version,
|
|
49
|
+
size,
|
|
50
|
+
selected,
|
|
51
|
+
onClose,
|
|
52
|
+
...other
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
/* @__PURE__ */ jsx(
|
|
56
|
+
ContentWindowStyled,
|
|
57
|
+
{
|
|
58
|
+
...getPropDataTestId(WINDOW_BASE_KEY_COMPONENT, WindowBaseSlots.contentWindowBase, dataTestId),
|
|
59
|
+
ownerState,
|
|
60
|
+
children
|
|
61
|
+
}
|
|
62
|
+
),
|
|
63
|
+
isLoading && /* @__PURE__ */ jsx(LinearProgressIndeterminateStyled, { ownerState: {} })
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
] });
|
|
63
68
|
};
|
|
64
69
|
export {
|
|
65
70
|
WindowBase as W
|
|
@@ -40,7 +40,7 @@ import { WindowBaseOwnerState } from '../../types';
|
|
|
40
40
|
* ```
|
|
41
41
|
* @author cesar - automatic
|
|
42
42
|
* @createdAt 2024-11-20 09:38:37 - automatic
|
|
43
|
-
* @updatedAt 2025-01-
|
|
43
|
+
* @updatedAt 2025-01-31 11:37:44 - automatic
|
|
44
44
|
* @updatedUser cesar - automatic
|
|
45
45
|
*/
|
|
46
46
|
export declare const HeaderWindowBase: (props: HeaderProps & WindowBaseOwnerState) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -8,7 +8,7 @@ import { ComponentPalletColor, Sizes } from '@m4l/styles';
|
|
|
8
8
|
* Type representing a single action in the `WindowBase` component.
|
|
9
9
|
* @author cesar - automatic
|
|
10
10
|
* @createdAt 2024-12-23 09:48:25 - automatic
|
|
11
|
-
* @updatedAt 2025-
|
|
11
|
+
* @updatedAt 2025-02-04 15:44:12 - automatic
|
|
12
12
|
* @updatedUser cesar - automatic
|
|
13
13
|
*/
|
|
14
14
|
export interface WindowBaseAction {
|
|
@@ -131,6 +131,11 @@ export interface WindowBaseProps {
|
|
|
131
131
|
* Indicates if the window is in a loading state.
|
|
132
132
|
*/
|
|
133
133
|
isLoading?: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* A unique identifier for the window.
|
|
136
|
+
* This is used to identify and manage multiple windows.
|
|
137
|
+
*/
|
|
138
|
+
windowId?: string;
|
|
134
139
|
}
|
|
135
140
|
/**
|
|
136
141
|
* Type representing the possible values of `WindowBaseSlots`.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AreasAdminProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* AreasAdmin
|
|
4
|
+
* Componente para administrar áreas.
|
|
5
|
+
* Este componente permite al usuario administrar las áreas disponibles,
|
|
6
|
+
* seleccionar un área específica y agregar nuevas áreas.
|
|
7
|
+
* Utiliza hooks como useAreasStore, useEnvironment, useModuleDictionary.
|
|
8
|
+
* @author cesar - automatic
|
|
9
|
+
* @createdAt 2025-01-24 09:29:33 - automatic
|
|
10
|
+
* @updatedAt 2025-02-04 09:25:18 - automatic
|
|
11
|
+
* @updatedUser cesar - automatic
|
|
12
|
+
*/
|
|
13
|
+
export declare const AreasAdmin: (props: AreasAdminProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { u as useAreasStore } from "../../hooks/useAreas/index.js";
|
|
3
|
+
import { useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
4
|
+
import clsx from "clsx";
|
|
5
|
+
import { A as AreaChip } from "./subcomponents/AreaChip/AreaChip.js";
|
|
6
|
+
import { shallow } from "zustand/shallow";
|
|
7
|
+
import { I as ICONS } from "../../icons.js";
|
|
8
|
+
import { S as ScrollBar } from "../../../ScrollBar/index.js";
|
|
9
|
+
import { A as AreaChipMobile } from "./subcomponents/AreaChipMobile/AreaChipMobile.js";
|
|
10
|
+
import { useRef } from "react";
|
|
11
|
+
import { g as getAreasDictionary, A as AREAS_DICCTIONARY } from "../../dictionary.js";
|
|
12
|
+
import { A as AreasAdminRootStyled, a as AreasAdminContentStyled, b as AreasContainerChipIconStyled, c as AreasContainerContentChipsStyled, I as IconButtonAddAreaStyled, d as AreaContentChipStyled, C as ContainerAdminWindowsStyled } from "./slots/AreasAdminSlots.js";
|
|
13
|
+
import { useIsMobile } from "@m4l/graphics";
|
|
14
|
+
import { A as AREAS_ADMIN_KEY_COMPONENT } from "./constants.js";
|
|
15
|
+
import { a as getComponentSlotRoot } from "../../../../utils/getComponentSlotRoot.js";
|
|
16
|
+
import { g as getPropDataTestId } from "../../../../test/getNameDataTestId.js";
|
|
17
|
+
import { u as useComponentSize } from "../../../../hooks/useComponentSize/useComponentSize.js";
|
|
18
|
+
import { T as Typography } from "../../../mui_extended/Typography/Typography.js";
|
|
19
|
+
import { A as AreasAdminSlots } from "./slots/AreasAdminEnum.js";
|
|
20
|
+
import { M as MenuActions } from "../../../MenuActions/MenuActions.js";
|
|
21
|
+
const AreasAdmin = (props) => {
|
|
22
|
+
const {
|
|
23
|
+
color = "primary",
|
|
24
|
+
size = "medium",
|
|
25
|
+
className,
|
|
26
|
+
dataTestId,
|
|
27
|
+
...others
|
|
28
|
+
} = props;
|
|
29
|
+
const isMobile = useIsMobile();
|
|
30
|
+
const { currentSize } = useComponentSize(size);
|
|
31
|
+
const normalizedSize = currentSize === "large" ? "medium" : currentSize;
|
|
32
|
+
const areas = useAreasStore((state) => state.areasIds ?? [], shallow);
|
|
33
|
+
const currentAreaId = useAreasStore((state) => state.currentAreaId, shallow);
|
|
34
|
+
const status = useAreasStore((state) => state.ownerState.status);
|
|
35
|
+
const areasLength = useAreasStore((state) => state.areasIds.length);
|
|
36
|
+
const { addArea } = useAreasStore((state) => state.areasActions, shallow);
|
|
37
|
+
const { maximizeLayout } = useAreasStore((state) => state.areaActions);
|
|
38
|
+
const maximizedId = useAreasStore(
|
|
39
|
+
(state) => state.hashAreas[currentAreaId] ? state.hashAreas[currentAreaId].maximizedId : false,
|
|
40
|
+
shallow
|
|
41
|
+
);
|
|
42
|
+
const windowsLayouts = useAreasStore(
|
|
43
|
+
(state) => state.hashAreas[state.currentAreaId]?.layoutItemsIds?.filter((li) => state.hashWindows[li].emergeType === "layout")?.map((lim) => {
|
|
44
|
+
const w = state.hashWindows[lim];
|
|
45
|
+
return {
|
|
46
|
+
i: w.windowId,
|
|
47
|
+
url_icon: w.iconUrl,
|
|
48
|
+
title: w.title
|
|
49
|
+
};
|
|
50
|
+
}) ?? [],
|
|
51
|
+
shallow
|
|
52
|
+
);
|
|
53
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
54
|
+
const { getLabel } = useModuleDictionary();
|
|
55
|
+
const divRef = useRef(null);
|
|
56
|
+
const divRefOut = useRef(null);
|
|
57
|
+
if (status !== "loaded") {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
const ownerState = {
|
|
61
|
+
isMobile,
|
|
62
|
+
color,
|
|
63
|
+
size: normalizedSize
|
|
64
|
+
};
|
|
65
|
+
const onTouched = (layoutId) => {
|
|
66
|
+
maximizeLayout(currentAreaId, layoutId);
|
|
67
|
+
};
|
|
68
|
+
const menuActions = windowsLayouts.map((element) => {
|
|
69
|
+
return {
|
|
70
|
+
type: "menuItem",
|
|
71
|
+
onClick: () => onTouched(element.i),
|
|
72
|
+
label: element.title,
|
|
73
|
+
urlIcon: element.url_icon,
|
|
74
|
+
checkable: true,
|
|
75
|
+
checked: maximizedId === element.i
|
|
76
|
+
};
|
|
77
|
+
});
|
|
78
|
+
return /* @__PURE__ */ jsx(
|
|
79
|
+
AreasAdminRootStyled,
|
|
80
|
+
{
|
|
81
|
+
className: clsx(getComponentSlotRoot(AREAS_ADMIN_KEY_COMPONENT), className),
|
|
82
|
+
...getPropDataTestId(AREAS_ADMIN_KEY_COMPONENT, AreasAdminSlots.root, dataTestId),
|
|
83
|
+
role: "areas-admin-role",
|
|
84
|
+
ownerState,
|
|
85
|
+
ref: divRefOut,
|
|
86
|
+
...others,
|
|
87
|
+
children: /* @__PURE__ */ jsx(
|
|
88
|
+
AreasAdminContentStyled,
|
|
89
|
+
{
|
|
90
|
+
size: normalizedSize,
|
|
91
|
+
ownerState: {},
|
|
92
|
+
role: "presentation",
|
|
93
|
+
ref: divRef,
|
|
94
|
+
children: /* @__PURE__ */ jsx(
|
|
95
|
+
AreasContainerChipIconStyled,
|
|
96
|
+
{
|
|
97
|
+
size: normalizedSize,
|
|
98
|
+
ownerState: {},
|
|
99
|
+
children: /* @__PURE__ */ jsx(
|
|
100
|
+
AreasContainerContentChipsStyled,
|
|
101
|
+
{
|
|
102
|
+
size: normalizedSize,
|
|
103
|
+
ownerState: {},
|
|
104
|
+
children: !isMobile ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
105
|
+
/* @__PURE__ */ jsx(ScrollBar, { children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
106
|
+
/* @__PURE__ */ jsx(
|
|
107
|
+
IconButtonAddAreaStyled,
|
|
108
|
+
{
|
|
109
|
+
"aria-label": "Agregar área",
|
|
110
|
+
size: normalizedSize,
|
|
111
|
+
variant: "contained",
|
|
112
|
+
ownerState,
|
|
113
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.ADD_AREA}`,
|
|
114
|
+
onClick: addArea,
|
|
115
|
+
tooltip: getLabel(getAreasDictionary(AREAS_DICCTIONARY.area_add_new))
|
|
116
|
+
}
|
|
117
|
+
),
|
|
118
|
+
/* @__PURE__ */ jsx(
|
|
119
|
+
AreaContentChipStyled,
|
|
120
|
+
{
|
|
121
|
+
size: normalizedSize,
|
|
122
|
+
ownerState: {},
|
|
123
|
+
children: Array.isArray(areas) && areas.length > 0 && areas.map((areaId) => /* @__PURE__ */ jsx(
|
|
124
|
+
AreaChip,
|
|
125
|
+
{
|
|
126
|
+
size: normalizedSize,
|
|
127
|
+
color,
|
|
128
|
+
areaId,
|
|
129
|
+
selected: areaId === currentAreaId,
|
|
130
|
+
disabled: areasLength === 1
|
|
131
|
+
},
|
|
132
|
+
areaId
|
|
133
|
+
))
|
|
134
|
+
}
|
|
135
|
+
)
|
|
136
|
+
] }) }),
|
|
137
|
+
maximizedId && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(ContainerAdminWindowsStyled, { size: normalizedSize, ownerState, children: [
|
|
138
|
+
/* @__PURE__ */ jsx(Typography, { size: normalizedSize, children: getLabel(getAreasDictionary(AREAS_DICCTIONARY.label_window)) }),
|
|
139
|
+
/* @__PURE__ */ jsx(
|
|
140
|
+
MenuActions,
|
|
141
|
+
{
|
|
142
|
+
size: normalizedSize,
|
|
143
|
+
icon: `${host_static_assets}/${environment_assets}/frontend/components/areas_admin/assets/icons/${ICONS.PENDING_ORDER}`,
|
|
144
|
+
arrowType: "no-arrow",
|
|
145
|
+
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
146
|
+
transformOrigin: { vertical: "top", horizontal: "left" },
|
|
147
|
+
menuActions
|
|
148
|
+
}
|
|
149
|
+
)
|
|
150
|
+
] }) })
|
|
151
|
+
] }) : /* @__PURE__ */ jsx(AreaChipMobile, {})
|
|
152
|
+
}
|
|
153
|
+
)
|
|
154
|
+
}
|
|
155
|
+
)
|
|
156
|
+
}
|
|
157
|
+
)
|
|
158
|
+
}
|
|
159
|
+
);
|
|
160
|
+
};
|
|
161
|
+
export {
|
|
162
|
+
AreasAdmin as A
|
|
163
|
+
};
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import { g as getHeightSizeStyles } from "../../../../utils/getHeightSizeStyles.js";
|
|
2
|
+
const areasAdminStyles = {
|
|
3
|
+
/**
|
|
4
|
+
* Root areas admin Styles
|
|
5
|
+
* @author cesar - automatic
|
|
6
|
+
* @createdAt 2025-01-22 17:19:48 - automatic
|
|
7
|
+
* @updatedAt 2025-02-04 09:17:16 - automatic
|
|
8
|
+
* @updatedUser cesar - automatic
|
|
9
|
+
*/
|
|
10
|
+
root: ({ theme }) => ({
|
|
11
|
+
width: "100%",
|
|
12
|
+
display: "flex",
|
|
13
|
+
flexDirection: "row",
|
|
14
|
+
"& .simplebar-content": {
|
|
15
|
+
display: "flex",
|
|
16
|
+
flexDirection: "row",
|
|
17
|
+
gap: theme.vars.size.baseSpacings.sp2,
|
|
18
|
+
alignItems: "center"
|
|
19
|
+
}
|
|
20
|
+
}),
|
|
21
|
+
/**
|
|
22
|
+
* Root areas admin content Styles
|
|
23
|
+
* @author cesar - automatic
|
|
24
|
+
* @createdAt 2025-01-25 19:41:41 - automatic
|
|
25
|
+
* @updatedAt 2025-02-04 09:17:16 - automatic
|
|
26
|
+
* @updatedUser cesar - automatic
|
|
27
|
+
*/
|
|
28
|
+
areasAdminContent: () => ({
|
|
29
|
+
display: "flex",
|
|
30
|
+
flexDirection: "row",
|
|
31
|
+
width: "100%"
|
|
32
|
+
}),
|
|
33
|
+
/**
|
|
34
|
+
* Root container admin windows Styles
|
|
35
|
+
* @author cesar - automatic
|
|
36
|
+
* @createdAt 2025-01-25 19:41:41 - automatic
|
|
37
|
+
* @updatedAt 2025-02-04 09:17:16 - automatic
|
|
38
|
+
* @updatedUser cesar - automatic
|
|
39
|
+
*/
|
|
40
|
+
containerAdminWindows: ({ theme }) => ({
|
|
41
|
+
display: "flex",
|
|
42
|
+
flexDirection: "row",
|
|
43
|
+
alignItems: "center",
|
|
44
|
+
gap: theme.vars.size.baseSpacings.sp2
|
|
45
|
+
}),
|
|
46
|
+
areaContainerChipIcon: () => ({
|
|
47
|
+
width: "100%"
|
|
48
|
+
}),
|
|
49
|
+
/**
|
|
50
|
+
* Root area container content chips
|
|
51
|
+
* @author cesar - automatic
|
|
52
|
+
* @createdAt 2025-01-24 09:29:33 - automatic
|
|
53
|
+
* @updatedAt 2025-02-04 09:17:16 - automatic
|
|
54
|
+
* @updatedUser cesar - automatic
|
|
55
|
+
*/
|
|
56
|
+
areaContainerContentChips: () => ({
|
|
57
|
+
display: "flex",
|
|
58
|
+
flexDirection: "row"
|
|
59
|
+
}),
|
|
60
|
+
/**
|
|
61
|
+
* Root area content chip Styles
|
|
62
|
+
* @author cesar - automatic
|
|
63
|
+
* @createdAt 2025-01-24 09:29:33 - automatic
|
|
64
|
+
* @updatedAt 2025-02-04 09:17:16 - automatic
|
|
65
|
+
* @updatedUser cesar - automatic
|
|
66
|
+
*/
|
|
67
|
+
areaContentChip: ({ theme }) => ({
|
|
68
|
+
height: "100%",
|
|
69
|
+
display: "flex",
|
|
70
|
+
flexDirection: "row",
|
|
71
|
+
gap: theme.vars.size.baseSpacings.sp2,
|
|
72
|
+
alignItems: "center"
|
|
73
|
+
}),
|
|
74
|
+
/**
|
|
75
|
+
* Root area chip Styles
|
|
76
|
+
* @author cesar - automatic
|
|
77
|
+
* @createdAt 2025-01-24 09:29:33 - automatic
|
|
78
|
+
* @updatedAt 2025-02-04 09:17:16 - automatic
|
|
79
|
+
* @updatedUser cesar - automatic
|
|
80
|
+
*/
|
|
81
|
+
areaChipRoot: () => ({
|
|
82
|
+
width: "100%",
|
|
83
|
+
display: "flex",
|
|
84
|
+
flexDirection: "row"
|
|
85
|
+
}),
|
|
86
|
+
/**
|
|
87
|
+
* Root area container chip edit button
|
|
88
|
+
* @author cesar - automatic
|
|
89
|
+
* @createdAt 2025-01-24 09:29:33 - automatic
|
|
90
|
+
* @updatedAt 2025-02-04 09:17:16 - automatic
|
|
91
|
+
* @updatedUser cesar - automatic
|
|
92
|
+
*/
|
|
93
|
+
areaContainerChipEditButton: () => ({
|
|
94
|
+
display: "flex",
|
|
95
|
+
flexDirection: "row"
|
|
96
|
+
}),
|
|
97
|
+
/**
|
|
98
|
+
* Chip areas Styles
|
|
99
|
+
* @author cesar - automatic
|
|
100
|
+
* @createdAt 2025-01-24 09:29:33 - automatic
|
|
101
|
+
* @updatedAt 2025-02-04 09:17:16 - automatic
|
|
102
|
+
* @updatedUser cesar - automatic
|
|
103
|
+
*/
|
|
104
|
+
chipAreas: ({ theme, ownerState }) => ({
|
|
105
|
+
borderRadius: theme.vars.size.borderRadius.r1,
|
|
106
|
+
...getHeightSizeStyles(
|
|
107
|
+
theme.generalSettings.isMobile,
|
|
108
|
+
ownerState.size || "small",
|
|
109
|
+
"action"
|
|
110
|
+
),
|
|
111
|
+
"&:hover > .M4LAreasAdmin-menuActionsChip": {
|
|
112
|
+
opacity: 1,
|
|
113
|
+
pointerEvents: "auto"
|
|
114
|
+
}
|
|
115
|
+
}),
|
|
116
|
+
/**
|
|
117
|
+
* Icon button add area Styles
|
|
118
|
+
* @author cesar - automatic
|
|
119
|
+
* @createdAt 2025-01-24 12:34:21 - automatic
|
|
120
|
+
* @updatedAt 2025-02-04 09:17:16 - automatic
|
|
121
|
+
* @updatedUser cesar - automatic
|
|
122
|
+
*/
|
|
123
|
+
iconButtonAddArea: ({ theme, ownerState }) => ({
|
|
124
|
+
borderRadius: theme.vars.size.borderRadius.r1,
|
|
125
|
+
...getHeightSizeStyles(
|
|
126
|
+
theme.generalSettings.isMobile,
|
|
127
|
+
ownerState.size || "small",
|
|
128
|
+
"action"
|
|
129
|
+
)
|
|
130
|
+
}),
|
|
131
|
+
/**
|
|
132
|
+
* Menu actions Styles
|
|
133
|
+
* @author cesar - automatic
|
|
134
|
+
* @createdAt 2025-01-25 19:41:41 - automatic
|
|
135
|
+
* @updatedAt 2025-02-04 09:17:16 - automatic
|
|
136
|
+
* @updatedUser cesar - automatic
|
|
137
|
+
*/
|
|
138
|
+
menuActionsChip: () => ({
|
|
139
|
+
opacity: 0,
|
|
140
|
+
pointerEvents: "none",
|
|
141
|
+
transition: "opacity 0.2s ease-in-out"
|
|
142
|
+
}),
|
|
143
|
+
/**
|
|
144
|
+
* Root area chip mobile Styles
|
|
145
|
+
* @author cesar - automatic
|
|
146
|
+
* @createdAt 2025-01-26 19:29:17 - automatic
|
|
147
|
+
* @updatedAt 2025-02-04 09:17:16 - automatic
|
|
148
|
+
* @updatedUser cesar - automatic
|
|
149
|
+
*/
|
|
150
|
+
areaChipMobileRoot: ({ theme }) => ({
|
|
151
|
+
display: "flex",
|
|
152
|
+
flexDirection: "row",
|
|
153
|
+
alignItems: "center",
|
|
154
|
+
gap: theme.vars.size.baseSpacings.sp1
|
|
155
|
+
}),
|
|
156
|
+
/**
|
|
157
|
+
* Root chip mobile Styles
|
|
158
|
+
* @author cesar - automatic
|
|
159
|
+
* @createdAt 2025-01-26 19:29:17 - automatic
|
|
160
|
+
* @updatedAt 2025-02-04 09:17:16 - automatic
|
|
161
|
+
* @updatedUser cesar - automatic
|
|
162
|
+
*/
|
|
163
|
+
chipMobileRoot: ({ theme }) => ({
|
|
164
|
+
display: "flex",
|
|
165
|
+
flexDirection: "row",
|
|
166
|
+
alignItems: "center",
|
|
167
|
+
gap: theme.vars.size.baseSpacings.sp1
|
|
168
|
+
}),
|
|
169
|
+
/**
|
|
170
|
+
* Root chip mobile content Styles
|
|
171
|
+
* @author cesar - automatic
|
|
172
|
+
* @createdAt 2025-01-26 19:29:17 - automatic
|
|
173
|
+
* @updatedAt 2025-02-04 09:17:16 - automatic
|
|
174
|
+
* @updatedUser cesar - automatic
|
|
175
|
+
*/
|
|
176
|
+
chipMobileContent: ({ theme }) => ({
|
|
177
|
+
display: "flex",
|
|
178
|
+
flexDirection: "row",
|
|
179
|
+
alignItems: "center",
|
|
180
|
+
borderRadius: theme.vars.size.borderRadius.r1
|
|
181
|
+
}),
|
|
182
|
+
/**
|
|
183
|
+
* Name area chip mobile Styles
|
|
184
|
+
* @author cesar - automatic
|
|
185
|
+
* @createdAt 2025-01-27 12:58:18 - automatic
|
|
186
|
+
* @updatedAt 2025-02-04 09:17:16 - automatic
|
|
187
|
+
* @updatedUser cesar - automatic
|
|
188
|
+
*/
|
|
189
|
+
nameChipMobile: ({ theme }) => ({
|
|
190
|
+
padding: theme.vars.size.baseSpacings.sp1
|
|
191
|
+
}),
|
|
192
|
+
/**
|
|
193
|
+
* Root add areas mobile container
|
|
194
|
+
* @author cesar - automatic
|
|
195
|
+
* @createdAt 2025-01-26 19:29:17 - automatic
|
|
196
|
+
* @updatedAt 2025-02-04 09:17:16 - automatic
|
|
197
|
+
* @updatedUser cesar - automatic
|
|
198
|
+
*/
|
|
199
|
+
addAreasMobileContainer: () => ({
|
|
200
|
+
display: "flex",
|
|
201
|
+
flexDirection: "column"
|
|
202
|
+
}),
|
|
203
|
+
/**
|
|
204
|
+
* Root menu actions area chip mobile
|
|
205
|
+
* @author cesar - automatic
|
|
206
|
+
* @createdAt 2025-01-26 19:29:17 - automatic
|
|
207
|
+
* @updatedAt 2025-02-04 09:17:16 - automatic
|
|
208
|
+
* @updatedUser cesar - automatic
|
|
209
|
+
*/
|
|
210
|
+
menuActionsAreaChipMobile: ({ theme }) => ({
|
|
211
|
+
display: "flex",
|
|
212
|
+
flexDirection: "column",
|
|
213
|
+
alignItems: "center",
|
|
214
|
+
alignContent: "center",
|
|
215
|
+
borderRadius: theme.vars.size.borderRadius.r1,
|
|
216
|
+
gap: theme.vars.size.baseSpacings.sp1
|
|
217
|
+
}),
|
|
218
|
+
buttonAddArea: ({ theme }) => ({
|
|
219
|
+
color: theme.vars.palette.primary.contrastText
|
|
220
|
+
}),
|
|
221
|
+
/**
|
|
222
|
+
* Root edit area chip container
|
|
223
|
+
* @author cesar - automatic
|
|
224
|
+
* @createdAt 2025-01-26 22:11:32 - automatic
|
|
225
|
+
* @updatedAt 2025-02-04 09:17:16 - automatic
|
|
226
|
+
* @updatedUser cesar - automatic
|
|
227
|
+
*/
|
|
228
|
+
editAreaChipContainer: ({ theme }) => ({
|
|
229
|
+
borderRadius: theme.vars.size.borderRadius.r1,
|
|
230
|
+
display: "flex",
|
|
231
|
+
flexDirection: "column"
|
|
232
|
+
}),
|
|
233
|
+
/**
|
|
234
|
+
* Root edit area header
|
|
235
|
+
* @author cesar - automatic
|
|
236
|
+
* @createdAt 2025-01-26 22:11:32 - automatic
|
|
237
|
+
* @updatedAt 2025-02-04 09:17:16 - automatic
|
|
238
|
+
* @updatedUser cesar - automatic
|
|
239
|
+
*/
|
|
240
|
+
editAreaHeader: ({ theme }) => ({
|
|
241
|
+
display: "flex",
|
|
242
|
+
padding: theme.vars.size.baseSpacings.sp0,
|
|
243
|
+
flexDirection: "column",
|
|
244
|
+
justifyContent: "center",
|
|
245
|
+
gap: theme.vars.size.baseSpacings["sp0-5"],
|
|
246
|
+
alignSelf: "stretch"
|
|
247
|
+
}),
|
|
248
|
+
/**
|
|
249
|
+
* Root edit area chip mobile container
|
|
250
|
+
* @author cesar - automatic
|
|
251
|
+
* @createdAt 2025-01-26 22:11:32 - automatic
|
|
252
|
+
* @updatedAt 2025-02-04 09:17:16 - automatic
|
|
253
|
+
* @updatedUser cesar - automatic
|
|
254
|
+
*/
|
|
255
|
+
editAreaChipMobileContainer: ({ theme }) => ({
|
|
256
|
+
borderRadius: theme.vars.size.borderRadius.r1,
|
|
257
|
+
display: "flex",
|
|
258
|
+
flexDirection: "column",
|
|
259
|
+
width: "100%"
|
|
260
|
+
})
|
|
261
|
+
};
|
|
262
|
+
export {
|
|
263
|
+
areasAdminStyles as a
|
|
264
|
+
};
|
|
@@ -2,7 +2,7 @@ import { generateUtilityClasses } from "@mui/material";
|
|
|
2
2
|
import { unstable_composeClasses } from "@mui/base";
|
|
3
3
|
import { g as getComponentUtilityClass } from "../../../../../utils/index.js";
|
|
4
4
|
import { A as AREAS_ADMIN_CLASS_NAME } from "../../../constants.js";
|
|
5
|
-
|
|
5
|
+
generateUtilityClasses(
|
|
6
6
|
AREAS_ADMIN_CLASS_NAME,
|
|
7
7
|
[
|
|
8
8
|
/* elements */
|
|
@@ -65,6 +65,5 @@ const useAreasAdminUtilityClasses = (ownerState) => {
|
|
|
65
65
|
return unstable_composeClasses(slots, getComponentUtilityClass(AREAS_ADMIN_CLASS_NAME), {});
|
|
66
66
|
};
|
|
67
67
|
export {
|
|
68
|
-
areasAdminClasses as a,
|
|
69
68
|
useAreasAdminUtilityClasses as u
|
|
70
69
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AREAS_ADMIN_KEY_COMPONENT = "M4LAreasAdmin";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare enum AreasAdminSlots {
|
|
2
|
+
root = "root",
|
|
3
|
+
areasAdminContent = "areasAdminContent",
|
|
4
|
+
areaContainerChipIcon = "areaContainerChipIcon",
|
|
5
|
+
areaContainerContentChips = "areaContainerContentChips",
|
|
6
|
+
areaContentChip = "areaContentChip",
|
|
7
|
+
containerAdminWindows = "containerAdminWindows",
|
|
8
|
+
areaChipRoot = "areaChipRoot",
|
|
9
|
+
areaContainerChipEditButton = "areaContainerChipEditButton",
|
|
10
|
+
menuActionsChip = "menuActionsChip",
|
|
11
|
+
editAreaChipContainer = "editAreaChipContainer",
|
|
12
|
+
editAreaHeader = "editAreaHeader",
|
|
13
|
+
areaChipMobileRoot = "areaChipMobileRoot",
|
|
14
|
+
addAreasMobileContainer = "addAreasMobileContainer",
|
|
15
|
+
menuActionsAreaChipMobile = "menuActionsAreaChipMobile",
|
|
16
|
+
buttonAddArea = "buttonAddArea",
|
|
17
|
+
chipMobileRoot = "chipMobileRoot",
|
|
18
|
+
chipMobileContent = "chipMobileContent",
|
|
19
|
+
editAreaChipMobileContainer = "editAreaChipMobileContainer",
|
|
20
|
+
nameChipMobile = "nameChipMobile",
|
|
21
|
+
chipAreas = "chipAreas",
|
|
22
|
+
iconButtonAddArea = "iconButtonAddArea"
|
|
23
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
var AreasAdminSlots = /* @__PURE__ */ ((AreasAdminSlots2) => {
|
|
2
|
+
AreasAdminSlots2["root"] = "root";
|
|
3
|
+
AreasAdminSlots2["areasAdminContent"] = "areasAdminContent";
|
|
4
|
+
AreasAdminSlots2["areaContainerChipIcon"] = "areaContainerChipIcon";
|
|
5
|
+
AreasAdminSlots2["areaContainerContentChips"] = "areaContainerContentChips";
|
|
6
|
+
AreasAdminSlots2["areaContentChip"] = "areaContentChip";
|
|
7
|
+
AreasAdminSlots2["containerAdminWindows"] = "containerAdminWindows";
|
|
8
|
+
AreasAdminSlots2["areaChipRoot"] = "areaChipRoot";
|
|
9
|
+
AreasAdminSlots2["areaContainerChipEditButton"] = "areaContainerChipEditButton";
|
|
10
|
+
AreasAdminSlots2["menuActionsChip"] = "menuActionsChip";
|
|
11
|
+
AreasAdminSlots2["editAreaChipContainer"] = "editAreaChipContainer";
|
|
12
|
+
AreasAdminSlots2["editAreaHeader"] = "editAreaHeader";
|
|
13
|
+
AreasAdminSlots2["areaChipMobileRoot"] = "areaChipMobileRoot";
|
|
14
|
+
AreasAdminSlots2["addAreasMobileContainer"] = "addAreasMobileContainer";
|
|
15
|
+
AreasAdminSlots2["menuActionsAreaChipMobile"] = "menuActionsAreaChipMobile";
|
|
16
|
+
AreasAdminSlots2["buttonAddArea"] = "buttonAddArea";
|
|
17
|
+
AreasAdminSlots2["chipMobileRoot"] = "chipMobileRoot";
|
|
18
|
+
AreasAdminSlots2["chipMobileContent"] = "chipMobileContent";
|
|
19
|
+
AreasAdminSlots2["editAreaChipMobileContainer"] = "editAreaChipMobileContainer";
|
|
20
|
+
AreasAdminSlots2["nameChipMobile"] = "nameChipMobile";
|
|
21
|
+
AreasAdminSlots2["chipAreas"] = "chipAreas";
|
|
22
|
+
AreasAdminSlots2["iconButtonAddArea"] = "iconButtonAddArea";
|
|
23
|
+
return AreasAdminSlots2;
|
|
24
|
+
})(AreasAdminSlots || {});
|
|
25
|
+
export {
|
|
26
|
+
AreasAdminSlots as A
|
|
27
|
+
};
|