@isettingkit/business-rules 1.0.14 → 1.0.15

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 +91 -87
  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,7 +10,7 @@ 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
15
  border: 1px solid ${w.palette.neutral.N30};
16
16
  box-sizing: border-box;
@@ -22,7 +22,7 @@ const Ne = y.div`
22
22
  height: 100%;
23
23
  box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
24
24
  `;
25
- y.div`
25
+ f.div`
26
26
  width: 100%;
27
27
  height: 100%;
28
28
  overflow-y: auto;
@@ -61,7 +61,7 @@ const P = (e) => {
61
61
  ) })
62
62
  ] })
63
63
  ] }) });
64
- }, J = y.div`
64
+ }, J = f.div`
65
65
  & > div {
66
66
  border-radius: 8px;
67
67
  border: 1px solid
@@ -70,7 +70,7 @@ const P = (e) => {
70
70
  return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || w.palette.neutral.N30;
71
71
  }};
72
72
  }
73
- `, X = y.div`
73
+ `, X = f.div`
74
74
  width: 100%;
75
75
  height: 100%;
76
76
  overflow-y: auto;
@@ -136,7 +136,7 @@ const Le = {
136
136
  height: "203px",
137
137
  children: [
138
138
  /* @__PURE__ */ a(
139
- f,
139
+ y,
140
140
  {
141
141
  type: "label",
142
142
  size: "large",
@@ -255,12 +255,12 @@ const Le = {
255
255
  visibleConditions: s
256
256
  }
257
257
  );
258
- }, Ve = y.div`
258
+ }, Ve = f.div`
259
259
  position: relative;
260
260
  & > div {
261
261
  padding: 24px 16px;
262
262
  }
263
- `, ze = y.div`
263
+ `, ze = f.div`
264
264
  background-color: ${({ theme: e }) => {
265
265
  var t, n;
266
266
  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 +301,7 @@ const Le = {
301
301
  return ce(
302
302
  /* @__PURE__ */ a(Ve, { smallScreen: u, children: /* @__PURE__ */ a(re, { children: /* @__PURE__ */ a(ze, { children: /* @__PURE__ */ h(p, { direction: "column", gap: "24px", children: [
303
303
  /* @__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 }),
304
+ /* @__PURE__ */ a(y, { type: "title", size: "large", appearance: "dark", weight: "bold", children: o }),
305
305
  /* @__PURE__ */ a(ne, { size: "24px", cursor: "pointer", onClick: i })
306
306
  ] }) }),
307
307
  t
@@ -318,7 +318,7 @@ const Le = {
318
318
  transform: translateY(0);
319
319
  }
320
320
  `;
321
- y.div`
321
+ f.div`
322
322
  border-radius: 8px;
323
323
  border: 1px solid
324
324
  ${({ theme: e }) => {
@@ -332,7 +332,7 @@ y.div`
332
332
  height: 100%;
333
333
  box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
334
334
  `;
335
- y.div`
335
+ f.div`
336
336
  & > div {
337
337
  border-radius: 8px;
338
338
  border: 1px solid
@@ -342,7 +342,7 @@ y.div`
342
342
  }};
343
343
  }
344
344
  `;
345
- const je = y.div`
345
+ const je = f.div`
346
346
  & > div {
347
347
  background-color: ${({ theme: e }) => {
348
348
  var t, n;
@@ -354,18 +354,18 @@ const je = y.div`
354
354
  width: 100%;
355
355
  height: 100%;
356
356
  padding-bottom: 12px;
357
- `, pe = y.div`
357
+ `, pe = f.div`
358
358
  width: 100%;
359
359
  height: 100%;
360
360
  & > div {
361
361
  animation: ${Ue} 600ms ease-out;
362
362
  }
363
- `, qe = y.div`
363
+ `, qe = f.div`
364
364
  & > div > div {
365
365
  border-radius: 8px;
366
366
  box-sizing: border-box;
367
367
  }
368
- `, Be = y.div`
368
+ `, Be = f.div`
369
369
  & > div {
370
370
  width: 100%;
371
371
  height: 100%;
@@ -404,7 +404,7 @@ function He(e) {
404
404
  function Pe(e) {
405
405
  const { decision: t, controls: n, handleOpenModal: i, handleDelete: o, textValues: r } = e;
406
406
  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 }),
407
+ /* @__PURE__ */ a(y, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: t.decisionId }),
408
408
  /* @__PURE__ */ a(
409
409
  P,
410
410
  {
@@ -425,7 +425,7 @@ function Ge(e) {
425
425
  shouldRenderEmptyMessage: o
426
426
  } = e, r = t || "Agregar decisión";
427
427
  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" }),
428
+ /* @__PURE__ */ a(y, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: "Nueva decisión" }),
429
429
  /* @__PURE__ */ a(
430
430
  je,
431
431
  {
@@ -440,7 +440,7 @@ function Ge(e) {
440
440
  controls: !1,
441
441
  children: /* @__PURE__ */ h(p, { direction: "column", gap: "12px", alignItems: "center", children: [
442
442
  /* @__PURE__ */ a(M, { appearance: "gray", icon: /* @__PURE__ */ a(ae, {}), size: "35px" }),
443
- /* @__PURE__ */ a(f, { appearance: "gray", type: "body", size: "large", children: r })
443
+ /* @__PURE__ */ a(y, { appearance: "gray", type: "body", size: "large", children: r })
444
444
  ] })
445
445
  }
446
446
  )
@@ -488,7 +488,7 @@ const Qe = {
488
488
  })
489
489
  ), g = ((i == null ? void 0 : i.length) === 0 || i.length < Math.floor(window.innerWidth / 300)) && !o && t;
490
490
  return { renderedCards: s, shouldRenderAddCard: g };
491
- }, kt = (e) => {
491
+ }, At = (e) => {
492
492
  const {
493
493
  controls: t = !0,
494
494
  customTitleContentAddCard: n,
@@ -524,10 +524,10 @@ const Qe = {
524
524
  justifyContent: "center",
525
525
  alignItems: "center",
526
526
  children: [
527
- /* @__PURE__ */ a(f, { as: "span", type: "label", size: "large", appearance: "gray", children: i || /* @__PURE__ */ h(D, { children: [
527
+ /* @__PURE__ */ a(y, { as: "span", type: "label", size: "large", appearance: "gray", children: i || /* @__PURE__ */ h(D, { children: [
528
528
  "Aún NO tienes definidas tasas de interés efectivas . Presiona",
529
529
  /* @__PURE__ */ h(
530
- f,
530
+ y,
531
531
  {
532
532
  as: "span",
533
533
  type: "label",
@@ -590,7 +590,7 @@ const Qe = {
590
590
  onCloseModal: d,
591
591
  title: s ? "Editar Decisión" : "Nueva decisión",
592
592
  children: /* @__PURE__ */ a(
593
- st,
593
+ dt,
594
594
  {
595
595
  decision: s || u,
596
596
  onSubmitEvent: b,
@@ -602,7 +602,7 @@ const Qe = {
602
602
  }
603
603
  )
604
604
  ] });
605
- }, Ke = y.div`
605
+ }, Ke = f.div`
606
606
  display: flex;
607
607
  justify-content: ${({ justifyContent: e }) => e};
608
608
  align-items: ${({ alignItems: e }) => e};
@@ -665,7 +665,11 @@ const Qe = {
665
665
  children: t
666
666
  }
667
667
  );
668
- }, At = (e) => {
668
+ }, We = f.div`
669
+ & > div {
670
+ width: 100%;
671
+ }
672
+ `, Ft = (e) => {
669
673
  const {
670
674
  appliedFilters: t,
671
675
  onClear: n,
@@ -674,7 +678,7 @@ const Qe = {
674
678
  titleClearFilter: r,
675
679
  titleFilter: u
676
680
  } = 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: [
681
+ 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
682
  /* @__PURE__ */ a(
679
683
  ge,
680
684
  {
@@ -686,7 +690,7 @@ const Qe = {
686
690
  alignItems: "center",
687
691
  padding: "0px 8px",
688
692
  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(
693
+ children: l ? /* @__PURE__ */ a(y, { size: "small", type: "label", appearance: "gray", children: o }) : t == null ? void 0 : t.map((s) => /* @__PURE__ */ a(
690
694
  se,
691
695
  {
692
696
  appearance: "primary",
@@ -721,8 +725,8 @@ const Qe = {
721
725
  children: u
722
726
  }
723
727
  )
724
- ] }) });
725
- }, We = y.div`
728
+ ] }) }) });
729
+ }, Je = f.div`
726
730
  display: flex;
727
731
  flex-direction: column;
728
732
  background-color: ${({ theme: e }) => {
@@ -735,7 +739,7 @@ const Qe = {
735
739
  padding: 24px;
736
740
  gap: 24px;
737
741
  box-sizing: border-box;
738
- `, Ft = (e) => {
742
+ `, $t = (e) => {
739
743
  const {
740
744
  actionButtonLabel: t,
741
745
  cancelButtonLabel: n,
@@ -751,12 +755,12 @@ const Qe = {
751
755
  "The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
752
756
  );
753
757
  return ce(
754
- /* @__PURE__ */ a(re, { children: /* @__PURE__ */ h(We, { $smallScreen: g, children: [
758
+ /* @__PURE__ */ a(re, { children: /* @__PURE__ */ h(Je, { $smallScreen: g, children: [
755
759
  /* @__PURE__ */ h(p, { direction: "column", gap: "16px", children: [
756
760
  /* @__PURE__ */ h(p, { alignContent: "center", justifyContent: "space-between", children: [
757
- /* @__PURE__ */ a(f, { appearance: "dark", size: "small", type: "headline", children: s }),
761
+ /* @__PURE__ */ a(y, { appearance: "dark", size: "small", type: "headline", children: s }),
758
762
  /* @__PURE__ */ h(p, { alignItems: "center", children: [
759
- /* @__PURE__ */ a(f, { children: "Cerrar" }),
763
+ /* @__PURE__ */ a(y, { children: "Cerrar" }),
760
764
  /* @__PURE__ */ a(
761
765
  M,
762
766
  {
@@ -798,7 +802,7 @@ const Qe = {
798
802
  ] }) }),
799
803
  c
800
804
  );
801
- }, $t = (e) => {
805
+ }, It = (e) => {
802
806
  const { appliedFilters: t, fields: n, onChange: i, noFiltersLabel: o } = e, r = A("(max-width: 768px)"), u = !t || t.length === 0;
803
807
  return /* @__PURE__ */ h(p, { direction: "column", gap: "16px", children: [
804
808
  r && /* @__PURE__ */ h(D, { children: [
@@ -816,7 +820,7 @@ const Qe = {
816
820
  border: !0,
817
821
  width: "100%",
818
822
  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(
823
+ children: u ? /* @__PURE__ */ a(y, { size: "small", type: "label", appearance: "gray", children: o }) : t == null ? void 0 : t.map((l) => /* @__PURE__ */ a(
820
824
  se,
821
825
  {
822
826
  appearance: "primary",
@@ -854,7 +858,7 @@ const Qe = {
854
858
  )
855
859
  ] }, l.name))
856
860
  ] });
857
- }, It = (e) => {
861
+ }, Rt = (e) => {
858
862
  console.log(e);
859
863
  const { dataDecision: t, originalDecision: n } = e, i = {
860
864
  conditionName: t.ruleName || "",
@@ -871,7 +875,7 @@ const Qe = {
871
875
  (o) => o.hidden ? { ...i } : o
872
876
  )
873
877
  };
874
- }, Rt = (e) => {
878
+ }, Mt = (e) => {
875
879
  const { decisions: t } = e;
876
880
  return t == null ? void 0 : t.map((n) => {
877
881
  var o;
@@ -890,14 +894,14 @@ const Qe = {
890
894
  )
891
895
  } : n;
892
896
  });
893
- }, Je = (e) => ({
897
+ }, Xe = (e) => ({
894
898
  schema: H().required("Required").test(
895
899
  "non-empty",
896
900
  "Value cannot be empty",
897
901
  (t) => t != null && t.trim() !== ""
898
902
  ),
899
903
  value: e
900
- }), Xe = (e) => ({
904
+ }), Ze = (e) => ({
901
905
  schema: he().test(
902
906
  "isArrayOrString",
903
907
  "Must be an array of strings/numbers or a single string",
@@ -906,7 +910,7 @@ const Qe = {
906
910
  ) : typeof t == "string"
907
911
  ),
908
912
  value: e
909
- }), Ze = (e) => ({
913
+ }), et = (e) => ({
910
914
  schema: he().test(
911
915
  "isArrayOrString",
912
916
  "Must be an array of strings/numbers or a single string",
@@ -915,7 +919,7 @@ const Qe = {
915
919
  ) : typeof t == "string"
916
920
  ),
917
921
  value: e
918
- }), et = (e) => {
922
+ }), tt = (e) => {
919
923
  const t = (e == null ? void 0 : e.from) ?? 0, n = (e == null ? void 0 : e.to) ?? 0;
920
924
  return {
921
925
  schema: V({
@@ -937,15 +941,15 @@ const Qe = {
937
941
  } : {
938
942
  schema: H().required("Required"),
939
943
  value: e
940
- }, tt = {
941
- [x.LIST_OF_VALUES]: Xe,
942
- [x.LIST_OF_VALUES_MULTI]: Ze,
943
- [x.RANGE]: et,
944
+ }, nt = {
945
+ [x.LIST_OF_VALUES]: Ze,
946
+ [x.LIST_OF_VALUES_MULTI]: et,
947
+ [x.RANGE]: tt,
944
948
  [x.GREATER_THAN]: j,
945
949
  [x.LESS_THAN]: j,
946
950
  [x.EQUAL]: j
947
- }, Z = (e) => tt[e] || Je;
948
- function nt({
951
+ }, Z = (e) => nt[e] || Xe;
952
+ function at({
949
953
  decision: e,
950
954
  onSubmitEvent: t,
951
955
  textValues: n
@@ -1054,7 +1058,7 @@ function nt({
1054
1058
  });
1055
1059
  } };
1056
1060
  }
1057
- const at = y.div`
1061
+ const it = f.div`
1058
1062
  & > div {
1059
1063
  border-radius: 8px;
1060
1064
  border: 1px solid
@@ -1063,7 +1067,7 @@ const at = y.div`
1063
1067
  return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || w.palette.neutral.N30;
1064
1068
  }};
1065
1069
  }
1066
- `, it = y.div`
1070
+ `, ot = f.div`
1067
1071
  width: 100%;
1068
1072
  height: 100%;
1069
1073
  overflow-y: auto;
@@ -1080,7 +1084,7 @@ const at = y.div`
1080
1084
  background-color: #ebecf0;
1081
1085
  border-radius: 8px;
1082
1086
  }
1083
- `, ot = (e) => {
1087
+ `, rt = (e) => {
1084
1088
  const {
1085
1089
  checked: t,
1086
1090
  children: n,
@@ -1104,12 +1108,12 @@ const at = y.div`
1104
1108
  onChange: c,
1105
1109
  size: "small",
1106
1110
  value: l,
1107
- children: /* @__PURE__ */ a(f, { size: "medium", type: "label", weight: "bold", children: r })
1111
+ children: /* @__PURE__ */ a(y, { size: "medium", type: "label", weight: "bold", children: r })
1108
1112
  }
1109
1113
  ) }),
1110
1114
  s && /* @__PURE__ */ a(D, { children: n })
1111
1115
  ] });
1112
- }, rt = (e) => {
1116
+ }, lt = (e) => {
1113
1117
  const {
1114
1118
  onHandleStartChange: t,
1115
1119
  onHandleEndChange: n,
@@ -1134,7 +1138,7 @@ const at = y.div`
1134
1138
  return /* @__PURE__ */ h(D, { children: [
1135
1139
  /* @__PURE__ */ h(p, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
1136
1140
  /* @__PURE__ */ a(
1137
- f,
1141
+ y,
1138
1142
  {
1139
1143
  appearance: "gray",
1140
1144
  margin: "10px 0",
@@ -1200,7 +1204,7 @@ const at = y.div`
1200
1204
  }
1201
1205
  )
1202
1206
  ] });
1203
- }, lt = (e) => {
1207
+ }, st = (e) => {
1204
1208
  const {
1205
1209
  formik: t,
1206
1210
  textValues: n,
@@ -1220,7 +1224,7 @@ const at = y.div`
1220
1224
  isDecision: !0
1221
1225
  }),
1222
1226
  /* @__PURE__ */ a(S, { dashed: !0 }),
1223
- /* @__PURE__ */ a(at, { children: /* @__PURE__ */ a(it, { children: /* @__PURE__ */ h(
1227
+ /* @__PURE__ */ a(it, { children: /* @__PURE__ */ a(ot, { children: /* @__PURE__ */ h(
1224
1228
  p,
1225
1229
  {
1226
1230
  direction: "column",
@@ -1235,7 +1239,7 @@ const at = y.div`
1235
1239
  alignItems: "center",
1236
1240
  gap: "64px",
1237
1241
  children: [
1238
- /* @__PURE__ */ a(f, { type: "title", size: "small", weight: "bold", appearance: "gray", children: n.factsThatConditionIt }),
1242
+ /* @__PURE__ */ a(y, { type: "title", size: "small", weight: "bold", appearance: "gray", children: n.factsThatConditionIt }),
1239
1243
  /* @__PURE__ */ a(
1240
1244
  de,
1241
1245
  {
@@ -1243,14 +1247,14 @@ const at = y.div`
1243
1247
  onChange: () => u(!t.values.toggleNone),
1244
1248
  checked: t.values.toggleNone,
1245
1249
  size: "small",
1246
- children: /* @__PURE__ */ a(f, { as: "span", size: "medium", type: "label", weight: "bold", children: n.none })
1250
+ children: /* @__PURE__ */ a(y, { as: "span", size: "medium", type: "label", weight: "bold", children: n.none })
1247
1251
  }
1248
1252
  )
1249
1253
  ]
1250
1254
  }
1251
1255
  ),
1252
1256
  /* @__PURE__ */ a(p, { direction: "column", gap: "20px", children: o == null ? void 0 : o.map((d) => /* @__PURE__ */ a(
1253
- ot,
1257
+ rt,
1254
1258
  {
1255
1259
  id: `toggle-${d.conditionName}`,
1256
1260
  name: `toggle.${d.conditionName}`,
@@ -1270,7 +1274,7 @@ const at = y.div`
1270
1274
  n.terms && /* @__PURE__ */ h(D, { children: [
1271
1275
  /* @__PURE__ */ a(S, { dashed: !0 }),
1272
1276
  /* @__PURE__ */ a(
1273
- rt,
1277
+ lt,
1274
1278
  {
1275
1279
  labelStart: n.termStart,
1276
1280
  labelEnd: n.termEnd,
@@ -1290,15 +1294,15 @@ const at = y.div`
1290
1294
  )
1291
1295
  ] }),
1292
1296
  /* @__PURE__ */ a(S, {}),
1293
- s && /* @__PURE__ */ a(f, { type: "label", size: "medium", appearance: "danger", children: String(t.errors.conditionsThatEstablishesTheDecision) }),
1297
+ s && /* @__PURE__ */ a(y, { type: "label", size: "medium", appearance: "danger", children: String(t.errors.conditionsThatEstablishesTheDecision) }),
1294
1298
  /* @__PURE__ */ h(p, { direction: "row", justifyContent: "end", gap: "16px", children: [
1295
1299
  /* @__PURE__ */ a(N, { appearance: "gray", onClick: i, children: n.cancel }),
1296
1300
  /* @__PURE__ */ a(N, { type: "submit", children: n.confirm })
1297
1301
  ] })
1298
1302
  ] }) });
1299
- }, st = (e) => {
1303
+ }, dt = (e) => {
1300
1304
  var T;
1301
- const { decision: t, onSubmitEvent: n, textValues: i, onCancel: o } = e, { formik: r, handleToggleNoneChange: u } = nt({
1305
+ const { decision: t, onSubmitEvent: n, textValues: i, onCancel: o } = e, { formik: r, handleToggleNoneChange: u } = at({
1302
1306
  decision: t,
1303
1307
  onSubmitEvent: n,
1304
1308
  textValues: i
@@ -1312,7 +1316,7 @@ const at = y.div`
1312
1316
  (m) => !m.hidden
1313
1317
  )) || [], 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
1318
  return /* @__PURE__ */ a(
1315
- lt,
1319
+ st,
1316
1320
  {
1317
1321
  formik: r,
1318
1322
  onCancel: o,
@@ -1344,7 +1348,7 @@ const at = y.div`
1344
1348
  termEndStatus: d
1345
1349
  }
1346
1350
  );
1347
- }, Mt = (e) => {
1351
+ }, Lt = (e) => {
1348
1352
  var o;
1349
1353
  const { decisionTemplate: t } = e, n = { ...t }, i = (o = n.conditionsThatEstablishesTheDecision) == null ? void 0 : o.find(
1350
1354
  (r) => r.switchPlaces
@@ -1360,7 +1364,7 @@ const at = y.div`
1360
1364
  (r) => r.conditionName === i.conditionName ? { ...r, hidden: !0 } : r
1361
1365
  )
1362
1366
  } : n;
1363
- }, Lt = (e) => {
1367
+ }, Ot = (e) => {
1364
1368
  const { decisions: t } = e;
1365
1369
  return t == null ? void 0 : t.map((n) => {
1366
1370
  var o;
@@ -1379,16 +1383,16 @@ const at = y.div`
1379
1383
  )
1380
1384
  } : n;
1381
1385
  });
1382
- }, I = /* @__PURE__ */ new Map(), dt = (e, t) => I.get(`${t}:${e}`), ct = (e, t, n) => {
1386
+ }, I = /* @__PURE__ */ new Map(), ct = (e, t) => I.get(`${t}:${e}`), ht = (e, t, n) => {
1383
1387
  const i = `${t}:${e}`;
1384
1388
  if (I.set(i, n), I.size > 1e3) {
1385
1389
  const o = I.keys().next().value;
1386
1390
  o !== void 0 && I.delete(o);
1387
1391
  }
1388
- }, ee = /* @__PURE__ */ new Map(), ht = 1e3, ut = (e) => {
1392
+ }, ee = /* @__PURE__ */ new Map(), ut = 1e3, pt = (e) => {
1389
1393
  const t = Date.now(), n = ee.get(e) || 0;
1390
- return t - n < ht ? !0 : (ee.set(e, t), !1);
1391
- }, pt = (e) => {
1394
+ return t - n < ut ? !0 : (ee.set(e, t), !1);
1395
+ }, gt = (e) => {
1392
1396
  const t = Ee(e);
1393
1397
  return {
1394
1398
  spa: "es",
@@ -1398,12 +1402,12 @@ const at = y.div`
1398
1402
  ita: "it",
1399
1403
  por: "pt"
1400
1404
  }[t] || "en";
1401
- }, gt = async (e, t, { url: n, apiKey: i }) => {
1402
- const o = `${t}:${e}`, r = dt(e, t);
1405
+ }, mt = async (e, t, { url: n, apiKey: i }) => {
1406
+ const o = `${t}:${e}`, r = ct(e, t);
1403
1407
  if (r) return r;
1404
- if (ut(o))
1408
+ if (pt(o))
1405
1409
  return console.warn(`[Throttle] Skipped translation for: "${e}"`), e;
1406
- const u = pt(e);
1410
+ const u = gt(e);
1407
1411
  try {
1408
1412
  const { data: l } = await De.post(
1409
1413
  n,
@@ -1419,15 +1423,15 @@ const at = y.div`
1419
1423
  }
1420
1424
  }
1421
1425
  ), s = (l == null ? void 0 : l.translatedText) || e;
1422
- return ct(e, t, s), s;
1426
+ return ht(e, t, s), s;
1423
1427
  } catch (l) {
1424
1428
  return console.warn(`[Translation] Failed for: "${e}"`, l), e;
1425
1429
  }
1426
- }, mt = (e) => typeof e == "string" && e.trim().length > 0, te = async (e, t, n) => {
1430
+ }, bt = (e) => typeof e == "string" && e.trim().length > 0, te = async (e, t, n) => {
1427
1431
  const i = await Promise.all(
1428
1432
  Object.entries(e).map(async ([o, r]) => {
1429
- if (mt(r)) {
1430
- const u = await gt(r, t, n);
1433
+ if (bt(r)) {
1434
+ const u = await mt(r, t, n);
1431
1435
  return [o, u];
1432
1436
  } else if (Array.isArray(r)) {
1433
1437
  const u = await Promise.all(
@@ -1448,16 +1452,16 @@ const at = y.div`
1448
1452
  export {
1449
1453
  P as BusinessRuleCard,
1450
1454
  ue as BusinessRuleView,
1451
- kt as BusinessRules,
1452
- At as Filter,
1453
- Ft as FilterModal,
1454
- $t as FormFilter,
1455
+ At as BusinessRules,
1456
+ Ft as Filter,
1457
+ $t as FilterModal,
1458
+ It as FormFilter,
1455
1459
  _e as ModalRules,
1456
- st as RulesForm,
1457
- It as revertSortedDataSampleSwitchPlaces,
1458
- Rt as revertSortedDataSwitchPlaces,
1459
- Mt as sortDisplayDataSampleSwitchPlaces,
1460
- Lt as sortDisplayDataSwitchPlaces,
1460
+ dt as RulesForm,
1461
+ Rt as revertSortedDataSampleSwitchPlaces,
1462
+ Mt as revertSortedDataSwitchPlaces,
1463
+ Lt as sortDisplayDataSampleSwitchPlaces,
1464
+ Ot as sortDisplayDataSwitchPlaces,
1461
1465
  te as translateObject,
1462
- gt as translateText
1466
+ mt as translateText
1463
1467
  };
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.15",
14
14
  "type": "module",
15
15
  "exports": {
16
16
  ".": {