@m4l/components 0.1.76 → 0.1.78

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.
Files changed (133) hide show
  1. package/@types/export.d.ts +22 -3
  2. package/components/AccountPopover/{index.47cf6c43.js → index.7e76dbb7.js} +8 -7
  3. package/components/AppBar/{index.f04f5e45.js → index.06858422.js} +8 -7
  4. package/components/CommonActions/components/ActionCancel/{index.453c2d24.js → index.d536ccfa.js} +2 -2
  5. package/components/CommonActions/components/ActionFormCancel/{index.c2a2fd55.js → index.a915b105.js} +19 -19
  6. package/components/CommonActions/components/ActionFormIntro/{index.25d33912.js → index.14e65d6c.js} +2 -2
  7. package/components/CommonActions/components/ActionIntro/{index.c653a266.js → index.aa1648eb.js} +2 -2
  8. package/components/CommonActions/components/Actions/{index.e376a68e.js → index.52125041.js} +17 -18
  9. package/components/DataGrid/{index.ffaf000e.js → index.9fb3e6a1.js} +40 -31
  10. package/components/DataGrid/types.d.ts +5 -1
  11. package/components/DraggableWindow/{index.b08af1dc.js → index.c702d3f2.js} +1 -1
  12. package/components/DynamicFilter/constants.d.ts +1 -0
  13. package/components/DynamicFilter/contexts/DynamicFilterContext/store.d.ts +6 -1
  14. package/components/DynamicFilter/{index.d7c03a61.js → index.d1a2e2d1.js} +54 -47
  15. package/components/DynamicFilter/tests/contants.d.ts +2 -3
  16. package/components/DynamicFilter/types.d.ts +4 -0
  17. package/components/GridLayout/GridLayout.d.ts +6 -0
  18. package/components/GridLayout/Responsive/index.0905a698.js +353 -0
  19. package/components/GridLayout/WidthProvider/index.9a26dfe4.js +65 -0
  20. package/components/GridLayout/calculateUtils.d.ts +42 -0
  21. package/components/GridLayout/index.d.ts +6 -0
  22. package/components/GridLayout/index.da6fd387.js +1410 -0
  23. package/components/GridLayout/subcomponents/GridItem/index.d.ts +26 -0
  24. package/components/GridLayout/subcomponents/GridItem/types.d.ts +78 -0
  25. package/components/GridLayout/subcomponents/Responsive/index.d.ts +3 -0
  26. package/components/GridLayout/subcomponents/Responsive/responsiveUtils.d.ts +64 -0
  27. package/components/GridLayout/subcomponents/Responsive/types.d.ts +69 -0
  28. package/components/GridLayout/subcomponents/WidthProvider/index.d.ts +16 -0
  29. package/components/GridLayout/types.d.ts +355 -0
  30. package/components/GridLayout/utils.d.ts +123 -0
  31. package/components/HelperText/{index.9864f773.js → index.a019742c.js} +8 -7
  32. package/components/Icon/{index.9dae8337.js → index.9fcd1476.js} +1 -1
  33. package/components/LanguagePopover/{index.938c6675.js → index.98b63dcb.js} +8 -7
  34. package/components/LinearProgressIndeterminate/{index.d34d398f.js → index.60dabc06.js} +1 -1
  35. package/components/ModalDialog/{index.d9c5d400.js → index.d9937d46.js} +8 -56
  36. package/components/NavLink/{index.21c8fd90.js → index.a5dea6d3.js} +8 -7
  37. package/components/ObjectLogs/{index.a2709fc2.js → index.d9d20b9d.js} +27 -21
  38. package/components/ObjectLogs/types.d.ts +1 -0
  39. package/components/PaperForm/{index.5e1bc99f.js → index.ba38a0bd.js} +1 -1
  40. package/components/Period/{index.526791a3.js → index.7b94c418.js} +22 -23
  41. package/components/PropertyValue/constants.d.ts +3 -0
  42. package/components/PropertyValue/{index.8a1adf3e.js → index.45c73161.js} +17 -11
  43. package/components/PropertyValue/types.d.ts +2 -1
  44. package/components/Resizeable/{index.f6e48e56.js → index.9a9c79a4.js} +1 -1
  45. package/components/SideBar/{index.9e1a5b96.js → index.2f497e6c.js} +5 -5
  46. package/components/areas/components/AreasAdmin/classes/index.d.ts +1 -1
  47. package/components/areas/components/AreasAdmin/classes/types.d.ts +5 -0
  48. package/components/areas/components/AreasAdmin/{index.946eebb9.js → index.43ecd998.js} +167 -81
  49. package/components/areas/components/AreasAdmin/subcomponents/AreaChip/types.d.ts +0 -1
  50. package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/PanelWindowPopUp/index.d.ts +3 -0
  51. package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/PanelWindowPopUp/types.d.ts +3 -0
  52. package/components/areas/components/AreasViewer/classes/index.d.ts +1 -1
  53. package/components/areas/components/AreasViewer/classes/types.d.ts +3 -0
  54. package/components/areas/components/AreasViewer/{index.bf4191ea.js → index.14e62059.js} +326 -345
  55. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/{GridLayout → AreaGridLayout}/index.d.ts +1 -1
  56. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/index.d.ts +2 -2
  57. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/index.d.ts +1 -7
  58. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/subcomponents/WindowPopUpsList/index.d.ts +3 -0
  59. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/subcomponents/WindowPopUpsList/types.d.ts +2 -0
  60. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/types.d.ts +6 -0
  61. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/types.d.ts +1 -1
  62. package/components/areas/components/index.a87653a9.js +29 -0
  63. package/components/areas/contexts/AreasContext/helper.d.ts +8 -16
  64. package/components/areas/contexts/AreasContext/{index.f0397b7c.js → index.02c4e7be.js} +262 -336
  65. package/components/areas/contexts/AreasContext/types.d.ts +22 -20
  66. package/components/areas/contexts/{index.1809650a.js → index.1ff9b360.js} +1 -1
  67. package/components/areas/{dictionary.3fabae50.js → dictionary.afb7e3d9.js} +5 -2
  68. package/components/areas/dictionary.d.ts +4 -1
  69. package/components/areas/hooks/useAreas/{index.40917e99.js → index.85e4b2e2.js} +1 -1
  70. package/components/areas/{icons.19cde4b4.js → icons.8266ccc8.js} +5 -1
  71. package/components/areas/icons.d.ts +4 -0
  72. package/components/areas/{index.9bd48013.js → index.d1dcccf5.js} +12 -11
  73. package/components/areas/types.d.ts +29 -22
  74. package/components/formatters/BooleanFormatter/{index.431dc923.js → index.e8de8e4c.js} +1 -1
  75. package/components/formatters/{index.e1af75e6.js → index.67aeb049.js} +2 -2
  76. package/components/hook-form/RHFAutocomplete/{index.a063dc44.js → index.6aa51705.js} +25 -13
  77. package/components/hook-form/RHFAutocompleteAsync/{index.ddfd9cc9.js → index.1a3dfe5f.js} +1 -1
  78. package/components/hook-form/RHFCheckbox/{index.7e7f220b.js → index.a08a65b3.js} +1 -1
  79. package/components/hook-form/RHFDateTime/{index.d330709b.js → index.4d671108.js} +10 -9
  80. package/components/hook-form/RHFPeriod/{index.e2b1293b.js → index.39b4be49.js} +2 -2
  81. package/components/hook-form/RHFTextField/{index.e5336d09.js → index.9004e898.js} +5 -5
  82. package/components/hook-form/RHFUpload/{index.17e7f9eb.js → index.bed8573e.js} +9 -11
  83. package/components/index.d.ts +1 -0
  84. package/components/modal/{WindowBase.7acb9f1d.js → WindowBase.a0c0b322.js} +10 -9
  85. package/components/modal/{WindowConfirm.9b829837.js → WindowConfirm.6c063f2d.js} +19 -19
  86. package/components/modal/classes/index.d.ts +1 -0
  87. package/components/modal/classes/types.d.ts +1 -0
  88. package/components/modal/{index.1b25b61d.js → index.00efea85.js} +19 -17
  89. package/components/mui_extended/Accordion/constants.d.ts +1 -0
  90. package/components/mui_extended/Accordion/{index.3faafd8b.js → index.9877f7bf.js} +8 -9
  91. package/components/mui_extended/Accordion/types.d.ts +1 -0
  92. package/components/mui_extended/Badge/Badge.d.ts +3 -0
  93. package/components/mui_extended/Badge/classes/constants.d.ts +1 -0
  94. package/components/mui_extended/Badge/classes/index.d.ts +6 -0
  95. package/components/mui_extended/Badge/classes/types.d.ts +6 -0
  96. package/components/mui_extended/Badge/index.8c2b8b66.js +36 -0
  97. package/components/mui_extended/Badge/index.d.ts +2 -0
  98. package/components/mui_extended/Badge/tests/constants.d.ts +1 -0
  99. package/components/mui_extended/Badge/tests/utils.d.ts +2 -0
  100. package/components/mui_extended/Badge/types.d.ts +4 -0
  101. package/components/mui_extended/Button/{index.fdb5dcbd.js → index.4288f9fc.js} +8 -3
  102. package/components/mui_extended/IconButton/{index.1a9d4fa5.js → index.12f1a3c3.js} +4 -1
  103. package/components/mui_extended/MenuActions/{index.ba1da3b3.js → index.43a2e1ae.js} +41 -13
  104. package/components/mui_extended/MenuActions/index.d.ts +3 -2
  105. package/components/mui_extended/MenuActions/types.d.ts +9 -0
  106. package/components/mui_extended/Pager/{index.67bda2c5.js → index.2f6d6d7d.js} +1 -1
  107. package/components/mui_extended/Tab/constant.d.ts +1 -0
  108. package/components/mui_extended/Tab/{index.9e2f6e34.js → index.7c82e43d.js} +5 -6
  109. package/components/mui_extended/Tab/types.d.ts +1 -0
  110. package/components/mui_extended/{index.73e536de.js → index.0e2ff642.js} +8 -7
  111. package/components/mui_extended/index.d.ts +1 -0
  112. package/contexts/ModalContext/{index.699f95fa.js → index.e9a7ba4a.js} +1 -1
  113. package/hooks/useModal/{index.7b7d26ba.js → index.8e85f7ae.js} +1 -1
  114. package/index.js +228 -214
  115. package/node_modules.d73a220d.js +363 -0
  116. package/package.json +4 -3
  117. package/{react-draggable.6d7949a3.js → react-draggable.7abb5d0a.js} +3 -2
  118. package/{react-resizable.b6f8e04a.js → react-resizable.ba08699a.js} +13 -12
  119. package/test/getNameDataTestId.d.ts +1 -0
  120. package/utils/{index.008b4c2a.js → index.c43a95f4.js} +0 -15
  121. package/vendor.e353394b.js +124 -0
  122. package/components/DynamicFilter/tests/types.d.ts +0 -2
  123. package/components/DynamicFilter/tests/utils.d.ts +0 -2
  124. package/components/PropertyValue/tests/constants.d.ts +0 -1
  125. package/components/PropertyValue/tests/utils.d.ts +0 -2
  126. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/WindowPopUp/index.d.ts +0 -4
  127. package/components/areas/components/index.2bb534cb.js +0 -28
  128. package/components/modal/ModalDialog/types.d.ts +0 -7
  129. package/components/mui_extended/Accordion/tests/constants.d.ts +0 -1
  130. package/components/mui_extended/Accordion/tests/utils.d.ts +0 -2
  131. package/components/mui_extended/Tab/tests/constants.d.ts +0 -1
  132. package/components/mui_extended/Tab/tests/utils.d.ts +0 -2
  133. /package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/{GridLayout → AreaGridLayout}/types.d.ts +0 -0
