@isettingkit/business-rules 0.1.3 → 0.1.5

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.
@@ -34,11 +34,11 @@ export declare interface IBusinessRuleView {
34
34
  }
35
35
 
36
36
  export declare interface IRulesForm {
37
+ id: string;
37
38
  decision: IRuleDecision;
38
39
  onCloseModal: () => void;
39
40
  onCancel: () => void;
40
41
  onSubmitEvent: (dataDecision: IRuleDecision) => void;
41
- portalId: string;
42
42
  textValues: {
43
43
  selectOptions: string;
44
44
  selectOption: string;
package/dist/index.es.js CHANGED
@@ -1,91 +1,92 @@
1
- import { jsxs as o, jsx as e, Fragment as E } from "react/jsx-runtime";
2
- import { useState as D, useEffect as L } from "react";
3
- import { useFormik as U } from "formik";
4
- import { Divider as k } from "@inubekit/divider";
1
+ import { jsxs as l, jsx as e, Fragment as F } from "react/jsx-runtime";
2
+ import { useState as S, useEffect as N } from "react";
3
+ import { useFormik as R } from "formik";
4
+ import { Divider as T } from "@inubekit/divider";
5
5
  import { Stack as a } from "@inubekit/stack";
6
- import { Text as b } from "@inubekit/text";
7
- import { Toggle as O } from "@inubekit/toggle";
6
+ import { Text as x } from "@inubekit/text";
7
+ import { Toggle as U } from "@inubekit/toggle";
8
8
  import { Textarea as $ } from "@inubekit/textarea";
9
- import { Date as V } from "@inubekit/date";
10
- import { Checkbox as N } from "@inubekit/checkbox";
11
- import { DecisionConditionRenderer as j, ValueValidationSchema as R, ValueHowToSetUp as F, ValueDataType as H } from "@isettingkit/input";
12
- import { DecisionViewConditionRenderer as S } from "@isettingkit/view";
13
- import { MdOutlineRemoveRedEye as I, MdOutlineDelete as q } from "react-icons/md";
14
- import { Icon as M } from "@inubekit/icon";
15
- import { inube as B } from "@inubekit/foundations";
16
- import A from "styled-components";
17
- const Q = (l) => {
9
+ import { Date as j } from "@inubekit/date";
10
+ import { Checkbox as _ } from "@inubekit/checkbox";
11
+ import { DecisionConditionRenderer as A, ValueValidationSchema as q, ValueHowToSetUp as y, ValueDataType as L } from "@isettingkit/input";
12
+ import { Button as O } from "@inubekit/button";
13
+ import { DecisionViewConditionRenderer as V } from "@isettingkit/view";
14
+ import { MdOutlineRemoveRedEye as B, MdOutlineDelete as Q } from "react-icons/md";
15
+ import { Icon as H } from "@inubekit/icon";
16
+ import { inube as G } from "@inubekit/foundations";
17
+ import I from "styled-components";
18
+ const P = (i) => {
18
19
  const {
19
20
  label: n,
20
- labelText: r,
21
- onHandleChange: i,
22
- placeholder: h,
23
- required: u,
24
- value: d = ""
25
- } = l, [c, g] = D(d);
26
- return /* @__PURE__ */ o(a, { direction: "column", margin: "10px 4px", children: [
27
- /* @__PURE__ */ e(b, { size: "large", appearance: "gray", weight: "bold", margin: "10px 0", children: r }),
21
+ labelText: o,
22
+ onHandleChange: d,
23
+ placeholder: c,
24
+ required: s,
25
+ value: h = ""
26
+ } = i, [r, g] = S(h);
27
+ return /* @__PURE__ */ l(a, { direction: "column", margin: "10px 4px", children: [
28
+ /* @__PURE__ */ e(x, { size: "large", appearance: "gray", weight: "bold", margin: "10px 0", children: o }),
28
29
  /* @__PURE__ */ e(a, { margin: "10px 0", children: /* @__PURE__ */ e(
29
30
  $,
30
31
  {
31
32
  id: "reasonChange",
32
33
  label: n,
33
- onChange: (p) => {
34
- g(p.target.value), i(p);
34
+ onChange: (u) => {
35
+ g(u.target.value), d(u);
35
36
  },
36
- placeholder: h,
37
- required: u,
38
- value: c,
37
+ placeholder: c,
38
+ required: s,
39
+ value: r,
39
40
  maxLength: 120,
40
41
  fullwidth: !0
41
42
  }
42
43
  ) })
43
44
  ] });
44
- }, P = (l) => {
45
+ }, Z = (i) => {
45
46
  const {
46
47
  checked: n,
47
- children: r,
48
- handleToggleChange: i,
49
- id: h,
50
- labelToggle: u,
51
- name: d,
52
- valueToggle: c = ""
53
- } = l, [g, C] = D(n), p = (f) => {
54
- C(f.target.checked), i(f);
48
+ children: o,
49
+ handleToggleChange: d,
50
+ id: c,
51
+ labelToggle: s,
52
+ name: h,
53
+ valueToggle: r = ""
54
+ } = i, [g, m] = S(n), u = (f) => {
55
+ m(f.target.checked), d(f);
55
56
  };
56
- return L(() => {
57
- C(n);
58
- }, [n]), /* @__PURE__ */ o(E, { children: [
57
+ return N(() => {
58
+ m(n);
59
+ }, [n]), /* @__PURE__ */ l(F, { children: [
59
60
  /* @__PURE__ */ e(
60
- O,
61
+ U,
61
62
  {
62
63
  checked: g,
63
- id: h,
64
+ id: c,
64
65
  margin: "10px",
65
- name: d,
66
- onChange: p,
66
+ name: h,
67
+ onChange: u,
67
68
  size: "small",
68
- value: c,
69
- children: /* @__PURE__ */ e(b, { size: "medium", type: "label", weight: "bold", children: u })
69
+ value: r,
70
+ children: /* @__PURE__ */ e(x, { size: "medium", type: "label", weight: "bold", children: s })
70
71
  }
71
72
  ),
72
- g && /* @__PURE__ */ e(E, { children: r })
73
+ g && /* @__PURE__ */ e(F, { children: o })
73
74
  ] });
74
- }, Z = (l) => {
75
+ }, J = (i) => {
75
76
  const {
76
77
  onHandleStartChange: n,
77
- onHandleEndChange: r,
78
- labelStart: i,
79
- labelEnd: h,
80
- checkedClosed: u = !1,
81
- required: d = !1,
82
- valueStart: c = "",
78
+ onHandleEndChange: o,
79
+ labelStart: d,
80
+ labelEnd: c,
81
+ checkedClosed: s = !1,
82
+ required: h = !1,
83
+ valueStart: r = "",
83
84
  valueEnd: g = ""
84
- } = l, [C, p] = D(u), [f, w] = D(c), [v, m] = D(g);
85
- return /* @__PURE__ */ o(E, { children: [
86
- /* @__PURE__ */ o(a, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
85
+ } = i, [m, u] = S(s), [f, v] = S(r), [w, k] = S(g);
86
+ return /* @__PURE__ */ l(F, { children: [
87
+ /* @__PURE__ */ l(a, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
87
88
  /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e(
88
- b,
89
+ x,
89
90
  {
90
91
  appearance: "gray",
91
92
  margin: "10px 0",
@@ -103,74 +104,76 @@ const Q = (l) => {
103
104
  wrap: "wrap",
104
105
  gap: "4px",
105
106
  children: /* @__PURE__ */ e(
106
- N,
107
+ _,
107
108
  {
108
109
  label: "Cerrada",
109
- onChange: ({ target: x }) => {
110
- p(x.checked);
110
+ onChange: ({ target: t }) => {
111
+ u(t.checked);
111
112
  },
112
- checked: C,
113
+ checked: m,
113
114
  value: ""
114
115
  }
115
116
  )
116
117
  }
117
118
  )
118
119
  ] }),
119
- /* @__PURE__ */ o(a, { justifyContent: "space-between", gap: "24px", children: [
120
+ /* @__PURE__ */ l(a, { justifyContent: "space-between", gap: "24px", children: [
120
121
  /* @__PURE__ */ e(a, { width: "189px", children: /* @__PURE__ */ e(
121
- V,
122
+ j,
122
123
  {
123
124
  id: "dateStart",
124
- label: i,
125
- onChange: (x) => {
126
- w(x.target.value), n(x);
125
+ label: d,
126
+ onChange: (t) => {
127
+ v(t.target.value), n(t);
127
128
  },
128
129
  value: f,
129
- required: d,
130
+ required: h,
130
131
  size: "compact"
131
132
  }
132
133
  ) }),
133
- C && /* @__PURE__ */ e(a, { width: "189px", children: /* @__PURE__ */ e(
134
- V,
134
+ m && /* @__PURE__ */ e(a, { width: "189px", children: /* @__PURE__ */ e(
135
+ j,
135
136
  {
136
137
  id: "dateEnd",
137
- label: h,
138
- onChange: (x) => {
139
- m(x.target.value), r(x);
138
+ label: c,
139
+ onChange: (t) => {
140
+ k(t.target.value), o(t);
140
141
  },
141
- value: v,
142
- required: d,
142
+ value: w,
143
+ required: h,
143
144
  size: "compact"
144
145
  }
145
146
  ) })
146
147
  ] })
147
148
  ] });
148
- }, G = (l) => {
149
- var m;
149
+ }, K = (i) => {
150
+ var D;
150
151
  const {
151
152
  decision: n,
152
- formik: r,
153
- onChangeCondition: i,
154
- onChangeDecision: h,
155
- onStartChange: u,
156
- onEndChange: d,
157
- textValues: c
158
- } = l, [g, C] = D(!1), [, p] = D(!0), f = (t) => {
159
- C(t.target.checked);
160
- }, w = (t) => {
161
- t.target.value ? p(!1) : p(!0);
162
- }, v = (t, s) => t.errors[s] ? "invalid" : "pending";
163
- return /* @__PURE__ */ o(a, { direction: "column", gap: "24px", children: [
164
- /* @__PURE__ */ o(a, { direction: "column", gap: "16", children: [
165
- /* @__PURE__ */ e(b, { weight: "bold", size: "medium", children: c.criteria }),
153
+ formik: o,
154
+ onChangeCondition: d,
155
+ onChangeDecision: c,
156
+ onStartChange: s,
157
+ onEndChange: h,
158
+ textValues: r,
159
+ onCancel: g,
160
+ onSubmit: m
161
+ } = i, [u, f] = S(!1), [v, w] = S(!0), k = (t) => {
162
+ f(t.target.checked);
163
+ }, C = (t) => {
164
+ t.target.value ? w(!1) : w(!0);
165
+ }, p = (t, b) => t.errors[b] ? "invalid" : "pending";
166
+ return /* @__PURE__ */ l(a, { direction: "column", gap: "24px", children: [
167
+ /* @__PURE__ */ l(a, { direction: "column", gap: "16", children: [
168
+ /* @__PURE__ */ e(x, { weight: "bold", size: "medium", children: r.criteria }),
166
169
  n.decision && /* @__PURE__ */ e(
167
- j,
170
+ A,
168
171
  {
169
172
  element: n.decision,
170
- onDecision: h,
171
- valueData: r.values[n.decision.name],
172
- message: r.errors[n.decision.name],
173
- status: v(r, n.decision.name),
173
+ onDecision: c,
174
+ valueData: o.values[n.decision.name],
175
+ message: o.errors[n.decision.name],
176
+ status: p(o, n.decision.name),
174
177
  textValues: {
175
178
  selectOptions: "Select an option",
176
179
  selectOption: "Option selected",
@@ -180,27 +183,27 @@ const Q = (l) => {
180
183
  }
181
184
  )
182
185
  ] }),
183
- /* @__PURE__ */ e(k, { dashed: !0 }),
184
- /* @__PURE__ */ o(a, { direction: "column", children: [
185
- /* @__PURE__ */ o(a, { direction: "row", gap: "16px", justifyContent: "space-between", children: [
186
- /* @__PURE__ */ e(b, { children: c.FactsThatConditionIt }),
186
+ /* @__PURE__ */ e(T, { dashed: !0 }),
187
+ /* @__PURE__ */ l(a, { direction: "column", children: [
188
+ /* @__PURE__ */ l(a, { direction: "row", gap: "16px", justifyContent: "space-between", children: [
189
+ /* @__PURE__ */ e(x, { children: r.FactsThatConditionIt }),
187
190
  /* @__PURE__ */ e(
188
- O,
191
+ U,
189
192
  {
190
193
  id: "toogleNone",
191
- onChange: f,
192
- checked: g,
194
+ onChange: k,
195
+ checked: u,
193
196
  size: "small",
194
- children: /* @__PURE__ */ e(b, { size: "medium", type: "label", weight: "bold", children: c.none })
197
+ children: /* @__PURE__ */ e(x, { size: "medium", type: "label", weight: "bold", children: r.none })
195
198
  }
196
199
  )
197
200
  ] }),
198
201
  n.conditions && n.conditions.map((t) => /* @__PURE__ */ e(a, { direction: "column", children: /* @__PURE__ */ e(
199
- P,
202
+ Z,
200
203
  {
201
- checked: !g,
202
- handleToggleChange: (s) => {
203
- s.target.checked || i(
204
+ checked: !u,
205
+ handleToggleChange: (b) => {
206
+ b.target.checked || d(
204
207
  {
205
208
  value: "",
206
209
  rangeTo: 0,
@@ -214,165 +217,196 @@ const Q = (l) => {
214
217
  labelToggle: t.name.split(/(?=[A-Z])/).join(" "),
215
218
  name: t.name.replace(" ", ""),
216
219
  children: /* @__PURE__ */ e(
217
- j,
220
+ A,
218
221
  {
219
222
  element: t,
220
- onDecision: i,
221
- valueData: r.values[t.name],
222
- message: r.errors[t.name],
223
- status: v(r, t.name),
223
+ onDecision: d,
224
+ valueData: o.values[t.name],
225
+ message: o.errors[t.name],
226
+ status: p(o, t.name),
224
227
  textValues: {
225
228
  selectOptions: "Select an option",
226
229
  selectOption: "Option selected",
227
- rangeMin: (s) => `Minimum ${s}`,
228
- rangeMax: (s) => `Maximum ${s}`
230
+ rangeMin: (b) => `Minimum ${b}`,
231
+ rangeMax: (b) => `Maximum ${b}`
229
232
  }
230
233
  }
231
234
  )
232
235
  }
233
236
  ) }, t.name))
234
237
  ] }),
235
- /* @__PURE__ */ e(k, { dashed: !0 }),
238
+ /* @__PURE__ */ e(T, { dashed: !0 }),
236
239
  /* @__PURE__ */ e(a, { direction: "column", children: /* @__PURE__ */ e(
237
- Q,
240
+ P,
238
241
  {
239
- label: c.reasonForChange,
240
- labelText: c.change,
241
- onHandleChange: w,
242
- placeholder: c.changePlaceholder,
242
+ label: r.reasonForChange,
243
+ labelText: r.change,
244
+ onHandleChange: C,
245
+ placeholder: r.changePlaceholder,
243
246
  required: !0
244
247
  }
245
248
  ) }),
246
- /* @__PURE__ */ e(k, { dashed: !0 }),
249
+ /* @__PURE__ */ e(T, { dashed: !0 }),
247
250
  /* @__PURE__ */ e(a, { direction: "column", children: n.decision && /* @__PURE__ */ e(
248
- Z,
251
+ J,
249
252
  {
250
- onHandleStartChange: (t) => u(t.target.value),
251
- onHandleEndChange: (t) => d(t.target.value),
252
- labelStart: c.termStart,
253
- labelEnd: c.termEnd,
253
+ onHandleStartChange: (t) => s(t.target.value),
254
+ onHandleEndChange: (t) => h(t.target.value),
255
+ labelStart: r.termStart,
256
+ labelEnd: r.termEnd,
254
257
  checkedClosed: !!n.decision.endDate,
255
258
  valueStart: n.decision.startDate.toLocaleDateString(
256
259
  "en-CA"
257
260
  ),
258
- valueEnd: ((m = n.decision.endDate) == null ? void 0 : m.toLocaleDateString("en-CA")) || ""
261
+ valueEnd: ((D = n.decision.endDate) == null ? void 0 : D.toLocaleDateString("en-CA")) || ""
259
262
  }
260
- ) })
263
+ ) }),
264
+ /* @__PURE__ */ e(T, { dashed: !0 }),
265
+ /* @__PURE__ */ l(a, { direction: "row", justifyContent: "end", gap: "16px", children: [
266
+ /* @__PURE__ */ e(O, { appearance: "gray", onClick: g, children: r.cancel }),
267
+ /* @__PURE__ */ e(
268
+ O,
269
+ {
270
+ onClick: m,
271
+ disabled: v || !o.isValid,
272
+ type: "submit",
273
+ children: r.confirm
274
+ }
275
+ )
276
+ ] })
261
277
  ] });
262
- }, T = (l, n, r) => ({
263
- ...l,
264
- decision: { ...l.decision, [n]: r }
265
- }), me = (l) => {
266
- const { decision: n, onCancel: r, onSubmitEvent: i, textValues: h } = l, [u, d] = D(n), c = (m, t) => {
267
- d((s) => {
268
- var x;
269
- const z = (x = s == null ? void 0 : s.conditions) == null ? void 0 : x.map((y) => y.name === t ? { ...y, value: m } : y);
270
- return { ...s, conditions: z };
278
+ }, z = (i, n, o) => ({
279
+ ...i,
280
+ decision: { ...i.decision, [n]: o }
281
+ }), Ce = (i) => {
282
+ const { id: n, decision: o, onCancel: d, onSubmitEvent: c, textValues: s } = i, [h, r] = S(o), g = (C, p) => {
283
+ r((D) => {
284
+ var b;
285
+ const t = (b = D == null ? void 0 : D.conditions) == null ? void 0 : b.map((E) => E.name === p ? { ...E, value: C } : E);
286
+ return { ...D, conditions: t };
271
287
  });
272
- }, g = (m) => {
273
- d(
274
- (t) => T(t, "value", m)
288
+ }, m = (C) => {
289
+ r(
290
+ (p) => z(p, "value", C)
275
291
  );
276
- }, C = (m) => {
277
- d(
278
- (t) => T(t, "startDate", new Date(m))
292
+ }, u = (C) => {
293
+ r(
294
+ (p) => z(p, "startDate", new Date(C))
279
295
  );
280
- }, p = (m) => {
281
- d(
282
- (t) => T(t, "endDate", new Date(m))
296
+ }, f = (C) => {
297
+ r(
298
+ (p) => z(p, "endDate", new Date(C))
283
299
  );
284
- }, { validationSchema: f, initialValues: w } = R(u), v = U({
300
+ }, { validationSchema: v, initialValues: w } = q(h), k = R({
285
301
  initialValues: w,
286
- validationSchema: f,
302
+ validationSchema: v,
287
303
  validateOnChange: !1,
288
- onSubmit: async () => !0
304
+ onSubmit: () => {
305
+ c(h);
306
+ }
289
307
  });
290
308
  return /* @__PURE__ */ e(
291
- G,
309
+ K,
292
310
  {
293
- formik: v,
294
- decision: u,
295
- onCancel: r,
296
- onSubmit: () => i(u),
297
- onChangeCondition: c,
298
- onChangeDecision: g,
299
- onStartChange: C,
300
- onEndChange: p,
301
- textValues: h
311
+ id: n,
312
+ formik: k,
313
+ decision: h,
314
+ onCancel: d,
315
+ onSubmit: () => c(h),
316
+ onChangeCondition: g,
317
+ onChangeDecision: m,
318
+ onStartChange: u,
319
+ onEndChange: f,
320
+ textValues: s
302
321
  }
303
322
  );
304
- }, ue = (l) => {
305
- const { decision: n, textValues: r } = l;
306
- return /* @__PURE__ */ o(a, { direction: "column", gap: "24px", children: [
307
- /* @__PURE__ */ o(a, { direction: "column", gap: "16px", children: [
308
- /* @__PURE__ */ e(b, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: r.criteria }),
309
- /* @__PURE__ */ e(a, { justifyContent: "space-between", children: n.decisions && n.decisions.map((i) => /* @__PURE__ */ e(
310
- S,
323
+ }, M = (i) => {
324
+ if (!(!i || !i.possibleValue))
325
+ switch (i.howToSetUp) {
326
+ case y.LIST_OF_VALUES_MULTI:
327
+ return i.possibleValue.listSelected;
328
+ case y.LIST_OF_VALUES:
329
+ return i.possibleValue.listSelected ?? i.possibleValue.list;
330
+ case y.RANGE:
331
+ return {
332
+ rangeFrom: i.possibleValue.rangeFrom,
333
+ rangeTo: i.possibleValue.rangeTo
334
+ };
335
+ default:
336
+ return i.possibleValue.value || i.value;
337
+ }
338
+ }, be = (i) => {
339
+ var d, c;
340
+ const { decision: n, textValues: o } = i;
341
+ return /* @__PURE__ */ l(a, { direction: "column", gap: "24px", children: [
342
+ /* @__PURE__ */ l(a, { direction: "column", gap: "16px", children: [
343
+ /* @__PURE__ */ e(x, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: o.criteria }),
344
+ /* @__PURE__ */ e(a, { justifyContent: "space-between", children: n.decision && /* @__PURE__ */ e(a, { direction: "column", children: /* @__PURE__ */ e(
345
+ V,
311
346
  {
312
- element: i,
313
- valueData: i.value
314
- },
315
- i.name
316
- )) })
347
+ element: n.decision,
348
+ valueData: M(n.decision)
349
+ }
350
+ ) }, n.decision.name) })
317
351
  ] }),
318
- /* @__PURE__ */ e(a, { direction: "column", children: /* @__PURE__ */ o(a, { direction: "column", gap: "16px", justifyContent: "space-between", children: [
319
- /* @__PURE__ */ e(b, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: r.FactsThatConditionIt }),
320
- n.conditions && n.conditions.map((i) => /* @__PURE__ */ e(a, { direction: "column", children: /* @__PURE__ */ e(
321
- S,
352
+ /* @__PURE__ */ l(a, { direction: "column", gap: "16px", justifyContent: "space-between", children: [
353
+ /* @__PURE__ */ e(x, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: o.FactsThatConditionIt }),
354
+ n.conditions && n.conditions.map((s) => /* @__PURE__ */ e(a, { direction: "column", children: /* @__PURE__ */ e(
355
+ V,
322
356
  {
323
- element: i,
324
- valueData: i.value
357
+ element: s,
358
+ valueData: M(s)
325
359
  }
326
- ) }, i.name))
327
- ] }) }),
328
- /* @__PURE__ */ o(a, { direction: "column", gap: "12px", children: [
329
- /* @__PURE__ */ e(b, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: r.Terms }),
330
- /* @__PURE__ */ o(a, { justifyContent: "space-between", children: [
331
- n.startDate && /* @__PURE__ */ e(
332
- S,
360
+ ) }, s.name))
361
+ ] }),
362
+ /* @__PURE__ */ l(a, { direction: "column", gap: "12px", children: [
363
+ /* @__PURE__ */ e(x, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: o.Terms }),
364
+ /* @__PURE__ */ l(a, { justifyContent: "space-between", children: [
365
+ ((d = n == null ? void 0 : n.decision) == null ? void 0 : d.startDate) && /* @__PURE__ */ e(
366
+ V,
333
367
  {
334
368
  element: {
335
369
  name: "startDate",
336
- label: r.termStart,
337
- description: r.termStart,
370
+ description: o.termStart,
338
371
  value: String(n.startDate),
339
- howToSetUp: F.EQUAL,
340
- typeData: H.DATE
372
+ howToSetUp: y.EQUAL,
373
+ typeData: L.DATE
341
374
  },
342
- valueData: new Date(n.startDate).toLocaleDateString(
343
- "en-CA"
344
- )
375
+ valueData: new Date(
376
+ n.decision.startDate
377
+ ).toLocaleDateString("en-CA")
345
378
  },
346
379
  "startDate"
347
380
  ),
348
- n.endDate && /* @__PURE__ */ e(
349
- S,
381
+ ((c = n == null ? void 0 : n.decision) == null ? void 0 : c.endDate) && /* @__PURE__ */ e(
382
+ V,
350
383
  {
351
384
  element: {
352
385
  name: "endDate",
353
- label: r.termEnd,
354
- description: r.termEnd,
386
+ description: o.termEnd,
355
387
  value: String(n.endDate),
356
- howToSetUp: F.EQUAL,
357
- typeData: H.DATE
388
+ howToSetUp: y.EQUAL,
389
+ typeData: L.DATE
358
390
  },
359
- valueData: new Date(n.endDate).toLocaleDateString("en-CA")
391
+ valueData: new Date(n.decision.endDate).toLocaleDateString(
392
+ "en-CA"
393
+ )
360
394
  },
361
395
  "endDate"
362
396
  )
363
397
  ] })
364
398
  ] })
365
399
  ] });
366
- }, J = A.div`
400
+ }, W = I.div`
367
401
  border-radius: 8px;
368
- border: 1px solid ${B.palette.neutral.N30};
402
+ border: 1px solid ${G.palette.neutral.N30};
369
403
  box-sizing: border-box;
370
404
  display: flex;
371
405
  flex-direction: column;
372
406
  height: 340px;
373
407
  width: 332px;
374
408
  box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
375
- `, K = A.div`
409
+ `, X = I.div`
376
410
  width: 100%;
377
411
  height: 100%;
378
412
  overflow-y: auto;
@@ -390,34 +424,34 @@ const Q = (l) => {
390
424
  background-color: #ebecf0;
391
425
  border-radius: 8px;
392
426
  }
393
- `, ge = (l) => {
394
- const { children: n, handleDelete: r, handleView: i, id: h } = l;
395
- return /* @__PURE__ */ o(J, { children: [
396
- /* @__PURE__ */ e(a, { height: "282px", gap: "24px", direction: "column", children: /* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(a, { direction: "column", margin: "10px", children: n }) }) }),
397
- /* @__PURE__ */ o(a, { gap: "16px", direction: "column", margin: "2px 12px", children: [
398
- /* @__PURE__ */ e(k, {}),
399
- /* @__PURE__ */ o(a, { gap: "16px", justifyContent: "end", children: [
427
+ `, xe = (i) => {
428
+ const { children: n, handleDelete: o, handleView: d, id: c } = i;
429
+ return /* @__PURE__ */ l(W, { children: [
430
+ /* @__PURE__ */ e(a, { height: "282px", gap: "24px", direction: "column", children: /* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(a, { direction: "column", margin: "10px", children: n }) }) }),
431
+ /* @__PURE__ */ l(a, { gap: "16px", direction: "column", margin: "2px 12px", children: [
432
+ /* @__PURE__ */ e(T, {}),
433
+ /* @__PURE__ */ l(a, { gap: "16px", justifyContent: "end", children: [
400
434
  /* @__PURE__ */ e(
401
- M,
435
+ H,
402
436
  {
403
437
  appearance: "dark",
404
438
  size: "24px",
405
439
  cursorHover: !0,
406
- icon: /* @__PURE__ */ e(I, {}),
440
+ icon: /* @__PURE__ */ e(B, {}),
407
441
  onClick: () => {
408
- i(h);
442
+ d(c);
409
443
  }
410
444
  }
411
445
  ),
412
446
  /* @__PURE__ */ e(
413
- M,
447
+ H,
414
448
  {
415
449
  cursorHover: !0,
416
450
  appearance: "dark",
417
451
  size: "24px",
418
- icon: /* @__PURE__ */ e(q, {}),
452
+ icon: /* @__PURE__ */ e(Q, {}),
419
453
  onClick: () => {
420
- r(h);
454
+ o(c);
421
455
  }
422
456
  }
423
457
  )
@@ -426,7 +460,7 @@ const Q = (l) => {
426
460
  ] });
427
461
  };
428
462
  export {
429
- ge as BusinessRuleCard,
430
- ue as BusinessRuleView,
431
- me as RulesForm
463
+ xe as BusinessRuleCard,
464
+ be as BusinessRuleView,
465
+ Ce as RulesForm
432
466
  };
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  ],
11
11
  "description": "",
12
12
  "private": false,
13
- "version": "0.1.3",
13
+ "version": "0.1.5",
14
14
  "type": "module",
15
15
  "exports": {
16
16
  ".": {
@@ -48,8 +48,8 @@
48
48
  "@inubekit/text": "^2.17.0",
49
49
  "@inubekit/textarea": "^2.45.0",
50
50
  "@inubekit/toggle": "^3.8.1",
51
- "@isettingkit/input": "^0.1.15",
52
- "@isettingkit/view": "^0.1.2"
51
+ "@isettingkit/input": "^0.1.16",
52
+ "@isettingkit/view": "^0.1.7"
53
53
  },
54
54
  "peerDependencies": {
55
55
  "react": "^18.2.0",