@isettingkit/business-rules 0.1.30 → 0.1.32

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 +362 -361
  2. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -1,44 +1,44 @@
1
- import { jsxs as c, Fragment as A, jsx as r } from "react/jsx-runtime";
2
- import { ValueDataType as D, ValueHowToSetUp as b, DecisionConditionRender as I } from "@isettingkit/input";
3
- import { Stack as s } from "@inubekit/stack";
1
+ import { jsxs as u, Fragment as E, jsx as r } from "react/jsx-runtime";
2
+ import { ValueDataType as k, ValueHowToSetUp as b, DecisionConditionRender as $ } from "@isettingkit/input";
3
+ import { Stack as d } from "@inubekit/stack";
4
4
  import { Divider as w } from "@inubekit/divider";
5
- import { Button as $ } from "@inubekit/button";
6
- import { useState as V, useEffect as Z } from "react";
5
+ import { Button as z } from "@inubekit/button";
6
+ import { useState as N, useEffect as te } from "react";
7
7
  import { Text as x } from "@inubekit/text";
8
- import { Date as z } from "@inubekit/date";
9
- import { Checkbox as ee } from "@inubekit/checkbox";
10
- import { Toggle as H } from "@inubekit/toggle";
8
+ import { Date as q } from "@inubekit/date";
9
+ import { Checkbox as re } from "@inubekit/checkbox";
10
+ import { Toggle as B } from "@inubekit/toggle";
11
11
  import { inube as v } from "@inubekit/foundations";
12
- import g, { keyframes as te } from "styled-components";
13
- import { useFormik as re } from "formik";
14
- import { mixed as G, object as E, number as N, string as U, date as O, lazy as ae } from "yup";
12
+ import g, { keyframes as ae } from "styled-components";
13
+ import { useFormik as ne } from "formik";
14
+ import { mixed as P, object as L, number as R, string as I, date as M, lazy as H } from "yup";
15
15
  import { DecisionViewConditionRenderer as _ } from "@isettingkit/view";