@@ -0,0 +1,123 @@
1
+ import { CompactType, Layout, LayoutItem, Position } from './types';
2
+ export declare const noop: () => void;
3
+ /**
4
+ * Return the bottom coordinate of the layout.
5
+ *
6
+ * @param {Array} layout Layout array.
7
+ * @return {Number} Bottom coordinate.
8
+ */
9
+ export declare function bottom(layout: Layout, colapsedHeight: number): number;
10
+ export declare function cloneLayoutItem(layoutItem: LayoutItem, layoutItemReplaceProps?: Partial<Exclude<LayoutItem, 'i'>>): LayoutItem;
11
+ export declare function cloneLayout(layout: Layout, layoutItemReplaceProps?: Partial<Exclude<LayoutItem, 'i'>>): Layout;
12
+ /**
13
+ * Given two layoutitems, check if they collide.
14
+ */
15
+ export declare function collides(l1: LayoutItem, l2: LayoutItem, colapsedHeight: number): boolean;
16
+ /**
17
+ * Compact an item in the layout.
18
+ *
19
+ * Modifies item.
20
+ *
21
+ */
22
+ export declare function compactItem(compareWith: Layout, l: LayoutItem, compactType: CompactType, cols: number, fullLayout: Layout, colapsedHeight: number, allowOverlap?: boolean): LayoutItem;
23
+ /**
24
+ * Given a layout, compact it. This involves going down each y coordinate and removing gaps
25
+ * between items.
26
+ *
27
+ * Does not modify layout items (clones). Creates a new layout array.
28
+ *
29
+ * @param {Array} layout Layout.
30
+ * @param {Boolean} verticalCompact Whether or not to compact the layout
31
+ * vertically.
32
+ * @param {Boolean} allowOverlap When `true`, allows overlapping grid items.
33
+ * @return {Array} Compacted Layout.
34
+ */
35
+ export declare function compact(layout: Layout, compactType: CompactType, cols: number, colapsedHeight: number, allowOverlap?: boolean): Layout;
36
+ /**
37
+ * Get a layout item by ID. Used so we can override later on if necessary.
38
+ *
39
+ * @param {Array} layout Layout array.
40
+ * @param {String} id ID
41
+ * @return {LayoutItem} Item at ID.
42
+ */
43
+ export declare function getLayoutItem(layout: Layout, id: string): LayoutItem | undefined;
44
+ /**
45
+ * Get all static elements.
46
+ * @param {Array} layout Array of layout objects.
47
+ * @return {Array} Array of static layout items..
48
+ */
49
+ export declare function getStatics(layout: Layout): Array<LayoutItem>;
50
+ export declare function fastPositionEqual(a: Position, b: Position): boolean;
51
+ export declare function getAllCollisions(layout: Layout, layoutItem: LayoutItem, colapsedHeight: number): Array<LayoutItem>;
52
+ /**
53
+ * Returns the first item this layout collides with.
54
+ * It doesn't appear to matter which order we approach this from, although
55
+ * perhaps that is the wrong thing to do.
56
+ *
57
+ * @param {Object} layoutItem Layout item.
58
+ * @return {Object|undefined} A colliding layout item, or undefined.
59
+ */
60
+ export declare function getFirstCollision(layout: Layout, layoutItem: LayoutItem, colapsedHeight: number): LayoutItem | undefined;
61
+ export declare function modifyLayout(layout: Layout, layoutItem: LayoutItem): Layout;
62
+ /**
63
+ * This is where the magic needs to happen - given a collision, move an element away from the collision.
64
+ * We attempt to move it up if there's room, otherwise it goes below.
65
+ *
66
+ * @param {Array} layout Full layout to modify.
67
+ * @param {LayoutItem} collidesWith Layout item we're colliding with.
68
+ * @param {LayoutItem} itemToMove Layout item we're moving.
69
+ */
70
+ export declare function moveElementAwayFromCollision(layout: Layout, collidesWith: LayoutItem, itemToMove: LayoutItem, isUserAction: boolean, compactType: CompactType, cols: number, colapsedHeight: number): Layout;
71
+ /**
72
+ * Move an element. Responsible for doing cascading movements of other elements.
73
+ *
74
+ * Modifies layout items.
75
+ *
76
+ * @param {Array} layout Full layout to modify.
77
+ * @param {LayoutItem} l element to move.
78
+ * @param {Number} [x] X position in grid units.
79
+ * @param {Number} [y] Y position in grid units.
80
+ */
81
+ export declare function moveElement(layout: Layout, l: LayoutItem, x: number | undefined, y: number | undefined, isUserAction: boolean, preventCollision: boolean, compactType: CompactType, cols: number, colapsedHeight: number, allowOverlap: boolean): Layout;
82
+ /**
83
+ * Helper to convert a number to a percentage string.
84
+ *
85
+ * @param {Number} num Any number
86
+ * @return {String} That number as a percentage.
87
+ */
88
+ export declare function perc(num: number): string;
89
+ export declare function setTransform({ top, left, width, height }: Position): Record<string, any>;
90
+ export declare function setTopLeft({ top, left, width, height }: Position): Record<string, any>;
91
+ /**
92
+ * Sort layout items by row ascending and column ascending.
93
+ *
94
+ * Does not modify Layout.
95
+ */
96
+ export declare function sortLayoutItemsByRowCol(layout: Layout): Layout;
97
+ /**
98
+ * Sort layout items by column ascending then row ascending.
99
+ *
100
+ * Does not modify Layout.
101
+ */
102
+ export declare function sortLayoutItemsByColRow(layout: Layout): Layout;
103
+ /**
104
+ * Get layout items sorted from top left to right and down.
105
+ *
106
+ * @return {Array} Array of layout objects.
107
+ * @return {Array} Layout, sorted static items first.
108
+ */
109
+ export declare function sortLayoutItems(layout: Layout, compactType: CompactType): Layout;
110
+ export declare function withLayoutItem(layout: Layout, itemKey: string, cb: (l: LayoutItem) => LayoutItem): [Layout, LayoutItem | undefined];
111
+ /**
112
+ * Given a layout, make sure all elements fit within its bounds.
113
+ *
114
+ * Modifies layout items.
115
+ *
116
+ * @param {Array} layout Layout array.
117
+ * @param {Number} bounds Number of columns.
118
+ */
119
+ export declare function correctBounds(layout: Layout, bounds: {
120
+ cols: number;
121
+ }, colapsedHeight: number): Layout;
122
+ export declare function getH(h: number, colapsedHeight: number, colapsed?: boolean): number;
123
+ export declare function getLayoutItemH(layoutItem: LayoutItem, colapsedHeight: number): number;
@@ -1,23 +1,24 @@
1
1
  import { styled, generateUtilityClasses, generateUtilityClass } from "@mui/material";
