@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,743 +0,0 @@
|
|
|
1
|
-
import { jsx as e, jsxs as b, Fragment as W } from "react/jsx-runtime";
|
|
2
|
-
import { styled as p } from "@mui/material/styles";
|
|
3
|
-
import { useEnvironment as k, useModuleDictionary as T } from "@m4l/core";
|
|
4
|
-
import "@mui/material/Button";
|
|
5
|
-
import "../../../mui_extended/Button/index.84d8898c.js";
|
|
6
|
-
import "react-hook-form";
|
|
7
|
-
import "react-router-dom";
|
|
8
|
-
import { IconButton as nt, Tooltip as et, MenuItem as it, Skeleton as S, Checkbox as ot } from "@mui/material";
|
|
9
|
-
import { useState as L, useMemo as w, forwardRef as st, useRef as B, useImperativeHandle as rt, useEffect as at, useCallback as j } from "react";
|
|
10
|
-
import "../../../../contexts/ModalContext/index.2188b69e.js";
|
|
11
|
-
import "@mui/lab";
|
|
12
|
-
import { I as v } from "../../../mui_extended/IconButton/index.88f3aadb.js";
|
|
13
|
-
import { u as I, a as lt, O as ct } from "../../../DataGrid/index.b688877d.js";
|
|
14
|
-
import { P as dt } from "../../../mui_extended/Pager/index.0576814f.js";
|
|
15
|
-
import { D as pt } from "../../../../react-data-grid.d46d625e.js";
|
|
16
|
-
import { u as gt } from "../../../../hooks/useModal/index.6571d2d9.js";
|
|
17
|
-
import { A as ft } from "../ActionCancel/index.cba1b460.js";
|
|
18
|
-
import { A as ut } from "../ActionIntro/index.cc4b1e0e.js";
|
|
19
|
-
import { M as mt } from "../../../mui_extended/MenuPopover/index.488fc536.js";
|
|
20
|
-
import { I as N } from "../../../Icon/index.cbca79b0.js";
|
|
21
|
-
import { useResponsiveDesktop as ht } from "@m4l/graphics";
|
|
22
|
-
const _t = p("div")(({
|
|
23
|
-
theme: t
|
|
24
|
-
}) => ({
|
|
25
|
-
paddingTop: t.spacing(3),
|
|
26
|
-
margin: t.spacing(0, 1.5),
|
|
27
|
-
display: "flex",
|
|
28
|
-
flexDirection: "row",
|
|
29
|
-
justifyContent: "flex-end",
|
|
30
|
-
"& > button": {
|
|
31
|
-
marginLeft: "10px"
|
|
32
|
-
}
|
|
33
|
-
})), on = (t) => {
|
|
34
|
-
const {
|
|
35
|
-
children: n
|
|
36
|
-
} = t;
|
|
37
|
-
return /* @__PURE__ */ e(_t, {
|
|
38
|
-
id: "WrapperStandarActions",
|
|
39
|
-
children: n
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
function sn() {
|
|
43
|
-
return ["common_actions"];
|
|
44
|
-
}
|
|
45
|
-
const rn = {
|
|
46
|
-
common_actions: {
|
|
47
|
-
cancel: "Cancel",
|
|
48
|
-
intro: "Intro",
|
|
49
|
-
confirm_quit_title: "Confirm",
|
|
50
|
-
confirm_quit_msg: "Are your sure exit?"
|
|
51
|
-
}
|
|
52
|
-
}, vt = p(nt)(() => ({})), Ct = p("div")(({
|
|
53
|
-
theme: t
|
|
54
|
-
}) => ({
|
|
55
|
-
height: "22px",
|
|
56
|
-
marginLeft: t.spacing(1.5),
|
|
57
|
-
display: "flex",
|
|
58
|
-
alignItems: "center"
|
|
59
|
-
}));
|
|
60
|
-
function U(t) {
|
|
61
|
-
const {
|
|
62
|
-
menuActions: n,
|
|
63
|
-
objItem: o = {},
|
|
64
|
-
urlIcon: s,
|
|
65
|
-
toolTip: r = "",
|
|
66
|
-
marginTop: g = -1,
|
|
67
|
-
marginBottom: l,
|
|
68
|
-
marginLeft: C,
|
|
69
|
-
marginRight: _,
|
|
70
|
-
width: a = 200,
|
|
71
|
-
arrow: u = "right-top",
|
|
72
|
-
...f
|
|
73
|
-
} = t, {
|
|
74
|
-
host_static_assets: z,
|
|
75
|
-
environment_assets: $
|
|
76
|
-
} = k(), {
|
|
77
|
-
getLabel: x
|
|
78
|
-
} = T(), [y, R] = L(null), D = (m) => {
|
|
79
|
-
R(m.currentTarget);
|
|
80
|
-
}, F = w(() => s || `${z}/${$}/frontend/commons/assets/icons/more_vertical.svg`, [s, z, $]), P = () => {
|
|
81
|
-
R(null);
|
|
82
|
-
}, d = (m) => {
|
|
83
|
-
R(null), m.onClick();
|
|
84
|
-
}, O = w(() => {
|
|
85
|
-
let m;
|
|
86
|
-
return typeof n != "function" ? m = n : m = n(o), m;
|
|
87
|
-
}, [n, o]);
|
|
88
|
-
return /* @__PURE__ */ b(W, {
|
|
89
|
-
children: [/* @__PURE__ */ e(et, {
|
|
90
|
-
title: r,
|
|
91
|
-
children: /* @__PURE__ */ e(vt, {
|
|
92
|
-
id: "WrapperMenuActions",
|
|
93
|
-
size: "small",
|
|
94
|
-
onClick: D,
|
|
95
|
-
children: /* @__PURE__ */ e(N, {
|
|
96
|
-
src: F
|
|
97
|
-
})
|
|
98
|
-
})
|
|
99
|
-
}), /* @__PURE__ */ e(mt, {
|
|
100
|
-
id: "MenuPopover",
|
|
101
|
-
open: Boolean(y),
|
|
102
|
-
anchorEl: y,
|
|
103
|
-
onClose: P,
|
|
104
|
-
arrow: u,
|
|
105
|
-
sx: {
|
|
106
|
-
marginTop: g,
|
|
107
|
-
marginBottom: l,
|
|
108
|
-
marginLeft: C,
|
|
109
|
-
marginRight: _,
|
|
110
|
-
width: a,
|
|
111
|
-
"& .MuiMenuItem-root": {
|
|
112
|
-
px: 1,
|
|
113
|
-
typography: "body2",
|
|
114
|
-
borderRadius: 0.75
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
...f,
|
|
118
|
-
children: y && O.map((m, M) => /* @__PURE__ */ b(it, {
|
|
119
|
-
dense: !0,
|
|
120
|
-
onClick: () => d(m),
|
|
121
|
-
sx: {
|
|
122
|
-
color: m.color ?? "text.main"
|
|
123
|
-
},
|
|
124
|
-
disabled: m.disabled,
|
|
125
|
-
children: [/* @__PURE__ */ e(N, {
|
|
126
|
-
src: m.urlIcon
|
|
127
|
-
}), /* @__PURE__ */ e(Ct, {
|
|
128
|
-
children: x(m.dictionaryField)
|
|
129
|
-
})]
|
|
130
|
-
}, `menu_action_${M}`))
|
|
131
|
-
})]
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
const yt = p("div")(({ theme: t }) => ({
|
|
135
|
-
width: "100%",
|
|
136
|
-
justifyContent: "center",
|
|
137
|
-
display: "flex",
|
|
138
|
-
marginLeft: 0,
|
|
139
|
-
[t.breakpoints.up("sm")]: {
|
|
140
|
-
display: "flex",
|
|
141
|
-
alignItems: "center",
|
|
142
|
-
marginLeft: t.spacing(3)
|
|
143
|
-
}
|
|
144
|
-
}));
|
|
145
|
-
function an(t) {
|
|
146
|
-
const {
|
|
147
|
-
count: n,
|
|
148
|
-
page: o,
|
|
149
|
-
rowsPerPage: s,
|
|
150
|
-
onPageChange: r
|
|
151
|
-
} = t, {
|
|
152
|
-
host_static_assets: g,
|
|
153
|
-
environment_assets: l
|
|
154
|
-
} = k(), C = (f) => {
|
|
155
|
-
r(f, 0);
|
|
156
|
-
}, _ = (f) => {
|
|
157
|
-
r(f, o - 1);
|
|
158
|
-
}, a = (f) => {
|
|
159
|
-
r(f, o + 1);
|
|
160
|
-
}, u = (f) => {
|
|
161
|
-
r(f, Math.max(0, Math.ceil(n / s) - 1));
|
|
162
|
-
};
|
|
163
|
-
return /* @__PURE__ */ b(yt, {
|
|
164
|
-
id: "WrapperPagerActions",
|
|
165
|
-
children: [/* @__PURE__ */ e(v, {
|
|
166
|
-
id: "test_bruce",
|
|
167
|
-
dictionaryTooltip: "pager.first",
|
|
168
|
-
onClick: C,
|
|
169
|
-
disabled: o === 0,
|
|
170
|
-
"aria-label": "first page",
|
|
171
|
-
src: `${g}/${l}/frontend/components/pager/assets/icons/first.svg`
|
|
172
|
-
}), /* @__PURE__ */ e(v, {
|
|
173
|
-
dictionaryTooltip: "pager.previous",
|
|
174
|
-
onClick: _,
|
|
175
|
-
disabled: o === 0,
|
|
176
|
-
"aria-label": "first page",
|
|
177
|
-
src: `${g}/${l}/frontend/components/pager/assets/icons/previous.svg`
|
|
178
|
-
}), /* @__PURE__ */ e(v, {
|
|
179
|
-
dictionaryTooltip: "pager.next",
|
|
180
|
-
onClick: a,
|
|
181
|
-
disabled: o >= Math.ceil(n / s) - 1,
|
|
182
|
-
"aria-label": "next page",
|
|
183
|
-
src: `${g}/${l}/frontend/components/pager/assets/icons/next.svg`
|
|
184
|
-
}), /* @__PURE__ */ e(v, {
|
|
185
|
-
dictionaryTooltip: "pager.last",
|
|
186
|
-
onClick: u,
|
|
187
|
-
disabled: o >= Math.ceil(n / s) - 1,
|
|
188
|
-
"aria-label": "last page",
|
|
189
|
-
src: `${g}/${l}/frontend/components/pager/assets/icons/last.svg`
|
|
190
|
-
})]
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
const xt = "actions-row";
|
|
194
|
-
function bt(t) {
|
|
195
|
-
const {
|
|
196
|
-
rowActionsGetter: n
|
|
197
|
-
} = I();
|
|
198
|
-
return n === void 0 ? /* @__PURE__ */ e(W, {}) : /* @__PURE__ */ e(U, {
|
|
199
|
-
arrow: "top-left",
|
|
200
|
-
objItem: t.row,
|
|
201
|
-
menuActions: n,
|
|
202
|
-
marginTop: 1,
|
|
203
|
-
marginLeft: "-11px",
|
|
204
|
-
anchorOrigin: {
|
|
205
|
-
vertical: "bottom",
|
|
206
|
-
horizontal: "left"
|
|
207
|
-
},
|
|
208
|
-
transformOrigin: {
|
|
209
|
-
vertical: "top",
|
|
210
|
-
horizontal: "left"
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
const ln = {
|
|
215
|
-
key: xt,
|
|
216
|
-
name: "Actions",
|
|
217
|
-
width: 60,
|
|
218
|
-
withFilter: !1,
|
|
219
|
-
resizable: !0,
|
|
220
|
-
sortable: !1,
|
|
221
|
-
frozen: !0,
|
|
222
|
-
type: "custom",
|
|
223
|
-
formatter: bt
|
|
224
|
-
}, wt = p("div")(({
|
|
225
|
-
theme: t
|
|
226
|
-
}) => ({
|
|
227
|
-
display: "flex",
|
|
228
|
-
justifyContent: "center",
|
|
229
|
-
alignItems: "center",
|
|
230
|
-
minWidth: t.spacing(3.75),
|
|
231
|
-
height: t.spacing(3.75)
|
|
232
|
-
}));
|
|
233
|
-
function kt() {
|
|
234
|
-
const {
|
|
235
|
-
isSkeleton: t
|
|
236
|
-
} = I(), {
|
|
237
|
-
activeFilters: n,
|
|
238
|
-
setActiveFilters: o
|
|
239
|
-
} = lt(), {
|
|
240
|
-
host_static_assets: s,
|
|
241
|
-
environment_assets: r
|
|
242
|
-
} = k(), g = () => {
|
|
243
|
-
o(!n);
|
|
244
|
-
};
|
|
245
|
-
return t ? /* @__PURE__ */ e(wt, {
|
|
246
|
-
children: /* @__PURE__ */ e(S, {
|
|
247
|
-
variant: "circular",
|
|
248
|
-
width: 20,
|
|
249
|
-
height: 20
|
|
250
|
-
})
|
|
251
|
-
}) : /* @__PURE__ */ e(v, {
|
|
252
|
-
dictionaryTooltip: n ? "data_grid.tooltip_filter_hide" : "data_grid.tooltip_filter_show",
|
|
253
|
-
onClick: g,
|
|
254
|
-
"aria-label": "filter",
|
|
255
|
-
src: `${s}/${r}/frontend/components/data_grid/assets/icons/filter.svg`
|
|
256
|
-
});
|
|
257
|
-
}
|
|
258
|
-
const It = p("div")(({ theme: t }) => ({
|
|
259
|
-
color: t.palette.text.primary,
|
|
260
|
-
position: "relative",
|
|
261
|
-
display: "flex",
|
|
262
|
-
flexDirection: "column",
|
|
263
|
-
height: "100%",
|
|
264
|
-
width: "100%"
|
|
265
|
-
}));
|
|
266
|
-
p("div")(({ theme: t }) => ({
|
|
267
|
-
color: t.palette.text.primary,
|
|
268
|
-
fontSize: t.typography.h4.fontSize
|
|
269
|
-
}));
|
|
270
|
-
const $t = p("div")(({ theme: t }) => ({
|
|
271
|
-
...t.typography.subtitle2,
|
|
272
|
-
color: t.palette.text.primary,
|
|
273
|
-
padding: `${t.spacing(3)} ${t.spacing(1)}`
|
|
274
|
-
})), Rt = p("div")(() => ({
|
|
275
|
-
position: "relative",
|
|
276
|
-
display: "flex",
|
|
277
|
-
flexDirection: "column",
|
|
278
|
-
flexGrow: 1
|
|
279
|
-
}));
|
|
280
|
-
p("div")(() => ({
|
|
281
|
-
display: "flex",
|
|
282
|
-
flexDirection: "row"
|
|
283
|
-
}));
|
|
284
|
-
const At = p("div")(({ theme: t }) => ({
|
|
285
|
-
paddingTop: t.spacing(3),
|
|
286
|
-
display: "flex",
|
|
287
|
-
flexDirection: "row"
|
|
288
|
-
}));
|
|
289
|
-
p("div")(({ theme: t }) => ({
|
|
290
|
-
paddingTop: t.spacing(3),
|
|
291
|
-
display: "flex",
|
|
292
|
-
flexDirection: "row",
|
|
293
|
-
justifyContent: "flex-end",
|
|
294
|
-
"& > button": {
|
|
295
|
-
marginLeft: "10px"
|
|
296
|
-
}
|
|
297
|
-
}));
|
|
298
|
-
function H({
|
|
299
|
-
row: t,
|
|
300
|
-
onRowChange: n,
|
|
301
|
-
column: o
|
|
302
|
-
}) {
|
|
303
|
-
const s = () => {
|
|
304
|
-
const r = {
|
|
305
|
-
...t
|
|
306
|
-
};
|
|
307
|
-
r[o.key] = !t[o.key], n(r);
|
|
308
|
-
};
|
|
309
|
-
return /* @__PURE__ */ e(ot, {
|
|
310
|
-
size: "small",
|
|
311
|
-
checked: t[o.key],
|
|
312
|
-
onChange: s
|
|
313
|
-
});
|
|
314
|
-
}
|
|
315
|
-
function K(t) {
|
|
316
|
-
return t.filter((n) => !n.hidden).map((n) => ({
|
|
317
|
-
key: n.key,
|
|
318
|
-
name: n.name,
|
|
319
|
-
visible: n.visible === void 0 ? !0 : n.visible,
|
|
320
|
-
frozen: n.frozen === void 0 ? !1 : n.frozen,
|
|
321
|
-
originalIndex: n.orginalIndex,
|
|
322
|
-
originalFrozen: n.originalFrozen,
|
|
323
|
-
originalVisible: n.originalVisible
|
|
324
|
-
}));
|
|
325
|
-
}
|
|
326
|
-
const Q = st((t, n) => {
|
|
327
|
-
const o = B(null), {
|
|
328
|
-
onCloseSettings: s,
|
|
329
|
-
columnsConfig: r,
|
|
330
|
-
onChangeColumnsConfig: g
|
|
331
|
-
} = t, {
|
|
332
|
-
getLabel: l
|
|
333
|
-
} = T(), [C, _] = L(!0), [a, u] = L(K(r)), [f, z] = L(() => /* @__PURE__ */ new Set()), $ = B(null), {
|
|
334
|
-
host_static_assets: x,
|
|
335
|
-
environment_assets: y
|
|
336
|
-
} = k();
|
|
337
|
-
rt(n, () => ({
|
|
338
|
-
onClickIntro: J,
|
|
339
|
-
current: $.current
|
|
340
|
-
}));
|
|
341
|
-
const R = w(() => [{
|
|
342
|
-
key: "name",
|
|
343
|
-
name: l("data_grid.settings_column_name"),
|
|
344
|
-
width: 200,
|
|
345
|
-
resizable: !0,
|
|
346
|
-
type: "string"
|
|
347
|
-
}, {
|
|
348
|
-
key: "originalIndex",
|
|
349
|
-
name: l("data_grid.settings_column_position"),
|
|
350
|
-
width: 50,
|
|
351
|
-
type: "number",
|
|
352
|
-
cellClass: "rdg-cell-align-center"
|
|
353
|
-
}, {
|
|
354
|
-
key: "visible",
|
|
355
|
-
name: l("data_grid.settings_column_visible"),
|
|
356
|
-
width: 80,
|
|
357
|
-
type: "boolean",
|
|
358
|
-
formatter: H,
|
|
359
|
-
cellClass: "rdg-cell-align-center"
|
|
360
|
-
}, {
|
|
361
|
-
key: "frozen",
|
|
362
|
-
name: l("data_grid.settings_column_frozen"),
|
|
363
|
-
width: 80,
|
|
364
|
-
type: "boolean",
|
|
365
|
-
formatter: H,
|
|
366
|
-
cellClass: "rdg-cell-align-center"
|
|
367
|
-
}], [l]), D = () => {
|
|
368
|
-
u(a.map((i) => ({
|
|
369
|
-
...i,
|
|
370
|
-
visible: !0
|
|
371
|
-
})));
|
|
372
|
-
}, F = () => {
|
|
373
|
-
u(a.map((i) => ({
|
|
374
|
-
...i,
|
|
375
|
-
visible: !1
|
|
376
|
-
})));
|
|
377
|
-
}, P = () => {
|
|
378
|
-
u(a.map((i) => ({
|
|
379
|
-
...i,
|
|
380
|
-
visible: i.originalVisible,
|
|
381
|
-
frozen: i.originalFrozen,
|
|
382
|
-
index: i.originalIndex
|
|
383
|
-
})).sort((i, c) => i.index - c.index));
|
|
384
|
-
};
|
|
385
|
-
at(() => {
|
|
386
|
-
C === !1 && u(K(r)), _(!1);
|
|
387
|
-
}, [r]);
|
|
388
|
-
const d = w(() => {
|
|
389
|
-
let i = -1;
|
|
390
|
-
if (f.size !== 1)
|
|
391
|
-
return i;
|
|
392
|
-
const h = f.entries().next().value[1];
|
|
393
|
-
return i = a.findIndex((A) => A.key === h), i;
|
|
394
|
-
}, [a, f]), O = () => {
|
|
395
|
-
if (d === -1)
|
|
396
|
-
return -1;
|
|
397
|
-
const i = [...a];
|
|
398
|
-
i.splice(d, 1), i.splice(0, 0, a[d]), o.current?.selectCell({
|
|
399
|
-
idx: 0,
|
|
400
|
-
rowIdx: 0
|
|
401
|
-
}), u(i);
|
|
402
|
-
}, m = () => {
|
|
403
|
-
if (d === -1)
|
|
404
|
-
return -1;
|
|
405
|
-
const i = [...a];
|
|
406
|
-
i.splice(d, 1), i.splice(i.length, 0, a[d]), o.current?.selectCell({
|
|
407
|
-
idx: 0,
|
|
408
|
-
rowIdx: i.length - 1
|
|
409
|
-
}), u(i);
|
|
410
|
-
}, M = (i) => {
|
|
411
|
-
if (d === -1)
|
|
412
|
-
return -1;
|
|
413
|
-
const c = [...a], h = c[d];
|
|
414
|
-
c.splice(d, 1), c.splice(d + i, 0, h), o.current?.selectCell({
|
|
415
|
-
idx: 0,
|
|
416
|
-
rowIdx: d + i
|
|
417
|
-
}), u(c);
|
|
418
|
-
}, Y = (i) => {
|
|
419
|
-
const c = a.findIndex((h) => h.key === i);
|
|
420
|
-
if (c > -1)
|
|
421
|
-
return {
|
|
422
|
-
visible: a[c].visible,
|
|
423
|
-
frozen: a[c].frozen
|
|
424
|
-
};
|
|
425
|
-
}, G = (i) => {
|
|
426
|
-
const c = a.findIndex((h) => h.key === i.key);
|
|
427
|
-
return c > -1 ? c : r.findIndex((h) => h.key === i.key);
|
|
428
|
-
}, J = () => {
|
|
429
|
-
const i = r.map((c) => {
|
|
430
|
-
const h = {
|
|
431
|
-
...c
|
|
432
|
-
};
|
|
433
|
-
if (!c.hidden) {
|
|
434
|
-
const A = Y(c.key);
|
|
435
|
-
A && (h.visible = A.visible, h.frozen = A.frozen);
|
|
436
|
-
}
|
|
437
|
-
return h;
|
|
438
|
-
}).sort((c, h) => G(c) - G(h));
|
|
439
|
-
g(i), s();
|
|
440
|
-
}, X = () => {
|
|
441
|
-
}, Z = (i) => {
|
|
442
|
-
u(i);
|
|
443
|
-
}, tt = (i) => {
|
|
444
|
-
if (f.has(i.key))
|
|
445
|
-
return;
|
|
446
|
-
const c = /* @__PURE__ */ new Set([i.key]);
|
|
447
|
-
z(c);
|
|
448
|
-
};
|
|
449
|
-
return /* @__PURE__ */ b(It, {
|
|
450
|
-
id: "WrapperColumnsConfig",
|
|
451
|
-
ref: $,
|
|
452
|
-
children: [/* @__PURE__ */ e($t, {
|
|
453
|
-
id: "divInfo",
|
|
454
|
-
children: l("data_grid.settings_sel_columns")
|
|
455
|
-
}), /* @__PURE__ */ e(Rt, {
|
|
456
|
-
id: "WrapperDataGrid",
|
|
457
|
-
children: /* @__PURE__ */ e(ct, {
|
|
458
|
-
id: "Originaldata_gridWrapperStyled",
|
|
459
|
-
children: /* @__PURE__ */ e(pt, {
|
|
460
|
-
className: "fill-data_grid rdg-light",
|
|
461
|
-
ref: o,
|
|
462
|
-
columns: R,
|
|
463
|
-
rows: a,
|
|
464
|
-
onRowsChange: Z,
|
|
465
|
-
selectedRows: f,
|
|
466
|
-
onSelectedRowsChange: X,
|
|
467
|
-
onRowClick: tt,
|
|
468
|
-
rowKeyGetter: (i) => i.key,
|
|
469
|
-
cellNavigationMode: "CHANGE_ROW",
|
|
470
|
-
defaultColumnOptions: {
|
|
471
|
-
resizable: !0,
|
|
472
|
-
sortable: !0
|
|
473
|
-
}
|
|
474
|
-
})
|
|
475
|
-
})
|
|
476
|
-
}), /* @__PURE__ */ b(At, {
|
|
477
|
-
children: [/* @__PURE__ */ e(v, {
|
|
478
|
-
dictionaryTooltip: "data_grid.settings_move_first",
|
|
479
|
-
onClick: O,
|
|
480
|
-
"aria-label": "move first place",
|
|
481
|
-
disabled: d < 1,
|
|
482
|
-
src: `${x}/${y}/frontend/components/data_grid/assets/icons/move_first_place.svg`
|
|
483
|
-
}), /* @__PURE__ */ e(v, {
|
|
484
|
-
dictionaryTooltip: "data_grid.settings_move_up",
|
|
485
|
-
onClick: () => M(-1),
|
|
486
|
-
"aria-label": "move up place",
|
|
487
|
-
disabled: d < 1,
|
|
488
|
-
src: `${x}/${y}/frontend/components/data_grid/assets/icons/move_up_place.svg`
|
|
489
|
-
}), /* @__PURE__ */ e(v, {
|
|
490
|
-
dictionaryTooltip: "data_grid.settings_move_last",
|
|
491
|
-
onClick: m,
|
|
492
|
-
"aria-label": "move last place",
|
|
493
|
-
disabled: d === a.length - 1 || d === -1,
|
|
494
|
-
src: `${x}/${y}/frontend/components/data_grid/assets/icons/move_last_place.svg`
|
|
495
|
-
}), /* @__PURE__ */ e(v, {
|
|
496
|
-
dictionaryTooltip: "data_grid.settings_move_down",
|
|
497
|
-
onClick: () => M(1),
|
|
498
|
-
"aria-label": "move down place",
|
|
499
|
-
disabled: d === a.length - 1 || d === -1,
|
|
500
|
-
src: `${x}/${y}/frontend/components/data_grid/assets/icons/move_down_place.svg`
|
|
501
|
-
}), /* @__PURE__ */ e(v, {
|
|
502
|
-
dictionaryTooltip: "data_grid.settings_visible_all",
|
|
503
|
-
onClick: D,
|
|
504
|
-
"aria-label": "check visible all",
|
|
505
|
-
src: `${x}/${y}/frontend/components/data_grid/assets/icons/check_all.svg`
|
|
506
|
-
}), /* @__PURE__ */ e(v, {
|
|
507
|
-
dictionaryTooltip: "data_grid.settings_no_visible_all",
|
|
508
|
-
onClick: F,
|
|
509
|
-
"aria-label": "un check all",
|
|
510
|
-
src: `${x}/${y}/frontend/components/data_grid/assets/icons/uncheck_all.svg`
|
|
511
|
-
}), /* @__PURE__ */ e(v, {
|
|
512
|
-
dictionaryTooltip: "data_grid.settings_restore",
|
|
513
|
-
onClick: P,
|
|
514
|
-
"aria-label": "Restore columns",
|
|
515
|
-
src: `${x}/${y}/frontend/components/data_grid/assets/icons/restore_columns.svg`
|
|
516
|
-
})]
|
|
517
|
-
})]
|
|
518
|
-
});
|
|
519
|
-
});
|
|
520
|
-
Q.displayName = "ColumnsConfig";
|
|
521
|
-
const St = p("div")(({ theme: t }) => ({
|
|
522
|
-
display: "flex",
|
|
523
|
-
justifyContent: "center",
|
|
524
|
-
alignItems: "center",
|
|
525
|
-
minWidth: t.spacing(3.75),
|
|
526
|
-
height: t.spacing(3.75)
|
|
527
|
-
}));
|
|
528
|
-
function Tt() {
|
|
529
|
-
const {
|
|
530
|
-
openModal: t,
|
|
531
|
-
closeModal: n
|
|
532
|
-
} = gt(), {
|
|
533
|
-
columnsConfig: o,
|
|
534
|
-
onChangeColumnsConfig: s,
|
|
535
|
-
isSkeleton: r
|
|
536
|
-
} = I(), {
|
|
537
|
-
getLabel: g
|
|
538
|
-
} = T(), {
|
|
539
|
-
host_static_assets: l,
|
|
540
|
-
environment_assets: C
|
|
541
|
-
} = k(), _ = B(null), a = j(() => {
|
|
542
|
-
n();
|
|
543
|
-
}, [n]), u = j(() => {
|
|
544
|
-
_.current?.onClickIntro && _.current?.onClickIntro();
|
|
545
|
-
}, []), f = j(() => {
|
|
546
|
-
t({
|
|
547
|
-
onQueryClose: () => n(),
|
|
548
|
-
title: g("data_grid.settings_title"),
|
|
549
|
-
initialWidth: 500,
|
|
550
|
-
initialHeigth: 680,
|
|
551
|
-
contentComponent: /* @__PURE__ */ e(Q, {
|
|
552
|
-
ref: _,
|
|
553
|
-
columnsConfig: o,
|
|
554
|
-
onChangeColumnsConfig: s,
|
|
555
|
-
onCloseSettings: a
|
|
556
|
-
}),
|
|
557
|
-
actions: /* @__PURE__ */ b(W, {
|
|
558
|
-
children: [/* @__PURE__ */ e(ft, {
|
|
559
|
-
onClick: n
|
|
560
|
-
}), /* @__PURE__ */ e(ut, {
|
|
561
|
-
onClick: u
|
|
562
|
-
})]
|
|
563
|
-
})
|
|
564
|
-
});
|
|
565
|
-
}, [n, o, g, s, a, t, u]);
|
|
566
|
-
return r ? /* @__PURE__ */ e(St, {
|
|
567
|
-
children: /* @__PURE__ */ e(S, {
|
|
568
|
-
variant: "circular",
|
|
569
|
-
width: 20,
|
|
570
|
-
height: 20
|
|
571
|
-
})
|
|
572
|
-
}) : /* @__PURE__ */ e(v, {
|
|
573
|
-
dictionaryTooltip: "data_grid.tooltip_settings",
|
|
574
|
-
onClick: f,
|
|
575
|
-
"aria-label": "settings",
|
|
576
|
-
src: `${l}/${C}/frontend/components/data_grid/assets/icons/configuration.svg`
|
|
577
|
-
});
|
|
578
|
-
}
|
|
579
|
-
const V = p("div")(() => ({
|
|
580
|
-
display: "flex",
|
|
581
|
-
alignItems: "center"
|
|
582
|
-
})), E = p("span")(() => ({})), q = p("span")(({ theme: t }) => ({
|
|
583
|
-
marginLeft: t.spacing(2),
|
|
584
|
-
paddingTop: "2px",
|
|
585
|
-
paddingBottom: "2px",
|
|
586
|
-
paddingLeft: "4px",
|
|
587
|
-
paddingRight: "4px",
|
|
588
|
-
border: `1px solid ${t.palette.divider}`
|
|
589
|
-
}));
|
|
590
|
-
function zt() {
|
|
591
|
-
const {
|
|
592
|
-
rowsCount: t,
|
|
593
|
-
isSkeleton: n
|
|
594
|
-
} = I(), {
|
|
595
|
-
getLabel: o
|
|
596
|
-
} = T();
|
|
597
|
-
return n ? /* @__PURE__ */ b(V, {
|
|
598
|
-
children: [/* @__PURE__ */ e(E, {
|
|
599
|
-
children: /* @__PURE__ */ e(S, {
|
|
600
|
-
variant: "text",
|
|
601
|
-
width: "40px",
|
|
602
|
-
height: "16px"
|
|
603
|
-
})
|
|
604
|
-
}), /* @__PURE__ */ e(q, {
|
|
605
|
-
children: /* @__PURE__ */ e(S, {
|
|
606
|
-
variant: "text",
|
|
607
|
-
width: "20px",
|
|
608
|
-
height: "16px"
|
|
609
|
-
})
|
|
610
|
-
})]
|
|
611
|
-
}) : /* @__PURE__ */ b(V, {
|
|
612
|
-
className: "rows-count",
|
|
613
|
-
id: "RowsCount",
|
|
614
|
-
children: [/* @__PURE__ */ e(E, {
|
|
615
|
-
children: o("data_grid.rows")
|
|
616
|
-
}), /* @__PURE__ */ e(q, {
|
|
617
|
-
children: t
|
|
618
|
-
})]
|
|
619
|
-
});
|
|
620
|
-
}
|
|
621
|
-
const Mt = p("div")(({ theme: t }) => ({
|
|
622
|
-
marginLeft: 0,
|
|
623
|
-
[t.breakpoints.up("sm")]: {
|
|
624
|
-
marginLeft: t.spacing(3)
|
|
625
|
-
}
|
|
626
|
-
})), Lt = p("div")(({ theme: t }) => ({
|
|
627
|
-
display: "flex",
|
|
628
|
-
justifyContent: "center",
|
|
629
|
-
alignItems: "center",
|
|
630
|
-
minWidth: t.spacing(3.75),
|
|
631
|
-
height: t.spacing(3.75)
|
|
632
|
-
}));
|
|
633
|
-
function Wt() {
|
|
634
|
-
const {
|
|
635
|
-
host_static_assets: t,
|
|
636
|
-
environment_assets: n
|
|
637
|
-
} = k(), {
|
|
638
|
-
rowHeights: o,
|
|
639
|
-
currentRowHeightVariant: s,
|
|
640
|
-
setRowHeightVariant: r,
|
|
641
|
-
isSkeleton: g
|
|
642
|
-
} = I(), {
|
|
643
|
-
getLabel: l
|
|
644
|
-
} = T(), C = w(() => typeof o == "number" ? [] : [{
|
|
645
|
-
urlIcon: `${t}/${n}/frontend/components/data_grid/assets/icons/compact.svg`,
|
|
646
|
-
onClick: () => r("compact"),
|
|
647
|
-
disabled: s === "compact",
|
|
648
|
-
dictionaryField: "data_grid.density_compact"
|
|
649
|
-
}, {
|
|
650
|
-
urlIcon: `${t}/${n}/frontend/components/data_grid/assets/icons/standard.svg`,
|
|
651
|
-
onClick: () => r("standard"),
|
|
652
|
-
disabled: s === "standard",
|
|
653
|
-
dictionaryField: "data_grid.density_standard"
|
|
654
|
-
}, {
|
|
655
|
-
urlIcon: `${t}/${n}/frontend/components/data_grid/assets/icons/confortable.svg`,
|
|
656
|
-
onClick: () => r("confortable"),
|
|
657
|
-
disabled: s === "confortable",
|
|
658
|
-
dictionaryField: "data_grid.density_confortable"
|
|
659
|
-
}], [o, s, r, t, n]), _ = w(() => s === "compact" ? `${t}/${n}/frontend/components/data_grid/assets/icons/compact.svg` : s === "standard" ? `${t}/${n}/frontend/components/data_grid/assets/icons/standard.svg` : `${t}/${n}/frontend/components/data_grid/assets/icons/confortable.svg`, [s, t, n]);
|
|
660
|
-
return C.length === 0 ? /* @__PURE__ */ e(W, {}) : g ? /* @__PURE__ */ e(Lt, {
|
|
661
|
-
children: /* @__PURE__ */ e(S, {
|
|
662
|
-
variant: "circular",
|
|
663
|
-
width: "20px",
|
|
664
|
-
height: "20px"
|
|
665
|
-
})
|
|
666
|
-
}) : /* @__PURE__ */ e(Mt, {
|
|
667
|
-
id: "WrapperDensity",
|
|
668
|
-
children: /* @__PURE__ */ e(U, {
|
|
669
|
-
arrow: "right-top",
|
|
670
|
-
anchorOrigin: {
|
|
671
|
-
vertical: "top",
|
|
672
|
-
horizontal: "left"
|
|
673
|
-
},
|
|
674
|
-
transformOrigin: {
|
|
675
|
-
vertical: "top",
|
|
676
|
-
horizontal: "right"
|
|
677
|
-
},
|
|
678
|
-
menuActions: C,
|
|
679
|
-
urlIcon: _,
|
|
680
|
-
toolTip: l("data_grid.tooltip_density")
|
|
681
|
-
})
|
|
682
|
-
});
|
|
683
|
-
}
|
|
684
|
-
const Dt = p("div")(({ theme: t }) => ({
|
|
685
|
-
...t.typography.caption,
|
|
686
|
-
position: "absolute",
|
|
687
|
-
left: "0px",
|
|
688
|
-
right: "0px",
|
|
689
|
-
top: "0px",
|
|
690
|
-
height: t.spacing(5.5),
|
|
691
|
-
padding: 0,
|
|
692
|
-
display: "flex",
|
|
693
|
-
flexDirection: "row",
|
|
694
|
-
alignItems: "center",
|
|
695
|
-
justifyContent: "flex-end",
|
|
696
|
-
[t.breakpoints.up("sm")]: {
|
|
697
|
-
padding: t.spacing(0, 1.5)
|
|
698
|
-
},
|
|
699
|
-
"&.with-no-pager .rows-count": {
|
|
700
|
-
flexGrow: 1
|
|
701
|
-
},
|
|
702
|
-
"& .MuiTablePagination-root": {
|
|
703
|
-
flexGrow: 1,
|
|
704
|
-
display: "flex",
|
|
705
|
-
justifyContent: "center",
|
|
706
|
-
overflow: "hidden"
|
|
707
|
-
}
|
|
708
|
-
}));
|
|
709
|
-
function cn(t) {
|
|
710
|
-
const n = ht(), {
|
|
711
|
-
rowHeights: o,
|
|
712
|
-
isSkeleton: s
|
|
713
|
-
} = I(), {
|
|
714
|
-
withRowsCount: r = !0,
|
|
715
|
-
withPager: g = !0,
|
|
716
|
-
pagerOptions: l,
|
|
717
|
-
withSettings: C = !0,
|
|
718
|
-
settingsProps: _,
|
|
719
|
-
withLocalFilters: a
|
|
720
|
-
} = t;
|
|
721
|
-
return /* @__PURE__ */ b(Dt, {
|
|
722
|
-
id: "WrapperActions",
|
|
723
|
-
className: g && l ? "with-pager" : "with-no-pager",
|
|
724
|
-
children: [r && n && /* @__PURE__ */ e(zt, {}), g && l && /* @__PURE__ */ e(dt, {
|
|
725
|
-
...l,
|
|
726
|
-
totalRecords: l.totalRecords,
|
|
727
|
-
isSkeleton: s,
|
|
728
|
-
isDesktop: n
|
|
729
|
-
}), typeof o != "number" && /* @__PURE__ */ e(Wt, {}), a && /* @__PURE__ */ e(kt, {}), C && /* @__PURE__ */ e(Tt, {
|
|
730
|
-
..._
|
|
731
|
-
})]
|
|
732
|
-
});
|
|
733
|
-
}
|
|
734
|
-
export {
|
|
735
|
-
ln as A,
|
|
736
|
-
Ct as L,
|
|
737
|
-
U as M,
|
|
738
|
-
an as P,
|
|
739
|
-
cn as a,
|
|
740
|
-
on as b,
|
|
741
|
-
rn as d,
|
|
742
|
-
sn as g
|
|
743
|
-
};
|