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