2
2
  import "react";
3
3
  import "@m4l/core";
4
- import "../Icon/index.9dae8337.js";
4
+ import "../Icon/index.9fcd1476.js";
5
5
  import "clsx";
6
6
  import { jsx } from "react/jsx-runtime";
7
- import "../mui_extended/IconButton/index.1a9d4fa5.js";
7
+ import "../mui_extended/IconButton/index.12f1a3c3.js";
8
8
  import "@m4l/graphics";
9
- import "../mui_extended/Accordion/index.3faafd8b.js";
9
+ import "../mui_extended/Accordion/index.9877f7bf.js";
10
10
  import { T as Typography } from "../mui_extended/Typography/index.443590d6.js";
11
11
  import "../mui_extended/Avatar/index.75e6ed57.js";
12
12
  import "react-router-dom";
13
13
  import "@mui/material/Button";
14
- import "../mui_extended/Button/index.fdb5dcbd.js";
14
+ import "../mui_extended/Button/index.4288f9fc.js";
15
+ import "../mui_extended/Badge/index.8c2b8b66.js";
15
16
  import "../Image/index.c18ebf5a.js";
16
17
  import "@mui/lab";
18
+ import "../mui_extended/MenuActions/index.43a2e1ae.js";
17
19
  import "../mui_extended/Popover/index.9f35d0eb.js";
