@isettingkit/business-rules 1.0.14 → 1.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.es.js +96 -88
  2. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx as a, jsxs as h, Fragment as D } from "react/jsx-runtime";
2
2
  import { MdOutlineDelete as fe, MdClear as ne, MdAdd as ae, MdOutlineFilterAltOff as ie, MdOutlineFilterAlt as oe } from "react-icons/md";
3
- import { inube as w, Stack as p, Divider as S, Icon as M, Text as f, SkeletonLine as $, useMediaQuery as A, Blanket as re, Button as N, Grid as le, Box as ye, Tag as se, Checkpicker as xe, Toggle as de, Checkbox as we, Date as Q } from "@inubekit/inubekit";
4
- import y, { keyframes as ve } from "styled-components";
3
+ import { inube as w, Stack as p, Divider as S, Icon as M, Text as y, SkeletonLine as $, useMediaQuery as A, Blanket as re, Button as N, Grid as le, Box as ye, Tag as se, Checkpicker as xe, Toggle as de, Checkbox as we, Date as Q } from "@inubekit/inubekit";
4
+ import f, { keyframes as ve } from "styled-components";
5
5
  import { ValueDataType as k, ValueHowToSetUp as O, DecisionConditionRender as Y } from "@isettingkit/input";
6
6
  import { DecisionViewConditionRenderer as U } from "@isettingkit/view";
7
7
  import { createPortal as ce } from "react-dom";
@@ -10,9 +10,13 @@ import { string as H, mixed as he, object as V, number as q, lazy as K, date as
10
10
  import { useState as z, useEffect as Se } from "react";
11
11
  import De from "axios";
12
12
  import { franc as Ee } from "franc-min";
13
- const Ne = y.div`
13
+ const Ne = f.div`
14
14
  border-radius: 8px;
15
- border: 1px solid ${w.palette.neutral.N30};
15
+ border: 1px solid
16
+ ${({ theme: e }) => {
17
+ var t, n;
18
+ return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || w.palette.neutral.N30;
19
+ }};
16
20
  box-sizing: border-box;
17
21
  display: flex;
18
22
  flex-direction: column;
@@ -22,7 +26,7 @@ const Ne = y.div`
22
26
  height: 100%;
23
27
  box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
24
28
  `;
25
- y.div`
29
+ f.div`
26
30
  width: 100%;
27
31
  height: 100%;
28
32
  overflow-y: auto;
@@ -61,7 +65,7 @@ const P = (e) => {
61
65
  ) })
62
66
  ] })
63
67
  ] }) });
64
- }, J = y.div`
68
+ }, J = f.div`
65
69
  & > div {
66
70
  border-radius: 8px;
67
71
  border: 1px solid
@@ -70,7 +74,7 @@ const P = (e) => {
70
74
  return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || w.palette.neutral.N30;
71
75
  }};
72
76
  }
73
- `, X = y.div`
77
+ `, X = f.div`
74
78
  width: 100%;
75
79
  height: 100%;
76
80
  overflow-y: auto;