16
- import { SkeletonLine as S } from "@inubekit/skeleton";
17
- import { MdOutlineDelete as ne, MdClear as oe, MdAdd as ie } from "react-icons/md";
18
- import { Icon as B } from "@inubekit/icon";
19
- import { createPortal as de } from "react-dom";
20
- import { Blanket as le } from "@inubekit/blanket";
21
- import { Grid as se } from "@inubekit/grid";
22
- import { useMediaQuery as ce } from "@inubekit/hooks";
23
- const ue = (e) => {
16
+ import { SkeletonLine as T } from "@inubekit/skeleton";
17
+ import { MdOutlineDelete as oe, MdClear as ie, MdAdd as de } from "react-icons/md";
18
+ import { Icon as Q } from "@inubekit/icon";
19
+ import { createPortal as le } from "react-dom";
20
+ import { Blanket as se } from "@inubekit/blanket";
21
+ import { Grid as ce } from "@inubekit/grid";
22
+ import { useMediaQuery as ue } from "@inubekit/hooks";
23
+ const he = (e) => {
24
24
  const {
25
25
  onHandleStartChange: t,
26
- onHandleEndChange: a,
27
- onCheckClosedChange: i,
28
- labelStart: h,
29
- labelEnd: n,
30
- checkedClosed: l = !1,
31
- required: o = !1,
32
- valueStart: u = "",
33
- valueEnd: d = "",
26
+ onHandleEndChange: n,
27
+ onCheckClosedChange: o,
28
+ labelStart: l,
29
+ labelEnd: a,
30
+ checkedClosed: s = !1,
31
+ required: c = !1,
32
+ valueStart: h = "",
33
+ valueEnd: i = "",
34
34
  messageStart: m = "",
35
35
  messageEnd: p = "",
36
36
  statusStart: f = "pending",
37
- statusEnd: k = "pending"
38
- } = e, [R, Y] = V(l), [W, J] = V(u), [K, X] = V(d);
39
- return /* @__PURE__ */ c(A, { children: [
40
- /* @__PURE__ */ c(s, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
41
- /* @__PURE__ */ r(s, { children: /* @__PURE__ */ r(
37
+ statusEnd: S = "pending"
38
+ } = e, [A, J] = N(s), [K, X] = N(h), [Z, ee] = N(i);
39
+ return /* @__PURE__ */ u(E, { children: [
40
+ /* @__PURE__ */ u(d, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
41
+ /* @__PURE__ */ r(d, { children: /* @__PURE__ */ r(
42
42
  x,
43
43
  {
44
44
  appearance: "gray",
@@ -50,65 +50,65 @@ const ue = (e) => {
50
50
  }
51
51
  ) }),
52
52
  /* @__PURE__ */ r(
53
- s,
53
+ d,
54
54
  {
55
55
  alignContent: "center",
56
56
  justifyContent: "center",
57
57
  wrap: "wrap",
58
58
  gap: "4px",
59
59
  children: /* @__PURE__ */ r(
60
- ee,
60
+ re,
61
61
  {
62
62
  label: "Cerrada",
63
63
  onChange: ({ target: y }) => {
64
- Y(y.checked), i && i(y.checked);
64
+ J(y.checked), o && o(y.checked);
65
65
  },
66
- checked: R,
66
+ checked: A,
67
67
  value: ""
68
68
  }
69
69
  )
70
70
  }
71
71
  )
72
72
  ] }),
73
- /* @__PURE__ */ c(s, { justifyContent: "space-between", gap: "24px", children: [
74
- /* @__PURE__ */ r(s, { width: "189px", children: /* @__PURE__ */ r(
75
- z,
73
+ /* @__PURE__ */ u(d, { justifyContent: "space-between", gap: "24px", children: [
74
+ /* @__PURE__ */ r(d, { width: "189px", children: /* @__PURE__ */ r(
75
+ q,
76
76
  {
77
77
  id: "dateStart",
78
- label: h,
78
+ label: l,
79
79
  onChange: (y) => {
80
- J(y.target.value), t(y);
80
+ X(y.target.value), t(y);
81
81
  },
82
- value: W,
83
- required: o,
82
+ value: K,
83
+ required: c,
84
84
  size: "compact",
85
85
  status: f,
86
86
  message: m
87
87
  }
88
88
  ) }),
89
- R && /* @__PURE__ */ r(s, { width: "189px", children: /* @__PURE__ */ r(
90
- z,
89
+ A && /* @__PURE__ */ r(d, { width: "189px", children: /* @__PURE__ */ r(
90
+ q,
91
91
  {
92
92
  id: "dateEnd",
93
- label: n,
93
+ label: a,
94
94
  onChange: (y) => {
95
- X(y.target.value), a(y);
95
+ ee(y.target.value), n(y);
96
96
  },
97
- value: K,
98
- required: o,
97
+ value: Z,
98
+ required: c,
99
99
  size: "compact",
100
- status: k,
100
+ status: S,
101
101
  message: p
102
102
  }
103
103
  ) })
104
104
  ] })
105
105
  ] });
106
- }, he = g.div`
106
+ }, pe = g.div`
107
107
  & > div {
108
108
  border-radius: 8px;
109
109
  border: 1px solid ${v.palette.neutral.N30};
110
110
  }
111
- `, pe = g.div`
111
+ `, ge = g.div`
112
112
  width: 100%;
113
113
  height: 100%;
114
114
  overflow-y: auto;
@@ -125,124 +125,121 @@ const ue = (e) => {
125
125
  background-color: #ebecf0;
126
126
  border-radius: 8px;
127
127
  }
128
- `, ge = (e) => {
128
+ `, me = (e) => {
129
129
  const {
130
130
  checked: t,
131
- children: a,
132
- handleToggleChange: i,
133
- id: h,
134
- labelToggle: n,
135
- name: l,
136
- valueToggle: o = ""
137
- } = e, [u, d] = V(t), m = (p) => {
138
- d(p.target.checked), i(p);
131
+ children: n,
132
+ handleToggleChange: o,
133
+ id: l,
134
+ labelToggle: a,
135
+ name: s,
136
+ valueToggle: c = ""
137
+ } = e, [h, i] = N(t), m = (p) => {
138
+ i(p.target.checked), o(p);
139
139
  };
140
- return Z(() => {
141
- d(t);
142
- }, [t]), /* @__PURE__ */ c(A, { children: [
143
- /* @__PURE__ */ r(s, { children: /* @__PURE__ */ r(
144
- H,
140
+ return te(() => {
141
+ i(t);
142
+ }, [t]), /* @__PURE__ */ u(E, { children: [
143
+ /* @__PURE__ */ r(d, { children: /* @__PURE__ */ r(
144
+ B,
145
145
  {
146
- checked: u,
147
- id: h,
148
- name: l,
146
+ checked: h,
147
+ id: l,
148
+ name: s,
149
149
  onChange: m,
150
150
  size: "small",
151
- value: o,
152
- children: /* @__PURE__ */ r(x, { size: "medium", type: "label", weight: "bold", children: n })
151
+ value: c,
152
+ children: /* @__PURE__ */ r(x, { size: "medium", type: "label", weight: "bold", children: a })
153
153
  }
154
154
  ) }),
155
- u && /* @__PURE__ */ r(A, { children: a })
155
+ h && /* @__PURE__ */ r(E, { children: n })
156
156
  ] });
157
- }, me = (e) => ({
158
- schema: G().test(
157
+ }, be = (e) => ({
158
+ schema: P().test(
159
159
  "isArrayOrString",
160
160
  "Must be an array of strings/numbers or a single string",
161
161
  (t) => Array.isArray(t) ? t.every(
162
- (a) => typeof a == "string" || typeof a == "number"
162
+ (n) => typeof n == "string" || typeof n == "number"
163
163
  ) : typeof t == "string"
164
164
  ),
165
165
  value: e
166
- }), be = (e) => ({
167
- schema: G().test(
166
+ }), fe = (e) => ({
167
+ schema: P().test(
168
168
  "isArrayOrString",
169
169
  "Must be an array of strings/numbers or a single string",
170
170
  (t) => Array.isArray(t) ? t.every(
171
- (a) => typeof a == "string" || typeof a == "number"
171
+ (n) => typeof n == "string" || typeof n == "number"
172
172
  ) : typeof t == "string"
173
173
  ),
174
174
  value: e
175
- }), fe = (e) => {
176
- const t = (e == null ? void 0 : e.from) ?? 0, a = (e == null ? void 0 : e.to) ?? 0;
175
+ }), xe = (e) => {
176
+ const t = (e == null ? void 0 : e.from) ?? 0, n = (e == null ? void 0 : e.to) ?? 0;
177
177
  return {
178
- schema: E({
179
- from: N().required("Range From is required").max(a, "'Range From' cannot be greater than 'Range To'").min(0, "'Range From' cannot be less than 0"),
180
- to: N().required("Range To is required").min(t, "'Range To' cannot be less than 'Range From'").min(0, "'Range To' cannot be less than 0")
178
+ schema: L({
179
+ from: R().required("Range From is required").max(n, "'Range From' cannot be greater than 'Range To'").min(0, "'Range From' cannot be less than 0"),
180
+ to: R().min(0, "To value must be greater than or equal to 0").required("To value is required").test(
181
+ "is-greater",
182
+ "To value must be greater than From value",
183
+ function(o) {
184
+ const { from: l } = this.parent;
185
+ return o > l;
186
+ }
187
+ )
181
188
  }),
182
- value: { from: t, to: a }
189
+ value: { from: t, to: n }
183
190
  };
184
- }, L = (e, t) => t === D.PERCENTAGE ? {
185
- schema: N().required("Percentage is required").min(0, "Percentage cannot be less than 0").max(100, "Percentage cannot be greater than 100"),
191
+ }, V = (e, t) => t === k.PERCENTAGE ? {
192
+ schema: R().required("Percentage is required").min(0, "Percentage cannot be less than 0").max(100, "Percentage cannot be greater than 100"),
186
193
  value: e
187
194
  } : {
188
- schema: U().required("Required"),
195
+ schema: I().required("Required"),
189
196
  value: e
190
- }, xe = (e) => ({
191
- schema: U().required("Required").test(
197
+ }, ye = (e) => ({
198
+ schema: I().required("Required").test(
192
199
  "non-empty",
193
200
  "Value cannot be empty",
194
201
  (t) => t != null && t.trim() !== ""
195
202
  ),
196
203
  value: e
197
- }), ye = {
198
- [b.LIST_OF_VALUES]: me,
199
- [b.LIST_OF_VALUES_MULTI]: be,
200
- [b.RANGE]: fe,
201
- [b.GREATER_THAN]: L,
202
- [b.LESS_THAN]: L,
203
- [b.EQUAL]: L
204
- }, ve = (e) => ye[e] || xe;
204
+ }), ve = {
205
+ [b.LIST_OF_VALUES]: be,
206
+ [b.LIST_OF_VALUES_MULTI]: fe,
207
+ [b.RANGE]: xe,
208
+ [b.GREATER_THAN]: V,
209
+ [b.LESS_THAN]: V,
210
+ [b.EQUAL]: V
211
+ }, O = (e) => ve[e] || ye;
205
212
  function Ce({ decision: e, onSubmitEvent: t }) {
206
- const a = {
213
+ const n = {
207
214
  name: e.name || "",
208
- dataType: e.dataType || "",
215
+ dataType: e.dataType || k.ALPHABETICAL,
209
216
  valueUse: e.valueUse || "",
210
- value: e.value || { from: 0, to: 0 },
217
+ value: e.value || "",
211
218
  startDate: e.startDate || "",
212
219
  endDate: e.endDate || "",
213
220
  toggleNone: !0,
214
221
  conditions: {},
215
222
  checkClosed: !1
216
- }, i = E({
217
- name: U().required("Name is required"),
218
- startDate: O().required("Start date is required"),
219
- endDate: O().when("checkClosed", (l, o, { parent: u }) => (u == null ? void 0 : u.checkClosed) ? o.required("End date is required").test(
223
+ }, o = L({
224
+ name: I().required("Name is required"),
225
+ startDate: M().required("Start date is required"),
226
+ endDate: M().when("checkClosed", (s, c, { parent: h }) => (h == null ? void 0 : h.checkClosed) ? c.required("End date is required").test(
220
227
  "is-after-startDate",
221
228
  "End date must be greater than or equal to Start date",
222
229
  function(m) {
223
230
  const p = this.parent.startDate;
224
231
  return !p || !m ? !0 : new Date(m) >= new Date(p);
225
232
  }
226
- ) : o.notRequired()),
227
- value: E({
228
- from: N().min(0, "From value must be greater than or equal to 0").required("From value is required"),
229
- to: N().min(0, "To value must be greater than or equal to 0").required("To value is required").test(
230
- "is-greater",
231
- "To value must be greater than From value",
232
- function(l) {
233
- const { from: o } = this.parent;
234
- return l > o;
235
- }
236
- )
237
- }).required("Range value is required"),
238
- conditions: ae((l, { parent: o }) => {
239
- var d, m;
240
- return (o == null ? void 0 : o.toggleNone) && ((d = o == null ? void 0 : o.conditions) == null ? void 0 : d.length) > 0 ? E().shape({}) : E(
233
+ ) : c.notRequired()),
234
+ value: H(() => O(l.values.valueUse)(l.values.value, l.values.dataType).schema),
235
+ conditions: H((s, { parent: c }) => {
236
+ var i, m;
237
+ return (c == null ? void 0 : c.toggleNone) && ((i = c == null ? void 0 : c.conditions) == null ? void 0 : i.length) > 0 ? L().shape({}) : L(
241
238
  (m = e.conditions) == null ? void 0 : m.reduce(
242
239
  (p, f) => {
243
- if (h.values.conditions[f.name] !== void 0) {
244
- const k = ve(f.valueUse);
245
- p[f.name] = k(
240
+ if (l.values.conditions[f.name] !== void 0) {
241
+ const S = O(f.valueUse);
242
+ p[f.name] = S(
246
243
  f.value,
247
244
  f.dataType
248
245
  ).schema;
@@ -253,135 +250,143 @@ function Ce({ decision: e, onSubmitEvent: t }) {
253
250
  )
254
251
  );
255
252
  })
256
- }), h = re({
257
- initialValues: a,
258
- validationSchema: i,
253
+ }), l = ne({
254
+ initialValues: n,
255
+ validationSchema: o,
259
256
  validateOnBlur: !0,
260
- onSubmit: (l) => {
261
- var u;
262
- const o = {
257
+ onSubmit: (s) => {
258
+ var h;
259
+ const c = {
263
260
  ...e,
264
- name: l.name,
265
- dataType: l.dataType,
266
- valueUse: l.valueUse,
267
- value: l.value,
268
- startDate: l.startDate,
269
- endDate: l.endDate,
270
- conditions: (u = e.conditions) == null ? void 0 : u.map((d) => ({
271
- ...d,
272
- value: l.conditions[d.name]
261
+ name: s.name,
262
+ dataType: s.dataType,
263
+ valueUse: s.valueUse,
264
+ value: s.value,
265
+ startDate: s.startDate,
266
+ endDate: s.endDate,
267
+ conditions: (h = e.conditions) == null ? void 0 : h.map((i) => ({
268
+ ...i,
269
+ value: s.conditions[i.name]
273
270
  }))
274
271
  };
275
- t(o);
272
+ t(c);
276
273
  }
277
274
  });
278
- return { formik: h, handleToggleNoneChange: (l) => {
279
- var o;
280
- h.setFieldValue("toggleNone", l), (o = e.conditions) == null || o.forEach((u) => {
281
- if (l)
282
- h.setFieldValue(`conditions.${u.name}`, void 0);
275
+ return { formik: l, handleToggleNoneChange: (s) => {
276
+ var c;
277
+ l.setFieldValue("toggleNone", s), (c = e.conditions) == null || c.forEach((h) => {
278
+ if (s)
279
+ l.setFieldValue(`conditions.${h.name}`, void 0);
283
280
  else {
284
- const d = u.valueUse === b.LIST_OF_VALUES_MULTI ? [] : "";
285
- h.setFieldValue(`conditions.${u.name}`, d);
281
+ const i = h.valueUse === b.LIST_OF_VALUES_MULTI ? [] : "";
282
+ l.setFieldValue(`conditions.${h.name}`, i);
286
283
  }
287
284
  });
288
285
  } };
289
286
  }
290
287
  const we = (e) => {
291
- var u;
292
- const { decision: t, onSubmitEvent: a, textValues: i, onCancel: h } = e, { formik: n, handleToggleNoneChange: l } = Ce({
288
+ var h;
289
+ const { decision: t, onSubmitEvent: n, textValues: o, onCancel: l } = e, { formik: a, handleToggleNoneChange: s } = Ce({
293
290
  decision: t,
294
- onSubmitEvent: a
295
- }), o = {
291
+ onSubmitEvent: n
292
+ }), c = {
296
293
  name: t.name,
297
294
  valueUse: t.valueUse,
298
295
  dataType: t.dataType,
299
296
  possibleValue: t.possibleValue
300
297
  };
301
- return /* @__PURE__ */ r("form", { onSubmit: n.handleSubmit, children: /* @__PURE__ */ c(s, { direction: "column", gap: "24px", children: [
302
- I({
303
- condition: o,
304
- formik: n,
298
+ return /* @__PURE__ */ r("form", { onSubmit: a.handleSubmit, children: /* @__PURE__ */ u(d, { direction: "column", gap: "24px", children: [
299
+ $({
300
+ condition: c,
301
+ formik: a,
305
302
  isDecision: !0
306
303
  }),
307
304
  /* @__PURE__ */ r(w, { dashed: !0 }),
308
- /* @__PURE__ */ r(he, { children: /* @__PURE__ */ r(pe, { children: /* @__PURE__ */ c(
309
- s,
305
+ /* @__PURE__ */ r(pe, { children: /* @__PURE__ */ r(ge, { children: /* @__PURE__ */ u(
306
+ d,
310
307
  {
311
308
  direction: "column",
312
309
  padding: "6px 12px",
313
310
  gap: "16px",
314
311
  height: "272px",
315
312
  children: [
316
- /* @__PURE__ */ c(s, { direction: "row", justifyContent: "space-between", children: [
317
- /* @__PURE__ */ r(x, { children: i.factsThatConditionIt }),
318
- /* @__PURE__ */ r(
319
- H,
320
- {
321
- id: "toggleNone",
322
- onChange: () => l(!n.values.toggleNone),
323
- checked: n.values.toggleNone,
324
- size: "small",
325
- children: /* @__PURE__ */ r(x, { size: "medium", type: "label", weight: "bold", children: i.none })
326
- }
327
- )
328
- ] }),
329
- /* @__PURE__ */ r(s, { direction: "column", gap: "20px", children: (u = t.conditions) == null ? void 0 : u.map((d) => /* @__PURE__ */ r(
330
- ge,
313
+ /* @__PURE__ */ u(
314
+ d,
315
+ {
316
+ justifyContent: "space-between",
317
+ alignItems: "center",
318
+ gap: "64px",
319
+ children: [
320
+ /* @__PURE__ */ r(x, { type: "title", size: "small", weight: "bold", appearance: "gray", children: o.factsThatConditionIt }),
321
+ /* @__PURE__ */ r(
322
+ B,
323
+ {
324
+ id: "toggleNone",
325
+ onChange: () => s(!a.values.toggleNone),
326
+ checked: a.values.toggleNone,
327
+ size: "small",
328
+ children: /* @__PURE__ */ r(x, { size: "medium", type: "label", weight: "bold", children: o.none })
329
+ }
330
+ )
331
+ ]
332
+ }
333
+ ),
334
+ /* @__PURE__ */ r(d, { direction: "column", gap: "20px", children: (h = t.conditions) == null ? void 0 : h.map((i) => /* @__PURE__ */ r(
335
+ me,
331
336
  {
332
- id: `toggle-${d.name}`,
333
- name: `toggle.${d.name}`,
334
- labelToggle: d.name,
335
- checked: !n.values.toggleNone && n.values.conditions[d.name] !== void 0,
337
+ id: `toggle-${i.name}`,
338
+ name: `toggle.${i.name}`,
339
+ labelToggle: i.name,
340
+ checked: !a.values.toggleNone && a.values.conditions[i.name] !== void 0,
336
341
  handleToggleChange: (m) => {
337
342
  if (!m.target.checked)
338
- n.setFieldValue(
339
- `conditions.${d.name}`,
343
+ a.setFieldValue(
344
+ `conditions.${i.name}`,
340
345
  void 0
341
- ), n.setFieldTouched(
342
- `conditions.${d.name}`,
346
+ ), a.setFieldTouched(
347
+ `conditions.${i.name}`,
343
348
  !1,
344
349
  !1
345
350
  );
346
351
  else {
347
- const f = d.valueUse === b.LIST_OF_VALUES_MULTI ? [] : "";
348
- n.setFieldValue(
349
- `conditions.${d.name}`,
352
+ const f = i.valueUse === b.LIST_OF_VALUES_MULTI ? [] : "";
353
+ a.setFieldValue(
354
+ `conditions.${i.name}`,
350
355
  f
351
356
  );
352
357
  }
353
358
  },
354
- children: I({ condition: d, formik: n })
359
+ children: $({ condition: i, formik: a })
355
360
  },
356
- d.name
361
+ i.name
357
362
  )) })
358
363
  ]
359
364
  }
360
365
  ) }) }),
361
366
  /* @__PURE__ */ r(w, { dashed: !0 }),
362
367
  /* @__PURE__ */ r(
363
- ue,
368
+ he,
364
369
  {
365
- labelStart: i.termStart,
366
- labelEnd: i.termEnd,
367
- valueStart: n.values.startDate,
368
- valueEnd: n.values.endDate,
369
- messageStart: n.errors.startDate,
370
- messageEnd: n.errors.endDate,
371
- statusStart: n.touched.startDate ? n.errors.startDate ? "invalid" : "valid" : void 0,
372
- statusEnd: n.touched.endDate ? n.errors.endDate ? "invalid" : "valid" : void 0,
373
- onHandleStartChange: (d) => n.setFieldValue("startDate", d.target.value),
374
- onHandleEndChange: (d) => n.setFieldValue("endDate", d.target.value),
375
- onCheckClosedChange: (d) => {
376
- n.setFieldValue("checkClosed", d), d && n.setFieldValue("endDate", "");
370
+ labelStart: o.termStart,
371
+ labelEnd: o.termEnd,
372
+ valueStart: a.values.startDate,
373
+ valueEnd: a.values.endDate,
374
+ messageStart: a.errors.startDate,
375
+ messageEnd: a.errors.endDate,
376
+ statusStart: a.touched.startDate ? a.errors.startDate ? "invalid" : "valid" : void 0,
377
+ statusEnd: a.touched.endDate ? a.errors.endDate ? "invalid" : "valid" : void 0,
378
+ onHandleStartChange: (i) => a.setFieldValue("startDate", i.target.value),
379
+ onHandleEndChange: (i) => a.setFieldValue("endDate", i.target.value),
380
+ onCheckClosedChange: (i) => {
381
+ a.setFieldValue("checkClosed", i), i && a.setFieldValue("endDate", "");
377
382
  },
378
- checkedClosed: n.values.checkClosed
383
+ checkedClosed: a.values.checkClosed
379
384
  }
380
385
  ),
381
386
  /* @__PURE__ */ r(w, {}),
382
- /* @__PURE__ */ c(s, { direction: "row", justifyContent: "end", gap: "16px", children: [
383
- /* @__PURE__ */ r($, { appearance: "gray", onClick: h, children: i.cancel }),
384
- /* @__PURE__ */ r($, { type: "submit", children: i.confirm })
387
+ /* @__PURE__ */ u(d, { direction: "row", justifyContent: "end", gap: "16px", children: [
388
+ /* @__PURE__ */ r(z, { appearance: "gray", onClick: l, children: o.cancel }),
389
+ /* @__PURE__ */ r(z, { type: "submit", children: o.confirm })
385
390
  ] })
386
391
  ] }) });
387
392
  }, j = g.div`
@@ -389,7 +394,7 @@ const we = (e) => {
389
394
  border-radius: 8px;
390
395
  border: 1px solid ${v.palette.neutral.N30};
391
396
  }
392
- `, M = g.div`
397
+ `, G = g.div`
393
398
  width: 100%;
394
399
  height: 100%;
395
400
  overflow-y: auto;
@@ -412,7 +417,7 @@ const we = (e) => {
412
417
  to: e.to ?? ""
413
418
  }), De = (e) => e.value, Ee = (e) => e.value, Ae = (e) => e.value;
414
419
  var C = /* @__PURE__ */ ((e) => (e.EQUAL = "equal", e.GREATER_THAN = "greater_than", e.LESS_THAN = "less_than", e.LIST_OF_VALUES = "list_of_values", e.LIST_OF_VALUES_MULTI = "list_of_values_multi", e.RANGE = "range", e))(C || {});
415
- const Ne = (e) => e.value, Re = {
420
+ const _e = (e) => e.value, Ne = {
416
421
  [C.LIST_OF_VALUES]: ke,
417
422
  [C.LIST_OF_VALUES_MULTI]: Se,
418
423
  [C.RANGE]: Te,
@@ -420,29 +425,29 @@ const Ne = (e) => e.value, Re = {
420
425
  [C.LESS_THAN]: Ee,
421
426
  [C.EQUAL]: Ae
422
427
  };
423
- function T(e) {
424
- const t = e == null ? void 0 : e.value, a = typeof t == "object" && t !== null && !Array.isArray(t), i = Re[e == null ? void 0 : e.valueUse] || Ne;
425
- return a && i(t) || t || void 0;
428
+ function D(e) {
429
+ const t = e == null ? void 0 : e.value, n = typeof t == "object" && t !== null && !Array.isArray(t), o = Ne[e == null ? void 0 : e.valueUse] || _e;
430
+ return n && o(t) || t || void 0;
426
431
  }
427
- const P = (e) => {
428
- const { decision: t, loading: a = !1, textValues: i } = e, h = (l) => l && Object.keys(l).length > 0, n = {
432
+ const Y = (e) => {
433
+ const { decision: t, loading: n = !1, textValues: o } = e, l = {
429
434
  name: (t == null ? void 0 : t.name) || "",
430
435
  dataType: (t == null ? void 0 : t.dataType) || "alphabetical",
431
- value: T(t),
436
+ value: D(t),
432
437
  valueUse: (t == null ? void 0 : t.valueUse) || "equal"
433
438
  };
434
- return !a && t && i ? /* @__PURE__ */ c(s, { direction: "column", gap: "12px", children: [
435
- t && /* @__PURE__ */ r(s, { direction: "column", alignItems: "center", children: /* @__PURE__ */ r(
439
+ return !n && t && o ? /* @__PURE__ */ u(d, { direction: "column", gap: "12px", children: [
440
+ t && /* @__PURE__ */ r(d, { direction: "column", alignItems: "center", children: /* @__PURE__ */ r(
436
441
  _,
437
442
  {
438
- element: n,
439
- valueData: T(n),
443
+ element: l,
444
+ valueData: D(l),
440
445
  type: "decision"
441
446
  }
442
447
  ) }, t.name),
443
448
  /* @__PURE__ */ r(w, { dashed: !0 }),
444
- /* @__PURE__ */ r(M, { children: /* @__PURE__ */ c(
445
- s,
449
+ /* @__PURE__ */ r(G, { children: /* @__PURE__ */ u(
450
+ d,
446
451
  {
447
452
  direction: "column",
448
453
  gap: "12px",
@@ -457,103 +462,99 @@ const P = (e) => {
457
462
  appearance: "dark",
458
463
  weight: "bold",
459
464
  textAlign: "center",
460
- children: i.factsThatConditionIt
465
+ children: o.factsThatConditionIt
461
466
  }
462
467
  ),
463
- t.conditions && t.conditions.map((l) => {
464
- if (l.hidden) return null;
465
- const o = l.value;
466
- return (typeof o == "object" && h(o) || o !== void 0 && typeof o == "string" && o.length > 0) && /* @__PURE__ */ r(j, { children: /* @__PURE__ */ r(s, { direction: "column", padding: "8px", children: /* @__PURE__ */ r(
467
- _,
468
- {
469
- element: {
470
- ...l,
471
- value: o
472
- },
473
- valueData: T(l)
474
- }
475
- ) }) }, l.name);
476
- }),
468
+ t.conditions && t.conditions.map((a) => a.hidden ? null : (console.log("condition: ", a), /* @__PURE__ */ r(j, { children: /* @__PURE__ */ r(d, { direction: "column", padding: "8px", children: /* @__PURE__ */ r(
469
+ _,
470
+ {
471
+ element: {
472
+ ...a,
473
+ value: a.value
474
+ },
475
+ valueData: D(a)
476
+ }
477
+ ) }) }, a.name))),
477
478
  /* @__PURE__ */ r(w, { dashed: !0 }),
478
- /* @__PURE__ */ c(s, { direction: "column", gap: "12px", children: [
479
+ /* @__PURE__ */ u(d, { direction: "column", gap: "12px", children: [
479
480
  (t == null ? void 0 : t.startDate) && (t == null ? void 0 : t.endDate) && /* @__PURE__ */ r(
480
481
  _,
481
482
  {
482
483
  element: {
483
- name: i.terms,
484
+ name: o.terms,
484
485
  value: String(t.startDate),
485
486
  valueUse: b.RANGE,
486
- dataType: D.DATE
487
+ dataType: k.DATE
487
488
  },
488
- valueData: T({
489
- name: i.terms,
489
+ valueData: D({
490
+ name: o.terms,
490
491
  value: {
491
492
  from: String(t.startDate),
492
493
  to: String(t.endDate)
493
494
  },
494
495
  valueUse: b.RANGE,
495
- dataType: D.DATE
496
+ dataType: k.DATE
496
497
  }),
497
498
  type: "decision"
498
499
  },
499
- i.terms
500
+ o.terms
500
501
  ),
501
502
  (t == null ? void 0 : t.startDate) && !(t != null && t.endDate) && /* @__PURE__ */ r(
502
503
  _,
503
504
  {
504
505
  element: {
505
- name: i.terms,
506
+ name: o.terms,
506
507
  value: String(t.startDate),
507
508
  valueUse: b.EQUAL,
508
- dataType: D.DATE
509
+ dataType: k.DATE
509
510
  },
510
- valueData: T({
511
- name: i.terms,
511
+ valueData: D({
512
+ name: o.terms,
512
513
  value: String(t.startDate),
513
514
  valueUse: b.EQUAL,
514
- dataType: D.DATE
515
+ dataType: k.DATE
515
516
  }),
516
517
  type: "decision"
517
518
  },
518
- i.terms
519
+ o.terms
519
520
  )
520
521
  ] })
521
522
  ]
522
523
  }
523
524
  ) })
524
- ] }) : /* @__PURE__ */ c(s, { direction: "column", gap: "12px", children: [
525
- /* @__PURE__ */ c(s, { direction: "column", alignItems: "center", gap: "4px", children: [
526
- /* @__PURE__ */ r(S, { animated: !0, width: "180px" }),
527
- /* @__PURE__ */ r(S, { animated: !0, width: "85px" })
525
+ ] }) : /* @__PURE__ */ u(d, { direction: "column", gap: "12px", children: [
526
+ /* @__PURE__ */ u(d, { direction: "column", alignItems: "center", gap: "4px", children: [
527
+ /* @__PURE__ */ r(T, { animated: !0, width: "180px" }),
528
+ /* @__PURE__ */ r(T, { animated: !0, width: "85px" })
528
529
  ] }, "loading"),
529
- /* @__PURE__ */ c(s, { direction: "column", gap: "12px", alignItems: "center", children: [
530
+ /* @__PURE__ */ u(d, { direction: "column", gap: "12px", alignItems: "center", children: [
530
531
  /* @__PURE__ */ r(w, { dashed: !0 }),
531
- /* @__PURE__ */ r(S, { animated: !0, width: "150px" })
532
+ /* @__PURE__ */ r(T, { animated: !0, width: "150px" })
532
533
  ] }),
533
- /* @__PURE__ */ r(M, { children: /* @__PURE__ */ r(
534
- s,
534
+ /* @__PURE__ */ r(G, { children: /* @__PURE__ */ r(
535
+ d,
535
536
  {
536
537
  direction: "column",
537
538
  gap: "12px",
538
539
  justifyContent: "space-between",
539
540
  height: "203px",
540
- children: Array.from({ length: 5 }).map((l, o) => /* @__PURE__ */ r(j, { children: /* @__PURE__ */ c(
541
- s,
541
+ children: Array.from({ length: 5 }).map((a, s) => /* @__PURE__ */ r(j, { children: /* @__PURE__ */ u(
542
+ d,
542
543
  {
543
544
  direction: "column",
544
545
  gap: "12px",
545
546
  alignItems: "start",
546
547
  padding: "8px",
547
548
  children: [
548
- /* @__PURE__ */ r(S, { animated: !0, width: "180px" }),
549
- /* @__PURE__ */ r(S, { animated: !0, width: "85px" })
549
+ /* @__PURE__ */ r(T, { animated: !0, width: "180px" }),
550
+ /* @__PURE__ */ r(T, { animated: !0, width: "85px" })
550
551
  ]
551
552
  }
552
- ) }, `condition-${o}`))
553
+ ) }, `condition-${s}`))
553
554
  }
554
555
  ) })
555
556
  ] });
556
- }, _e = g.div`
557
+ }, Le = g.div`
557
558
  border-radius: 8px;
558
559
  border: 1px solid ${v.palette.neutral.N30};
559
560
  box-sizing: border-box;
@@ -584,21 +585,21 @@ g.div`
584
585
  border-radius: 8px;
585
586
  }
586
587
  `;
587
- const q = (e) => {
588
- const { children: t, controls: a = !0, handleDelete: i, id: h } = e;
589
- return /* @__PURE__ */ r(_e, { children: /* @__PURE__ */ c(s, { direction: "column", gap: "16px", padding: "12px 16px", children: [
588
+ const F = (e) => {
589
+ const { children: t, controls: n = !0, handleDelete: o, id: l } = e;
590
+ return /* @__PURE__ */ r(Le, { children: /* @__PURE__ */ u(d, { direction: "column", gap: "16px", padding: "12px 16px", children: [
590
591
  t,
591
- a && /* @__PURE__ */ c(A, { children: [
592
+ n && /* @__PURE__ */ u(E, { children: [
592
593
  /* @__PURE__ */ r(w, {}),
593
- /* @__PURE__ */ r(s, { gap: "16px", justifyContent: "end", children: /* @__PURE__ */ r(
594
- B,
594
+ /* @__PURE__ */ r(d, { gap: "16px", justifyContent: "end", children: /* @__PURE__ */ r(
595
+ Q,
595
596
  {
596
597
  cursorHover: !0,
597
598
  appearance: "dark",
598
599
  size: "24px",
599
- icon: /* @__PURE__ */ r(ne, {}),
600
+ icon: /* @__PURE__ */ r(oe, {}),
600
601
  onClick: () => {
601
- i(h);
602
+ o(l);
602
603
  }
603
604
  }
604
605
  ) })
@@ -609,10 +610,10 @@ const q = (e) => {
609
610
  & > div {
610
611
  padding: 24px 16px;
611
612
  }
612
- `, Le = g.div`
613
+ `, Re = g.div`
613
614
  background-color: ${({ theme: e }) => {
614
- var t, a;
615
- return ((a = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : a.N0) || v.palette.neutral.N0;
615
+ var t, n;
616
+ return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N0) || v.palette.neutral.N0;
616
617
  }};
617
618
  max-width: 450px;
618
619
  max-height: 90vh;
@@ -640,23 +641,23 @@ const q = (e) => {
640
641
  background-color: #ebecf0;
641
642
  border-radius: 8px;
642
643
  }
643
- `, Fe = (e) => {
644
- const { children: t, portalId: a, onCloseModal: i, title: h } = e, n = document.getElementById(a);
645
- if (!n)
644
+ `, Ue = (e) => {
645
+ const { children: t, portalId: n, onCloseModal: o, title: l } = e, a = document.getElementById(n);
646
+ if (!a)
646
647
  throw new Error(
647
648
  "The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
648
649
  );
649
- return de(
650
- /* @__PURE__ */ r(Ve, { children: /* @__PURE__ */ r(le, { children: /* @__PURE__ */ r(Le, { children: /* @__PURE__ */ c(s, { direction: "column", gap: "24px", children: [
651
- /* @__PURE__ */ r(s, { direction: "column", gap: "24px", children: /* @__PURE__ */ c(s, { alignItems: "center", justifyContent: "space-between", children: [
652
- /* @__PURE__ */ r(x, { type: "title", size: "large", appearance: "dark", weight: "bold", children: h }),
653
- /* @__PURE__ */ r(oe, { size: "24px", cursor: "pointer", onClick: i })
650
+ return le(
651
+ /* @__PURE__ */ r(Ve, { children: /* @__PURE__ */ r(se, { children: /* @__PURE__ */ r(Re, { children: /* @__PURE__ */ u(d, { direction: "column", gap: "24px", children: [
652
+ /* @__PURE__ */ r(d, { direction: "column", gap: "24px", children: /* @__PURE__ */ u(d, { alignItems: "center", justifyContent: "space-between", children: [
653
+ /* @__PURE__ */ r(x, { type: "title", size: "large", appearance: "dark", weight: "bold", children: l }),
654
+ /* @__PURE__ */ r(ie, { size: "24px", cursor: "pointer", onClick: o })
654
655
  ] }) }),
655
656
  t
656
657
  ] }) }) }) }),
657
- n
658
+ a
658
659
  );
659
- }, Ue = te`
660
+ }, Ie = ae`
660
661
  from {
661
662
  opacity: 0;
662
663
  transform: translateY(20px);
@@ -665,11 +666,11 @@ const q = (e) => {
665
666
  opacity: 1;
666
667
  transform: translateY(0);
667
668
  }
668
- `, Q = g.div`
669
+ `, W = g.div`
669
670
  width: 100%;
670
671
  height: 100%;
671
672
  & > div {
672
- animation: ${Ue} 600ms ease-out;
673
+ animation: ${Ie} 600ms ease-out;
673
674
  }
674
675
  `;
675
676
  g.div`
@@ -684,7 +685,7 @@ g.div`
684
685
  height: 100%;
685
686
  box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
686
687
  `;
687
- const qe = g.div`
688
+ const Fe = g.div`
688
689
  & > div {
689
690
  width: 100%;
690
691
  height: 100%;
@@ -704,14 +705,14 @@ const qe = g.div`
704
705
  border-radius: 8px;
705
706
  }
706
707
  }
707
- `, Ie = g.div`
708
+ `, $e = g.div`
708
709
  & > div > div {
709
710
  border-radius: 8px;
710
711
  border: 1px solid ${v.palette.neutral.N30};
711
712
  box-sizing: border-box;
712
713
  box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
713
714
  }
714
- `, $e = g.div`
715
+ `, ze = g.div`
715
716
  & > div {
716
717
  background-color: ${v.palette.neutral.N30};
717
718
  justify-content: center;
@@ -727,130 +728,130 @@ g.div`
727
728
  border: 1px solid ${v.palette.neutral.N30};
728
729
  }
729
730
  `;
730
- function ze({
731
+ function qe({
731
732
  index: e,
732
733
  handleOpenModal: t
733
734
  }) {
734
735
  return /* @__PURE__ */ r(
735
- q,
736
+ F,
736
737
  {
737
738
  id: `loading-card-${e}`,
738
739
  handleDelete: () => {
739
740
  },
740
741
  handleView: () => t(),
741
742
  controls: !1,
742
- children: /* @__PURE__ */ r(P, { loading: !0 })
743
+ children: /* @__PURE__ */ r(Y, { loading: !0 })
743
744
  },
744
745
  `loading-card-${e}`
745
746
  );
746
747
  }
747
- function Oe({
748
+ function Me({
748
749
  decision: e,
749
750
  controls: t,
750
- handleOpenModal: a,
751
- handleDelete: i,
752
- textValues: h
751
+ handleOpenModal: n,
752
+ handleDelete: o,
753
+ textValues: l
753
754
  }) {
754
- return e ? /* @__PURE__ */ r(Q, { children: /* @__PURE__ */ c(s, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
755
+ return e ? /* @__PURE__ */ r(W, { children: /* @__PURE__ */ u(d, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
755
756
  /* @__PURE__ */ r(x, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: e.id }),
756
757
  /* @__PURE__ */ r(
757
- q,
758
+ F,
758
759
  {
759
760
  id: e.id,
760
- handleDelete: () => i(e.id),
761
- handleView: () => a(e),
761
+ handleDelete: () => o(e.id),
762
+ handleView: () => n(e),
762
763
  controls: t,
763
- children: /* @__PURE__ */ r(P, { decision: e, textValues: h })
764
+ children: /* @__PURE__ */ r(Y, { decision: e, textValues: l })
764
765
  }
765
766
  )
766
767
  ] }) }, e.id) : null;
767
768
  }
768
- function je({
769
+ function He({
769
770
  index: e,
770
771
  handleOpenModal: t
771
772
  }) {
772
- return /* @__PURE__ */ r(Q, { children: /* @__PURE__ */ c(s, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
773
+ return /* @__PURE__ */ r(W, { children: /* @__PURE__ */ u(d, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
773
774
  /* @__PURE__ */ r(x, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: "Nueva decisión" }),
774
- /* @__PURE__ */ r($e, { onClick: () => t(), children: /* @__PURE__ */ r(
775
- q,
775
+ /* @__PURE__ */ r(ze, { onClick: () => t(), children: /* @__PURE__ */ r(
776
+ F,
776
777
  {
777
778
  id: `add-decision-${e}`,
778
779
  handleDelete: () => {
779
780
  },
780
781
  handleView: () => t(),
781
782
  controls: !1,
782
- children: /* @__PURE__ */ c(s, { direction: "column", gap: "12px", alignItems: "center", children: [
783
- /* @__PURE__ */ r(B, { appearance: "gray", icon: /* @__PURE__ */ r(ie, {}), size: "35px" }),
783
+ children: /* @__PURE__ */ u(d, { direction: "column", gap: "12px", alignItems: "center", children: [
784
+ /* @__PURE__ */ r(Q, { appearance: "gray", icon: /* @__PURE__ */ r(de, {}), size: "35px" }),
784
785
  /* @__PURE__ */ r(x, { appearance: "gray", type: "body", size: "large", children: "Agregar decisión" })
785
786
  ] })
786
787
  }
787
788
  ) })
788
789
  ] }) }, `add-decision-${e}`);
789
790
  }
790
- const Me = {
791
- loading: ze,
792
- decision: Oe,
793
- add: je
791
+ const Oe = {
792
+ loading: qe,
793
+ decision: Me,
794
+ add: He
794
795
  };
795
- function F(e) {
796
- const { type: t } = e, a = Me[t];
797
- return a ? a(e) : null;
796
+ function U(e) {
797
+ const { type: t } = e, n = Oe[t];
798
+ return n ? n(e) : null;
798
799
  }
799
- function He({
800
+ function je({
800
801
  controls: e,
801
802
  decisions: t,
802
- loading: a,
803
- handleOpenModal: i,
804
- handleDelete: h,
805
- textValues: n
803
+ loading: n,
804
+ handleOpenModal: o,
805
+ handleDelete: l,
806
+ textValues: a
806
807
  }) {
807
- const l = a ? Array.from({ length: 3 }).map(
808
- (u, d) => F({
808
+ const s = n ? Array.from({ length: 3 }).map(
809
+ (h, i) => U({
809
810
  type: "loading",
810
- index: d,
811
+ index: i,
811
812
  controls: e,
812
- loading: a,
813
- handleOpenModal: i,
814
- handleDelete: h,
815
- textValues: n
813
+ loading: n,
814
+ handleOpenModal: o,
815
+ handleDelete: l,
816
+ textValues: a
816
817
  })
817
818
  ) : t.map(
818
- (u) => F({
819
+ (h) => U({
819
820
  type: "decision",
820
- decision: u,
821
+ decision: h,
821
822
  controls: e,
822
- loading: a,
823
- handleOpenModal: i,
824
- handleDelete: h,
825
- textValues: n
823
+ loading: n,
824
+ handleOpenModal: o,
825
+ handleDelete: l,
826
+ textValues: a
826
827
  })
827
- ), o = (t.length === 0 || t.length < Math.floor(window.innerWidth / 300)) && !a && e;
828
- return { renderedCards: l, shouldRenderAddCard: o };
828
+ ), c = (t.length === 0 || t.length < Math.floor(window.innerWidth / 300)) && !n && e;
829
+ return { renderedCards: s, shouldRenderAddCard: c };
829
830
  }
830
831
  const mt = (e) => {
831
832
  const {
832
833
  controls: t = !0,
833
- decisions: a,
834
- textValues: i,
835
- decisionTemplate: h,
836
- isModalOpen: n,
837
- selectedDecision: l,
838
- loading: o,
839
- handleOpenModal: u,
840
- handleCloseModal: d,
834
+ decisions: n,
835
+ textValues: o,
836
+ decisionTemplate: l,
837
+ isModalOpen: a,
838
+ selectedDecision: s,
839
+ loading: c,
840
+ handleOpenModal: h,
841
+ handleCloseModal: i,
841
842
  handleSubmitForm: m,
842
843
  handleDelete: p
843
- } = e, f = ce("(max-width: 681px)"), { renderedCards: k, shouldRenderAddCard: R } = He({
844
+ } = e, f = ue("(max-width: 681px)"), { renderedCards: S, shouldRenderAddCard: A } = je({
844
845
  controls: t,
845
- decisions: a,
846
- loading: o,
847
- handleOpenModal: u,
846
+ decisions: n,
847
+ loading: c,
848
+ handleOpenModal: h,
848
849
  handleDelete: p,
849
- textValues: i
850
+ textValues: o
850
851
  });
851
- return /* @__PURE__ */ c(A, { children: [
852
- /* @__PURE__ */ r(Ie, { children: /* @__PURE__ */ r(qe, { children: /* @__PURE__ */ c(s, { direction: "column", gap: "16px", padding: "6px", children: [
853
- a.length === 0 && !o && /* @__PURE__ */ c(x, { as: "span", type: "label", size: "large", appearance: "gray", children: [
852
+ return /* @__PURE__ */ u(E, { children: [
853
+ /* @__PURE__ */ r($e, { children: /* @__PURE__ */ r(Fe, { children: /* @__PURE__ */ u(d, { direction: "column", gap: "16px", padding: "6px", children: [
854
+ n.length === 0 && !c && /* @__PURE__ */ u(x, { as: "span", type: "label", size: "large", appearance: "gray", children: [
854
855
  "Aún no tienes definidas tasas de interés efectivas. Presiona",
855
856
  /* @__PURE__ */ r(
856
857
  x,
@@ -865,8 +866,8 @@ const mt = (e) => {
865
866
  ),
866
867
  "para empezar."
867
868
  ] }),
868
- /* @__PURE__ */ c(
869
- se,
869
+ /* @__PURE__ */ u(
870
+ ce,
870
871
  {
871
872
  templateColumns: "repeat(auto-fill, minmax(300px, 1fr))",
872
873
  autoFlow: "row dense",
@@ -878,33 +879,33 @@ const mt = (e) => {
878
879
  padding: "6px",
879
880
  height: f ? "auto" : "484px",
880
881
  children: [
881
- k,
882
- R && F({
882
+ S,
883
+ A && U({
883
884
  type: "add",
884
- index: a.length,
885
+ index: n.length,
885
886
  controls: t,
886
- loading: o,
887
- handleOpenModal: u,
887
+ loading: c,
888
+ handleOpenModal: h,
888
889
  handleDelete: p,
889
- textValues: i
890
+ textValues: o
890
891
  })
891
892
  ]
892
893
  }
893
894
  )
894
895
  ] }) }) }),
895
- n && /* @__PURE__ */ r(
896
- Fe,
896
+ a && /* @__PURE__ */ r(
897
+ Ue,
897
898
  {
898
899
  portalId: "modal-portal",
899
- onCloseModal: d,
900
- title: l ? "Editar Decisión" : "Nueva decisión",
900
+ onCloseModal: i,
901
+ title: s ? "Editar Decisión" : "Nueva decisión",
901
902
  children: /* @__PURE__ */ r(
902
903
  we,
903
904
  {
904
- decision: l || h,
905
+ decision: s || l,
905
906
  onSubmitEvent: m,
906
- textValues: i,
907
- onCancel: () => d()
907
+ textValues: o,
908
+ onCancel: () => i()
908
909
  }
909
910
  )
910
911
  }
@@ -912,9 +913,9 @@ const mt = (e) => {
912
913
  ] });
913
914
  };
914
915
  export {
915
- q as BusinessRuleCard,
916
- P as BusinessRuleView,
916
+ F as BusinessRuleCard,
917
+ Y as BusinessRuleView,
917
918
  mt as BusinessRules,
918
- Fe as ModalRules,
919
+ Ue as ModalRules,
919
920
  we as RulesForm
920
921
  };
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  ],
11
11
  "description": "",
12
12
  "private": false,
13
- "version": "0.1.30",
13
+ "version": "0.1.32",
14
14
  "type": "module",
15
15
  "exports": {
16
16
  ".": {