@m4l/components 0.2.7 → 0.2.9

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 (105) hide show
  1. package/components/AccountPopover/{index.2604c389.js → index.8a11a7b6.js} +21 -9
  2. package/components/AppBar/{index.9522f237.js → index.966d5162.js} +22 -5
  3. package/components/CommonActions/components/ActionCancel/{index.06539086.js → index.68bf349a.js} +2 -2
  4. package/components/CommonActions/components/ActionFormCancel/index.728bb37d.js +146 -0
  5. package/components/CommonActions/components/ActionFormIntro/{index.5a719043.js → index.a7e8711b.js} +2 -2
  6. package/components/CommonActions/components/ActionIntro/{index.3e8a2e60.js → index.7cc0a393.js} +2 -2
  7. package/components/CommonActions/components/Actions/index.b61826a4.js +163 -0
  8. package/components/DataGrid/constants.d.ts +2 -0
  9. package/components/DataGrid/{index.84a4843c.js → index.3a2e683c.js} +92 -92
  10. package/components/DataGrid/subcomponents/Actions/{index.dbcbee6d.js → index.063a0197.js} +89 -9
  11. package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.d.ts +0 -1
  12. package/components/DynamicFilter/{index.39033eb7.js → index.a5197d85.js} +92 -23
  13. package/components/GridLayout/{index.e8c04242.js → index.68093cfb.js} +7 -6
  14. package/components/GridLayout/subcomponents/Griditem/{index.4d38f12e.js → index.8e4af155.js} +1 -1
  15. package/components/GridLayout/subcomponents/Responsive/{index.e25df1dc.js → index.c32210fc.js} +1 -1
  16. package/components/HelperText/{index.7d2afdb3.js → index.a6a02c79.js} +23 -2
  17. package/components/Icon/{index.05984e7f.js → index.29065051.js} +5 -5
  18. package/components/Image/{index.bf37e923.js → index.cf640615.js} +3 -3
  19. package/components/LanguagePopover/{index.5ff37dbf.js → index.0319d6a8.js} +20 -4
  20. package/components/LoadingError/{index.fabad214.js → index.1426339a.js} +23 -5
  21. package/components/MFLoader/{index.7b4ee2a4.js → index.cbd2e5af.js} +21 -5
  22. package/components/ModalDialog/{index.89e26413.js → index.82ccabcc.js} +3 -3
  23. package/components/NavLink/{index.b75c91e1.js → index.618dabfb.js} +22 -2
  24. package/components/NoItemSelected/{index.7db73e77.js → index.50d06852.js} +1 -1
  25. package/components/ObjectLogs/{index.aeb2540f.js → index.fb34f372.js} +84 -5
  26. package/components/PDFViewer/{index.5c2db67a.js → index.ec8d0f79.js} +23 -3
  27. package/components/Page/{index.710cb16f.js → index.5aefe8f7.js} +1 -1
  28. package/components/PaperForm/classes/index.d.ts +2 -1
  29. package/components/PaperForm/classes/types.d.ts +1 -0
  30. package/components/PaperForm/{index.7ea3883f.js → index.6859d4e8.js} +11 -6
  31. package/components/PaperForm/types.d.ts +4 -1
  32. package/components/Period/{index.0aa8e507.js → index.df612223.js} +90 -5
  33. package/components/PrintingSystem/{index.ed3b22b7.js → index.73dd98b3.js} +12 -12
  34. package/components/PrintingSystem/subcomponents/BodyNode/{index.7acc6016.js → index.d70a5d24.js} +1 -1
  35. package/components/PrintingSystem/subcomponents/ChartNode/{index.e4a23bdd.js → index.4cd7f6d8.js} +1 -1
  36. package/components/PrintingSystem/subcomponents/DividerNode/{index.16fff262.js → index.56efaa0c.js} +1 -1
  37. package/components/PrintingSystem/subcomponents/FooterNode/{index.6c67dec0.js → index.4320bb03.js} +1 -1
  38. package/components/PrintingSystem/subcomponents/GridNode/{index.f466062b.js → index.6cabbf31.js} +1 -5
  39. package/components/PrintingSystem/subcomponents/HeaderNode/{index.77d3d39a.js → index.0e23ffd4.js} +1 -1
  40. package/components/PrintingSystem/subcomponents/PaperNode/{index.2a3d54a3.js → index.f97e7aa6.js} +1 -1
  41. package/components/PrintingSystem/subcomponents/PropertyValueNode/{index.e71ad971.js → index.7d3a3c8f.js} +1 -2
  42. package/components/PrintingSystem/subcomponents/SectionNode/{index.ce4f6d16.js → index.05d1fcf7.js} +1 -1
  43. package/components/PrintingSystem/subcomponents/TextBoxNode/{index.850d20a1.js → index.3894059c.js} +1 -1
  44. package/components/PropertyValue/{index.43ac2a71.js → index.df683b35.js} +20 -4
  45. package/components/SideBar/{index.58d29b84.js → index.f322ee0b.js} +22 -23
  46. package/components/ToastContainer/{index.ed440301.js → index.f67795cb.js} +7 -5
  47. package/components/animate/{index.5d4575bc.js → index.4e9774a6.js} +6 -2
  48. package/components/areas/components/AreasAdmin/{index.d2ce1682.js → index.6024578a.js} +98 -27
  49. package/components/areas/components/AreasViewer/{index.977d2804.js → index.41e89676.js} +84 -18
  50. package/components/areas/components/index.198e8954.js +32 -0
  51. package/components/areas/contexts/AreasContext/helper.d.ts +2 -2
  52. package/components/areas/contexts/AreasContext/{index.79ec57d5.js → index.9c8e3b41.js} +10 -17
  53. package/components/areas/contexts/index.eba30173.js +4 -0
  54. package/components/areas/hooks/index.0184c6f7.js +4 -0
  55. package/components/areas/hooks/useAreas/{index.de0591fe.js → index.fb721543.js} +1 -1
  56. package/components/areas/index.abedae6a.js +56 -0
  57. package/components/formatters/BooleanFormatter/{index.4f3cbdce.js → index.64ed2d71.js} +2 -3
  58. package/components/formatters/{index.4ca6946d.js → index.57f0da1b.js} +7 -3
  59. package/components/hook-form/RHFAutocomplete/{index.0ce87ac3.js → index.e830f749.js} +22 -7
  60. package/components/hook-form/RHFAutocompleteAsync/{index.57789d3a.js → index.12580722.js} +1 -1
  61. package/components/hook-form/RHFCheckbox/{index.a38715e3.js → index.938321c1.js} +22 -2
  62. package/components/hook-form/RHFColorPicker/{index.d00a2b53.js → index.e292aa86.js} +21 -5
  63. package/components/hook-form/RHFDateTime/{index.ae5d3a39.js → index.321e4b87.js} +21 -5
  64. package/components/hook-form/RHFPeriod/{index.ae9bcf41.js → index.98b2667a.js} +2 -3
  65. package/components/hook-form/RHFTextField/{index.80cc07e0.js → index.d08c142b.js} +7 -5
  66. package/components/hook-form/RHFUpload/{index.587aac00.js → index.cdb2e584.js} +22 -5
  67. package/components/modal/WindowBase.4fe313e7.js +160 -0
  68. package/components/modal/WindowConfirm.355df4de.js +188 -0
  69. package/components/modal/index.ea3a21cb.js +148 -0
  70. package/components/mui_extended/Accordion/{index.eddcfe40.js → index.3e247bd4.js} +4 -4
  71. package/components/mui_extended/Button/{index.570fd3a4.js → index.f538e360.js} +3 -3
  72. package/components/mui_extended/{CheckBox.e662d20c.js → CheckBox.38abccd8.js} +1 -1
  73. package/components/mui_extended/IconButton/{index.26de70bd.js → index.e295aa1f.js} +2 -2
  74. package/components/mui_extended/MenuActions/{index.8c02ff61.js → index.9b37fadc.js} +19 -5
  75. package/components/mui_extended/Pager/{index.5629e82b.js → index.78dea971.js} +2 -3
  76. package/components/mui_extended/Tab/{index.f8795137.js → index.4c797c00.js} +2 -2
  77. package/components/mui_extended/ToggleButton/{index.21a1f8e5.js → index.43140642.js} +5 -1
  78. package/components/mui_extended/ToggleIconButton/{index.00f13c40.js → index.3d725376.js} +6 -1
  79. package/components/mui_extended/index.1da3a53e.js +24 -0
  80. package/contexts/ModalContext/{index.b39d303d.js → index.6d2dda38.js} +1 -1
  81. package/hooks/useFormAddEdit/index.0d294209.js +183 -0
  82. package/hooks/useModal/{index.abdc0962.js → index.97742698.js} +1 -1
  83. package/hooks/useTab/index.cb48ec45.js +103 -0
  84. package/index.js +176 -176
  85. package/{node_modules.8f15d11f.js → node_modules.56dca1cf.js} +1 -1
  86. package/package.json +1 -1
  87. package/vendor.3c20510a.js +142 -0
  88. package/components/CommonActions/components/ActionFormCancel/index.33fc6c79.js +0 -61
  89. package/components/CommonActions/components/Actions/index.2f6286eb.js +0 -74
  90. package/components/DataGrid/subcomponents/Table/subcomponents/constants.d.ts +0 -1
  91. package/components/areas/components/index.558684b3.js +0 -1
  92. package/components/areas/contexts/index.24025b97.js +0 -1
  93. package/components/areas/hooks/index.d9dc1e21.js +0 -1
  94. package/components/areas/index.4cc6a221.js +0 -22
  95. package/components/modal/WindowBase.ea17cf20.js +0 -74
  96. package/components/modal/WindowConfirm.19ddbd5d.js +0 -102
  97. package/components/modal/index.61389369.js +0 -57
  98. package/components/mui_extended/index.b606cd9d.js +0 -1
  99. package/hooks/useFormAddEdit/index.32aa4f64.js +0 -96
  100. package/hooks/useTab/index.9c611b31.js +0 -12
  101. package/vendor.75facc5e.js +0 -110
  102. package/components/mui_extended/Badge/{index.09f5aee5.js → index.b09524fe.js} +1 -1
  103. package/components/mui_extended/Popover/{index.b3eca6b1.js → index.9f35d0eb.js} +2 -2
  104. package/components/mui_extended/Tooltip/{index.24a2bc3f.js → index.5a795dcd.js} +1 -1
  105. package/components/mui_extended/Typography/{index.379dd374.js → index.443590d6.js} +1 -1
