@isettingkit/business-rules 2.1.10 → 2.1.11
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 +11 -2
- package/dist/index.es.js +187 -177
- package/package.json +1 -1
package/dist/index.es.d.ts
CHANGED
|
@@ -103,7 +103,12 @@ export declare const formatDecisionForBackend: (props: {
|
|
|
103
103
|
|
|
104
104
|
export declare const FormFilter: (props: IFormFilter) => JSX.Element;
|
|
105
105
|
|
|
106
|
-
export declare const
|
|
106
|
+
export declare const getConditionsByGroupNew: (raw: any) => Record<string, any[]>;
|
|
107
|
+
|
|
108
|
+
export declare const groupsRecordToArrayNew: (record: Record<string, any[]>) => {
|
|
109
|
+
ConditionGroupId: string;
|
|
110
|
+
conditionsThatEstablishesTheDecision: any[];
|
|
111
|
+
}[];
|
|
107
112
|
|
|
108
113
|
export declare interface IBackAndNextButton extends Omit<IButton, "onClick" | "path" | "children"> {
|
|
109
114
|
handleBack: () => void;
|
|
@@ -411,10 +416,14 @@ declare interface ITranslateOptions {
|
|
|
411
416
|
apiKey: string;
|
|
412
417
|
}
|
|
413
418
|
|
|
414
|
-
export declare const
|
|
419
|
+
export declare const mapByGroupNew: (raw: any, mapFn: (condition: any) => any) => Record<string, any[]>;
|
|
415
420
|
|
|
416
421
|
export declare const ModalRules: (props: IModalRules) => ReactPortal;
|
|
417
422
|
|
|
423
|
+
export declare const normalizeDecisionToNewShape: <T extends {
|
|
424
|
+
[k: string]: any;
|
|
425
|
+
}>(decision: T) => T;
|
|
426
|
+
|
|
418
427
|
export declare const parseRangeFromString: (value: string | number | string[] | IValue | undefined) => string | number | IValue | string[] | {
|
|
419
428
|
from?: number;
|
|
420
429
|
to?: number;
|
package/dist/index.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as a, jsxs as m, Fragment as O } from "react/jsx-runtime";
|
|
2
|
-
import { MdOutlineDelete as
|
|
3
|
-
import { inube as E, Stack as v, Divider as B, Icon as M, Text as $, SkeletonLine as J, useMediaQuery as te, Blanket as
|
|
2
|
+
import { MdOutlineDelete as ln, MdClear as sn, MdAdd as Ye, MdOutlineCreate as Ft, MdExpandLess as Lt, MdExpandMore as Tn, MdInfo as Ot, MdCached as Pt, MdOutlineInfo as Mt, MdClose as zt, MdOutlineFilterAltOff as it, MdOutlineFilterAlt as lt, MdChevronRight as zn, MdArrowRight as Vt, MdOutlineArrowCircleLeft as jt, MdOutlineArrowCircleRight as Ut, MdOutlineChevronRight as _t, MdOutlineError as Ht } from "react-icons/md";
|
|
3
|
+
import { inube as E, Stack as v, Divider as B, Icon as M, Text as $, SkeletonLine as J, useMediaQuery as te, Blanket as dn, Button as q, Grid as We, Toggle as cn, Checkbox as kn, Date as Fe, Box as qt, Tag as De, Tabs as st, SkeletonIcon as Bt, Fieldset as Ue, OptionList as Gt, Checkpicker as Yt, Label as Wt, OptionItem as Xt } from "@inubekit/inubekit";
|
|
4
4
|
import w, { keyframes as An, ThemeContext as $n } from "styled-components";
|
|
5
|
-
import { ValueDataType as j, ValueHowToSetUp as ee, DecisionConditionRender as
|
|
5
|
+
import { ValueDataType as j, ValueHowToSetUp as ee, DecisionConditionRender as rn, DecisionConditionRenderNew as Vn } from "@isettingkit/input";
|
|
6
6
|
import { DecisionViewConditionRenderer as $e, DecisionViewConditionRendererNew as Ke } from "@isettingkit/view";
|
|
7
|
-
import { createPortal as
|
|
7
|
+
import { createPortal as un } from "react-dom";
|
|
8
8
|
import { useFormik as In } from "formik";
|
|
9
|
-
import { string as le, mixed as
|
|
9
|
+
import { string as le, mixed as Me, object as ne, number as se, lazy as Be, date as Le } from "yup";
|
|
10
10
|
import V, { useState as z, useRef as Ie, useEffect as Ee, useContext as Rn, forwardRef as Qt, useMemo as dt, useCallback as Zt } from "react";
|
|
11
11
|
import { Link as ct, useLocation as Kt } from "react-router-dom";
|
|
12
12
|
import Jt from "axios";
|
|
@@ -58,7 +58,7 @@ const Xe = (e) => {
|
|
|
58
58
|
cursorHover: !0,
|
|
59
59
|
appearance: "danger",
|
|
60
60
|
size: "24px",
|
|
61
|
-
icon: /* @__PURE__ */ a(
|
|
61
|
+
icon: /* @__PURE__ */ a(ln, {}),
|
|
62
62
|
onClick: () => {
|
|
63
63
|
r(o);
|
|
64
64
|
}
|
|
@@ -78,7 +78,7 @@ const dr = {
|
|
|
78
78
|
[A.GREATER_THAN]: ir,
|
|
79
79
|
[A.LESS_THAN]: lr,
|
|
80
80
|
[A.EQUAL]: sr
|
|
81
|
-
},
|
|
81
|
+
}, _e = (e) => {
|
|
82
82
|
const n = e == null ? void 0 : e.value, t = typeof n == "object" && n !== null && !Array.isArray(n), r = dr[e == null ? void 0 : e.howToSetTheDecision] || tr;
|
|
83
83
|
return t && r(n) || n || void 0;
|
|
84
84
|
}, jn = w.div`
|
|
@@ -125,7 +125,7 @@ const dr = {
|
|
|
125
125
|
$e,
|
|
126
126
|
{
|
|
127
127
|
element: o,
|
|
128
|
-
valueData:
|
|
128
|
+
valueData: _e(
|
|
129
129
|
o
|
|
130
130
|
),
|
|
131
131
|
type: "decision"
|
|
@@ -155,7 +155,7 @@ const dr = {
|
|
|
155
155
|
$e,
|
|
156
156
|
{
|
|
157
157
|
element: { ...u, value: u.value },
|
|
158
|
-
valueData:
|
|
158
|
+
valueData: _e(
|
|
159
159
|
u
|
|
160
160
|
)
|
|
161
161
|
}
|
|
@@ -214,7 +214,7 @@ const dr = {
|
|
|
214
214
|
howToSetTheDecision: ee.RANGE,
|
|
215
215
|
decisionDataType: j.DATE
|
|
216
216
|
},
|
|
217
|
-
valueData:
|
|
217
|
+
valueData: _e({
|
|
218
218
|
labelName: r == null ? void 0 : r.terms,
|
|
219
219
|
value: {
|
|
220
220
|
from: String(n.effectiveFrom),
|
|
@@ -230,7 +230,7 @@ const dr = {
|
|
|
230
230
|
howToSetTheDecision: ee.EQUAL,
|
|
231
231
|
decisionDataType: j.DATE
|
|
232
232
|
},
|
|
233
|
-
valueData:
|
|
233
|
+
valueData: _e({
|
|
234
234
|
labelName: r == null ? void 0 : r.terms,
|
|
235
235
|
value: String(n.effectiveFrom),
|
|
236
236
|
howToSetTheDecision: ee.EQUAL,
|
|
@@ -239,7 +239,7 @@ const dr = {
|
|
|
239
239
|
} : null, d = n ? {
|
|
240
240
|
labelName: n.labelName || "",
|
|
241
241
|
decisionDataType: n.decisionDataType || "alphabetical",
|
|
242
|
-
value:
|
|
242
|
+
value: _e(n),
|
|
243
243
|
howToSetTheDecision: n.howToSetTheDecision || "EqualTo"
|
|
244
244
|
} : null, l = ((g = n == null ? void 0 : n.conditionsThatEstablishesTheDecision) == null ? void 0 : g.filter(
|
|
245
245
|
(h) => !h.hidden
|
|
@@ -301,11 +301,11 @@ const dr = {
|
|
|
301
301
|
"The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
|
|
302
302
|
);
|
|
303
303
|
const s = te("(max-width: 400px)");
|
|
304
|
-
return
|
|
305
|
-
/* @__PURE__ */ a(ur, { smallScreen: s, children: /* @__PURE__ */ a(
|
|
304
|
+
return un(
|
|
305
|
+
/* @__PURE__ */ a(ur, { smallScreen: s, children: /* @__PURE__ */ a(dn, { children: /* @__PURE__ */ a(pr, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
|
|
306
306
|
/* @__PURE__ */ a(v, { direction: "column", gap: "24px", children: /* @__PURE__ */ m(v, { alignItems: "center", justifyContent: "space-between", children: [
|
|
307
307
|
/* @__PURE__ */ a($, { type: "title", size: "large", appearance: "dark", weight: "bold", children: o }),
|
|
308
|
-
/* @__PURE__ */ a(
|
|
308
|
+
/* @__PURE__ */ a(sn, { size: "24px", cursor: "pointer", onClick: r })
|
|
309
309
|
] }) }),
|
|
310
310
|
n
|
|
311
311
|
] }) }) }) }),
|
|
@@ -488,7 +488,7 @@ const pt = w.div`
|
|
|
488
488
|
})
|
|
489
489
|
), p = ((r == null ? void 0 : r.length) === 0 || r.length < Math.floor(window.innerWidth / 300)) && !o && n;
|
|
490
490
|
return { renderedCards: l, shouldRenderAddCard: p };
|
|
491
|
-
},
|
|
491
|
+
}, hl = (e) => {
|
|
492
492
|
const {
|
|
493
493
|
controls: n = !0,
|
|
494
494
|
customTitleContentAddCard: t,
|
|
@@ -645,11 +645,11 @@ const pt = w.div`
|
|
|
645
645
|
"The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
|
|
646
646
|
);
|
|
647
647
|
const s = te("(max-width: 400px)");
|
|
648
|
-
return
|
|
649
|
-
/* @__PURE__ */ a(Tr, { $smallScreen: s, children: /* @__PURE__ */ a(
|
|
648
|
+
return un(
|
|
649
|
+
/* @__PURE__ */ a(Tr, { $smallScreen: s, children: /* @__PURE__ */ a(dn, { children: /* @__PURE__ */ a(wr, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
|
|
650
650
|
/* @__PURE__ */ a(v, { direction: "column", gap: "24px", children: /* @__PURE__ */ m(v, { alignItems: "center", justifyContent: "space-between", children: [
|
|
651
651
|
/* @__PURE__ */ a($, { type: "title", size: "large", appearance: "dark", weight: "bold", children: o }),
|
|
652
|
-
/* @__PURE__ */ a(
|
|
652
|
+
/* @__PURE__ */ a(sn, { size: "24px", cursor: "pointer", onClick: r })
|
|
653
653
|
] }) }),
|
|
654
654
|
n
|
|
655
655
|
] }) }) }) }),
|
|
@@ -759,7 +759,7 @@ const Sr = w.div`
|
|
|
759
759
|
[A.GREATER_THAN]: Rr,
|
|
760
760
|
[A.LESS_THAN]: Fr,
|
|
761
761
|
[A.EQUAL]: Lr
|
|
762
|
-
},
|
|
762
|
+
}, He = (e) => {
|
|
763
763
|
const n = e == null ? void 0 : e.value, t = typeof n == "object" && n !== null && !Array.isArray(n), r = Or[e == null ? void 0 : e.howToSetTheDecision] || kr;
|
|
764
764
|
return t && r(n) || n || void 0;
|
|
765
765
|
}, _n = w.div`
|
|
@@ -806,7 +806,7 @@ const Sr = w.div`
|
|
|
806
806
|
$e,
|
|
807
807
|
{
|
|
808
808
|
element: o,
|
|
809
|
-
valueData:
|
|
809
|
+
valueData: He(
|
|
810
810
|
o
|
|
811
811
|
),
|
|
812
812
|
type: "decision"
|
|
@@ -836,7 +836,7 @@ const Sr = w.div`
|
|
|
836
836
|
$e,
|
|
837
837
|
{
|
|
838
838
|
element: { ...u, value: u.value },
|
|
839
|
-
valueData:
|
|
839
|
+
valueData: He(
|
|
840
840
|
u
|
|
841
841
|
)
|
|
842
842
|
}
|
|
@@ -897,7 +897,7 @@ const Sr = w.div`
|
|
|
897
897
|
howToSetTheDecision: ee.RANGE,
|
|
898
898
|
decisionDataType: j.DATE
|
|
899
899
|
},
|
|
900
|
-
valueData:
|
|
900
|
+
valueData: He({
|
|
901
901
|
labelName: r == null ? void 0 : r.terms,
|
|
902
902
|
value: {
|
|
903
903
|
from: String(n.effectiveFrom),
|
|
@@ -913,7 +913,7 @@ const Sr = w.div`
|
|
|
913
913
|
howToSetTheDecision: ee.EQUAL,
|
|
914
914
|
decisionDataType: j.DATE
|
|
915
915
|
},
|
|
916
|
-
valueData:
|
|
916
|
+
valueData: He({
|
|
917
917
|
labelName: r == null ? void 0 : r.terms,
|
|
918
918
|
value: String(n.effectiveFrom),
|
|
919
919
|
howToSetTheDecision: ee.EQUAL,
|
|
@@ -922,7 +922,7 @@ const Sr = w.div`
|
|
|
922
922
|
} : null, d = n ? {
|
|
923
923
|
labelName: n.labelName || "",
|
|
924
924
|
decisionDataType: n.decisionDataType || "alphabetical",
|
|
925
|
-
value:
|
|
925
|
+
value: He(n),
|
|
926
926
|
howToSetTheDecision: n.howToSetTheDecision || "EqualTo"
|
|
927
927
|
} : null, l = zr(n).filter((g) => !(g != null && g.hidden)), p = Array.from({ length: 5 }), u = !!(!t && n && r && d), c = l.length < 2 ? "start" : "space-between";
|
|
928
928
|
return /* @__PURE__ */ a(
|
|
@@ -986,7 +986,7 @@ const Ur = (e) => {
|
|
|
986
986
|
cursorHover: !0,
|
|
987
987
|
appearance: "danger",
|
|
988
988
|
size: "24px",
|
|
989
|
-
icon: /* @__PURE__ */ a(
|
|
989
|
+
icon: /* @__PURE__ */ a(ln, {}),
|
|
990
990
|
onClick: () => {
|
|
991
991
|
r(o);
|
|
992
992
|
}
|
|
@@ -1060,7 +1060,7 @@ const Ur = (e) => {
|
|
|
1060
1060
|
),
|
|
1061
1061
|
value: e
|
|
1062
1062
|
}), Gr = (e) => ({
|
|
1063
|
-
schema:
|
|
1063
|
+
schema: Me().test(
|
|
1064
1064
|
"isArrayOrString",
|
|
1065
1065
|
"Debe ser un array de strings/numbers o un solo string",
|
|
1066
1066
|
(n) => Array.isArray(n) ? n.every(
|
|
@@ -1069,7 +1069,7 @@ const Ur = (e) => {
|
|
|
1069
1069
|
),
|
|
1070
1070
|
value: e
|
|
1071
1071
|
}), Yr = (e) => ({
|
|
1072
|
-
schema:
|
|
1072
|
+
schema: Me().test(
|
|
1073
1073
|
"isArrayOrString",
|
|
1074
1074
|
"Debe ser un array de strings/numbers o un solo string ",
|
|
1075
1075
|
(n) => Array.isArray(n) ? n.every(
|
|
@@ -1093,7 +1093,7 @@ const Ur = (e) => {
|
|
|
1093
1093
|
}),
|
|
1094
1094
|
value: { from: n, to: t }
|
|
1095
1095
|
};
|
|
1096
|
-
},
|
|
1096
|
+
}, mn = (e, n) => n === j.PERCENTAGE ? {
|
|
1097
1097
|
schema: se().required("El campo tipo porcentaje es requerido").min(0, "El campo tipo porcentaje no puede ser menor que 0").max(100, "El campo tipo porcentaje no puede ser mayor que 100"),
|
|
1098
1098
|
value: e
|
|
1099
1099
|
} : {
|
|
@@ -1103,9 +1103,9 @@ const Ur = (e) => {
|
|
|
1103
1103
|
[A.LIST_OF_VALUES]: Gr,
|
|
1104
1104
|
[A.LIST_OF_VALUES_MULTI]: Yr,
|
|
1105
1105
|
[A.RANGE]: Wr,
|
|
1106
|
-
[A.GREATER_THAN]:
|
|
1107
|
-
[A.LESS_THAN]:
|
|
1108
|
-
[A.EQUAL]:
|
|
1106
|
+
[A.GREATER_THAN]: mn,
|
|
1107
|
+
[A.LESS_THAN]: mn,
|
|
1108
|
+
[A.EQUAL]: mn
|
|
1109
1109
|
}, Qr = (e) => Xr[e] || Br;
|
|
1110
1110
|
var Ln = /* @__PURE__ */ ((e) => (e.EQUAL = "EqualTo", e.GREATER_THAN = "GreaterThan", e.LESS_THAN = "LessThan", e.LIST_OF_VALUES = "ListOfValues", e.LIST_OF_VALUES_MULTI = "ListOfValuesMulti", e.RANGE = "Range", e))(Ln || {});
|
|
1111
1111
|
const nn = (e) => e != null && (typeof e != "string" || e.trim() !== "") && (!Array.isArray(e) || e.length > 0), Zr = (e, n) => {
|
|
@@ -1152,7 +1152,7 @@ function Kr({
|
|
|
1152
1152
|
let d;
|
|
1153
1153
|
const l = {
|
|
1154
1154
|
ruleName: le().required("El nombre de la regla es requerido"),
|
|
1155
|
-
value:
|
|
1155
|
+
value: Be(() => Qr(
|
|
1156
1156
|
d.values.howToSetTheDecision
|
|
1157
1157
|
)(
|
|
1158
1158
|
d.values.value,
|
|
@@ -1248,7 +1248,7 @@ const Jr = w.div`
|
|
|
1248
1248
|
} = e, [l, p] = z(n);
|
|
1249
1249
|
return /* @__PURE__ */ m(O, { children: [
|
|
1250
1250
|
/* @__PURE__ */ a(v, { children: /* @__PURE__ */ a(
|
|
1251
|
-
|
|
1251
|
+
cn,
|
|
1252
1252
|
{
|
|
1253
1253
|
checked: l,
|
|
1254
1254
|
id: o,
|
|
@@ -1368,7 +1368,7 @@ const Jr = w.div`
|
|
|
1368
1368
|
termEndStatus: u
|
|
1369
1369
|
} = e;
|
|
1370
1370
|
return /* @__PURE__ */ a("form", { onSubmit: n.handleSubmit, children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
|
|
1371
|
-
|
|
1371
|
+
rn({
|
|
1372
1372
|
condition: i,
|
|
1373
1373
|
formik: n,
|
|
1374
1374
|
isDecision: !0
|
|
@@ -1391,7 +1391,7 @@ const Jr = w.div`
|
|
|
1391
1391
|
children: [
|
|
1392
1392
|
/* @__PURE__ */ a($, { type: "title", size: "small", weight: "bold", appearance: "gray", children: t.factsThatConditionIt }),
|
|
1393
1393
|
/* @__PURE__ */ a(
|
|
1394
|
-
|
|
1394
|
+
cn,
|
|
1395
1395
|
{
|
|
1396
1396
|
id: "toggleNone",
|
|
1397
1397
|
onChange: () => s(!n.values.toggleNone),
|
|
@@ -1416,7 +1416,7 @@ const Jr = w.div`
|
|
|
1416
1416
|
c.conditionName,
|
|
1417
1417
|
c.howToSetTheCondition === Ln.LIST_OF_VALUES_MULTI
|
|
1418
1418
|
)(h.target.checked),
|
|
1419
|
-
children:
|
|
1419
|
+
children: rn({ condition: c, formik: n })
|
|
1420
1420
|
},
|
|
1421
1421
|
c.conditionName
|
|
1422
1422
|
);
|
|
@@ -1534,7 +1534,7 @@ const Jr = w.div`
|
|
|
1534
1534
|
})
|
|
1535
1535
|
), p = ((r == null ? void 0 : r.length) === 0 || r.length < Math.floor(window.innerWidth / 300)) && !o && n;
|
|
1536
1536
|
return { renderedCards: l, shouldRenderAddCard: p };
|
|
1537
|
-
},
|
|
1537
|
+
}, fl = (e) => {
|
|
1538
1538
|
const {
|
|
1539
1539
|
controls: n = !0,
|
|
1540
1540
|
customTitleContentAddCard: t,
|
|
@@ -1661,7 +1661,7 @@ const Jr = w.div`
|
|
|
1661
1661
|
[A.GREATER_THAN]: uo,
|
|
1662
1662
|
[A.LESS_THAN]: po,
|
|
1663
1663
|
[A.EQUAL]: go
|
|
1664
|
-
},
|
|
1664
|
+
}, qe = (e) => {
|
|
1665
1665
|
const n = e == null ? void 0 : e.value;
|
|
1666
1666
|
if (typeof n == "string" && n.includes(" a ")) {
|
|
1667
1667
|
const t = [
|
|
@@ -1831,7 +1831,7 @@ const mo = w.div`
|
|
|
1831
1831
|
Ke,
|
|
1832
1832
|
{
|
|
1833
1833
|
element: o,
|
|
1834
|
-
valueData:
|
|
1834
|
+
valueData: qe(
|
|
1835
1835
|
o
|
|
1836
1836
|
),
|
|
1837
1837
|
type: "decision"
|
|
@@ -1856,7 +1856,7 @@ const mo = w.div`
|
|
|
1856
1856
|
M,
|
|
1857
1857
|
{
|
|
1858
1858
|
appearance: "danger",
|
|
1859
|
-
icon: /* @__PURE__ */ a(
|
|
1859
|
+
icon: /* @__PURE__ */ a(ln, {}),
|
|
1860
1860
|
size: "24px",
|
|
1861
1861
|
cursorHover: !0,
|
|
1862
1862
|
onClick: (C) => {
|
|
@@ -1911,7 +1911,7 @@ const mo = w.div`
|
|
|
1911
1911
|
Ke,
|
|
1912
1912
|
{
|
|
1913
1913
|
element: { ...C, value: C.value },
|
|
1914
|
-
valueData:
|
|
1914
|
+
valueData: qe(
|
|
1915
1915
|
C
|
|
1916
1916
|
)
|
|
1917
1917
|
}
|
|
@@ -1967,19 +1967,19 @@ const mo = w.div`
|
|
|
1967
1967
|
/* @__PURE__ */ a(Bt, { animated: !0 })
|
|
1968
1968
|
] })
|
|
1969
1969
|
] });
|
|
1970
|
-
}, qn = (e) => !!e && typeof e == "object" && !Array.isArray(e) && Object.values(e).every(Array.isArray),
|
|
1970
|
+
}, qn = (e) => !!e && typeof e == "object" && !Array.isArray(e) && Object.values(e).every(Array.isArray), tn = (e) => {
|
|
1971
1971
|
const n = /* @__PURE__ */ new Set(), t = [];
|
|
1972
1972
|
for (const r of e) {
|
|
1973
1973
|
const o = String((r == null ? void 0 : r.conditionName) ?? "");
|
|
1974
1974
|
n.has(o) || (n.add(o), t.push(r));
|
|
1975
1975
|
}
|
|
1976
1976
|
return t;
|
|
1977
|
-
},
|
|
1977
|
+
}, Oe = (e) => {
|
|
1978
1978
|
if (!e) return {};
|
|
1979
1979
|
if (Array.isArray(e.conditionGroups)) {
|
|
1980
1980
|
const n = e.conditionGroups.map((t) => [
|
|
1981
1981
|
t.ConditionGroupId,
|
|
1982
|
-
|
|
1982
|
+
tn(
|
|
1983
1983
|
Array.isArray(t.conditionsThatEstablishesTheDecision) ? t.conditionsThatEstablishesTheDecision : []
|
|
1984
1984
|
)
|
|
1985
1985
|
]);
|
|
@@ -1988,11 +1988,11 @@ const mo = w.div`
|
|
|
1988
1988
|
if (qn(e.conditionsThatEstablishesTheDecision)) {
|
|
1989
1989
|
const n = e.conditionsThatEstablishesTheDecision;
|
|
1990
1990
|
return Object.fromEntries(
|
|
1991
|
-
Object.entries(n).map(([t, r]) => [t,
|
|
1991
|
+
Object.entries(n).map(([t, r]) => [t, tn(r)])
|
|
1992
1992
|
);
|
|
1993
1993
|
}
|
|
1994
1994
|
return qn(e) ? Object.fromEntries(
|
|
1995
|
-
Object.entries(e).map(([n, t]) => [n,
|
|
1995
|
+
Object.entries(e).map(([n, t]) => [n, tn(t)])
|
|
1996
1996
|
) : {};
|
|
1997
1997
|
}, ht = (e, n) => Object.fromEntries(
|
|
1998
1998
|
Object.entries(e).map(([t, r]) => [t, r.filter(n)])
|
|
@@ -2015,7 +2015,7 @@ const mo = w.div`
|
|
|
2015
2015
|
howToSetTheDecision: ee.EQUAL,
|
|
2016
2016
|
decisionDataType: j.DATE
|
|
2017
2017
|
},
|
|
2018
|
-
valueData:
|
|
2018
|
+
valueData: qe({
|
|
2019
2019
|
labelName: r == null ? void 0 : r.effectiveFrom,
|
|
2020
2020
|
value: String(n.effectiveFrom),
|
|
2021
2021
|
howToSetTheDecision: ee.EQUAL,
|
|
@@ -2028,7 +2028,7 @@ const mo = w.div`
|
|
|
2028
2028
|
howToSetTheDecision: ee.EQUAL,
|
|
2029
2029
|
decisionDataType: j.DATE
|
|
2030
2030
|
},
|
|
2031
|
-
valueData:
|
|
2031
|
+
valueData: qe({
|
|
2032
2032
|
labelName: r == null ? void 0 : r.validUntil,
|
|
2033
2033
|
value: n.validUntil instanceof Date ? n.validUntil.toISOString() : n.validUntil,
|
|
2034
2034
|
howToSetTheDecision: ee.EQUAL,
|
|
@@ -2037,9 +2037,9 @@ const mo = w.div`
|
|
|
2037
2037
|
} : null, f = n ? {
|
|
2038
2038
|
labelName: n.labelName || "",
|
|
2039
2039
|
decisionDataType: n.decisionDataType || j.ALPHABETICAL,
|
|
2040
|
-
value:
|
|
2040
|
+
value: qe(n),
|
|
2041
2041
|
howToSetTheDecision: n.howToSetTheDecision || ee.EQUAL
|
|
2042
|
-
} : null, x = n ?
|
|
2042
|
+
} : null, x = n ? Oe(n) : {}, y = ht(x, (P) => !P.hidden), D = Object.keys(y), T = [
|
|
2043
2043
|
...D.filter((P) => P === "group-primary"),
|
|
2044
2044
|
...D.filter((P) => P !== "group-primary")
|
|
2045
2045
|
], S = {};
|
|
@@ -2334,8 +2334,8 @@ const To = w.div`
|
|
|
2334
2334
|
"The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
|
|
2335
2335
|
);
|
|
2336
2336
|
const d = te("(max-width: 400px)");
|
|
2337
|
-
return
|
|
2338
|
-
/* @__PURE__ */ a($o, { smallScreen: d, children: /* @__PURE__ */ a(
|
|
2337
|
+
return un(
|
|
2338
|
+
/* @__PURE__ */ a($o, { smallScreen: d, children: /* @__PURE__ */ a(dn, { children: /* @__PURE__ */ a(Io, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
|
|
2339
2339
|
/* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
|
|
2340
2340
|
/* @__PURE__ */ m(v, { alignItems: "center", justifyContent: "space-between", children: [
|
|
2341
2341
|
/* @__PURE__ */ m(v, { direction: "column", gap: "8px", children: [
|
|
@@ -2351,7 +2351,7 @@ const To = w.div`
|
|
|
2351
2351
|
),
|
|
2352
2352
|
/* @__PURE__ */ a($, { size: "medium", appearance: "gray", children: t })
|
|
2353
2353
|
] }),
|
|
2354
|
-
/* @__PURE__ */ a(
|
|
2354
|
+
/* @__PURE__ */ a(sn, { size: "24px", cursor: "pointer", onClick: o })
|
|
2355
2355
|
] }),
|
|
2356
2356
|
/* @__PURE__ */ a(B, { dashed: !0 })
|
|
2357
2357
|
] }),
|
|
@@ -2367,7 +2367,7 @@ const To = w.div`
|
|
|
2367
2367
|
),
|
|
2368
2368
|
value: e
|
|
2369
2369
|
}), Lo = (e) => ({
|
|
2370
|
-
schema:
|
|
2370
|
+
schema: Me().test(
|
|
2371
2371
|
"isArrayOrString",
|
|
2372
2372
|
"Por favor selecciona una opcion",
|
|
2373
2373
|
(n) => Array.isArray(n) ? n.every(
|
|
@@ -2376,7 +2376,7 @@ const To = w.div`
|
|
|
2376
2376
|
),
|
|
2377
2377
|
value: e
|
|
2378
2378
|
}), Oo = (e) => ({
|
|
2379
|
-
schema:
|
|
2379
|
+
schema: Me().test(
|
|
2380
2380
|
"isArrayOrString",
|
|
2381
2381
|
"Por favor selecciona al menos una opcion",
|
|
2382
2382
|
(n) => Array.isArray(n) ? n.every(
|
|
@@ -2438,7 +2438,7 @@ function zo({
|
|
|
2438
2438
|
onSubmitEvent: n,
|
|
2439
2439
|
textValues: t
|
|
2440
2440
|
}) {
|
|
2441
|
-
const r =
|
|
2441
|
+
const r = Oe(e) || {}, o = () => Object.values(r).flat(), i = {
|
|
2442
2442
|
ruleName: e.ruleName || "",
|
|
2443
2443
|
decisionDataType: e.decisionDataType || j.ALPHABETICAL,
|
|
2444
2444
|
howToSetTheDecision: e.howToSetTheDecision || "",
|
|
@@ -2446,7 +2446,6 @@ function zo({
|
|
|
2446
2446
|
effectiveFrom: e.effectiveFrom || "",
|
|
2447
2447
|
validUntil: e.validUntil || "",
|
|
2448
2448
|
toggleNone: !0,
|
|
2449
|
-
// form stores condition values in a flat dictionary by conditionName
|
|
2450
2449
|
conditionsThatEstablishesTheDecision: {},
|
|
2451
2450
|
checkClosed: !1,
|
|
2452
2451
|
terms: !0
|
|
@@ -2454,13 +2453,13 @@ function zo({
|
|
|
2454
2453
|
let s;
|
|
2455
2454
|
const d = {
|
|
2456
2455
|
ruleName: le().required("El nombre de la decision es requerido"),
|
|
2457
|
-
value:
|
|
2456
|
+
value: Be(() => Gn(
|
|
2458
2457
|
s.values.howToSetTheDecision
|
|
2459
2458
|
)(
|
|
2460
2459
|
s.values.value,
|
|
2461
2460
|
s.values.decisionDataType
|
|
2462
2461
|
).schema),
|
|
2463
|
-
conditionsThatEstablishesTheDecision:
|
|
2462
|
+
conditionsThatEstablishesTheDecision: Be((u, { parent: c }) => {
|
|
2464
2463
|
if ((c == null ? void 0 : c.toggleNone) && Object.keys(c.conditionsThatEstablishesTheDecision || {}).length > 0) return ne().shape({});
|
|
2465
2464
|
const f = o().reduce(
|
|
2466
2465
|
(x, y) => {
|
|
@@ -2684,12 +2683,12 @@ const Vo = w.div`
|
|
|
2684
2683
|
} = e;
|
|
2685
2684
|
return /* @__PURE__ */ m(O, { children: [
|
|
2686
2685
|
/* @__PURE__ */ a("form", { onSubmit: o.handleSubmit, children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", width: "100%", children: [
|
|
2687
|
-
/* @__PURE__ */ a(
|
|
2686
|
+
/* @__PURE__ */ a(Ue, { legend: "Decisión N° 01", spacing: "wide", children: /* @__PURE__ */ a(v, { justifyContent: "center", width: "-webkit-fill-available", children: Vn({
|
|
2688
2687
|
condition: i,
|
|
2689
2688
|
formik: o,
|
|
2690
2689
|
isDecision: !0
|
|
2691
2690
|
}) }) }),
|
|
2692
|
-
/* @__PURE__ */ a(
|
|
2691
|
+
/* @__PURE__ */ a(Ue, { legend: "Condiciones a evaluar", spacing: "wide", children: /* @__PURE__ */ m(v, { direction: "column", gap: "20px", width: "100%", children: [
|
|
2693
2692
|
/* @__PURE__ */ a(
|
|
2694
2693
|
st,
|
|
2695
2694
|
{
|
|
@@ -2737,7 +2736,7 @@ const Vo = w.div`
|
|
|
2737
2736
|
/* @__PURE__ */ a(
|
|
2738
2737
|
M,
|
|
2739
2738
|
{
|
|
2740
|
-
icon: /* @__PURE__ */ a(
|
|
2739
|
+
icon: /* @__PURE__ */ a(ln, {}),
|
|
2741
2740
|
appearance: "danger",
|
|
2742
2741
|
cursorHover: !0,
|
|
2743
2742
|
onClick: () => d(S.conditionName)
|
|
@@ -2749,7 +2748,7 @@ const Vo = w.div`
|
|
|
2749
2748
|
)) }),
|
|
2750
2749
|
p && /* @__PURE__ */ a($, { type: "label", size: "medium", appearance: "danger", children: t ?? "Existen errores en el formulario, por favor revísalos." })
|
|
2751
2750
|
] }) }),
|
|
2752
|
-
/* @__PURE__ */ a(
|
|
2751
|
+
/* @__PURE__ */ a(Ue, { legend: "Vigencia", spacing: "wide", children: h.terms && /* @__PURE__ */ a(
|
|
2753
2752
|
jo,
|
|
2754
2753
|
{
|
|
2755
2754
|
labelStart: h.termStart,
|
|
@@ -2864,7 +2863,7 @@ const Zo = (e) => {
|
|
|
2864
2863
|
}
|
|
2865
2864
|
return e ?? ge.EQUAL;
|
|
2866
2865
|
}, Yn = (e, n) => e === "group-primary" ? "Condición principal" : `Condición alterna N° ${String(n).padStart(2, "0")}`, Ko = (e) => {
|
|
2867
|
-
var
|
|
2866
|
+
var Ve;
|
|
2868
2867
|
const {
|
|
2869
2868
|
decision: n,
|
|
2870
2869
|
onSubmitEvent: t,
|
|
@@ -2877,7 +2876,7 @@ const Zo = (e) => {
|
|
|
2877
2876
|
decision: n,
|
|
2878
2877
|
onSubmitEvent: t,
|
|
2879
2878
|
textValues: r
|
|
2880
|
-
}), c =
|
|
2879
|
+
}), c = Oe(d ?? n), g = Oe(n), h = ht(
|
|
2881
2880
|
g,
|
|
2882
2881
|
(R) => !R.hidden
|
|
2883
2882
|
), f = Object.keys(h), x = [
|
|
@@ -2893,7 +2892,7 @@ const Zo = (e) => {
|
|
|
2893
2892
|
isDisabled: !1
|
|
2894
2893
|
};
|
|
2895
2894
|
}), [S, N] = V.useState(
|
|
2896
|
-
((
|
|
2895
|
+
((Ve = T[0]) == null ? void 0 : Ve.id) ?? "mainCondition"
|
|
2897
2896
|
), C = (R) => N(R), I = y[S] ?? "group-primary", F = V.useMemo(() => {
|
|
2898
2897
|
const R = [
|
|
2899
2898
|
...Object.keys(h).filter((Z) => Z === "group-primary"),
|
|
@@ -2992,7 +2991,7 @@ const Zo = (e) => {
|
|
|
2992
2991
|
}
|
|
2993
2992
|
}
|
|
2994
2993
|
);
|
|
2995
|
-
},
|
|
2994
|
+
}, ml = (e) => {
|
|
2996
2995
|
const {
|
|
2997
2996
|
controls: n = !0,
|
|
2998
2997
|
customTitleContentAddCard: t,
|
|
@@ -3023,7 +3022,7 @@ const Zo = (e) => {
|
|
|
3023
3022
|
toggleAt: (k) => S((_) => _ === k ? null : k)
|
|
3024
3023
|
}), F = (o == null ? void 0 : o.length) === 0 && !p;
|
|
3025
3024
|
return /* @__PURE__ */ m(O, { children: [
|
|
3026
|
-
/* @__PURE__ */ a(Co, { children: /* @__PURE__ */ a(Do, { children: /* @__PURE__ */ a(v, { direction: "column", gap: "16px", padding: "6px", children: F ? /* @__PURE__ */ a(
|
|
3025
|
+
/* @__PURE__ */ a(Co, { children: /* @__PURE__ */ a(Do, { children: /* @__PURE__ */ a(v, { direction: "column", gap: "16px", padding: "6px", children: F ? /* @__PURE__ */ a(Ue, { legend: "Decisiones", children: /* @__PURE__ */ m(
|
|
3027
3026
|
v,
|
|
3028
3027
|
{
|
|
3029
3028
|
direction: "column",
|
|
@@ -3297,7 +3296,7 @@ const ra = w.div`
|
|
|
3297
3296
|
)
|
|
3298
3297
|
}
|
|
3299
3298
|
);
|
|
3300
|
-
},
|
|
3299
|
+
}, bl = (e) => {
|
|
3301
3300
|
const {
|
|
3302
3301
|
appliedFilters: n = [],
|
|
3303
3302
|
onClear: t,
|
|
@@ -3444,7 +3443,7 @@ const ra = w.div`
|
|
|
3444
3443
|
padding: 24px;
|
|
3445
3444
|
gap: 24px;
|
|
3446
3445
|
box-sizing: border-box;
|
|
3447
|
-
`,
|
|
3446
|
+
`, vl = (e) => {
|
|
3448
3447
|
const {
|
|
3449
3448
|
actionButtonLabel: n,
|
|
3450
3449
|
cancelButtonLabel: t,
|
|
@@ -3459,8 +3458,8 @@ const ra = w.div`
|
|
|
3459
3458
|
throw new Error(
|
|
3460
3459
|
"The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
|
|
3461
3460
|
);
|
|
3462
|
-
return
|
|
3463
|
-
/* @__PURE__ */ a(
|
|
3461
|
+
return un(
|
|
3462
|
+
/* @__PURE__ */ a(dn, { children: /* @__PURE__ */ m(sa, { $smallScreen: p, children: [
|
|
3464
3463
|
/* @__PURE__ */ m(v, { direction: "column", gap: "16px", children: [
|
|
3465
3464
|
/* @__PURE__ */ m(v, { alignContent: "center", justifyContent: "space-between", children: [
|
|
3466
3465
|
/* @__PURE__ */ a($, { appearance: "dark", size: "small", type: "headline", children: l }),
|
|
@@ -3470,7 +3469,7 @@ const ra = w.div`
|
|
|
3470
3469
|
M,
|
|
3471
3470
|
{
|
|
3472
3471
|
appearance: "dark",
|
|
3473
|
-
icon: /* @__PURE__ */ a(
|
|
3472
|
+
icon: /* @__PURE__ */ a(sn, {}),
|
|
3474
3473
|
onClick: s,
|
|
3475
3474
|
cursorHover: !0
|
|
3476
3475
|
}
|
|
@@ -3507,7 +3506,7 @@ const ra = w.div`
|
|
|
3507
3506
|
] }) }),
|
|
3508
3507
|
u
|
|
3509
3508
|
);
|
|
3510
|
-
},
|
|
3509
|
+
}, yl = (e) => {
|
|
3511
3510
|
const { appliedFilters: n, fields: t, onChange: r, noFiltersLabel: o } = e, i = te("(max-width: 768px)"), s = !n || n.length === 0;
|
|
3512
3511
|
return /* @__PURE__ */ m(v, { direction: "column", gap: "16px", children: [
|
|
3513
3512
|
i && /* @__PURE__ */ m(O, { children: [
|
|
@@ -3566,7 +3565,7 @@ const ra = w.div`
|
|
|
3566
3565
|
}, da = (e) => {
|
|
3567
3566
|
const n = [];
|
|
3568
3567
|
return e.from !== void 0 && e.from !== null && n.push(`>${e.from}`), e.to !== void 0 && e.to !== null && n.push(`<${e.to}`), n.join(";");
|
|
3569
|
-
},
|
|
3568
|
+
}, xl = (e) => {
|
|
3570
3569
|
var s;
|
|
3571
3570
|
const { decision: n, fallbackId: t, template: r } = e, o = (d) => typeof d == "object" && d !== null && "from" in d && "to" in d ? da(d) : d, i = ((s = n.conditionsThatEstablishesTheDecision) == null ? void 0 : s.map((d, l) => {
|
|
3572
3571
|
var c;
|
|
@@ -3584,7 +3583,7 @@ const ra = w.div`
|
|
|
3584
3583
|
value: o(n.value),
|
|
3585
3584
|
conditionsThatEstablishesTheDecision: i
|
|
3586
3585
|
};
|
|
3587
|
-
},
|
|
3586
|
+
}, Tl = (e) => {
|
|
3588
3587
|
if (typeof e != "string") return e;
|
|
3589
3588
|
const n = e.split(";").map((r) => r.trim()), t = {};
|
|
3590
3589
|
for (const r of n)
|
|
@@ -3596,7 +3595,7 @@ const ra = w.div`
|
|
|
3596
3595
|
isNaN(o) || (t.to = o);
|
|
3597
3596
|
}
|
|
3598
3597
|
return t.from !== void 0 || t.to !== void 0 ? t : e;
|
|
3599
|
-
},
|
|
3598
|
+
}, wl = (e) => {
|
|
3600
3599
|
const { dataDecision: n, originalDecision: t } = e, r = {
|
|
3601
3600
|
conditionName: n.ruleName || "",
|
|
3602
3601
|
labelName: n.labelName || "",
|
|
@@ -3612,7 +3611,7 @@ const ra = w.div`
|
|
|
3612
3611
|
(o) => o.hidden ? { ...r } : o
|
|
3613
3612
|
)
|
|
3614
3613
|
};
|
|
3615
|
-
},
|
|
3614
|
+
}, Cl = (e) => {
|
|
3616
3615
|
const { decisions: n } = e;
|
|
3617
3616
|
return n == null ? void 0 : n.map((t) => {
|
|
3618
3617
|
var o;
|
|
@@ -3639,7 +3638,7 @@ const ra = w.div`
|
|
|
3639
3638
|
),
|
|
3640
3639
|
value: e
|
|
3641
3640
|
}), ua = (e) => ({
|
|
3642
|
-
schema:
|
|
3641
|
+
schema: Me().test(
|
|
3643
3642
|
"isArrayOrString",
|
|
3644
3643
|
"Debe ser un array de strings/numbers o un solo string",
|
|
3645
3644
|
(n) => Array.isArray(n) ? n.every(
|
|
@@ -3648,7 +3647,7 @@ const ra = w.div`
|
|
|
3648
3647
|
),
|
|
3649
3648
|
value: e
|
|
3650
3649
|
}), pa = (e) => ({
|
|
3651
|
-
schema:
|
|
3650
|
+
schema: Me().test(
|
|
3652
3651
|
"isArrayOrString",
|
|
3653
3652
|
"Debe ser un array de strings/numbers o un solo string ",
|
|
3654
3653
|
(n) => Array.isArray(n) ? n.every(
|
|
@@ -3706,7 +3705,7 @@ function fa({
|
|
|
3706
3705
|
let o;
|
|
3707
3706
|
const i = {
|
|
3708
3707
|
ruleName: le().required("El nombre de la regla es requerido"),
|
|
3709
|
-
value:
|
|
3708
|
+
value: Be(() => Wn(
|
|
3710
3709
|
o.values.howToSetTheDecision
|
|
3711
3710
|
)(
|
|
3712
3711
|
o.values.value,
|
|
@@ -3749,7 +3748,7 @@ function fa({
|
|
|
3749
3748
|
// },
|
|
3750
3749
|
// );
|
|
3751
3750
|
// }),
|
|
3752
|
-
conditionsThatEstablishesTheDecision:
|
|
3751
|
+
conditionsThatEstablishesTheDecision: Be((l, { parent: p }) => {
|
|
3753
3752
|
var g;
|
|
3754
3753
|
if ((p == null ? void 0 : p.toggleNone) && Object.keys(p.conditionsThatEstablishesTheDecision || {}).length > 0) return ne().shape({});
|
|
3755
3754
|
const c = ((g = e.conditionsThatEstablishesTheDecision) == null ? void 0 : g.reduce(
|
|
@@ -3868,7 +3867,7 @@ const ma = w.div`
|
|
|
3868
3867
|
p(n);
|
|
3869
3868
|
}, [n]), /* @__PURE__ */ m(O, { children: [
|
|
3870
3869
|
/* @__PURE__ */ a(v, { children: /* @__PURE__ */ a(
|
|
3871
|
-
|
|
3870
|
+
cn,
|
|
3872
3871
|
{
|
|
3873
3872
|
checked: l,
|
|
3874
3873
|
id: o,
|
|
@@ -3986,7 +3985,7 @@ const ma = w.div`
|
|
|
3986
3985
|
termEndStatus: u
|
|
3987
3986
|
} = e;
|
|
3988
3987
|
return /* @__PURE__ */ a("form", { onSubmit: n.handleSubmit, children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
|
|
3989
|
-
|
|
3988
|
+
rn({
|
|
3990
3989
|
condition: i,
|
|
3991
3990
|
formik: n,
|
|
3992
3991
|
isDecision: !0
|
|
@@ -4009,7 +4008,7 @@ const ma = w.div`
|
|
|
4009
4008
|
children: [
|
|
4010
4009
|
/* @__PURE__ */ a($, { type: "title", size: "small", weight: "bold", appearance: "gray", children: t.factsThatConditionIt }),
|
|
4011
4010
|
/* @__PURE__ */ a(
|
|
4012
|
-
|
|
4011
|
+
cn,
|
|
4013
4012
|
{
|
|
4014
4013
|
id: "toggleNone",
|
|
4015
4014
|
onChange: () => s(!n.values.toggleNone),
|
|
@@ -4032,7 +4031,7 @@ const ma = w.div`
|
|
|
4032
4031
|
c.conditionName,
|
|
4033
4032
|
c.howToSetTheCondition === A.LIST_OF_VALUES_MULTI
|
|
4034
4033
|
)(g.target.checked),
|
|
4035
|
-
children:
|
|
4034
|
+
children: rn({ condition: c, formik: n })
|
|
4036
4035
|
},
|
|
4037
4036
|
c.conditionName
|
|
4038
4037
|
)) })
|
|
@@ -4116,7 +4115,7 @@ const ma = w.div`
|
|
|
4116
4115
|
termEndStatus: c
|
|
4117
4116
|
}
|
|
4118
4117
|
);
|
|
4119
|
-
},
|
|
4118
|
+
}, Dl = (e) => {
|
|
4120
4119
|
var o;
|
|
4121
4120
|
const { decisionTemplate: n } = e, t = { ...n }, r = (o = t.conditionsThatEstablishesTheDecision) == null ? void 0 : o.find(
|
|
4122
4121
|
(i) => i.switchPlaces
|
|
@@ -4132,7 +4131,7 @@ const ma = w.div`
|
|
|
4132
4131
|
(i) => i.conditionName === r.conditionName ? { ...i, hidden: !0 } : i
|
|
4133
4132
|
)
|
|
4134
4133
|
} : t;
|
|
4135
|
-
},
|
|
4134
|
+
}, Sl = (e) => {
|
|
4136
4135
|
const { decisions: n } = e;
|
|
4137
4136
|
return n == null ? void 0 : n.map((t) => {
|
|
4138
4137
|
var o;
|
|
@@ -4367,7 +4366,7 @@ const ma = w.div`
|
|
|
4367
4366
|
for (const r of n)
|
|
4368
4367
|
if (r.path && (e === r.path || e.startsWith(r.path + "/")) || (t = r.links) != null && t.some((o) => o.path === e)) return r.id;
|
|
4369
4368
|
return null;
|
|
4370
|
-
},
|
|
4369
|
+
}, El = (e) => {
|
|
4371
4370
|
const { collapseOnNavigate: n = !1, defaultOpenId: t = null, groups: r } = e, o = Kt(), [i, s] = V.useState(t), d = V.useRef(o.pathname), l = V.useCallback(
|
|
4372
4371
|
(u) => {
|
|
4373
4372
|
var c;
|
|
@@ -4447,7 +4446,7 @@ function Ge(e, n, t = !0, r = ["__key"]) {
|
|
|
4447
4446
|
function xt(e) {
|
|
4448
4447
|
return e.split(" ").filter((n) => n);
|
|
4449
4448
|
}
|
|
4450
|
-
function
|
|
4449
|
+
function ze(e) {
|
|
4451
4450
|
return { x: e.clientX, y: e.clientY };
|
|
4452
4451
|
}
|
|
4453
4452
|
Array();
|
|
@@ -4558,8 +4557,8 @@ function Ma(e) {
|
|
|
4558
4557
|
function za(e) {
|
|
4559
4558
|
if (!W(b)) return;
|
|
4560
4559
|
Y(e);
|
|
4561
|
-
const { x: n, y: t } =
|
|
4562
|
-
W(b) &&
|
|
4560
|
+
const { x: n, y: t } = ze(e);
|
|
4561
|
+
W(b) && hn({ x: n, y: t }, e, b);
|
|
4563
4562
|
}
|
|
4564
4563
|
function Va(e) {
|
|
4565
4564
|
if (!b.pointerDown || !b.pointerDown.validated) return;
|
|
@@ -4593,7 +4592,7 @@ function ja({
|
|
|
4593
4592
|
}) {
|
|
4594
4593
|
var l, p, u;
|
|
4595
4594
|
if (!On) return;
|
|
4596
|
-
Qn || (Qn =
|
|
4595
|
+
Qn || (Qn = on(document, {
|
|
4597
4596
|
dragover: za,
|
|
4598
4597
|
pointerdown: La,
|
|
4599
4598
|
pointerup: Oa,
|
|
@@ -4667,10 +4666,10 @@ function ja({
|
|
|
4667
4666
|
}), (u = r.plugins) == null || u.forEach((c) => {
|
|
4668
4667
|
var g, h;
|
|
4669
4668
|
(h = (g = c(e)) == null ? void 0 : g.setup) == null || h.call(g);
|
|
4670
|
-
}), Ba(e, s),
|
|
4669
|
+
}), Ba(e, s), pn(e, !0);
|
|
4671
4670
|
}
|
|
4672
4671
|
function Ct(e, n, t, r, o, i) {
|
|
4673
|
-
const { x: s, y: d } =
|
|
4672
|
+
const { x: s, y: d } = ze(t), l = e.el.getBoundingClientRect();
|
|
4674
4673
|
return {
|
|
4675
4674
|
affectedNodes: [],
|
|
4676
4675
|
ascendingDirection: !1,
|
|
@@ -4709,8 +4708,8 @@ function Ua({
|
|
|
4709
4708
|
draggedNodes: n,
|
|
4710
4709
|
targetNodes: t
|
|
4711
4710
|
}) {
|
|
4712
|
-
|
|
4713
|
-
const r = n.map((l) => l.data.value), o =
|
|
4711
|
+
pn(e.el);
|
|
4712
|
+
const r = n.map((l) => l.data.value), o = Pe(e.el, e.data), i = n[0].data.index, s = [...e.data.enabledNodes], d = [
|
|
4714
4713
|
...o.filter((l) => !r.some((p) => Ge(l, p)))
|
|
4715
4714
|
];
|
|
4716
4715
|
d.splice(t[0].data.index, 0, ...r), "draggedNode" in b && (b.currentTargetValue = t[0].data.value), En(e.el, e.data, [...d]), e.data.config.onSort && e.data.config.onSort({
|
|
@@ -4775,12 +4774,12 @@ function Ha({
|
|
|
4775
4774
|
targetNodes: i,
|
|
4776
4775
|
state: s
|
|
4777
4776
|
}) {
|
|
4778
|
-
|
|
4777
|
+
pn(t.el);
|
|
4779
4778
|
const d = r.map((g) => g.data.value), l = [
|
|
4780
|
-
...
|
|
4779
|
+
...Pe(e.el, e.data).filter(
|
|
4781
4780
|
(g) => !d.some((h) => Ge(g, h))
|
|
4782
4781
|
)
|
|
4783
|
-
], p =
|
|
4782
|
+
], p = Pe(n.el, n.data), u = t.el === n.el && n.data.config.sortable === !1;
|
|
4784
4783
|
let c;
|
|
4785
4784
|
i.length ? (u ? c = o : n.data.config.sortable === !1 ? c = n.data.enabledNodes.length : c = i[0].data.index, p.splice(c, 0, ...d)) : (c = u ? o : n.data.enabledNodes.length, p.splice(c, 0, ...d)), En(e.el, e.data, l), En(n.el, n.data, p), n.data.config.onTransfer && n.data.config.onTransfer({
|
|
4786
4785
|
sourceParent: e,
|
|
@@ -4800,7 +4799,7 @@ function Ha({
|
|
|
4800
4799
|
targetNodes: i || []
|
|
4801
4800
|
});
|
|
4802
4801
|
}
|
|
4803
|
-
function
|
|
4802
|
+
function Pe(e, n) {
|
|
4804
4803
|
return [...n.getValues(e)];
|
|
4805
4804
|
}
|
|
4806
4805
|
function En(e, n, t) {
|
|
@@ -4822,7 +4821,7 @@ function re(e) {
|
|
|
4822
4821
|
return "synthDragging" in e && !!e.synthDragging;
|
|
4823
4822
|
}
|
|
4824
4823
|
function Ba(e, n) {
|
|
4825
|
-
n.abortControllers.mainParent =
|
|
4824
|
+
n.abortControllers.mainParent = on(e, {
|
|
4826
4825
|
dragover: en(n.config.handleParentDragover),
|
|
4827
4826
|
handleParentPointerover: n.config.handleParentPointerover,
|
|
4828
4827
|
scroll: en(n.config.handleParentScroll),
|
|
@@ -4832,14 +4831,14 @@ function Ba(e, n) {
|
|
|
4832
4831
|
r && (r.nestedParent = t.detail.parent);
|
|
4833
4832
|
},
|
|
4834
4833
|
focus: en(n.config.handleParentFocus)
|
|
4835
|
-
}), n.config.externalDragHandle && n.config.externalDragHandle.el && n.config.externalDragHandle.callback && (n.abortControllers.externalDragHandle =
|
|
4834
|
+
}), n.config.externalDragHandle && n.config.externalDragHandle.el && n.config.externalDragHandle.callback && (n.abortControllers.externalDragHandle = on(
|
|
4836
4835
|
n.config.externalDragHandle.el,
|
|
4837
4836
|
{
|
|
4838
4837
|
pointerdown: (t) => {
|
|
4839
4838
|
if (!n.config.externalDragHandle || !n.config.externalDragHandle.callback)
|
|
4840
4839
|
return;
|
|
4841
4840
|
const r = n.config.externalDragHandle.callback();
|
|
4842
|
-
if (!
|
|
4841
|
+
if (!fn(r)) {
|
|
4843
4842
|
console.warn(
|
|
4844
4843
|
"No draggable item found from external drag handle callback"
|
|
4845
4844
|
);
|
|
@@ -4868,7 +4867,7 @@ function Ba(e, n) {
|
|
|
4868
4867
|
function Ga(e) {
|
|
4869
4868
|
var t;
|
|
4870
4869
|
const n = e.parent.data.config;
|
|
4871
|
-
e.node.data.abortControllers.mainNode =
|
|
4870
|
+
e.node.data.abortControllers.mainNode = on(e.node.el, {
|
|
4872
4871
|
keydown: K(n.handleNodeKeydown),
|
|
4873
4872
|
dragstart: K(n.handleDragstart),
|
|
4874
4873
|
dragover: K(n.handleNodeDragover),
|
|
@@ -4923,9 +4922,9 @@ function Qa(e) {
|
|
|
4923
4922
|
if (e.length === 1 && e[0].addedNodes.length === 1 && !(e[0].addedNodes[0] instanceof HTMLElement))
|
|
4924
4923
|
return;
|
|
4925
4924
|
const n = e[0].target;
|
|
4926
|
-
!(n instanceof HTMLElement) || !G.get(n) ||
|
|
4925
|
+
!(n instanceof HTMLElement) || !G.get(n) || pn(n);
|
|
4927
4926
|
}
|
|
4928
|
-
function
|
|
4927
|
+
function pn(e, n) {
|
|
4929
4928
|
var d;
|
|
4930
4929
|
const t = G.get(e);
|
|
4931
4930
|
if (!t) return;
|
|
@@ -4933,7 +4932,7 @@ function un(e, n) {
|
|
|
4933
4932
|
const r = [], o = t.config;
|
|
4934
4933
|
for (let l = 0; l < e.children.length; l++) {
|
|
4935
4934
|
const p = e.children[l];
|
|
4936
|
-
if (!
|
|
4935
|
+
if (!fn(p) || p.id === "dnd-dragged-node-clone") continue;
|
|
4937
4936
|
const u = ue.get(p);
|
|
4938
4937
|
(n || !u) && o.tearDownNode({
|
|
4939
4938
|
parent: {
|
|
@@ -5055,7 +5054,7 @@ function ni(e, n) {
|
|
|
5055
5054
|
if (t.onDragstart) {
|
|
5056
5055
|
const i = {
|
|
5057
5056
|
parent: e.targetData.parent,
|
|
5058
|
-
values:
|
|
5057
|
+
values: Pe(
|
|
5059
5058
|
e.targetData.parent.el,
|
|
5060
5059
|
e.targetData.parent.data
|
|
5061
5060
|
),
|
|
@@ -5237,7 +5236,7 @@ function Et({
|
|
|
5237
5236
|
function ai(e) {
|
|
5238
5237
|
}
|
|
5239
5238
|
function ii(e) {
|
|
5240
|
-
e.detail.targetData.parent.el === e.detail.state.currentParent.el ? kt(e.detail, e.detail.state) :
|
|
5239
|
+
e.detail.targetData.parent.el === e.detail.state.currentParent.el ? kt(e.detail, e.detail.state) : gn(e.detail, e.detail.state);
|
|
5241
5240
|
}
|
|
5242
5241
|
function li(e, n) {
|
|
5243
5242
|
const t = e.targetData.parent.data.config;
|
|
@@ -5269,7 +5268,7 @@ function ui(e, n) {
|
|
|
5269
5268
|
const t = (r = G.get(n.initialParent.el)) == null ? void 0 : r.config;
|
|
5270
5269
|
t != null && t.onDragend && t.onDragend({
|
|
5271
5270
|
parent: n.currentParent,
|
|
5272
|
-
values:
|
|
5271
|
+
values: Pe(n.currentParent.el, n.currentParent.data),
|
|
5273
5272
|
draggedNode: n.draggedNode,
|
|
5274
5273
|
draggedNodes: n.draggedNodes,
|
|
5275
5274
|
state: n
|
|
@@ -5285,7 +5284,7 @@ function pi(e) {
|
|
|
5285
5284
|
const p = { ...e };
|
|
5286
5285
|
(f = o == null ? void 0 : o.onDragend) == null || f.call(o, {
|
|
5287
5286
|
parent: p.currentParent,
|
|
5288
|
-
values:
|
|
5287
|
+
values: Pe(
|
|
5289
5288
|
p.currentParent.el,
|
|
5290
5289
|
p.currentParent.data
|
|
5291
5290
|
),
|
|
@@ -5403,9 +5402,9 @@ function Nt(e, n = !1) {
|
|
|
5403
5402
|
));
|
|
5404
5403
|
}
|
|
5405
5404
|
function Zn(e, n, t = !1) {
|
|
5406
|
-
const r =
|
|
5405
|
+
const r = ze(e);
|
|
5407
5406
|
n.coordinates.x = r.x, n.coordinates.y = r.y, Nt(n, t), n.scrollDebounceTimeout && (clearTimeout(n.scrollDebounceTimeout), n.scrollDebounceTimeout = void 0), n.scrollDebounceTimeout = setTimeout(() => {
|
|
5408
|
-
re(n) &&
|
|
5407
|
+
re(n) && hn(n.coordinates, e, n);
|
|
5409
5408
|
}, 16);
|
|
5410
5409
|
const o = Si(r);
|
|
5411
5410
|
if (!o) {
|
|
@@ -5437,17 +5436,17 @@ function Zn(e, n, t = !1) {
|
|
|
5437
5436
|
function mi(e, n) {
|
|
5438
5437
|
var i;
|
|
5439
5438
|
if (!e.targetData.parent.data.config.nativeDrag) return;
|
|
5440
|
-
const { x: r, y: o } =
|
|
5441
|
-
n.coordinates.y = o, n.coordinates.x = r, Y(e.e), Ce(e.e), W(n) &&
|
|
5439
|
+
const { x: r, y: o } = ze(e.e);
|
|
5440
|
+
n.coordinates.y = o, n.coordinates.x = r, Y(e.e), Ce(e.e), W(n) && hn({ x: r, y: o }, e.e, n), e.targetData.parent.el === ((i = n.currentParent) == null ? void 0 : i.el) ? kt(e, n) : gn(e, n);
|
|
5442
5441
|
}
|
|
5443
5442
|
function bi(e, n) {
|
|
5444
5443
|
if (!e.targetData.parent.data.config.nativeDrag) return;
|
|
5445
5444
|
Y(e.e), Ce(e.e);
|
|
5446
|
-
const { x: r, y: o } =
|
|
5447
|
-
W(n) &&
|
|
5445
|
+
const { x: r, y: o } = ze(e.e);
|
|
5446
|
+
W(n) && hn({ x: r, y: o }, e.e, n), gn(e, n);
|
|
5448
5447
|
}
|
|
5449
5448
|
function vi(e) {
|
|
5450
|
-
e.detail.targetData.parent.el !== e.detail.state.currentParent.el &&
|
|
5449
|
+
e.detail.targetData.parent.el !== e.detail.state.currentParent.el && gn(e.detail, e.detail.state);
|
|
5451
5450
|
}
|
|
5452
5451
|
function yi({
|
|
5453
5452
|
currentParent: e,
|
|
@@ -5508,7 +5507,7 @@ function wi(e, n, t, r) {
|
|
|
5508
5507
|
return !1;
|
|
5509
5508
|
}
|
|
5510
5509
|
function kt(e, n) {
|
|
5511
|
-
const { x: t, y: r } =
|
|
5510
|
+
const { x: t, y: r } = ze(e.e);
|
|
5512
5511
|
if (!wi(e, n, t, r))
|
|
5513
5512
|
return;
|
|
5514
5513
|
const o = n.draggedNode.data.index > e.targetData.node.data.index ? [e.targetData.node.data.index, n.draggedNode.data.index] : [n.draggedNode.data.index, e.targetData.node.data.index];
|
|
@@ -5549,7 +5548,7 @@ function K(e) {
|
|
|
5549
5548
|
);
|
|
5550
5549
|
};
|
|
5551
5550
|
}
|
|
5552
|
-
function
|
|
5551
|
+
function gn(e, n) {
|
|
5553
5552
|
Y(e.e), yi({
|
|
5554
5553
|
currentParent: n.currentParent,
|
|
5555
5554
|
targetParent: e.targetData.parent,
|
|
@@ -5620,7 +5619,7 @@ function Te(e, n) {
|
|
|
5620
5619
|
const t = xt(n);
|
|
5621
5620
|
if (t.length)
|
|
5622
5621
|
for (const r of e) {
|
|
5623
|
-
if (!
|
|
5622
|
+
if (!fn(r)) {
|
|
5624
5623
|
r.classList.remove(...t);
|
|
5625
5624
|
continue;
|
|
5626
5625
|
}
|
|
@@ -5678,7 +5677,7 @@ function Jn(e, n, t) {
|
|
|
5678
5677
|
const r = e.getBoundingClientRect();
|
|
5679
5678
|
return n >= r.left && n <= r.right && t >= r.top && t <= r.bottom;
|
|
5680
5679
|
}
|
|
5681
|
-
function
|
|
5680
|
+
function hn(e, n, t) {
|
|
5682
5681
|
if (!W(t) || !t.draggedNode)
|
|
5683
5682
|
return;
|
|
5684
5683
|
Nn(t);
|
|
@@ -5706,7 +5705,7 @@ function gn(e, n, t) {
|
|
|
5706
5705
|
}
|
|
5707
5706
|
function Si(e) {
|
|
5708
5707
|
let n = document.elementFromPoint(e.x, e.y);
|
|
5709
|
-
if (!
|
|
5708
|
+
if (!fn(n)) return;
|
|
5710
5709
|
let t, r = !0;
|
|
5711
5710
|
for (; n && r; ) {
|
|
5712
5711
|
if (ue.has(n) || G.has(n)) {
|
|
@@ -5739,10 +5738,10 @@ function Si(e) {
|
|
|
5739
5738
|
} : void 0;
|
|
5740
5739
|
}
|
|
5741
5740
|
}
|
|
5742
|
-
function
|
|
5741
|
+
function fn(e) {
|
|
5743
5742
|
return e instanceof HTMLElement && e.parentNode instanceof HTMLElement;
|
|
5744
5743
|
}
|
|
5745
|
-
function
|
|
5744
|
+
function on(e, n) {
|
|
5746
5745
|
const t = new AbortController();
|
|
5747
5746
|
for (const r in n) {
|
|
5748
5747
|
const o = n[r];
|
|
@@ -5764,18 +5763,18 @@ function Ni(e, n) {
|
|
|
5764
5763
|
const t = Ei(e);
|
|
5765
5764
|
t && n(t);
|
|
5766
5765
|
}
|
|
5767
|
-
var
|
|
5766
|
+
var an = /* @__PURE__ */ new WeakMap();
|
|
5768
5767
|
function ki(e) {
|
|
5769
|
-
const n =
|
|
5768
|
+
const n = an.get(e);
|
|
5770
5769
|
return n ? n[0] : (console.warn("No values found for parent element"), []);
|
|
5771
5770
|
}
|
|
5772
5771
|
function Ai(e, n) {
|
|
5773
|
-
const t =
|
|
5774
|
-
t && t[1](e),
|
|
5772
|
+
const t = an.get(n);
|
|
5773
|
+
t && t[1](e), an.set(n, [e, t[1]]);
|
|
5775
5774
|
}
|
|
5776
5775
|
function $i(e, n) {
|
|
5777
5776
|
return (t) => {
|
|
5778
|
-
|
|
5777
|
+
an.set(t, n), ja({ parent: t, getValues: ki, setValues: Ai, config: e });
|
|
5779
5778
|
};
|
|
5780
5779
|
}
|
|
5781
5780
|
function et(e) {
|
|
@@ -5874,7 +5873,7 @@ const nt = {
|
|
|
5874
5873
|
}, [g, t, d, l]);
|
|
5875
5874
|
const S = g.length === 0;
|
|
5876
5875
|
return /* @__PURE__ */ a(
|
|
5877
|
-
|
|
5876
|
+
Ue,
|
|
5878
5877
|
{
|
|
5879
5878
|
legend: o,
|
|
5880
5879
|
width: "100%",
|
|
@@ -5929,7 +5928,7 @@ const nt = {
|
|
|
5929
5928
|
)
|
|
5930
5929
|
}
|
|
5931
5930
|
);
|
|
5932
|
-
},
|
|
5931
|
+
}, Nl = (e) => {
|
|
5933
5932
|
const { group: n = "clients", left: t, right: r, onMove: o, locked: i = !1 } = e, s = (d) => {
|
|
5934
5933
|
i || o == null || o(d);
|
|
5935
5934
|
};
|
|
@@ -5988,7 +5987,7 @@ const nt = {
|
|
|
5988
5987
|
}
|
|
5989
5988
|
}
|
|
5990
5989
|
}
|
|
5991
|
-
`,
|
|
5990
|
+
`, kl = (e) => /* @__PURE__ */ a(Li, { children: /* @__PURE__ */ a(q, { ...e }) }), Oi = w.div`
|
|
5992
5991
|
display: flex;
|
|
5993
5992
|
justify-content: space-between;
|
|
5994
5993
|
align-items: center;
|
|
@@ -6017,7 +6016,7 @@ const nt = {
|
|
|
6017
6016
|
}
|
|
6018
6017
|
}
|
|
6019
6018
|
}
|
|
6020
|
-
`,
|
|
6019
|
+
`, Al = (e) => {
|
|
6021
6020
|
const { handleBack: n, handleNext: t, disabledBack: r, disabledNext: o, textValues: i } = e;
|
|
6022
6021
|
return /* @__PURE__ */ m(Oi, { children: [
|
|
6023
6022
|
/* @__PURE__ */ a(
|
|
@@ -6517,8 +6516,8 @@ const qi = (e) => {
|
|
|
6517
6516
|
}
|
|
6518
6517
|
function ve(L) {
|
|
6519
6518
|
const { value: X, checked: Pn } = L.target;
|
|
6520
|
-
pe((
|
|
6521
|
-
const R = Pn ? [...
|
|
6519
|
+
pe((Ve) => {
|
|
6520
|
+
const R = Pn ? [...Ve, X] : Ve.filter((H) => H !== X);
|
|
6522
6521
|
return u(l, R.join(",")), R;
|
|
6523
6522
|
});
|
|
6524
6523
|
}
|
|
@@ -6560,7 +6559,7 @@ const qi = (e) => {
|
|
|
6560
6559
|
onCheckboxChange: ve
|
|
6561
6560
|
}
|
|
6562
6561
|
);
|
|
6563
|
-
},
|
|
6562
|
+
}, $l = (e) => {
|
|
6564
6563
|
const {
|
|
6565
6564
|
disabled: n = !1,
|
|
6566
6565
|
fullwidth: t = !1,
|
|
@@ -6597,21 +6596,30 @@ const qi = (e) => {
|
|
|
6597
6596
|
picker: !0
|
|
6598
6597
|
}
|
|
6599
6598
|
);
|
|
6600
|
-
},
|
|
6601
|
-
const t =
|
|
6599
|
+
}, Il = (e) => Object.values(e).flat(), Rl = (e, n) => {
|
|
6600
|
+
const t = Oe(e);
|
|
6602
6601
|
return Object.fromEntries(
|
|
6603
6602
|
Object.entries(t).map(([r, o]) => [r, o.map(n)])
|
|
6604
6603
|
);
|
|
6605
|
-
},
|
|
6604
|
+
}, Yi = (e) => Object.entries(e).map(([n, t]) => ({
|
|
6605
|
+
ConditionGroupId: n,
|
|
6606
|
+
conditionsThatEstablishesTheDecision: tn(t)
|
|
6607
|
+
})), Fl = (e) => {
|
|
6608
|
+
const n = Oe(e), t = {
|
|
6609
|
+
...e,
|
|
6610
|
+
conditionGroups: Yi(n)
|
|
6611
|
+
};
|
|
6612
|
+
return delete t.conditionsThatEstablishesTheDecision, t;
|
|
6613
|
+
}, je = /* @__PURE__ */ new Map(), Wi = (e, n) => je.get(`${n}:${e}`), Xi = (e, n, t) => {
|
|
6606
6614
|
const r = `${n}:${e}`;
|
|
6607
|
-
if (
|
|
6608
|
-
const o =
|
|
6609
|
-
o !== void 0 &&
|
|
6615
|
+
if (je.set(r, t), je.size > 1e3) {
|
|
6616
|
+
const o = je.keys().next().value;
|
|
6617
|
+
o !== void 0 && je.delete(o);
|
|
6610
6618
|
}
|
|
6611
|
-
}, ot = /* @__PURE__ */ new Map(),
|
|
6619
|
+
}, ot = /* @__PURE__ */ new Map(), Qi = 1e3, Zi = (e) => {
|
|
6612
6620
|
const n = Date.now(), t = ot.get(e) || 0;
|
|
6613
|
-
return n - t <
|
|
6614
|
-
},
|
|
6621
|
+
return n - t < Qi ? !0 : (ot.set(e, n), !1);
|
|
6622
|
+
}, Ki = (e) => {
|
|
6615
6623
|
const n = er(e);
|
|
6616
6624
|
return {
|
|
6617
6625
|
spa: "es",
|
|
@@ -6621,12 +6629,12 @@ const qi = (e) => {
|
|
|
6621
6629
|
ita: "it",
|
|
6622
6630
|
por: "pt"
|
|
6623
6631
|
}[n] || "en";
|
|
6624
|
-
},
|
|
6625
|
-
const o = `${n}:${e}`, i =
|
|
6632
|
+
}, Ji = async (e, n, { url: t, apiKey: r }) => {
|
|
6633
|
+
const o = `${n}:${e}`, i = Wi(e, n);
|
|
6626
6634
|
if (i) return i;
|
|
6627
|
-
if (
|
|
6635
|
+
if (Zi(o))
|
|
6628
6636
|
return console.warn(`[Throttle] Skipped translation for: "${e}"`), e;
|
|
6629
|
-
const s =
|
|
6637
|
+
const s = Ki(e);
|
|
6630
6638
|
try {
|
|
6631
6639
|
const { data: d } = await Jt.post(
|
|
6632
6640
|
t,
|
|
@@ -6642,15 +6650,15 @@ const qi = (e) => {
|
|
|
6642
6650
|
}
|
|
6643
6651
|
}
|
|
6644
6652
|
), l = (d == null ? void 0 : d.translatedText) || e;
|
|
6645
|
-
return
|
|
6653
|
+
return Xi(e, n, l), l;
|
|
6646
6654
|
} catch (d) {
|
|
6647
6655
|
return console.warn(`[Translation] Failed for: "${e}"`, d), e;
|
|
6648
6656
|
}
|
|
6649
|
-
},
|
|
6657
|
+
}, el = (e) => typeof e == "string" && e.trim().length > 0, at = async (e, n, t) => {
|
|
6650
6658
|
const r = await Promise.all(
|
|
6651
6659
|
Object.entries(e).map(async ([o, i]) => {
|
|
6652
|
-
if (
|
|
6653
|
-
const s = await
|
|
6660
|
+
if (el(i)) {
|
|
6661
|
+
const s = await Ji(i, n, t);
|
|
6654
6662
|
return [o, s];
|
|
6655
6663
|
} else if (Array.isArray(i)) {
|
|
6656
6664
|
const s = await Promise.all(
|
|
@@ -6669,38 +6677,40 @@ const qi = (e) => {
|
|
|
6669
6677
|
return Object.fromEntries(r);
|
|
6670
6678
|
};
|
|
6671
6679
|
export {
|
|
6672
|
-
|
|
6680
|
+
Al as BackAndNextButton,
|
|
6673
6681
|
Xe as BusinessRuleCard,
|
|
6674
6682
|
gt as BusinessRuleCardNew,
|
|
6675
6683
|
Fn as BusinessRuleView,
|
|
6676
6684
|
ft as BusinessRuleViewNew,
|
|
6677
|
-
|
|
6678
|
-
|
|
6679
|
-
|
|
6680
|
-
|
|
6681
|
-
|
|
6685
|
+
hl as BusinessRules,
|
|
6686
|
+
ml as BusinessRulesNew,
|
|
6687
|
+
fl as BusinessRulesWithGroup,
|
|
6688
|
+
$l as Checkpicker,
|
|
6689
|
+
Nl as DragAndDropBoxes,
|
|
6682
6690
|
tt as DraggableList,
|
|
6683
6691
|
ka as DropdownMenu,
|
|
6684
|
-
|
|
6692
|
+
El as DropdownMenuContainer,
|
|
6685
6693
|
ge as EValueHowToSetUp,
|
|
6686
|
-
|
|
6687
|
-
|
|
6688
|
-
|
|
6694
|
+
bl as Filter,
|
|
6695
|
+
vl as FilterModal,
|
|
6696
|
+
yl as FormFilter,
|
|
6689
6697
|
ut as ModalRules,
|
|
6690
6698
|
Ta as RulesForm,
|
|
6691
|
-
|
|
6699
|
+
kl as SendButton,
|
|
6692
6700
|
_o as buildEsConditionSentence,
|
|
6693
6701
|
da as convertRangeToString,
|
|
6694
6702
|
ht as filterByGroup,
|
|
6695
|
-
|
|
6696
|
-
|
|
6697
|
-
|
|
6698
|
-
|
|
6699
|
-
|
|
6700
|
-
|
|
6701
|
-
|
|
6702
|
-
|
|
6703
|
-
|
|
6703
|
+
Il as flatFromGroups,
|
|
6704
|
+
xl as formatDecisionForBackend,
|
|
6705
|
+
Oe as getConditionsByGroupNew,
|
|
6706
|
+
Yi as groupsRecordToArrayNew,
|
|
6707
|
+
Rl as mapByGroupNew,
|
|
6708
|
+
Fl as normalizeDecisionToNewShape,
|
|
6709
|
+
Tl as parseRangeFromString,
|
|
6710
|
+
wl as revertSortedDataSampleSwitchPlaces,
|
|
6711
|
+
Cl as revertSortedDataSwitchPlaces,
|
|
6712
|
+
Dl as sortDisplayDataSampleSwitchPlaces,
|
|
6713
|
+
Sl as sortDisplayDataSwitchPlaces,
|
|
6704
6714
|
at as translateObject,
|
|
6705
|
-
|
|
6715
|
+
Ji as translateText
|
|
6706
6716
|
};
|