18
- import "../mui_extended/MenuActions/index.ba1da3b3.js";
19
- import "../mui_extended/Pager/index.67bda2c5.js";
20
- import "../mui_extended/Tab/index.9e2f6e34.js";
20
+ import "../mui_extended/Pager/index.2f6d6d7d.js";
21
+ import "../mui_extended/Tab/index.7c82e43d.js";
21
22
  import "../mui_extended/Tooltip/index.5a795dcd.js";
22
23
  import { unstable_composeClasses } from "@mui/base";
23
24
  const HelperTextRoot = styled("div")(({
@@ -3,7 +3,7 @@ import { styled, generateUtilityClasses, generateUtilityClass, Skeleton } from "
3
3
  import clsx from "clsx";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  import { useEnvironment } from "@m4l/core";
6
- import { u as useSideBar, g as getNameDataTestId$1 } from "../SideBar/index.9e1a5b96.js";
6
+ import { u as useSideBar, g as getNameDataTestId$1 } from "../SideBar/index.2f497e6c.js";
7
7
  import { T as TEST_PROP_ID } from "../../test/constants_no_mock.86c553a9.js";
8
8
  import { unstable_composeClasses } from "@mui/base";
9
9
  const IconRoot = styled("div")(({
@@ -3,23 +3,24 @@ import { styled, generateUtilityClasses, generateUtilityClass, Stack, MenuItem }
3
3
  import { I as Image } from "../Image/index.c18ebf5a.js";
4
4
  import { useLocales } from "@m4l/graphics";
5
5
  import { useEnvironment, useNetwork } from "@m4l/core";
6
- import "../Icon/index.9dae8337.js";
6
+ import "../Icon/index.9fcd1476.js";
7
7
  import { T as TEST_PROP_ID } from "../../test/constants_no_mock.86c553a9.js";
8
8
  import "clsx";
9
9
  import { jsxs, jsx } from "react/jsx-runtime";
10
- import "../mui_extended/IconButton/index.1a9d4fa5.js";
11
- import "../mui_extended/Accordion/index.3faafd8b.js";
10
+ import "../mui_extended/IconButton/index.12f1a3c3.js";
11
+ import "../mui_extended/Accordion/index.9877f7bf.js";
12
12
  import "../mui_extended/Typography/index.443590d6.js";
13
13
  import "../mui_extended/Avatar/index.75e6ed57.js";
14
14
  import "react-router-dom";
15
15
  import "@mui/material/Button";
16
- import { I as ImageButton } from "../mui_extended/Button/index.fdb5dcbd.js";
16
+ import { I as ImageButton } from "../mui_extended/Button/index.4288f9fc.js";
17
17
  import { C as CircularProgress } from "../mui_extended/CircularProgress/index.ad569afd.js";
18
+ import "../mui_extended/Badge/index.8c2b8b66.js";
18
19
  import "@mui/lab";
20
+ import "../mui_extended/MenuActions/index.43a2e1ae.js";
19
21
  import { P as Popover } from "../mui_extended/Popover/index.9f35d0eb.js";
20
- import "../mui_extended/MenuActions/index.ba1da3b3.js";
21
- import "../mui_extended/Pager/index.67bda2c5.js";
22
- import "../mui_extended/Tab/index.9e2f6e34.js";
22
+ import "../mui_extended/Pager/index.2f6d6d7d.js";
23
+ import "../mui_extended/Tab/index.7c82e43d.js";
23
24
  import "../mui_extended/Tooltip/index.5a795dcd.js";
24
25
  import { unstable_composeClasses } from "@mui/base";
25
26
  const LanguagePopoverRoot = styled("div")(({
@@ -1,7 +1,7 @@
1
1
  import clsx from "clsx";
2
2
  import { generateUtilityClasses, styled } from "@mui/material";
3
3
  import { unstable_composeClasses } from "@mui/base";
4
- import { g as getComponentUtilityClass } from "../../utils/index.008b4c2a.js";
4
+ import { g as getComponentUtilityClass } from "../../utils/index.c43a95f4.js";
5
5
  import { T as TEST_PROP_ID } from "../../test/constants_no_mock.86c553a9.js";
6
6
  import { jsx } from "react/jsx-runtime";
7
7
  const LINEAR_PROGRESS_INDETERMINATE_CLASS_NAME = "M4LinearProgressIndeterminate";
@@ -1,62 +1,14 @@
1
1
  import { useTheme, Dialog, Paper } from "@mui/material";
2
- import { c as cjs } from "../../react-draggable.6d7949a3.js";
3
- import { u as useModal } from "../../hooks/useModal/index.7b7d26ba.js";
4
- import { styled } from "@mui/material/styles";
5
- import { a as getThemeVariantColor } from "../../utils/index.008b4c2a.js";
6
- import { R as ResizeableWindow } from "../Resizeable/index.f6e48e56.js";
2
+ import { c as cjs } from "../../react-draggable.7abb5d0a.js";
3
+ import { u as useModal } from "../../hooks/useModal/index.8e85f7ae.js";
4
+ import { R as ResizeableWindow } from "../Resizeable/index.9a9c79a4.js";
7
5
  import { useResponsiveDesktop } from "@m4l/graphics";
8
- import { I as Icon } from "../Icon/index.9dae8337.js";
6
+ import { I as Icon } from "../Icon/index.9fcd1476.js";
9
7
  import { useEnvironment } from "@m4l/core";
10
- import { I as ICONS } from "../areas/icons.19cde4b4.js";
11
- import { m as modalUtilityClasses } from "../modal/index.1b25b61d.js";
8
+ import { I as ICONS } from "../areas/icons.8266ccc8.js";
9
+ import { m as modalUtilityClasses } from "../modal/index.00efea85.js";
12
10
  import { jsx, jsxs } from "react/jsx-runtime";
13
- import { g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index.e376a68e.js";
14
- const Container = styled("div")(({ theme }) => ({
15
- display: "flex",
16
- flexDirection: "column",
17
- height: "100%",
18
- overflow: "hidden",
19
- padding: theme.spacing(3)
20
- }));
21
- styled("div")(({ theme }) => ({
22
- display: "flex",
23
- alignItems: "center",
24
- justifyContent: "space-between",
25
- minHeight: theme.spacing(5),
26
- borderBottom: `1px solid ${theme.palette.divider}`,
27
- overflow: "hidden"
28
- }));
29
- styled("div")(({ theme }) => ({
30
- display: "flex",
31
- flexDirection: "row",
32
- flexGrow: 1,
33
- alignItems: "center",
34
- cursor: "move",
35
- ...theme.typography.subtitle1,
36
- color: theme.palette.text.primary
37
- }));
38
- styled("div")(({ theme, variant }) => ({
39
- display: "flex",
40
- alignItems: "center",
41
- justifyContent: "center",
42
- marginRight: theme.spacing(1.5),
43
- "& > span": {
44
- background: getThemeVariantColor(theme, variant)
45
- }
46
- }));
47
- styled("div")(() => ({
48
- flexGrow: 1,
49
- position: "relative",
50
- overflow: "auto"
51
- }));
52
- styled("div")(({ theme, variant }) => ({
53
- ...theme.typography.subtitle1,
54
- color: getThemeVariantColor(theme, variant),
55
- width: "100%",
56
- whiteSpace: "nowrap",
57
- textOverflow: "ellipsis",
58
- overflow: "hidden"
59
- }));
11
+ import { g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index.52125041.js";
60
12
  const DragabblePaperComponent = (props) => {
61
13
  return /* @__PURE__ */ jsx(cjs.exports, {
62
14
  handle: ".m4l_draggable_handle",
@@ -100,7 +52,7 @@ const ModalDialog = () => {
100
52
  const classes = modalUtilityClasses({
101
53
  variant
102
54
  });
103
- const contentComnponent = /* @__PURE__ */ jsx(Container, {
55
+ const contentComnponent = /* @__PURE__ */ jsx("div", {
104
56
  className: classes.containerWindow,
105
57
  children: typeof window === "function" ? window() : window
106
58
  });
@@ -2,23 +2,24 @@ import { NavLink as NavLink$1 } from "react-router-dom";
2
2
  import { generateUtilityClasses, generateUtilityClass, styled } from "@mui/material";
3
3
  import "react";
4
4
  import "@m4l/core";
5
- import "../Icon/index.9dae8337.js";
5
+ import "../Icon/index.9fcd1476.js";
6
6
  import { T as TEST_PROP_ID } from "../../test/constants_no_mock.86c553a9.js";
7
7
  import "clsx";
8
8
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
9
- import "../mui_extended/IconButton/index.1a9d4fa5.js";
9
+ import "../mui_extended/IconButton/index.12f1a3c3.js";
10
10
  import "@m4l/graphics";
11
- import "../mui_extended/Accordion/index.3faafd8b.js";
11
+ import "../mui_extended/Accordion/index.9877f7bf.js";
12
12
  import { T as Typography } from "../mui_extended/Typography/index.443590d6.js";
13
13
  import "../mui_extended/Avatar/index.75e6ed57.js";
14
14
  import "@mui/material/Button";
15
- import "../mui_extended/Button/index.fdb5dcbd.js";
15
+ import "../mui_extended/Button/index.4288f9fc.js";
16
+ import "../mui_extended/Badge/index.8c2b8b66.js";
16
17
  import "../Image/index.c18ebf5a.js";
17
18
  import "@mui/lab";
19
+ import "../mui_extended/MenuActions/index.43a2e1ae.js";
18
20
  import "../mui_extended/Popover/index.9f35d0eb.js";
19
- import "../mui_extended/MenuActions/index.ba1da3b3.js";
20
- import "../mui_extended/Pager/index.67bda2c5.js";
21
- import "../mui_extended/Tab/index.9e2f6e34.js";
21
+ import "../mui_extended/Pager/index.2f6d6d7d.js";
22
+ import "../mui_extended/Tab/index.7c82e43d.js";
22
23
  import "../mui_extended/Tooltip/index.5a795dcd.js";
23
24
  import { unstable_composeClasses } from "@mui/base";
24
25
  const componentName = "M4LNavLink";
@@ -1,46 +1,47 @@
1
1
  import { useState, useEffect, useCallback, useMemo } from "react";
2
2
  import { useNetwork, useModuleDictionary, useEnvironment, usePaginate } from "@m4l/core";
3
3
  import { styled } from "@mui/material/styles";
4
- import { D as DataGrid, g as getDataGridComponentsDictionary } from "../DataGrid/index.ffaf000e.js";
4
+ import { D as DataGrid, g as getDataGridComponentsDictionary } from "../DataGrid/index.9fb3e6a1.js";
5
5
  import { D as DateFormatter } from "../formatters/DateFormatter/index.578a9f53.js";
6
6
  import { Tooltip, IconButton } from "@mui/material";
7
7
  import { useHostTheme, useResponsiveDesktop } from "@m4l/graphics";
8
8
  import { R as ReactJson } from "../../react-json-view.57125fcf.js";
9
9
  import { jsx, jsxs } from "react/jsx-runtime";
10
- import { u as useModal } from "../../hooks/useModal/index.7b7d26ba.js";
11
- import { I as Icon } from "../Icon/index.9dae8337.js";
12
- import "../../react-draggable.6d7949a3.js";
13
- import "../ModalDialog/index.d9c5d400.js";
14
- import "../Resizeable/index.f6e48e56.js";
15
- import "../modal/index.1b25b61d.js";
16
- import "../CommonActions/components/Actions/index.e376a68e.js";
10
+ import { u as useModal } from "../../hooks/useModal/index.8e85f7ae.js";
11
+ import { I as Icon } from "../Icon/index.9fcd1476.js";
12
+ import "../../react-draggable.7abb5d0a.js";
13
+ import "../Resizeable/index.9a9c79a4.js";
14
+ import "../modal/index.00efea85.js";
15
+ import "../CommonActions/components/Actions/index.52125041.js";
17
16
  import "@mui/material/Button";
18
- import "../mui_extended/Button/index.fdb5dcbd.js";
17
+ import "../mui_extended/Button/index.4288f9fc.js";
19
18
  import "clsx";
20
19
  import "react-hook-form";
21
- import "../mui_extended/IconButton/index.1a9d4fa5.js";
20
+ import "../mui_extended/IconButton/index.12f1a3c3.js";
22
21
  import "zustand";
23
- import "../areas/contexts/AreasContext/index.f0397b7c.js";
24
- import "../areas/components/AreasAdmin/index.946eebb9.js";
22
+ import "../areas/contexts/AreasContext/index.02c4e7be.js";
23
+ import "../areas/components/AreasAdmin/index.43ecd998.js";
25
24
  import "zustand/shallow";
26
25
  import "../ScrollBar/index.bbe48f4d.js";
27
- import "../mui_extended/Accordion/index.3faafd8b.js";
26
+ import "../mui_extended/Accordion/index.9877f7bf.js";
28
27
  import "../mui_extended/Typography/index.443590d6.js";
29
28
  import "../mui_extended/Avatar/index.75e6ed57.js";
30
29
  import "react-router-dom";
30
+ import "../mui_extended/Badge/index.8c2b8b66.js";
31
31
  import "../Image/index.c18ebf5a.js";
32
32
  import "@mui/lab";
33
+ import "../mui_extended/MenuActions/index.43a2e1ae.js";
33
34
  import "../mui_extended/Popover/index.9f35d0eb.js";
34
- import "../mui_extended/MenuActions/index.ba1da3b3.js";
35
- import "../mui_extended/Pager/index.67bda2c5.js";
36
- import "../mui_extended/Tab/index.9e2f6e34.js";
35
+ import "../mui_extended/Pager/index.2f6d6d7d.js";
36
+ import "../mui_extended/Tab/index.7c82e43d.js";
37
37
  import "../mui_extended/Tooltip/index.5a795dcd.js";
38
- import "../areas/components/AreasViewer/index.bf4191ea.js";
39
- import "../LinearProgressIndeterminate/index.d34d398f.js";
38
+ import "../areas/components/AreasViewer/index.14e62059.js";
39
+ import "../LinearProgressIndeterminate/index.60dabc06.js";
40
40
  import "../areas/contexts/WindowToolsMFContext/index.8f3e2a04.js";
41
41
  import "../areas/contexts/DynamicMFParmsContext/index.1607c78e.js";
42
- import { W as WindowBase } from "../modal/WindowBase.7acb9f1d.js";
43
- import { D as DynamicFilter, g as getDynamicFilterComponentsDictionary } from "../DynamicFilter/index.d7c03a61.js";
42
+ import { W as WindowBase } from "../modal/WindowBase.a0c0b322.js";
43
+ import { D as DynamicFilter, g as getDynamicFilterComponentsDictionary } from "../DynamicFilter/index.d1a2e2d1.js";
44
+ import { T as TEST_PROP_ID } from "../../test/constants_no_mock.86c553a9.js";
44
45
  const Container$1 = styled("div")(() => ({
45
46
  height: "100%",
46
47
  width: "100%",
@@ -164,7 +165,8 @@ function DetailFormatter(props) {
164
165
  function ObjectLogs(props) {
165
166
  const {
166
167
  resource_id,
167
- object_id
168
+ object_id,
169
+ dataTestId = ""
168
170
  } = props;
169
171
  const {
170
172
  getLabel
@@ -243,6 +245,9 @@ function ObjectLogs(props) {
243
245
  Refresh();
244
246
  };
245
247
  return /* @__PURE__ */ jsxs(Container$1, {
248
+ ...process.env.NODE_ENV !== "production" ? {
249
+ [TEST_PROP_ID]: `m4ldatagrid-${dataTestId}`
250
+ } : {},
246
251
  children: [/* @__PURE__ */ jsx(Actions, {
247
252
  id: "objectLogsActions",
248
253
  children: /* @__PURE__ */ jsx(DynamicFilter, {
@@ -284,6 +289,7 @@ function ObjectLogs(props) {
284
289
  id: "GridWrapper",
285
290
  children: /* @__PURE__ */ jsx(DataGrid, {
286
291
  id: "users_logs_list",
292
+ dataTestId,
287
293
  columns,
288
294
  rows,
289
295
  rowKeyGetter: (row) => row.id,
@@ -11,6 +11,7 @@ export interface RowLog {
11
11
  export interface LogsProps {
12
12
  resource_id: number;
13
13
  object_id: Maybe<number>;
14
+ dataTestId?: string;
14
15
  }
15
16
  export interface QueryParams extends LogsProps, Record<string, unknown> {
16
17
  }
@@ -1,7 +1,7 @@
1
1
  import { styled } from "@mui/material/styles";
2
2
  import { useModuleSkeleton } from "@m4l/core";
3
3
  import { Skeleton, generateUtilityClasses, generateUtilityClass } from "@mui/material";
4
- import { I as Icon } from "../Icon/index.9dae8337.js";
4
+ import { I as Icon } from "../Icon/index.9fcd1476.js";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  import { unstable_composeClasses } from "@mui/base";
7
7
  const PaperFormRoot = styled("div")(({
@@ -1,38 +1,38 @@
1
1
  import { useModuleDictionary, useModuleSkeleton, useEnvironment } from "@m4l/core";
2
2
  import { styled, generateUtilityClasses, generateUtilityClass, Autocomplete, TextField, Skeleton } from "@mui/material";
3
3
  import { useMemo } from "react";
4
- import { I as Icon } from "../Icon/index.9dae8337.js";
5
- import { g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index.e376a68e.js";
4
+ import { I as Icon } from "../Icon/index.9fcd1476.js";
5
+ import { g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index.52125041.js";
6
6
  import { jsx, Fragment, jsxs } from "react/jsx-runtime";
7
7
  import "@mui/material/Button";
8
- import "../mui_extended/Button/index.fdb5dcbd.js";
8
+ import "../mui_extended/Button/index.4288f9fc.js";
9
9
  import "clsx";
10
10
  import "react-hook-form";
11
- import "../../contexts/ModalContext/index.699f95fa.js";
12
- import "../../react-draggable.6d7949a3.js";
13
- import "../ModalDialog/index.d9c5d400.js";
14
- import "../Resizeable/index.f6e48e56.js";
11
+ import "../../contexts/ModalContext/index.e9a7ba4a.js";
12
+ import "../../react-draggable.7abb5d0a.js";
13
+ import "../Resizeable/index.9a9c79a4.js";
15
14
  import "@m4l/graphics";
16
- import "../modal/index.1b25b61d.js";
15
+ import "../modal/index.00efea85.js";
17
16
  import "../Image/index.c18ebf5a.js";
18
- import "../mui_extended/IconButton/index.1a9d4fa5.js";
19
- import "../mui_extended/Accordion/index.3faafd8b.js";
17
+ import "../mui_extended/IconButton/index.12f1a3c3.js";
18
+ import "../mui_extended/Accordion/index.9877f7bf.js";
20
19
  import { T as Typography } from "../mui_extended/Typography/index.443590d6.js";
21
20
  import "../mui_extended/Avatar/index.75e6ed57.js";
22
21
  import "react-router-dom";
22
+ import "../mui_extended/Badge/index.8c2b8b66.js";
23
23
  import "@mui/lab";
24
+ import "../mui_extended/MenuActions/index.43a2e1ae.js";
24
25
  import "../mui_extended/Popover/index.9f35d0eb.js";
25
- import "../mui_extended/MenuActions/index.ba1da3b3.js";
26
- import "../mui_extended/Pager/index.67bda2c5.js";
27
- import "../mui_extended/Tab/index.9e2f6e34.js";
26
+ import "../mui_extended/Pager/index.2f6d6d7d.js";
27
+ import "../mui_extended/Tab/index.7c82e43d.js";
28
28
  import "../mui_extended/Tooltip/index.5a795dcd.js";
29
29
  import "zustand";
30
- import "../areas/contexts/AreasContext/index.f0397b7c.js";
31
- import "../areas/components/AreasAdmin/index.946eebb9.js";
30
+ import "../areas/contexts/AreasContext/index.02c4e7be.js";
31
+ import "../areas/components/AreasAdmin/index.43ecd998.js";
32
32
  import "zustand/shallow";
33
33
  import "../ScrollBar/index.bbe48f4d.js";
34
- import "../areas/components/AreasViewer/index.bf4191ea.js";
35
- import "../LinearProgressIndeterminate/index.d34d398f.js";
34
+ import "../areas/components/AreasViewer/index.14e62059.js";
35
+ import "../LinearProgressIndeterminate/index.60dabc06.js";
36
36
  import "../areas/contexts/WindowToolsMFContext/index.8f3e2a04.js";
37
37
  import "../areas/contexts/DynamicMFParmsContext/index.1607c78e.js";
38
38
  import { T as TEST_PROP_ID } from "../../test/constants_no_mock.86c553a9.js";
@@ -95,14 +95,13 @@ var ETimePeriods = /* @__PURE__ */ ((ETimePeriods2) => {
95
95
  ETimePeriods2[ETimePeriods2["DAYS"] = 2] = "DAYS";
96
96
  return ETimePeriods2;
97
97
  })(ETimePeriods || {});
98
- const PERIOD_FORMATTER_DICTIONARY_KEY = `period_formatter`;
99
98
  const dictionary = {
100
- LABEL_YEARS: `${PERIOD_FORMATTER_DICTIONARY_KEY}.label_years`,
101
- LABEL_MONTHS: `${PERIOD_FORMATTER_DICTIONARY_KEY}.label_months`,
102
- LABEL_DAYS: `${PERIOD_FORMATTER_DICTIONARY_KEY}.label_days`
99
+ LABEL_YEARS: "period.label_years",
100
+ LABEL_MONTHS: "period.label_months",
101
+ LABEL_DAYS: "period.label_days"
103
102
  };
104
103
  function getPeriodComponetsDictionary() {
105
- return ["dictionary"].concat(getCommonActionsDictionary());
104
+ return ["period"].concat(getCommonActionsDictionary());
106
105
  }
107
106
  const componentName = "M4LPeriod";
108
107
  generateUtilityClasses(componentName, [
@@ -231,7 +230,7 @@ const Period = (props) => {
231
230
  children: /* @__PURE__ */ jsx(Typography, {
232
231
  variant: "body",
233
232
  skeletonWidth: "50%",
234
- children: value.selPeriodTime
233
+ children: value.selPeriodTime === 0 ? getLabel(dictionary.LABEL_YEARS) : value.selPeriodTime === 1 ? getLabel(dictionary.LABEL_MONTHS) : value.selPeriodTime === 2 ? getLabel(dictionary.LABEL_DAYS) : null
235
234
  })
236
235
  }), /* @__PURE__ */ jsx(Gap, {
237
236
  className: classes.gap,
@@ -0,0 +1,3 @@
1
+ export declare const COMPONENT_PREFIX = "m4l-property-value";
2
+ export declare const PREFIX_TEST_ATTRIBUTE = "data-testid";
3
+ export declare const TEST_PROPS_DATA: string;
@@ -1,6 +1,7 @@
1
1
  import { styled } from "@mui/material/styles";
2
2
  import { Skeleton, generateUtilityClasses, generateUtilityClass } from "@mui/material";
3
3
  import { T as TEST_PROP_ID } from "../../test/constants_no_mock.86c553a9.js";
4
+ import { g as getNameDataTestId } from "../../vendor.e353394b.js";
4
5
  import { jsx, jsxs } from "react/jsx-runtime";
5
6
  import { useResponsiveDesktop } from "@m4l/graphics";
6
7
  import { useModuleSkeleton } from "@m4l/core";
@@ -83,18 +84,17 @@ const SKTWrapperProperty = styled("div")(() => ({
83
84
  display: "flex",
84
85
  justifyContent: "flex-end"
85
86
  }));
86
- const ICON_PREFIX = "M4LPropertyValue";
87
- const getNamePropertyValueDataTestId = (KEY) => {
88
- return `${ICON_PREFIX}-${KEY}`;
89
- };
87
+ const COMPONENT_PREFIX = "m4l-property-value";
88
+ const TEST_PROPS_DATA = `${COMPONENT_PREFIX}-data`;
90
89
  function SKTProperty(props) {
91
90
  const {
92
- className
91
+ className,
92
+ dataTestId = ""
93
93
  } = props;
94
94
  return /* @__PURE__ */ jsx(SKTWrapperProperty, {
95
95
  className,
96
96
  ...process.env.NODE_ENV !== "production" ? {
97
- [TEST_PROP_ID]: getNamePropertyValueDataTestId("skeletonProperty")
97
+ [TEST_PROP_ID]: getNameDataTestId(COMPONENT_PREFIX, "skeletonProperty", dataTestId)
98
98
  } : {},
99
99
  children: /* @__PURE__ */ jsx(Skeleton, {
100
100
  variant: "text",
@@ -134,7 +134,8 @@ function PropertyValue(props) {
134
134
  valueWidth = "100",
135
135
  valueWidthMobile,
136
136
  isForm,
137
- className
137
+ className,
138
+ dataTestId = ""
138
139
  } = props;
139
140
  const isDesktop = useResponsiveDesktop();
140
141
  const isSkeleton = useModuleSkeleton();
@@ -169,24 +170,29 @@ function PropertyValue(props) {
169
170
  isForm,
170
171
  propertyWidth,
171
172
  ...process.env.NODE_ENV !== "production" ? {
172
- [TEST_PROP_ID]: getNamePropertyValueDataTestId("root")
173
+ [TEST_PROPS_DATA]: JSON.stringify([{
174
+ property: property ? true : false,
175
+ value: value ? true : false
176
+ }]),
177
+ [TEST_PROP_ID]: getNameDataTestId(COMPONENT_PREFIX, "root", dataTestId)
173
178
  } : {},
174
179
  children: [/* @__PURE__ */ jsx(Property, {
175
180
  className: classes.property,
176
181
  isForm,
177
182
  propertyWidth,
178
183
  ...process.env.NODE_ENV !== "production" ? {
179
- [TEST_PROP_ID]: getNamePropertyValueDataTestId("property")
184
+ [TEST_PROP_ID]: getNameDataTestId(COMPONENT_PREFIX, "property", dataTestId)
180
185
  } : {},
181
186
  children: isSkeleton ? /* @__PURE__ */ jsx(SKTProperty, {
182
- className: classes.skeletonProperty
187
+ className: classes.skeletonProperty,
188
+ dataTestId
183
189
  }) : property
184
190
  }), /* @__PURE__ */ jsx(Value, {
185
191
  className: classes.value,
186
192
  valueWidth: getValueW(),
187
193
  valueHeight,
188
194
  ...process.env.NODE_ENV !== "production" ? {
189
- [TEST_PROP_ID]: getNamePropertyValueDataTestId("value")
195
+ [TEST_PROP_ID]: getNameDataTestId(COMPONENT_PREFIX, "value", dataTestId)
190
196
  } : {},
191
197
  children: value
192
198
  })]
@@ -12,10 +12,11 @@ export interface PropertyValueProps extends PropertyProps, ValueProps {
12
12
  value: number | string | ReactNode;
13
13
  isForm?: boolean;
14
14
  className?: string;
15
+ dataTestId?: string;
15
16
  }
16
17
  export declare type WrapperProps = PropertyProps & Pick<PropertyValueProps, 'isForm'>;
17
18
  export declare type WrapperPropertyProps = WrapperProps;
18
19
  export declare type WrapperValueProps = Omit<ValueProps, 'valueWidthMobile'>;
19
- export interface SKTPropertyProps {
20
+ export interface SKTPropertyProps extends Pick<PropertyValueProps, 'dataTestId'> {
20
21
  className: string;
21
22
  }
@@ -1,5 +1,5 @@
1
1
  import { styled } from "@mui/material/styles";
2
- import { R as ResizableBox } from "../../react-resizable.b6f8e04a.js";
2
+ import { a as ResizableBox } from "../../react-resizable.ba08699a.js";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  const WrapperResizeable = styled(ResizableBox)(({
5
5
  theme