@isettingkit/business-rules 2.0.2 → 2.0.4
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/dist/index.es.d.ts +21 -3
- package/dist/index.es.js +78 -66
- package/package.json +1 -1
package/dist/index.es.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export declare const BackAndNextButton: (props: IBackAndNextButton) => JSX.Eleme
|
|
|
14
14
|
|
|
15
15
|
export declare const buildEsConditionSentence: (opts: {
|
|
16
16
|
label: string;
|
|
17
|
-
howToSet:
|
|
17
|
+
howToSet: EValueHowToSetUp_2;
|
|
18
18
|
isFirst?: boolean;
|
|
19
19
|
}) => string;
|
|
20
20
|
|
|
@@ -45,7 +45,16 @@ export declare const DropdownMenu: (props: IDropdownMenu) => JSX.Element;
|
|
|
45
45
|
|
|
46
46
|
export declare const DropdownMenuContainer: (props: IDropdownMenuContainer) => JSX.Element;
|
|
47
47
|
|
|
48
|
-
declare enum EValueHowToSetUp {
|
|
48
|
+
export declare enum EValueHowToSetUp {
|
|
49
|
+
EQUAL = "EqualTo",
|
|
50
|
+
GREATER_THAN = "GreaterThan",
|
|
51
|
+
LESS_THAN = "LessThan",
|
|
52
|
+
LIST_OF_VALUES = "ListOfValues",
|
|
53
|
+
LIST_OF_VALUES_MULTI = "ListOfValuesMulti",
|
|
54
|
+
RANGE = "Range"
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
declare enum EValueHowToSetUp_2 {
|
|
49
58
|
EQUAL = "EqualTo",
|
|
50
59
|
GREATER_THAN = "GreaterThan",
|
|
51
60
|
LESS_THAN = "LessThan",
|
|
@@ -56,8 +65,12 @@ declare enum EValueHowToSetUp {
|
|
|
56
65
|
|
|
57
66
|
export declare const Filter: (props: IFilter) => JSX.Element;
|
|
58
67
|
|
|
68
|
+
export declare const filterByGroup: <T>(obj: Record<string, T[]>, pred: (c: T) => boolean) => Record<string, T[]>;
|
|
69
|
+
|
|
59
70
|
export declare const FilterModal: (props: IFilterModal) => ReactPortal;
|
|
60
71
|
|
|
72
|
+
export declare const flatFromGroups: <T>(obj: Record<string, T[]>) => T[];
|
|
73
|
+
|
|
61
74
|
export declare const formatDecisionForBackend: (props: {
|
|
62
75
|
decision: IRuleDecision;
|
|
63
76
|
fallbackId: string;
|
|
@@ -87,10 +100,13 @@ export declare const formatDecisionForBackend: (props: {
|
|
|
87
100
|
|
|
88
101
|
export declare const FormFilter: (props: IFormFilter) => JSX.Element;
|
|
89
102
|
|
|
103
|
+
export declare const getConditionsByGroup: (decision: IRuleDecision) => {};
|
|
104
|
+
|
|
90
105
|
export declare interface IBackAndNextButton extends Omit<IButton, "onClick" | "path" | "children"> {
|
|
91
106
|
handleBack: () => void;
|
|
92
107
|
handleNext: () => void;
|
|
93
|
-
|
|
108
|
+
disabledBack: boolean;
|
|
109
|
+
disabledNext: boolean;
|
|
94
110
|
loading: boolean;
|
|
95
111
|
textValues: {
|
|
96
112
|
back: string;
|
|
@@ -354,6 +370,8 @@ declare interface ITranslateOptions {
|
|
|
354
370
|
apiKey: string;
|
|
355
371
|
}
|
|
356
372
|
|
|
373
|
+
export declare const mapByGroup: <T, R>(obj: Record<string, T[]>, fn: (c: T, idx: number, arr: T[], group: string) => R) => Record<string, R[]>;
|
|
374
|
+
|
|
357
375
|
export declare const ModalRules: (props: IModalRules) => ReactPortal;
|
|
358
376
|
|
|
359
377
|
export declare const parseRangeFromString: (value: string | number | string[] | IValue | undefined) => string | number | IValue | string[] | {
|
package/dist/index.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as i, jsxs as v, Fragment as
|
|
1
|
+
import { jsx as i, jsxs as v, Fragment as G } from "react/jsx-runtime";
|
|
2
2
|
import { MdOutlineDelete as pn, MdClear as gn, MdAdd as fn, MdOutlineCreate as ft, MdExpandLess as ht, MdExpandMore as an, MdInfo as mt, MdCached as bt, MdOutlineInfo as vt, MdClose as yt, MdOutlineFilterAltOff as jn, MdOutlineFilterAlt as Bn, MdChevronRight as Dn, MdArrowRight as xt, MdOutlineArrowCircleLeft as wt, MdOutlineArrowCircleRight as Dt, MdOutlineChevronRight as Ct, MdOutlineError as Tt } from "react-icons/md";
|
|
3
3
|
import { inube as S, Stack as w, Divider as Z, Icon as O, Text as I, SkeletonLine as ie, useMediaQuery as re, Blanket as hn, Button as B, Grid as Xe, Box as St, Tag as me, SkeletonIcon as Et, Checkbox as Un, Date as Be, Fieldset as Le, Tabs as Nt, OptionList as kt, Checkpicker as $t, Toggle as _n, Label as At, OptionItem as It } from "@inubekit/inubekit";
|
|
4
4
|
import T, { keyframes as qn, ThemeContext as mn } from "styled-components";
|
|
5
5
|
import { ValueDataType as X, ValueHowToSetUp as te, DecisionConditionRenderNew as Cn, DecisionConditionRender as Tn } from "@isettingkit/input";
|
|
6
6
|
import { DecisionViewConditionRenderer as en, DecisionViewConditionRendererNew as Ve } from "@isettingkit/view";
|
|
7
7
|
import { createPortal as bn } from "react-dom";
|
|
8
|
-
import H, { useState as M, useRef as Ce, useEffect as ve, useContext as vn, forwardRef as Rt, useMemo as
|
|
9
|
-
import { useFormik as
|
|
8
|
+
import H, { useState as M, useRef as Ce, useEffect as ve, useContext as vn, forwardRef as Rt, useMemo as Gn, useCallback as Ft } from "react";
|
|
9
|
+
import { useFormik as Yn } from "formik";
|
|
10
10
|
import { string as Ne, mixed as We, object as le, number as Se, lazy as Ue, date as _e } from "yup";
|
|
11
11
|
import { Link as Xn, useLocation as Lt } from "react-router-dom";
|
|
12
12
|
import Pt from "axios";
|
|
@@ -50,7 +50,7 @@ const yn = (e) => {
|
|
|
50
50
|
const { children: n, controls: t = !0, handleDelete: r, id: o } = e;
|
|
51
51
|
return /* @__PURE__ */ i(Mt, { children: /* @__PURE__ */ v(w, { direction: "column", gap: "16px", padding: "12px 16px", children: [
|
|
52
52
|
n,
|
|
53
|
-
t && /* @__PURE__ */ v(
|
|
53
|
+
t && /* @__PURE__ */ v(G, { children: [
|
|
54
54
|
/* @__PURE__ */ i(Z, {}),
|
|
55
55
|
/* @__PURE__ */ i(w, { gap: "16px", justifyContent: "end", children: /* @__PURE__ */ i(
|
|
56
56
|
O,
|
|
@@ -108,7 +108,7 @@ const qt = {
|
|
|
108
108
|
background-color: #ebecf0;
|
|
109
109
|
border-radius: 8px;
|
|
110
110
|
}
|
|
111
|
-
`,
|
|
111
|
+
`, Gt = (e) => {
|
|
112
112
|
const {
|
|
113
113
|
conditionsAlignment: n,
|
|
114
114
|
decision: t,
|
|
@@ -161,7 +161,7 @@ const qt = {
|
|
|
161
161
|
}
|
|
162
162
|
) }) }, p.conditionName)),
|
|
163
163
|
c.length > 0 && /* @__PURE__ */ i(Z, { dashed: !0 }),
|
|
164
|
-
d && /* @__PURE__ */ i(
|
|
164
|
+
d && /* @__PURE__ */ i(G, { children: r && /* @__PURE__ */ i(
|
|
165
165
|
en,
|
|
166
166
|
{
|
|
167
167
|
element: r.element,
|
|
@@ -245,7 +245,7 @@ const qt = {
|
|
|
245
245
|
(f) => !f.hidden
|
|
246
246
|
)) || [], c = Array.from({ length: 5 }), p = !!(!t && n && r && d), u = s.length < 2 ? "start" : "space-between";
|
|
247
247
|
return /* @__PURE__ */ i(
|
|
248
|
-
|
|
248
|
+
Gt,
|
|
249
249
|
{
|
|
250
250
|
conditionsAlignment: u,
|
|
251
251
|
decision: n,
|
|
@@ -258,7 +258,7 @@ const qt = {
|
|
|
258
258
|
visibleConditions: s
|
|
259
259
|
}
|
|
260
260
|
);
|
|
261
|
-
},
|
|
261
|
+
}, Yt = T.div`
|
|
262
262
|
position: relative;
|
|
263
263
|
& > div {
|
|
264
264
|
padding: 24px 16px;
|
|
@@ -302,7 +302,7 @@ const qt = {
|
|
|
302
302
|
);
|
|
303
303
|
const l = re("(max-width: 400px)");
|
|
304
304
|
return bn(
|
|
305
|
-
/* @__PURE__ */ i(
|
|
305
|
+
/* @__PURE__ */ i(Yt, { smallScreen: l, children: /* @__PURE__ */ i(hn, { children: /* @__PURE__ */ i(Xt, { children: /* @__PURE__ */ v(w, { direction: "column", gap: "24px", children: [
|
|
306
306
|
/* @__PURE__ */ i(w, { direction: "column", gap: "24px", children: /* @__PURE__ */ v(w, { alignItems: "center", justifyContent: "space-between", children: [
|
|
307
307
|
/* @__PURE__ */ i(I, { type: "title", size: "large", appearance: "dark", weight: "bold", children: o }),
|
|
308
308
|
/* @__PURE__ */ i(gn, { size: "24px", cursor: "pointer", onClick: r })
|
|
@@ -513,7 +513,7 @@ const Qt = T.div`
|
|
|
513
513
|
handleDelete: f,
|
|
514
514
|
textValues: a
|
|
515
515
|
}), C = (o == null ? void 0 : o.length) === 0 && !c;
|
|
516
|
-
return /* @__PURE__ */ v(
|
|
516
|
+
return /* @__PURE__ */ v(G, { children: [
|
|
517
517
|
/* @__PURE__ */ i(Kt, { children: /* @__PURE__ */ i(Zt, { children: /* @__PURE__ */ i(w, { direction: "column", gap: "16px", padding: "6px", children: C ? /* @__PURE__ */ v(
|
|
518
518
|
w,
|
|
519
519
|
{
|
|
@@ -524,7 +524,7 @@ const Qt = T.div`
|
|
|
524
524
|
justifyContent: "center",
|
|
525
525
|
alignItems: "center",
|
|
526
526
|
children: [
|
|
527
|
-
/* @__PURE__ */ i(I, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ v(
|
|
527
|
+
/* @__PURE__ */ i(I, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ v(G, { children: [
|
|
528
528
|
"Aún NO tienes definidas tasas de interés efectivas . Presiona",
|
|
529
529
|
/* @__PURE__ */ v(
|
|
530
530
|
I,
|
|
@@ -811,7 +811,7 @@ const gr = T.div`
|
|
|
811
811
|
},
|
|
812
812
|
t.ruleName
|
|
813
813
|
) }),
|
|
814
|
-
s && /* @__PURE__ */ v(
|
|
814
|
+
s && /* @__PURE__ */ v(G, { children: [
|
|
815
815
|
/* @__PURE__ */ i(Z, { dashed: !0 }),
|
|
816
816
|
/* @__PURE__ */ v(w, { direction: "column", gap: "12px", children: [
|
|
817
817
|
/* @__PURE__ */ i(
|
|
@@ -1369,7 +1369,7 @@ function Pr({
|
|
|
1369
1369
|
) : u.notRequired()
|
|
1370
1370
|
));
|
|
1371
1371
|
const s = le(d);
|
|
1372
|
-
return l =
|
|
1372
|
+
return l = Yn({
|
|
1373
1373
|
initialValues: a,
|
|
1374
1374
|
validationSchema: s,
|
|
1375
1375
|
validateOnBlur: !0,
|
|
@@ -1550,7 +1550,7 @@ const Or = T.div`
|
|
|
1550
1550
|
onCloseRedefineConfirm: y,
|
|
1551
1551
|
onConfirmRedefine: D
|
|
1552
1552
|
} = e;
|
|
1553
|
-
return /* @__PURE__ */ v(
|
|
1553
|
+
return /* @__PURE__ */ v(G, { children: [
|
|
1554
1554
|
/* @__PURE__ */ i("form", { onSubmit: o.handleSubmit, children: /* @__PURE__ */ v(w, { direction: "column", gap: "24px", width: "100%", children: [
|
|
1555
1555
|
/* @__PURE__ */ i(Le, { legend: "Decisión N° 01", spacing: "wide", children: /* @__PURE__ */ i(w, { justifyContent: "center", width: "-webkit-fill-available", children: Cn({
|
|
1556
1556
|
condition: a,
|
|
@@ -1806,7 +1806,7 @@ const Or = T.div`
|
|
|
1806
1806
|
isOpenFor: ($) => D === $,
|
|
1807
1807
|
toggleAt: ($) => C((z) => z === $ ? null : $)
|
|
1808
1808
|
}), L = (o == null ? void 0 : o.length) === 0 && !c;
|
|
1809
|
-
return /* @__PURE__ */ v(
|
|
1809
|
+
return /* @__PURE__ */ v(G, { children: [
|
|
1810
1810
|
/* @__PURE__ */ i(xr, { children: /* @__PURE__ */ i(wr, { children: /* @__PURE__ */ i(w, { direction: "column", gap: "16px", padding: "6px", children: L ? /* @__PURE__ */ i(Le, { legend: "Decisiones", children: /* @__PURE__ */ v(
|
|
1811
1811
|
w,
|
|
1812
1812
|
{
|
|
@@ -1834,7 +1834,7 @@ const Or = T.div`
|
|
|
1834
1834
|
children: "Sin decisiones"
|
|
1835
1835
|
}
|
|
1836
1836
|
),
|
|
1837
|
-
/* @__PURE__ */ i(I, { as: "span", size: "medium", appearance: "gray", children: r || /* @__PURE__ */ v(
|
|
1837
|
+
/* @__PURE__ */ i(I, { as: "span", size: "medium", appearance: "gray", children: r || /* @__PURE__ */ v(G, { children: [
|
|
1838
1838
|
"Aun no tienes decisiones definidas, para empezar haz clic en",
|
|
1839
1839
|
t || ' "Agregar decisión"'
|
|
1840
1840
|
] }) })
|
|
@@ -1971,7 +1971,7 @@ const _r = T.div`
|
|
|
1971
1971
|
pointer-events: none;
|
|
1972
1972
|
height: 0;
|
|
1973
1973
|
overflow: hidden;
|
|
1974
|
-
`,
|
|
1974
|
+
`, Gr = T.div`
|
|
1975
1975
|
cursor: pointer;
|
|
1976
1976
|
`, dn = {
|
|
1977
1977
|
border: {
|
|
@@ -2009,7 +2009,7 @@ const _r = T.div`
|
|
|
2009
2009
|
hover: S.palette.neutral.N30
|
|
2010
2010
|
}
|
|
2011
2011
|
}
|
|
2012
|
-
},
|
|
2012
|
+
}, Yr = T.li`
|
|
2013
2013
|
display: flex;
|
|
2014
2014
|
align-items: center;
|
|
2015
2015
|
align-self: stretch;
|
|
@@ -2031,7 +2031,7 @@ const _r = T.div`
|
|
|
2031
2031
|
var g, f, b, x, m, y;
|
|
2032
2032
|
const { id: n, label: t, leadingIcon: r, onClose: o } = e, [a, l] = M(!1), d = () => l(!0), s = () => l(!1), c = vn(mn), p = ((b = (f = (g = c == null ? void 0 : c.input) == null ? void 0 : g.option) == null ? void 0 : f.appearance) == null ? void 0 : b.hover) ?? dn.option.appearance.hover, u = ((y = (m = (x = c == null ? void 0 : c.input) == null ? void 0 : x.option) == null ? void 0 : m.appearance) == null ? void 0 : y.regular) ?? dn.option.appearance.regular;
|
|
2033
2033
|
return /* @__PURE__ */ i(
|
|
2034
|
-
|
|
2034
|
+
Yr,
|
|
2035
2035
|
{
|
|
2036
2036
|
id: n,
|
|
2037
2037
|
onMouseEnter: d,
|
|
@@ -2139,7 +2139,7 @@ const _r = T.div`
|
|
|
2139
2139
|
alignItems: "center",
|
|
2140
2140
|
padding: "0px 8px",
|
|
2141
2141
|
border: !0,
|
|
2142
|
-
children: y ? /* @__PURE__ */ i(I, { size: "small", type: "label", appearance: "gray", children: o }) : /* @__PURE__ */ v(
|
|
2142
|
+
children: y ? /* @__PURE__ */ i(I, { size: "small", type: "label", appearance: "gray", children: o }) : /* @__PURE__ */ v(G, { children: [
|
|
2143
2143
|
p.map((E) => /* @__PURE__ */ i(
|
|
2144
2144
|
me,
|
|
2145
2145
|
{
|
|
@@ -2159,7 +2159,7 @@ const _r = T.div`
|
|
|
2159
2159
|
ref: c,
|
|
2160
2160
|
style: { position: "relative", display: "inline-block" },
|
|
2161
2161
|
children: [
|
|
2162
|
-
/* @__PURE__ */ i(
|
|
2162
|
+
/* @__PURE__ */ i(Gr, { onClick: m, children: /* @__PURE__ */ i(
|
|
2163
2163
|
me,
|
|
2164
2164
|
{
|
|
2165
2165
|
appearance: "primary",
|
|
@@ -2294,7 +2294,7 @@ const _r = T.div`
|
|
|
2294
2294
|
}, pi = (e) => {
|
|
2295
2295
|
const { appliedFilters: n, fields: t, onChange: r, noFiltersLabel: o } = e, a = re("(max-width: 768px)"), l = !n || n.length === 0;
|
|
2296
2296
|
return /* @__PURE__ */ v(w, { direction: "column", gap: "16px", children: [
|
|
2297
|
-
a && /* @__PURE__ */ v(
|
|
2297
|
+
a && /* @__PURE__ */ v(G, { children: [
|
|
2298
2298
|
/* @__PURE__ */ v(w, { gap: "6px", width: "100%", alignItems: "center", children: [
|
|
2299
2299
|
/* @__PURE__ */ i(O, { appearance: "gray", icon: /* @__PURE__ */ i(Bn, {}) }),
|
|
2300
2300
|
/* @__PURE__ */ i(
|
|
@@ -2568,7 +2568,7 @@ function to({
|
|
|
2568
2568
|
) : c.notRequired()
|
|
2569
2569
|
));
|
|
2570
2570
|
const l = le(a);
|
|
2571
|
-
return o =
|
|
2571
|
+
return o = Yn({
|
|
2572
2572
|
initialValues: r,
|
|
2573
2573
|
validationSchema: l,
|
|
2574
2574
|
validateOnBlur: !0,
|
|
@@ -2650,7 +2650,7 @@ const ro = T.div`
|
|
|
2650
2650
|
};
|
|
2651
2651
|
return ve(() => {
|
|
2652
2652
|
c(n);
|
|
2653
|
-
}, [n]), /* @__PURE__ */ v(
|
|
2653
|
+
}, [n]), /* @__PURE__ */ v(G, { children: [
|
|
2654
2654
|
/* @__PURE__ */ i(w, { children: /* @__PURE__ */ i(
|
|
2655
2655
|
_n,
|
|
2656
2656
|
{
|
|
@@ -2663,7 +2663,7 @@ const ro = T.div`
|
|
|
2663
2663
|
children: /* @__PURE__ */ i(I, { size: "medium", type: "label", weight: "bold", children: a })
|
|
2664
2664
|
}
|
|
2665
2665
|
) }),
|
|
2666
|
-
s && /* @__PURE__ */ i(
|
|
2666
|
+
s && /* @__PURE__ */ i(G, { children: t })
|
|
2667
2667
|
] });
|
|
2668
2668
|
}, io = (e) => {
|
|
2669
2669
|
const {
|
|
@@ -2687,7 +2687,7 @@ const ro = T.div`
|
|
|
2687
2687
|
}, R = ($) => {
|
|
2688
2688
|
C($.target.value), t($);
|
|
2689
2689
|
}, L = re("(max-width: 400px)");
|
|
2690
|
-
return /* @__PURE__ */ v(
|
|
2690
|
+
return /* @__PURE__ */ v(G, { children: [
|
|
2691
2691
|
/* @__PURE__ */ v(w, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
|
|
2692
2692
|
/* @__PURE__ */ i(
|
|
2693
2693
|
I,
|
|
@@ -2823,7 +2823,7 @@ const ro = T.div`
|
|
|
2823
2823
|
]
|
|
2824
2824
|
}
|
|
2825
2825
|
) }) }),
|
|
2826
|
-
t.terms && /* @__PURE__ */ v(
|
|
2826
|
+
t.terms && /* @__PURE__ */ v(G, { children: [
|
|
2827
2827
|
/* @__PURE__ */ i(Z, { dashed: !0 }),
|
|
2828
2828
|
/* @__PURE__ */ i(
|
|
2829
2829
|
io,
|
|
@@ -3363,14 +3363,14 @@ function No({
|
|
|
3363
3363
|
}) {
|
|
3364
3364
|
var s, c, p;
|
|
3365
3365
|
if (!wn) return;
|
|
3366
|
-
In || (In =
|
|
3366
|
+
In || (In = Ge(document, {
|
|
3367
3367
|
dragover: So,
|
|
3368
3368
|
pointerdown: wo,
|
|
3369
3369
|
pointerup: Do,
|
|
3370
3370
|
keydown: Co,
|
|
3371
3371
|
drop: To,
|
|
3372
3372
|
pointermove: Eo,
|
|
3373
|
-
pointercancel:
|
|
3373
|
+
pointercancel: Y(r.handlePointercancel),
|
|
3374
3374
|
touchmove: (u) => {
|
|
3375
3375
|
_(h) && u.cancelable && U(u);
|
|
3376
3376
|
},
|
|
@@ -3386,7 +3386,7 @@ function No({
|
|
|
3386
3386
|
dragEffectAllowed: r.dragEffectAllowed ?? "move",
|
|
3387
3387
|
draggedNodes: Ho,
|
|
3388
3388
|
dragstartClasses: _o,
|
|
3389
|
-
handleNodeKeydown:
|
|
3389
|
+
handleNodeKeydown: Go,
|
|
3390
3390
|
handleDragstart: Bo,
|
|
3391
3391
|
handleNodeDragover: ra,
|
|
3392
3392
|
handleParentDragover: oa,
|
|
@@ -3398,7 +3398,7 @@ function No({
|
|
|
3398
3398
|
handleDragend: Ko,
|
|
3399
3399
|
handleParentFocus: $o,
|
|
3400
3400
|
handleNodePointerup: ea,
|
|
3401
|
-
handleNodePointerover:
|
|
3401
|
+
handleNodePointerover: Yo,
|
|
3402
3402
|
handleParentPointerover: aa,
|
|
3403
3403
|
handleParentScroll: jo,
|
|
3404
3404
|
handleNodePointerdown: Uo,
|
|
@@ -3592,7 +3592,7 @@ function W(e) {
|
|
|
3592
3592
|
return "synthDragging" in e && !!e.synthDragging;
|
|
3593
3593
|
}
|
|
3594
3594
|
function Ro(e, n) {
|
|
3595
|
-
n.abortControllers.mainParent =
|
|
3595
|
+
n.abortControllers.mainParent = Ge(e, {
|
|
3596
3596
|
dragover: je(n.config.handleParentDragover),
|
|
3597
3597
|
handleParentPointerover: n.config.handleParentPointerover,
|
|
3598
3598
|
scroll: je(n.config.handleParentScroll),
|
|
@@ -3602,7 +3602,7 @@ function Ro(e, n) {
|
|
|
3602
3602
|
r && (r.nestedParent = t.detail.parent);
|
|
3603
3603
|
},
|
|
3604
3604
|
focus: je(n.config.handleParentFocus)
|
|
3605
|
-
}), n.config.externalDragHandle && n.config.externalDragHandle.el && n.config.externalDragHandle.callback && (n.abortControllers.externalDragHandle =
|
|
3605
|
+
}), n.config.externalDragHandle && n.config.externalDragHandle.el && n.config.externalDragHandle.callback && (n.abortControllers.externalDragHandle = Ge(
|
|
3606
3606
|
n.config.externalDragHandle.el,
|
|
3607
3607
|
{
|
|
3608
3608
|
pointerdown: (t) => {
|
|
@@ -3638,19 +3638,19 @@ function Ro(e, n) {
|
|
|
3638
3638
|
function Fo(e) {
|
|
3639
3639
|
var t;
|
|
3640
3640
|
const n = e.parent.data.config;
|
|
3641
|
-
e.node.data.abortControllers.mainNode =
|
|
3642
|
-
keydown:
|
|
3643
|
-
dragstart:
|
|
3644
|
-
dragover:
|
|
3645
|
-
dragenter:
|
|
3646
|
-
dragleave:
|
|
3647
|
-
dragend:
|
|
3648
|
-
drop:
|
|
3649
|
-
focus:
|
|
3650
|
-
blur:
|
|
3651
|
-
pointerup:
|
|
3652
|
-
pointercancel:
|
|
3653
|
-
pointerdown:
|
|
3641
|
+
e.node.data.abortControllers.mainNode = Ge(e.node.el, {
|
|
3642
|
+
keydown: Y(n.handleNodeKeydown),
|
|
3643
|
+
dragstart: Y(n.handleDragstart),
|
|
3644
|
+
dragover: Y(n.handleNodeDragover),
|
|
3645
|
+
dragenter: Y(n.handleNodeDragenter),
|
|
3646
|
+
dragleave: Y(n.handleNodeDragleave),
|
|
3647
|
+
dragend: Y(n.handleDragend),
|
|
3648
|
+
drop: Y(n.handleNodeDrop),
|
|
3649
|
+
focus: Y(n.handleNodeFocus),
|
|
3650
|
+
blur: Y(n.handleNodeBlur),
|
|
3651
|
+
pointerup: Y(n.handleNodePointerup),
|
|
3652
|
+
pointercancel: Y(n.handlePointercancel),
|
|
3653
|
+
pointerdown: Y(n.handleNodePointerdown),
|
|
3654
3654
|
handleNodePointerover: n.handleNodePointerover,
|
|
3655
3655
|
touchmove: (r) => {
|
|
3656
3656
|
_(h) && r.cancelable && U(r);
|
|
@@ -4004,9 +4004,9 @@ function ut({
|
|
|
4004
4004
|
if (a === l || l.contains(a)) return !0;
|
|
4005
4005
|
return !1;
|
|
4006
4006
|
}
|
|
4007
|
-
function Yo(e) {
|
|
4008
|
-
}
|
|
4009
4007
|
function Go(e) {
|
|
4008
|
+
}
|
|
4009
|
+
function Yo(e) {
|
|
4010
4010
|
e.detail.targetData.parent.el === e.detail.state.currentParent.el ? gt(e.detail, e.detail.state) : Ke(e.detail, e.detail.state);
|
|
4011
4011
|
}
|
|
4012
4012
|
function Xo(e, n) {
|
|
@@ -4290,7 +4290,7 @@ function gt(e, n) {
|
|
|
4290
4290
|
targetNodes: [e.targetData.node]
|
|
4291
4291
|
});
|
|
4292
4292
|
}
|
|
4293
|
-
function
|
|
4293
|
+
function Y(e) {
|
|
4294
4294
|
function n(t) {
|
|
4295
4295
|
const r = ne.get(t);
|
|
4296
4296
|
if (!r) return;
|
|
@@ -4512,7 +4512,7 @@ function pa(e) {
|
|
|
4512
4512
|
function Je(e) {
|
|
4513
4513
|
return e instanceof HTMLElement && e.parentNode instanceof HTMLElement;
|
|
4514
4514
|
}
|
|
4515
|
-
function
|
|
4515
|
+
function Ge(e, n) {
|
|
4516
4516
|
const t = new AbortController();
|
|
4517
4517
|
for (const r in n) {
|
|
4518
4518
|
const o = n[r];
|
|
@@ -4534,18 +4534,18 @@ function fa(e, n) {
|
|
|
4534
4534
|
const t = ga(e);
|
|
4535
4535
|
t && n(t);
|
|
4536
4536
|
}
|
|
4537
|
-
var
|
|
4537
|
+
var Ye = /* @__PURE__ */ new WeakMap();
|
|
4538
4538
|
function ha(e) {
|
|
4539
|
-
const n =
|
|
4539
|
+
const n = Ye.get(e);
|
|
4540
4540
|
return n ? n[0] : (console.warn("No values found for parent element"), []);
|
|
4541
4541
|
}
|
|
4542
4542
|
function ma(e, n) {
|
|
4543
|
-
const t =
|
|
4544
|
-
t && t[1](e),
|
|
4543
|
+
const t = Ye.get(n);
|
|
4544
|
+
t && t[1](e), Ye.set(n, [e, t[1]]);
|
|
4545
4545
|
}
|
|
4546
4546
|
function ba(e, n) {
|
|
4547
4547
|
return (t) => {
|
|
4548
|
-
|
|
4548
|
+
Ye.set(t, n), No({ parent: t, getValues: ha, setValues: ma, config: e });
|
|
4549
4549
|
};
|
|
4550
4550
|
}
|
|
4551
4551
|
function Pn(e) {
|
|
@@ -4781,7 +4781,7 @@ const On = {
|
|
|
4781
4781
|
}
|
|
4782
4782
|
}
|
|
4783
4783
|
`, Di = (e) => {
|
|
4784
|
-
const { handleBack: n, handleNext: t,
|
|
4784
|
+
const { handleBack: n, handleNext: t, disabledBack: r, disabledNext: o, textValues: a } = e;
|
|
4785
4785
|
return /* @__PURE__ */ v(Da, { children: [
|
|
4786
4786
|
/* @__PURE__ */ i(
|
|
4787
4787
|
B,
|
|
@@ -4790,7 +4790,8 @@ const On = {
|
|
|
4790
4790
|
iconBefore: /* @__PURE__ */ i(wt, {}),
|
|
4791
4791
|
variant: "none",
|
|
4792
4792
|
onClick: n,
|
|
4793
|
-
children:
|
|
4793
|
+
children: a.back,
|
|
4794
|
+
disabled: r
|
|
4794
4795
|
}
|
|
4795
4796
|
),
|
|
4796
4797
|
/* @__PURE__ */ i(
|
|
@@ -4800,7 +4801,8 @@ const On = {
|
|
|
4800
4801
|
iconBefore: /* @__PURE__ */ i(Dt, {}),
|
|
4801
4802
|
variant: "none",
|
|
4802
4803
|
onClick: t,
|
|
4803
|
-
children:
|
|
4804
|
+
children: a.next,
|
|
4805
|
+
disabled: o
|
|
4804
4806
|
}
|
|
4805
4807
|
)
|
|
4806
4808
|
] });
|
|
@@ -5074,7 +5076,7 @@ const Ia = (e) => {
|
|
|
5074
5076
|
onOptionClick: xe,
|
|
5075
5077
|
onCheckboxChange: we,
|
|
5076
5078
|
handleClear: pe
|
|
5077
|
-
} = e, J = vn(mn), $e = ((Ie = (ae = J == null ? void 0 : J.input) == null ? void 0 : ae.required) == null ? void 0 : Ie.appearance) || ee.required.appearance, De = b && !r, ge = y || m === "" ? "" : zn(g, m), fe =
|
|
5079
|
+
} = e, J = vn(mn), $e = ((Ie = (ae = J == null ? void 0 : J.input) == null ? void 0 : ae.required) == null ? void 0 : Ie.appearance) || ee.required.appearance, De = b && !r, ge = y || m === "" ? "" : zn(g, m), fe = Gn(
|
|
5078
5080
|
() => g.filter((P) => C.includes(P.id)),
|
|
5079
5081
|
[g, C]
|
|
5080
5082
|
), Ae = (P, F) => {
|
|
@@ -5276,7 +5278,7 @@ const Ia = (e) => {
|
|
|
5276
5278
|
ve(() => (document.addEventListener("click", ge), () => {
|
|
5277
5279
|
document.removeEventListener("click", ge);
|
|
5278
5280
|
}), [ge]);
|
|
5279
|
-
const P =
|
|
5281
|
+
const P = Gn(() => L || k ? b : [{ id: "empty-option", label: "", value: "" }, ...b], [b, L, k]);
|
|
5280
5282
|
return /* @__PURE__ */ i(
|
|
5281
5283
|
Ra,
|
|
5282
5284
|
{
|
|
@@ -5400,7 +5402,12 @@ function ja(e) {
|
|
|
5400
5402
|
return "sea";
|
|
5401
5403
|
}
|
|
5402
5404
|
}
|
|
5403
|
-
const
|
|
5405
|
+
const Si = (e) => Object.values(e).flat(), Ei = (e, n) => Object.fromEntries(
|
|
5406
|
+
Object.entries(e).map(([t, r]) => [
|
|
5407
|
+
t,
|
|
5408
|
+
r.map((o, a, l) => n(o, a, l, t))
|
|
5409
|
+
])
|
|
5410
|
+
), Fe = /* @__PURE__ */ new Map(), Ba = (e, n) => Fe.get(`${n}:${e}`), Ua = (e, n, t) => {
|
|
5404
5411
|
const r = `${n}:${e}`;
|
|
5405
5412
|
if (Fe.set(r, t), Fe.size > 1e3) {
|
|
5406
5413
|
const o = Fe.keys().next().value;
|
|
@@ -5409,7 +5416,7 @@ const Fe = /* @__PURE__ */ new Map(), Ba = (e, n) => Fe.get(`${n}:${e}`), Ua = (
|
|
|
5409
5416
|
}, Vn = /* @__PURE__ */ new Map(), _a = 1e3, qa = (e) => {
|
|
5410
5417
|
const n = Date.now(), t = Vn.get(e) || 0;
|
|
5411
5418
|
return n - t < _a ? !0 : (Vn.set(e, n), !1);
|
|
5412
|
-
},
|
|
5419
|
+
}, Ga = (e) => {
|
|
5413
5420
|
const n = Ot(e);
|
|
5414
5421
|
return {
|
|
5415
5422
|
spa: "es",
|
|
@@ -5419,12 +5426,12 @@ const Fe = /* @__PURE__ */ new Map(), Ba = (e, n) => Fe.get(`${n}:${e}`), Ua = (
|
|
|
5419
5426
|
ita: "it",
|
|
5420
5427
|
por: "pt"
|
|
5421
5428
|
}[n] || "en";
|
|
5422
|
-
},
|
|
5429
|
+
}, Ya = async (e, n, { url: t, apiKey: r }) => {
|
|
5423
5430
|
const o = `${n}:${e}`, a = Ba(e, n);
|
|
5424
5431
|
if (a) return a;
|
|
5425
5432
|
if (qa(o))
|
|
5426
5433
|
return console.warn(`[Throttle] Skipped translation for: "${e}"`), e;
|
|
5427
|
-
const l =
|
|
5434
|
+
const l = Ga(e);
|
|
5428
5435
|
try {
|
|
5429
5436
|
const { data: d } = await Pt.post(
|
|
5430
5437
|
t,
|
|
@@ -5448,7 +5455,7 @@ const Fe = /* @__PURE__ */ new Map(), Ba = (e, n) => Fe.get(`${n}:${e}`), Ua = (
|
|
|
5448
5455
|
const r = await Promise.all(
|
|
5449
5456
|
Object.entries(e).map(async ([o, a]) => {
|
|
5450
5457
|
if (Xa(a)) {
|
|
5451
|
-
const l = await
|
|
5458
|
+
const l = await Ya(a, n, t);
|
|
5452
5459
|
return [o, l];
|
|
5453
5460
|
} else if (Array.isArray(a)) {
|
|
5454
5461
|
const l = await Promise.all(
|
|
@@ -5479,6 +5486,7 @@ export {
|
|
|
5479
5486
|
Mn as DraggableList,
|
|
5480
5487
|
mo as DropdownMenu,
|
|
5481
5488
|
yi as DropdownMenuContainer,
|
|
5489
|
+
et as EValueHowToSetUp,
|
|
5482
5490
|
ci as Filter,
|
|
5483
5491
|
ui as FilterModal,
|
|
5484
5492
|
pi as FormFilter,
|
|
@@ -5487,12 +5495,16 @@ export {
|
|
|
5487
5495
|
wi as SendButton,
|
|
5488
5496
|
Ti as buildEsConditionSentence,
|
|
5489
5497
|
Qr as convertRangeToString,
|
|
5498
|
+
Zn as filterByGroup,
|
|
5499
|
+
Si as flatFromGroups,
|
|
5490
5500
|
gi as formatDecisionForBackend,
|
|
5501
|
+
qe as getConditionsByGroup,
|
|
5502
|
+
Ei as mapByGroup,
|
|
5491
5503
|
fi as parseRangeFromString,
|
|
5492
5504
|
hi as revertSortedDataSampleSwitchPlaces,
|
|
5493
5505
|
mi as revertSortedDataSwitchPlaces,
|
|
5494
5506
|
bi as sortDisplayDataSampleSwitchPlaces,
|
|
5495
5507
|
vi as sortDisplayDataSwitchPlaces,
|
|
5496
5508
|
Hn as translateObject,
|
|
5497
|
-
|
|
5509
|
+
Ya as translateText
|
|
5498
5510
|
};
|