@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,1157 +0,0 @@
1
- import { S as Me } from "../ScrollBar/index.39eeb2de.js";
2
- import { styled as h } from "@mui/material/styles";
3
- import { useRef as me, useState as S, useMemo as E, useCallback as _, useEffect as L, createContext as qe, useContext as Ne } from "react";
4
- import { useModuleDictionary as $, useHostTools as z, useEnvironment as j, voidFunction as V, useFlagsPresent as He } from "@m4l/core";
5
- import * as C from "yup";
6
- import { useFormContext as B, useWatch as ge } from "react-hook-form";
7
- import { R } from "../hook-form/RHFAutocomplete/index.5eee9d7c.js";
8
- import "lodash/debounce";
9
- import { jsx as r, jsxs as w, Fragment as A } from "react/jsx-runtime";
10
- import "../hook-form/RHFCheckbox/index.6dcec9e2.js";
11
- import { alpha as Ke, styled as be, Skeleton as Fe, MenuItem as ze, useTheme as Ye, Popper as Ge } from "@mui/material";
12
- import "@mui/x-date-pickers";
13
- import { R as ee } from "../hook-form/RHFDateTime/index.9231a7c7.js";
14
- import { R as Y } from "../hook-form/RHFTextField/index.ba2a8f67.js";
15
- import { I as he } from "../Icon/index.f569765b.js";
16
- import "../hook-form/RHFPeriod/index.979d0898.js";
17
- import "../ErrorLabel/index.c8615f16.js";
18
- import "../Period/index.a112ce37.js";
19
- import { L as Ue, b as Je, g as Qe } from "../CommonActions/components/Actions/index.cd7b2671.js";
20
- import "@mui/material/Button";
21
- import "react-router-dom";
22
- import "../../contexts/ModalContext/index.5388dfd5.js";
23
- import "@mui/lab";
24
- import "lodash/isString";
25
- import "react-dropzone";
26
- import "../Image/index.c9da2d5a.js";
27
- import "../hook-form/RHFUpload/index.6347159a.js";
28
- import { I as G } from "../mui_extended/IconButton/index.4b5ce8b5.js";
29
- import "simplebar/dist/simplebar.min.css";
30
- import { F as te } from "../mui_extended/Button/index.52d18aea.js";
31
- import { P as Xe } from "../mui_extended/Popover/index.4da8587a.js";
32
- import { R as Ze } from "../contexts/RHFormContext/index.33dba822.js";
33
- import { A as et } from "../CommonActions/components/ActionCancel/index.6736b782.js";
34
- import { A as tt } from "../CommonActions/components/ActionIntro/index.4665a611.js";
35
- import { useResponsiveDesktop as rt } from "@m4l/graphics";
36
- const re = h("div")(({
37
- theme: e
38
- }) => ({
39
- width: "100%",
40
- margin: e.spacing(0, 1),
41
- paddingLeft: e.spacing(1),
42
- borderLeft: `1px solid ${e.palette.divider}`
43
- })), nt = h("div")(({
44
- theme: e
45
- }) => ({
46
- width: "100%",
47
- display: "flex",
48
- justifyContent: "flex-start",
49
- alignItems: "center",
50
- height: "auto",
51
- gap: e.spacing(1.5)
52
- })), ye = ["c", "nc"], ve = ["b", "e", "ne", "gt", "gte", "lt", "lte"], Oe = ["e", "ne"], _e = [
53
- "b",
54
- "e",
55
- "ne",
56
- "gt",
57
- "gte",
58
- "lt",
59
- "lte"
60
- ], xe = {
61
- name: "all",
62
- label: "dynamic_filter.all_fields",
63
- urlIcon: "",
64
- type: "string",
65
- multiple: !0,
66
- presence: "optional"
67
- }, ot = h("div")(({
68
- theme: e
69
- }) => ({
70
- display: "flex",
71
- flexDirection: "column",
72
- justifyContent: "center",
73
- alignItems: "center",
74
- width: "100%",
75
- minWidth: e.spacing(3.75),
76
- padding: e.spacing(3, 0),
77
- gap: e.spacing(3)
78
- })), it = h("div")(() => ({
79
- width: "100%"
80
- })), at = (e, t, n) => {
81
- const o = e.defaultOperand1, i = {
82
- id: 0,
83
- n: e.name,
84
- fixed: t,
85
- isSetted: !1,
86
- o: "c",
87
- labelOperator: "",
88
- o1: "",
89
- o2: "",
90
- labelOperands: ""
91
- };
92
- return o !== void 0 && typeof o == "string" && (i.o1 = o), i.labelOperands = i.o1 + "", i.labelOperator = n(`dynamic_filter.operator_${i.o}`), i;
93
- };
94
- function lt() {
95
- const {
96
- popupData: {
97
- filter: e,
98
- field: t
99
- },
100
- setPoupEditValidationSchema: n,
101
- setFnTransformFormValuesIntoValues: o,
102
- getLabelOperator: i
103
- } = T(), {
104
- getLabel: a
105
- } = $(), d = me(null), {
106
- setValue: p
107
- } = B(), [u, s] = S(!1), g = E(() => ye.map((l) => ({
108
- id: l,
109
- label: i(l)
110
- })), [i]), y = _((l) => !e || !t ? void 0 : {
111
- id: e.id,
112
- n: t.name,
113
- fixed: e.fixed,
114
- isSetted: !0,
115
- o: l.valueOperator.id,
116
- labelOperator: l.valueOperator.label,
117
- o1: l.valueOperand1,
118
- labelOperands: l.valueOperand1
119
- }, []);
120
- return L(() => {
121
- u || n({
122
- valueOperator: C.object().nullable().required(a("operator_required")),
123
- valueOperand1: C.string().required(a("operand_required"))
124
- }), o(y), e && t && p("valueOperand1", e.o1, {
125
- shouldTouch: !1,
126
- shouldValidate: !1
127
- }), s(!0);
128
- }, [a, e, t]), L(() => {
129
- d.current?.focus();
130
- }, [u]), /* @__PURE__ */ r(ot, {
131
- children: u && /* @__PURE__ */ w(A, {
132
- children: [/* @__PURE__ */ r(it, {
133
- children: /* @__PURE__ */ r(R, {
134
- name: "valueOperator",
135
- autoComplete: "off",
136
- options: g,
137
- getOptionLabel: (l) => l.label,
138
- isOptionEqualToValue: (l, b) => l.id === b.id,
139
- label: ""
140
- })
141
- }), /* @__PURE__ */ r(Y, {
142
- name: "valueOperand1",
143
- ref: d,
144
- focused: !0
145
- })]
146
- })
147
- });
148
- }
149
- const st = h("div")(({
150
- theme: e
151
- }) => ({
152
- display: "flex",
153
- flexDirection: "column",
154
- justifyContent: "center",
155
- alignItems: "center",
156
- width: "100%",
157
- minWidth: e.spacing(3.75),
158
- height: "100%",
159
- padding: e.spacing(3, 0),
160
- gap: e.spacing(3)
161
- })), ne = h("div")(() => ({
162
- width: "100%"
163
- })), dt = (e, t, n) => {
164
- const o = e.defaultOperand1, i = {
165
- id: 0,
166
- n: e.name,
167
- fixed: t,
168
- isSetted: !0,
169
- o: "e",
170
- labelOperator: "",
171
- o1: !0,
172
- o2: "",
173
- labelOperands: ""
174
- };
175
- return i.labelOperator = n(`dynamic_filter.operator_${i.o}`), o !== void 0 && typeof o == "boolean" && (i.o1 = o), i.labelOperands = n(`dynamic_filter.operand_${i.o1}`), i;
176
- };
177
- function pt() {
178
- const {
179
- setPoupEditValidationSchema: e,
180
- setFnTransformFormValuesIntoValues: t,
181
- getLabelOperator: n
182
- } = T(), {
183
- getLabel: o
184
- } = $(), {
185
- popupData: {
186
- filter: i,
187
- field: a
188
- }
189
- } = T(), {
190
- setValue: d
191
- } = B(), [p, u] = S(!1), s = E(() => Oe.map((l) => ({
192
- id: l,
193
- label: n(l)
194
- })), [n]), g = E(() => [{
195
- value: !0,
196
- label: o("dynamic_filter.operand_true")
197
- }, {
198
- value: !1,
199
- label: o("dynamic_filter.operand_false")
200
- }], [o]), y = _((l) => !i || !a ? void 0 : {
201
- id: i.id,
202
- n: a.name,
203
- fixed: i.fixed,
204
- isSetted: !0,
205
- o: l.valueOperator.id,
206
- labelOperator: l.valueOperator.label,
207
- o1: l.valueOperand1.value,
208
- labelOperands: l.valueOperand1.label
209
- }, []);
210
- return L(() => {
211
- p || e({
212
- valueOperator: C.object().nullable().required(o("error_operator_required")),
213
- valueOperand1: C.object().nullable().required(o("error_operand_required"))
214
- }), t(y), i && a && d("valueOperand1", {
215
- value: i.o1,
216
- label: o(`dynamic_filter.operand_${i.o1}`)
217
- }, {
218
- shouldTouch: !1,
219
- shouldValidate: !1
220
- }), u(!0);
221
- }, [o]), /* @__PURE__ */ r(st, {
222
- id: "WrapperAllFieldsFilter",
223
- children: p && /* @__PURE__ */ w(A, {
224
- children: [/* @__PURE__ */ r(ne, {
225
- children: /* @__PURE__ */ r(R, {
226
- name: "valueOperator",
227
- autoComplete: "off",
228
- options: s,
229
- getOptionLabel: (l) => l.label,
230
- isOptionEqualToValue: (l, b) => l.id === b.id,
231
- label: ""
232
- })
233
- }), /* @__PURE__ */ r(ne, {
234
- children: /* @__PURE__ */ r(R, {
235
- name: "valueOperand1",
236
- autoComplete: "off",
237
- options: g,
238
- getOptionLabel: (l) => l.label,
239
- isOptionEqualToValue: (l, b) => l.value === b.value,
240
- label: ""
241
- })
242
- })]
243
- })
244
- });
245
- }
246
- const ut = h("div")(({
247
- theme: e
248
- }) => ({
249
- display: "flex",
250
- flexDirection: "column",
251
- justifyContent: "center",
252
- alignItems: "center",
253
- width: "100%",
254
- minWidth: e.spacing(3.75),
255
- padding: e.spacing(3, 0),
256
- gap: e.spacing(3)
257
- })), ct = h("div")(() => ({
258
- width: "100%"
259
- }));
260
- function oe(e) {
261
- return e && e instanceof Date;
262
- }
263
- const ft = (e) => !(typeof e.o != "string" || ye.findIndex((t) => t === e.o) === -1 || typeof e.o1 != "string"), mt = (e) => !(typeof e.o != "number" || ve.findIndex((t) => t === e.o) === -1 || typeof e.o1 != "number" || e.o === "b" && typeof e.o2 != "number"), gt = (e) => !(typeof e.o != "string" || Oe.findIndex((t) => t === e.o) === -1 || typeof e.o1 != "boolean"), bt = (e) => !(typeof e.o != "string" || _e.findIndex((t) => t === e.o) === -1 || typeof e.o1 != "string" || e.o === "b" && typeof e.o2 != "string"), Ft = (e, t, n, o) => {
264
- const i = new Date(), a = new Date();
265
- let d = e.defaultOperand1, p = e.defaultOperand2;
266
- const u = {
267
- id: 0,
268
- n: e.name,
269
- fixed: t,
270
- isSetted: !0,
271
- o: "b",
272
- labelOperator: "",
273
- o1: d,
274
- o2: p,
275
- labelOperands: ""
276
- };
277
- return d && (oe(d) ? i.setDate(d.getDate()) : d = void 0), d === void 0 && i.setHours(0, 0, 0, 0), p && (oe(p) ? a.setDate(p.getDate()) : p = void 0), p === void 0 && a.setHours(23, 59, 59, 999), u.o1 = i.toISOString(), u.o2 = a.toISOString(), u.labelOperands = `${o.formatDate(i, "yyyy-MM-dd HH:mm:ss")} - ${o.formatDate(a, "yyyy-MM-dd HH:mm:ss")}`, u.labelOperator = n(`dynamic_filter.operator_${u.o}`), u;
278
- };
279
- function ht() {
280
- const {
281
- setPoupEditValidationSchema: e,
282
- setFnTransformFormValuesIntoValues: t,
283
- getLabelOperator: n
284
- } = T(), {
285
- getLabel: o
286
- } = $(), {
287
- formatDate: i
288
- } = z(), {
289
- dfnsFormat: {
290
- datetime_format: a
291
- }
292
- } = j(), {
293
- popupData: {
294
- filter: d,
295
- field: p
296
- }
297
- } = T(), {
298
- control: u,
299
- setValue: s
300
- } = B(), g = ge({
301
- control: u,
302
- name: "valueOperator"
303
- }), [y, l] = S(!1), b = E(() => _e.map((c) => ({
304
- id: c,
305
- label: n(c)
306
- })), [n]), f = _((c) => {
307
- if (!d || !p)
308
- return;
309
- const x = {
310
- id: d.id,
311
- n: p.name,
312
- fixed: d.fixed,
313
- isSetted: !0,
314
- o: c.valueOperator.id,
315
- o1: c.valueOperand1.toISOString(),
316
- labelOperator: c.valueOperator.label,
317
- labelOperands: ""
318
- };
319
- return c.valueOperator.id === "b" ? (x.o2 = c.valueOperand2.toISOString(), x.labelOperands = `${i(c.valueOperand1, a)} - ${i(c.valueOperand2, a)}`) : (x.o2 = x.o2 ? x.o2 : x.o1, x.labelOperands = i(c.valueOperand1, a)), x;
320
- }, []);
321
- return L(() => {
322
- y || e({
323
- valueOperator: C.object().nullable().required(o("operator_required")),
324
- valueOperand1: C.date().test("valueOperand1", o("dynamic_filter.error_invalid_date"), (c) => Boolean(c)),
325
- valueOperand2: C.date().when(["valueOperator.id"], {
326
- is: "b",
327
- then: C.date().test("DOB", o("dynamic_filter.error_invalid_date"), (c) => Boolean(c))
328
- })
329
- }), d && p && (s("valueOperand1", new Date(d.o1), {
330
- shouldTouch: !1,
331
- shouldValidate: !1
332
- }), s("valueOperand2", new Date(d.o2), {
333
- shouldTouch: !1,
334
- shouldValidate: !1
335
- })), t(f), l(!0);
336
- }, [o, d, p]), /* @__PURE__ */ r(ut, {
337
- children: y && /* @__PURE__ */ w(A, {
338
- children: [/* @__PURE__ */ r(ct, {
339
- children: /* @__PURE__ */ r(R, {
340
- name: "valueOperator",
341
- autoComplete: "off",
342
- options: b,
343
- getOptionLabel: (c) => c.label,
344
- isOptionEqualToValue: (c, x) => c.id === x.id,
345
- label: ""
346
- })
347
- }), /* @__PURE__ */ r(ee, {
348
- name: "valueOperand1",
349
- autoComplete: "off",
350
- label: "",
351
- focused: !0
352
- }), g && g.id === "b" && /* @__PURE__ */ r(ee, {
353
- name: "valueOperand2",
354
- autoComplete: "off",
355
- label: ""
356
- })]
357
- })
358
- });
359
- }
360
- const yt = h("div")(({
361
- theme: e
362
- }) => ({
363
- display: "flex",
364
- flexDirection: "column",
365
- justifyContent: "center",
366
- alignItems: "center",
367
- width: "100%",
368
- minWidth: e.spacing(3.75),
369
- padding: e.spacing(3, 0),
370
- gap: e.spacing(3)
371
- })), vt = h("div")(() => ({
372
- width: "100%"
373
- })), Ot = (e, t, n) => {
374
- const o = e.defaultOperand1, i = e.defaultOperand2, a = {
375
- id: 0,
376
- n: e.name,
377
- fixed: t,
378
- isSetted: !1,
379
- o: "e",
380
- labelOperator: "",
381
- o1: "",
382
- o2: "",
383
- labelOperands: ""
384
- };
385
- return o !== void 0 && typeof o == "number" && (a.o1 = o, a.labelOperands = a.o1), i !== void 0 && typeof i == "number" && (a.o2 = i), a.labelOperator = n(`dynamic_filter.operator_${a.o}`), a;
386
- };
387
- function _t() {
388
- const {
389
- popupData: {
390
- filter: e,
391
- field: t
392
- },
393
- setPoupEditValidationSchema: n,
394
- setFnTransformFormValuesIntoValues: o,
395
- getLabelOperator: i
396
- } = T(), {
397
- getLabel: a
398
- } = $(), d = me(null), {
399
- control: p,
400
- setValue: u
401
- } = B(), [s, g] = S(!1), y = ge({
402
- control: p,
403
- name: "valueOperator"
404
- }), l = E(() => ve.map((f) => ({
405
- id: f,
406
- label: i(f)
407
- })), [i]), b = _((f) => {
408
- if (!e || !t)
409
- return;
410
- const c = {
411
- id: e.id,
412
- n: t.name,
413
- fixed: e.fixed,
414
- isSetted: !0,
415
- o: f.valueOperator.id,
416
- o1: Number(f.valueOperand1),
417
- o2: f.valueOperand2,
418
- labelOperator: f.valueOperator.label,
419
- labelOperands: f.valueOperand1
420
- };
421
- return f.valueOperator.id === "b" ? (c.labelOperands = `${f.valueOperand1} - ${f.valueOperand2}`, c.o2 = Number(f.valueOperand2)) : c.o2 = void 0, c;
422
- }, []);
423
- return L(() => {
424
- s || n({
425
- valueOperator: C.object().nullable().required(a("dynamic_filter.error_operator_required")),
426
- valueOperand1: C.number().typeError(a("dynamic_filter.error_operand_mustbe_number")),
427
- valueOperand2: C.string().when("valueOperator", {
428
- is: (f) => f.id === "b",
429
- then: C.string().test("DOB", a("dynamic_filter.error_operand_mustbe_number"), (f) => f === "" ? !1 : !isNaN(Number(f)))
430
- })
431
- }), o(b), e && t && (u("valueOperand1", e.o1, {
432
- shouldTouch: !1,
433
- shouldValidate: !1
434
- }), u("valueOperand2", e.o2, {
435
- shouldTouch: !1,
436
- shouldValidate: !1
437
- })), g(!0);
438
- }, [a, e, t]), L(() => {
439
- d.current?.focus();
440
- }, [s]), /* @__PURE__ */ w(yt, {
441
- children: [s && /* @__PURE__ */ w(A, {
442
- children: [/* @__PURE__ */ r(vt, {
443
- children: /* @__PURE__ */ r(R, {
444
- name: "valueOperator",
445
- autoComplete: "off",
446
- options: l,
447
- getOptionLabel: (f) => f.label,
448
- isOptionEqualToValue: (f, c) => f.id === c.id,
449
- label: ""
450
- })
451
- }), /* @__PURE__ */ r(Y, {
452
- name: "valueOperand1",
453
- ref: d,
454
- focused: !0
455
- }), y && y.id === "b" && /* @__PURE__ */ r(Y, {
456
- name: "valueOperand2",
457
- ref: d
458
- })]
459
- }), "x"]
460
- });
461
- }
462
- const ie = {
463
- string: at,
464
- number: Ot,
465
- boolean: dt,
466
- datetime: Ft,
467
- __default__: () => {
468
- throw new Error("Type no defined");
469
- }
470
- }, Ie = (e, t, n, o) => (ie[e.type] ?? ie.__default__)(e, t, n, o), ae = {
471
- string: lt,
472
- number: _t,
473
- boolean: pt,
474
- datetime: ht,
475
- __default__: /* @__PURE__ */ r(A, {})
476
- }, xt = (e) => {
477
- const {
478
- getFieldByName: t
479
- } = T(), n = t(e.filter.n);
480
- if (!n)
481
- return /* @__PURE__ */ r(A, {});
482
- const o = ae[n.type] ?? ae.__default__;
483
- return /* @__PURE__ */ r(o, {});
484
- }, It = {
485
- fields: [],
486
- withAllField: !0,
487
- isDirty: !1,
488
- isValid: !0,
489
- automatic: !1,
490
- availableFields: [],
491
- getFieldByName: () => {
492
- },
493
- getLabelOperator: () => "",
494
- applyedFilters: [],
495
- addFilter: V,
496
- updateFilter: V,
497
- removeFilter: V,
498
- clearFilters: V,
499
- fireOnChangeFilters: V,
500
- openAnchorEl: null,
501
- openMenuFields: V,
502
- closeMenuFields: V,
503
- popupData: {
504
- popupAnchorEl: null,
505
- filter: null,
506
- field: null
507
- },
508
- popupValidationSchema: {},
509
- setPoupEditValidationSchema: V,
510
- showPopupForAddFilter: V,
511
- showPopupForEditFilter: V,
512
- hidePopupEdit: V,
513
- setInEdition: V,
514
- inEdition: !1,
515
- setFnTransformFormValuesIntoValues: V,
516
- fnTransformFormValuesIntoRawValues: () => {
517
- }
518
- }, U = qe(It), wt = (e) => e.reduce((t, n) => n.id > t ? n.id : t, 0), Ct = (e, t) => t.findIndex((n) => n.id === e), le = (e) => e.map((t) => ({
519
- n: t.n,
520
- o: t.o,
521
- labelOperands: t.labelOperands,
522
- o1: t.o1,
523
- o2: t.o2
524
- })), se = (e) => e.map((t) => ({
525
- n: t.n,
526
- o: t.o,
527
- o1: t.o1,
528
- o2: t.o2
529
- })), Vt = (e, t, n, o, i) => {
530
- const a = [], d = [];
531
- for (let p = 0; p < t.length; p++) {
532
- let u;
533
- const s = {
534
- ...t[p],
535
- id: 0,
536
- isSetted: !0,
537
- fixed: !1,
538
- labelOperator: ""
539
- }, g = n(s.n);
540
- if (!!g) {
541
- switch (g.type) {
542
- case "string":
543
- u = ft(s);
544
- break;
545
- case "number":
546
- u = mt(s);
547
- break;
548
- case "boolean":
549
- u = gt(s);
550
- break;
551
- case "datetime":
552
- u = bt(s);
553
- break;
554
- default:
555
- u = !1;
556
- }
557
- u && (g.presence === "fixed" && (d.findIndex((y) => y === g.name) === -1 ? (s.fixed = !0, d.push(g.name)) : s.fixed = !1), s.isSetted = !0, s.id = a.length + 1, s.labelOperator = o(`dynamic_filter.operator_${s.o}`), a.push(s));
558
- }
559
- }
560
- for (let p = 0; p < e.length; p++) {
561
- const u = e[p];
562
- if ((u.presence === "initialized" || u.presence === "fixed") && !t.find((s) => s.n === u.name)) {
563
- const s = Ie(u, u.presence === "fixed", o, i);
564
- s.id = a.length + 1, a.push(s);
565
- }
566
- }
567
- return a;
568
- };
569
- function St(e) {
570
- const {
571
- isSkeleton: t = !1,
572
- fields: n,
573
- initialFilters: o = [],
574
- withAllField: i = !0,
575
- onChangeFilter: a,
576
- automatic: d = !0,
577
- children: p
578
- } = e, [u, s] = S(null), [g, y] = S({
579
- popupAnchorEl: null,
580
- filter: null,
581
- field: null
582
- }), {
583
- getLabel: l
584
- } = $(), [b, f] = S(C.object().shape({})), [c, x] = S(() => {
585
- }), {
586
- host_static_assets: v,
587
- environment_assets: W
588
- } = j(), J = z(), Q = E(() => ({
589
- ...xe,
590
- label: l("dynamic_filter.all_fields"),
591
- urlIcon: `${v}/${W}/frontend/components/dynamic_filter/assets/icons/all_fields.svg`
592
- }), [l, v, W]), [M, P] = S(!1), [we, q] = S(!d), [N, X] = S(!1), {
593
- toast: Ce
594
- } = z(), H = _((m) => n.concat(Q).find((F) => F.name === m), [n, Q]), K = _((m) => l(`dynamic_filter.operator_${m}`), [l]), [D, k] = S(Vt(n, o, H, l, J)), Ve = E(() => {
595
- const m = [];
596
- for (let F = 0; F < n.length; F++) {
597
- let O;
598
- const I = n[F];
599
- O = !0, I.multiple !== void 0 && I.multiple === !1 && D.findIndex((Be) => Be.n === I.name) > -1 && (O = !1), O && m.push(I);
600
- }
601
- return m;
602
- }, [n, D]), Se = _(() => {
603
- N ? (d || q(!1), a(le(D), se(D))) : Ce(l("dynamic_filter.error_filters_no_setted"), {
604
- type: "error",
605
- autoClose: 1e4
606
- });
607
- }, [N, D, a]);
608
- L(() => {
609
- const m = D.findIndex((F) => !F.isSetted) > -1;
610
- if (X(!m), !d) {
611
- q(!0);
612
- return;
613
- }
614
- m || (q(!1), a(le(D), se(D)));
615
- }, [D]);
616
- const Te = _((m) => {
617
- k((F) => {
618
- const O = [...F], I = {
619
- ...m,
620
- id: wt(F) + 1,
621
- labelOperator: K(m.o)
622
- };
623
- return O.push(I), O;
624
- });
625
- }, []), De = _((m) => {
626
- k((F) => {
627
- const O = [...F], I = Ct(m.id, O);
628
- return I > -1 && O.splice(I, 1, {
629
- ...m,
630
- labelOperator: K(m.o)
631
- }), O;
632
- });
633
- }, []), Ee = _(() => {
634
- k((m) => {
635
- const F = [];
636
- for (let O = 0; O < m.length; O++) {
637
- const I = m[O];
638
- I.fixed && F.push(I);
639
- }
640
- return F;
641
- });
642
- }, []), Ae = _((m) => {
643
- s(m), P(!0);
644
- }, [D]), Le = _(() => {
645
- s(null), P(!1);
646
- }, []), Pe = _((m) => {
647
- g.popupAnchorEl && y({
648
- popupAnchorEl: null,
649
- filter: null,
650
- field: null
651
- }), !m && M && P(!1);
652
- }, [g, M]), $e = _((m, F) => {
653
- y({
654
- popupAnchorEl: m,
655
- filter: Ie(F, !1, l, J),
656
- field: F
657
- }), P(!0);
658
- }, []), Re = _((m, F) => {
659
- y({
660
- popupAnchorEl: m,
661
- filter: F,
662
- field: H(F.n)
663
- }), P(!0);
664
- }, []), We = _((m) => {
665
- k((F) => {
666
- const O = [...F], I = F.findIndex((Z) => m === Z.id);
667
- return I > -1 && (O[I].fixed || O.splice(I, 1)), O;
668
- });
669
- }, []), ke = _((m) => {
670
- f(C.object().shape({
671
- ...m
672
- }));
673
- }, []), je = _((m) => {
674
- x(() => m);
675
- }, []);
676
- return /* @__PURE__ */ r(U.Provider, {
677
- value: {
678
- isSkeleton: t,
679
- inEdition: M,
680
- automatic: d,
681
- isDirty: we,
682
- isValid: N,
683
- withAllField: i,
684
- fields: n,
685
- availableFields: Ve,
686
- getFieldByName: H,
687
- getLabelOperator: K,
688
- applyedFilters: D,
689
- addFilter: Te,
690
- updateFilter: De,
691
- removeFilter: We,
692
- clearFilters: Ee,
693
- fireOnChangeFilters: Se,
694
- openAnchorEl: u,
695
- openMenuFields: Ae,
696
- closeMenuFields: Le,
697
- popupData: g,
698
- popupValidationSchema: b,
699
- showPopupForAddFilter: $e,
700
- showPopupForEditFilter: Re,
701
- hidePopupEdit: Pe,
702
- setInEdition: P,
703
- setPoupEditValidationSchema: ke,
704
- fnTransformFormValuesIntoRawValues: c,
705
- setFnTransformFormValuesIntoValues: je
706
- },
707
- children: p
708
- });
709
- }
710
- const T = () => Ne(U), Tt = h("div")(({
711
- theme: e
712
- }) => ({
713
- width: "auto",
714
- display: "flex",
715
- justifyContent: "center",
716
- alignItems: "center",
717
- height: "100%",
718
- minHeight: e.spacing(3),
719
- paddingLeft: e.spacing(1),
720
- backgroundColor: e.palette.grid?.sectionHeader,
721
- border: "1px solid",
722
- borderColor: Ke(`${e.palette.divider}`, 0.1),
723
- overflow: "visible",
724
- borderRadius: e.spacing(1),
725
- "&.waf_no_setted": {
726
- border: `1px solid ${e.palette.error.main}`
727
- }
728
- })), Dt = h("div")(({
729
- theme: e
730
- }) => ({
731
- ...e.typography.body2,
732
- display: "flex",
733
- justifyContent: "center",
734
- alignItems: "center",
735
- width: "auto",
736
- height: "100%",
737
- marginRight: e.spacing(1),
738
- marginLeft: e.spacing(1),
739
- whiteSpace: "nowrap"
740
- })), Et = h("span")(({
741
- theme: e
742
- }) => ({
743
- ...e.typography.subtitle2
744
- })), At = h("span")(({
745
- theme: e
746
- }) => ({
747
- ...e.typography.body2,
748
- marginLeft: e.spacing(1.5),
749
- fontStyle: "italic"
750
- })), Lt = h("span")(({
751
- theme: e
752
- }) => ({
753
- ...e.typography.body2,
754
- marginLeft: e.spacing(1.5)
755
- }));
756
- function Pt(e) {
757
- const {
758
- n: t,
759
- id: n,
760
- isSetted: o,
761
- fixed: i,
762
- labelOperator: a,
763
- labelOperands: d
764
- } = e, {
765
- removeFilter: p,
766
- showPopupForEditFilter: u,
767
- hidePopupEdit: s,
768
- getFieldByName: g
769
- } = T(), {
770
- host_static_assets: y,
771
- environment_assets: l
772
- } = j(), b = E(() => g(t), [g]), f = E(() => {
773
- if (!!b)
774
- return b && b.urlIcon !== "" ? b.urlIcon : "";
775
- }, [b]), c = () => {
776
- s(!1), p(n);
777
- }, x = (v) => {
778
- u(v.currentTarget, e);
779
- };
780
- return b ? /* @__PURE__ */ w(Tt, {
781
- id: "WrapperApplyedFilter",
782
- className: o ? "" : "waf_no_setted",
783
- children: [f && /* @__PURE__ */ r(G, {
784
- src: f,
785
- onClick: x
786
- }), /* @__PURE__ */ w(Dt, {
787
- onClick: x,
788
- children: [/* @__PURE__ */ r(Et, {
789
- children: b.label
790
- }), /* @__PURE__ */ r(At, {
791
- children: a
792
- }), /* @__PURE__ */ r(Lt, {
793
- children: d
794
- })]
795
- }), !i && /* @__PURE__ */ r(G, {
796
- size: "small",
797
- src: `${y}/${l}/frontend/components/dynamic_filter/assets/icons/clear.svg`,
798
- onClick: c,
799
- dictionaryTooltip: "dynamic_filter.tooltip_clear_filter"
800
- })]
801
- }) : /* @__PURE__ */ r(A, {});
802
- }
803
- function de() {
804
- const {
805
- applyedFilters: e,
806
- isSkeleton: t
807
- } = T();
808
- return t ? /* @__PURE__ */ r(re, {
809
- id: "WrapperApplyedFilters"
810
- }) : /* @__PURE__ */ r(re, {
811
- className: "WrapperApplyedFilters",
812
- children: /* @__PURE__ */ r(Me, {
813
- children: /* @__PURE__ */ r(nt, {
814
- id: "WrapperApplyedFilters",
815
- children: [...e].sort((n, o) => n.isSetted === o.isSetted ? 0 : n.isSetted ? -1 : 1).reverse().map((n) => /* @__PURE__ */ r(Pt, {
816
- ...n
817
- }, n.id))
818
- })
819
- })
820
- });
821
- }
822
- const $t = be("div")(({
823
- theme: e
824
- }) => ({
825
- display: "flex",
826
- justifyContent: "center",
827
- alignItems: "center",
828
- minWidth: e.spacing(3.75),
829
- height: e.spacing(3.75)
830
- })), Rt = be("div")(({
831
- theme: e
832
- }) => ({
833
- paddingLeft: e.spacing(0.5),
834
- borderLeft: `1px solid ${e.palette.divider}`
835
- })), pe = () => {
836
- const {
837
- host_static_assets: e,
838
- environment_assets: t
839
- } = j(), {
840
- clearFilters: n,
841
- isSkeleton: o,
842
- applyedFilters: i
843
- } = T();
844
- return o ? /* @__PURE__ */ r($t, {
845
- children: /* @__PURE__ */ r(Fe, {
846
- variant: "circular",
847
- width: "20px",
848
- height: "20px"
849
- })
850
- }) : i.findIndex((a) => a.fixed == !1) > -1 ? /* @__PURE__ */ r(Rt, {
851
- children: /* @__PURE__ */ r(G, {
852
- src: `${e}/${t}/frontend/components/dynamic_filter/assets/icons/clear.svg`,
853
- onClick: n,
854
- dictionaryTooltip: "dynamic_filter.tooltip_clear_filters"
855
- })
856
- }) : /* @__PURE__ */ r(A, {});
857
- }, ue = h("div")(({
858
- theme: e
859
- }) => ({
860
- display: "flex",
861
- justifyContent: "center",
862
- alignItems: "center",
863
- width: "100%",
864
- height: e.spacing(3),
865
- borderLeft: `1px solid ${e.palette.divider}`,
866
- paddingLeft: e.spacing(1),
867
- marginLeft: e.spacing(1),
868
- [e.breakpoints.up("sm")]: {
869
- width: e.spacing(25)
870
- }
871
- })), Wt = h("input")(({
872
- theme: e
873
- }) => ({
874
- background: "transparent",
875
- display: "flex",
876
- justifyContent: "center",
877
- alignItems: "center",
878
- minWidth: e.spacing(3.75),
879
- width: "100%",
880
- "&": {
881
- outline: "none",
882
- border: "none"
883
- },
884
- [e.breakpoints.up("sm")]: {
885
- width: "auto"
886
- }
887
- }));
888
- function ce() {
889
- const {
890
- isSkeleton: e,
891
- withAllField: t,
892
- availableFields: n,
893
- showPopupForAddFilter: o,
894
- addFilter: i,
895
- openAnchorEl: a,
896
- openMenuFields: d,
897
- closeMenuFields: p,
898
- hidePopupEdit: u
899
- } = T(), [s, g] = S(""), y = E(() => a ? n.filter((v) => v.label.includes(s)) : [], [s, a]);
900
- if (e)
901
- return /* @__PURE__ */ r(ue, {
902
- id: "SKTWrapperInputFilter",
903
- children: /* @__PURE__ */ r(Fe, {
904
- variant: "text",
905
- width: "100%",
906
- height: 24
907
- })
908
- });
909
- const l = () => {
910
- p();
911
- }, b = (v) => {
912
- p(), o(a, v);
913
- }, f = (v) => {
914
- d(v.currentTarget);
915
- }, c = (v) => {
916
- g(v.target.value), a || d(v.currentTarget), u(!0);
917
- }, x = (v) => {
918
- if (v.key === "Enter") {
919
- if (s.trim() === "") {
920
- p();
921
- return;
922
- }
923
- t && (i({
924
- n: xe.name,
925
- isSetted: !0,
926
- fixed: !1,
927
- o: "c",
928
- o1: s,
929
- labelOperands: s
930
- }), g(""), p());
931
- }
932
- };
933
- return !t && n.length == 0 ? /* @__PURE__ */ r(A, {}) : /* @__PURE__ */ w(ue, {
934
- id: "WrapperInputFilter",
935
- children: [/* @__PURE__ */ r(Wt, {
936
- type: "text",
937
- value: s,
938
- placeholder: "filter",
939
- onClick: f,
940
- onChange: c,
941
- onKeyPress: x
942
- }), n.length > 0 && /* @__PURE__ */ r(Xe, {
943
- id: "Popover",
944
- open: Boolean(a),
945
- anchorEl: a,
946
- onClose: l,
947
- disableAutoFocus: !0,
948
- arrowType: "right-top",
949
- sx: {
950
- "& .MuiMenuItem-root": {
951
- px: 1,
952
- typography: "body2",
953
- borderRadius: 0.75
954
- }
955
- },
956
- children: Boolean(a) && y.map((v, W) => /* @__PURE__ */ w(ze, {
957
- dense: !0,
958
- onClick: () => b(v),
959
- children: [/* @__PURE__ */ r(he, {
960
- src: v.urlIcon
961
- }), /* @__PURE__ */ r(Ue, {
962
- children: v.label
963
- })]
964
- }, `menu_action_${W}`))
965
- })]
966
- });
967
- }
968
- const kt = h("div")(({
969
- theme: e
970
- }) => ({
971
- display: "flex",
972
- flexDirection: "column",
973
- justifyContent: "center",
974
- alignItems: "center",
975
- padding: e.spacing(1.4, 3, 3, 3),
976
- backgroundColor: e.palette.background.default,
977
- borderRadius: e.spacing(1)
978
- }));
979
- h("div")(({
980
- theme: e
981
- }) => ({
982
- display: "flex",
983
- justifyContent: "center",
984
- gap: e.spacing(3),
985
- paddingTop: e.spacing(3)
986
- }));
987
- const jt = h("div")(({
988
- theme: e
989
- }) => ({
990
- ...e.typography.subtitle2,
991
- width: "100%",
992
- display: "flex",
993
- justifyContent: "flex-start",
994
- alignItems: "center",
995
- padding: e.spacing(2, 0),
996
- marginLeft: e.spacing(1.5)
997
- })), Bt = h("div")(({
998
- theme: e
999
- }) => ({
1000
- width: "100%",
1001
- display: "flex",
1002
- justifyContent: "flex-start",
1003
- alignItems: "center",
1004
- borderBottom: `1px solid ${e.palette.divider}`
1005
- })), fe = () => {
1006
- const {
1007
- popupValidationSchema: e,
1008
- popupData: {
1009
- popupAnchorEl: t,
1010
- filter: n,
1011
- field: o
1012
- },
1013
- hidePopupEdit: i,
1014
- addFilter: a,
1015
- updateFilter: d,
1016
- getLabelOperator: p,
1017
- fnTransformFormValuesIntoRawValues: u
1018
- } = T(), s = Ye(), {
1019
- getLabel: g
1020
- } = $(), y = E(() => !n || !o ? {} : {
1021
- ...n,
1022
- valueOperator: {
1023
- id: n.o,
1024
- label: p(n.o)
1025
- }
1026
- }, [n, o, p, g]), l = async (f) => {
1027
- if (!n || !o)
1028
- return;
1029
- const c = u(f);
1030
- !c || (n.id === 0 ? a(c) : d(c), i(!1));
1031
- }, b = () => {
1032
- i(!1);
1033
- };
1034
- return /* @__PURE__ */ r(Ge, {
1035
- id: "Popover",
1036
- open: Boolean(t),
1037
- anchorEl: t,
1038
- sx: {
1039
- boxShadow: s.customShadows.dropdown,
1040
- borderRadius: 1
1041
- },
1042
- children: /* @__PURE__ */ r(A, {
1043
- children: n && /* @__PURE__ */ r(Ze, {
1044
- onSubmit: l,
1045
- values: y,
1046
- validationSchema: e,
1047
- children: /* @__PURE__ */ w(kt, {
1048
- children: [/* @__PURE__ */ w(Bt, {
1049
- children: [o?.urlIcon && /* @__PURE__ */ r(he, {
1050
- src: o.urlIcon
1051
- }), /* @__PURE__ */ r(jt, {
1052
- children: o?.label
1053
- })]
1054
- }), /* @__PURE__ */ r(xt, {
1055
- filter: n
1056
- }), /* @__PURE__ */ w(Je, {
1057
- children: [/* @__PURE__ */ r(et, {
1058
- onClick: b
1059
- }), /* @__PURE__ */ r(tt, {})]
1060
- })]
1061
- })
1062
- })
1063
- })
1064
- });
1065
- }, Mt = h("div", {
1066
- shouldForwardProp: (e) => e !== "inEdition"
1067
- })(({
1068
- theme: e,
1069
- inEdition: t
1070
- }) => ({
1071
- display: "flex",
1072
- alignItems: "center",
1073
- justifyContent: "flex-start",
1074
- height: "auto",
1075
- width: "100%",
1076
- padding: e.spacing(0.5),
1077
- borderRadius: e.spacing(1),
1078
- border: t ? `1px solid ${e.palette.primary.main}` : `1px solid ${e.palette.divider}`
1079
- })), qt = h("div", {
1080
- shouldForwardProp: (e) => e !== "inEdition"
1081
- })(({
1082
- theme: e,
1083
- inEdition: t
1084
- }) => ({
1085
- display: "flex",
1086
- flexDirection: "column",
1087
- alignItems: "center",
1088
- justifyContent: "space-between",
1089
- minWidth: e.spacing(25),
1090
- height: "auto",
1091
- width: "100%",
1092
- padding: e.spacing(0.5),
1093
- borderRadius: e.spacing(1),
1094
- border: t ? `1px solid ${e.palette.primary.main}` : `1px solid ${e.palette.divider}`,
1095
- gap: e.spacing(0.75),
1096
- "& .WrapperApplyedFilters": {
1097
- margin: "0px",
1098
- padding: "0px",
1099
- border: "0px"
1100
- }
1101
- })), Nt = h("div")(() => ({
1102
- width: "100%",
1103
- display: "flex",
1104
- justifyContent: "space-between"
1105
- })), Ir = (e) => {
1106
- const t = rt();
1107
- return He(["dictionary_loaded"]) ? /* @__PURE__ */ r(St, {
1108
- ...e,
1109
- children: /* @__PURE__ */ r(U.Consumer, {
1110
- children: ({
1111
- inEdition: o
1112
- }) => t ? /* @__PURE__ */ w(Mt, {
1113
- id: "WrapperFilter",
1114
- inEdition: o,
1115
- children: [/* @__PURE__ */ r(te, {}), /* @__PURE__ */ r(ce, {}), /* @__PURE__ */ r(de, {}), /* @__PURE__ */ r(fe, {}), /* @__PURE__ */ r(pe, {})]
1116
- }) : /* @__PURE__ */ w(qt, {
1117
- id: "WrapperFilterMobile",
1118
- inEdition: o,
1119
- children: [/* @__PURE__ */ w(Nt, {
1120
- id: "ContainerFistRow",
1121
- children: [/* @__PURE__ */ r(te, {}), /* @__PURE__ */ r(ce, {}), /* @__PURE__ */ r(pe, {})]
1122
- }), /* @__PURE__ */ r(de, {}), /* @__PURE__ */ r(fe, {})]
1123
- })
1124
- })
1125
- }) : /* @__PURE__ */ r(A, {});
1126
- };
1127
- function wr() {
1128
- return ["dynamic_filter"].concat(Qe());
1129
- }
1130
- const Cr = {
1131
- dynamic_filter: {
1132
- filter_tooltip: "Search",
1133
- operator_b: "between",
1134
- operator_e: "=",
1135
- operator_ne: "!=",
1136
- operator_gt: ">",
1137
- operator_gte: ">=",
1138
- operator_lt: "<",
1139
- operator_lte: "<=",
1140
- operator_c: "contains",
1141
- operator_nc: "not contains",
1142
- all_fields: "all_fields",
1143
- operand_true: "true",
1144
- operand_false: "false",
1145
- error_operator_required: "Operator required",
1146
- error_operand_required: "Operand required",
1147
- error_invalid_date: "Invalid date",
1148
- error_operand_mustbe_number: "Invalid number",
1149
- error_filters_no_setted: "Filters not yet set"
1150
- }
1151
- };
1152
- export {
1153
- Ir as D,
1154
- Cr as d,
1155
- wr as g,
1156
- T as u
1157
- };