@m4l/components 0.1.12 → 0.1.13

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 (143) hide show
  1. package/assets/Logo/index.228dcb5a.js +86 -0
  2. package/commonjs.565e6834.js +12 -0
  3. package/components/CommonActions/components/ActionCancel/index.cba1b460.js +17 -0
  4. package/components/CommonActions/components/ActionFormCancel/index.be2fe891.js +49 -0
  5. package/components/CommonActions/components/ActionFormIntro/index.ca4d2674.js +31 -0
  6. package/components/CommonActions/components/ActionIntro/index.cc4b1e0e.js +18 -0
  7. package/components/CommonActions/components/Actions/index.e8148d98.js +743 -0
  8. package/components/CompanyLogo/{index.js → index.f81c179c.js} +42 -48
  9. package/components/DataGrid/index.b688877d.js +894 -0
  10. package/components/DynamicFilter/index.82ce857e.js +1158 -0
  11. package/components/ErrorLabel/index.c8615f16.js +19 -0
  12. package/components/Icon/index.cbca79b0.js +70 -0
  13. package/components/Image/index.e790b50b.js +122 -0
  14. package/components/LanguagePopover/index.3d9611cb.js +87 -0
  15. package/components/Loadable/index.f5518558.js +15 -0
  16. package/components/ModalDialog/index.3850c053.js +168 -0
  17. package/components/NoItemSelected/{index.js → index.12f0ca67.js} +43 -50
  18. package/components/ObjectLogs/index.27ef875d.js +266 -0
  19. package/components/Page/index.6d69977e.js +35 -0
  20. package/components/Page/index.d.ts +1 -1
  21. package/components/PaperForm/index.d7c74064.js +105 -0
  22. package/components/Period/index.5e68286a.js +160 -0
  23. package/components/PropertyValue/index.ab3dd7e9.js +116 -0
  24. package/components/Resizeable/{index.js → index.45995d2b.js} +21 -19
  25. package/components/ScrollBar/index.39eeb2de.js +49 -0
  26. package/components/ScrollToTop/index.e06f98f6.js +11 -0
  27. package/components/SplitLayout/{index.js → index.4032673d.js} +35 -35
  28. package/components/animate/IconButtonAnimate/index.d.ts +1 -1
  29. package/components/animate/LoadingScreen/{index.js → index.f1cec7db.js} +29 -27
  30. package/components/animate/MotionContainer/index.8d9f9d80.js +30 -0
  31. package/components/animate/MotionLazyContainer/index.572dd012.js +15 -0
  32. package/components/animate/features.0fbf41e1.js +5 -0
  33. package/components/animate/variants/{bounce.js → bounce.784aaaaa.js} +15 -16
  34. package/components/animate/variants/container.11f82b76.js +20 -0
  35. package/components/animate/variants/fade.b561c0fc.js +59 -0
  36. package/components/animate/variants/{index.js → index.7a912140.js} +0 -0
  37. package/components/animate/variants/transition.bd46b9ce.js +15 -0
  38. package/components/formatters/BooleanFormatter/index.cca53b7f.js +42 -0
  39. package/components/formatters/DateFormatter/index.ad8d9b8e.js +57 -0
  40. package/components/formatters/index.55856d65.js +106 -0
  41. package/components/hook-form/FormProvider/index.257acd9f.js +55 -0
  42. package/components/hook-form/RHFAutocomplete/index.6ed76d4c.js +122 -0
  43. package/components/hook-form/RHFAutocompleteAsync/index.8f2c97ea.js +153 -0
  44. package/components/hook-form/RHFCheckbox/index.f9ce6c39.js +59 -0
  45. package/components/hook-form/RHFDateTime/index.fc5cbafe.js +68 -0
  46. package/components/hook-form/RHFMultiCheckbox/index.2680b3b6.js +34 -0
  47. package/components/hook-form/RHFPeriod/index.23c254e9.js +45 -0
  48. package/components/hook-form/RHFRadioGroup/index.b3335e13.js +43 -0
  49. package/components/hook-form/RHFSelect/index.b6ca8bb2.js +36 -0
  50. package/components/hook-form/RHFTextField/index.4c455f75.js +77 -0
  51. package/components/hook-form/RHFTextField/index.d.ts +1 -1
  52. package/components/hook-form/RHFUpload/index.ed3d739f.js +244 -0
  53. package/components/mui_extended/Accordion/index.2116e423.js +103 -0
  54. package/components/mui_extended/Avatar/index.0a2a4523.js +32 -0
  55. package/components/mui_extended/Avatar/index.d.ts +1 -1
  56. package/components/mui_extended/BoxIcon/index.e638ecc8.js +22 -0
  57. package/components/mui_extended/Breadcrumbs/index.5e37d903.js +89 -0
  58. package/components/mui_extended/Button/index.84d8898c.js +110 -0
  59. package/components/mui_extended/IconButton/index.88f3aadb.js +98 -0
  60. package/components/mui_extended/LinkWithRoute/index.d4b263de.js +28 -0
  61. package/components/mui_extended/MenuPopover/index.488fc536.js +131 -0
  62. package/components/mui_extended/Pager/index.0576814f.js +126 -0
  63. package/components/mui_extended/Tab/index.e0653a0a.js +28 -0
  64. package/components/mui_extended/Typography/index.0c4604b3.js +22 -0
  65. package/contexts/ModalContext/index.2188b69e.js +150 -0
  66. package/hooks/useFormAddEdit/index.d4845f1a.js +26 -0
  67. package/hooks/useModal/index.6571d2d9.js +6 -0
  68. package/index.js +162 -70
  69. package/lodash.e09401f0.js +32 -0
  70. package/node_modules.168cb897.js +55 -0
  71. package/package.json +1 -1
  72. package/react-data-grid.d46d625e.js +2115 -0
  73. package/react-draggable.20e95c61.js +714 -0
  74. package/react-json-view.f56a7f8e.js +2762 -0
  75. package/react-lazy-load-image-component.45b56650.js +784 -0
  76. package/react-resizable.5277deaf.js +371 -0
  77. package/react-splitter-layout.7810ac1b.js +165 -0
  78. package/utils/index.214d9542.js +435 -0
  79. package/assets/Logo/index.js +0 -91
  80. package/commonjs.js +0 -9
  81. package/components/CommonActions/components/ActionCancel/index.js +0 -15
  82. package/components/CommonActions/components/ActionFormCancel/index.js +0 -62
  83. package/components/CommonActions/components/ActionFormIntro/index.js +0 -35
  84. package/components/CommonActions/components/ActionIntro/index.js +0 -16
  85. package/components/CommonActions/components/Actions/index.js +0 -859
  86. package/components/DataGrid/index.js +0 -1067
  87. package/components/DynamicFilter/index.js +0 -1573
  88. package/components/ErrorLabel/index.js +0 -18
  89. package/components/Icon/index.js +0 -80
  90. package/components/Image/index.js +0 -128
  91. package/components/LanguagePopover/index.js +0 -93
  92. package/components/Loadable/index.js +0 -13
  93. package/components/ModalDialog/index.js +0 -180
  94. package/components/ObjectLogs/index.js +0 -284
  95. package/components/Page/index.js +0 -36
  96. package/components/PaperForm/index.js +0 -110
  97. package/components/Period/index.js +0 -230
  98. package/components/PropertyValue/index.js +0 -142
  99. package/components/ScrollBar/index.js +0 -52
  100. package/components/ScrollToTop/index.js +0 -10
  101. package/components/animate/MotionContainer/index.js +0 -31
  102. package/components/animate/MotionLazyContainer/index.js +0 -13
  103. package/components/animate/features.js +0 -2
  104. package/components/animate/variants/container.js +0 -20
  105. package/components/animate/variants/fade.js +0 -61
  106. package/components/animate/variants/transition.js +0 -16
  107. package/components/formatters/BooleanFormatter/index.js +0 -52
  108. package/components/formatters/DateFormatter/index.js +0 -66
  109. package/components/formatters/index.js +0 -112
  110. package/components/hook-form/FormProvider/index.js +0 -61
  111. package/components/hook-form/RHFAutocomplete/index.js +0 -144
  112. package/components/hook-form/RHFAutocompleteAsync/index.js +0 -191
  113. package/components/hook-form/RHFCheckbox/index.js +0 -65
  114. package/components/hook-form/RHFDateTime/index.js +0 -79
  115. package/components/hook-form/RHFMultiCheckbox/index.js +0 -32
  116. package/components/hook-form/RHFPeriod/index.js +0 -47
  117. package/components/hook-form/RHFRadioGroup/index.js +0 -41
  118. package/components/hook-form/RHFSelect/index.js +0 -34
  119. package/components/hook-form/RHFTextField/index.js +0 -87
  120. package/components/hook-form/RHFUpload/index.js +0 -255
  121. package/components/mui_extended/Accordion/index.js +0 -105
  122. package/components/mui_extended/Avatar/index.js +0 -33
  123. package/components/mui_extended/BoxIcon/index.js +0 -20
  124. package/components/mui_extended/Breadcrumbs/index.js +0 -92
  125. package/components/mui_extended/Button/index.js +0 -131
  126. package/components/mui_extended/IconButton/index.js +0 -108
  127. package/components/mui_extended/LinkWithRoute/index.js +0 -30
  128. package/components/mui_extended/MenuPopover/index.js +0 -135
  129. package/components/mui_extended/Pager/index.js +0 -137
  130. package/components/mui_extended/Tab/index.js +0 -30
  131. package/components/mui_extended/Typography/index.js +0 -21
  132. package/contexts/ModalContext/index.js +0 -165
  133. package/hooks/useFormAddEdit/index.js +0 -42
  134. package/hooks/useModal/index.js +0 -4
  135. package/lodash.js +0 -62
  136. package/node_modules.js +0 -54
  137. package/react-data-grid.js +0 -2652
  138. package/react-draggable.js +0 -960
  139. package/react-json-view.js +0 -2764
  140. package/react-lazy-load-image-component.js +0 -792
  141. package/react-resizable.js +0 -541
  142. package/react-splitter-layout.js +0 -165
  143. package/utils/index.js +0 -572