@@ -0,0 +1,142 @@
1
+ import "./components/areas/contexts/DynamicMFParmsContext/index.1607c78e.js";
2
+ import "./contexts/ModalContext/index.6d2dda38.js";
3
+ import "./contexts/RHFormContext/index.7769076a.js";
4
+ import "@m4l/core";
5
+ import "react";
6
+ import "@mui/material";
7
+ import "./react-draggable.ee21cb7e.js";
8
+ import "./components/Resizeable/index.6478d7d8.js";
9
+ import "react/jsx-runtime";
10
+ import "@m4l/graphics";
11
+ import "./components/modal/index.ea3a21cb.js";
12
+ import "./components/animate/index.4e9774a6.js";
13
+ import "framer-motion";
14
+ import "@mui/material/styles";
15
+ import "react-router-dom";
16
+ import "./components/animate/LoadingScreen/index.1d0c4307.js";
17
+ import "./components/animate/PropagateLoader/index.7fab43c8.js";
18
+ import "./components/Icon/index.29065051.js";
19
+ import "clsx";
20
+ import "./components/mui_extended/IconButton/index.e295aa1f.js";
21
+ import "zustand";
22
+ import "./components/areas/contexts/AreasContext/index.9c8e3b41.js";
23
+ import "./components/areas/components/AreasAdmin/index.6024578a.js";
24
+ import "zustand/shallow";
25
+ import "./components/ScrollBar/index.010f1b9d.js";
26
+ import "./components/mui_extended/Accordion/index.3e247bd4.js";
27
+ import "./components/mui_extended/Typography/index.443590d6.js";
28
+ import "./components/mui_extended/Avatar/index.75e6ed57.js";
29
+ import "@mui/material/Button";
30
+ import "./components/mui_extended/Button/index.f538e360.js";
31
+ import "./components/mui_extended/CheckBox.38abccd8.js";
32
+ import "./components/mui_extended/Badge/index.b09524fe.js";
33
+ import "./components/Image/index.cf640615.js";
34
+ import "@mui/lab";
35
+ import "./components/mui_extended/MenuActions/index.9b37fadc.js";
36
+ import "./components/mui_extended/Popover/index.9f35d0eb.js";
37
+ import "./components/mui_extended/Stack/index.0e53197c.js";
38
+ import "./components/mui_extended/Tab/index.4c797c00.js";
39
+ import "./components/mui_extended/Pager/index.78dea971.js";
40
+ import "./components/mui_extended/Tooltip/index.5a795dcd.js";
41
+ import "./components/areas/components/AreasViewer/index.41e89676.js";
42
+ import "./components/LinearProgressIndeterminate/index.a0ad2d9e.js";
43
+ import "./components/LoadingError/index.1426339a.js";
44
+ import "./components/areas/contexts/WindowToolsMFContext/index.8f3e2a04.js";
45
+ import "zustand/middleware/immer";
46
+ import "react-hook-form";
47
+ import "./components/hook-form/RHFAutocomplete/index.e830f749.js";
48
+ import "./components/HelperText/index.a6a02c79.js";
49
+ import "./node_modules.56dca1cf.js";
50
+ import "lodash-es/debounce";
51
+ import "lodash-es/each";
52
+ import "./components/hook-form/RHFColorPicker/index.e292aa86.js";
53
+ import "lodash/debounce";
54
+ import "./components/hook-form/RHFAutocompleteAsync/index.12580722.js";
55
+ import "./components/hook-form/RHFCheckbox/index.938321c1.js";
56
+ import "@mui/x-date-pickers";
57
+ import "./components/hook-form/RHFDateTime/index.321e4b87.js";
58
+ import "./components/hook-form/RHFTextField/index.d08c142b.js";
59
+ import "./components/hook-form/RHFPeriod/index.98b2667a.js";
60
+ import "./components/Period/index.df612223.js";
61
+ import "./components/CommonActions/components/Actions/index.b61826a4.js";
62
+ import "lodash/isString";
63
+ import "react-dropzone";
64
+ import "./components/hook-form/RHFUpload/index.cdb2e584.js";
65
+ import "./components/formatters/index.57f0da1b.js";
66
+ import "./components/DataGrid/index.3a2e683c.js";
67
+ import "react-dnd";
68
+ import "react-dnd-html5-backend";
69
+ import "./components/DataGrid/subcomponents/Actions/index.063a0197.js";
70
+ import "./components/DataGrid/subcomponents/editors/TextEditor/index.91380a55.js";
71
+ import "./components/DynamicFilter/index.a5197d85.js";
72
+ import "yup";
73
+ import "./components/GridLayout/subcomponents/Griditem/index.8e4af155.js";
74
+ import "./components/GridLayout/index.68093cfb.js";
75
+ import "fast-equals";
76
+ import "lodash";
77
+ import "./components/PrintingSystem/index.73dd98b3.js";
78
+ import "./components/LanguagePopover/index.0319d6a8.js";
79
+ import "./components/MFLoader/index.cbd2e5af.js";
80
+ import "./components/NavLink/index.618dabfb.js";
81
+ import "./components/NoItemSelected/index.50d06852.js";
82
+ import "./components/ObjectLogs/index.fb34f372.js";
83
+ import "./react-json-view.5636414a.js";
84
+ import "./components/PaperForm/index.6859d4e8.js";
85
+ import "./components/PDFViewer/index.ec8d0f79.js";
86
+ import "./components/Page/index.5aefe8f7.js";
87
+ import "./components/PropertyValue/index.df683b35.js";
88
+ import "./components/SplitLayout/index.30fd5861.js";
89
+ import "./react-splitter-layout.c5d98bf7.js";
90
+ import "./components/ToastContainer/index.f67795cb.js";
91
+ import "./components/SideBar/index.f322ee0b.js";
92
+ import "./components/AppBar/index.966d5162.js";
93
+ import "./components/AccountPopover/index.8a11a7b6.js";
94
+ import "./components/animate/variants/fade.b561c0fc.js";
95
+ import "./components/animate/variants/bounce.784aaaaa.js";
96
+ import "./components/animate/variants/container.11f82b76.js";
97
+ import "./components/animate/variants/transition.bd46b9ce.js";
98
+ import "./components/animate/MotionContainer/index.8d9f9d80.js";
99
+ import "./components/animate/MotionLazyContainer/index.572dd012.js";
100
+ import "./components/areas/hooks/useDynamicMFParameters/index.e52c5392.js";
101
+ import "./components/areas/hooks/useWindowToolsMF/index.b7afaf88.js";
102
+ import "./components/areas/dictionary.08cfc4c9.js";
103
+ import "./components/hook-form/RHFMultiCheckbox/index.2680b3b6.js";
104
+ import "./components/hook-form/RHFSelect/index.b6ca8bb2.js";
105
+ import "./components/hook-form/RHFRadioGroup/index.3b17819b.js";
106
+ import "./components/mui_extended/BoxIcon/index.e638ecc8.js";
107
+ import "./components/mui_extended/Breadcrumbs/index.5e37d903.js";
108
+ import "./components/mui_extended/CircularProgress/index.ad569afd.js";
109
+ import "./components/mui_extended/LinearProgress/index.c92b9ba9.js";
110
+ import "./components/mui_extended/LinkWithRoute/index.16436ab8.js";
111
+ import "./components/mui_extended/ToggleButton/index.43140642.js";
112
+ import "./components/mui_extended/ToggleIconButton/index.3d725376.js";
113
+ import "./components/formatters/BooleanFormatter/index.64ed2d71.js";
114
+ import "./components/formatters/DateFormatter/index.578a9f53.js";
115
+ import "./components/formatters/UncertaintyFormatter/index.08e1b79f.js";
116
+ import "./components/formatters/PointsFormatter/index.5c94c5e8.js";
117
+ import "./components/formatters/PriceFormatter/index.83cbe7be.js";
118
+ import "./components/DataGrid/formatters/columnUncertaintyFormatter/index.cae2057a.js";
119
+ import "./components/DataGrid/formatters/columnPointsFormatter/index.a19b7b90.js";
120
+ import "./components/DataGrid/formatters/columnNestedValueFormatter/index.b63f7246.js";
121
+ import "./components/DataGrid/formatters/columnPriceFormatter/index.e612fda3.js";
122
+ import "./components/CommonActions/components/ActionCancel/index.68bf349a.js";
123
+ import "./components/CommonActions/components/ActionIntro/index.7cc0a393.js";
124
+ import "./components/CommonActions/components/ActionFormCancel/index.728bb37d.js";
125
+ import "./components/CommonActions/components/ActionFormIntro/index.a7e8711b.js";
126
+ import "./components/DraggableWindow/index.f9f067bd.js";
127
+ import "./components/GridLayout/subcomponents/Responsive/index.c32210fc.js";
128
+ import "./components/Loadable/index.e994fc3e.js";
129
+ import "./components/ModalDialog/index.82ccabcc.js";
130
+ import "./components/modal/WindowConfirm.355df4de.js";
131
+ import "./components/modal/WindowBase.4fe313e7.js";
132
+ import "./components/ScrollToTop/index.e06f98f6.js";
133
+ import "./hooks/useFormAddEdit/index.0d294209.js";
134
+ import "./hooks/useModal/index.97742698.js";
135
+ import "./hooks/useTab/index.cb48ec45.js";
136
+ import "./assets/Logo/index.228dcb5a.js";
137
+ const getNameDataTestId = (ELEMENT_PREFIX, ELEMENT_KEY, ELEMENT_ID) => {
138
+ return `${ELEMENT_PREFIX}-${[ELEMENT_KEY]}-${ELEMENT_ID}`;
139
+ };
140
+ export {
141
+ getNameDataTestId as g
142
+ };
@@ -1,61 +0,0 @@
1
- import { useFormContext, useFormState } from "react-hook-form";
2
- import { useModuleDictionary } from "@m4l/core";
3
- import { B as Button } from "../../../mui_extended/Button/index.570fd3a4.js";
4
- import { useCallback, useEffect } from "react";
5
- import { u as useModal } from "../../../../hooks/useModal/index.abdc0962.js";
6
- import { u as useCommonActionsUtilityClasses } from "../Actions/index.2f6286eb.js";
7
- import { jsx } from "react/jsx-runtime";
8
- import { u as useWindowToolsMF } from "../../../areas/hooks/useWindowToolsMF/index.b7afaf88.js";
9
- import { W as WindowConfirm } from "../../../modal/WindowConfirm.19ddbd5d.js";
10
- function ActionFormCancel() {
11
- const {
12
- getLabel
13
- } = useModuleDictionary();
14
- const {
15
- openModal
16
- } = useModal();
17
- const {
18
- close: closeWindow,
19
- setFnQueryClose: setQueryClose
20
- } = useWindowToolsMF();
21
- const {
22
- control
23
- } = useFormContext();
24
- const {
25
- isDirty
26
- } = useFormState({
27
- control
28
- });
29
- const onConfirmQuit = useCallback(() => {
30
- closeWindow();
31
- }, []);
32
- const onClickCancel = useCallback(() => {
33
- if (isDirty) {
34
- openModal({
35
- window: /* @__PURE__ */ jsx(WindowConfirm, {
36
- variant: "warning",
37
- title: getLabel("common_actions.confirm_quit_title"),
38
- msg: getLabel("common_actions.confirm_quit_msg"),
39
- onClickIntro: onConfirmQuit
40
- }),
41
- variant: "warning"
42
- });
43
- } else {
44
- onConfirmQuit();
45
- }
46
- }, [getLabel, isDirty, openModal]);
47
- useEffect(() => {
48
- setQueryClose(onClickCancel);
49
- }, [onClickCancel]);
50
- const classes = useCommonActionsUtilityClasses();
51
- return /* @__PURE__ */ jsx(Button, {
52
- variant: "outlined",
53
- color: "inherit",
54
- onClick: onClickCancel,
55
- className: classes.actionFormCancel,
56
- children: getLabel("common_actions.cancel")
57
- });
58
- }
59
- export {
60
- ActionFormCancel as A
61
- };
@@ -1,74 +0,0 @@
1
- import { T as TEST_PROP_ID } from "../../../../test/constants_no_mock.86c553a9.js";
2
- import { generateUtilityClasses } from "@mui/material";
3
- import { unstable_composeClasses } from "@mui/base";
4
- import { g as getComponentUtilityClass } from "../../../../utils/index.de903261.js";
5
- import { styled } from "@mui/material/styles";
6
- import { jsx } from "react/jsx-runtime";
7
- const componentName = "M4LCommonActions";
8
- generateUtilityClasses(componentName, [
9
- "root",
10
- "skeleton",
11
- "actionCancel",
12
- "actionFormCancel",
13
- "actionFormIntro",
14
- "actionIntro",
15
- "wrapperActions"
16
- ]);
17
- const useCommonActionsUtilityClasses = () => {
18
- const slots = {
19
- root: ["root"],
20
- skeleton: ["skeleton"],
21
- actionCancel: ["actionCancel"],
22
- actionFormCancel: ["actionFormCancel"],
23
- actionFormIntro: ["actionFormIntro"],
24
- actionIntro: ["actionIntro"],
25
- wrapperActions: ["wrapperActions"]
26
- };
27
- return unstable_composeClasses(slots, getComponentUtilityClass(componentName), {});
28
- };
29
- const WrapperStandarActions = styled("div")(({
30
- theme
31
- }) => ({
32
- paddingTop: theme.spacing(3),
33
- display: "flex",
34
- flexDirection: "row",
35
- justifyContent: "flex-end",
36
- "& > button": {
37
- marginLeft: "10px"
38
- },
39
- ...theme.components?.M4LCommonActions?.styleOverrides
40
- }));
41
- const COMMONACTIONS_PREFIX = "M4LCommonActions";
42
- const getNameCommonActionsDataTestId = (KEY) => {
43
- return `${COMMONACTIONS_PREFIX}-${KEY}`;
44
- };
45
- const Actions = (props) => {
46
- const {
47
- children
48
- } = props;
49
- const classes = useCommonActionsUtilityClasses();
50
- return /* @__PURE__ */ jsx(WrapperStandarActions, {
51
- className: classes.root,
52
- ...process.env.NODE_ENV !== "production" ? {
53
- [TEST_PROP_ID]: getNameCommonActionsDataTestId("root")
54
- } : {},
55
- children
56
- });
57
- };
58
- function getCommonActionsDictionary() {
59
- return ["common_actions"];
60
- }
61
- const defaultCommonActionsDictionary = {
62
- common_actions: {
63
- cancel: "Cancel",
64
- intro: "Intro",
65
- confirm_quit_title: "Confirm",
66
- confirm_quit_msg: "Are your sure exit?"
67
- }
68
- };
69
- export {
70
- Actions as A,
71
- defaultCommonActionsDictionary as d,
72
- getCommonActionsDictionary as g,
73
- useCommonActionsUtilityClasses as u
74
- };
@@ -1 +0,0 @@
1
- export declare const DATAGRID_ACTIONS_COLUMN_KEY = "M4LDataGrid-ActionsColumn";
@@ -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
- };
@@ -1,74 +0,0 @@
1
- import { m as modalUtilityClasses } from "./index.61389369.js";
2
- import { useEnvironment } from "@m4l/core";
3
- import clsx from "clsx";
4
- import { jsxs, jsx } from "react/jsx-runtime";
5
- import { I as IconButton } from "../mui_extended/IconButton/index.26de70bd.js";
6
- import { I as Icon } from "../Icon/index.05984e7f.js";
7
- import { u as useModal } from "../../hooks/useModal/index.abdc0962.js";
8
- const Header = (props) => {
9
- const {
10
- title,
11
- onClickCancel,
12
- urlIcon,
13
- classes
14
- } = props;
15
- const {
16
- host_static_assets,
17
- environment_assets
18
- } = useEnvironment();
19
- const handlerClick = (e) => {
20
- e.stopPropagation();
21
- onClickCancel && onClickCancel();
22
- };
23
- return /* @__PURE__ */ jsxs("div", {
24
- id: "Header",
25
- className: clsx(classes.headerContainer, "m4l_draggable_handle"),
26
- children: [urlIcon && /* @__PURE__ */ jsx("div", {
27
- className: classes.iconHeader,
28
- children: /* @__PURE__ */ jsx(Icon, {
29
- src: urlIcon,
30
- size: "medium"
31
- })
32
- }), /* @__PURE__ */ jsx("div", {
33
- className: classes.titleHeader,
34
- children: title
35
- }), /* @__PURE__ */ jsx(IconButton, {
36
- className: classes.iconCloseHeader,
37
- src: `${host_static_assets}/${environment_assets}/frontend/components/dialog/assets/icons/close.svg`,
38
- onClick: (e) => handlerClick(e),
39
- "aria-label": "click"
40
- })]
41
- });
42
- };
43
- const WindowBase = (props) => {
44
- const {
45
- children,
46
- onClickCancel,
47
- ...other
48
- } = props;
49
- const {
50
- closeModal,
51
- variant
52
- } = useModal();
53
- const onCloseCancel = () => {
54
- onClickCancel && onClickCancel();
55
- closeModal();
56
- };
57
- const classes = modalUtilityClasses({
58
- variant
59
- });
60
- return /* @__PURE__ */ jsxs("div", {
61
- className: classes.windowBaseRoot,
62
- children: [/* @__PURE__ */ jsx(Header, {
63
- ...other,
64
- onClickCancel: onCloseCancel,
65
- classes
66
- }), /* @__PURE__ */ jsx("div", {
67
- className: classes.windowContent,
68
- children
69
- })]
70
- });
71
- };
72
- export {
73
- WindowBase as W
74
- };
@@ -1,102 +0,0 @@
1
- import { A as Actions } from "../CommonActions/components/Actions/index.2f6286eb.js";
2
- import { Typography } from "@mui/material";
3
- import { useModuleDictionary, useEnvironment } from "@m4l/core";
4
- import { u as useModal } from "../../hooks/useModal/index.abdc0962.js";
5
- import { jsx, jsxs } from "react/jsx-runtime";
6
- import { I as Image } from "../Image/index.bf37e923.js";
7
- import { m as modalUtilityClasses } from "./index.61389369.js";
8
- import { W as WindowBase } from "./WindowBase.ea17cf20.js";
9
- import { A as ActionCancel } from "../CommonActions/components/ActionCancel/index.06539086.js";
10
- import { A as ActionIntro } from "../CommonActions/components/ActionIntro/index.3e8a2e60.js";
11
- const dictionary = {
12
- MESSAGE: "common_actions.confirm_quit_msg"
13
- };
14
- const MessageIlustration = (props) => {
15
- const {
16
- getLabel
17
- } = useModuleDictionary();
18
- const {
19
- variant
20
- } = useModal();
21
- const {
22
- msg = getLabel(dictionary.MESSAGE),
23
- classes,
24
- title
25
- } = props;
26
- const {
27
- host_static_assets,
28
- environment_assets
29
- } = useEnvironment();
30
- const illustrationWarning = `${host_static_assets}/${environment_assets}/frontend/components/dialog/assets/icons/illustrator_confirm_warning.svg`;
31
- const illustrationDanger = `${host_static_assets}/${environment_assets}/frontend/components/dialog/assets/icons/illustrator_confirm_danger.svg`;
32
- const illustrationSuccess = `${host_static_assets}/${environment_assets}/frontend/components/dialog/assets/icons/illustrator_confirm_success.svg`;
33
- const illustrationInfo = `${host_static_assets}/${environment_assets}/frontend/components/dialog/assets/icons/illustrator_confirm_info.svg`;
34
- return /* @__PURE__ */ jsx("div", {
35
- className: classes.containerMassageIlustration,
36
- children: /* @__PURE__ */ jsxs("div", {
37
- className: classes.modalContent,
38
- children: [/* @__PURE__ */ jsx("div", {
39
- className: classes.illustrationContainer,
40
- children: /* @__PURE__ */ jsx(Image, {
41
- className: classes.illustration,
42
- src: variant === "warning" ? illustrationWarning : variant === "delete" ? illustrationDanger : variant === "success" ? illustrationSuccess : illustrationInfo
43
- })
44
- }), /* @__PURE__ */ jsx("div", {
45
- children: /* @__PURE__ */ jsx(Typography, {
46
- variant: "subtitle",
47
- children: title
48
- })
49
- }), /* @__PURE__ */ jsx("div", {
50
- className: classes.messageContainer,
51
- children: /* @__PURE__ */ jsx(Typography, {
52
- variant: "body",
53
- children: msg
54
- })
55
- })]
56
- })
57
- });
58
- };
59
- const WindowConfirm = (props) => {
60
- const {
61
- variant,
62
- title,
63
- onClickCancel,
64
- onClickIntro,
65
- msg
66
- } = props;
67
- const {
68
- closeModal
69
- } = useModal();
70
- const {
71
- getLabel
72
- } = useModuleDictionary();
73
- const {
74
- host_static_assets,
75
- environment_assets
76
- } = useEnvironment();
77
- const onCloseCancel = () => {
78
- onClickCancel && onClickCancel();
79
- closeModal();
80
- };
81
- const classes = modalUtilityClasses({
82
- variant
83
- });
84
- return /* @__PURE__ */ jsxs(WindowBase, {
85
- title: getLabel("modal_dialog.label_window_confirm"),
86
- urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/dialog/assets/icons/window_confirm.svg`,
87
- children: [/* @__PURE__ */ jsx(MessageIlustration, {
88
- classes,
89
- msg,
90
- title
91
- }), /* @__PURE__ */ jsxs(Actions, {
92
- children: [/* @__PURE__ */ jsx(ActionCancel, {
93
- onClick: onCloseCancel
94
- }), /* @__PURE__ */ jsx(ActionIntro, {
95
- onClick: onClickIntro
96
- })]
97
- })]
98
- });
99
- };
100
- export {
101
- WindowConfirm as W
102
- };
@@ -1,57 +0,0 @@
1
- import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
2
- import { unstable_composeClasses } from "@mui/base";
3
- const componentName = "M4LModal";
4
- generateUtilityClasses(componentName, [
5
- "root",
6
- "windowBaseRoot",
7
- "containerWindow",
8
- "headerContainer",
9
- "iconHeader",
10
- "titleHeader",
11
- "iconCloseHeader",
12
- "containerMassageIlustration",
13
- "modalContent",
14
- "illustrationContainer",
15
- "messageContainer",
16
- "illustration",
17
- "windowConfirm",
18
- "resizeHandle",
19
- "windowContent",
20
- "variantDelete",
21
- "variantWarning",
22
- "variantInfo",
23
- "variantPrimary"
24
- ]);
25
- function getModalUtilityClass(slot) {
26
- return generateUtilityClass(componentName, slot);
27
- }
28
- const modalUtilityClasses = (ownerState) => {
29
- const slots = {
30
- root: ["root", ownerState?.variant === "delete" && "variantDelete", ownerState.variant === "warning" && "variantWarning", ownerState.variant === "info" && "variantInfo", ownerState.variant === "success" && "variantSuccess"],
31
- windowBaseRoot: ["windowBaseRoot"],
32
- containerWindow: ["containerWindow"],
33
- headerContainer: ["headerContainer"],
34
- iconHeader: ["iconHeader"],
35
- titleHeader: ["titleHeader"],
36
- iconCloseHeader: ["iconCloseHeader"],
37
- containerMassageIlustration: ["containerMassageIlustration"],
38
- modalContent: ["modalContent"],
39
- illustrationContainer: ["illustrationContainer"],
40
- messageContainer: ["messageContainer"],
41
- illustration: ["illustration"],
42
- windowConfirm: ["windowConfirm"],
43
- resizeHandle: ["resizeHandle"],
44
- windowContent: ["windowContent"]
45
- };
46
- const composedClasses = unstable_composeClasses(slots, getModalUtilityClass, {});
47
- return {
48
- ...composedClasses
49
- };
50
- };
51
- const getModalDictionary = () => {
52
- return "modal_dialog";
53
- };
54
- export {
55
- getModalDictionary as g,
56
- modalUtilityClasses as m
57
- };
@@ -1,96 +0,0 @@
1
- import { useNetwork, useFlags, useModuleDictionary } from "@m4l/core";
2
- import { useState, useEffect } from "react";
3
- import { u as useModal } from "../useModal/index.abdc0962.js";
4
- import { jsx } from "react/jsx-runtime";
5
- import { W as WindowConfirm } from "../../components/modal/WindowConfirm.19ddbd5d.js";
6
- function useFormAddEdit(props) {
7
- const {
8
- initialValues,
9
- objectId,
10
- endPoint,
11
- formatDataEnpoint,
12
- queryParamas,
13
- isRemote = true,
14
- omitCallEnpoint = false
15
- } = props;
16
- const {
17
- openModal
18
- } = useModal();
19
- const [formValues, setFormValues] = useState(initialValues);
20
- const [statusLoad, setStatusLoad] = useState(objectId === void 0 ? "new" : "edit");
21
- const {
22
- networkOperation
23
- } = useNetwork();
24
- const {
25
- addFlag
26
- } = useFlags();
27
- const {
28
- getLabel
29
- } = useModuleDictionary();
30
- console.log("statusLoad", statusLoad);
31
- const setRefresh = () => {
32
- if (statusLoad === "ready") {
33
- setStatusLoad("edit");
34
- console.log("useFormAddEdit statusLoad", statusLoad);
35
- }
36
- };
37
- useEffect(() => {
38
- let mounted = true;
39
- if (statusLoad === "edit") {
40
- if (omitCallEnpoint) {
41
- addFlag("form_loaded");
42
- setStatusLoad("ready");
43
- return;
44
- }
45
- networkOperation({
46
- method: "GET",
47
- endPoint: queryParamas ? `${endPoint}/${objectId}?${queryParamas}` : `${endPoint}/${objectId}`,
48
- isRemote
49
- }).then((response) => {
50
- if (mounted) {
51
- if (formatDataEnpoint) {
52
- setFormValues(formatDataEnpoint(response));
53
- } else {
54
- setFormValues(response.data);
55
- }
56
- setStatusLoad("reload_values_provider");
57
- }
58
- }, () => {
59
- setStatusLoad("error");
60
- openModal({
61
- window: /* @__PURE__ */ jsx(WindowConfirm, {
62
- variant: "delete",
63
- title: getLabel("form_add_edit.label_error_title"),
64
- msg: getLabel("form_add_edit.error_authorization_message"),
65
- onClickIntro: () => close()
66
- }),
67
- variant: "delete"
68
- });
69
- addFlag("form_loaded");
70
- });
71
- } else if (statusLoad === "new" || statusLoad === "reload_values_provider") {
72
- addFlag("form_loaded");
73
- setStatusLoad("ready");
74
- }
75
- return () => {
76
- mounted = false;
77
- };
78
- }, [statusLoad]);
79
- useEffect(() => {
80
- if (statusLoad === "ready" && objectId !== void 0) {
81
- setStatusLoad("edit");
82
- }
83
- }, [objectId]);
84
- return {
85
- formValues,
86
- statusLoad,
87
- setRefresh
88
- };
89
- }
90
- const getformAddEditDictionary = () => {
91
- return "form_add_edit";
92
- };
93
- export {
94
- getformAddEditDictionary as g,
95
- useFormAddEdit as u
96
- };
@@ -1,12 +0,0 @@
1
- import { useContext } from "react";
2
- import { T as TabContext } from "../../components/mui_extended/Tab/index.f8795137.js";
3
- const useTab = () => {
4
- const context = useContext(TabContext);
5
- if (context === null) {
6
- throw new Error("useTab must be used within a TabProvider");
7
- }
8
- return context;
9
- };
10
- export {
11
- useTab as u
12
- };