@m4l/components 9.20.0 → 9.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/AccountPopover/AccountPopover.d.ts.map +1 -1
- package/components/AccountPopover/AccountPopover.js +43 -39
- package/components/AccountPopover/constants.d.ts +3 -0
- package/components/AccountPopover/constants.d.ts.map +1 -1
- package/components/AccountPopover/constants.js +11 -3
- package/components/AccountPopover/slots/AccountPopoverSlots.d.ts +7 -7
- package/components/AccountPopover/subcomponents/MenuPopover/MenuPopover.d.ts.map +1 -1
- package/components/AccountPopover/subcomponents/MenuPopover/MenuPopover.js +45 -43
- package/components/AccountPopover/types.d.ts +9 -0
- package/components/AccountPopover/types.d.ts.map +1 -1
- package/components/ActionsGroup/slots/ActionsGroupSlots.d.ts +2 -2
- package/components/AppBar/AppBar.d.ts +3 -18
- package/components/AppBar/AppBar.d.ts.map +1 -1
- package/components/AppBar/AppBar.js +64 -45
- package/components/AppBar/slots/AppBarEnum.d.ts +3 -1
- package/components/AppBar/slots/AppBarEnum.d.ts.map +1 -1
- package/components/AppBar/slots/AppBarEnum.js +2 -2
- package/components/AppBar/slots/AppBarSlots.d.ts +7 -1
- package/components/AppBar/slots/AppBarSlots.d.ts.map +1 -1
- package/components/AppBar/slots/AppBarSlots.js +30 -22
- package/components/AppBar/styles.d.ts.map +1 -1
- package/components/AppBar/styles.js +90 -47
- package/components/AppBar/types.d.ts +63 -29
- package/components/AppBar/types.d.ts.map +1 -1
- package/components/Card/constants.d.ts +1 -1
- package/components/CheckableList/slots/styled.d.ts +9 -9
- package/components/Chip/slots/ChipSlots.d.ts +4 -4
- package/components/ColorPicker/slots/ColorPickerSlots.d.ts +2 -2
- package/components/CommonActions/classes/index.d.ts +1 -1
- package/components/CommonActions/components/ActionCancel/slots/ActionsCancelSlots.d.ts +1 -1
- package/components/CommonActions/components/ActionFormCancel/slots/ActionFormCancelSlots.d.ts +1 -1
- package/components/CommonActions/components/ActionFormSubmitProgrammatic/slots/ActionFormSubmitProgrammaticSlots.d.ts +1 -1
- package/components/CommonActions/components/ActionIntro/slots/ActionsIntroSlots.d.ts +1 -1
- package/components/CommonActions/components/ActionsContainer/slots/ActionsContainerSlots.d.ts +1 -1
- package/components/DateRangeCalendarPicker/constants.d.ts +1 -1
- package/components/DateTimeRangePicker/slots/DateTimeRangePickerSlots.d.ts +9 -9
- package/components/DaysOfMonthPicker/slots/DaysOfMonthPickerSlots.d.ts +1 -1
- package/components/DaysOfWeekPicker/constants.d.ts +1 -1
- package/components/DaysOfWeekPicker/slots/DaysOfWeekPickerSlots.d.ts +1 -1
- package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +7 -7
- package/components/DynamicForm/constants.d.ts +1 -1
- package/components/DynamicForm/slots/DynamicFormSlots.d.ts +3 -3
- package/components/DynamicSort/slots/DynamicSortSlots.d.ts +7 -7
- package/components/EditLabel/constants.d.ts +1 -1
- package/components/EditLabel/slots/EditLabelSlots.d.ts +4 -4
- package/components/GridLayout/classes/index.d.ts +1 -1
- package/components/HelperError/slots/HelperErrorSlots.d.ts +1 -1
- package/components/ImageSelector/constants.d.ts +1 -1
- package/components/ImageSelector/slots/ImageSelectorSlots.d.ts +4 -4
- package/components/ImageText/constants.d.ts +1 -1
- package/components/ImageText/slots/ImageTextSlots.d.ts +2 -2
- package/components/Label/slots/LabelSlots.d.ts +2 -2
- package/components/LanguagePopover/LanguagePopover.d.ts +7 -7
- package/components/LanguagePopover/LanguagePopover.d.ts.map +1 -1
- package/components/LanguagePopover/LanguagePopover.js +40 -36
- package/components/LanguagePopover/slots/LanguagePopoverSlots.d.ts +1 -1
- package/components/LanguagePopover/types.d.ts +12 -3
- package/components/LanguagePopover/types.d.ts.map +1 -1
- package/components/LoadingError/LoadingError.js +4 -4
- package/components/LoadingError/slots/LoadingErrorSlots.d.ts +1 -1
- package/components/MFIsolationApp/slots/MFIsolationAppSlots.d.ts +2 -2
- package/components/MenuActions/slots/MenuActionsSlots.d.ts +2 -2
- package/components/MenuActions/types.d.ts +1 -1
- package/components/MenuActions/types.d.ts.map +1 -1
- package/components/ModalDialog/slots/ModalDialogSlots.d.ts +2 -2
- package/components/NumberInput/slots/NumberInputSlots.d.ts +2 -2
- package/components/ObjectLogs/slots/ObjectLogsSlots.d.ts +2 -2
- package/components/Pager/slots/PagerSlots.d.ts +3 -3
- package/components/PaperForm/slots/PaperFormSlots.d.ts +1 -1
- package/components/PropertyValue/slots/PropertyValueSlots.d.ts +1 -1
- package/components/SettingsLayout/slots/SettingsLayoutSlots.d.ts +3 -3
- package/components/SideBar/slots/SideBarSlots.d.ts +1 -1
- package/components/Stepper/slots/StepperSlot.d.ts +4 -4
- package/components/TabsNavigator/constants.d.ts +1 -1
- package/components/TabsNavigator/slots/TabsNavigatorSlots.d.ts +3 -3
- package/components/TimePicker/slots/TimePickerSlots.d.ts +8 -8
- package/components/ToastContainer/slots/toastContainerSlots.d.ts +4 -4
- package/components/WindowBase/slots/WindowBaseSlots.d.ts +2 -2
- package/components/WindowConfirm/WindowConfirm.js +10 -10
- package/components/WindowConfirm/WindowConfirm.styles.d.ts.map +1 -1
- package/components/WindowConfirm/WindowConfirm.styles.js +26 -5
- package/components/WindowConfirm/slots/WindowConfirmSlots.d.ts +5 -5
- package/components/areas/components/AreasAdmin/AreasAdmin.d.ts +1 -2
- package/components/areas/components/AreasAdmin/AreasAdmin.d.ts.map +1 -1
- package/components/areas/components/AreasAdmin/AreasAdmin.js +295 -119
- package/components/areas/components/AreasAdmin/AreasAdmin.styles.d.ts.map +1 -1
- package/components/areas/components/AreasAdmin/AreasAdmin.styles.js +309 -70
- package/components/areas/components/AreasAdmin/constants.d.ts +8 -0
- package/components/areas/components/AreasAdmin/constants.d.ts.map +1 -1
- package/components/areas/components/AreasAdmin/constants.js +10 -2
- package/components/areas/components/AreasAdmin/slots/AreasAdminEnum.d.ts +19 -0
- package/components/areas/components/AreasAdmin/slots/AreasAdminEnum.d.ts.map +1 -1
- package/components/areas/components/AreasAdmin/slots/AreasAdminEnum.js +2 -2
- package/components/areas/components/AreasAdmin/slots/AreasAdminSlots.d.ts +66 -9
- package/components/areas/components/AreasAdmin/slots/AreasAdminSlots.d.ts.map +1 -1
- package/components/areas/components/AreasAdmin/slots/AreasAdminSlots.js +176 -93
- package/components/areas/components/AreasAdmin/subcomponents/ContainerModules/ContainerModules.d.ts +6 -0
- package/components/areas/components/AreasAdmin/subcomponents/ContainerModules/ContainerModules.d.ts.map +1 -0
- package/components/areas/components/AreasAdmin/subcomponents/ContainerModules/ContainerModules.js +191 -0
- package/components/areas/components/AreasAdmin/subcomponents/ContainerModules/index.d.ts +2 -0
- package/components/areas/components/AreasAdmin/subcomponents/ContainerModules/index.d.ts.map +1 -0
- package/components/areas/components/AreasAdmin/subcomponents/ContainerModules/types.d.ts +37 -0
- package/components/areas/components/AreasAdmin/subcomponents/ContainerModules/types.d.ts.map +1 -0
- package/components/areas/components/AreasAdmin/types.d.ts +29 -3
- package/components/areas/components/AreasAdmin/types.d.ts.map +1 -1
- package/components/areas/dictionary.d.ts +3 -0
- package/components/areas/dictionary.d.ts.map +1 -1
- package/components/areas/dictionary.js +4 -1
- package/components/areas/hooks/index.d.ts +1 -1
- package/components/areas/hooks/index.d.ts.map +1 -1
- package/components/areas/hooks/useAreas/index.d.ts +5 -0
- package/components/areas/hooks/useAreas/index.d.ts.map +1 -1
- package/components/areas/hooks/useAreas/index.js +16 -7
- package/components/areas/icons.js +3 -10
- package/components/datagrids/slots/DataGridSlot.d.ts +6 -6
- package/components/extended/React-Resizable/ResizableBox/slots/ResizableBoxSlots.d.ts +1 -1
- package/components/extended/React-resizable-panels/slots/SplitLayoutSlots.d.ts +5 -5
- package/components/extended/mui/Accordion/slots/AccordionSlots.d.ts +4 -4
- package/components/extended/mui/Autocomplete/constants.d.ts +1 -1
- package/components/extended/mui/Autocomplete/slots/AutocompleteSlots.d.ts +6 -6
- package/components/extended/mui/Avatar/slots/AvatarSlots.d.ts +1 -1
- package/components/extended/mui/Badge/slots/BadgeSlots.d.ts +1 -1
- package/components/extended/mui/Button/slots/ButtonSlots.d.ts +2 -2
- package/components/extended/mui/CheckBox/slots/CheckBoxSlots.d.ts +2 -2
- package/components/extended/mui/DatePicker/constants.d.ts +1 -1
- package/components/extended/mui/DatePicker/slots/DatePickerSlots.d.ts +3 -3
- package/components/extended/mui/DateTimePicker/slots/DateTimePickerSlots.d.ts +4 -4
- package/components/extended/mui/Divider/slots/DividerSlots.d.ts +1 -1
- package/components/extended/mui/IconButton/slots/IconButtonSlots.d.ts +1 -1
- package/components/extended/mui/LoadingButton/slots/LoadingButtonSlots.d.ts +1 -1
- package/components/extended/mui/MenuDivider/slots/MenuDividerSlots.d.ts +1 -1
- package/components/extended/mui/MenuItem/slots/MenuItemSlots.d.ts +4 -4
- package/components/extended/mui/NavLink/slots/NavLinkSlots.d.ts +1 -1
- package/components/extended/mui/Popover/Popover.d.ts.map +1 -1
- package/components/extended/mui/Popover/Popover.js +41 -41
- package/components/extended/mui/Popper/slots/PopperStlots.d.ts +1 -1
- package/components/extended/mui/Radio/constants.d.ts +1 -1
- package/components/extended/mui/Radio/slots/styled.d.ts +2 -2
- package/components/extended/mui/Select/constants.d.ts +1 -1
- package/components/extended/mui/Select/slots/SelectSlots.d.ts +5 -5
- package/components/extended/mui/Skeleton/Slots/skeletonSlots.d.ts +1 -1
- package/components/extended/mui/Stack/slots/StackSlot.d.ts +1 -1
- package/components/extended/mui/Switch/constants.d.ts +1 -1
- package/components/extended/mui/Switch/slots/SwitchSlots.d.ts +2 -2
- package/components/extended/mui/Tab/Slots/TabSlots.d.ts +4 -4
- package/components/extended/mui/Tab/constants.d.ts +1 -1
- package/components/extended/mui/Tabs/slots/TabsSlots.d.ts +1 -1
- package/components/extended/mui/TextField/constants.d.ts +1 -1
- package/components/extended/mui/TextField/slots/TextFieldSlots.d.ts +4 -4
- package/components/extended/mui/TimePicker/slots/TimePickerSlots.d.ts +3 -3
- package/components/extended/mui/ToggleButton/slots/ToggleButtonSlots.d.ts +1 -1
- package/components/extended/mui/ToggleIconButton/slots/ToggleIconButtonSlots.d.ts +1 -1
- package/components/formatters/BooleanFormatter/slots/BooleanFormatterSlots.d.ts +1 -1
- package/components/formatters/ConcatenatedFormatter/slots/ConcatenatedFormatterSlots.d.ts +1 -1
- package/components/formatters/DateFormatter/slots/DateFormatterSlots.d.ts +1 -1
- package/components/formatters/DistanceToNowFormatter/slots/DistanceToNowFormatterSlots.d.ts +1 -1
- package/components/formatters/ImageFormatter/constants.d.ts +1 -1
- package/components/formatters/ImageFormatter/slots/ImageFormatterSlots.d.ts +1 -1
- package/components/formatters/NestedFormatter/constants.d.ts +1 -1
- package/components/formatters/PeriodFormatter/slots/PeriodFormatterSlots.d.ts +1 -1
- package/components/formatters/PointsFormatter/slots/ointsFormatterSlots.d.ts +1 -1
- package/components/formatters/PriceFormatter/slots/PriceFormatterSlots.d.ts +1 -1
- package/components/formatters/UncertaintyFormatter/slots/UncertaintyFormatterSlots.d.ts +1 -1
- package/components/hook-form/RHFCheckableList/constants.d.ts +1 -1
- package/components/hook-form/RHFCheckbox/slots/RHFCheckBoxSlots.d.ts +1 -1
- package/components/hook-form/RHFDatePicker/slots/RHFDatePickerSlots.d.ts +3 -3
- package/components/hook-form/RHFPeriod/slots/RHFPeriodSlots.d.ts +1 -1
- package/components/hook-form/RHFRadioGroup/constants.d.ts +1 -1
- package/components/hook-form/RHFRadioGroup/slots/styled.d.ts +1 -1
- package/components/hook-form/RHFSelect/constants.d.ts +1 -1
- package/components/hook-form/RHFSelect/slots/RHFSlots.d.ts +1 -1
- package/components/hook-form/RHFTextField/slots/RHFTextFieldSlots.d.ts +1 -1
- package/components/hook-form/RHFTextFieldPassword/slots/RHFTextFieldPasswordSlots.d.ts +2 -2
- package/components/hook-form/RHFUpload/RHFUploadImage/slots/RHFUploadImageSlots.d.ts +3 -3
- package/components/hook-form/RHFUpload/RHFUploadSingleFile/constants.d.ts +1 -1
- package/components/hook-form/RHFUpload/RHFUploadSingleFile/slots/RHFUploadSingleFileSlots.d.ts +7 -7
- package/components/hook-form/RHFormProvider/classes/index.d.ts +1 -1
- package/hooks/useDynamicFilterAndSort/slots/DynamicFilterAndSortSlots.d.ts +4 -4
- package/index.js +674 -673
- package/package.json +7 -7
- package/test/mocks/dictionary-mock.d.ts +1 -0
- package/test/mocks/dictionary-mock.d.ts.map +1 -1
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/AreaChip.js +0 -171
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/subcomponents/ChipActionsMobile/ChipActionsMobile.js +0 -45
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/AreaChipMobile.js +0 -69
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/ChipMobile/ChipMobile.js +0 -149
|
@@ -1,139 +1,315 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
|
|
1
|
+
import { jsxs as u, jsx as t } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useModuleDictionary as Me } from "@m4l/core";
|
|
3
|
+
import { useIsMobile as _e } from "@m4l/graphics";
|
|
4
|
+
import { LayoutTableFill as be, ActionsEditOutlined as ge, ActionsTrashOutlined as Se, ActionsAddSquareOutlined as we } from "@m4l/icons";
|
|
5
|
+
import { Tooltip as Ee, Icon as ve, Typography as ye } from "@m4l/base";
|
|
6
|
+
import Le from "clsx";
|
|
7
|
+
import * as Te from "yup";
|
|
8
|
+
import { useState as h, useRef as Ce, useEffect as Oe } from "react";
|
|
9
|
+
import { shallow as p } from "zustand/shallow";
|
|
10
|
+
import { getComponentSlotRoot as De } from "../../../../utils/getComponentSlotRoot.js";
|
|
11
|
+
import { getPropDataTestId as Pe } from "../../../../test/getNameDataTestId.js";
|
|
12
|
+
import { useModal as xe } from "../../../../hooks/useModal/index.js";
|
|
13
|
+
import { MenuDivider as Re } from "../../../extended/mui/MenuDivider/MenuDivider.js";
|
|
14
|
+
import { getAreasDictionary as i, AREAS_DICCTIONARY as l } from "../../dictionary.js";
|
|
15
|
+
import { useAreasStore as c } from "../../hooks/useAreas/index.js";
|
|
16
|
+
import { AREAS_ADMIN_TOOLTIP_DELAY_PROPS as Ne, AREAS_MENU_MAX_VISIBLE_ITEMS as $e, AREAS_ADMIN_KEY_COMPONENT as W, DEFAULT_HORIZONTAL_MODULE_ITEM_LIMIT as ze, DEFAULT_VERTICAL_MODULE_ITEM_LIMIT as We } from "./constants.js";
|
|
17
|
+
import { AreasAdminRootStyled as ke, AreasAdminContentStyled as Be, AreasTriggerButtonStyled as Fe, AreasMenuContentStyled as Ve, AreasMenuScrollAreaStyled as Ue, AreasMenuListStyled as He, AreaMenuItemActionsStyled as je, AreaMenuActionButtonStyled as k, AreasMenuFooterStyled as Ye, ButtonAddAreaStyled as qe, AreasSectionDividerStyled as Ke, EditAreaHeaderStyled as Xe } from "./slots/AreasAdminSlots.js";
|
|
18
|
+
import { createValidationSchema as Ze, createValidationFullObject as Ge, createValidationPartialObject as Je } from "../../../hook-form/RHFormProvider/schema.js";
|
|
19
|
+
import { ContainerModules as Qe } from "./subcomponents/ContainerModules/ContainerModules.js";
|
|
20
|
+
import { RHFormProvider as et } from "../../../hook-form/RHFormProvider/RHFormProvider.js";
|
|
21
|
+
import { RHFTextField as tt } from "../../../hook-form/RHFTextField/RHFTextField.js";
|
|
22
|
+
import { ActionsContainer as rt } from "../../../CommonActions/components/ActionsContainer/ActionsContainer.js";
|
|
23
|
+
import { Popover as B } from "../../../extended/mui/Popover/Popover.js";
|
|
24
|
+
import { MenuItem as F } from "../../../extended/mui/MenuItem/MenuItem.js";
|
|
25
|
+
import { ActionCancel as ot } from "../../../CommonActions/components/ActionCancel/ActionCancel.js";
|
|
26
|
+
import { ActionIntro as nt } from "../../../CommonActions/components/ActionIntro/ActionIntro.js";
|
|
27
|
+
import { AreasAdminSlots as at } from "./slots/AreasAdminEnum.js";
|
|
28
|
+
import { WindowConfirm as it } from "../../../WindowConfirm/WindowConfirm.js";
|
|
29
|
+
function lt(g, f) {
|
|
30
|
+
return f !== void 0 ? Math.max(f, 1) : g === "horizontal" ? ze : We;
|
|
31
|
+
}
|
|
32
|
+
const Nt = (g) => {
|
|
21
33
|
const {
|
|
22
|
-
color:
|
|
23
|
-
size:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
34
|
+
color: f = "primary",
|
|
35
|
+
size: o = "medium",
|
|
36
|
+
orientation: m = "vertical",
|
|
37
|
+
moduleItemLimit: V,
|
|
38
|
+
className: U,
|
|
39
|
+
dataTestId: H,
|
|
40
|
+
...j
|
|
41
|
+
} = g, Y = _e(), { getLabel: n } = Me(), { openModal: q } = xe(), [I, T] = h(null), [S, C] = h(null), [K, O] = h(null), [A, D] = h(null), [w, E] = h(null), P = Ce(null), d = c(
|
|
42
|
+
(e) => e.areasIds.map((r) => ({ id: r, name: e.hashAreas[r].name })),
|
|
43
|
+
p
|
|
44
|
+
), M = c((e) => e.currentAreaId, p), X = c((e) => e.ownerState?.status), { addArea: Z, deleteArea: G, editArea: J, selectArea: Q } = c((e) => e.areasActions, p), { maximizeLayout: ee } = c((e) => e.areaActions, p), te = c(
|
|
45
|
+
(e) => e.currentAreaId ? e.hashAreas[e.currentAreaId]?.currentLayoutId : ""
|
|
46
|
+
), x = c(
|
|
47
|
+
(e) => e.currentAreaId ? e.hashAreas[e.currentAreaId]?.maximizedId : void 0
|
|
48
|
+
), R = c(
|
|
49
|
+
(e) => e.hashAreas[e.currentAreaId]?.layoutItemsIds?.filter((r) => e.hashWindows[r].emergeType === "layout")?.map((r) => {
|
|
50
|
+
const a = e.hashWindows[r], s = a.moduleCount;
|
|
33
51
|
return {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
52
|
+
iconUrl: a.iconUrl,
|
|
53
|
+
id: a.windowId,
|
|
54
|
+
label: `${a.title}${s ? `:${s}` : ""}`,
|
|
55
|
+
title: a.title
|
|
37
56
|
};
|
|
38
57
|
}) ?? [],
|
|
39
|
-
|
|
40
|
-
),
|
|
41
|
-
if (
|
|
58
|
+
p
|
|
59
|
+
), _ = !!I;
|
|
60
|
+
if (Oe(() => {
|
|
61
|
+
if (!_ || !w)
|
|
62
|
+
return;
|
|
63
|
+
const e = Array.from(
|
|
64
|
+
P.current?.querySelectorAll("[data-area-menu-item-id]") ?? []
|
|
65
|
+
).find((r) => r.dataset.areaMenuItemId === w);
|
|
66
|
+
e && (e.scrollIntoView?.({ block: "nearest" }), E(null));
|
|
67
|
+
}, [d, _, w]), X !== "loaded")
|
|
42
68
|
return null;
|
|
43
|
-
const d = {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
69
|
+
const v = n(i(l.label_new_area)) || "Open areas menu", re = n(i(l.area_add_new)) || "Add area", N = n(i(l.label_edit_area)) || "Edit area", oe = n(i(l.label_delete_area)) || "Delete area", ne = n(i(l.label_delete_area_confirm_title)) || "Delete work area", ae = n(i(l.label_delete_area_confirm_message)) || "This action is irreversible. Do you want to permanently delete this work area?", $ = d.find((e) => e.id === M)?.name ?? "", ie = n(i(l.label_window)) || "Window", le = n(i(l.label_windows)) || "Windows", y = !!x && R.length > 1, de = lt(m, V), se = x || te || !1, L = {
|
|
70
|
+
color: f,
|
|
71
|
+
hasModules: y,
|
|
72
|
+
isMobile: Y,
|
|
73
|
+
orientation: m,
|
|
74
|
+
size: o
|
|
75
|
+
};
|
|
76
|
+
function ce(e) {
|
|
77
|
+
e.stopPropagation(), T(e.currentTarget);
|
|
78
|
+
}
|
|
79
|
+
function z() {
|
|
80
|
+
I?.blur(), T(null), E(null), b();
|
|
81
|
+
}
|
|
82
|
+
function me(e, r) {
|
|
83
|
+
e.stopPropagation();
|
|
84
|
+
const a = e.currentTarget.closest("li") ?? e.currentTarget, s = a.getBoundingClientRect();
|
|
85
|
+
C(a), O({ left: s.right, top: s.top + s.height / 2 }), D(r);
|
|
86
|
+
}
|
|
87
|
+
function b() {
|
|
88
|
+
C(null), O(null), D(null);
|
|
89
|
+
}
|
|
90
|
+
function ue(e) {
|
|
91
|
+
A && (J(A, e.inputEditArea), b());
|
|
92
|
+
}
|
|
93
|
+
function Ae(e, r) {
|
|
94
|
+
if (e.stopPropagation(), d.length > 1) {
|
|
95
|
+
const a = d.find((s) => s.id === r)?.name;
|
|
96
|
+
q({
|
|
97
|
+
variant: "warning",
|
|
98
|
+
window: /* @__PURE__ */ t(
|
|
99
|
+
it,
|
|
100
|
+
{
|
|
101
|
+
variant: "warning",
|
|
102
|
+
title: ne,
|
|
103
|
+
msg: `${ae} (${a})`,
|
|
104
|
+
onClickIntro: () => G(r),
|
|
105
|
+
size: o
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
function he(e) {
|
|
112
|
+
Q(e), z();
|
|
113
|
+
}
|
|
114
|
+
function pe() {
|
|
115
|
+
const e = Z();
|
|
116
|
+
e && E(e);
|
|
117
|
+
}
|
|
118
|
+
function fe(e) {
|
|
119
|
+
ee(M, e);
|
|
120
|
+
}
|
|
121
|
+
const Ie = Ze(
|
|
122
|
+
Ge(
|
|
123
|
+
Je({
|
|
124
|
+
inputEditArea: Te.string().required(
|
|
125
|
+
n(i(l.validation_edit_area))
|
|
126
|
+
)
|
|
127
|
+
})
|
|
128
|
+
)
|
|
129
|
+
);
|
|
130
|
+
return /* @__PURE__ */ u(
|
|
131
|
+
ke,
|
|
62
132
|
{
|
|
63
|
-
className:
|
|
64
|
-
|
|
133
|
+
className: Le(De(W), U),
|
|
134
|
+
ownerState: L,
|
|
65
135
|
role: "areas-admin-role",
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
size: r,
|
|
73
|
-
role: "presentation",
|
|
74
|
-
ref: v,
|
|
75
|
-
children: /* @__PURE__ */ e(
|
|
76
|
-
K,
|
|
136
|
+
...Pe(W, at.root, H),
|
|
137
|
+
...j,
|
|
138
|
+
children: [
|
|
139
|
+
/* @__PURE__ */ u(Be, { ownerState: L, children: [
|
|
140
|
+
/* @__PURE__ */ t(
|
|
141
|
+
Ee,
|
|
77
142
|
{
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
143
|
+
...Ne,
|
|
144
|
+
title: $ ? `${v}: ${$}` : v,
|
|
145
|
+
children: /* @__PURE__ */ t(
|
|
146
|
+
Fe,
|
|
81
147
|
{
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
148
|
+
"aria-label": v,
|
|
149
|
+
color: I ? "primary" : "default",
|
|
150
|
+
icon: /* @__PURE__ */ t(be, {}),
|
|
151
|
+
onClick: ce,
|
|
152
|
+
size: o,
|
|
153
|
+
selected: _,
|
|
154
|
+
variant: "text"
|
|
155
|
+
}
|
|
156
|
+
)
|
|
157
|
+
}
|
|
158
|
+
),
|
|
159
|
+
/* @__PURE__ */ t(
|
|
160
|
+
B,
|
|
161
|
+
{
|
|
162
|
+
anchorEl: I,
|
|
163
|
+
anchorOrigin: m === "vertical" ? { horizontal: "right", vertical: "top" } : { horizontal: "right", vertical: "bottom" },
|
|
164
|
+
arrowType: "right-top",
|
|
165
|
+
onClose: z,
|
|
166
|
+
open: _,
|
|
167
|
+
slotProps: {
|
|
168
|
+
paper: {
|
|
169
|
+
sx: {
|
|
170
|
+
// Pin the areas menu to a fixed, safe width so growing content
|
|
171
|
+
// (long area names) can no longer widen or shift the popover.
|
|
172
|
+
width: 230,
|
|
173
|
+
maxWidth: 230,
|
|
174
|
+
minWidth: 230,
|
|
175
|
+
...m === "vertical" ? { ml: 1.5 } : { mt: 1 }
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
transformOrigin: m === "vertical" ? { horizontal: "left", vertical: "top" } : { horizontal: "right", vertical: "top" },
|
|
180
|
+
children: /* @__PURE__ */ u(Ve, { children: [
|
|
181
|
+
/* @__PURE__ */ t(
|
|
182
|
+
Ue,
|
|
183
|
+
{
|
|
184
|
+
ref: P,
|
|
185
|
+
ownerState: { ...L, maxVisibleItems: $e },
|
|
186
|
+
children: /* @__PURE__ */ t(He, { children: d.length > 0 ? d.map((e) => /* @__PURE__ */ t(
|
|
187
|
+
F,
|
|
86
188
|
{
|
|
87
|
-
"
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
189
|
+
"data-area-menu-item-id": e.id,
|
|
190
|
+
endAdornment: e.id === M ? /* @__PURE__ */ u(je, { children: [
|
|
191
|
+
/* @__PURE__ */ t(
|
|
192
|
+
k,
|
|
193
|
+
{
|
|
194
|
+
"aria-label": `${N}: ${e.name}`,
|
|
195
|
+
icon: /* @__PURE__ */ t(ge, {}),
|
|
196
|
+
onClick: (r) => me(r, e.id),
|
|
197
|
+
size: o,
|
|
198
|
+
variant: "text"
|
|
199
|
+
}
|
|
200
|
+
),
|
|
201
|
+
/* @__PURE__ */ t(
|
|
202
|
+
k,
|
|
203
|
+
{
|
|
204
|
+
"aria-label": `${oe}: ${e.name}`,
|
|
205
|
+
color: "error",
|
|
206
|
+
disabled: d.length === 1,
|
|
207
|
+
icon: /* @__PURE__ */ t(Se, {}),
|
|
208
|
+
onClick: (r) => Ae(r, e.id),
|
|
209
|
+
size: o,
|
|
210
|
+
variant: "text"
|
|
211
|
+
}
|
|
212
|
+
)
|
|
213
|
+
] }) : void 0,
|
|
214
|
+
label: e.name,
|
|
215
|
+
onClick: () => he(e.id),
|
|
216
|
+
selected: e.id === M,
|
|
217
|
+
size: o
|
|
218
|
+
},
|
|
219
|
+
e.id
|
|
220
|
+
)) : /* @__PURE__ */ t(
|
|
221
|
+
F,
|
|
222
|
+
{
|
|
223
|
+
disabled: !0,
|
|
224
|
+
label: n(i(l.label_no_areas_available)) || "No areas available",
|
|
225
|
+
size: o
|
|
94
226
|
}
|
|
95
|
-
)
|
|
96
|
-
|
|
97
|
-
|
|
227
|
+
) })
|
|
228
|
+
}
|
|
229
|
+
),
|
|
230
|
+
/* @__PURE__ */ t(Re, { variant: "solid", size: o }),
|
|
231
|
+
/* @__PURE__ */ t(Ye, { children: /* @__PURE__ */ t(
|
|
232
|
+
qe,
|
|
233
|
+
{
|
|
234
|
+
endIcon: /* @__PURE__ */ t(ve, { icon: /* @__PURE__ */ t(we, {}) }),
|
|
235
|
+
label: re,
|
|
236
|
+
onClick: pe,
|
|
237
|
+
size: o,
|
|
238
|
+
color: "default",
|
|
239
|
+
variant: "contained",
|
|
240
|
+
fullWidth: !0
|
|
241
|
+
}
|
|
242
|
+
) })
|
|
243
|
+
] })
|
|
244
|
+
}
|
|
245
|
+
),
|
|
246
|
+
m === "vertical" && y ? /* @__PURE__ */ t(
|
|
247
|
+
Ke,
|
|
248
|
+
{
|
|
249
|
+
customVariant: "solid",
|
|
250
|
+
"data-testid": "AreasAdminTriggerDivider",
|
|
251
|
+
orientation: "horizontal",
|
|
252
|
+
size: o
|
|
253
|
+
}
|
|
254
|
+
) : null,
|
|
255
|
+
y ? /* @__PURE__ */ t(
|
|
256
|
+
Qe,
|
|
257
|
+
{
|
|
258
|
+
itemLimit: de,
|
|
259
|
+
items: R,
|
|
260
|
+
menuHeaderLabel: le,
|
|
261
|
+
onSelect: fe,
|
|
262
|
+
orientation: m,
|
|
263
|
+
overflowLabel: `More ${ie.toLowerCase()} modules`,
|
|
264
|
+
selectedItemId: se,
|
|
265
|
+
size: o
|
|
266
|
+
}
|
|
267
|
+
) : null
|
|
268
|
+
] }),
|
|
269
|
+
A ? /* @__PURE__ */ t(
|
|
270
|
+
B,
|
|
271
|
+
{
|
|
272
|
+
anchorEl: S,
|
|
273
|
+
anchorPosition: K ?? void 0,
|
|
274
|
+
anchorReference: "anchorPosition",
|
|
275
|
+
arrowType: "no-arrow",
|
|
276
|
+
container: S?.closest('[aria-label="Paper-popover-root"]'),
|
|
277
|
+
onClose: b,
|
|
278
|
+
open: !!S,
|
|
279
|
+
slotProps: { paper: { sx: { ml: 4, minWidth: 220 } } },
|
|
280
|
+
transformOrigin: { horizontal: "left", vertical: "center" },
|
|
281
|
+
children: /* @__PURE__ */ u(
|
|
282
|
+
et,
|
|
283
|
+
{
|
|
284
|
+
onSubmit: ue,
|
|
285
|
+
validationSchema: Ie,
|
|
286
|
+
values: {
|
|
287
|
+
inputEditArea: d.find((e) => e.id === A)?.name ?? ""
|
|
288
|
+
},
|
|
289
|
+
children: [
|
|
290
|
+
/* @__PURE__ */ t(Xe, { children: /* @__PURE__ */ t(ye, { color: "text.secondary", variant: "bodyDens", children: N }) }),
|
|
291
|
+
/* @__PURE__ */ t(tt, { name: "inputEditArea" }),
|
|
292
|
+
/* @__PURE__ */ u(rt, { children: [
|
|
293
|
+
/* @__PURE__ */ t(
|
|
294
|
+
ot,
|
|
98
295
|
{
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
{
|
|
103
|
-
size: r,
|
|
104
|
-
color: p,
|
|
105
|
-
areaId: o,
|
|
106
|
-
selected: o === a,
|
|
107
|
-
disabled: x === 1
|
|
108
|
-
},
|
|
109
|
-
o
|
|
110
|
-
))
|
|
296
|
+
onClick: b,
|
|
297
|
+
size: o,
|
|
298
|
+
variant: "contained"
|
|
111
299
|
}
|
|
112
300
|
),
|
|
113
|
-
|
|
114
|
-
/* @__PURE__ */ e(X, { size: r, skeletonWidth: "80px", children: c(l(u.label_window)) }),
|
|
115
|
-
/* @__PURE__ */ e(
|
|
116
|
-
eo,
|
|
117
|
-
{
|
|
118
|
-
size: r,
|
|
119
|
-
icon: `${f}/${C}/frontend/components/areas_admin/assets/icons/${w.PENDING_ORDER}`,
|
|
120
|
-
arrowType: "no-arrow",
|
|
121
|
-
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
122
|
-
transformOrigin: { vertical: "top", horizontal: "left" },
|
|
123
|
-
menuActions: W
|
|
124
|
-
}
|
|
125
|
-
)
|
|
126
|
-
] }) })
|
|
301
|
+
/* @__PURE__ */ t(nt, { size: o })
|
|
127
302
|
] })
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
303
|
+
]
|
|
304
|
+
},
|
|
305
|
+
A
|
|
306
|
+
)
|
|
307
|
+
}
|
|
308
|
+
) : null
|
|
309
|
+
]
|
|
134
310
|
}
|
|
135
311
|
);
|
|
136
312
|
};
|
|
137
313
|
export {
|
|
138
|
-
|
|
314
|
+
Nt as AreasAdmin
|
|
139
315
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AreasAdmin.styles.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/areas/components/AreasAdmin/AreasAdmin.styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AreasAdmin.styles.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/areas/components/AreasAdmin/AreasAdmin.styles.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,eAAO,MAAM,gBAAgB,EAAE,gBA8b9B,CAAC"}
|