@@ -0,0 +1,266 @@
1
+ import { useState as _, useEffect as f, useCallback as d, useMemo as $ } from "react";
2
+ import { useNetwork as k, useModuleDictionary as y, useEnvironment as h, usePaginate as O } from "@m4l/core";
3
+ import { styled as g } from "@mui/material/styles";
4
+ import { D as R, g as I } from "../DataGrid/index.b688877d.js";
5
+ import { D as L } from "../formatters/DateFormatter/index.ad8d9b8e.js";
6
+ import { Tooltip as G, IconButton as M } from "@mui/material";
7
+ import { R as S } from "../../react-json-view.f56a7f8e.js";
8
+ import { jsx as t, jsxs as A } from "react/jsx-runtime";
9
+ import { u as T } from "../../hooks/useModal/index.6571d2d9.js";
10
+ import { I as u } from "../Icon/index.cbca79b0.js";
11
+ import { D as E, g as K } from "../DynamicFilter/index.82ce857e.js";
12
+ const q = g("div")(() => ({
13
+ height: "100%",
14
+ width: "100%",
15
+ display: "flex",
16
+ flexDirection: "column",
17
+ justifyContent: "flex-start"
18
+ })), J = g("div")(({
19
+ theme: o
20
+ }) => ({
21
+ position: "relative",
22
+ height: "auto",
23
+ display: "flex",
24
+ flexDirection: "row",
25
+ justifyContent: "flex-start",
26
+ alignItems: "center",
27
+ "& .MuiFormControl-root": {
28
+ flexGrow: 1
29
+ },
30
+ [o.breakpoints.up("sm")]: {
31
+ "& .MuiFormControl-root:nth-of-type(1)": {
32
+ marginRight: o.spacing(3)
33
+ }
34
+ }
35
+ })), N = g("div")(() => ({
36
+ position: "relative",
37
+ flexGrow: "1",
38
+ width: "100%"
39
+ })), Q = g("div")(({ theme: o }) => ({
40
+ color: o.palette.text.primary,
41
+ display: "flex",
42
+ flexDirection: "column",
43
+ height: "100%",
44
+ width: "100%"
45
+ }));
46
+ g("span")(({ theme: o }) => ({
47
+ color: o.palette.text.primary,
48
+ display: "flex",
49
+ flexDirection: "column",
50
+ height: "100%",
51
+ width: "100%"
52
+ }));
53
+ function U(o) {
54
+ const {
55
+ log_id: c
56
+ } = o, {
57
+ networkOperation: n
58
+ } = k(), [e, r] = _({});
59
+ return f(() => {
60
+ let s = !0;
61
+ return n({
62
+ method: "GET",
63
+ endPoint: `logs/${c}`
64
+ }).then((a) => {
65
+ if (s) {
66
+ const l = JSON.parse(String(a.data.log_detail));
67
+ r(l);
68
+ }
69
+ }), function() {
70
+ s = !1;
71
+ };
72
+ }, []), /* @__PURE__ */ t(Q, {
73
+ id: "objectLogsDetail",
74
+ children: /* @__PURE__ */ t(S, {
75
+ name: null,
76
+ sortKeys: !0,
77
+ displayDataTypes: !1,
78
+ quotesOnKeys: !1,
79
+ src: e
80
+ })
81
+ });
82
+ }
83
+ function W(o) {
84
+ const {
85
+ log_id: c
86
+ } = o, {
87
+ openModal: n,
88
+ closeModal: e
89
+ } = T(), {
90
+ getLabel: r
91
+ } = y(), {
92
+ host_static_assets: s,
93
+ environment_assets: a
94
+ } = h(), l = () => {
95
+ n({
96
+ onQueryClose: () => e(),
97
+ title: r("object_logs.modal_detail_title"),
98
+ iconComponent: /* @__PURE__ */ t(u, {
99
+ src: `${s}/${a}/frontend/components/object_logs/assets/icons/search.svg`
100
+ }),
101
+ contentComponent: /* @__PURE__ */ t(U, {
102
+ log_id: c
103
+ })
104
+ });
105
+ };
106
+ return /* @__PURE__ */ t(G, {
107
+ title: r("object_logs.view_log_detail"),
108
+ children: /* @__PURE__ */ t(M, {
109
+ onClick: l,
110
+ "aria-label": "filter",
111
+ children: /* @__PURE__ */ t(u, {
112
+ src: `${s}/${a}/frontend/components/object_logs/assets/icons/search.svg`
113
+ })
114
+ })
115
+ });
116
+ }
117
+ function ie(o) {
118
+ const {
119
+ resource_id: c,
120
+ object_id: n
121
+ } = o, {
122
+ getLabel: e
123
+ } = y(), {
124
+ host_static_assets: r,
125
+ environment_assets: s
126
+ } = h(), [a, l] = _({
127
+ resource_id: c,
128
+ object_id: n
129
+ }), b = d((i) => /* @__PURE__ */ t(L, {
130
+ presentationType: "datetime",
131
+ value: i.row.created_at
132
+ }), []), w = d((i) => /* @__PURE__ */ t(W, {
133
+ log_id: i.row.id
134
+ }), []), j = $(() => [{
135
+ key: "created_at",
136
+ name: e("object_logs.created_at"),
137
+ type: "date",
138
+ width: 300,
139
+ formatter: b
140
+ }, {
141
+ key: "email",
142
+ name: e("object_logs.email"),
143
+ type: "string",
144
+ width: 300
145
+ }, {
146
+ key: "resource_name",
147
+ name: e("object_logs.resource_name"),
148
+ type: "string"
149
+ }, {
150
+ key: "log_preview",
151
+ name: e("object_logs.log_preview"),
152
+ type: "string"
153
+ }, {
154
+ key: "Detail",
155
+ name: e("object_logs.log_detail"),
156
+ type: "custom",
157
+ formatter: w
158
+ }, {
159
+ key: "ip",
160
+ name: e("object_logs.ip"),
161
+ type: "string"
162
+ }], [e]), {
163
+ pagerState: p,
164
+ rows: m,
165
+ onPageChange: D,
166
+ onRowsPerPageChange: v,
167
+ clearRows: C,
168
+ Refresh: x
169
+ } = O({
170
+ endPoint: "logs",
171
+ fireOnChangeParms: !1,
172
+ queryParams: a
173
+ });
174
+ return f(() => {
175
+ C(), l((i) => ({
176
+ ...i,
177
+ object_id: n
178
+ }));
179
+ }, [n]), /* @__PURE__ */ A(q, {
180
+ children: [/* @__PURE__ */ t(J, {
181
+ id: "objectLogsActions",
182
+ children: /* @__PURE__ */ t(E, {
183
+ withAllField: !0,
184
+ onChangeFilter: (i, P) => {
185
+ l((F) => ({
186
+ ...F,
187
+ f: P
188
+ })), x();
189
+ },
190
+ automatic: !1,
191
+ fields: [{
192
+ name: "user_logs.created_at",
193
+ label: e("object_logs.created_at"),
194
+ type: "datetime",
195
+ multiple: !1,
196
+ presence: "fixed",
197
+ urlIcon: `${r}/${s}/frontend/components/object_logs/assets/icons/email.svg`
198
+ }, {
199
+ name: "users.email",
200
+ label: e("object_logs.email"),
201
+ type: "string",
202
+ multiple: !0,
203
+ presence: "optional",
204
+ urlIcon: `${r}/${s}/frontend/components/object_logs/assets/icons/email.svg`
205
+ }, {
206
+ name: "user_logs.log_preview",
207
+ label: e("object_logs.log_preview"),
208
+ type: "string",
209
+ multiple: !0,
210
+ presence: "optional",
211
+ urlIcon: `${r}/${s}/frontend/components/object_logs/assets/icons/log_preview.svg`
212
+ }, {
213
+ name: "user_logs.log_detail",
214
+ label: e("object_logs.log_detail"),
215
+ type: "string",
216
+ multiple: !0,
217
+ presence: "optional",
218
+ urlIcon: `${r}/${s}/frontend/components/object_logs/assets/icons/log_detail.svg`
219
+ }],
220
+ initialFilters: []
221
+ })
222
+ }), /* @__PURE__ */ t(N, {
223
+ id: "GridWrapper",
224
+ children: /* @__PURE__ */ t(R, {
225
+ id: "users_logs_list",
226
+ columns: j,
227
+ rows: m,
228
+ rowKeyGetter: (i) => i.id,
229
+ isMultipleSelect: !1,
230
+ withActions: !0,
231
+ actionsProps: {
232
+ withPager: !0,
233
+ withLocalFilters: !0,
234
+ pagerOptions: {
235
+ records: m.length,
236
+ totalRecords: p.totalRecords,
237
+ rowsPerPageOptions: [1, 2, 3, 4, 5, 10, 25],
238
+ page: p.page,
239
+ rowsPerPage: p.rowsPerPage,
240
+ onPageChange: D,
241
+ onRowsPerPageChange: v
242
+ }
243
+ }
244
+ }, "users_list_logs")
245
+ })]
246
+ });
247
+ }
248
+ function ne() {
249
+ return ["object_logs"].concat(I()).concat(K());
250
+ }
251
+ const ae = {
252
+ object_logs: {
253
+ created_at: "Start date",
254
+ user: "User/email",
255
+ resource_name: "Resource",
256
+ privilege_name: "Privilege",
257
+ log_preview: "Log",
258
+ log_detail: "Detail",
259
+ ip: "Ip"
260
+ }
261
+ };
262
+ export {
263
+ ie as O,
264
+ ae as d,
265
+ ne as g
266
+ };
@@ -0,0 +1,35 @@
1
+ import { forwardRef as d } from "react";
2
+ import { Helmet as f } from "react-helmet-async";
3
+ import { Box as p } from "@mui/material";
4
+ import { useLocales as u } from "@m4l/graphics";
5
+ import { useDomain as h, useModuleSkeleton as g } from "@m4l/core";
6
+ import { jsxs as o, Fragment as x, jsx as e } from "react/jsx-runtime";
7
+ const P = d((r, t) => {
8
+ const {
9
+ children: m,
10
+ title: n,
11
+ meta: a,
12
+ ...i
13
+ } = r, {
14
+ currentLang: l
15
+ } = u(), {
16
+ name: s
17
+ } = h(), c = g();
18
+ return /* @__PURE__ */ o(x, {
19
+ children: [!c && /* @__PURE__ */ o(f, {
20
+ children: [/* @__PURE__ */ e("title", {
21
+ children: `${n} | ${s}`
22
+ }), /* @__PURE__ */ e("html", {
23
+ lang: l.value
24
+ }), a]
25
+ }), /* @__PURE__ */ e(p, {
26
+ ref: t,
27
+ ...i,
28
+ children: m
29
+ })]
30
+ });
31
+ });
32
+ P.displayName = "Page";
33
+ export {
34
+ P
35
+ };
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import { PageProps } from './types';
3
- export declare const Page: import("react").ForwardRefExoticComponent<Pick<PageProps, "className" | "style" | "classes" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform" | "translate" | "meta" | "slot" | "title" | "children" | "component" | "sx" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & import("react").RefAttributes<HTMLDivElement>>;
3
+ export declare const Page: import("react").ForwardRefExoticComponent<Pick<PageProps, "className" | "style" | "classes" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform" | "translate" | "meta" | "slot" | "title" | "children" | "component" | "sx" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,105 @@
1
+ import { styled as r } from "@mui/material/styles";
2
+ import { useModuleSkeleton as s } from "@m4l/core";
3
+ import { Skeleton as d } from "@mui/material";
4
+ import { I as l } from "../Icon/index.cbca79b0.js";
5
+ import { jsxs as a, jsx as o } from "react/jsx-runtime";
6
+ const c = r("div")(({
7
+ theme: i
8
+ }) => ({
9
+ display: "flex",
10
+ flexDirection: "column",
11
+ padding: i.spacing(1),
12
+ [i.breakpoints.up("sm")]: {
13
+ margin: `${i.spacing(1.5)} ${i.spacing(1.5)} ${i.spacing(3)} ${i.spacing(1.5)}`,
14
+ borderRadius: i.spacing(2),
15
+ boxShadow: i.customShadows.z8,
16
+ padding: i.spacing(3),
17
+ backgroundColor: i.palette.background.paper
18
+ }
19
+ })), p = r("div")(({
20
+ theme: i
21
+ }) => ({
22
+ display: "flex",
23
+ flexDirection: "row",
24
+ alignItems: "center",
25
+ borderBottom: `1px solid ${i.palette.divider}`,
26
+ paddingBottom: i.spacing(3),
27
+ marginBottom: i.spacing(2),
28
+ overflow: "hidden"
29
+ })), g = r("div")(({
30
+ theme: i
31
+ }) => ({
32
+ display: "flex",
33
+ flexDirection: "row",
34
+ flexGrow: 1,
35
+ alignItems: "center",
36
+ cursor: "move",
37
+ ...i.typography.subtitle1,
38
+ color: i.palette.text.primary
39
+ })), u = r("div")(({
40
+ theme: i
41
+ }) => ({
42
+ display: "flex",
43
+ alignItems: "center",
44
+ justifyContent: "center",
45
+ marginRight: i.spacing(1.5)
46
+ })), f = r("div")(() => ({
47
+ flexGrow: 1,
48
+ position: "relative"
49
+ })), m = r("div")(({
50
+ theme: i
51
+ }) => ({
52
+ width: "auto",
53
+ display: "grid",
54
+ gridTemplateColumns: `${i.spacing(2)} auto`,
55
+ gridGap: `${i.spacing(1.5)}`,
56
+ paddingBottom: `${i.spacing(3)}`,
57
+ borderBottom: `1px solid ${i.palette.divider}`,
58
+ marginBottom: `${i.spacing(3)}`
59
+ })), x = (i) => {
60
+ const {
61
+ urlIcon: n,
62
+ title: t
63
+ } = i;
64
+ return s() ? /* @__PURE__ */ a(m, {
65
+ children: [/* @__PURE__ */ o(d, {
66
+ variant: "circular",
67
+ width: 16,
68
+ height: 16
69
+ }), /* @__PURE__ */ o(d, {
70
+ variant: "text",
71
+ width: 68,
72
+ height: 14
73
+ })]
74
+ }) : /* @__PURE__ */ o(p, {
75
+ id: "Header",
76
+ children: /* @__PURE__ */ a(g, {
77
+ className: "draggable-dialog-title",
78
+ children: [/* @__PURE__ */ o(u, {
79
+ children: /* @__PURE__ */ o(l, {
80
+ src: n
81
+ })
82
+ }), t]
83
+ })
84
+ });
85
+ };
86
+ function I(i) {
87
+ const {
88
+ urlIcon: n,
89
+ title: t,
90
+ children: e
91
+ } = i;
92
+ return /* @__PURE__ */ a(c, {
93
+ id: "ContainerPropertyValue",
94
+ children: [/* @__PURE__ */ o(x, {
95
+ urlIcon: n,
96
+ title: t
97
+ }), /* @__PURE__ */ o(f, {
98
+ id: "Content",
99
+ children: e
100
+ })]
101
+ });
102
+ }
103
+ export {
104
+ I as P
105
+ };
@@ -0,0 +1,160 @@
1
+ import { useModuleDictionary as Y, useModuleSkeleton as R, useEnvironment as T } from "@m4l/core";
2
+ import { styled as a, Skeleton as d, Autocomplete as $, TextField as x } from "@mui/material";
3
+ import { useMemo as D } from "react";
4
+ import { I as v } from "../Icon/index.cbca79b0.js";
5
+ import { jsxs as u, jsx as n } from "react/jsx-runtime";
6
+ import { g as O } from "../CommonActions/components/Actions/index.e8148d98.js";
7
+ import "@mui/material/Button";
8
+ import "../mui_extended/Button/index.84d8898c.js";
9
+ import "react-hook-form";
10
+ import "react-router-dom";
11
+ import "../../contexts/ModalContext/index.2188b69e.js";
12
+ import "@mui/lab";
13
+ const S = a("div")(({
14
+ theme: t,
15
+ error: s
16
+ }) => ({
17
+ display: "flex",
18
+ width: "100%",
19
+ height: "auto",
20
+ alignItems: "center",
21
+ gap: t.spacing(1),
22
+ border: s ? `1px solid ${t.palette.error.main}` : `1px solid ${t.palette.divider}`,
23
+ padding: t.spacing(0.5, 1),
24
+ borderRadius: "4px",
25
+ "& .MuiAutocomplete-root, & .MuiTextField-root": {
26
+ width: "100%"
27
+ },
28
+ "& .MuiAutocomplete-root .MuiTextField-root": {
29
+ width: "100%"
30
+ },
31
+ "& .MuiTextField-root .MuiInput-input": {
32
+ padding: "5px!important"
33
+ }
34
+ })), p = a("div")(({
35
+ theme: t
36
+ }) => ({
37
+ width: "1px",
38
+ height: "20px",
39
+ backgroundColor: t.palette.divider
40
+ })), P = a("div")(({
41
+ theme: t
42
+ }) => ({
43
+ display: "flex",
44
+ width: "auto",
45
+ height: "37.5px",
46
+ alignItems: "center",
47
+ gap: t.spacing(1),
48
+ border: `1px solid ${t.palette.divider}`,
49
+ padding: t.spacing(0.5, 1),
50
+ borderRadius: "4px"
51
+ })), k = a("div")(({
52
+ theme: t
53
+ }) => ({
54
+ ...t.typography.body2,
55
+ width: "100%",
56
+ display: "flex",
57
+ textOverflow: "elipsis",
58
+ overflow: "hidden",
59
+ padding: "5px",
60
+ textAlign: "left"
61
+ })), w = a("div")(({
62
+ theme: t
63
+ }) => ({
64
+ ...t.typography.body2,
65
+ width: "70px",
66
+ display: "flex",
67
+ textOverflow: "elipsis",
68
+ overflow: "hidden",
69
+ padding: "5px",
70
+ textAlign: "left"
71
+ }));
72
+ var i = /* @__PURE__ */ ((t) => (t[t.YEARS = 0] = "YEARS", t[t.MONTHS = 1] = "MONTHS", t[t.DAYS = 2] = "DAYS", t))(i || {});
73
+ const F = (t) => t ? t.selPeriodTime ? t.selPeriodTime : t.years && t.years > 0 ? i.YEARS : t.months && t.months > 0 ? i.MONTHS : t.days && t.days > 0 ? i.DAYS : i.YEARS : i.YEARS, _ = (t) => t ? t.singleValue !== void 0 ? t.singleValue : t.years && t.years > 0 ? t.years : t.months && t.months > 0 ? t.months : t.days && t.days > 0 ? t.days : "" : "", B = (t) => {
74
+ const {
75
+ value: s,
76
+ onChange: b,
77
+ error: A = !1,
78
+ readOnly: M = !1
79
+ } = t, {
80
+ getLabel: l
81
+ } = Y(), C = R(), c = F(s), g = _(s), f = (e, r) => {
82
+ const o = {
83
+ selPeriodTime: e,
84
+ singleValue: r
85
+ };
86
+ r !== "" && r > 0 && (o.years = 0, o.months = 0, o.days = 0, e === i.YEARS && (o.years = r), e === i.MONTHS && (o.months = r), e === i.DAYS && (o.days = r)), b(o);
87
+ }, I = (e) => {
88
+ e && f(e.id, g);
89
+ }, {
90
+ host_static_assets: h,
91
+ environment_assets: m
92
+ } = T(), y = D(() => [{
93
+ id: 0,
94
+ label: l("period.years")
95
+ }, {
96
+ id: 1,
97
+ label: l("period.months")
98
+ }, {
99
+ id: 2,
100
+ label: l("period.days")
101
+ }], [l]);
102
+ return C ? /* @__PURE__ */ u(P, {
103
+ children: [/* @__PURE__ */ n(d, {
104
+ variant: "rounded",
105
+ width: "100%"
106
+ }), /* @__PURE__ */ n(p, {}), /* @__PURE__ */ n(d, {
107
+ variant: "rounded",
108
+ width: "100%"
109
+ }), /* @__PURE__ */ n(d, {
110
+ variant: "circular",
111
+ width: 20,
112
+ sx: {
113
+ minWidth: "20px",
114
+ minHeight: "20px"
115
+ }
116
+ })]
117
+ }) : (M && (s.selPeriodTime, s.singleValue, v, `${h}${m}`), /* @__PURE__ */ u(S, {
118
+ error: A,
119
+ children: [/* @__PURE__ */ n($, {
120
+ options: y,
121
+ value: y[c],
122
+ disableClearable: !0,
123
+ onChange: (e, r) => {
124
+ I(r);
125
+ },
126
+ renderInput: (e) => /* @__PURE__ */ n(x, {
127
+ ...e,
128
+ fullWidth: !0,
129
+ variant: "standard",
130
+ SelectProps: {
131
+ native: !0
132
+ },
133
+ InputProps: {
134
+ disableUnderline: !0,
135
+ ...e.InputProps
136
+ },
137
+ autoComplete: "off"
138
+ }, `tx_async_${e.id}`)
139
+ }), /* @__PURE__ */ n(p, {}), /* @__PURE__ */ n(x, {
140
+ type: "number",
141
+ variant: "standard",
142
+ value: g,
143
+ InputProps: {
144
+ disableUnderline: !0
145
+ },
146
+ onChange: (e) => {
147
+ f(c, e.target.value === "" ? "" : parseInt(e.target.value));
148
+ }
149
+ }), /* @__PURE__ */ n(v, {
150
+ src: `${h}/${m}/frontend/components/period/assets/icons/clock.svg`
151
+ })]
152
+ }));
153
+ };
154
+ function J() {
155
+ return ["period"].concat(O());
156
+ }
157
+ export {
158
+ B as P,
159
+ J as g
160
+ };