@@ -136,7 +140,7 @@ const Le = {
136
140
  height: "203px",
137
141
  children: [
138
142
  /* @__PURE__ */ a(
139
- f,
143
+ y,
140
144
  {
141
145
  type: "label",
142
146
  size: "large",
@@ -255,12 +259,12 @@ const Le = {
255
259
  visibleConditions: s
256
260
  }
257
261
  );
258
- }, Ve = y.div`
262
+ }, Ve = f.div`
259
263
  position: relative;
260
264
  & > div {
261
265
  padding: 24px 16px;
262
266
  }
263
- `, ze = y.div`
267
+ `, ze = f.div`
264
268
  background-color: ${({ theme: e }) => {
265
269
  var t, n;
266
270
  return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N0) || w.palette.neutral.N0;
@@ -301,7 +305,7 @@ const Le = {
301
305
  return ce(
302
306
  /* @__PURE__ */ a(Ve, { smallScreen: u, children: /* @__PURE__ */ a(re, { children: /* @__PURE__ */ a(ze, { children: /* @__PURE__ */ h(p, { direction: "column", gap: "24px", children: [
303
307
  /* @__PURE__ */ a(p, { direction: "column", gap: "24px", children: /* @__PURE__ */ h(p, { alignItems: "center", justifyContent: "space-between", children: [
304
- /* @__PURE__ */ a(f, { type: "title", size: "large", appearance: "dark", weight: "bold", children: o }),
308
+ /* @__PURE__ */ a(y, { type: "title", size: "large", appearance: "dark", weight: "bold", children: o }),
305
309
  /* @__PURE__ */ a(ne, { size: "24px", cursor: "pointer", onClick: i })
306
310
  ] }) }),
307
311
  t
@@ -318,7 +322,7 @@ const Le = {
318
322
  transform: translateY(0);
319
323
  }
320
324
  `;
321
- y.div`
325
+ f.div`
322
326
  border-radius: 8px;
323
327
  border: 1px solid
324
328
  ${({ theme: e }) => {
@@ -332,7 +336,7 @@ y.div`
332
336
  height: 100%;
333
337
  box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
334
338
  `;
335
- y.div`
339
+ f.div`
336
340
  & > div {
337
341
  border-radius: 8px;
338
342
  border: 1px solid
@@ -342,7 +346,7 @@ y.div`
342
346
  }};
343
347
  }
344
348
  `;
345
- const je = y.div`
349
+ const je = f.div`
346
350
  & > div {
347
351
  background-color: ${({ theme: e }) => {
348
352
  var t, n;
@@ -354,18 +358,18 @@ const je = y.div`
354
358
  width: 100%;
355
359
  height: 100%;
356
360
  padding-bottom: 12px;
357
- `, pe = y.div`
361
+ `, pe = f.div`
358
362
  width: 100%;
359
363
  height: 100%;
360
364
  & > div {
361
365
  animation: ${Ue} 600ms ease-out;
362
366
  }
363
- `, qe = y.div`
367
+ `, qe = f.div`
364
368
  & > div > div {
365
369
  border-radius: 8px;
366
370
  box-sizing: border-box;
367
371
  }
368
- `, Be = y.div`
372
+ `, Be = f.div`
369
373
  & > div {
370
374
  width: 100%;
371
375
  height: 100%;
@@ -404,7 +408,7 @@ function He(e) {
404
408
  function Pe(e) {
405
409
  const { decision: t, controls: n, handleOpenModal: i, handleDelete: o, textValues: r } = e;
406
410
  return t ? /* @__PURE__ */ a(pe, { children: /* @__PURE__ */ h(p, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
407
- /* @__PURE__ */ a(f, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: t.decisionId }),
411
+ /* @__PURE__ */ a(y, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: t.decisionId }),
408
412
  /* @__PURE__ */ a(
409
413
  P,
410
414
  {
@@ -425,7 +429,7 @@ function Ge(e) {
425
429
  shouldRenderEmptyMessage: o
426
430
  } = e, r = t || "Agregar decisión";
427
431
  return /* @__PURE__ */ a(pe, { children: o ? null : /* @__PURE__ */ h(p, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
428
- /* @__PURE__ */ a(f, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: "Nueva decisión" }),
432
+ /* @__PURE__ */ a(y, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: "Nueva decisión" }),
429
433
  /* @__PURE__ */ a(
430
434
  je,
431
435
  {
@@ -440,7 +444,7 @@ function Ge(e) {
440
444
  controls: !1,
441
445
  children: /* @__PURE__ */ h(p, { direction: "column", gap: "12px", alignItems: "center", children: [
442
446
  /* @__PURE__ */ a(M, { appearance: "gray", icon: /* @__PURE__ */ a(ae, {}), size: "35px" }),
443
- /* @__PURE__ */ a(f, { appearance: "gray", type: "body", size: "large", children: r })
447
+ /* @__PURE__ */ a(y, { appearance: "gray", type: "body", size: "large", children: r })
444
448
  ] })
445
449
  }
446
450
  )
@@ -488,7 +492,7 @@ const Qe = {
488
492
  })
489
493
  ), g = ((i == null ? void 0 : i.length) === 0 || i.length < Math.floor(window.innerWidth / 300)) && !o && t;
490
494
  return { renderedCards: s, shouldRenderAddCard: g };
491
- }, kt = (e) => {
495
+ }, At = (e) => {
492
496
  const {
493
497
  controls: t = !0,
494
498
  customTitleContentAddCard: n,
@@ -524,10 +528,10 @@ const Qe = {
524
528
  justifyContent: "center",
525
529
  alignItems: "center",
526
530
  children: [
527
- /* @__PURE__ */ a(f, { as: "span", type: "label", size: "large", appearance: "gray", children: i || /* @__PURE__ */ h(D, { children: [
531
+ /* @__PURE__ */ a(y, { as: "span", type: "label", size: "large", appearance: "gray", children: i || /* @__PURE__ */ h(D, { children: [
528
532
  "Aún NO tienes definidas tasas de interés efectivas . Presiona",
529
533
  /* @__PURE__ */ h(
530
- f,
534
+ y,
531
535
  {
532
536
  as: "span",
533
537
  type: "label",
@@ -590,7 +594,7 @@ const Qe = {
590
594
  onCloseModal: d,
591
595
  title: s ? "Editar Decisión" : "Nueva decisión",
592
596
  children: /* @__PURE__ */ a(
593
- st,
597
+ dt,
594
598
  {
595
599
  decision: s || u,
596
600
  onSubmitEvent: b,
@@ -602,7 +606,7 @@ const Qe = {
602
606
  }
603
607
  )
604
608
  ] });
605
- }, Ke = y.div`
609
+ }, Ke = f.div`
606
610
  display: flex;
607
611
  justify-content: ${({ justifyContent: e }) => e};
608
612
  align-items: ${({ alignItems: e }) => e};
@@ -665,7 +669,11 @@ const Qe = {
665
669
  children: t
666
670
  }
667
671
  );
668
- }, At = (e) => {
672
+ }, We = f.div`
673
+ & > div {
674
+ width: 100%;
675
+ }
676
+ `, Ft = (e) => {
669
677
  const {
670
678
  appliedFilters: t,
671
679
  onClear: n,
@@ -674,7 +682,7 @@ const Qe = {
674
682
  titleClearFilter: r,
675
683
  titleFilter: u
676
684
  } = e, l = !t || t.length === 0;
677
- return /* @__PURE__ */ a(ye, { borderRadius: "8px", width: "100%", children: /* @__PURE__ */ h(le, { gap: "12px", templateColumns: "1fr auto auto", width: "100%", children: [
685
+ return /* @__PURE__ */ a(We, { children: /* @__PURE__ */ a(ye, { borderRadius: "8px", width: "100%", children: /* @__PURE__ */ h(le, { gap: "12px", templateColumns: "1fr auto auto", width: "100%", children: [
678
686
  /* @__PURE__ */ a(
679
687
  ge,
680
688
  {
@@ -686,7 +694,7 @@ const Qe = {
686
694
  alignItems: "center",
687
695
  padding: "0px 8px",
688
696
  border: !0,
689
- children: l ? /* @__PURE__ */ a(f, { size: "small", type: "label", appearance: "gray", children: o }) : t == null ? void 0 : t.map((s) => /* @__PURE__ */ a(
697
+ children: l ? /* @__PURE__ */ a(y, { size: "small", type: "label", appearance: "gray", children: o }) : t == null ? void 0 : t.map((s) => /* @__PURE__ */ a(
690
698
  se,
691
699
  {
692
700
  appearance: "primary",
@@ -721,8 +729,8 @@ const Qe = {
721
729
  children: u
722
730
  }
723
731
  )
724
- ] }) });
725
- }, We = y.div`
732
+ ] }) }) });
733
+ }, Je = f.div`
726
734
  display: flex;
727
735
  flex-direction: column;
728
736
  background-color: ${({ theme: e }) => {
@@ -735,7 +743,7 @@ const Qe = {
735
743
  padding: 24px;
736
744
  gap: 24px;
737
745
  box-sizing: border-box;
738
- `, Ft = (e) => {
746
+ `, $t = (e) => {
739
747
  const {
740
748
  actionButtonLabel: t,
741
749
  cancelButtonLabel: n,
@@ -751,12 +759,12 @@ const Qe = {
751
759
  "The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
752
760
  );
753
761
  return ce(
754
- /* @__PURE__ */ a(re, { children: /* @__PURE__ */ h(We, { $smallScreen: g, children: [
762
+ /* @__PURE__ */ a(re, { children: /* @__PURE__ */ h(Je, { $smallScreen: g, children: [
755
763
  /* @__PURE__ */ h(p, { direction: "column", gap: "16px", children: [
756
764
  /* @__PURE__ */ h(p, { alignContent: "center", justifyContent: "space-between", children: [
757
- /* @__PURE__ */ a(f, { appearance: "dark", size: "small", type: "headline", children: s }),
765
+ /* @__PURE__ */ a(y, { appearance: "dark", size: "small", type: "headline", children: s }),
758
766
  /* @__PURE__ */ h(p, { alignItems: "center", children: [
759
- /* @__PURE__ */ a(f, { children: "Cerrar" }),
767
+ /* @__PURE__ */ a(y, { children: "Cerrar" }),
760
768
  /* @__PURE__ */ a(
761
769
  M,
762
770
  {
@@ -798,7 +806,7 @@ const Qe = {
798
806
  ] }) }),
799
807
  c
800
808
  );
801
- }, $t = (e) => {
809
+ }, It = (e) => {
802
810
  const { appliedFilters: t, fields: n, onChange: i, noFiltersLabel: o } = e, r = A("(max-width: 768px)"), u = !t || t.length === 0;
803
811
  return /* @__PURE__ */ h(p, { direction: "column", gap: "16px", children: [
804
812
  r && /* @__PURE__ */ h(D, { children: [
@@ -816,7 +824,7 @@ const Qe = {
816
824
  border: !0,
817
825
  width: "100%",
818
826
  height: "32px",
819
- children: u ? /* @__PURE__ */ a(f, { size: "small", type: "label", appearance: "gray", children: o }) : t == null ? void 0 : t.map((l) => /* @__PURE__ */ a(
827
+ children: u ? /* @__PURE__ */ a(y, { size: "small", type: "label", appearance: "gray", children: o }) : t == null ? void 0 : t.map((l) => /* @__PURE__ */ a(
820
828
  se,
821
829
  {
822
830
  appearance: "primary",
@@ -854,7 +862,7 @@ const Qe = {
854
862
  )
855
863
  ] }, l.name))
856
864
  ] });
857
- }, It = (e) => {
865
+ }, Rt = (e) => {
858
866
  console.log(e);
859
867
  const { dataDecision: t, originalDecision: n } = e, i = {
860
868
  conditionName: t.ruleName || "",
@@ -871,7 +879,7 @@ const Qe = {
871
879
  (o) => o.hidden ? { ...i } : o
872
880
  )
873
881
  };
874
- }, Rt = (e) => {
882
+ }, Mt = (e) => {
875
883
  const { decisions: t } = e;
876
884
  return t == null ? void 0 : t.map((n) => {
877
885
  var o;
@@ -890,14 +898,14 @@ const Qe = {
890
898
  )
891
899
  } : n;
892
900
  });
893
- }, Je = (e) => ({
901
+ }, Xe = (e) => ({
894
902
  schema: H().required("Required").test(
895
903
  "non-empty",
896
904
  "Value cannot be empty",
897
905
  (t) => t != null && t.trim() !== ""
898
906
  ),
899
907
  value: e
900
- }), Xe = (e) => ({
908
+ }), Ze = (e) => ({
901
909
  schema: he().test(
902
910
  "isArrayOrString",
903
911
  "Must be an array of strings/numbers or a single string",
@@ -906,7 +914,7 @@ const Qe = {
906
914
  ) : typeof t == "string"
907
915
  ),
908
916
  value: e
909
- }), Ze = (e) => ({
917
+ }), et = (e) => ({
910
918
  schema: he().test(
911
919
  "isArrayOrString",
912
920
  "Must be an array of strings/numbers or a single string",
@@ -915,7 +923,7 @@ const Qe = {
915
923
  ) : typeof t == "string"
916
924
  ),
917
925
  value: e
918
- }), et = (e) => {
926
+ }), tt = (e) => {
919
927
  const t = (e == null ? void 0 : e.from) ?? 0, n = (e == null ? void 0 : e.to) ?? 0;
920
928
  return {
921
929
  schema: V({
@@ -937,15 +945,15 @@ const Qe = {
937
945
  } : {
938
946
  schema: H().required("Required"),
939
947
  value: e
940
- }, tt = {
941
- [x.LIST_OF_VALUES]: Xe,
942
- [x.LIST_OF_VALUES_MULTI]: Ze,
943
- [x.RANGE]: et,
948
+ }, nt = {
949
+ [x.LIST_OF_VALUES]: Ze,
950
+ [x.LIST_OF_VALUES_MULTI]: et,
951
+ [x.RANGE]: tt,
944
952
  [x.GREATER_THAN]: j,
945
953
  [x.LESS_THAN]: j,
946
954
  [x.EQUAL]: j
947
- }, Z = (e) => tt[e] || Je;
948
- function nt({
955
+ }, Z = (e) => nt[e] || Xe;
956
+ function at({
949
957
  decision: e,
950
958
  onSubmitEvent: t,
951
959
  textValues: n
@@ -1054,7 +1062,7 @@ function nt({
1054
1062
  });
1055
1063
  } };
1056
1064
  }
1057
- const at = y.div`
1065
+ const it = f.div`
1058
1066
  & > div {
1059
1067
  border-radius: 8px;
1060
1068
  border: 1px solid
@@ -1063,7 +1071,7 @@ const at = y.div`
1063
1071
  return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || w.palette.neutral.N30;
1064
1072
  }};
1065
1073
  }
1066
- `, it = y.div`
1074
+ `, ot = f.div`
1067
1075
  width: 100%;
1068
1076
  height: 100%;
1069
1077
  overflow-y: auto;
@@ -1080,7 +1088,7 @@ const at = y.div`
1080
1088
  background-color: #ebecf0;
1081
1089
  border-radius: 8px;
1082
1090
  }
1083
- `, ot = (e) => {
1091
+ `, rt = (e) => {
1084
1092
  const {
1085
1093
  checked: t,
1086
1094
  children: n,
@@ -1104,12 +1112,12 @@ const at = y.div`
1104
1112
  onChange: c,
1105
1113
  size: "small",
1106
1114
  value: l,
1107
- children: /* @__PURE__ */ a(f, { size: "medium", type: "label", weight: "bold", children: r })
1115
+ children: /* @__PURE__ */ a(y, { size: "medium", type: "label", weight: "bold", children: r })
1108
1116
  }
1109
1117
  ) }),
1110
1118
  s && /* @__PURE__ */ a(D, { children: n })
1111
1119
  ] });
1112
- }, rt = (e) => {
1120
+ }, lt = (e) => {
1113
1121
  const {
1114
1122
  onHandleStartChange: t,
1115
1123
  onHandleEndChange: n,
@@ -1134,7 +1142,7 @@ const at = y.div`
1134
1142
  return /* @__PURE__ */ h(D, { children: [
1135
1143
  /* @__PURE__ */ h(p, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
1136
1144
  /* @__PURE__ */ a(
1137
- f,
1145
+ y,
1138
1146
  {
1139
1147
  appearance: "gray",
1140
1148
  margin: "10px 0",
@@ -1200,7 +1208,7 @@ const at = y.div`
1200
1208
  }
1201
1209
  )
1202
1210
  ] });
1203
- }, lt = (e) => {
1211
+ }, st = (e) => {
1204
1212
  const {
1205
1213
  formik: t,
1206
1214
  textValues: n,
@@ -1220,7 +1228,7 @@ const at = y.div`
1220
1228
  isDecision: !0
1221
1229
  }),
1222
1230
  /* @__PURE__ */ a(S, { dashed: !0 }),
1223
- /* @__PURE__ */ a(at, { children: /* @__PURE__ */ a(it, { children: /* @__PURE__ */ h(
1231
+ /* @__PURE__ */ a(it, { children: /* @__PURE__ */ a(ot, { children: /* @__PURE__ */ h(
1224
1232
  p,
1225
1233
  {
1226
1234
  direction: "column",
@@ -1235,7 +1243,7 @@ const at = y.div`
1235
1243
  alignItems: "center",
1236
1244
  gap: "64px",
1237
1245
  children: [
1238
- /* @__PURE__ */ a(f, { type: "title", size: "small", weight: "bold", appearance: "gray", children: n.factsThatConditionIt }),
1246
+ /* @__PURE__ */ a(y, { type: "title", size: "small", weight: "bold", appearance: "gray", children: n.factsThatConditionIt }),
1239
1247
  /* @__PURE__ */ a(
1240
1248
  de,
1241
1249
  {
@@ -1243,14 +1251,14 @@ const at = y.div`
1243
1251
  onChange: () => u(!t.values.toggleNone),
1244
1252
  checked: t.values.toggleNone,
1245
1253
  size: "small",
1246
- children: /* @__PURE__ */ a(f, { as: "span", size: "medium", type: "label", weight: "bold", children: n.none })
1254
+ children: /* @__PURE__ */ a(y, { as: "span", size: "medium", type: "label", weight: "bold", children: n.none })
1247
1255
  }
1248
1256
  )
1249
1257
  ]
1250
1258
  }
1251
1259
  ),
1252
1260
  /* @__PURE__ */ a(p, { direction: "column", gap: "20px", children: o == null ? void 0 : o.map((d) => /* @__PURE__ */ a(
1253
- ot,
1261
+ rt,
1254
1262
  {
1255
1263
  id: `toggle-${d.conditionName}`,
1256
1264
  name: `toggle.${d.conditionName}`,
@@ -1270,7 +1278,7 @@ const at = y.div`
1270
1278
  n.terms && /* @__PURE__ */ h(D, { children: [
1271
1279
  /* @__PURE__ */ a(S, { dashed: !0 }),
1272
1280
  /* @__PURE__ */ a(
1273
- rt,
1281
+ lt,
1274
1282
  {
1275
1283
  labelStart: n.termStart,
1276
1284
  labelEnd: n.termEnd,
@@ -1290,15 +1298,15 @@ const at = y.div`
1290
1298
  )
1291
1299
  ] }),
1292
1300
  /* @__PURE__ */ a(S, {}),
1293
- s && /* @__PURE__ */ a(f, { type: "label", size: "medium", appearance: "danger", children: String(t.errors.conditionsThatEstablishesTheDecision) }),
1301
+ s && /* @__PURE__ */ a(y, { type: "label", size: "medium", appearance: "danger", children: String(t.errors.conditionsThatEstablishesTheDecision) }),
1294
1302
  /* @__PURE__ */ h(p, { direction: "row", justifyContent: "end", gap: "16px", children: [
1295
1303
  /* @__PURE__ */ a(N, { appearance: "gray", onClick: i, children: n.cancel }),
1296
1304
  /* @__PURE__ */ a(N, { type: "submit", children: n.confirm })
1297
1305
  ] })
1298
1306
  ] }) });
1299
- }, st = (e) => {
1307
+ }, dt = (e) => {
1300
1308
  var T;
1301
- const { decision: t, onSubmitEvent: n, textValues: i, onCancel: o } = e, { formik: r, handleToggleNoneChange: u } = nt({
1309
+ const { decision: t, onSubmitEvent: n, textValues: i, onCancel: o } = e, { formik: r, handleToggleNoneChange: u } = at({
1302
1310
  decision: t,
1303
1311
  onSubmitEvent: n,
1304
1312
  textValues: i
@@ -1312,7 +1320,7 @@ const at = y.div`
1312
1320
  (m) => !m.hidden
1313
1321
  )) || [], g = !!r.errors.conditionsThatEstablishesTheDecision && r.submitCount > 0, c = r.touched.effectiveFrom ? r.errors.effectiveFrom ? "invalid" : "valid" : void 0, d = r.touched.validUntil ? r.errors.validUntil ? "invalid" : "valid" : void 0;
1314
1322
  return /* @__PURE__ */ a(
1315
- lt,
1323
+ st,
1316
1324
  {
1317
1325
  formik: r,
1318
1326
  onCancel: o,
@@ -1344,7 +1352,7 @@ const at = y.div`
1344
1352
  termEndStatus: d
1345
1353
  }
1346
1354
  );
1347
- }, Mt = (e) => {
1355
+ }, Lt = (e) => {
1348
1356
  var o;
1349
1357
  const { decisionTemplate: t } = e, n = { ...t }, i = (o = n.conditionsThatEstablishesTheDecision) == null ? void 0 : o.find(
1350
1358
  (r) => r.switchPlaces
@@ -1360,7 +1368,7 @@ const at = y.div`
1360
1368
  (r) => r.conditionName === i.conditionName ? { ...r, hidden: !0 } : r
1361
1369
  )
1362
1370
  } : n;
1363
- }, Lt = (e) => {
1371
+ }, Ot = (e) => {
1364
1372
  const { decisions: t } = e;
1365
1373
  return t == null ? void 0 : t.map((n) => {
1366
1374
  var o;
@@ -1379,16 +1387,16 @@ const at = y.div`
1379
1387
  )
1380
1388
  } : n;
1381
1389
  });
1382
- }, I = /* @__PURE__ */ new Map(), dt = (e, t) => I.get(`${t}:${e}`), ct = (e, t, n) => {
1390
+ }, I = /* @__PURE__ */ new Map(), ct = (e, t) => I.get(`${t}:${e}`), ht = (e, t, n) => {
1383
1391
  const i = `${t}:${e}`;
1384
1392
  if (I.set(i, n), I.size > 1e3) {
1385
1393
  const o = I.keys().next().value;
1386
1394
  o !== void 0 && I.delete(o);
1387
1395
  }
1388
- }, ee = /* @__PURE__ */ new Map(), ht = 1e3, ut = (e) => {
1396
+ }, ee = /* @__PURE__ */ new Map(), ut = 1e3, pt = (e) => {
1389
1397
  const t = Date.now(), n = ee.get(e) || 0;
1390
- return t - n < ht ? !0 : (ee.set(e, t), !1);
1391
- }, pt = (e) => {
1398
+ return t - n < ut ? !0 : (ee.set(e, t), !1);
1399
+ }, gt = (e) => {
1392
1400
  const t = Ee(e);
1393
1401
  return {
1394
1402
  spa: "es",
@@ -1398,12 +1406,12 @@ const at = y.div`
1398
1406
  ita: "it",
1399
1407
  por: "pt"
1400
1408
  }[t] || "en";
1401
- }, gt = async (e, t, { url: n, apiKey: i }) => {
1402
- const o = `${t}:${e}`, r = dt(e, t);
1409
+ }, mt = async (e, t, { url: n, apiKey: i }) => {
1410
+ const o = `${t}:${e}`, r = ct(e, t);
1403
1411
  if (r) return r;
1404
- if (ut(o))
1412
+ if (pt(o))
1405
1413
  return console.warn(`[Throttle] Skipped translation for: "${e}"`), e;
1406
- const u = pt(e);
1414
+ const u = gt(e);
1407
1415
  try {
1408
1416
  const { data: l } = await De.post(
1409
1417
  n,
@@ -1419,15 +1427,15 @@ const at = y.div`
1419
1427
  }
1420
1428
  }
1421
1429
  ), s = (l == null ? void 0 : l.translatedText) || e;
1422
- return ct(e, t, s), s;
1430
+ return ht(e, t, s), s;
1423
1431
  } catch (l) {
1424
1432
  return console.warn(`[Translation] Failed for: "${e}"`, l), e;
1425
1433
  }
1426
- }, mt = (e) => typeof e == "string" && e.trim().length > 0, te = async (e, t, n) => {
1434
+ }, bt = (e) => typeof e == "string" && e.trim().length > 0, te = async (e, t, n) => {
1427
1435
  const i = await Promise.all(
1428
1436
  Object.entries(e).map(async ([o, r]) => {
1429
- if (mt(r)) {
1430
- const u = await gt(r, t, n);
1437
+ if (bt(r)) {
1438
+ const u = await mt(r, t, n);
1431
1439
  return [o, u];
1432
1440
  } else if (Array.isArray(r)) {
1433
1441
  const u = await Promise.all(
@@ -1448,16 +1456,16 @@ const at = y.div`
1448
1456
  export {
1449
1457
  P as BusinessRuleCard,
1450
1458
  ue as BusinessRuleView,
1451
- kt as BusinessRules,
1452
- At as Filter,
1453
- Ft as FilterModal,
1454
- $t as FormFilter,
1459
+ At as BusinessRules,
1460
+ Ft as Filter,
1461
+ $t as FilterModal,
1462
+ It as FormFilter,
1455
1463
  _e as ModalRules,
1456
- st as RulesForm,
1457
- It as revertSortedDataSampleSwitchPlaces,
1458
- Rt as revertSortedDataSwitchPlaces,
1459
- Mt as sortDisplayDataSampleSwitchPlaces,
1460
- Lt as sortDisplayDataSwitchPlaces,
1464
+ dt as RulesForm,
1465
+ Rt as revertSortedDataSampleSwitchPlaces,
1466
+ Mt as revertSortedDataSwitchPlaces,
1467
+ Lt as sortDisplayDataSampleSwitchPlaces,
1468
+ Ot as sortDisplayDataSwitchPlaces,
1461
1469
  te as translateObject,
1462
- gt as translateText
1470
+ mt as translateText
1463
1471
  };
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  ],
11
11
  "description": "",
12
12
  "private": false,
13
- "version": "1.0.14",
13
+ "version": "1.0.16",
14
14
  "type": "module",
15
15
  "exports": {
16
16
  ".": {