@isettingkit/business-rules 0.1.38 → 0.1.39

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 +64 -63
  2. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -6,8 +6,8 @@ import oe, { createContext as Vt, forwardRef as ht, useContext as ee, useState a
6
6
  import { createPortal as jt } from "react-dom";
7
7
  import { inube as te } from "@inubekit/foundations";
8
8
  import { useFormik as Ht } from "formik";
9
- import { mixed as gt, object as ye, number as Be, string as Ue, lazy as Ze, date as et } from "yup";
10
- import { DecisionViewConditionRenderer as me } from "@isettingkit/view";
9
+ import { mixed as gt, object as ke, number as Be, string as Ue, lazy as Ze, date as et } from "yup";
10
+ import { DecisionViewConditionRenderer as fe } from "@isettingkit/view";
11
11
  import { MdOutlineDelete as _t, MdClear as Ut, MdAdd as Mt } from "react-icons/md";
12
12
  /**
13
13
  * @remix-run/router v1.23.0
@@ -37,7 +37,7 @@ function z(e, t) {
37
37
  if (e === !1 || e === null || typeof e > "u")
38
38
  throw new Error(t);
39
39
  }
40
- function ve(e, t) {
40
+ function ge(e, t) {
41
41
  if (!e) {
42
42
  typeof console < "u" && console.warn(t);
43
43
  try {
@@ -96,7 +96,7 @@ function ot(e, t) {
96
96
  };
97
97
  }
98
98
  function qt(e, t, l) {
99
- t === void 0 && (t = !1), l === void 0 && (l = !0), ve(e === "*" || !e.endsWith("*") || e.endsWith("/*"), 'Route path "' + e + '" will be treated as if it were ' + ('"' + e.replace(/\*$/, "/*") + '" because the `*` character must ') + "always follow a `/` in the pattern. To get rid of this warning, " + ('please change the route path to "' + e.replace(/\*$/, "/*") + '".'));
99
+ t === void 0 && (t = !1), l === void 0 && (l = !0), ge(e === "*" || !e.endsWith("*") || e.endsWith("/*"), 'Route path "' + e + '" will be treated as if it were ' + ('"' + e.replace(/\*$/, "/*") + '" because the `*` character must ') + "always follow a `/` in the pattern. To get rid of this warning, " + ('please change the route path to "' + e.replace(/\*$/, "/*") + '".'));
100
100
  let o = [], n = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(/\/:([\w-]+)(\?)?/g, (i, d, c) => (o.push({
101
101
  paramName: d,
102
102
  isOptional: c != null
@@ -220,7 +220,7 @@ function el(e, t) {
220
220
  hash: a,
221
221
  pathname: i,
222
222
  search: d
223
- } = be(e, {
223
+ } = me(e, {
224
224
  relative: l
225
225
  }), c = i;
226
226
  return o !== "/" && (c = i === "/" ? o : Me([o, i])), n.createHref({
@@ -232,7 +232,7 @@ function el(e, t) {
232
232
  function Ge() {
233
233
  return k.useContext(qe) != null;
234
234
  }
235
- function ge() {
235
+ function be() {
236
236
  return Ge() || (process.env.NODE_ENV !== "production" ? z(
237
237
  !1,
238
238
  // TODO: This error is probably because they somehow have 2 versions of the
@@ -265,11 +265,11 @@ function ll() {
265
265
  matches: n
266
266
  } = k.useContext(ue), {
267
267
  pathname: a
268
- } = ge(), i = JSON.stringify(mt(n, l.v7_relativeSplatPath)), d = k.useRef(!1);
268
+ } = be(), i = JSON.stringify(mt(n, l.v7_relativeSplatPath)), d = k.useRef(!1);
269
269
  return kt(() => {
270
270
  d.current = !0;
271
271
  }), k.useCallback(function(u, h) {
272
- if (h === void 0 && (h = {}), process.env.NODE_ENV !== "production" && ve(d.current, yt), !d.current) return;
272
+ if (h === void 0 && (h = {}), process.env.NODE_ENV !== "production" && ge(d.current, yt), !d.current) return;
273
273
  if (typeof u == "number") {
274
274
  o.go(u);
275
275
  return;
@@ -278,7 +278,7 @@ function ll() {
278
278
  e == null && t !== "/" && (p.pathname = p.pathname === "/" ? t : Me([t, p.pathname])), (h.replace ? o.replace : o.push)(p, h.state, h);
279
279
  }, [t, o, i, a, e]);
280
280
  }
281
- function be(e, t) {
281
+ function me(e, t) {
282
282
  let {
283
283
  relative: l
284
284
  } = t === void 0 ? {} : t, {
@@ -287,7 +287,7 @@ function be(e, t) {
287
287
  matches: n
288
288
  } = k.useContext(ue), {
289
289
  pathname: a
290
- } = ge(), i = JSON.stringify(mt(n, o.v7_relativeSplatPath));
290
+ } = be(), i = JSON.stringify(mt(n, o.v7_relativeSplatPath));
291
291
  return k.useMemo(() => ft(e, JSON.parse(i), a, l === "path"), [e, i, a, l]);
292
292
  }
293
293
  var wt = /* @__PURE__ */ function(e) {
@@ -320,7 +320,7 @@ function al() {
320
320
  return kt(() => {
321
321
  l.current = !0;
322
322
  }), k.useCallback(function(n, a) {
323
- a === void 0 && (a = {}), process.env.NODE_ENV !== "production" && ve(l.current, yt), l.current && (typeof n == "number" ? e.navigate(n) : e.navigate(n, je({
323
+ a === void 0 && (a = {}), process.env.NODE_ENV !== "production" && ge(l.current, yt), l.current && (typeof n == "number" ? e.navigate(n) : e.navigate(n, je({
324
324
  fromRouteId: t
325
325
  }, a)));
326
326
  }, [e, t]);
@@ -354,7 +354,7 @@ function We(e, t) {
354
354
  n = o[a], !(t.indexOf(n) >= 0) && (l[n] = e[n]);
355
355
  return l;
356
356
  }
357
- const ke = "get", we = "application/x-www-form-urlencoded";
357
+ const we = "get", Ne = "application/x-www-form-urlencoded";
358
358
  function Ae(e) {
359
359
  return e != null && typeof e.tagName == "string";
360
360
  }
@@ -375,35 +375,35 @@ function sl(e, t) {
375
375
  (!t || t === "_self") && // Let browser handle "target=_blank" etc.
376
376
  !cl(e);
377
377
  }
378
- let fe = null;
378
+ let xe = null;
379
379
  function pl() {
380
- if (fe === null)
380
+ if (xe === null)
381
381
  try {
382
382
  new FormData(
383
383
  document.createElement("form"),
384
384
  // @ts-expect-error if FormData supports the submitter parameter, this will throw
385
385
  0
386
- ), fe = !1;
386
+ ), xe = !1;
387
387
  } catch {
388
- fe = !0;
388
+ xe = !0;
389
389
  }
390
- return fe;
390
+ return xe;
391
391
  }
392
392
  const hl = /* @__PURE__ */ new Set(["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"]);
393
393
  function Oe(e) {
394
- return e != null && !hl.has(e) ? (process.env.NODE_ENV !== "production" && ve(!1, '"' + e + '" is not a valid `encType` for `<Form>`/`<fetcher.Form>` ' + ('and will default to "' + we + '"')), null) : e;
394
+ return e != null && !hl.has(e) ? (process.env.NODE_ENV !== "production" && ge(!1, '"' + e + '" is not a valid `encType` for `<Form>`/`<fetcher.Form>` ' + ('and will default to "' + Ne + '"')), null) : e;
395
395
  }
396
396
  function vl(e, t) {
397
397
  let l, o, n, a, i;
398
398
  if (dl(e)) {
399
399
  let d = e.getAttribute("action");
400
- o = d ? ae(d, t) : null, l = e.getAttribute("method") || ke, n = Oe(e.getAttribute("enctype")) || we, a = new FormData(e);
400
+ o = d ? ae(d, t) : null, l = e.getAttribute("method") || we, n = Oe(e.getAttribute("enctype")) || Ne, a = new FormData(e);
401
401
  } else if (il(e) || ul(e) && (e.type === "submit" || e.type === "image")) {
402
402
  let d = e.form;
403
403
  if (d == null)
404
404
  throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');
405
405
  let c = e.getAttribute("formaction") || d.getAttribute("action");
406
- if (o = c ? ae(c, t) : null, l = e.getAttribute("formmethod") || d.getAttribute("method") || ke, n = Oe(e.getAttribute("formenctype")) || Oe(d.getAttribute("enctype")) || we, a = new FormData(d, e), !pl()) {
406
+ if (o = c ? ae(c, t) : null, l = e.getAttribute("formmethod") || d.getAttribute("method") || we, n = Oe(e.getAttribute("formenctype")) || Oe(d.getAttribute("enctype")) || Ne, a = new FormData(d, e), !pl()) {
407
407
  let {
408
408
  name: u,
409
409
  type: h,
@@ -417,7 +417,7 @@ function vl(e, t) {
417
417
  } else {
418
418
  if (Ae(e))
419
419
  throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');
420
- l = ke, o = null, n = we, i = e;
420
+ l = we, o = null, n = Ne, i = e;
421
421
  }
422
422
  return a && n === "text/plain" && (i = a, a = void 0), {
423
423
  action: o,
@@ -458,7 +458,7 @@ const $l = typeof window < "u" && typeof window.document < "u" && typeof window.
458
458
  let C = new URL(window.location.href), E = u.startsWith("//") ? new URL(C.protocol + u) : new URL(u), R = ae(E.pathname, m);
459
459
  E.origin === C.origin && R != null ? u = R + E.search + E.hash : f = !0;
460
460
  } catch {
461
- process.env.NODE_ENV !== "production" && ve(!1, '<Link to="' + u + '"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.');
461
+ process.env.NODE_ENV !== "production" && ge(!1, '<Link to="' + u + '"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.');
462
462
  }
463
463
  let x = el(u, {
464
464
  relative: n
@@ -494,9 +494,9 @@ const kl = /* @__PURE__ */ k.forwardRef(function(t, l) {
494
494
  to: c,
495
495
  viewTransition: u,
496
496
  children: h
497
- } = t, p = We(t, bl), g = be(c, {
497
+ } = t, p = We(t, bl), g = me(c, {
498
498
  relative: p.relative
499
- }), m = ge(), b = k.useContext($t), {
499
+ }), m = be(), b = k.useContext($t), {
500
500
  navigator: f,
501
501
  basename: x
502
502
  } = k.useContext(G), y = b != null && // Conditional usage is OK here because the usage of a data router is static
@@ -528,7 +528,7 @@ const wl = /* @__PURE__ */ k.forwardRef((e, t) => {
528
528
  reloadDocument: n,
529
529
  replace: a,
530
530
  state: i,
531
- method: d = ke,
531
+ method: d = we,
532
532
  action: c,
533
533
  onSubmit: u,
534
534
  relative: h,
@@ -560,10 +560,10 @@ const wl = /* @__PURE__ */ k.forwardRef((e, t) => {
560
560
  });
561
561
  process.env.NODE_ENV !== "production" && (wl.displayName = "Form");
562
562
  process.env.NODE_ENV;
563
- var Ne;
563
+ var Ce;
564
564
  (function(e) {
565
565
  e.UseScrollRestoration = "useScrollRestoration", e.UseSubmit = "useSubmit", e.UseSubmitFetcher = "useSubmitFetcher", e.UseFetcher = "useFetcher", e.useViewTransitionState = "useViewTransitionState";
566
- })(Ne || (Ne = {}));
566
+ })(Ce || (Ce = {}));
567
567
  var rt;
568
568
  (function(e) {
569
569
  e.UseFetcher = "useFetcher", e.UseFetchers = "useFetchers", e.UseScrollRestoration = "useScrollRestoration";
@@ -583,7 +583,7 @@ function Cl(e, t) {
583
583
  preventScrollReset: a,
584
584
  relative: i,
585
585
  viewTransition: d
586
- } = t === void 0 ? {} : t, c = tl(), u = ge(), h = be(e, {
586
+ } = t === void 0 ? {} : t, c = tl(), u = be(), h = me(e, {
587
587
  relative: i
588
588
  });
589
589
  return k.useCallback((p) => {
@@ -608,7 +608,7 @@ let Tl = 0, Sl = () => "__" + String(++Tl) + "__";
608
608
  function zl() {
609
609
  let {
610
610
  router: e
611
- } = Tt(Ne.UseSubmit), {
611
+ } = Tt(Ce.UseSubmit), {
612
612
  basename: t
613
613
  } = k.useContext(G), l = nl();
614
614
  return k.useCallback(function(o, n) {
@@ -652,9 +652,9 @@ function Al(e, t) {
652
652
  basename: o
653
653
  } = k.useContext(G), n = k.useContext(ue);
654
654
  n || (process.env.NODE_ENV !== "production" ? z(!1, "useFormAction must be used inside a RouteContext") : z(!1));
655
- let [a] = n.matches.slice(-1), i = ie({}, be(e || ".", {
655
+ let [a] = n.matches.slice(-1), i = ie({}, me(e || ".", {
656
656
  relative: l
657
- })), d = ge();
657
+ })), d = be();
658
658
  if (e == null) {
659
659
  i.search = d.search;
660
660
  let c = new URLSearchParams(i.search), u = c.getAll("index");
@@ -672,7 +672,7 @@ function Dl(e, t) {
672
672
  l == null && (process.env.NODE_ENV !== "production" ? z(!1, "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?") : z(!1));
673
673
  let {
674
674
  basename: o
675
- } = Tt(Ne.useViewTransitionState), n = be(e, {
675
+ } = Tt(Ce.useViewTransitionState), n = me(e, {
676
676
  relative: t.relative
677
677
  });
678
678
  if (!l.isTransitioning)
@@ -1304,15 +1304,15 @@ function Il(e, t) {
1304
1304
  }
1305
1305
  return l;
1306
1306
  }
1307
- function Ce() {
1308
- return Ce = Object.assign ? Object.assign.bind() : function(e) {
1307
+ function Ee() {
1308
+ return Ee = Object.assign ? Object.assign.bind() : function(e) {
1309
1309
  for (var t = 1; t < arguments.length; t++) {
1310
1310
  var l = arguments[t];
1311
1311
  for (var o in l)
1312
1312
  Object.prototype.hasOwnProperty.call(l, o) && (e[o] = l[o]);
1313
1313
  }
1314
1314
  return e;
1315
- }, Ce.apply(this, arguments);
1315
+ }, Ee.apply(this, arguments);
1316
1316
  }
1317
1317
  function at(e, t) {
1318
1318
  var l = Object.keys(e);
@@ -1324,7 +1324,7 @@ function at(e, t) {
1324
1324
  }
1325
1325
  return l;
1326
1326
  }
1327
- function Ee(e) {
1327
+ function Te(e) {
1328
1328
  for (var t = 1; t < arguments.length; t++) {
1329
1329
  var l = arguments[t] != null ? arguments[t] : {};
1330
1330
  t % 2 ? at(Object(l), !0).forEach(function(o) {
@@ -1353,13 +1353,13 @@ function Hl(e, t) {
1353
1353
  return (t === "string" ? String : Number)(e);
1354
1354
  }
1355
1355
  function zt(e) {
1356
- return e && e.map((t, l) => /* @__PURE__ */ oe.createElement(t.tag, Ee({
1356
+ return e && e.map((t, l) => /* @__PURE__ */ oe.createElement(t.tag, Te({
1357
1357
  key: l
1358
1358
  }, t.attr), zt(t.child)));
1359
1359
  }
1360
1360
  function W(e) {
1361
- return (t) => /* @__PURE__ */ oe.createElement(_l, Ce({
1362
- attr: Ee({}, e.attr)
1361
+ return (t) => /* @__PURE__ */ oe.createElement(_l, Ee({
1362
+ attr: Te({}, e.attr)
1363
1363
  }, t), zt(e.child));
1364
1364
  }
1365
1365
  function _l(e) {
@@ -1369,13 +1369,13 @@ function _l(e) {
1369
1369
  size: n,
1370
1370
  title: a
1371
1371
  } = e, i = Bl(e, Pl), d = n || l.size || "1em", c;
1372
- return l.className && (c = l.className), e.className && (c = (c ? c + " " : "") + e.className), /* @__PURE__ */ oe.createElement("svg", Ce({
1372
+ return l.className && (c = l.className), e.className && (c = (c ? c + " " : "") + e.className), /* @__PURE__ */ oe.createElement("svg", Ee({
1373
1373
  stroke: "currentColor",
1374
1374
  fill: "currentColor",
1375
1375
  strokeWidth: "0"
1376
1376
  }, l.attr, o, i, {
1377
1377
  className: c,
1378
- style: Ee(Ee({
1378
+ style: Te(Te({
1379
1379
  color: e.color || l.color
1380
1380
  }, l.style), e.style),
1381
1381
  height: d,
@@ -1516,7 +1516,7 @@ const Zl = v.div`
1516
1516
  children: f
1517
1517
  }
1518
1518
  );
1519
- }, Te = (e) => {
1519
+ }, ve = (e) => {
1520
1520
  const [t, l] = J(!1), o = (n) => l(n.matches);
1521
1521
  return vt(() => {
1522
1522
  const n = window.matchMedia(e);
@@ -1776,9 +1776,9 @@ const oo = {
1776
1776
  z-index: 1;
1777
1777
  overflow-y: auto;
1778
1778
  `, no = (e) => {
1779
- const { children: t } = e, l = Te("(max-width: 580px)");
1779
+ const { children: t } = e, l = ve("(max-width: 580px)");
1780
1780
  return /* @__PURE__ */ s(ro, { $isSmallScreen: !l, children: /* @__PURE__ */ s(T, { alignItems: "center", justifyContent: "center", children: t }) });
1781
- }, xe = {
1781
+ }, $e = {
1782
1782
  primary: {
1783
1783
  solid: {
1784
1784
  spin: {
@@ -1949,11 +1949,11 @@ const oo = {
1949
1949
  border: solid 4px;
1950
1950
  border-color: ${({ theme: e, $transparent: t, $appearance: l }) => {
1951
1951
  var o, n, a, i, d, c, u, h;
1952
- return t === !0 ? ((i = (a = (n = (o = e == null ? void 0 : e.spinner) == null ? void 0 : o[l]) == null ? void 0 : n.transparent) == null ? void 0 : a.track) == null ? void 0 : i.color) || xe[l].transparent.track.color : ((h = (u = (c = (d = e == null ? void 0 : e.spinner) == null ? void 0 : d[l]) == null ? void 0 : c.solid) == null ? void 0 : u.track) == null ? void 0 : h.color) || xe[l].solid.track.color;
1952
+ return t === !0 ? ((i = (a = (n = (o = e == null ? void 0 : e.spinner) == null ? void 0 : o[l]) == null ? void 0 : n.transparent) == null ? void 0 : a.track) == null ? void 0 : i.color) || $e[l].transparent.track.color : ((h = (u = (c = (d = e == null ? void 0 : e.spinner) == null ? void 0 : d[l]) == null ? void 0 : c.solid) == null ? void 0 : u.track) == null ? void 0 : h.color) || $e[l].solid.track.color;
1953
1953
  }};
1954
1954
  border-bottom-color: ${({ $appearance: e, $transparent: t, theme: l }) => {
1955
1955
  var o, n, a, i, d, c, u, h, p, g, m, b;
1956
- return t === !0 ? ((i = (a = (n = (o = l == null ? void 0 : l.spinner) == null ? void 0 : o[e]) == null ? void 0 : n.transparent) == null ? void 0 : a.spin) == null ? void 0 : i.color) || ((c = (d = xe[e].transparent) == null ? void 0 : d.spin) == null ? void 0 : c.color) : ((g = (p = (h = (u = l == null ? void 0 : l.spinner) == null ? void 0 : u[e]) == null ? void 0 : h.solid) == null ? void 0 : p.spin) == null ? void 0 : g.color) || ((b = (m = xe[e].solid) == null ? void 0 : m.spin) == null ? void 0 : b.color);
1956
+ return t === !0 ? ((i = (a = (n = (o = l == null ? void 0 : l.spinner) == null ? void 0 : o[e]) == null ? void 0 : n.transparent) == null ? void 0 : a.spin) == null ? void 0 : i.color) || ((c = (d = $e[e].transparent) == null ? void 0 : d.spin) == null ? void 0 : c.color) : ((g = (p = (h = (u = l == null ? void 0 : l.spinner) == null ? void 0 : u[e]) == null ? void 0 : h.solid) == null ? void 0 : p.spin) == null ? void 0 : g.color) || ((b = (m = $e[e].solid) == null ? void 0 : m.spin) == null ? void 0 : b.color);
1957
1957
  }};
1958
1958
  border-radius: 50%;
1959
1959
  ${({ $size: e }) => e && ao[e]}
@@ -3368,16 +3368,16 @@ v.th`
3368
3368
  }
3369
3369
  `;
3370
3370
  v.thead``;
3371
- const $e = (e, t) => {
3371
+ const ye = (e, t) => {
3372
3372
  var l, o;
3373
3373
  const n = ((o = (l = t == null ? void 0 : t.table) == null ? void 0 : l.border) == null ? void 0 : o.color) || M.border.color;
3374
3374
  return `1px ${e ? "dashed" : "solid"} ${n}`;
3375
3375
  };
3376
3376
  v.tr`
3377
- border-top: ${({ $border: e, $borderDashed: t, theme: l }) => e === "top" || e === "complete" ? $e(t, l) : "none"};
3378
- border-bottom: ${({ $border: e, $borderDashed: t, theme: l }) => e === "bottom" || e === "complete" ? $e(t, l) : "none"};
3379
- border-left: ${({ $border: e, $borderDashed: t, theme: l }) => e === "left" || e === "complete" ? $e(t, l) : "none"};
3380
- border-right: ${({ $border: e, $borderDashed: t, theme: l }) => e === "right" || e === "complete" ? $e(t, l) : "none"};
3377
+ border-top: ${({ $border: e, $borderDashed: t, theme: l }) => e === "top" || e === "complete" ? ye(t, l) : "none"};
3378
+ border-bottom: ${({ $border: e, $borderDashed: t, theme: l }) => e === "bottom" || e === "complete" ? ye(t, l) : "none"};
3379
+ border-left: ${({ $border: e, $borderDashed: t, theme: l }) => e === "left" || e === "complete" ? ye(t, l) : "none"};
3380
+ border-right: ${({ $border: e, $borderDashed: t, theme: l }) => e === "right" || e === "complete" ? ye(t, l) : "none"};
3381
3381
  height: 48px;
3382
3382
  background-color: ${({ $zebra: e, theme: t }) => {
3383
3383
  var l, o, n, a, i, d;
@@ -4526,7 +4526,7 @@ const Xo = (e) => {
4526
4526
  y(S.target.value), t(S);
4527
4527
  }, F = (S) => {
4528
4528
  C(S.target.value), l(S);
4529
- }, A = Te("(max-width: 400px)");
4529
+ }, A = ve("(max-width: 400px)");
4530
4530
  return /* @__PURE__ */ w(he, { children: [
4531
4531
  /* @__PURE__ */ w(T, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
4532
4532
  /* @__PURE__ */ s(
@@ -4668,7 +4668,7 @@ const Xo = (e) => {
4668
4668
  }), tr = (e) => {
4669
4669
  const t = (e == null ? void 0 : e.from) ?? 0, l = (e == null ? void 0 : e.to) ?? 0;
4670
4670
  return {
4671
- schema: ye({
4671
+ schema: ke({
4672
4672
  from: Be().required("Range From is required").max(l, "'Range From' cannot be greater than 'Range To'").min(0, "'Range From' cannot be less than 0"),
4673
4673
  to: Be().min(0, "To value must be greater than or equal to 0").required("To value is required").test(
4674
4674
  "is-greater",
@@ -4713,7 +4713,7 @@ function rr({ decision: e, onSubmitEvent: t }) {
4713
4713
  toggleNone: !0,
4714
4714
  conditionThatEstablishesTheDecision: {},
4715
4715
  checkClosed: !1
4716
- }, o = ye({
4716
+ }, o = ke({
4717
4717
  ruleName: Ue().required("Name is required"),
4718
4718
  effectiveFrom: et().required("effective From date is required"),
4719
4719
  validUntil: et().when(
@@ -4733,7 +4733,7 @@ function rr({ decision: e, onSubmitEvent: t }) {
4733
4733
  ).schema),
4734
4734
  conditionThatEstablishesTheDecision: Ze((i, { parent: d }) => {
4735
4735
  var h;
4736
- if ((d == null ? void 0 : d.toggleNone) && Object.keys(d.conditionThatEstablishesTheDecision || {}).length > 0) return ye().shape({});
4736
+ if ((d == null ? void 0 : d.toggleNone) && Object.keys(d.conditionThatEstablishesTheDecision || {}).length > 0) return ke().shape({});
4737
4737
  const u = (h = e.conditionThatEstablishesTheDecision) == null ? void 0 : h.reduce(
4738
4738
  (p, g) => {
4739
4739
  if (n.values.conditionThatEstablishesTheDecision[g.conditionName] !== void 0) {
@@ -4747,7 +4747,7 @@ function rr({ decision: e, onSubmitEvent: t }) {
4747
4747
  },
4748
4748
  {}
4749
4749
  );
4750
- return ye(u).test(
4750
+ return ke(u).test(
4751
4751
  "at-least-one-condition",
4752
4752
  "It must be at least one condition in order for the decision to be validated correctly.",
4753
4753
  (p) => p ? Object.values(p).some(
@@ -4956,7 +4956,7 @@ const Ot = (e) => {
4956
4956
  };
4957
4957
  return !l && t && o ? /* @__PURE__ */ w(T, { direction: "column", gap: "12px", children: [
4958
4958
  t && /* @__PURE__ */ s(T, { direction: "column", alignItems: "center", children: /* @__PURE__ */ s(
4959
- me,
4959
+ fe,
4960
4960
  {
4961
4961
  element: n,
4962
4962
  valueData: pe(n),
@@ -4984,7 +4984,7 @@ const Ot = (e) => {
4984
4984
  }
4985
4985
  ),
4986
4986
  t.conditionThatEstablishesTheDecision && t.conditionThatEstablishesTheDecision.map((a) => a.hidden ? null : /* @__PURE__ */ s(st, { children: /* @__PURE__ */ s(T, { direction: "column", padding: "8px", children: /* @__PURE__ */ s(
4987
- me,
4987
+ fe,
4988
4988
  {
4989
4989
  element: {
4990
4990
  ...a,
@@ -4996,7 +4996,7 @@ const Ot = (e) => {
4996
4996
  /* @__PURE__ */ s(re, { dashed: !0 }),
4997
4997
  /* @__PURE__ */ w(T, { direction: "column", gap: "12px", children: [
4998
4998
  (t == null ? void 0 : t.effectiveFrom) && (t == null ? void 0 : t.validUntil) && /* @__PURE__ */ s(
4999
- me,
4999
+ fe,
5000
5000
  {
5001
5001
  element: {
5002
5002
  labelName: o.terms,
@@ -5018,7 +5018,7 @@ const Ot = (e) => {
5018
5018
  o.terms
5019
5019
  ),
5020
5020
  (t == null ? void 0 : t.effectiveFrom) && !(t != null && t.validUntil) && /* @__PURE__ */ s(
5021
- me,
5021
+ fe,
5022
5022
  {
5023
5023
  element: {
5024
5024
  labelName: o.terms,
@@ -5135,7 +5135,7 @@ const Ke = (e) => {
5135
5135
  }};
5136
5136
  max-width: 450px;
5137
5137
  max-height: 90vh;
5138
- overflow-y: hidden;
5138
+ overflow-y: ${({ smallScreen: e }) => e ? "hidden" : "auto"};
5139
5139
  border-radius: 8px;
5140
5140
  transition: overflow-y 0.3s ease-in-out;
5141
5141
  & > div {
@@ -5165,8 +5165,9 @@ const Ke = (e) => {
5165
5165
  throw new Error(
5166
5166
  "The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
5167
5167
  );
5168
+ const i = ve("(max-width: 400px)");
5168
5169
  return jt(
5169
- /* @__PURE__ */ s(gr, { children: /* @__PURE__ */ s(no, { children: /* @__PURE__ */ s(br, { children: /* @__PURE__ */ w(T, { direction: "column", gap: "24px", children: [
5170
+ /* @__PURE__ */ s(gr, { smallScreen: i, children: /* @__PURE__ */ s(no, { children: /* @__PURE__ */ s(br, { children: /* @__PURE__ */ w(T, { direction: "column", gap: "24px", children: [
5170
5171
  /* @__PURE__ */ s(T, { direction: "column", gap: "24px", children: /* @__PURE__ */ w(T, { alignItems: "center", justifyContent: "space-between", children: [
5171
5172
  /* @__PURE__ */ s(D, { type: "title", size: "large", appearance: "dark", weight: "bold", children: n }),
5172
5173
  /* @__PURE__ */ s(Ut, { size: "24px", cursor: "pointer", onClick: o })
@@ -5371,7 +5372,7 @@ const Br = (e) => {
5371
5372
  handleCloseModal: p,
5372
5373
  handleSubmitForm: g,
5373
5374
  handleDelete: m
5374
- } = e, b = Te("(max-width: 681px)"), f = Te("(max-width: 400px)"), { renderedCards: x, shouldRenderAddCard: y } = Er({
5375
+ } = e, b = ve("(max-width: 681px)"), f = ve("(max-width: 400px)"), { renderedCards: x, shouldRenderAddCard: y } = Er({
5375
5376
  controls: t,
5376
5377
  customTitleContentAddCard: l,
5377
5378
  decisions: n,
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  ],
11
11
  "description": "",
12
12
  "private": false,
13
- "version": "0.1.38",
13
+ "version": "0.1.39",
14
14
  "type": "module",
15
15
  "exports": {
16
16
  ".": {