@isettingkit/business-rules 0.1.34 → 0.1.35

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.
@@ -18,6 +18,8 @@ export declare interface IBusinessRuleCard {
18
18
 
19
19
  declare interface IBusinessRules {
20
20
  controls?: boolean;
21
+ customTitleContentAddCard?: string;
22
+ customMessageEmptyDecisions?: string;
21
23
  decisions: IRuleDecision[];
22
24
  textValues: IRulesFormTextValues;
23
25
  decisionTemplate: IRuleDecision;
package/dist/index.es.js CHANGED
@@ -1,23 +1,23 @@
1
- import { jsxs as c, Fragment as N, jsx as i } from "react/jsx-runtime";
2
- import { ValueDataType as D, ValueHowToSetUp as T, DecisionConditionRender as $ } from "@isettingkit/input";
3
- import { Stack as d } from "@inubekit/stack";
1
+ import { jsxs as c, Fragment as k, jsx as i } from "react/jsx-runtime";
2
+ import { ValueDataType as D, ValueHowToSetUp as T, DecisionConditionRender as q } from "@isettingkit/input";
3
+ import { Stack as s } from "@inubekit/stack";
4
4
  import { Divider as w } from "@inubekit/divider";
5
- import { Button as z } from "@inubekit/button";
5
+ import { Button as O } from "@inubekit/button";
6
6
  import { useState as F, useEffect as te } from "react";
7
7
  import { Text as f } from "@inubekit/text";
8
- import { Date as q } from "@inubekit/date";
8
+ import { Date as j } from "@inubekit/date";
9
9
  import { Checkbox as ie } from "@inubekit/checkbox";
10
- import { Toggle as G } from "@inubekit/toggle";
11
- import { inube as x } from "@inubekit/foundations";
10
+ import { Toggle as Q } from "@inubekit/toggle";
11
+ import { inube as y } from "@inubekit/foundations";
12
12
  import b, { keyframes as ne } from "styled-components";
13
13
  import { useFormik as ae } from "formik";
14
- import { mixed as B, object as L, number as I, string as U, date as O, lazy as j } from "yup";
14
+ import { mixed as Y, object as L, number as U, string as $, lazy as H, date as M } from "yup";
15
15
  import { DecisionViewConditionRenderer as A } from "@isettingkit/view";
16
- import { SkeletonLine as C } from "@inubekit/skeleton";
17
- import { MdOutlineDelete as re, MdClear as oe, MdAdd as le } from "react-icons/md";
18
- import { Icon as Q } from "@inubekit/icon";
19
- import { createPortal as de } from "react-dom";
20
- import { Blanket as se } from "@inubekit/blanket";
16
+ import { SkeletonLine as E } from "@inubekit/skeleton";
17
+ import { MdOutlineDelete as oe, MdClear as re, MdAdd as le } from "react-icons/md";
18
+ import { Icon as W } from "@inubekit/icon";
19
+ import { createPortal as se } from "react-dom";
20
+ import { Blanket as de } from "@inubekit/blanket";
21
21
  import { Grid as ce } from "@inubekit/grid";
22
22
  import { useMediaQuery as he } from "@inubekit/hooks";
23
23
  const ue = (t) => {
@@ -25,20 +25,20 @@ const ue = (t) => {
25
25
  onHandleStartChange: e,
26
26
  onHandleEndChange: n,
27
27
  onCheckClosedChange: a,
28
- labelStart: r,
29
- labelEnd: o,
30
- checkedClosed: s = !1,
31
- required: h = !1,
32
- valueStart: u = "",
28
+ labelStart: o,
29
+ labelEnd: r,
30
+ checkedClosed: d = !1,
31
+ required: u = !1,
32
+ valueStart: h = "",
33
33
  valueEnd: l = "",
34
34
  messageStart: p = "",
35
35
  messageEnd: m = "",
36
36
  statusStart: g = "pending",
37
- statusEnd: k = "pending"
38
- } = t, [S, J] = F(s), [K, X] = F(u), [Z, ee] = F(l);
39
- return /* @__PURE__ */ c(N, { children: [
40
- /* @__PURE__ */ c(d, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
41
- /* @__PURE__ */ i(d, { children: /* @__PURE__ */ i(
37
+ statusEnd: C = "pending"
38
+ } = t, [S, V] = F(d), [I, X] = F(h), [Z, ee] = F(l);
39
+ return /* @__PURE__ */ c(k, { children: [
40
+ /* @__PURE__ */ c(s, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
41
+ /* @__PURE__ */ i(s, { children: /* @__PURE__ */ i(
42
42
  f,
43
43
  {
44
44
  appearance: "gray",
@@ -50,7 +50,7 @@ const ue = (t) => {
50
50
  }
51
51
  ) }),
52
52
  /* @__PURE__ */ i(
53
- d,
53
+ s,
54
54
  {
55
55
  alignContent: "center",
56
56
  justifyContent: "center",
@@ -60,8 +60,8 @@ const ue = (t) => {
60
60
  ie,
61
61
  {
62
62
  label: "Cerrada",
63
- onChange: ({ target: y }) => {
64
- J(y.checked), a && a(y.checked);
63
+ onChange: ({ target: v }) => {
64
+ V(v.checked), a && a(v.checked);
65
65
  },
66
66
  checked: S,
67
67
  value: ""
@@ -70,34 +70,34 @@ const ue = (t) => {
70
70
  }
71
71
  )
72
72
  ] }),
73
- /* @__PURE__ */ c(d, { justifyContent: "space-between", gap: "24px", children: [
74
- /* @__PURE__ */ i(d, { width: "189px", children: /* @__PURE__ */ i(
75
- q,
73
+ /* @__PURE__ */ c(s, { justifyContent: "space-between", gap: "24px", children: [
74
+ /* @__PURE__ */ i(s, { width: "189px", children: /* @__PURE__ */ i(
75
+ j,
76
76
  {
77
77
  id: "dateStart",
78
- label: r,
79
- onChange: (y) => {
80
- X(y.target.value), e(y);
78
+ label: o,
79
+ onChange: (v) => {
80
+ X(v.target.value), e(v);
81
81
  },
82
- value: K,
83
- required: h,
82
+ value: I,
83
+ required: u,
84
84
  size: "compact",
85
85
  status: g,
86
86
  message: p
87
87
  }
88
88
  ) }),
89
- S && /* @__PURE__ */ i(d, { width: "189px", children: /* @__PURE__ */ i(
90
- q,
89
+ S && /* @__PURE__ */ i(s, { width: "189px", children: /* @__PURE__ */ i(
90
+ j,
91
91
  {
92
92
  id: "dateEnd",
93
- label: o,
94
- onChange: (y) => {
95
- ee(y.target.value), n(y);
93
+ label: r,
94
+ onChange: (v) => {
95
+ ee(v.target.value), n(v);
96
96
  },
97
97
  value: Z,
98
- required: h,
98
+ required: u,
99
99
  size: "compact",
100
- status: k,
100
+ status: C,
101
101
  message: m
102
102
  }
103
103
  ) })
@@ -106,7 +106,7 @@ const ue = (t) => {
106
106
  }, pe = b.div`
107
107
  & > div {
108
108
  border-radius: 8px;
109
- border: 1px solid ${x.palette.neutral.N30};
109
+ border: 1px solid ${y.palette.neutral.N30};
110
110
  }
111
111
  `, me = b.div`
112
112
  width: 100%;
@@ -130,32 +130,32 @@ const ue = (t) => {
130
130
  checked: e,
131
131
  children: n,
132
132
  handleToggleChange: a,
133
- id: r,
134
- labelToggle: o,
135
- name: s,
136
- valueToggle: h = ""
137
- } = t, [u, l] = F(e), p = (m) => {
133
+ id: o,
134
+ labelToggle: r,
135
+ name: d,
136
+ valueToggle: u = ""
137
+ } = t, [h, l] = F(e), p = (m) => {
138
138
  l(m.target.checked), a(m);
139
139
  };
140
140
  return te(() => {
141
141
  l(e);
142
- }, [e]), /* @__PURE__ */ c(N, { children: [
143
- /* @__PURE__ */ i(d, { children: /* @__PURE__ */ i(
144
- G,
142
+ }, [e]), /* @__PURE__ */ c(k, { children: [
143
+ /* @__PURE__ */ i(s, { children: /* @__PURE__ */ i(
144
+ Q,
145
145
  {
146
- checked: u,
147
- id: r,
148
- name: s,
146
+ checked: h,
147
+ id: o,
148
+ name: d,
149
149
  onChange: p,
150
150
  size: "small",
151
- value: h,
152
- children: /* @__PURE__ */ i(f, { size: "medium", type: "label", weight: "bold", children: o })
151
+ value: u,
152
+ children: /* @__PURE__ */ i(f, { size: "medium", type: "label", weight: "bold", children: r })
153
153
  }
154
154
  ) }),
155
- u && /* @__PURE__ */ i(N, { children: n })
155
+ h && /* @__PURE__ */ i(k, { children: n })
156
156
  ] });
157
157
  }, be = (t) => ({
158
- schema: B().test(
158
+ schema: Y().test(
159
159
  "isArrayOrString",
160
160
  "Must be an array of strings/numbers or a single string",
161
161
  (e) => Array.isArray(e) ? e.every(
@@ -164,7 +164,7 @@ const ue = (t) => {
164
164
  ),
165
165
  value: t
166
166
  }), Te = (t) => ({
167
- schema: B().test(
167
+ schema: Y().test(
168
168
  "isArrayOrString",
169
169
  "Must be an array of strings/numbers or a single string",
170
170
  (e) => Array.isArray(e) ? e.every(
@@ -176,40 +176,40 @@ const ue = (t) => {
176
176
  const e = (t == null ? void 0 : t.from) ?? 0, n = (t == null ? void 0 : t.to) ?? 0;
177
177
  return {
178
178
  schema: L({
179
- from: I().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: I().min(0, "To value must be greater than or equal to 0").required("To value is required").test(
179
+ from: U().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: U().min(0, "To value must be greater than or equal to 0").required("To value is required").test(
181
181
  "is-greater",
182
182
  "To value must be greater than From value",
183
183
  function(a) {
184
- const { from: r } = this.parent;
185
- return a > r;
184
+ const { from: o } = this.parent;
185
+ return a > o;
186
186
  }
187
187
  )
188
188
  }),
189
189
  value: { from: e, to: n }
190
190
  };
191
- }, V = (t, e) => e === D.PERCENTAGE ? {
192
- schema: I().required("Percentage is required").min(0, "Percentage cannot be less than 0").max(100, "Percentage cannot be greater than 100"),
191
+ }, R = (t, e) => e === D.PERCENTAGE ? {
192
+ schema: U().required("Percentage is required").min(0, "Percentage cannot be less than 0").max(100, "Percentage cannot be greater than 100"),
193
193
  value: t
194
194
  } : {
195
- schema: U().required("Required"),
195
+ schema: $().required("Required"),
196
196
  value: t
197
- }, ye = (t) => ({
198
- schema: U().required("Required").test(
197
+ }, ve = (t) => ({
198
+ schema: $().required("Required").test(
199
199
  "non-empty",
200
200
  "Value cannot be empty",
201
201
  (e) => e != null && e.trim() !== ""
202
202
  ),
203
203
  value: t
204
- }), xe = {
204
+ }), ye = {
205
205
  [T.LIST_OF_VALUES]: be,
206
206
  [T.LIST_OF_VALUES_MULTI]: Te,
207
207
  [T.RANGE]: fe,
208
- [T.GREATER_THAN]: V,
209
- [T.LESS_THAN]: V,
210
- [T.EQUAL]: V
211
- }, H = (t) => xe[t] || ye;
212
- function ve({ decision: t, onSubmitEvent: e }) {
208
+ [T.GREATER_THAN]: R,
209
+ [T.LESS_THAN]: R,
210
+ [T.EQUAL]: R
211
+ }, P = (t) => ye[t] || ve;
212
+ function xe({ decision: t, onSubmitEvent: e }) {
213
213
  const n = {
214
214
  ruleName: t.ruleName || "",
215
215
  decisionDataType: t.decisionDataType || D.ALPHABETICAL,
@@ -221,30 +221,30 @@ function ve({ decision: t, onSubmitEvent: e }) {
221
221
  conditionThatEstablishesTheDecision: {},
222
222
  checkClosed: !1
223
223
  }, a = L({
224
- ruleName: U().required("Name is required"),
225
- effectiveFrom: O().required("effective From date is required"),
226
- validUntil: O().when(
224
+ ruleName: $().required("Name is required"),
225
+ effectiveFrom: M().required("effective From date is required"),
226
+ validUntil: M().when(
227
227
  "checkClosed",
228
- (s, h, { parent: u }) => (u == null ? void 0 : u.checkClosed) ? h.required("valid Until date is required").test(
228
+ (d, u, { parent: h }) => (h == null ? void 0 : h.checkClosed) ? u.required("valid Until date is required").test(
229
229
  "is-after-startDate",
230
230
  "valid Until date must be greater than or equal to Start date",
231
231
  function(p) {
232
232
  const m = this.parent.effectiveFrom;
233
233
  return !m || !p ? !0 : new Date(p) >= new Date(m);
234
234
  }
235
- ) : h.notRequired()
235
+ ) : u.notRequired()
236
236
  ),
237
- value: j(() => H(r.values.howToSetTheDecision)(
238
- r.values.value,
239
- r.values.decisionDataType
237
+ value: H(() => P(o.values.howToSetTheDecision)(
238
+ o.values.value,
239
+ o.values.decisionDataType
240
240
  ).schema),
241
- conditionThatEstablishesTheDecision: j((s, { parent: h }) => {
241
+ conditionThatEstablishesTheDecision: H((d, { parent: u }) => {
242
242
  var p;
243
- if ((h == null ? void 0 : h.toggleNone) && Object.keys(h.conditionThatEstablishesTheDecision || {}).length > 0) return L().shape({});
243
+ if ((u == null ? void 0 : u.toggleNone) && Object.keys(u.conditionThatEstablishesTheDecision || {}).length > 0) return L().shape({});
244
244
  const l = (p = t.conditionThatEstablishesTheDecision) == null ? void 0 : p.reduce(
245
245
  (m, g) => {
246
- if (r.values.conditionThatEstablishesTheDecision[g.conditionName] !== void 0) {
247
- const S = H(g.howToSetTheCondition);
246
+ if (o.values.conditionThatEstablishesTheDecision[g.conditionName] !== void 0) {
247
+ const S = P(g.howToSetTheCondition);
248
248
  m[g.conditionName] = S(
249
249
  g.value,
250
250
  g.conditionDataType
@@ -262,43 +262,43 @@ function ve({ decision: t, onSubmitEvent: e }) {
262
262
  ) : !1
263
263
  );
264
264
  })
265
- }), r = ae({
265
+ }), o = ae({
266
266
  initialValues: n,
267
267
  validationSchema: a,
268
268
  validateOnBlur: !0,
269
- onSubmit: (s) => {
270
- var u;
271
- const h = {
269
+ onSubmit: (d) => {
270
+ var h;
271
+ const u = {
272
272
  ...t,
273
- ruleName: s.ruleName,
274
- decisionDataType: s.decisionDataType,
275
- howToSetTheDecision: s.howToSetTheDecision,
276
- value: s.value,
277
- effectiveFrom: s.effectiveFrom,
278
- validUntil: s.validUntil,
279
- conditionThatEstablishesTheDecision: (u = t.conditionThatEstablishesTheDecision) == null ? void 0 : u.filter((l) => {
280
- const p = s.conditionThatEstablishesTheDecision[l.conditionName];
273
+ ruleName: d.ruleName,
274
+ decisionDataType: d.decisionDataType,
275
+ howToSetTheDecision: d.howToSetTheDecision,
276
+ value: d.value,
277
+ effectiveFrom: d.effectiveFrom,
278
+ validUntil: d.validUntil,
279
+ conditionThatEstablishesTheDecision: (h = t.conditionThatEstablishesTheDecision) == null ? void 0 : h.filter((l) => {
280
+ const p = d.conditionThatEstablishesTheDecision[l.conditionName];
281
281
  return p != null && p !== "";
282
282
  }).map((l) => ({
283
283
  ...l,
284
- value: s.conditionThatEstablishesTheDecision[l.conditionName]
284
+ value: d.conditionThatEstablishesTheDecision[l.conditionName]
285
285
  }))
286
286
  };
287
- e(h);
287
+ e(u);
288
288
  }
289
289
  });
290
- return { formik: r, handleToggleNoneChange: (s) => {
291
- var h;
292
- r.setFieldValue("toggleNone", s), (h = t.conditionThatEstablishesTheDecision) == null || h.forEach((u) => {
293
- if (s)
294
- r.setFieldValue(
295
- `conditionThatEstablishesTheDecision.${u.conditionName}`,
290
+ return { formik: o, handleToggleNoneChange: (d) => {
291
+ var u;
292
+ o.setFieldValue("toggleNone", d), (u = t.conditionThatEstablishesTheDecision) == null || u.forEach((h) => {
293
+ if (d)
294
+ o.setFieldValue(
295
+ `conditionThatEstablishesTheDecision.${h.conditionName}`,
296
296
  void 0
297
297
  );
298
298
  else {
299
- const l = u.howToSetTheCondition === T.LIST_OF_VALUES_MULTI ? [] : "";
300
- r.setFieldValue(
301
- `conditionThatEstablishesTheDecision.${u.conditionName}`,
299
+ const l = h.howToSetTheCondition === T.LIST_OF_VALUES_MULTI ? [] : "";
300
+ o.setFieldValue(
301
+ `conditionThatEstablishesTheDecision.${h.conditionName}`,
302
302
  l
303
303
  );
304
304
  }
@@ -306,26 +306,26 @@ function ve({ decision: t, onSubmitEvent: e }) {
306
306
  } };
307
307
  }
308
308
  const we = (t) => {
309
- var u;
310
- const { decision: e, onSubmitEvent: n, textValues: a, onCancel: r } = t, { formik: o, handleToggleNoneChange: s } = ve({
309
+ var h;
310
+ const { decision: e, onSubmitEvent: n, textValues: a, onCancel: o } = t, { formik: r, handleToggleNoneChange: d } = xe({
311
311
  decision: e,
312
312
  onSubmitEvent: n
313
- }), h = {
313
+ }), u = {
314
314
  ruleName: e.ruleName,
315
315
  labelName: e.labelName,
316
316
  howToSetTheCondition: e.howToSetTheDecision,
317
317
  decisionDataType: e.decisionDataType,
318
318
  listOfPossibleValues: e.listOfPossibleValues
319
319
  };
320
- return /* @__PURE__ */ i("form", { onSubmit: o.handleSubmit, children: /* @__PURE__ */ c(d, { direction: "column", gap: "24px", children: [
321
- $({
322
- condition: h,
323
- formik: o,
320
+ return /* @__PURE__ */ i("form", { onSubmit: r.handleSubmit, children: /* @__PURE__ */ c(s, { direction: "column", gap: "24px", children: [
321
+ q({
322
+ condition: u,
323
+ formik: r,
324
324
  isDecision: !0
325
325
  }),
326
326
  /* @__PURE__ */ i(w, { dashed: !0 }),
327
327
  /* @__PURE__ */ i(pe, { children: /* @__PURE__ */ i(me, { children: /* @__PURE__ */ c(
328
- d,
328
+ s,
329
329
  {
330
330
  direction: "column",
331
331
  padding: "6px 12px",
@@ -333,7 +333,7 @@ const we = (t) => {
333
333
  height: "272px",
334
334
  children: [
335
335
  /* @__PURE__ */ c(
336
- d,
336
+ s,
337
337
  {
338
338
  justifyContent: "space-between",
339
339
  alignItems: "center",
@@ -341,11 +341,11 @@ const we = (t) => {
341
341
  children: [
342
342
  /* @__PURE__ */ i(f, { type: "title", size: "small", weight: "bold", appearance: "gray", children: a.factsThatConditionIt }),
343
343
  /* @__PURE__ */ i(
344
- G,
344
+ Q,
345
345
  {
346
346
  id: "toggleNone",
347
- onChange: () => s(!o.values.toggleNone),
348
- checked: o.values.toggleNone,
347
+ onChange: () => d(!r.values.toggleNone),
348
+ checked: r.values.toggleNone,
349
349
  size: "small",
350
350
  children: /* @__PURE__ */ i(f, { size: "medium", type: "label", weight: "bold", children: a.none })
351
351
  }
@@ -353,33 +353,33 @@ const we = (t) => {
353
353
  ]
354
354
  }
355
355
  ),
356
- /* @__PURE__ */ i(d, { direction: "column", gap: "20px", children: (u = e.conditionThatEstablishesTheDecision) == null ? void 0 : u.map(
356
+ /* @__PURE__ */ i(s, { direction: "column", gap: "20px", children: (h = e.conditionThatEstablishesTheDecision) == null ? void 0 : h.map(
357
357
  (l) => l.hidden ? null : /* @__PURE__ */ i(
358
358
  ge,
359
359
  {
360
360
  id: `toggle-${l.conditionName}`,
361
361
  name: `toggle.${l.conditionName}`,
362
362
  labelToggle: l.labelName,
363
- checked: !o.values.toggleNone && o.values.conditionThatEstablishesTheDecision[l.conditionName] !== void 0,
363
+ checked: !r.values.toggleNone && r.values.conditionThatEstablishesTheDecision[l.conditionName] !== void 0,
364
364
  handleToggleChange: (p) => {
365
365
  if (!p.target.checked)
366
- o.setFieldValue(
366
+ r.setFieldValue(
367
367
  `conditionThatEstablishesTheDecision.${l.conditionName}`,
368
368
  void 0
369
- ), o.setFieldTouched(
369
+ ), r.setFieldTouched(
370
370
  `conditionThatEstablishesTheDecision.${l.conditionName}`,
371
371
  !1,
372
372
  !1
373
373
  );
374
374
  else {
375
375
  const g = l.howToSetTheCondition === T.LIST_OF_VALUES_MULTI ? [] : "";
376
- o.setFieldValue(
376
+ r.setFieldValue(
377
377
  `conditionThatEstablishesTheDecision.${l.conditionName}`,
378
378
  g
379
379
  );
380
380
  }
381
381
  },
382
- children: $({ condition: l, formik: o })
382
+ children: q({ condition: l, formik: r })
383
383
  },
384
384
  l.conditionName
385
385
  )
@@ -393,33 +393,33 @@ const we = (t) => {
393
393
  {
394
394
  labelStart: a.termStart,
395
395
  labelEnd: a.termEnd,
396
- valueStart: o.values.effectiveFrom,
397
- valueEnd: o.values.validUntil,
398
- messageStart: o.errors.effectiveFrom,
399
- messageEnd: o.errors.validUntil,
400
- statusStart: o.touched.effectiveFrom ? o.errors.effectiveFrom ? "invalid" : "valid" : void 0,
401
- statusEnd: o.touched.validUntil ? o.errors.validUntil ? "invalid" : "valid" : void 0,
402
- onHandleStartChange: (l) => o.setFieldValue("effectiveFrom", l.target.value),
403
- onHandleEndChange: (l) => o.setFieldValue("validUntil", l.target.value),
396
+ valueStart: r.values.effectiveFrom,
397
+ valueEnd: r.values.validUntil,
398
+ messageStart: r.errors.effectiveFrom,
399
+ messageEnd: r.errors.validUntil,
400
+ statusStart: r.touched.effectiveFrom ? r.errors.effectiveFrom ? "invalid" : "valid" : void 0,
401
+ statusEnd: r.touched.validUntil ? r.errors.validUntil ? "invalid" : "valid" : void 0,
402
+ onHandleStartChange: (l) => r.setFieldValue("effectiveFrom", l.target.value),
403
+ onHandleEndChange: (l) => r.setFieldValue("validUntil", l.target.value),
404
404
  onCheckClosedChange: (l) => {
405
- o.setFieldValue("checkClosed", l), l && o.setFieldValue("validUntil", "");
405
+ r.setFieldValue("checkClosed", l), l && r.setFieldValue("validUntil", "");
406
406
  },
407
- checkedClosed: o.values.checkClosed
407
+ checkedClosed: r.values.checkClosed
408
408
  }
409
409
  ),
410
410
  /* @__PURE__ */ i(w, {}),
411
- o.errors.conditionThatEstablishesTheDecision && o.submitCount > 0 && /* @__PURE__ */ i(f, { type: "label", size: "medium", appearance: "danger", children: String(o.errors.conditionThatEstablishesTheDecision) }),
412
- /* @__PURE__ */ c(d, { direction: "row", justifyContent: "end", gap: "16px", children: [
413
- /* @__PURE__ */ i(z, { appearance: "gray", onClick: r, children: a.cancel }),
414
- /* @__PURE__ */ i(z, { type: "submit", children: a.confirm })
411
+ r.errors.conditionThatEstablishesTheDecision && r.submitCount > 0 && /* @__PURE__ */ i(f, { type: "label", size: "medium", appearance: "danger", children: String(r.errors.conditionThatEstablishesTheDecision) }),
412
+ /* @__PURE__ */ c(s, { direction: "row", justifyContent: "end", gap: "16px", children: [
413
+ /* @__PURE__ */ i(O, { appearance: "gray", onClick: o, children: a.cancel }),
414
+ /* @__PURE__ */ i(O, { type: "submit", children: a.confirm })
415
415
  ] })
416
416
  ] }) });
417
- }, M = b.div`
417
+ }, G = b.div`
418
418
  & > div {
419
419
  border-radius: 8px;
420
- border: 1px solid ${x.palette.neutral.N30};
420
+ border: 1px solid ${y.palette.neutral.N30};
421
421
  }
422
- `, P = b.div`
422
+ `, B = b.div`
423
423
  width: 100%;
424
424
  height: 100%;
425
425
  overflow-y: auto;
@@ -441,38 +441,38 @@ const we = (t) => {
441
441
  from: t.from ?? "",
442
442
  to: t.to ?? ""
443
443
  }), Ee = (t) => t.value, Ne = (t) => t.value, ke = (t) => t.value;
444
- var v = /* @__PURE__ */ ((t) => (t.EQUAL = "EqualTo", t.GREATER_THAN = "GreaterThan", t.LESS_THAN = "LessThan", t.LIST_OF_VALUES = "ListOfValues", t.LIST_OF_VALUES_MULTI = "ListOfValuesMulti", t.RANGE = "Range", t))(v || {});
444
+ var x = /* @__PURE__ */ ((t) => (t.EQUAL = "EqualTo", t.GREATER_THAN = "GreaterThan", t.LESS_THAN = "LessThan", t.LIST_OF_VALUES = "ListOfValues", t.LIST_OF_VALUES_MULTI = "ListOfValuesMulti", t.RANGE = "Range", t))(x || {});
445
445
  const Ae = (t) => t.value, Fe = {
446
- [v.LIST_OF_VALUES]: Se,
447
- [v.LIST_OF_VALUES_MULTI]: De,
448
- [v.RANGE]: Ce,
449
- [v.GREATER_THAN]: Ee,
450
- [v.LESS_THAN]: Ne,
451
- [v.EQUAL]: ke
446
+ [x.LIST_OF_VALUES]: Se,
447
+ [x.LIST_OF_VALUES_MULTI]: De,
448
+ [x.RANGE]: Ce,
449
+ [x.GREATER_THAN]: Ee,
450
+ [x.LESS_THAN]: Ne,
451
+ [x.EQUAL]: ke
452
452
  };
453
- function E(t) {
453
+ function N(t) {
454
454
  const e = t == null ? void 0 : t.value, n = typeof e == "object" && e !== null && !Array.isArray(e), a = Fe[t == null ? void 0 : t.howToSetTheDecision] || Ae;
455
455
  return n && a(e) || e || void 0;
456
456
  }
457
- const Y = (t) => {
458
- const { decision: e, loading: n = !1, textValues: a } = t, r = {
457
+ const J = (t) => {
458
+ const { decision: e, loading: n = !1, textValues: a } = t, o = {
459
459
  labelName: (e == null ? void 0 : e.labelName) || "",
460
460
  decisionDataType: (e == null ? void 0 : e.decisionDataType) || "alphabetical",
461
- value: E(e),
461
+ value: N(e),
462
462
  howToSetTheDecision: (e == null ? void 0 : e.howToSetTheDecision) || "EqualTo"
463
463
  };
464
- return !n && e && a ? /* @__PURE__ */ c(d, { direction: "column", gap: "12px", children: [
465
- e && /* @__PURE__ */ i(d, { direction: "column", alignItems: "center", children: /* @__PURE__ */ i(
464
+ return !n && e && a ? /* @__PURE__ */ c(s, { direction: "column", gap: "12px", children: [
465
+ e && /* @__PURE__ */ i(s, { direction: "column", alignItems: "center", children: /* @__PURE__ */ i(
466
466
  A,
467
467
  {
468
- element: r,
469
- valueData: E(r),
468
+ element: o,
469
+ valueData: N(o),
470
470
  type: "decision"
471
471
  }
472
472
  ) }, e.ruleName),
473
473
  /* @__PURE__ */ i(w, { dashed: !0 }),
474
- /* @__PURE__ */ i(P, { children: /* @__PURE__ */ c(
475
- d,
474
+ /* @__PURE__ */ i(B, { children: /* @__PURE__ */ c(
475
+ s,
476
476
  {
477
477
  direction: "column",
478
478
  gap: "12px",
@@ -490,18 +490,18 @@ const Y = (t) => {
490
490
  children: a.factsThatConditionIt
491
491
  }
492
492
  ),
493
- e.conditionThatEstablishesTheDecision && e.conditionThatEstablishesTheDecision.map((o) => o.hidden ? null : /* @__PURE__ */ i(M, { children: /* @__PURE__ */ i(d, { direction: "column", padding: "8px", children: /* @__PURE__ */ i(
493
+ e.conditionThatEstablishesTheDecision && e.conditionThatEstablishesTheDecision.map((r) => r.hidden ? null : /* @__PURE__ */ i(G, { children: /* @__PURE__ */ i(s, { direction: "column", padding: "8px", children: /* @__PURE__ */ i(
494
494
  A,
495
495
  {
496
496
  element: {
497
- ...o,
498
- value: o.value
497
+ ...r,
498
+ value: r.value
499
499
  },
500
- valueData: E(o)
500
+ valueData: N(r)
501
501
  }
502
- ) }) }, o.conditionName)),
502
+ ) }) }, r.conditionName)),
503
503
  /* @__PURE__ */ i(w, { dashed: !0 }),
504
- /* @__PURE__ */ c(d, { direction: "column", gap: "12px", children: [
504
+ /* @__PURE__ */ c(s, { direction: "column", gap: "12px", children: [
505
505
  (e == null ? void 0 : e.effectiveFrom) && (e == null ? void 0 : e.validUntil) && /* @__PURE__ */ i(
506
506
  A,
507
507
  {
@@ -511,7 +511,7 @@ const Y = (t) => {
511
511
  howToSetTheDecision: T.RANGE,
512
512
  decisionDataType: D.DATE
513
513
  },
514
- valueData: E({
514
+ valueData: N({
515
515
  labelName: a.terms,
516
516
  value: {
517
517
  from: String(e.effectiveFrom),
@@ -533,7 +533,7 @@ const Y = (t) => {
533
533
  howToSetTheDecision: T.EQUAL,
534
534
  decisionDataType: D.DATE
535
535
  },
536
- valueData: E({
536
+ valueData: N({
537
537
  labelName: a.terms,
538
538
  value: String(e.effectiveFrom),
539
539
  howToSetTheDecision: T.EQUAL,
@@ -547,41 +547,41 @@ const Y = (t) => {
547
547
  ]
548
548
  }
549
549
  ) })
550
- ] }) : /* @__PURE__ */ c(d, { direction: "column", gap: "12px", children: [
551
- /* @__PURE__ */ c(d, { direction: "column", alignItems: "center", gap: "4px", children: [
552
- /* @__PURE__ */ i(C, { animated: !0, width: "180px" }),
553
- /* @__PURE__ */ i(C, { animated: !0, width: "85px" })
550
+ ] }) : /* @__PURE__ */ c(s, { direction: "column", gap: "12px", children: [
551
+ /* @__PURE__ */ c(s, { direction: "column", alignItems: "center", gap: "4px", children: [
552
+ /* @__PURE__ */ i(E, { animated: !0, width: "180px" }),
553
+ /* @__PURE__ */ i(E, { animated: !0, width: "85px" })
554
554
  ] }, "loading"),
555
- /* @__PURE__ */ c(d, { direction: "column", gap: "12px", alignItems: "center", children: [
555
+ /* @__PURE__ */ c(s, { direction: "column", gap: "12px", alignItems: "center", children: [
556
556
  /* @__PURE__ */ i(w, { dashed: !0 }),
557
- /* @__PURE__ */ i(C, { animated: !0, width: "150px" })
557
+ /* @__PURE__ */ i(E, { animated: !0, width: "150px" })
558
558
  ] }),
559
- /* @__PURE__ */ i(P, { children: /* @__PURE__ */ i(
560
- d,
559
+ /* @__PURE__ */ i(B, { children: /* @__PURE__ */ i(
560
+ s,
561
561
  {
562
562
  direction: "column",
563
563
  gap: "12px",
564
564
  justifyContent: "space-between",
565
565
  height: "203px",
566
- children: Array.from({ length: 5 }).map((o, s) => /* @__PURE__ */ i(M, { children: /* @__PURE__ */ c(
567
- d,
566
+ children: Array.from({ length: 5 }).map((r, d) => /* @__PURE__ */ i(G, { children: /* @__PURE__ */ c(
567
+ s,
568
568
  {
569
569
  direction: "column",
570
570
  gap: "12px",
571
571
  alignItems: "start",
572
572
  padding: "8px",
573
573
  children: [
574
- /* @__PURE__ */ i(C, { animated: !0, width: "180px" }),
575
- /* @__PURE__ */ i(C, { animated: !0, width: "85px" })
574
+ /* @__PURE__ */ i(E, { animated: !0, width: "180px" }),
575
+ /* @__PURE__ */ i(E, { animated: !0, width: "85px" })
576
576
  ]
577
577
  }
578
- ) }, `condition-${s}`))
578
+ ) }, `condition-${d}`))
579
579
  }
580
580
  ) })
581
581
  ] });
582
582
  }, Le = b.div`
583
583
  border-radius: 8px;
584
- border: 1px solid ${x.palette.neutral.N30};
584
+ border: 1px solid ${y.palette.neutral.N30};
585
585
  box-sizing: border-box;
586
586
  display: flex;
587
587
  flex-direction: column;
@@ -610,21 +610,21 @@ b.div`
610
610
  border-radius: 8px;
611
611
  }
612
612
  `;
613
- const _ = (t) => {
614
- const { children: e, controls: n = !0, handleDelete: a, id: r } = t;
615
- return /* @__PURE__ */ i(Le, { children: /* @__PURE__ */ c(d, { direction: "column", gap: "16px", padding: "12px 16px", children: [
613
+ const z = (t) => {
614
+ const { children: e, controls: n = !0, handleDelete: a, id: o } = t;
615
+ return /* @__PURE__ */ i(Le, { children: /* @__PURE__ */ c(s, { direction: "column", gap: "16px", padding: "12px 16px", children: [
616
616
  e,
617
- n && /* @__PURE__ */ c(N, { children: [
617
+ n && /* @__PURE__ */ c(k, { children: [
618
618
  /* @__PURE__ */ i(w, {}),
619
- /* @__PURE__ */ i(d, { gap: "16px", justifyContent: "end", children: /* @__PURE__ */ i(
620
- Q,
619
+ /* @__PURE__ */ i(s, { gap: "16px", justifyContent: "end", children: /* @__PURE__ */ i(
620
+ W,
621
621
  {
622
622
  cursorHover: !0,
623
623
  appearance: "dark",
624
624
  size: "24px",
625
- icon: /* @__PURE__ */ i(re, {}),
625
+ icon: /* @__PURE__ */ i(oe, {}),
626
626
  onClick: () => {
627
- a(r);
627
+ a(o);
628
628
  }
629
629
  }
630
630
  ) })
@@ -638,7 +638,7 @@ const _ = (t) => {
638
638
  `, Ie = b.div`
639
639
  background-color: ${({ theme: t }) => {
640
640
  var e, n;
641
- return ((n = (e = t == null ? void 0 : t.palette) == null ? void 0 : e.neutral) == null ? void 0 : n.N0) || x.palette.neutral.N0;
641
+ return ((n = (e = t == null ? void 0 : t.palette) == null ? void 0 : e.neutral) == null ? void 0 : n.N0) || y.palette.neutral.N0;
642
642
  }};
643
643
  max-width: 450px;
644
644
  max-height: 90vh;
@@ -667,20 +667,20 @@ const _ = (t) => {
667
667
  border-radius: 8px;
668
668
  }
669
669
  `, Re = (t) => {
670
- const { children: e, portalId: n, onCloseModal: a, title: r } = t, o = document.getElementById(n);
671
- if (!o)
670
+ const { children: e, portalId: n, onCloseModal: a, title: o } = t, r = document.getElementById(n);
671
+ if (!r)
672
672
  throw new Error(
673
673
  "The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
674
674
  );
675
- return de(
676
- /* @__PURE__ */ i(Ve, { children: /* @__PURE__ */ i(se, { children: /* @__PURE__ */ i(Ie, { children: /* @__PURE__ */ c(d, { direction: "column", gap: "24px", children: [
677
- /* @__PURE__ */ i(d, { direction: "column", gap: "24px", children: /* @__PURE__ */ c(d, { alignItems: "center", justifyContent: "space-between", children: [
678
- /* @__PURE__ */ i(f, { type: "title", size: "large", appearance: "dark", weight: "bold", children: r }),
679
- /* @__PURE__ */ i(oe, { size: "24px", cursor: "pointer", onClick: a })
675
+ return se(
676
+ /* @__PURE__ */ i(Ve, { children: /* @__PURE__ */ i(de, { children: /* @__PURE__ */ i(Ie, { children: /* @__PURE__ */ c(s, { direction: "column", gap: "24px", children: [
677
+ /* @__PURE__ */ i(s, { direction: "column", gap: "24px", children: /* @__PURE__ */ c(s, { alignItems: "center", justifyContent: "space-between", children: [
678
+ /* @__PURE__ */ i(f, { type: "title", size: "large", appearance: "dark", weight: "bold", children: o }),
679
+ /* @__PURE__ */ i(re, { size: "24px", cursor: "pointer", onClick: a })
680
680
  ] }) }),
681
681
  e
682
682
  ] }) }) }) }),
683
- o
683
+ r
684
684
  );
685
685
  }, Ue = ne`
686
686
  from {
@@ -691,7 +691,7 @@ const _ = (t) => {
691
691
  opacity: 1;
692
692
  transform: translateY(0);
693
693
  }
694
- `, W = b.div`
694
+ `, K = b.div`
695
695
  width: 100%;
696
696
  height: 100%;
697
697
  & > div {
@@ -700,7 +700,7 @@ const _ = (t) => {
700
700
  `;
701
701
  b.div`
702
702
  border-radius: 8px;
703
- border: 1px solid ${x.palette.neutral.N30};
703
+ border: 1px solid ${y.palette.neutral.N30};
704
704
  box-sizing: border-box;
705
705
  display: flex;
706
706
  flex-direction: column;
@@ -733,16 +733,16 @@ const _e = b.div`
733
733
  `, $e = b.div`
734
734
  & > div > div {
735
735
  border-radius: 8px;
736
- border: 1px solid ${x.palette.neutral.N30};
736
+ border: 1px solid ${y.palette.neutral.N30};
737
737
  box-sizing: border-box;
738
738
  box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
739
739
  }
740
740
  `, ze = b.div`
741
741
  & > div {
742
- background-color: ${x.palette.neutral.N30};
742
+ background-color: ${y.palette.neutral.N10};
743
743
  justify-content: center;
744
744
  }
745
- min-height: 300px;
745
+ min-height: 350px;
746
746
  width: 100%;
747
747
  height: 100%;
748
748
  padding-bottom: 12px;
@@ -750,7 +750,7 @@ const _e = b.div`
750
750
  b.div`
751
751
  & > div {
752
752
  border-radius: 8px;
753
- border: 1px solid ${x.palette.neutral.N30};
753
+ border: 1px solid ${y.palette.neutral.N30};
754
754
  }
755
755
  `;
756
756
  function qe({
@@ -758,14 +758,14 @@ function qe({
758
758
  handleOpenModal: e
759
759
  }) {
760
760
  return /* @__PURE__ */ i(
761
- _,
761
+ z,
762
762
  {
763
763
  id: `loading-card-${t}`,
764
764
  handleDelete: () => {
765
765
  },
766
766
  handleView: () => e ? e() : null,
767
767
  controls: !1,
768
- children: /* @__PURE__ */ i(Y, { loading: !0 })
768
+ children: /* @__PURE__ */ i(J, { loading: !0 })
769
769
  },
770
770
  `loading-card-${t}`
771
771
  );
@@ -775,43 +775,44 @@ function Oe({
775
775
  controls: e,
776
776
  handleOpenModal: n,
777
777
  handleDelete: a,
778
- textValues: r
778
+ textValues: o
779
779
  }) {
780
- return t ? /* @__PURE__ */ i(W, { children: /* @__PURE__ */ c(d, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
780
+ return t ? /* @__PURE__ */ i(K, { children: /* @__PURE__ */ c(s, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
781
781
  /* @__PURE__ */ i(f, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: t.decisionId }),
782
782
  /* @__PURE__ */ i(
783
- _,
783
+ z,
784
784
  {
785
785
  id: t.decisionId,
786
786
  handleDelete: () => a ? a(t.decisionId) : null,
787
787
  handleView: () => n ? n(t) : null,
788
788
  controls: e,
789
- children: /* @__PURE__ */ i(Y, { decision: t, textValues: r })
789
+ children: /* @__PURE__ */ i(J, { decision: t, textValues: o })
790
790
  }
791
791
  )
792
792
  ] }) }, t.decisionId) : null;
793
793
  }
794
794
  function je({
795
795
  index: t,
796
- handleOpenModal: e
796
+ handleOpenModal: e,
797
+ customTitleContentAddCard: n
797
798
  }) {
798
- return /* @__PURE__ */ i(W, { children: /* @__PURE__ */ c(d, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
799
+ return /* @__PURE__ */ i(K, { children: /* @__PURE__ */ c(s, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
799
800
  /* @__PURE__ */ i(f, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: "Nueva decisión" }),
800
801
  /* @__PURE__ */ i(
801
802
  ze,
802
803
  {
803
804
  onClick: () => e ? e() : null,
804
805
  children: /* @__PURE__ */ i(
805
- _,
806
+ z,
806
807
  {
807
808
  id: `add-decision-${t}`,
808
809
  handleDelete: () => {
809
810
  },
810
811
  handleView: () => e ? e() : null,
811
812
  controls: !1,
812
- children: /* @__PURE__ */ c(d, { direction: "column", gap: "12px", alignItems: "center", children: [
813
- /* @__PURE__ */ i(Q, { appearance: "gray", icon: /* @__PURE__ */ i(le, {}), size: "35px" }),
814
- /* @__PURE__ */ i(f, { appearance: "gray", type: "body", size: "large", children: "Agregar decisión" })
813
+ children: /* @__PURE__ */ c(s, { direction: "column", gap: "12px", alignItems: "center", children: [
814
+ /* @__PURE__ */ i(W, { appearance: "gray", icon: /* @__PURE__ */ i(le, {}), size: "35px" }),
815
+ /* @__PURE__ */ i(f, { appearance: "gray", type: "body", size: "large", children: n || "Agregar decisión" })
815
816
  ] })
816
817
  }
817
818
  )
@@ -824,67 +825,75 @@ const He = {
824
825
  decision: Oe,
825
826
  add: je
826
827
  };
827
- function R(t) {
828
+ function _(t) {
828
829
  const { type: e } = t, n = He[e];
829
830
  return n ? n(t) : null;
830
831
  }
831
832
  function Me({
832
833
  controls: t,
833
- decisions: e,
834
- loading: n,
835
- handleOpenModal: a,
834
+ customTitleContentAddCard: e,
835
+ decisions: n,
836
+ loading: a,
837
+ handleOpenModal: o,
836
838
  handleDelete: r,
837
- textValues: o
839
+ textValues: d
838
840
  }) {
839
- const s = n ? Array.from({ length: 3 }).map(
840
- (u, l) => R({
841
+ const u = a ? Array.from({ length: 3 }).map(
842
+ (l, p) => _({
841
843
  type: "loading",
842
- index: l,
844
+ index: p,
843
845
  controls: t,
844
- loading: n,
845
- handleOpenModal: a,
846
+ customTitleContentAddCard: e,
847
+ loading: a,
848
+ handleOpenModal: o,
846
849
  handleDelete: r,
847
- textValues: o
850
+ textValues: d
848
851
  })
849
- ) : e.map(
850
- (u) => R({
852
+ ) : n.map(
853
+ (l) => _({
851
854
  type: "decision",
852
- decision: u,
855
+ decision: l,
853
856
  controls: t,
854
- loading: n,
855
- handleOpenModal: a,
857
+ customTitleContentAddCard: e,
858
+ loading: a,
859
+ handleOpenModal: o,
856
860
  handleDelete: r,
857
- textValues: o
861
+ textValues: d
858
862
  })
859
- ), h = (e.length === 0 || e.length < Math.floor(window.innerWidth / 300)) && !n && t;
860
- return { renderedCards: s, shouldRenderAddCard: h };
863
+ ), h = (n.length === 0 || n.length < Math.floor(window.innerWidth / 300)) && !a && t;
864
+ return { renderedCards: u, shouldRenderAddCard: h };
861
865
  }
862
866
  const gt = (t) => {
863
867
  const {
864
868
  controls: e = !0,
865
- decisions: n,
866
- textValues: a,
867
- decisionTemplate: r,
868
- isModalOpen: o,
869
- selectedDecision: s,
870
- loading: h,
871
- handleOpenModal: u,
872
- handleCloseModal: l,
873
- handleSubmitForm: p,
874
- handleDelete: m
875
- } = t, g = he("(max-width: 681px)"), { renderedCards: k, shouldRenderAddCard: S } = Me({
869
+ customTitleContentAddCard: n,
870
+ customMessageEmptyDecisions: a,
871
+ decisions: o,
872
+ textValues: r,
873
+ decisionTemplate: d,
874
+ isModalOpen: u,
875
+ selectedDecision: h,
876
+ loading: l,
877
+ handleOpenModal: p,
878
+ handleCloseModal: m,
879
+ handleSubmitForm: g,
880
+ handleDelete: C
881
+ } = t, S = he("(max-width: 681px)"), { renderedCards: V, shouldRenderAddCard: I } = Me({
876
882
  controls: e,
877
- decisions: n,
878
- loading: h,
879
- handleOpenModal: u,
880
- handleDelete: m,
881
- textValues: a
883
+ customTitleContentAddCard: n,
884
+ decisions: o,
885
+ loading: l,
886
+ handleOpenModal: p,
887
+ handleDelete: C,
888
+ textValues: r
882
889
  });
883
- return /* @__PURE__ */ c(N, { children: [
884
- /* @__PURE__ */ i($e, { children: /* @__PURE__ */ i(_e, { children: /* @__PURE__ */ c(d, { direction: "column", gap: "16px", padding: "6px", children: [
885
- n.length === 0 && !h && /* @__PURE__ */ c(f, { as: "span", type: "label", size: "large", appearance: "gray", children: [
886
- "Aún no tienes definidas tasas de interés efectivas. Presiona",
887
- /* @__PURE__ */ i(
890
+ return /* @__PURE__ */ c(k, { children: [
891
+ /* @__PURE__ */ i($e, { children: /* @__PURE__ */ i(_e, { children: /* @__PURE__ */ c(s, { direction: "column", gap: "16px", padding: "6px", children: [
892
+ o.length === 0 && !l && /* @__PURE__ */ c(f, { as: "span", type: "label", size: "large", appearance: "gray", children: [
893
+ a || "Aún NO tienes definidas tasas de interés efectivas",
894
+ ". Presiona",
895
+ " ",
896
+ /* @__PURE__ */ c(
888
897
  f,
889
898
  {
890
899
  as: "span",
@@ -892,9 +901,14 @@ const gt = (t) => {
892
901
  size: "large",
893
902
  appearance: "gray",
894
903
  weight: "bold",
895
- children: "“+ Agregar decisión”"
904
+ children: [
905
+ "“",
906
+ n || "+ Agregar decisión",
907
+ "”"
908
+ ]
896
909
  }
897
910
  ),
911
+ " ",
898
912
  "para empezar."
899
913
  ] }),
900
914
  /* @__PURE__ */ c(
@@ -908,35 +922,36 @@ const gt = (t) => {
908
922
  autoRows: "1fr",
909
923
  justifyItems: "center",
910
924
  padding: "6px",
911
- height: g ? "auto" : "484px",
925
+ height: S ? "auto" : "484px",
912
926
  children: [
913
- k,
914
- S && R({
927
+ V,
928
+ I && _({
915
929
  type: "add",
916
- index: n.length,
930
+ index: o.length,
917
931
  controls: e,
918
- loading: h,
919
- handleOpenModal: u,
920
- handleDelete: m,
921
- textValues: a
932
+ customTitleContentAddCard: n,
933
+ loading: l,
934
+ handleOpenModal: p,
935
+ handleDelete: C,
936
+ textValues: r
922
937
  })
923
938
  ]
924
939
  }
925
940
  )
926
941
  ] }) }) }),
927
- o && /* @__PURE__ */ i(
942
+ u && /* @__PURE__ */ i(
928
943
  Re,
929
944
  {
930
945
  portalId: "modal-portal",
931
- onCloseModal: l,
932
- title: s ? "Editar Decisión" : "Nueva decisión",
946
+ onCloseModal: m,
947
+ title: h ? "Editar Decisión" : "Nueva decisión",
933
948
  children: /* @__PURE__ */ i(
934
949
  we,
935
950
  {
936
- decision: s || r,
937
- onSubmitEvent: p,
938
- textValues: a,
939
- onCancel: () => l ? l() : () => {
951
+ decision: h || d,
952
+ onSubmitEvent: g,
953
+ textValues: r,
954
+ onCancel: () => m ? m() : () => {
940
955
  }
941
956
  }
942
957
  )
@@ -946,7 +961,7 @@ const gt = (t) => {
946
961
  }, bt = (t) => {
947
962
  var a;
948
963
  const e = { ...t }, n = (a = e.conditionThatEstablishesTheDecision) == null ? void 0 : a.find(
949
- (r) => r.switchPlaces
964
+ (o) => o.switchPlaces
950
965
  );
951
966
  return n ? {
952
967
  ...e,
@@ -956,13 +971,13 @@ const gt = (t) => {
956
971
  value: n.value,
957
972
  howToSetTheDecision: n.howToSetTheCondition,
958
973
  conditionThatEstablishesTheDecision: e.conditionThatEstablishesTheDecision.map(
959
- (r) => r.conditionName === n.conditionName ? { ...r, hidden: !0 } : r
974
+ (o) => o.conditionName === n.conditionName ? { ...o, hidden: !0 } : o
960
975
  )
961
976
  } : e;
962
977
  }, Tt = (t) => t.map((e) => {
963
978
  var a;
964
979
  const n = (a = e.conditionThatEstablishesTheDecision) == null ? void 0 : a.find(
965
- (r) => r.switchPlaces
980
+ (o) => o.switchPlaces
966
981
  );
967
982
  return n ? {
968
983
  ...e,
@@ -972,7 +987,7 @@ const gt = (t) => {
972
987
  value: n.value,
973
988
  howToSetTheDecision: n.howToSetTheCondition,
974
989
  conditionThatEstablishesTheDecision: e.conditionThatEstablishesTheDecision.map(
975
- (r) => r.conditionName === n.conditionName ? { ...r, hidden: !0 } : r
990
+ (o) => o.conditionName === n.conditionName ? { ...o, hidden: !0 } : o
976
991
  )
977
992
  } : e;
978
993
  }), ft = (t, e) => {
@@ -991,10 +1006,10 @@ const gt = (t) => {
991
1006
  (a) => a.hidden ? { ...n } : a
992
1007
  )
993
1008
  };
994
- }, yt = (t) => t.map((e) => {
1009
+ }, vt = (t) => t.map((e) => {
995
1010
  var a;
996
1011
  const n = (a = e.conditionThatEstablishesTheDecision) == null ? void 0 : a.find(
997
- (r) => r.hidden
1012
+ (o) => o.hidden
998
1013
  );
999
1014
  return n ? {
1000
1015
  ...e,
@@ -1004,18 +1019,18 @@ const gt = (t) => {
1004
1019
  value: e.value,
1005
1020
  howToSetTheDecision: e.howToSetTheDecision,
1006
1021
  conditionThatEstablishesTheDecision: e.conditionThatEstablishesTheDecision.map(
1007
- (r) => r.hidden ? { ...n, hidden: !1 } : r
1022
+ (o) => o.hidden ? { ...n, hidden: !1 } : o
1008
1023
  )
1009
1024
  } : e;
1010
1025
  });
1011
1026
  export {
1012
- _ as BusinessRuleCard,
1013
- Y as BusinessRuleView,
1027
+ z as BusinessRuleCard,
1028
+ J as BusinessRuleView,
1014
1029
  gt as BusinessRules,
1015
1030
  Re as ModalRules,
1016
1031
  we as RulesForm,
1017
1032
  ft as revertSortedDataSampleSwitchPlaces,
1018
- yt as revertSortedDataSwitchPlaces,
1033
+ vt as revertSortedDataSwitchPlaces,
1019
1034
  bt as sortDisplayDataSampleSwitchPlaces,
1020
1035
  Tt as sortDisplayDataSwitchPlaces
1021
1036
  };
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  ],
11
11
  "description": "",
12
12
  "private": false,
13
- "version": "0.1.34",
13
+ "version": "0.1.35",
14
14
  "type": "module",
15
15
  "exports": {
16
16
  ".": {