@m4l/components 0.1.13 → 0.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/Logo/index.js +91 -0
- package/commonjs.js +9 -0
- package/components/CommonActions/components/ActionCancel/index.js +15 -0
- package/components/CommonActions/components/ActionFormCancel/index.js +62 -0
- package/components/CommonActions/components/ActionFormIntro/index.js +35 -0
- package/components/CommonActions/components/ActionIntro/index.js +16 -0
- package/components/CommonActions/components/Actions/index.js +859 -0
- package/components/CompanyLogo/{index.f81c179c.js → index.js} +48 -42
- package/components/DataGrid/index.js +1067 -0
- package/components/DynamicFilter/index.js +1573 -0
- package/components/ErrorLabel/index.js +18 -0
- package/components/Icon/index.js +80 -0
- package/components/Image/index.js +128 -0
- package/components/LanguagePopover/index.js +93 -0
- package/components/Loadable/index.js +13 -0
- package/components/ModalDialog/index.js +180 -0
- package/components/NoItemSelected/{index.12f0ca67.js → index.js} +50 -43
- package/components/ObjectLogs/index.js +284 -0
- package/components/Page/index.js +36 -0
- package/components/PaperForm/index.js +110 -0
- package/components/Period/index.js +230 -0
- package/components/PropertyValue/index.js +142 -0
- package/components/Resizeable/{index.45995d2b.js → index.js} +19 -21
- package/components/ScrollBar/index.js +52 -0
- package/components/ScrollToTop/index.js +10 -0
- package/components/SplitLayout/{index.4032673d.js → index.js} +35 -35
- package/components/animate/LoadingScreen/{index.f1cec7db.js → index.js} +27 -29
- package/components/animate/MotionContainer/index.js +31 -0
- package/components/animate/MotionLazyContainer/index.js +13 -0
- package/components/animate/features.js +2 -0
- package/components/animate/variants/{bounce.784aaaaa.js → bounce.js} +16 -15
- package/components/animate/variants/container.js +20 -0
- package/components/animate/variants/fade.js +61 -0
- package/components/animate/variants/{index.7a912140.js → index.js} +0 -0
- package/components/animate/variants/transition.js +16 -0
- package/components/formatters/BooleanFormatter/index.js +52 -0
- package/components/formatters/DateFormatter/index.js +66 -0
- package/components/formatters/index.js +112 -0
- package/components/hook-form/FormProvider/index.js +61 -0
- package/components/hook-form/RHFAutocomplete/index.js +144 -0
- package/components/hook-form/RHFAutocompleteAsync/index.js +191 -0
- package/components/hook-form/RHFCheckbox/index.js +65 -0
- package/components/hook-form/RHFDateTime/index.js +79 -0
- package/components/hook-form/RHFMultiCheckbox/index.js +32 -0
- package/components/hook-form/RHFPeriod/index.js +47 -0
- package/components/hook-form/RHFRadioGroup/index.js +41 -0
- package/components/hook-form/RHFSelect/index.js +34 -0
- package/components/hook-form/RHFTextField/index.js +87 -0
- package/components/hook-form/RHFUpload/index.js +255 -0
- package/components/mui_extended/Accordion/index.js +105 -0
- package/components/mui_extended/Avatar/index.js +33 -0
- package/components/mui_extended/BoxIcon/index.js +20 -0
- package/components/mui_extended/Breadcrumbs/index.js +92 -0
- package/components/mui_extended/Button/index.js +131 -0
- package/components/mui_extended/IconButton/index.js +108 -0
- package/components/mui_extended/LinkWithRoute/index.js +30 -0
- package/components/mui_extended/MenuPopover/index.js +135 -0
- package/components/mui_extended/Pager/index.js +137 -0
- package/components/mui_extended/Tab/index.js +30 -0
- package/components/mui_extended/Typography/index.js +21 -0
- package/contexts/ModalContext/index.js +165 -0
- package/hooks/useFormAddEdit/index.js +42 -0
- package/hooks/useModal/index.js +4 -0
- package/index.js +70 -162
- package/lodash.js +62 -0
- package/node_modules.js +54 -0
- package/package.json +2 -1
- package/react-data-grid.js +2652 -0
- package/react-draggable.js +960 -0
- package/react-json-view.js +2764 -0
- package/react-lazy-load-image-component.js +792 -0
- package/react-resizable.js +541 -0
- package/react-splitter-layout.js +165 -0
- package/utils/index.js +572 -0
- package/assets/Logo/index.228dcb5a.js +0 -86
- package/commonjs.565e6834.js +0 -12
- package/components/CommonActions/components/ActionCancel/index.cba1b460.js +0 -17
- package/components/CommonActions/components/ActionFormCancel/index.be2fe891.js +0 -49
- package/components/CommonActions/components/ActionFormIntro/index.ca4d2674.js +0 -31
- package/components/CommonActions/components/ActionIntro/index.cc4b1e0e.js +0 -18
- package/components/CommonActions/components/Actions/index.e8148d98.js +0 -743
- package/components/DataGrid/index.b688877d.js +0 -894
- package/components/DynamicFilter/index.82ce857e.js +0 -1158
- package/components/ErrorLabel/index.c8615f16.js +0 -19
- package/components/Icon/index.cbca79b0.js +0 -70
- package/components/Image/index.e790b50b.js +0 -122
- package/components/LanguagePopover/index.3d9611cb.js +0 -87
- package/components/Loadable/index.f5518558.js +0 -15
- package/components/ModalDialog/index.3850c053.js +0 -168
- package/components/ObjectLogs/index.27ef875d.js +0 -266
- package/components/Page/index.6d69977e.js +0 -35
- package/components/PaperForm/index.d7c74064.js +0 -105
- package/components/Period/index.5e68286a.js +0 -160
- package/components/PropertyValue/index.ab3dd7e9.js +0 -116
- package/components/ScrollBar/index.39eeb2de.js +0 -49
- package/components/ScrollToTop/index.e06f98f6.js +0 -11
- package/components/animate/MotionContainer/index.8d9f9d80.js +0 -30
- package/components/animate/MotionLazyContainer/index.572dd012.js +0 -15
- package/components/animate/features.0fbf41e1.js +0 -5
- package/components/animate/variants/container.11f82b76.js +0 -20
- package/components/animate/variants/fade.b561c0fc.js +0 -59
- package/components/animate/variants/transition.bd46b9ce.js +0 -15
- package/components/formatters/BooleanFormatter/index.cca53b7f.js +0 -42
- package/components/formatters/DateFormatter/index.ad8d9b8e.js +0 -57
- package/components/formatters/index.55856d65.js +0 -106
- package/components/hook-form/FormProvider/index.257acd9f.js +0 -55
- package/components/hook-form/RHFAutocomplete/index.6ed76d4c.js +0 -122
- package/components/hook-form/RHFAutocompleteAsync/index.8f2c97ea.js +0 -153
- package/components/hook-form/RHFCheckbox/index.f9ce6c39.js +0 -59
- package/components/hook-form/RHFDateTime/index.fc5cbafe.js +0 -68
- package/components/hook-form/RHFMultiCheckbox/index.2680b3b6.js +0 -34
- package/components/hook-form/RHFPeriod/index.23c254e9.js +0 -45
- package/components/hook-form/RHFRadioGroup/index.b3335e13.js +0 -43
- package/components/hook-form/RHFSelect/index.b6ca8bb2.js +0 -36
- package/components/hook-form/RHFTextField/index.4c455f75.js +0 -77
- package/components/hook-form/RHFUpload/index.ed3d739f.js +0 -244
- package/components/mui_extended/Accordion/index.2116e423.js +0 -103
- package/components/mui_extended/Avatar/index.0a2a4523.js +0 -32
- package/components/mui_extended/BoxIcon/index.e638ecc8.js +0 -22
- package/components/mui_extended/Breadcrumbs/index.5e37d903.js +0 -89
- package/components/mui_extended/Button/index.84d8898c.js +0 -110
- package/components/mui_extended/IconButton/index.88f3aadb.js +0 -98
- package/components/mui_extended/LinkWithRoute/index.d4b263de.js +0 -28
- package/components/mui_extended/MenuPopover/index.488fc536.js +0 -131
- package/components/mui_extended/Pager/index.0576814f.js +0 -126
- package/components/mui_extended/Tab/index.e0653a0a.js +0 -28
- package/components/mui_extended/Typography/index.0c4604b3.js +0 -22
- package/contexts/ModalContext/index.2188b69e.js +0 -150
- package/hooks/useFormAddEdit/index.d4845f1a.js +0 -26
- package/hooks/useModal/index.6571d2d9.js +0 -6
- package/lodash.e09401f0.js +0 -32
- package/node_modules.168cb897.js +0 -55
- package/react-data-grid.d46d625e.js +0 -2115
- package/react-draggable.20e95c61.js +0 -714
- package/react-json-view.f56a7f8e.js +0 -2762
- package/react-lazy-load-image-component.45b56650.js +0 -784
- package/react-resizable.5277deaf.js +0 -371
- package/react-splitter-layout.7810ac1b.js +0 -165
- package/utils/index.214d9542.js +0 -435
|
@@ -1,266 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
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,105 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,160 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import { styled as p } from "@mui/material/styles";
|
|
2
|
-
import { Skeleton as g } from "@mui/material";
|
|
3
|
-
import { jsx as n, jsxs as f } from "react/jsx-runtime";
|
|
4
|
-
import { useResponsiveDesktop as c } from "@m4l/graphics";
|
|
5
|
-
import { useModuleSkeleton as h } from "@m4l/core";
|
|
6
|
-
const y = p("div", {
|
|
7
|
-
shouldForwardProp: (r) => r !== "propertyWidth" && r !== "propertyHeight" && r !== "isForm"
|
|
8
|
-
})(({
|
|
9
|
-
propertyWidth: r,
|
|
10
|
-
isForm: i,
|
|
11
|
-
theme: t
|
|
12
|
-
}) => ({
|
|
13
|
-
display: "grid",
|
|
14
|
-
gridTemplateColumns: "1fr",
|
|
15
|
-
alignItems: "flex-start",
|
|
16
|
-
width: "100%",
|
|
17
|
-
padding: `${t.spacing(1)} ${t.spacing(2)}`,
|
|
18
|
-
":hover": {
|
|
19
|
-
backgroundColor: i ? "unset" : t.palette.grid?.rowHover
|
|
20
|
-
},
|
|
21
|
-
borderBottom: i ? "none" : `1px solid ${t.palette.divider}`,
|
|
22
|
-
flexDirection: "column",
|
|
23
|
-
[t.breakpoints.up("sm")]: {
|
|
24
|
-
gridTemplateColumns: r ? `${r}px 1fr` : "150px 1fr",
|
|
25
|
-
gap: t.spacing(2),
|
|
26
|
-
alignItems: "center"
|
|
27
|
-
}
|
|
28
|
-
})), x = p("div", {
|
|
29
|
-
shouldForwardProp: (r) => r !== "propertyWidth" && r !== "propertyHeight" && r !== "isForm"
|
|
30
|
-
})(({
|
|
31
|
-
propertyWidth: r,
|
|
32
|
-
isForm: i,
|
|
33
|
-
theme: t
|
|
34
|
-
}) => ({
|
|
35
|
-
width: "100%",
|
|
36
|
-
minWidth: "100%",
|
|
37
|
-
...t.typography.subtitle2,
|
|
38
|
-
color: t.palette.text.primary,
|
|
39
|
-
height: "100%",
|
|
40
|
-
display: "flex",
|
|
41
|
-
alignItems: "center",
|
|
42
|
-
justifyContent: "flex-start",
|
|
43
|
-
position: "relative",
|
|
44
|
-
[t.breakpoints.up("sm")]: {
|
|
45
|
-
borderRight: i ? "none" : `1px solid ${t.palette.divider}`,
|
|
46
|
-
paddingRight: t.spacing(2),
|
|
47
|
-
textAlign: "right",
|
|
48
|
-
width: r || "150px",
|
|
49
|
-
minWidth: r || "150px",
|
|
50
|
-
justifyContent: "flex-end"
|
|
51
|
-
},
|
|
52
|
-
overflow: "hidden",
|
|
53
|
-
overflowWrap: "break-word"
|
|
54
|
-
})), v = p("div", {
|
|
55
|
-
shouldForwardProp: (r) => r !== "valueWidth" && r !== "valueHeight" && r !== "withGrid"
|
|
56
|
-
})(({
|
|
57
|
-
valueWidth: r,
|
|
58
|
-
valueHeight: i,
|
|
59
|
-
theme: t
|
|
60
|
-
}) => ({
|
|
61
|
-
flexGrow: "1",
|
|
62
|
-
...t.typography.body2,
|
|
63
|
-
color: t.palette.text.secondary,
|
|
64
|
-
position: "relative",
|
|
65
|
-
padding: "1px",
|
|
66
|
-
maxWidth: `${r}%`,
|
|
67
|
-
width: `${r}%`,
|
|
68
|
-
height: i,
|
|
69
|
-
marginTop: t.spacing(1),
|
|
70
|
-
[t.breakpoints.up("sm")]: {
|
|
71
|
-
marginTop: "0px"
|
|
72
|
-
},
|
|
73
|
-
overflow: "hidden",
|
|
74
|
-
overflowWrap: "break-word"
|
|
75
|
-
})), m = p("div")(() => ({
|
|
76
|
-
display: "flex",
|
|
77
|
-
justifyContent: "flex-end"
|
|
78
|
-
}));
|
|
79
|
-
function w() {
|
|
80
|
-
return /* @__PURE__ */ n(m, {
|
|
81
|
-
children: /* @__PURE__ */ n(g, {
|
|
82
|
-
variant: "text",
|
|
83
|
-
width: 68,
|
|
84
|
-
height: 14
|
|
85
|
-
})
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
function C(r) {
|
|
89
|
-
const {
|
|
90
|
-
property: i,
|
|
91
|
-
value: t,
|
|
92
|
-
propertyWidth: a = 200,
|
|
93
|
-
valueHeight: d = "auto",
|
|
94
|
-
valueWidth: e = "100",
|
|
95
|
-
isForm: l
|
|
96
|
-
} = r, o = c(), s = h(), u = (() => e === "75" && o ? "75" : e === "75" && !o ? "100" : e === "50" && o ? "50" : e === "50" && !o ? "100" : e === "25" && o || e === "12.5" && o ? `${e}` : e === "25" && !o ? "50" : e === "12.5" && !o ? "25" : "100")();
|
|
97
|
-
return /* @__PURE__ */ f(y, {
|
|
98
|
-
id: "WrapperPropertyValue",
|
|
99
|
-
isForm: l,
|
|
100
|
-
propertyWidth: a,
|
|
101
|
-
children: [/* @__PURE__ */ n(x, {
|
|
102
|
-
id: "Property",
|
|
103
|
-
isForm: l,
|
|
104
|
-
propertyWidth: a,
|
|
105
|
-
children: s ? /* @__PURE__ */ n(w, {}) : i
|
|
106
|
-
}), /* @__PURE__ */ n(v, {
|
|
107
|
-
id: "Value",
|
|
108
|
-
valueWidth: u,
|
|
109
|
-
valueHeight: d,
|
|
110
|
-
children: t
|
|
111
|
-
})]
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
export {
|
|
115
|
-
C as P
|
|
116
|
-
};
|