@m4l/components 0.1.18 → 0.1.20
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/components/CommonActions/components/ActionCancel/{index.7e947996.js → index.3775989f.js} +1 -1
- package/components/CommonActions/components/ActionFormCancel/{index.63405f6c.js → index.d69d9e0f.js} +2 -2
- package/components/CommonActions/components/ActionIntro/{index.bac90f39.js → index.ca7b6952.js} +1 -1
- package/components/CommonActions/components/Actions/{index.6b25caed.js → index.a908e4b9.js} +170 -171
- package/components/DataGrid/{index.091572bf.js → index.5cbf0dd8.js} +3 -3
- package/components/DynamicFilter/{index.7efecd5d.js → index.8a571617.js} +80 -82
- package/components/HelmetPage/index.d.ts +6 -0
- package/components/{Page → HelmetPage}/types.d.ts +2 -2
- package/components/Icon/{index.cbca79b0.js → index.f569765b.js} +41 -29
- package/components/Icon/types.d.ts +1 -0
- package/components/Image/index.c9da2d5a.js +152 -0
- package/components/Image/index.d.ts +2 -2
- package/components/Image/styles.d.ts +2 -4
- package/components/Image/subcomponents/BasicIntersectComponent/index.d.ts +3 -0
- package/components/Image/subcomponents/LazyLoadComponent/index.d.ts +3 -0
- package/components/Image/subcomponents/Skeleton/index.d.ts +3 -0
- package/components/Image/subcomponents/Skeleton/styles.d.ts +2 -0
- package/components/Image/subcomponents/Skeleton/types.d.ts +4 -0
- package/components/Image/types.d.ts +30 -15
- package/components/Image/utils/isIntersectionObserverAvailable.d.ts +1 -0
- package/components/LanguagePopover/styles.d.ts +1 -1
- package/components/ModalDialog/{index.0ddffae6.js → index.16024a4e.js} +3 -3
- package/components/NoItemSelected/{index.12f0ca67.js → index.9609a7f7.js} +1 -1
- package/components/NoItemSelected/styles.d.ts +1 -1
- package/components/ObjectLogs/{index.64f06b3d.js → index.ac2bfa48.js} +5 -5
- package/components/Page/index.fc660ee5.js +27 -0
- package/components/PaperForm/{index.d7c74064.js → index.3f8c7ef2.js} +1 -1
- package/components/Period/{index.8423f865.js → index.497b8df4.js} +7 -8
- package/components/animate/IconButtonAnimate/index.d.ts +1 -1
- package/components/animate/features.d.ts +2 -0
- package/components/animate/variants/bounce.d.ts +10 -10
- package/components/animate/variants/container.d.ts +1 -1
- package/components/animate/variants/fade.d.ts +21 -21
- package/components/animate/variants/transition.d.ts +6 -6
- package/components/{hook-form/FormProvider/index.936cbb98.js → contexts/RHFormContext/index.f8241292.js} +17 -16
- package/components/formatters/BooleanFormatter/{index.cca53b7f.js → index.3ec56305.js} +1 -1
- package/components/formatters/DateFormatter/{index.ad8d9b8e.js → index.08d8823b.js} +1 -1
- package/components/formatters/{index.55856d65.js → index.6959c2de.js} +1 -1
- package/components/hook-form/RHFAutocomplete/index.b7f11146.js +146 -0
- package/components/hook-form/RHFAutocomplete/index.d.ts +1 -2
- package/components/hook-form/RHFAutocomplete/styles.d.ts +0 -1
- package/components/hook-form/RHFAutocomplete/subcomponents/RenderOption/index.d.ts +3 -0
- package/components/hook-form/RHFAutocomplete/subcomponents/RenderOption/styles.d.ts +2 -0
- package/components/hook-form/RHFAutocomplete/types.d.ts +13 -7
- package/components/hook-form/RHFAutocompleteAsync/index.97a5a66e.js +51 -0
- package/components/hook-form/RHFAutocompleteAsync/index.d.ts +1 -2
- package/components/hook-form/RHFAutocompleteAsync/types.d.ts +3 -11
- package/components/hook-form/RHFCheckbox/index.6a40e25f.js +55 -0
- package/components/hook-form/RHFCheckbox/subcomponents/Skeleton/index.d.ts +2 -0
- package/components/hook-form/RHFCheckbox/subcomponents/Skeleton/styles.d.ts +2 -0
- package/components/hook-form/RHFDateTime/{index.fc5cbafe.js → index.5ed774e3.js} +24 -26
- package/components/hook-form/RHFDateTime/types.d.ts +2 -5
- package/components/hook-form/RHFPeriod/{index.0b982ae8.js → index.e17b1c72.js} +1 -1
- package/components/hook-form/RHFTextField/index.bab2a2cf.js +113 -0
- package/components/hook-form/RHFTextField/index.d.ts +1 -1
- package/components/hook-form/RHFTextField/subcomponents/Skeleton/index.d.ts +3 -0
- package/components/hook-form/RHFTextField/subcomponents/Skeleton/styles.d.ts +2 -0
- package/components/hook-form/RHFTextField/subcomponents/Skeleton/types.d.ts +4 -0
- package/components/hook-form/RHFTextField/types.d.ts +2 -5
- package/components/hook-form/RHFTextFieldPassword/index.d.ts +3 -0
- package/components/hook-form/RHFTextFieldPassword/types.d.ts +4 -0
- package/components/hook-form/RHFUpload/{index.ed3d739f.js → index.cbf11b68.js} +31 -36
- package/components/hook-form/index.d.ts +1 -2
- package/components/index.d.ts +2 -3
- package/components/mui_extended/Accordion/{index.2116e423.js → index.49f5df8e.js} +2 -2
- package/components/mui_extended/Avatar/index.d.ts +1 -1
- package/components/mui_extended/Avatar/index.dadb0528.js +37 -0
- package/components/mui_extended/Avatar/subcomponents/SkeletonAvatar/index.d.ts +2 -0
- package/components/mui_extended/Button/index.16591787.js +144 -0
- package/components/mui_extended/IconButton/index.4b5ce8b5.js +103 -0
- package/components/mui_extended/IconButton/index.d.ts +1 -1
- package/components/mui_extended/IconButton/subcomponents/SkeletonIconButton/index.d.ts +2 -0
- package/components/mui_extended/ImageButton/index.d.ts +3 -0
- package/components/mui_extended/ImageButton/types.d.ts +7 -0
- package/components/mui_extended/LinkWithRoute/index.16436ab8.js +26 -0
- package/components/mui_extended/LinkWithRoute/types.d.ts +2 -6
- package/components/mui_extended/LoadingButton/subcomponents/Skeleton/index.d.ts +2 -0
- package/components/mui_extended/LoadingButton/subcomponents/Skeleton/styles.d.ts +2 -0
- package/components/mui_extended/LoadingButton/types.d.ts +2 -2
- package/components/mui_extended/MenuActions/styles.d.ts +2 -2
- package/components/mui_extended/MenuActions/types.d.ts +2 -2
- package/components/mui_extended/Pager/{index.f0911163.js → index.80c2f8a0.js} +1 -1
- package/components/mui_extended/Popover/index.305f2ea5.js +218 -0
- package/components/mui_extended/Popover/index.d.ts +4 -0
- package/components/mui_extended/Popover/types.d.ts +9 -0
- package/components/mui_extended/Typography/index.e5494696.js +31 -0
- package/components/mui_extended/Typography/subcomponents/index.d.ts +3 -0
- package/components/mui_extended/Typography/subcomponents/types.d.ts +2 -0
- package/components/mui_extended/Typography/types.d.ts +3 -5
- package/components/mui_extended/index.d.ts +1 -1
- package/contexts/ModalContext/{index.1688a07c.js → index.699767c7.js} +3 -3
- package/contexts/RHFormContext/index.d.ts +3 -0
- package/{components/hook-form/FormProvider → contexts/RHFormContext}/styles.d.ts +0 -0
- package/{components/hook-form/FormProvider → contexts/RHFormContext}/types.d.ts +0 -0
- package/contexts/index.d.ts +2 -0
- package/hooks/useFormAddEdit/index.d.ts +1 -1
- package/hooks/useFormAddEdit/types.d.ts +1 -1
- package/hooks/useModal/{index.cdd84702.js → index.8201ccec.js} +1 -1
- package/index.js +148 -151
- package/package.json +3 -1
- package/utils/index.d.ts +1 -1
- package/components/CompanyLogo/index.d.ts +0 -3
- package/components/CompanyLogo/index.f81c179c.js +0 -75
- package/components/CompanyLogo/styles.d.ts +0 -5
- package/components/CompanyLogo/types.d.ts +0 -6
- package/components/Image/index.e790b50b.js +0 -122
- package/components/LanguagePopover/index.15f7dea7.js +0 -87
- package/components/Page/index.6d69977e.js +0 -35
- package/components/Page/index.d.ts +0 -3
- package/components/hook-form/FormProvider/index.d.ts +0 -3
- package/components/hook-form/RHFAutocomplete/index.6ed76d4c.js +0 -122
- package/components/hook-form/RHFAutocompleteAsync/index.8f2c97ea.js +0 -153
- package/components/hook-form/RHFAutocompleteAsync/styles.d.ts +0 -4
- package/components/hook-form/RHFCheckbox/index.f9ce6c39.js +0 -59
- package/components/hook-form/RHFCheckbox/styles.d.ts +0 -13
- package/components/hook-form/RHFTextField/index.4c455f75.js +0 -77
- package/components/hook-form/RHFTextField/styles.d.ts +0 -2
- package/components/mui_extended/Avatar/index.0a2a4523.js +0 -32
- package/components/mui_extended/Button/index.3debb608.js +0 -110
- package/components/mui_extended/Button/styles.d.ts +0 -12
- package/components/mui_extended/IconButton/index.88f3aadb.js +0 -98
- package/components/mui_extended/LinkWithRoute/index.d4b263de.js +0 -28
- package/components/mui_extended/LoadingButton/skeleton.d.ts +0 -2
- package/components/mui_extended/LoadingButton/styles.d.ts +0 -2
- package/components/mui_extended/MenuPopover/index.488fc536.js +0 -131
- package/components/mui_extended/MenuPopover/index.d.ts +0 -4
- package/components/mui_extended/MenuPopover/types.d.ts +0 -9
- package/components/mui_extended/Typography/index.0c4604b3.js +0 -22
- package/react-lazy-load-image-component.45b56650.js +0 -784
|
@@ -6,9 +6,9 @@ import { HTML5Backend as ge } from "react-dnd-html5-backend";
|
|
|
6
6
|
import { SvgIcon as B, Checkbox as fe, InputBase as he, Skeleton as pe } from "@mui/material";
|
|
7
7
|
import { jsx as d, jsxs as Q } from "react/jsx-runtime";
|
|
8
8
|
import { voidFunction as I, useModuleDictionary as we, useModuleSkeleton as me } from "@m4l/core";
|
|
9
|
-
import { A as ye, a as Ce } from "../CommonActions/components/Actions/index.
|
|
10
|
-
import { g as be, d as ve } from "../ModalDialog/index.
|
|
11
|
-
import { g as xe, d as Re } from "../mui_extended/Pager/index.
|
|
9
|
+
import { A as ye, a as Ce } from "../CommonActions/components/Actions/index.a908e4b9.js";
|
|
10
|
+
import { g as be, d as ve } from "../ModalDialog/index.16024a4e.js";
|
|
11
|
+
import { g as xe, d as Re } from "../mui_extended/Pager/index.80c2f8a0.js";
|
|
12
12
|
const Se = A("div")(() => ({
|
|
13
13
|
display: "flex",
|
|
14
14
|
flexDirection: "column",
|
|
@@ -1,38 +1,36 @@
|
|
|
1
|
-
import { S as
|
|
1
|
+
import { S as Me } from "../ScrollBar/index.39eeb2de.js";
|
|
2
2
|
import { styled as h } from "@mui/material/styles";
|
|
3
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
4
|
import { useModuleDictionary as $, useHostTools as z, useEnvironment as j, voidFunction as V, useFlagsPresent as He } from "@m4l/core";
|
|
5
|
-
import * as
|
|
6
|
-
import { useFormContext as
|
|
7
|
-
import {
|
|
8
|
-
import { jsx as r, jsxs as
|
|
9
|
-
import
|
|
10
|
-
import { alpha as
|
|
11
|
-
import "../hook-form/
|
|
12
|
-
import "../hook-form/RHFCheckbox/index.f9ce6c39.js";
|
|
13
|
-
import { R as ee } from "../hook-form/RHFDateTime/index.fc5cbafe.js";
|
|
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.b7f11146.js";
|
|
8
|
+
import { jsx as r, jsxs as w, Fragment as A } from "react/jsx-runtime";
|
|
9
|
+
import "../hook-form/RHFCheckbox/index.6a40e25f.js";
|
|
10
|
+
import { alpha as Ke, styled as be, Skeleton as Fe, MenuItem as ze, useTheme as Ye, Popper as Ge } from "@mui/material";
|
|
11
|
+
import { R as ee } from "../hook-form/RHFDateTime/index.5ed774e3.js";
|
|
14
12
|
import "@mui/x-date-pickers";
|
|
15
|
-
import { R as Y } from "../hook-form/RHFTextField/index.
|
|
16
|
-
import "../
|
|
13
|
+
import { R as Y } from "../hook-form/RHFTextField/index.bab2a2cf.js";
|
|
14
|
+
import { I as he } from "../Icon/index.f569765b.js";
|
|
15
|
+
import "../hook-form/RHFPeriod/index.e17b1c72.js";
|
|
17
16
|
import "../ErrorLabel/index.c8615f16.js";
|
|
18
|
-
import "../Period/index.
|
|
19
|
-
import {
|
|
20
|
-
import { L as Je, b as Qe, g as Xe } from "../CommonActions/components/Actions/index.6b25caed.js";
|
|
17
|
+
import "../Period/index.497b8df4.js";
|
|
18
|
+
import { L as Ue, b as Je, g as Qe } from "../CommonActions/components/Actions/index.a908e4b9.js";
|
|
21
19
|
import "@mui/material/Button";
|
|
22
|
-
import { F as te } from "../mui_extended/Button/index.3debb608.js";
|
|
23
20
|
import "react-router-dom";
|
|
24
|
-
import "../../contexts/ModalContext/index.
|
|
21
|
+
import "../../contexts/ModalContext/index.699767c7.js";
|
|
25
22
|
import "@mui/lab";
|
|
26
23
|
import "../../lodash.e09401f0.js";
|
|
27
24
|
import "react-dropzone";
|
|
28
|
-
import "
|
|
29
|
-
import "../
|
|
30
|
-
import "../
|
|
31
|
-
import { I as G } from "../mui_extended/IconButton/index.88f3aadb.js";
|
|
25
|
+
import "../Image/index.c9da2d5a.js";
|
|
26
|
+
import "../hook-form/RHFUpload/index.cbf11b68.js";
|
|
27
|
+
import { I as G } from "../mui_extended/IconButton/index.4b5ce8b5.js";
|
|
32
28
|
import "simplebar/dist/simplebar.min.css";
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
29
|
+
import { F as te } from "../mui_extended/Button/index.16591787.js";
|
|
30
|
+
import { P as Xe } from "../mui_extended/Popover/index.305f2ea5.js";
|
|
31
|
+
import { R as Ze } from "../contexts/RHFormContext/index.f8241292.js";
|
|
32
|
+
import { A as et } from "../CommonActions/components/ActionCancel/index.3775989f.js";
|
|
33
|
+
import { A as tt } from "../CommonActions/components/ActionIntro/index.ca7b6952.js";
|
|
36
34
|
import { useResponsiveDesktop as rt } from "@m4l/graphics";
|
|
37
35
|
const re = h("div")(({
|
|
38
36
|
theme: e
|
|
@@ -105,7 +103,7 @@ function lt() {
|
|
|
105
103
|
getLabel: a
|
|
106
104
|
} = $(), d = me(null), {
|
|
107
105
|
setValue: p
|
|
108
|
-
} =
|
|
106
|
+
} = B(), [u, s] = S(!1), g = E(() => ye.map((l) => ({
|
|
109
107
|
id: l,
|
|
110
108
|
label: i(l)
|
|
111
109
|
})), [i]), y = _((l) => !e || !t ? void 0 : {
|
|
@@ -120,8 +118,8 @@ function lt() {
|
|
|
120
118
|
}, []);
|
|
121
119
|
return L(() => {
|
|
122
120
|
u || n({
|
|
123
|
-
valueOperator:
|
|
124
|
-
valueOperand1:
|
|
121
|
+
valueOperator: C.object().nullable().required(a("operator_required")),
|
|
122
|
+
valueOperand1: C.string().required(a("operand_required"))
|
|
125
123
|
}), o(y), e && t && p("valueOperand1", e.o1, {
|
|
126
124
|
shouldTouch: !1,
|
|
127
125
|
shouldValidate: !1
|
|
@@ -129,7 +127,7 @@ function lt() {
|
|
|
129
127
|
}, [a, e, t]), L(() => {
|
|
130
128
|
d.current?.focus();
|
|
131
129
|
}, [u]), /* @__PURE__ */ r(ot, {
|
|
132
|
-
children: u && /* @__PURE__ */
|
|
130
|
+
children: u && /* @__PURE__ */ w(A, {
|
|
133
131
|
children: [/* @__PURE__ */ r(it, {
|
|
134
132
|
children: /* @__PURE__ */ r(R, {
|
|
135
133
|
name: "valueOperator",
|
|
@@ -189,7 +187,7 @@ function pt() {
|
|
|
189
187
|
}
|
|
190
188
|
} = T(), {
|
|
191
189
|
setValue: d
|
|
192
|
-
} =
|
|
190
|
+
} = B(), [p, u] = S(!1), s = E(() => Oe.map((l) => ({
|
|
193
191
|
id: l,
|
|
194
192
|
label: n(l)
|
|
195
193
|
})), [n]), g = E(() => [{
|
|
@@ -210,8 +208,8 @@ function pt() {
|
|
|
210
208
|
}, []);
|
|
211
209
|
return L(() => {
|
|
212
210
|
p || e({
|
|
213
|
-
valueOperator:
|
|
214
|
-
valueOperand1:
|
|
211
|
+
valueOperator: C.object().nullable().required(o("error_operator_required")),
|
|
212
|
+
valueOperand1: C.object().nullable().required(o("error_operand_required"))
|
|
215
213
|
}), t(y), i && a && d("valueOperand1", {
|
|
216
214
|
value: i.o1,
|
|
217
215
|
label: o(`dynamic_filter.operand_${i.o1}`)
|
|
@@ -221,7 +219,7 @@ function pt() {
|
|
|
221
219
|
}), u(!0);
|
|
222
220
|
}, [o]), /* @__PURE__ */ r(st, {
|
|
223
221
|
id: "WrapperAllFieldsFilter",
|
|
224
|
-
children: p && /* @__PURE__ */
|
|
222
|
+
children: p && /* @__PURE__ */ w(A, {
|
|
225
223
|
children: [/* @__PURE__ */ r(ne, {
|
|
226
224
|
children: /* @__PURE__ */ r(R, {
|
|
227
225
|
name: "valueOperator",
|
|
@@ -298,7 +296,7 @@ function ht() {
|
|
|
298
296
|
} = T(), {
|
|
299
297
|
control: u,
|
|
300
298
|
setValue: s
|
|
301
|
-
} =
|
|
299
|
+
} = B(), g = ge({
|
|
302
300
|
control: u,
|
|
303
301
|
name: "valueOperator"
|
|
304
302
|
}), [y, l] = S(!1), b = E(() => _e.map((c) => ({
|
|
@@ -321,11 +319,11 @@ function ht() {
|
|
|
321
319
|
}, []);
|
|
322
320
|
return L(() => {
|
|
323
321
|
y || e({
|
|
324
|
-
valueOperator:
|
|
325
|
-
valueOperand1:
|
|
326
|
-
valueOperand2:
|
|
322
|
+
valueOperator: C.object().nullable().required(o("operator_required")),
|
|
323
|
+
valueOperand1: C.date().test("valueOperand1", o("dynamic_filter.error_invalid_date"), (c) => Boolean(c)),
|
|
324
|
+
valueOperand2: C.date().when(["valueOperator.id"], {
|
|
327
325
|
is: "b",
|
|
328
|
-
then:
|
|
326
|
+
then: C.date().test("DOB", o("dynamic_filter.error_invalid_date"), (c) => Boolean(c))
|
|
329
327
|
})
|
|
330
328
|
}), d && p && (s("valueOperand1", new Date(d.o1), {
|
|
331
329
|
shouldTouch: !1,
|
|
@@ -335,7 +333,7 @@ function ht() {
|
|
|
335
333
|
shouldValidate: !1
|
|
336
334
|
})), t(f), l(!0);
|
|
337
335
|
}, [o, d, p]), /* @__PURE__ */ r(ut, {
|
|
338
|
-
children: y && /* @__PURE__ */
|
|
336
|
+
children: y && /* @__PURE__ */ w(A, {
|
|
339
337
|
children: [/* @__PURE__ */ r(ct, {
|
|
340
338
|
children: /* @__PURE__ */ r(R, {
|
|
341
339
|
name: "valueOperator",
|
|
@@ -399,7 +397,7 @@ function _t() {
|
|
|
399
397
|
} = $(), d = me(null), {
|
|
400
398
|
control: p,
|
|
401
399
|
setValue: u
|
|
402
|
-
} =
|
|
400
|
+
} = B(), [s, g] = S(!1), y = ge({
|
|
403
401
|
control: p,
|
|
404
402
|
name: "valueOperator"
|
|
405
403
|
}), l = E(() => ve.map((f) => ({
|
|
@@ -423,11 +421,11 @@ function _t() {
|
|
|
423
421
|
}, []);
|
|
424
422
|
return L(() => {
|
|
425
423
|
s || n({
|
|
426
|
-
valueOperator:
|
|
427
|
-
valueOperand1:
|
|
428
|
-
valueOperand2:
|
|
424
|
+
valueOperator: C.object().nullable().required(a("dynamic_filter.error_operator_required")),
|
|
425
|
+
valueOperand1: C.number().typeError(a("dynamic_filter.error_operand_mustbe_number")),
|
|
426
|
+
valueOperand2: C.string().when("valueOperator", {
|
|
429
427
|
is: (f) => f.id === "b",
|
|
430
|
-
then:
|
|
428
|
+
then: C.string().test("DOB", a("dynamic_filter.error_operand_mustbe_number"), (f) => f === "" ? !1 : !isNaN(Number(f)))
|
|
431
429
|
})
|
|
432
430
|
}), o(b), e && t && (u("valueOperand1", e.o1, {
|
|
433
431
|
shouldTouch: !1,
|
|
@@ -438,8 +436,8 @@ function _t() {
|
|
|
438
436
|
})), g(!0);
|
|
439
437
|
}, [a, e, t]), L(() => {
|
|
440
438
|
d.current?.focus();
|
|
441
|
-
}, [s]), /* @__PURE__ */
|
|
442
|
-
children: s && /* @__PURE__ */
|
|
439
|
+
}, [s]), /* @__PURE__ */ w(yt, {
|
|
440
|
+
children: [s && /* @__PURE__ */ w(A, {
|
|
443
441
|
children: [/* @__PURE__ */ r(vt, {
|
|
444
442
|
children: /* @__PURE__ */ r(R, {
|
|
445
443
|
name: "valueOperator",
|
|
@@ -457,7 +455,7 @@ function _t() {
|
|
|
457
455
|
name: "valueOperand2",
|
|
458
456
|
ref: d
|
|
459
457
|
})]
|
|
460
|
-
})
|
|
458
|
+
}), "x"]
|
|
461
459
|
});
|
|
462
460
|
}
|
|
463
461
|
const ie = {
|
|
@@ -582,7 +580,7 @@ function St(e) {
|
|
|
582
580
|
field: null
|
|
583
581
|
}), {
|
|
584
582
|
getLabel: l
|
|
585
|
-
} = $(), [b, f] = S(
|
|
583
|
+
} = $(), [b, f] = S(C.object().shape({})), [c, x] = S(() => {
|
|
586
584
|
}), {
|
|
587
585
|
host_static_assets: v,
|
|
588
586
|
environment_assets: W
|
|
@@ -590,14 +588,14 @@ function St(e) {
|
|
|
590
588
|
...xe,
|
|
591
589
|
label: l("dynamic_filter.all_fields"),
|
|
592
590
|
urlIcon: `${v}/${W}/frontend/components/dynamic_filter/assets/icons/all_fields.svg`
|
|
593
|
-
}), [l, v, W]), [
|
|
591
|
+
}), [l, v, W]), [M, P] = S(!1), [we, q] = S(!d), [N, X] = S(!1), {
|
|
594
592
|
toast: Ce
|
|
595
593
|
} = 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(() => {
|
|
596
594
|
const m = [];
|
|
597
595
|
for (let F = 0; F < n.length; F++) {
|
|
598
596
|
let O;
|
|
599
597
|
const I = n[F];
|
|
600
|
-
O = !0, I.multiple !== void 0 && I.multiple === !1 && D.findIndex((
|
|
598
|
+
O = !0, I.multiple !== void 0 && I.multiple === !1 && D.findIndex((Be) => Be.n === I.name) > -1 && (O = !1), O && m.push(I);
|
|
601
599
|
}
|
|
602
600
|
return m;
|
|
603
601
|
}, [n, D]), Se = _(() => {
|
|
@@ -649,8 +647,8 @@ function St(e) {
|
|
|
649
647
|
popupAnchorEl: null,
|
|
650
648
|
filter: null,
|
|
651
649
|
field: null
|
|
652
|
-
}), !m &&
|
|
653
|
-
}, [g,
|
|
650
|
+
}), !m && M && P(!1);
|
|
651
|
+
}, [g, M]), $e = _((m, F) => {
|
|
654
652
|
y({
|
|
655
653
|
popupAnchorEl: m,
|
|
656
654
|
filter: Ie(F, !1, l, J),
|
|
@@ -668,7 +666,7 @@ function St(e) {
|
|
|
668
666
|
return I > -1 && (O[I].fixed || O.splice(I, 1)), O;
|
|
669
667
|
});
|
|
670
668
|
}, []), ke = _((m) => {
|
|
671
|
-
f(
|
|
669
|
+
f(C.object().shape({
|
|
672
670
|
...m
|
|
673
671
|
}));
|
|
674
672
|
}, []), je = _((m) => {
|
|
@@ -677,7 +675,7 @@ function St(e) {
|
|
|
677
675
|
return /* @__PURE__ */ r(U.Provider, {
|
|
678
676
|
value: {
|
|
679
677
|
isSkeleton: t,
|
|
680
|
-
inEdition:
|
|
678
|
+
inEdition: M,
|
|
681
679
|
automatic: d,
|
|
682
680
|
isDirty: we,
|
|
683
681
|
isValid: N,
|
|
@@ -720,7 +718,7 @@ const T = () => Ne(U), Tt = h("div")(({
|
|
|
720
718
|
paddingLeft: e.spacing(1),
|
|
721
719
|
backgroundColor: e.palette.grid?.sectionHeader,
|
|
722
720
|
border: "1px solid",
|
|
723
|
-
borderColor:
|
|
721
|
+
borderColor: Ke(`${e.palette.divider}`, 0.1),
|
|
724
722
|
overflow: "visible",
|
|
725
723
|
borderRadius: e.spacing(1),
|
|
726
724
|
"&.waf_no_setted": {
|
|
@@ -778,13 +776,13 @@ function Pt(e) {
|
|
|
778
776
|
}, x = (v) => {
|
|
779
777
|
u(v.currentTarget, e);
|
|
780
778
|
};
|
|
781
|
-
return b ? /* @__PURE__ */
|
|
779
|
+
return b ? /* @__PURE__ */ w(Tt, {
|
|
782
780
|
id: "WrapperApplyedFilter",
|
|
783
781
|
className: o ? "" : "waf_no_setted",
|
|
784
782
|
children: [f && /* @__PURE__ */ r(G, {
|
|
785
783
|
src: f,
|
|
786
784
|
onClick: x
|
|
787
|
-
}), /* @__PURE__ */
|
|
785
|
+
}), /* @__PURE__ */ w(Dt, {
|
|
788
786
|
onClick: x,
|
|
789
787
|
children: [/* @__PURE__ */ r(Et, {
|
|
790
788
|
children: b.label
|
|
@@ -810,7 +808,7 @@ function de() {
|
|
|
810
808
|
id: "WrapperApplyedFilters"
|
|
811
809
|
}) : /* @__PURE__ */ r(re, {
|
|
812
810
|
className: "WrapperApplyedFilters",
|
|
813
|
-
children: /* @__PURE__ */ r(
|
|
811
|
+
children: /* @__PURE__ */ r(Me, {
|
|
814
812
|
children: /* @__PURE__ */ r(nt, {
|
|
815
813
|
id: "WrapperApplyedFilters",
|
|
816
814
|
children: [...e].sort((n, o) => n.isSetted === o.isSetted ? 0 : n.isSetted ? -1 : 1).reverse().map((n) => /* @__PURE__ */ r(Pt, {
|
|
@@ -931,7 +929,7 @@ function ce() {
|
|
|
931
929
|
}), g(""), p());
|
|
932
930
|
}
|
|
933
931
|
};
|
|
934
|
-
return !t && n.length == 0 ? /* @__PURE__ */ r(A, {}) : /* @__PURE__ */
|
|
932
|
+
return !t && n.length == 0 ? /* @__PURE__ */ r(A, {}) : /* @__PURE__ */ w(ue, {
|
|
935
933
|
id: "WrapperInputFilter",
|
|
936
934
|
children: [/* @__PURE__ */ r(Wt, {
|
|
937
935
|
type: "text",
|
|
@@ -940,13 +938,13 @@ function ce() {
|
|
|
940
938
|
onClick: f,
|
|
941
939
|
onChange: c,
|
|
942
940
|
onKeyPress: x
|
|
943
|
-
}), n.length > 0 && /* @__PURE__ */ r(
|
|
944
|
-
id: "
|
|
941
|
+
}), n.length > 0 && /* @__PURE__ */ r(Xe, {
|
|
942
|
+
id: "Popover",
|
|
945
943
|
open: Boolean(a),
|
|
946
944
|
anchorEl: a,
|
|
947
945
|
onClose: l,
|
|
948
946
|
disableAutoFocus: !0,
|
|
949
|
-
|
|
947
|
+
arrowType: "right-top",
|
|
950
948
|
sx: {
|
|
951
949
|
"& .MuiMenuItem-root": {
|
|
952
950
|
px: 1,
|
|
@@ -954,12 +952,12 @@ function ce() {
|
|
|
954
952
|
borderRadius: 0.75
|
|
955
953
|
}
|
|
956
954
|
},
|
|
957
|
-
children: Boolean(a) && y.map((v, W) => /* @__PURE__ */
|
|
955
|
+
children: Boolean(a) && y.map((v, W) => /* @__PURE__ */ w(ze, {
|
|
958
956
|
dense: !0,
|
|
959
957
|
onClick: () => b(v),
|
|
960
958
|
children: [/* @__PURE__ */ r(he, {
|
|
961
959
|
src: v.urlIcon
|
|
962
|
-
}), /* @__PURE__ */ r(
|
|
960
|
+
}), /* @__PURE__ */ r(Ue, {
|
|
963
961
|
children: v.label
|
|
964
962
|
})]
|
|
965
963
|
}, `menu_action_${W}`))
|
|
@@ -995,7 +993,7 @@ const jt = h("div")(({
|
|
|
995
993
|
alignItems: "center",
|
|
996
994
|
padding: e.spacing(2, 0),
|
|
997
995
|
marginLeft: e.spacing(1.5)
|
|
998
|
-
})),
|
|
996
|
+
})), Bt = h("div")(({
|
|
999
997
|
theme: e
|
|
1000
998
|
}) => ({
|
|
1001
999
|
width: "100%",
|
|
@@ -1016,7 +1014,7 @@ const jt = h("div")(({
|
|
|
1016
1014
|
updateFilter: d,
|
|
1017
1015
|
getLabelOperator: p,
|
|
1018
1016
|
fnTransformFormValuesIntoRawValues: u
|
|
1019
|
-
} = T(), s =
|
|
1017
|
+
} = T(), s = Ye(), {
|
|
1020
1018
|
getLabel: g
|
|
1021
1019
|
} = $(), y = E(() => !n || !o ? {} : {
|
|
1022
1020
|
...n,
|
|
@@ -1032,8 +1030,8 @@ const jt = h("div")(({
|
|
|
1032
1030
|
}, b = () => {
|
|
1033
1031
|
i(!1);
|
|
1034
1032
|
};
|
|
1035
|
-
return /* @__PURE__ */ r(
|
|
1036
|
-
id: "
|
|
1033
|
+
return /* @__PURE__ */ r(Ge, {
|
|
1034
|
+
id: "Popover",
|
|
1037
1035
|
open: Boolean(t),
|
|
1038
1036
|
anchorEl: t,
|
|
1039
1037
|
sx: {
|
|
@@ -1041,12 +1039,12 @@ const jt = h("div")(({
|
|
|
1041
1039
|
borderRadius: 1
|
|
1042
1040
|
},
|
|
1043
1041
|
children: /* @__PURE__ */ r(A, {
|
|
1044
|
-
children: n && /* @__PURE__ */ r(
|
|
1042
|
+
children: n && /* @__PURE__ */ r(Ze, {
|
|
1045
1043
|
onSubmit: l,
|
|
1046
1044
|
values: y,
|
|
1047
1045
|
validationSchema: e,
|
|
1048
|
-
children: /* @__PURE__ */
|
|
1049
|
-
children: [/* @__PURE__ */
|
|
1046
|
+
children: /* @__PURE__ */ w(kt, {
|
|
1047
|
+
children: [/* @__PURE__ */ w(Bt, {
|
|
1050
1048
|
children: [o?.urlIcon && /* @__PURE__ */ r(he, {
|
|
1051
1049
|
src: o.urlIcon
|
|
1052
1050
|
}), /* @__PURE__ */ r(jt, {
|
|
@@ -1054,7 +1052,7 @@ const jt = h("div")(({
|
|
|
1054
1052
|
})]
|
|
1055
1053
|
}), /* @__PURE__ */ r(xt, {
|
|
1056
1054
|
filter: n
|
|
1057
|
-
}), /* @__PURE__ */
|
|
1055
|
+
}), /* @__PURE__ */ w(Je, {
|
|
1058
1056
|
children: [/* @__PURE__ */ r(et, {
|
|
1059
1057
|
onClick: b
|
|
1060
1058
|
}), /* @__PURE__ */ r(tt, {})]
|
|
@@ -1063,7 +1061,7 @@ const jt = h("div")(({
|
|
|
1063
1061
|
})
|
|
1064
1062
|
})
|
|
1065
1063
|
});
|
|
1066
|
-
},
|
|
1064
|
+
}, Mt = h("div", {
|
|
1067
1065
|
shouldForwardProp: (e) => e !== "inEdition"
|
|
1068
1066
|
})(({
|
|
1069
1067
|
theme: e,
|
|
@@ -1103,21 +1101,21 @@ const jt = h("div")(({
|
|
|
1103
1101
|
width: "100%",
|
|
1104
1102
|
display: "flex",
|
|
1105
1103
|
justifyContent: "space-between"
|
|
1106
|
-
})),
|
|
1104
|
+
})), xr = (e) => {
|
|
1107
1105
|
const t = rt();
|
|
1108
1106
|
return He(["dictionary_loaded"]) ? /* @__PURE__ */ r(St, {
|
|
1109
1107
|
...e,
|
|
1110
1108
|
children: /* @__PURE__ */ r(U.Consumer, {
|
|
1111
1109
|
children: ({
|
|
1112
1110
|
inEdition: o
|
|
1113
|
-
}) => t ? /* @__PURE__ */
|
|
1111
|
+
}) => t ? /* @__PURE__ */ w(Mt, {
|
|
1114
1112
|
id: "WrapperFilter",
|
|
1115
1113
|
inEdition: o,
|
|
1116
1114
|
children: [/* @__PURE__ */ r(te, {}), /* @__PURE__ */ r(ce, {}), /* @__PURE__ */ r(de, {}), /* @__PURE__ */ r(fe, {}), /* @__PURE__ */ r(pe, {})]
|
|
1117
|
-
}) : /* @__PURE__ */
|
|
1115
|
+
}) : /* @__PURE__ */ w(qt, {
|
|
1118
1116
|
id: "WrapperFilterMobile",
|
|
1119
1117
|
inEdition: o,
|
|
1120
|
-
children: [/* @__PURE__ */
|
|
1118
|
+
children: [/* @__PURE__ */ w(Nt, {
|
|
1121
1119
|
id: "ContainerFistRow",
|
|
1122
1120
|
children: [/* @__PURE__ */ r(te, {}), /* @__PURE__ */ r(ce, {}), /* @__PURE__ */ r(pe, {})]
|
|
1123
1121
|
}), /* @__PURE__ */ r(de, {}), /* @__PURE__ */ r(fe, {})]
|
|
@@ -1125,10 +1123,10 @@ const jt = h("div")(({
|
|
|
1125
1123
|
})
|
|
1126
1124
|
}) : /* @__PURE__ */ r(A, {});
|
|
1127
1125
|
};
|
|
1128
|
-
function
|
|
1129
|
-
return ["dynamic_filter"].concat(
|
|
1126
|
+
function Ir() {
|
|
1127
|
+
return ["dynamic_filter"].concat(Qe());
|
|
1130
1128
|
}
|
|
1131
|
-
const
|
|
1129
|
+
const wr = {
|
|
1132
1130
|
dynamic_filter: {
|
|
1133
1131
|
filter_tooltip: "Search",
|
|
1134
1132
|
operator_b: "between",
|
|
@@ -1151,8 +1149,8 @@ const Vr = {
|
|
|
1151
1149
|
}
|
|
1152
1150
|
};
|
|
1153
1151
|
export {
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1152
|
+
xr as D,
|
|
1153
|
+
wr as d,
|
|
1154
|
+
Ir as g,
|
|
1157
1155
|
T as u
|
|
1158
1156
|
};
|
|
@@ -1,34 +1,43 @@
|
|
|
1
1
|
import { styled as c } from "@mui/material";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { useTheme as
|
|
4
|
-
import { g as
|
|
5
|
-
import { jsx as
|
|
6
|
-
const
|
|
7
|
-
shouldForwardProp: (
|
|
2
|
+
import { useState as C, useMemo as l, useEffect as g } from "react";
|
|
3
|
+
import { useTheme as m } from "@mui/material/styles";
|
|
4
|
+
import { g as I } from "../../utils/index.214d9542.js";
|
|
5
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
6
|
+
const d = c("div", {
|
|
7
|
+
shouldForwardProp: (t) => t !== "src" && t !== "sizeIcon" && t !== "bgColor" && t !== "rotate"
|
|
8
8
|
})(({
|
|
9
|
-
size:
|
|
9
|
+
size: t,
|
|
10
10
|
src: L,
|
|
11
|
-
bgColor: e
|
|
11
|
+
bgColor: e,
|
|
12
|
+
rotate: i,
|
|
13
|
+
theme: s
|
|
12
14
|
}) => ({
|
|
13
15
|
maskPosition: "center!important",
|
|
14
16
|
maskRepeat: "no-repeat!important",
|
|
15
17
|
WebkitMaskRepeat: "no-repeat!important",
|
|
16
|
-
width:
|
|
17
|
-
height:
|
|
18
|
+
width: t,
|
|
19
|
+
height: t,
|
|
18
20
|
backgroundColor: e,
|
|
19
21
|
mask: `url('data:image/svg+xml;base64,${L}')`,
|
|
20
|
-
WebkitMask: `url('data:image/svg+xml;base64,${L}')
|
|
22
|
+
WebkitMask: `url('data:image/svg+xml;base64,${L}')`,
|
|
23
|
+
transition: s.transitions.create("transform", {
|
|
24
|
+
duration: s.transitions.duration.shorter
|
|
25
|
+
}),
|
|
26
|
+
...i && {
|
|
27
|
+
transform: "rotate(180deg)"
|
|
28
|
+
}
|
|
21
29
|
})), D = c("div")(() => ({
|
|
22
30
|
display: "flex",
|
|
23
31
|
justifyContent: "center",
|
|
24
32
|
alignItems: "center"
|
|
25
33
|
}));
|
|
26
|
-
function
|
|
34
|
+
function b(t) {
|
|
27
35
|
const {
|
|
28
36
|
src: L,
|
|
29
37
|
size: e = "small",
|
|
30
|
-
bgColor:
|
|
31
|
-
|
|
38
|
+
bgColor: i = "action.active",
|
|
39
|
+
rotate: s = !1
|
|
40
|
+
} = t, [r, n] = C(void 0), w = m(), u = l(() => {
|
|
32
41
|
switch (e) {
|
|
33
42
|
case "extra-small":
|
|
34
43
|
return "12px";
|
|
@@ -41,30 +50,33 @@ function A(M) {
|
|
|
41
50
|
}
|
|
42
51
|
return e;
|
|
43
52
|
}, [e]);
|
|
44
|
-
return
|
|
45
|
-
let
|
|
53
|
+
return g(() => {
|
|
54
|
+
let a = !0;
|
|
46
55
|
return async function() {
|
|
47
|
-
await fetch(L).then((
|
|
48
|
-
|
|
56
|
+
await fetch(L).then((M) => M.text() || "").then((M) => {
|
|
57
|
+
M = M.match(
|
|
49
58
|
/(<svg\b[^>]*\s*(viewBox="(\b[^"]*)").*?>([\s\S]*?)<\/svg>|<svg>([\s\S]*?)<\/svg>)/g
|
|
50
|
-
)?.toString() || "",
|
|
51
|
-
}).catch((
|
|
59
|
+
)?.toString() || "", a && n(window.btoa(M));
|
|
60
|
+
}).catch((M) => {
|
|
52
61
|
});
|
|
53
62
|
}(), function() {
|
|
54
|
-
|
|
63
|
+
a = !1;
|
|
55
64
|
};
|
|
56
|
-
}, [L]), /* @__PURE__ */
|
|
65
|
+
}, [L]), /* @__PURE__ */ o(D, {
|
|
57
66
|
className: "m4l_icon",
|
|
58
|
-
children:
|
|
59
|
-
src:
|
|
60
|
-
size:
|
|
61
|
-
bgColor:
|
|
62
|
-
|
|
67
|
+
children: r ? /* @__PURE__ */ o(d, {
|
|
68
|
+
src: r,
|
|
69
|
+
size: u,
|
|
70
|
+
bgColor: I(w.palette, i),
|
|
71
|
+
rotate: s
|
|
72
|
+
}) : /* @__PURE__ */ o("img", {
|
|
63
73
|
src: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjMuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkNhcGFfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiCgkgdmlld0JveD0iMCAwIDcwIDcwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA3MCA3MDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MHtmaWxsOiM2MzczODE7fQo8L3N0eWxlPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00NSw4LjdjMS40LTEuNSwzLjQtMi4zLDUuNC0yLjNzMy45LDAuOCw1LjQsMi4zczIuNCwzLjUsMi41LDUuN2MwLDIuMi0wLjksNC4yLTIuNCw1LjdzLTMuNSwyLjMtNS41LDIuMgoJCWMtMi4xLDAuMS00LTAuNy01LjUtMi4yYy0xLjQtMS41LTIuMy0zLjUtMi40LTUuN0M0Mi42LDEyLjIsNDMuNSwxMC4yLDQ1LDguN3oiLz4KCTxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik02OC40LDYyLjFjLTAuMywwLjUtMC43LDAuOC0xLjIsMS4xcy0xLDAuNC0xLjYsMC40SDQuM2MtMC42LDAtMS4xLTAuMS0xLjYtMC40cy0wLjktMC42LTEuMi0xLjEKCQljLTAuMi0wLjUtMC40LTEtMC40LTEuNXMwLjEtMS4xLDAuNC0xLjVsMjMtMzYuNGMwLjMtMC41LDAuNy0wLjgsMS4yLTEuMXMxLTAuNCwxLjYtMC40czEuMSwwLjEsMS42LDAuNHMwLjksMC42LDEuMiwxLjEKCQlsMTEuNSwxOC4yYzAuMiwwLjMsMC41LDAuNSwwLjgsMC43czAuNiwwLjMsMSwwLjNjMC4zLDAsMC43LTAuMSwxLTAuM3MwLjYtMC40LDAuOC0wLjdsMy4xLTQuOWMwLjMtMC41LDAuNy0wLjgsMS4yLTEuMQoJCXMxLTAuNCwxLjYtMC40czEuMSwwLjEsMS42LDAuNGMwLjUsMC4zLDAuOSwwLjYsMS4yLDEuMWwxNC42LDIzLjFjMC4zLDAuNSwwLjMsMSwwLjMsMS41UzY4LjcsNjEuNyw2OC40LDYyLjF6Ii8+CjwvZz4KPC9zdmc+Cg==",
|
|
64
|
-
alt: "icon_svg"
|
|
74
|
+
alt: "icon_svg",
|
|
75
|
+
width: u,
|
|
76
|
+
height: u
|
|
65
77
|
})
|
|
66
78
|
});
|
|
67
79
|
}
|
|
68
80
|
export {
|
|
69
|
-
|
|
81
|
+
b as I
|
|
70
82
|
};
|