@m4l/components 9.1.93 → 9.1.95
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/subcomponents/Header/HeaderWindowBase.d.ts +1 -1
- package/components/WindowBase/types.d.ts +1 -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/types.d.ts +47 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/index.js +1 -1
- 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/index.js +7 -3
- 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/helpers/generateModuleCount.d.ts +9 -0
- package/components/areas/contexts/AreasContext/helpers/generateModuleCount.js +16 -0
- package/components/areas/contexts/AreasContext/{helper.d.ts → helpers/helper.d.ts} +3 -3
- package/components/areas/contexts/AreasContext/{helper.js → helpers/helper.js} +5 -5
- package/components/areas/contexts/AreasContext/index.js +5 -2
- package/components/areas/contexts/AreasContext/store.d.ts +2 -2
- package/components/areas/contexts/AreasContext/store.js +175 -173
- package/components/areas/contexts/AreasContext/tests/AreasProvider.test.d.ts +1 -0
- package/components/areas/contexts/AreasContext/tests/Store.test.d.ts +1 -0
- 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 +6 -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 +2 -2
- 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
- /package/components/areas/{contexts/AreasContext/index.test.d.ts → components/AreasAdmin/test/AreasAdmin.test.d.ts} +0 -0
|
@@ -3,8 +3,8 @@ const popoverStyles = {
|
|
|
3
3
|
* Styles applied to the Popover root element.
|
|
4
4
|
* @author Andrés Quintero - automatic
|
|
5
5
|
* @createdAt 2024-12-27 08:27:31 - automatic
|
|
6
|
-
* @updatedAt
|
|
7
|
-
* @updatedUser
|
|
6
|
+
* @updatedAt 2025-01-30 08:26:28 - automatic
|
|
7
|
+
* @updatedUser cesar - automatic
|
|
8
8
|
*/
|
|
9
9
|
root: ({ theme }) => ({
|
|
10
10
|
"&.M4lclassCssSpecificity": {
|
|
@@ -18,8 +18,8 @@ const popoverStyles = {
|
|
|
18
18
|
* Styles applied to the Popover arrow element.
|
|
19
19
|
* @author Andrés Quintero - automatic
|
|
20
20
|
* @createdAt 2024-12-27 08:27:31 - automatic
|
|
21
|
-
* @updatedAt
|
|
22
|
-
* @updatedUser
|
|
21
|
+
* @updatedAt 2025-01-30 08:26:28 - automatic
|
|
22
|
+
* @updatedUser cesar - automatic
|
|
23
23
|
*/
|
|
24
24
|
arrow: () => ({})
|
|
25
25
|
};
|
|
@@ -5,7 +5,7 @@ const selectStyles = {
|
|
|
5
5
|
* Estilos para el componente Select
|
|
6
6
|
* @author Bruce Escobar - automatic
|
|
7
7
|
* @createdAt 2024-10-22 10:30:26 - automatic
|
|
8
|
-
* @updatedAt 2025-01-
|
|
8
|
+
* @updatedAt 2025-01-31 11:37:44 - automatic
|
|
9
9
|
* @updatedUser cesar - automatic
|
|
10
10
|
*/
|
|
11
11
|
root: ({ theme, ownerState }) => ({
|
|
@@ -107,7 +107,7 @@ const selectStyles = {
|
|
|
107
107
|
* @returns {object} The styles for the render option container
|
|
108
108
|
* @author SebastianM - automatic
|
|
109
109
|
* @createdAt 2024-12-18 15:11:13 - automatic
|
|
110
|
-
* @updatedAt 2025-01-
|
|
110
|
+
* @updatedAt 2025-01-31 11:37:44 - automatic
|
|
111
111
|
* @updatedUser cesar - automatic
|
|
112
112
|
*/
|
|
113
113
|
renderValueContainer: ({ theme }) => ({
|
|
@@ -123,7 +123,7 @@ const selectStyles = {
|
|
|
123
123
|
* Styles for the label option
|
|
124
124
|
* @author SebastianM - automatic
|
|
125
125
|
* @createdAt 2024-12-23 10:47:53 - automatic
|
|
126
|
-
* @updatedAt 2025-01-
|
|
126
|
+
* @updatedAt 2025-01-31 11:37:44 - automatic
|
|
127
127
|
* @updatedUser cesar - automatic
|
|
128
128
|
*/
|
|
129
129
|
labelOption: ({ theme }) => ({
|
|
@@ -135,7 +135,7 @@ const selectStyles = {
|
|
|
135
135
|
* @returns {object} The styles for the label placeholder
|
|
136
136
|
* @author SebastianM - automatic
|
|
137
137
|
* @createdAt 2024-12-26 14:16:33 - automatic
|
|
138
|
-
* @updatedAt 2025-01-
|
|
138
|
+
* @updatedAt 2025-01-31 11:37:44 - automatic
|
|
139
139
|
* @updatedUser cesar - automatic
|
|
140
140
|
*/
|
|
141
141
|
labelPlaceholer: ({ theme }) => ({
|
|
@@ -165,7 +165,7 @@ const selectStyles = {
|
|
|
165
165
|
* Styles for the skeleton select component
|
|
166
166
|
* @author SebastianM - automatic
|
|
167
167
|
* @createdAt 2024-12-17 15:54:22 - automatic
|
|
168
|
-
* @updatedAt 2025-01-
|
|
168
|
+
* @updatedAt 2025-01-31 11:37:44 - automatic
|
|
169
169
|
* @updatedUser cesar - automatic
|
|
170
170
|
*/
|
|
171
171
|
skeletonSelect: ({ theme, ownerState }) => ({
|
|
@@ -27,14 +27,20 @@ export type selectOption<T = unknown> = {
|
|
|
27
27
|
export interface SelectProps<T> extends Omit<MUISelectProps<T>, 'size' | 'onChange' | 'error' | 'variant' | 'color'> {
|
|
28
28
|
/**
|
|
29
29
|
* Lista de opciones para enseñar en el Select.
|
|
30
|
+
* @createdAt 2025-01-31 11:34:36 - automatic
|
|
30
31
|
*/
|
|
31
32
|
options: selectOption<T>[];
|
|
32
33
|
/**
|
|
33
34
|
* Tamaño del Select.
|
|
35
|
+
* @createdAt 2025-01-31 11:34:36 - automatic
|
|
34
36
|
*/
|
|
35
37
|
size?: Extract<Sizes, 'small' | 'medium'>;
|
|
36
38
|
/**
|
|
37
39
|
* procedimiento para ejecutarse cuando cabia la selección.
|
|
40
|
+
* @author cesar - automatic
|
|
41
|
+
* @createdAt 2025-01-31 11:34:36 - automatic
|
|
42
|
+
* @updatedAt 2025-01-31 11:37:44 - automatic
|
|
43
|
+
* @updatedUser cesar - automatic
|
|
38
44
|
*/
|
|
39
45
|
onChange?: (option: selectOption<T>) => void;
|
|
40
46
|
/**
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { StackProps } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Stack es un componente contenedor para organizar elementos vertical u horizontalmente.
|
|
4
|
+
* @author cesar - automatic
|
|
5
|
+
* @createdAt 2025-02-04 15:44:12 - automatic
|
|
6
|
+
* @updatedAt 2025-02-04 15:44:12 - automatic
|
|
7
|
+
* @updatedUser cesar - automatic
|
|
4
8
|
*/
|
|
5
9
|
export declare const Stack: (props: StackProps) => import("react/jsx-runtime").JSX.Element;
|
package/index.js
CHANGED
|
@@ -16,7 +16,7 @@ import { v } from "./components/animate/variants/fade.js";
|
|
|
16
16
|
import { v as v2 } from "./components/animate/variants/bounce.js";
|
|
17
17
|
import { v as v3 } from "./components/animate/variants/container.js";
|
|
18
18
|
import { v as v4, a, b } from "./components/animate/variants/transition.js";
|
|
19
|
-
import { A as A2 } from "./components/areas/components/AreasAdmin/
|
|
19
|
+
import { A as A2 } from "./components/areas/components/AreasAdmin/AreasAdmin.js";
|
|
20
20
|
import { A as A3 } from "./components/areas/components/AreasViewer/index.js";
|
|
21
21
|
import { a as a2, W } from "./components/areas/contexts/WindowToolsMFContext/index.js";
|
|
22
22
|
import { c as c2 } from "./components/areas/contexts/DynamicMFParmsContext/store.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/components",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.95",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"lint-staged": {
|
|
6
6
|
"*.{js,ts,tsx}": "eslint --fix --max-warnings 0"
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"zustand": "4.3.6"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@m4l/core": "^2.0.
|
|
56
|
+
"@m4l/core": "^2.0.18",
|
|
57
57
|
"@m4l/graphics": "^7.0.8",
|
|
58
58
|
"@m4l/styles": "^7.1.18",
|
|
59
59
|
"@mui/lab": "5.0.0-alpha.173",
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Componente para administrar áreas.
|
|
3
|
-
* Este componente permite al usuario administrar las áreas disponibles,
|
|
4
|
-
* seleccionar un área específica y agregar nuevas áreas.
|
|
5
|
-
* Utiliza hooks como useAreasStore, useEnvironment, useModuleDictionary y useResponsiveDesktop.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* TODO: Documentar
|
|
9
|
-
*/
|
|
10
|
-
export declare function AreasAdmin(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { u as useAreasStore } from "../../hooks/useAreas/index.js";
|
|
3
|
-
import { useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
4
|
-
import { A as AreaChip } from "./subcomponents/AreaChip/index.js";
|
|
5
|
-
import { shallow } from "zustand/shallow";
|
|
6
|
-
import { A as AreasAdminRoot } from "./styles.js";
|
|
7
|
-
import { a as areasAdminClasses } from "./classes/index.js";
|
|
8
|
-
import { I as ICONS } from "../../icons.js";
|
|
9
|
-
import { S as ScrollBar } from "../../../ScrollBar/index.js";
|
|
10
|
-
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
11
|
-
import { A as AreaChipMobile } from "./subcomponents/AreaChipMobile/index.js";
|
|
12
|
-
import { useRef } from "react";
|
|
13
|
-
import { u as useOnClickOutside } from "../../utils/useOnClickOutside/index.js";
|
|
14
|
-
import { P as PanelWindowPopUp } from "./subcomponents/PanelWindowPopUp/index.js";
|
|
15
|
-
import { g as getAreasDictionary, A as AREAS_DICCTIONARY } from "../../dictionary.js";
|
|
16
|
-
import { I as IconButton } from "../../../mui_extended/IconButton/IconButton.js";
|
|
17
|
-
function AreasAdmin() {
|
|
18
|
-
const areas = useAreasStore((state) => state.areasIds, shallow);
|
|
19
|
-
const currentArea = useAreasStore((state) => state.currentAreaId, shallow);
|
|
20
|
-
const status = useAreasStore((state) => state.ownerState.status);
|
|
21
|
-
const { setFocus } = useAreasStore((state) => state.areaAdminActions, shallow);
|
|
22
|
-
const classesRoot = useAreasStore((state) => state.adminClasses.root);
|
|
23
|
-
const areasLength = useAreasStore((state) => state.areasIds.length);
|
|
24
|
-
const isDesktop = useResponsiveDesktop();
|
|
25
|
-
const { addArea } = useAreasStore((state) => state.areasActions, shallow);
|
|
26
|
-
const maximizedId = useAreasStore(
|
|
27
|
-
(state) => state.hashAreas[currentArea] ? state.hashAreas[currentArea].maximizedId : false,
|
|
28
|
-
shallow
|
|
29
|
-
);
|
|
30
|
-
const { host_static_assets, environment_assets } = useEnvironment();
|
|
31
|
-
const { getLabel } = useModuleDictionary();
|
|
32
|
-
const divRef = useRef(null);
|
|
33
|
-
const divRefOut = useRef(null);
|
|
34
|
-
const handleClickOutsideFn = () => {
|
|
35
|
-
setFocus(false);
|
|
36
|
-
};
|
|
37
|
-
useOnClickOutside(divRef, handleClickOutsideFn, divRefOut);
|
|
38
|
-
const rippleRef = useRef(null);
|
|
39
|
-
const onRippleStart = (e) => {
|
|
40
|
-
if (rippleRef.current) {
|
|
41
|
-
rippleRef.current.start(e);
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
const onRippleStop = (e) => {
|
|
45
|
-
if (rippleRef.current) {
|
|
46
|
-
rippleRef.current.stop(e);
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
if (status !== "loaded") {
|
|
50
|
-
return null;
|
|
51
|
-
}
|
|
52
|
-
return /* @__PURE__ */ jsx(
|
|
53
|
-
AreasAdminRoot,
|
|
54
|
-
{
|
|
55
|
-
ref: divRefOut,
|
|
56
|
-
onMouseDown: onRippleStart,
|
|
57
|
-
onMouseUp: onRippleStop,
|
|
58
|
-
className: classesRoot,
|
|
59
|
-
children: /* @__PURE__ */ jsxs(
|
|
60
|
-
"div",
|
|
61
|
-
{
|
|
62
|
-
role: "presentation",
|
|
63
|
-
ref: divRef,
|
|
64
|
-
className: areasAdminClasses.rootContent,
|
|
65
|
-
onClick: () => setFocus(true),
|
|
66
|
-
children: [
|
|
67
|
-
/* @__PURE__ */ jsx("div", { className: areasAdminClasses.areaContainerChipsIcon, children: /* @__PURE__ */ jsx("div", { className: areasAdminClasses.areaContainerChips, children: /* @__PURE__ */ jsx("div", { className: areasAdminClasses.areaContainerContentChips, children: isDesktop ? /* @__PURE__ */ jsx(ScrollBar, { children: /* @__PURE__ */ jsx("div", { className: areasAdminClasses.areaContentChips, children: areas.map((area) => /* @__PURE__ */ jsx(
|
|
68
|
-
AreaChip,
|
|
69
|
-
{
|
|
70
|
-
areaId: area,
|
|
71
|
-
selected: area === currentArea,
|
|
72
|
-
disabled: areasLength === 1
|
|
73
|
-
},
|
|
74
|
-
area
|
|
75
|
-
)) }) }) : /* @__PURE__ */ jsx(AreaChipMobile, {}) }) }) }),
|
|
76
|
-
isDesktop ? /* @__PURE__ */ jsx(
|
|
77
|
-
IconButton,
|
|
78
|
-
{
|
|
79
|
-
className: areasAdminClasses.areasAddButton,
|
|
80
|
-
src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.ADD_AREA}`,
|
|
81
|
-
size: "small",
|
|
82
|
-
onClick: addArea,
|
|
83
|
-
tooltip: getLabel(getAreasDictionary(AREAS_DICCTIONARY.area_add_new))
|
|
84
|
-
}
|
|
85
|
-
) : null,
|
|
86
|
-
!isDesktop && maximizedId ? /* @__PURE__ */ jsx(PanelWindowPopUp, { currentAreaId: currentArea }) : null
|
|
87
|
-
]
|
|
88
|
-
}
|
|
89
|
-
)
|
|
90
|
-
}
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
export {
|
|
94
|
-
AreasAdmin as A
|
|
95
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { styled } from "@mui/material";
|
|
2
|
-
import { a as areasAdminClasses } from "./classes/index.js";
|
|
3
|
-
const AreasAdminRoot = styled("div")`
|
|
4
|
-
display: flex;
|
|
5
|
-
position: relative;
|
|
6
|
-
background-color: transparent;
|
|
7
|
-
|
|
8
|
-
//areaRoot
|
|
9
|
-
& .${areasAdminClasses.areaChipRoot} {
|
|
10
|
-
display: flex;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
${(props) => props.theme.components?.M4LAreasAdmin?.styleOverrides}
|
|
14
|
-
`;
|
|
15
|
-
export {
|
|
16
|
-
AreasAdminRoot as A
|
|
17
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { styled } from "@mui/material/styles";
|
|
2
|
-
styled("div")(() => ({
|
|
3
|
-
display: "flex",
|
|
4
|
-
flexDirection: "row",
|
|
5
|
-
border: "1px solid gray",
|
|
6
|
-
"&.active": {
|
|
7
|
-
border: "1px solid red"
|
|
8
|
-
}
|
|
9
|
-
}));
|
|
10
|
-
styled("div")(({ theme }) => ({
|
|
11
|
-
height: "100%",
|
|
12
|
-
width: theme.spacing(1),
|
|
13
|
-
backgroundColor: theme.vars.palette.background.default,
|
|
14
|
-
"&.active": {
|
|
15
|
-
backgroundColor: theme.vars.palette.primary.main
|
|
16
|
-
}
|
|
17
|
-
}));
|
|
18
|
-
const EditAreaHeader = styled("div")(({ theme }) => ({
|
|
19
|
-
display: "flex",
|
|
20
|
-
width: "100%",
|
|
21
|
-
height: "25px",
|
|
22
|
-
borderBottom: "1px solid",
|
|
23
|
-
borderColor: theme.vars.palette.border.default,
|
|
24
|
-
justifyContent: "space-between",
|
|
25
|
-
alignItems: "center"
|
|
26
|
-
}));
|
|
27
|
-
export {
|
|
28
|
-
EditAreaHeader as E
|
|
29
|
-
};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
3
|
-
import { I as ICONS } from "../../../../../../icons.js";
|
|
4
|
-
import { g as getAreasDictionary, A as AREAS_DICCTIONARY } from "../../../../../../dictionary.js";
|
|
5
|
-
import { u as useAreasStore } from "../../../../../../hooks/useAreas/index.js";
|
|
6
|
-
import { shallow } from "zustand/shallow";
|
|
7
|
-
import { M as MenuActions } from "../../../../../../../MenuActions/MenuActions.js";
|
|
8
|
-
const ChipActionsMobile = (props) => {
|
|
9
|
-
const { handlerOpenPopoverEditArea, areaId } = props;
|
|
10
|
-
const { deleteArea } = useAreasStore((state) => state.areasActions);
|
|
11
|
-
const { setFocus } = useAreasStore((state) => state.areaAdminActions, shallow);
|
|
12
|
-
const listAreas = useAreasStore((state) => state.areasIds, shallow);
|
|
13
|
-
const { host_static_assets, environment_assets } = useEnvironment();
|
|
14
|
-
const { getLabel } = useModuleDictionary();
|
|
15
|
-
const menuActions = [
|
|
16
|
-
{
|
|
17
|
-
type: "menuItem",
|
|
18
|
-
startIcon: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.EDIT_AREA}`,
|
|
19
|
-
onClick: handlerOpenPopoverEditArea,
|
|
20
|
-
label: getLabel(getAreasDictionary(AREAS_DICCTIONARY.label_edit_area))
|
|
21
|
-
}
|
|
22
|
-
];
|
|
23
|
-
if (listAreas.length > 1) {
|
|
24
|
-
menuActions.push({
|
|
25
|
-
type: "menuItem",
|
|
26
|
-
startIcon: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.DELETE_AREA}`,
|
|
27
|
-
/**
|
|
28
|
-
* OnClick
|
|
29
|
-
* @author Andrés Quintero - automatic
|
|
30
|
-
* @createdAt 2024-12-27 08:27:31 - automatic
|
|
31
|
-
* @updatedAt 2025-01-22 08:48:47 - automatic
|
|
32
|
-
* @updatedUser cesar - automatic
|
|
33
|
-
*/
|
|
34
|
-
onClick: () => {
|
|
35
|
-
deleteArea(areaId);
|
|
36
|
-
setFocus(false);
|
|
37
|
-
},
|
|
38
|
-
label: getLabel(getAreasDictionary(AREAS_DICCTIONARY.label_delete_area))
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
return /* @__PURE__ */ jsx(
|
|
42
|
-
MenuActions,
|
|
43
|
-
{
|
|
44
|
-
urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.SHOW_OPTIONS}`,
|
|
45
|
-
arrowType: "no-arrow",
|
|
46
|
-
marginTop: "12px",
|
|
47
|
-
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
48
|
-
transformOrigin: { vertical: "top", horizontal: "right" },
|
|
49
|
-
menuActions,
|
|
50
|
-
externalClose: () => setFocus(false)
|
|
51
|
-
}
|
|
52
|
-
);
|
|
53
|
-
};
|
|
54
|
-
export {
|
|
55
|
-
ChipActionsMobile as C
|
|
56
|
-
};
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { u as useAreasStore } from "../../../../hooks/useAreas/index.js";
|
|
3
|
-
import { shallow } from "zustand/shallow";
|
|
4
|
-
import { a as areasAdminClasses } from "../../classes/index.js";
|
|
5
|
-
import { useModuleDictionary, useEnvironment } from "@m4l/core";
|
|
6
|
-
import { I as ICONS } from "../../../../icons.js";
|
|
7
|
-
import { useState, useMemo } from "react";
|
|
8
|
-
import { g as getAreasDictionary, A as AREAS_DICCTIONARY } from "../../../../dictionary.js";
|
|
9
|
-
import { useTheme } from "@mui/material";
|
|
10
|
-
import { C as ChipMobile } from "./subcomponents/ChipMobile/ChipMobile.js";
|
|
11
|
-
import { M as MenuActions } from "../../../../../MenuActions/MenuActions.js";
|
|
12
|
-
import { B as Button } from "../../../../../mui_extended/Button/Button.js";
|
|
13
|
-
const AreaChipMobile = () => {
|
|
14
|
-
const areas = useAreasStore(
|
|
15
|
-
(state) => state.areasIds.map((a) => ({ id: a, name: state.hashAreas[a].name })),
|
|
16
|
-
shallow
|
|
17
|
-
);
|
|
18
|
-
const { selectArea } = useAreasStore((state) => state.areasActions);
|
|
19
|
-
const currentAreaId = useAreasStore((state) => state.currentAreaId, shallow);
|
|
20
|
-
const { addArea } = useAreasStore((state) => state.areasActions, shallow);
|
|
21
|
-
const { setFocus } = useAreasStore((state) => state.areaAdminActions, shallow);
|
|
22
|
-
const [anchorMenuAreas, setAnchorMenuAreas] = useState(null);
|
|
23
|
-
const { getLabel } = useModuleDictionary();
|
|
24
|
-
const theme = useTheme();
|
|
25
|
-
const currentArea = areas.find((area) => area.id === currentAreaId);
|
|
26
|
-
const { host_static_assets, environment_assets } = useEnvironment();
|
|
27
|
-
const menuActions = useMemo(
|
|
28
|
-
() => areas.filter((area) => area.id !== currentAreaId).map((area) => {
|
|
29
|
-
return {
|
|
30
|
-
urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.LAYERS}`,
|
|
31
|
-
/**
|
|
32
|
-
* OnClick
|
|
33
|
-
* @author SebastianM - automatic
|
|
34
|
-
* @createdAt 2024-11-06 09:00:05 - automatic
|
|
35
|
-
* @updatedAt 2025-01-22 08:50:39 - automatic
|
|
36
|
-
* @updatedUser cesar - automatic
|
|
37
|
-
*/
|
|
38
|
-
onClick: () => {
|
|
39
|
-
selectArea(area.id);
|
|
40
|
-
setFocus(false);
|
|
41
|
-
},
|
|
42
|
-
label: area.name,
|
|
43
|
-
type: "menuItem"
|
|
44
|
-
};
|
|
45
|
-
}),
|
|
46
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
47
|
-
[areas, currentAreaId]
|
|
48
|
-
);
|
|
49
|
-
const handlerSetAnchorMenuAreas = (element) => {
|
|
50
|
-
setFocus(false);
|
|
51
|
-
setAnchorMenuAreas(element);
|
|
52
|
-
};
|
|
53
|
-
return /* @__PURE__ */ jsx("div", { className: areasAdminClasses.areaChipMobileRoot, children: /* @__PURE__ */ jsxs("div", { className: areasAdminClasses.areaContainerContentChips, children: [
|
|
54
|
-
currentArea ? /* @__PURE__ */ jsx(
|
|
55
|
-
ChipMobile,
|
|
56
|
-
{
|
|
57
|
-
areaId: currentArea.id,
|
|
58
|
-
selected: true,
|
|
59
|
-
disabled: true,
|
|
60
|
-
setAnchorMenuAreas
|
|
61
|
-
},
|
|
62
|
-
currentArea.id
|
|
63
|
-
) : null,
|
|
64
|
-
menuActions.length >= 0 ? /* @__PURE__ */ jsx("div", { className: areasAdminClasses.areaChipMobileIconContainer, children: /* @__PURE__ */ jsx(
|
|
65
|
-
MenuActions,
|
|
66
|
-
{
|
|
67
|
-
urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.CHEVRON_DOWN}`,
|
|
68
|
-
arrowType: "no-arrow",
|
|
69
|
-
marginTop: "12px!important",
|
|
70
|
-
marginLeft: "14px!important",
|
|
71
|
-
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
72
|
-
transformOrigin: { vertical: "top", horizontal: "right" },
|
|
73
|
-
menuActions,
|
|
74
|
-
externalOpen: anchorMenuAreas,
|
|
75
|
-
externalClose: handlerSetAnchorMenuAreas,
|
|
76
|
-
className: areasAdminClasses.areasPopoverMobileOptions,
|
|
77
|
-
menuActionSx: theme.components?.M4LAreasAdminMobilePopoverOptions?.styleOverrides,
|
|
78
|
-
endListElement: /* @__PURE__ */ jsx(
|
|
79
|
-
Button,
|
|
80
|
-
{
|
|
81
|
-
onClick: () => {
|
|
82
|
-
addArea();
|
|
83
|
-
setAnchorMenuAreas(null);
|
|
84
|
-
},
|
|
85
|
-
variant: "outlined",
|
|
86
|
-
startIcon: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.ADD_AREA}`,
|
|
87
|
-
label: getLabel(getAreasDictionary(AREAS_DICCTIONARY.area_add_new))
|
|
88
|
-
}
|
|
89
|
-
)
|
|
90
|
-
}
|
|
91
|
-
) }) : null
|
|
92
|
-
] }) });
|
|
93
|
-
};
|
|
94
|
-
export {
|
|
95
|
-
AreaChipMobile as A
|
|
96
|
-
};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useEnvironment } from "@m4l/core";
|
|
3
|
-
import { shallow } from "zustand/shallow";
|
|
4
|
-
import { useTheme } from "@mui/material";
|
|
5
|
-
import { u as useAreasStore } from "../../../../hooks/useAreas/index.js";
|
|
6
|
-
import { I as ICONS } from "../../../../icons.js";
|
|
7
|
-
import { a as areasAdminClasses } from "../../classes/index.js";
|
|
8
|
-
import { M as MenuActions } from "../../../../../MenuActions/MenuActions.js";
|
|
9
|
-
const PanelWindowPopUp = (props) => {
|
|
10
|
-
const { currentAreaId } = props;
|
|
11
|
-
const { host_static_assets, environment_assets } = useEnvironment();
|
|
12
|
-
const windowsLayouts = useAreasStore(
|
|
13
|
-
(state) => state.hashAreas[currentAreaId].layoutItemsIds.filter((li) => state.hashWindows[li].emergeType === "layout").map((lim) => {
|
|
14
|
-
const w = state.hashWindows[lim];
|
|
15
|
-
return {
|
|
16
|
-
i: w.windowId,
|
|
17
|
-
url_icon: w.iconUrl,
|
|
18
|
-
title: w.title
|
|
19
|
-
};
|
|
20
|
-
}),
|
|
21
|
-
shallow
|
|
22
|
-
);
|
|
23
|
-
const theme = useTheme();
|
|
24
|
-
const { maximizeLayout } = useAreasStore((state) => state.areaActions);
|
|
25
|
-
const onTouched = (layoutId) => {
|
|
26
|
-
maximizeLayout(currentAreaId, layoutId);
|
|
27
|
-
};
|
|
28
|
-
const menuActions = windowsLayouts.map((element) => {
|
|
29
|
-
return {
|
|
30
|
-
type: "menuItem",
|
|
31
|
-
onClick: () => onTouched(element.i),
|
|
32
|
-
label: element.title,
|
|
33
|
-
urlIcon: element.url_icon
|
|
34
|
-
};
|
|
35
|
-
});
|
|
36
|
-
return menuActions.length > 0 ? /* @__PURE__ */ jsx(
|
|
37
|
-
MenuActions,
|
|
38
|
-
{
|
|
39
|
-
urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.LAYERS}`,
|
|
40
|
-
arrowType: "no-arrow",
|
|
41
|
-
marginTop: "12px!important",
|
|
42
|
-
marginLeft: "14px!important",
|
|
43
|
-
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
44
|
-
transformOrigin: { vertical: "top", horizontal: "right" },
|
|
45
|
-
menuActions,
|
|
46
|
-
className: areasAdminClasses.areasPopoverListWindows,
|
|
47
|
-
iconButtonClassName: areasAdminClasses.areasPopoverListWindowsIcon,
|
|
48
|
-
menuActionSx: theme.components?.M4LAreasAdminMobilePopoverOptions?.styleOverrides
|
|
49
|
-
}
|
|
50
|
-
) : null;
|
|
51
|
-
};
|
|
52
|
-
export {
|
|
53
|
-
PanelWindowPopUp as P
|
|
54
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { useEffect } from "react";
|
|
2
|
-
function useOnClickOutside(ref, handler, noRef) {
|
|
3
|
-
useEffect(() => {
|
|
4
|
-
const listener = (event) => {
|
|
5
|
-
const el = ref?.current;
|
|
6
|
-
const noEl = noRef?.current;
|
|
7
|
-
if (!el || el.contains(event.target) || noEl && noEl.contains(event.target)) {
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
handler(event);
|
|
11
|
-
};
|
|
12
|
-
document.addEventListener("mousedown", listener);
|
|
13
|
-
document.addEventListener("touchstart", listener);
|
|
14
|
-
return () => {
|
|
15
|
-
document.removeEventListener("mousedown", listener);
|
|
16
|
-
document.removeEventListener("touchstart", listener);
|
|
17
|
-
};
|
|
18
|
-
}, [ref, handler]);
|
|
19
|
-
}
|
|
20
|
-
export {
|
|
21
|
-
useOnClickOutside as u
|
|
22
|
-
};
|
|
File without changes
|