@m4l/components 0.1.26 → 0.1.28

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