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