@isettingkit/business-rules 0.1.19 → 0.1.21
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.d.ts +4 -2
- package/dist/index.es.js +545 -403
- package/package.json +6 -3
package/dist/index.es.d.ts
CHANGED
|
@@ -7,14 +7,16 @@ export declare const BusinessRuleView: (props: IBusinessRuleView) => JSX_2.Eleme
|
|
|
7
7
|
|
|
8
8
|
export declare interface IBusinessRuleCard {
|
|
9
9
|
children: React.ReactNode;
|
|
10
|
+
controls?: boolean;
|
|
10
11
|
handleDelete: (id: string) => void;
|
|
11
12
|
handleView: (id: string) => void;
|
|
12
13
|
id: string;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
export declare interface IBusinessRuleView {
|
|
16
|
-
decision
|
|
17
|
-
|
|
17
|
+
decision?: IRuleDecision;
|
|
18
|
+
loading?: boolean;
|
|
19
|
+
textValues?: IRulesFormTextValues;
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
export declare interface IRulesForm {
|
package/dist/index.es.js
CHANGED
|
@@ -1,93 +1,143 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useFormik as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { Divider as
|
|
5
|
-
import { Stack as
|
|
6
|
-
import { Text as
|
|
7
|
-
import { Toggle as
|
|
8
|
-
import { ValueHowToSetUp as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
1
|
+
import { jsxs as p, Fragment as R, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useFormik as ee } from "formik";
|
|
3
|
+
import { useState as y, useEffect as Q } from "react";
|
|
4
|
+
import { Divider as C } from "@inubekit/divider";
|
|
5
|
+
import { Stack as u } from "@inubekit/stack";
|
|
6
|
+
import { Text as D } from "@inubekit/text";
|
|
7
|
+
import { Toggle as Z } from "@inubekit/toggle";
|
|
8
|
+
import { ValueHowToSetUp as m, ValueDataType as I, DecisionConditionRenderer as z } from "@isettingkit/input";
|
|
9
|
+
import { Button as _ } from "@inubekit/button";
|
|
10
|
+
import { object as J, string as L, number as N, mixed as H } from "yup";
|
|
11
|
+
import { Date as q } from "@inubekit/date";
|
|
12
|
+
import { Checkbox as te } from "@inubekit/checkbox";
|
|
13
|
+
import { inube as V } from "@inubekit/foundations";
|
|
14
|
+
import x, { keyframes as K, css as W } from "styled-components";
|
|
15
|
+
import { DecisionViewConditionRenderer as F } from "@isettingkit/view";
|
|
16
|
+
import { MdOutlineEdit as ne, MdOutlineDelete as re } from "react-icons/md";
|
|
17
|
+
import { Icon as G } from "@inubekit/icon";
|
|
18
|
+
const P = (t) => {
|
|
19
|
+
if ("value" in t && "valueUse" in t && t.value !== void 0) {
|
|
20
|
+
const e = t.value, a = typeof e == "object" && "from" in e && typeof e.from == "number" ? e.from : 0, o = typeof e == "object" && "to" in e && typeof e.to == "number" ? e.to : 1 / 0;
|
|
21
|
+
switch (t.valueUse) {
|
|
22
|
+
case m.LIST_OF_VALUES:
|
|
23
|
+
return {
|
|
24
|
+
schema: H().test(
|
|
25
|
+
"isArrayOrString",
|
|
26
|
+
"Must be an array of strings/numbers or a single string",
|
|
27
|
+
(l) => Array.isArray(l) ? l.every(
|
|
28
|
+
(s) => typeof s == "string" || typeof s == "number"
|
|
29
|
+
) : typeof l == "string"
|
|
30
|
+
),
|
|
31
|
+
value: e
|
|
32
|
+
};
|
|
33
|
+
case m.LIST_OF_VALUES_MULTI:
|
|
34
|
+
return {
|
|
35
|
+
schema: H().test(
|
|
36
|
+
"isArrayOrString",
|
|
37
|
+
"Must be an array of strings/numbers or a single string",
|
|
38
|
+
(l) => Array.isArray(l) ? l.every(
|
|
39
|
+
(s) => typeof s == "string" || typeof s == "number"
|
|
40
|
+
) : typeof l == "string"
|
|
41
|
+
),
|
|
42
|
+
value: e
|
|
43
|
+
};
|
|
44
|
+
case m.RANGE:
|
|
45
|
+
return {
|
|
46
|
+
schema: J({
|
|
47
|
+
from: N().required("Range From is required").max(o, "'Range From' cannot be greater than 'Range To'").min(0, "'Range From' cannot be less than 0"),
|
|
48
|
+
to: N().required("Range To is required").min(a, "'Range To' cannot be less than 'Range From'").min(0, "'Range To' cannot be less than 0")
|
|
49
|
+
}),
|
|
50
|
+
value: {
|
|
51
|
+
from: a,
|
|
52
|
+
to: o
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
case m.GREATER_THAN:
|
|
56
|
+
case m.LESS_THAN:
|
|
57
|
+
case m.EQUAL:
|
|
58
|
+
return t.dataType === I.PERCENTAGE ? {
|
|
59
|
+
schema: N().required("Percentage is required").min(0, "Percentage cannot be less than 0").max(100, "Percentage cannot be greater than 100"),
|
|
60
|
+
value: e
|
|
61
|
+
} : {
|
|
62
|
+
schema: L().required("Required"),
|
|
63
|
+
value: e
|
|
64
|
+
};
|
|
65
|
+
default:
|
|
66
|
+
return {
|
|
67
|
+
schema: L(),
|
|
68
|
+
value: void 0
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}, ae = (t) => {
|
|
73
|
+
const e = {}, a = {};
|
|
74
|
+
if (t) {
|
|
75
|
+
const o = P(t);
|
|
76
|
+
o && (e[t.name] = o.schema, a[t.name] = o.value);
|
|
77
|
+
}
|
|
78
|
+
return t.conditions && t.conditions.forEach((o) => {
|
|
79
|
+
const l = P(o);
|
|
80
|
+
l && (e[o.name] = l.schema, a[o.name] = l.value);
|
|
81
|
+
}), { validationSchema: J().shape(e), initialValues: a };
|
|
82
|
+
}, M = (t) => {
|
|
83
|
+
if (typeof t == "string")
|
|
84
|
+
return t;
|
|
85
|
+
if (typeof t == "object" && ("from" in t || "to" in t))
|
|
86
|
+
return {
|
|
87
|
+
from: t.from || "",
|
|
88
|
+
to: t.to || ""
|
|
89
|
+
};
|
|
90
|
+
for (const e in t)
|
|
91
|
+
if (Object.prototype.hasOwnProperty.call(t, e)) {
|
|
92
|
+
const a = M(t[e]);
|
|
93
|
+
if (a) return a;
|
|
94
|
+
}
|
|
95
|
+
return "";
|
|
96
|
+
}, oe = (t) => {
|
|
47
97
|
const {
|
|
48
98
|
checked: e,
|
|
49
99
|
children: a,
|
|
50
|
-
handleToggleChange:
|
|
100
|
+
handleToggleChange: o,
|
|
51
101
|
id: l,
|
|
52
|
-
labelToggle:
|
|
53
|
-
name:
|
|
102
|
+
labelToggle: s,
|
|
103
|
+
name: c,
|
|
54
104
|
valueToggle: d = ""
|
|
55
|
-
} = t, [
|
|
56
|
-
|
|
105
|
+
} = t, [g, h] = y(e), b = (f) => {
|
|
106
|
+
h(f.target.checked), o(f);
|
|
57
107
|
};
|
|
58
|
-
return
|
|
59
|
-
|
|
60
|
-
}, [e]), /* @__PURE__ */
|
|
61
|
-
/* @__PURE__ */ n(
|
|
62
|
-
|
|
108
|
+
return Q(() => {
|
|
109
|
+
h(e);
|
|
110
|
+
}, [e]), /* @__PURE__ */ p(R, { children: [
|
|
111
|
+
/* @__PURE__ */ n(u, { children: /* @__PURE__ */ n(
|
|
112
|
+
Z,
|
|
63
113
|
{
|
|
64
|
-
checked:
|
|
114
|
+
checked: g,
|
|
65
115
|
id: l,
|
|
66
116
|
margin: "10px",
|
|
67
|
-
name:
|
|
68
|
-
onChange:
|
|
117
|
+
name: c,
|
|
118
|
+
onChange: b,
|
|
69
119
|
size: "small",
|
|
70
120
|
value: d,
|
|
71
|
-
children: /* @__PURE__ */ n(
|
|
121
|
+
children: /* @__PURE__ */ n(D, { size: "medium", type: "label", weight: "bold", children: s })
|
|
72
122
|
}
|
|
73
123
|
) }),
|
|
74
|
-
|
|
124
|
+
g && /* @__PURE__ */ n(R, { children: a })
|
|
75
125
|
] });
|
|
76
|
-
},
|
|
126
|
+
}, ie = (t) => {
|
|
77
127
|
const {
|
|
78
128
|
onHandleStartChange: e,
|
|
79
129
|
onHandleEndChange: a,
|
|
80
|
-
labelStart:
|
|
130
|
+
labelStart: o,
|
|
81
131
|
labelEnd: l,
|
|
82
|
-
checkedClosed:
|
|
83
|
-
required:
|
|
132
|
+
checkedClosed: s = !1,
|
|
133
|
+
required: c = !1,
|
|
84
134
|
valueStart: d = "",
|
|
85
|
-
valueEnd:
|
|
86
|
-
} = t, [
|
|
87
|
-
return /* @__PURE__ */
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
-
/* @__PURE__ */ n(
|
|
90
|
-
|
|
135
|
+
valueEnd: g = ""
|
|
136
|
+
} = t, [h, b] = y(s), [f, E] = y(d), [w, S] = y(g);
|
|
137
|
+
return /* @__PURE__ */ p(R, { children: [
|
|
138
|
+
/* @__PURE__ */ p(u, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
|
|
139
|
+
/* @__PURE__ */ n(u, { children: /* @__PURE__ */ n(
|
|
140
|
+
D,
|
|
91
141
|
{
|
|
92
142
|
appearance: "gray",
|
|
93
143
|
margin: "10px 0",
|
|
@@ -98,254 +148,193 @@ const Y = (t) => {
|
|
|
98
148
|
}
|
|
99
149
|
) }),
|
|
100
150
|
/* @__PURE__ */ n(
|
|
101
|
-
|
|
151
|
+
u,
|
|
102
152
|
{
|
|
103
153
|
alignContent: "center",
|
|
104
154
|
justifyContent: "center",
|
|
105
155
|
wrap: "wrap",
|
|
106
156
|
gap: "4px",
|
|
107
157
|
children: /* @__PURE__ */ n(
|
|
108
|
-
|
|
158
|
+
te,
|
|
109
159
|
{
|
|
110
160
|
label: "Cerrada",
|
|
111
|
-
onChange: ({ target:
|
|
112
|
-
|
|
161
|
+
onChange: ({ target: i }) => {
|
|
162
|
+
b(i.checked);
|
|
113
163
|
},
|
|
114
|
-
checked:
|
|
164
|
+
checked: h,
|
|
115
165
|
value: ""
|
|
116
166
|
}
|
|
117
167
|
)
|
|
118
168
|
}
|
|
119
169
|
)
|
|
120
170
|
] }),
|
|
121
|
-
/* @__PURE__ */
|
|
122
|
-
/* @__PURE__ */ n(
|
|
123
|
-
|
|
171
|
+
/* @__PURE__ */ p(u, { justifyContent: "space-between", gap: "24px", children: [
|
|
172
|
+
/* @__PURE__ */ n(u, { width: "189px", children: /* @__PURE__ */ n(
|
|
173
|
+
q,
|
|
124
174
|
{
|
|
125
175
|
id: "dateStart",
|
|
126
|
-
label:
|
|
127
|
-
onChange: (
|
|
128
|
-
|
|
176
|
+
label: o,
|
|
177
|
+
onChange: (i) => {
|
|
178
|
+
E(i.target.value), e(i);
|
|
129
179
|
},
|
|
130
|
-
value:
|
|
131
|
-
required:
|
|
180
|
+
value: f,
|
|
181
|
+
required: c,
|
|
132
182
|
size: "compact"
|
|
133
183
|
}
|
|
134
184
|
) }),
|
|
135
|
-
|
|
136
|
-
|
|
185
|
+
h && /* @__PURE__ */ n(u, { width: "189px", children: /* @__PURE__ */ n(
|
|
186
|
+
q,
|
|
137
187
|
{
|
|
138
188
|
id: "dateEnd",
|
|
139
189
|
label: l,
|
|
140
|
-
onChange: (
|
|
141
|
-
|
|
190
|
+
onChange: (i) => {
|
|
191
|
+
S(i.target.value), a(i);
|
|
142
192
|
},
|
|
143
|
-
value:
|
|
144
|
-
required:
|
|
193
|
+
value: w,
|
|
194
|
+
required: c,
|
|
145
195
|
size: "compact"
|
|
146
196
|
}
|
|
147
197
|
) })
|
|
148
198
|
] })
|
|
149
199
|
] });
|
|
150
|
-
},
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
case f.LIST_OF_VALUES:
|
|
155
|
-
return {
|
|
156
|
-
schema: I().test(
|
|
157
|
-
"isArrayOrString",
|
|
158
|
-
"Must be an array of strings/numbers or a single string",
|
|
159
|
-
(l) => Array.isArray(l) ? l.every(
|
|
160
|
-
(c) => typeof c == "string" || typeof c == "number"
|
|
161
|
-
) : typeof l == "string"
|
|
162
|
-
),
|
|
163
|
-
value: e
|
|
164
|
-
};
|
|
165
|
-
case f.LIST_OF_VALUES_MULTI:
|
|
166
|
-
return {
|
|
167
|
-
schema: I().test(
|
|
168
|
-
"isArrayOrString",
|
|
169
|
-
"Must be an array of strings/numbers or a single string",
|
|
170
|
-
(l) => Array.isArray(l) ? l.every(
|
|
171
|
-
(c) => typeof c == "string" || typeof c == "number"
|
|
172
|
-
) : typeof l == "string"
|
|
173
|
-
),
|
|
174
|
-
value: e
|
|
175
|
-
};
|
|
176
|
-
case f.RANGE:
|
|
177
|
-
return {
|
|
178
|
-
schema: $({
|
|
179
|
-
from: F().required("Range From is required").max(i, "'Range From' cannot be greater than 'Range To'").min(0, "'Range From' cannot be less than 0"),
|
|
180
|
-
to: F().required("Range To is required").min(a, "'Range To' cannot be less than 'Range From'").min(0, "'Range To' cannot be less than 0")
|
|
181
|
-
}),
|
|
182
|
-
value: {
|
|
183
|
-
from: a,
|
|
184
|
-
to: i
|
|
185
|
-
}
|
|
186
|
-
};
|
|
187
|
-
case f.GREATER_THAN:
|
|
188
|
-
case f.LESS_THAN:
|
|
189
|
-
case f.EQUAL:
|
|
190
|
-
return t.dataType === A.PERCENTAGE ? {
|
|
191
|
-
schema: F().required("Percentage is required").min(0, "Percentage cannot be less than 0").max(100, "Percentage cannot be greater than 100"),
|
|
192
|
-
value: e
|
|
193
|
-
} : {
|
|
194
|
-
schema: H().required("Required"),
|
|
195
|
-
value: e
|
|
196
|
-
};
|
|
197
|
-
default:
|
|
198
|
-
return {
|
|
199
|
-
schema: H(),
|
|
200
|
-
value: void 0
|
|
201
|
-
};
|
|
202
|
-
}
|
|
200
|
+
}, le = x.div`
|
|
201
|
+
& > div {
|
|
202
|
+
border-radius: 8px;
|
|
203
|
+
border: 1px solid ${V.palette.neutral.N30};
|
|
203
204
|
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
205
|
+
`, de = x.div`
|
|
206
|
+
width: 100%;
|
|
207
|
+
height: 100%;
|
|
208
|
+
overflow-y: auto;
|
|
209
|
+
&::-webkit-scrollbar {
|
|
210
|
+
width: 4px;
|
|
209
211
|
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
};
|
|
222
|
-
for (const e in t)
|
|
223
|
-
if (Object.prototype.hasOwnProperty.call(t, e)) {
|
|
224
|
-
const a = U(t[e]);
|
|
225
|
-
if (a) return a;
|
|
226
|
-
}
|
|
227
|
-
return "";
|
|
228
|
-
}, ae = (t) => {
|
|
212
|
+
|
|
213
|
+
&::-webkit-scrollbar-thumb {
|
|
214
|
+
background-color: #c1c7d0;
|
|
215
|
+
border-radius: 8px;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
&::-webkit-scrollbar-track {
|
|
219
|
+
background-color: #ebecf0;
|
|
220
|
+
border-radius: 8px;
|
|
221
|
+
}
|
|
222
|
+
`, ce = (t) => {
|
|
229
223
|
const {
|
|
230
224
|
decision: e,
|
|
231
225
|
formik: a,
|
|
232
|
-
onChangeCondition:
|
|
226
|
+
onChangeCondition: o,
|
|
233
227
|
onChangeDecision: l,
|
|
234
|
-
onStartChange:
|
|
235
|
-
onEndChange:
|
|
228
|
+
onStartChange: s,
|
|
229
|
+
onEndChange: c,
|
|
236
230
|
textValues: d,
|
|
237
|
-
onCancel:
|
|
238
|
-
onSubmit:
|
|
239
|
-
} = t, [
|
|
231
|
+
onCancel: g,
|
|
232
|
+
onSubmit: h
|
|
233
|
+
} = t, [b, f] = y(!0), [E] = y(!0), w = {
|
|
240
234
|
name: e.name,
|
|
241
235
|
dataType: e.dataType,
|
|
242
236
|
value: e.value,
|
|
243
237
|
valueUse: e.valueUse,
|
|
244
238
|
possibleValue: e.possibleValue
|
|
245
239
|
};
|
|
246
|
-
|
|
240
|
+
Q(() => {
|
|
247
241
|
console.log("Updated formik.errors in RulesFormUI:", a.errors);
|
|
248
242
|
}, [a.errors]);
|
|
249
|
-
const
|
|
250
|
-
|
|
251
|
-
},
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
const h = U(a.errors[r] || {});
|
|
258
|
-
return h;
|
|
243
|
+
const S = (r) => {
|
|
244
|
+
f(r.target.checked);
|
|
245
|
+
}, k = (r) => {
|
|
246
|
+
const i = M(a.errors[r] || {});
|
|
247
|
+
return typeof i == "string" ? i ? "invalid" : "pending" : i;
|
|
248
|
+
}, T = (r) => {
|
|
249
|
+
const i = M(a.errors[r] || {});
|
|
250
|
+
return i;
|
|
259
251
|
};
|
|
260
|
-
return /* @__PURE__ */
|
|
261
|
-
/* @__PURE__ */
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
rangeMin: (r) => `Minimum ${r}`,
|
|
275
|
-
rangeMax: (r) => `Maximum ${r}`
|
|
276
|
-
}
|
|
252
|
+
return /* @__PURE__ */ p(u, { direction: "column", gap: "24px", children: [
|
|
253
|
+
e && /* @__PURE__ */ n(
|
|
254
|
+
z,
|
|
255
|
+
{
|
|
256
|
+
element: w,
|
|
257
|
+
onDecision: l,
|
|
258
|
+
valueData: a.values[e.name],
|
|
259
|
+
message: a.errors[e.name],
|
|
260
|
+
status: k(e.name),
|
|
261
|
+
textValues: {
|
|
262
|
+
selectOptions: "Select an option",
|
|
263
|
+
selectOption: "Option selected",
|
|
264
|
+
rangeMin: (r) => `Minimum ${r}`,
|
|
265
|
+
rangeMax: (r) => `Maximum ${r}`
|
|
277
266
|
}
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
/* @__PURE__ */ n(
|
|
281
|
-
/* @__PURE__ */
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
)
|
|
294
|
-
] }),
|
|
295
|
-
e.conditions && e.conditions.map((r) => /* @__PURE__ */ n(o, { direction: "column", children: /* @__PURE__ */ n(
|
|
296
|
-
ee,
|
|
297
|
-
{
|
|
298
|
-
checked: !p,
|
|
299
|
-
handleToggleChange: (h) => {
|
|
300
|
-
h.target.checked || i(
|
|
267
|
+
}
|
|
268
|
+
),
|
|
269
|
+
/* @__PURE__ */ n(C, { dashed: !0 }),
|
|
270
|
+
/* @__PURE__ */ n(le, { children: /* @__PURE__ */ n(de, { children: /* @__PURE__ */ p(
|
|
271
|
+
u,
|
|
272
|
+
{
|
|
273
|
+
direction: "column",
|
|
274
|
+
padding: "6px 12px",
|
|
275
|
+
gap: "16px",
|
|
276
|
+
height: "272px",
|
|
277
|
+
children: [
|
|
278
|
+
/* @__PURE__ */ p(u, { direction: "row", justifyContent: "space-between", children: [
|
|
279
|
+
/* @__PURE__ */ n(D, { children: d.factsThatConditionIt }),
|
|
280
|
+
/* @__PURE__ */ n(
|
|
281
|
+
Z,
|
|
301
282
|
{
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
r.name
|
|
308
|
-
);
|
|
309
|
-
},
|
|
310
|
-
id: r.name.replace(" ", ""),
|
|
311
|
-
labelToggle: r.name.split(/(?=[A-Z])/).join(" "),
|
|
312
|
-
name: r.name.replace(" ", ""),
|
|
313
|
-
children: /* @__PURE__ */ n(
|
|
314
|
-
M,
|
|
315
|
-
{
|
|
316
|
-
element: r,
|
|
317
|
-
onDecision: i,
|
|
318
|
-
valueData: a.values[r.name],
|
|
319
|
-
message: s(r.name),
|
|
320
|
-
status: u(r.name),
|
|
321
|
-
textValues: {
|
|
322
|
-
selectOptions: "Select an option",
|
|
323
|
-
selectOption: "Option selected",
|
|
324
|
-
rangeMin: (h) => `Minimum ${h}`,
|
|
325
|
-
rangeMax: (h) => `Maximum ${h}`
|
|
283
|
+
id: "toogleNone",
|
|
284
|
+
onChange: S,
|
|
285
|
+
checked: b,
|
|
286
|
+
size: "small",
|
|
287
|
+
children: /* @__PURE__ */ n(D, { size: "medium", type: "label", weight: "bold", children: d.none })
|
|
326
288
|
}
|
|
327
|
-
|
|
328
|
-
)
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
289
|
+
)
|
|
290
|
+
] }),
|
|
291
|
+
/* @__PURE__ */ n(u, { direction: "column", gap: "20px", children: e.conditions && e.conditions.filter((r) => !r.hidden).map((r) => /* @__PURE__ */ n(
|
|
292
|
+
oe,
|
|
293
|
+
{
|
|
294
|
+
checked: !b,
|
|
295
|
+
handleToggleChange: (i) => {
|
|
296
|
+
i.target.checked || o(
|
|
297
|
+
{
|
|
298
|
+
value: "",
|
|
299
|
+
to: 0,
|
|
300
|
+
from: 0,
|
|
301
|
+
list: r.possibleValue.list
|
|
302
|
+
},
|
|
303
|
+
r.name
|
|
304
|
+
);
|
|
305
|
+
},
|
|
306
|
+
id: r.name.replace(" ", ""),
|
|
307
|
+
labelToggle: r.name.split(/(?=[A-Z])/).join(" "),
|
|
308
|
+
name: r.name.replace(" ", ""),
|
|
309
|
+
children: /* @__PURE__ */ n(
|
|
310
|
+
z,
|
|
311
|
+
{
|
|
312
|
+
element: r,
|
|
313
|
+
onDecision: o,
|
|
314
|
+
valueData: a.values[r.name],
|
|
315
|
+
message: T(r.name),
|
|
316
|
+
status: k(r.name),
|
|
317
|
+
textValues: {
|
|
318
|
+
selectOptions: "Select an option",
|
|
319
|
+
selectOption: "Option selected",
|
|
320
|
+
rangeMin: (i) => `Minimum ${i}`,
|
|
321
|
+
rangeMax: (i) => `Maximum ${i}`
|
|
322
|
+
},
|
|
323
|
+
type: "condition"
|
|
324
|
+
}
|
|
325
|
+
)
|
|
326
|
+
},
|
|
327
|
+
r.name
|
|
328
|
+
)) })
|
|
329
|
+
]
|
|
341
330
|
}
|
|
342
|
-
) }),
|
|
343
|
-
/* @__PURE__ */ n(
|
|
344
|
-
/* @__PURE__ */ n(
|
|
345
|
-
|
|
331
|
+
) }) }),
|
|
332
|
+
/* @__PURE__ */ n(C, { dashed: !0 }),
|
|
333
|
+
/* @__PURE__ */ n(u, { direction: "column", children: e && /* @__PURE__ */ n(
|
|
334
|
+
ie,
|
|
346
335
|
{
|
|
347
|
-
onHandleStartChange: (r) =>
|
|
348
|
-
onHandleEndChange: (r) =>
|
|
336
|
+
onHandleStartChange: (r) => s(r.target.value),
|
|
337
|
+
onHandleEndChange: (r) => c(r.target.value),
|
|
349
338
|
labelStart: d.termStart,
|
|
350
339
|
labelEnd: d.termEnd,
|
|
351
340
|
checkedClosed: !!e.endDate,
|
|
@@ -353,89 +342,89 @@ const Y = (t) => {
|
|
|
353
342
|
valueEnd: String(e.endDate) || ""
|
|
354
343
|
}
|
|
355
344
|
) }),
|
|
356
|
-
/* @__PURE__ */ n(
|
|
357
|
-
/* @__PURE__ */
|
|
358
|
-
/* @__PURE__ */ n(
|
|
345
|
+
/* @__PURE__ */ n(C, {}),
|
|
346
|
+
/* @__PURE__ */ p(u, { direction: "row", justifyContent: "end", gap: "16px", children: [
|
|
347
|
+
/* @__PURE__ */ n(_, { appearance: "gray", onClick: g, children: d.cancel }),
|
|
359
348
|
/* @__PURE__ */ n(
|
|
360
|
-
|
|
349
|
+
_,
|
|
361
350
|
{
|
|
362
|
-
onClick:
|
|
363
|
-
disabled:
|
|
351
|
+
onClick: h,
|
|
352
|
+
disabled: E || !a.isValid,
|
|
364
353
|
type: "submit",
|
|
365
354
|
children: d.confirm
|
|
366
355
|
}
|
|
367
356
|
)
|
|
368
357
|
] })
|
|
369
358
|
] });
|
|
370
|
-
},
|
|
371
|
-
const { id: e, decision: a, onCancel:
|
|
372
|
-
k.setFieldValue(
|
|
373
|
-
},
|
|
374
|
-
const
|
|
375
|
-
d((
|
|
376
|
-
if (!
|
|
377
|
-
return
|
|
378
|
-
const
|
|
359
|
+
}, Oe = (t) => {
|
|
360
|
+
const { id: e, decision: a, onCancel: o, onSubmitEvent: l, textValues: s } = t, [c, d] = y(a), g = (r, i) => {
|
|
361
|
+
k.setFieldValue(r, i), k.validateField(r);
|
|
362
|
+
}, h = (r, i) => {
|
|
363
|
+
const A = r instanceof Date ? r.toISOString() : r;
|
|
364
|
+
d((O) => {
|
|
365
|
+
if (!O.conditions)
|
|
366
|
+
return O;
|
|
367
|
+
const Y = O.conditions.map((U) => U.name === i ? { ...U, value: A } : U);
|
|
379
368
|
return {
|
|
380
|
-
...
|
|
381
|
-
conditions:
|
|
369
|
+
...O,
|
|
370
|
+
conditions: Y
|
|
382
371
|
};
|
|
383
|
-
}),
|
|
384
|
-
},
|
|
372
|
+
}), g(i, A);
|
|
373
|
+
}, b = (r) => {
|
|
385
374
|
d(
|
|
386
|
-
(
|
|
375
|
+
(i) => T(i, "value", r)
|
|
387
376
|
);
|
|
388
|
-
},
|
|
377
|
+
}, f = (r) => {
|
|
389
378
|
d(
|
|
390
|
-
(
|
|
379
|
+
(i) => T(i, "endDate", r)
|
|
391
380
|
);
|
|
392
|
-
},
|
|
381
|
+
}, E = (r) => {
|
|
393
382
|
d(
|
|
394
|
-
(
|
|
383
|
+
(i) => T(i, "startDate", r)
|
|
395
384
|
);
|
|
396
|
-
}, { validationSchema:
|
|
397
|
-
|
|
398
|
-
const k =
|
|
399
|
-
initialValues:
|
|
400
|
-
validationSchema:
|
|
385
|
+
}, { validationSchema: w, initialValues: S } = ae(c);
|
|
386
|
+
w.validate(S, { abortEarly: !1 }).then(() => console.log("Validation passed")).catch((r) => console.log("Validation failed:", r.errors));
|
|
387
|
+
const k = ee({
|
|
388
|
+
initialValues: S,
|
|
389
|
+
validationSchema: w,
|
|
401
390
|
validateOnChange: !0,
|
|
402
391
|
validateOnBlur: !0,
|
|
403
392
|
onSubmit: () => {
|
|
404
|
-
l(
|
|
393
|
+
l(c);
|
|
405
394
|
}
|
|
406
|
-
}),
|
|
407
|
-
...
|
|
408
|
-
...
|
|
409
|
-
[
|
|
395
|
+
}), T = (r, i, A) => ({
|
|
396
|
+
...r,
|
|
397
|
+
...r.decision,
|
|
398
|
+
[i]: A
|
|
410
399
|
});
|
|
411
400
|
return /* @__PURE__ */ n(
|
|
412
|
-
|
|
401
|
+
ce,
|
|
413
402
|
{
|
|
414
403
|
id: e,
|
|
415
404
|
formik: k,
|
|
416
|
-
decision:
|
|
417
|
-
onCancel:
|
|
418
|
-
onSubmit: () => l(
|
|
419
|
-
onChangeCondition:
|
|
420
|
-
onChangeDecision:
|
|
421
|
-
onStartChange:
|
|
422
|
-
onEndChange:
|
|
423
|
-
textValues:
|
|
405
|
+
decision: c,
|
|
406
|
+
onCancel: o,
|
|
407
|
+
onSubmit: () => l(c),
|
|
408
|
+
onChangeCondition: h,
|
|
409
|
+
onChangeDecision: b,
|
|
410
|
+
onStartChange: E,
|
|
411
|
+
onEndChange: f,
|
|
412
|
+
textValues: s
|
|
424
413
|
}
|
|
425
414
|
);
|
|
426
|
-
},
|
|
415
|
+
}, j = (t) => {
|
|
427
416
|
if (!t)
|
|
428
417
|
return;
|
|
429
418
|
const e = t.value;
|
|
430
419
|
if (!e)
|
|
431
420
|
return;
|
|
432
|
-
if (((
|
|
421
|
+
if (((o) => typeof o == "object" && o !== null)(e))
|
|
433
422
|
switch (t.valueUse) {
|
|
434
|
-
case
|
|
423
|
+
case m.LIST_OF_VALUES_MULTI:
|
|
435
424
|
return e;
|
|
436
|
-
case
|
|
425
|
+
case m.LIST_OF_VALUES:
|
|
437
426
|
return e;
|
|
438
|
-
case
|
|
427
|
+
case m.RANGE:
|
|
439
428
|
return {
|
|
440
429
|
from: e.from,
|
|
441
430
|
to: e.to
|
|
@@ -444,82 +433,234 @@ const Y = (t) => {
|
|
|
444
433
|
return e.value;
|
|
445
434
|
}
|
|
446
435
|
return e;
|
|
447
|
-
},
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
436
|
+
}, B = x.div`
|
|
437
|
+
& > div {
|
|
438
|
+
border-radius: 8px;
|
|
439
|
+
border: 1px solid ${V.palette.neutral.N30};
|
|
440
|
+
}
|
|
441
|
+
`, X = x.div`
|
|
442
|
+
width: 100%;
|
|
443
|
+
height: 100%;
|
|
444
|
+
overflow-y: auto;
|
|
445
|
+
padding-right: 4px;
|
|
446
|
+
&::-webkit-scrollbar {
|
|
447
|
+
width: 4px;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
&::-webkit-scrollbar-thumb {
|
|
451
|
+
background-color: #c1c7d0;
|
|
452
|
+
border-radius: 8px;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
&::-webkit-scrollbar-track {
|
|
456
|
+
background-color: #ebecf0;
|
|
457
|
+
border-radius: 8px;
|
|
458
|
+
}
|
|
459
|
+
`, v = {
|
|
460
|
+
background: {
|
|
461
|
+
color: V.palette.neutral.N30
|
|
462
|
+
},
|
|
463
|
+
animation: {
|
|
464
|
+
color: V.palette.neutral.N10
|
|
465
|
+
}
|
|
466
|
+
}, se = K`
|
|
467
|
+
0% {
|
|
468
|
+
transform: translateX(-100%);
|
|
469
|
+
}
|
|
470
|
+
100% {
|
|
471
|
+
transform: translateX(100%);
|
|
472
|
+
}
|
|
473
|
+
`;
|
|
474
|
+
x.div`
|
|
475
|
+
position: relative;
|
|
476
|
+
border-radius: 6px;
|
|
477
|
+
overflow: hidden;
|
|
478
|
+
width: ${({ $size: t }) => t};
|
|
479
|
+
height: ${({ $size: t }) => t};
|
|
480
|
+
background: ${({ theme: t }) => {
|
|
481
|
+
var e, a;
|
|
482
|
+
return ((a = (e = t == null ? void 0 : t.skeleton) == null ? void 0 : e.background) == null ? void 0 : a.color) || v.background.color;
|
|
483
|
+
}};
|
|
484
|
+
|
|
485
|
+
${({ $animated: t }) => t && W`
|
|
486
|
+
&::after {
|
|
487
|
+
content: "";
|
|
488
|
+
position: absolute;
|
|
489
|
+
height: 100%;
|
|
490
|
+
width: 100%;
|
|
491
|
+
background: ${({ theme: e }) => {
|
|
492
|
+
var a, o, l, s, c, d;
|
|
493
|
+
return `linear-gradient(
|
|
494
|
+
100deg,
|
|
495
|
+
${((o = (a = e == null ? void 0 : e.skeleton) == null ? void 0 : a.background) == null ? void 0 : o.color) || v.background.color} 0%,
|
|
496
|
+
${((s = (l = e == null ? void 0 : e.skeleton) == null ? void 0 : l.animation) == null ? void 0 : s.color) || v.animation.color} 50%,
|
|
497
|
+
${((d = (c = e == null ? void 0 : e.skeleton) == null ? void 0 : c.background) == null ? void 0 : d.color) || v.background.color} 100%
|
|
498
|
+
);`;
|
|
499
|
+
}};
|
|
500
|
+
animation: ${se} 2s linear infinite;
|
|
501
|
+
}
|
|
502
|
+
`}
|
|
503
|
+
`;
|
|
504
|
+
const ue = K`
|
|
505
|
+
0% {
|
|
506
|
+
transform: translateX(-100%);
|
|
507
|
+
}
|
|
508
|
+
100% {
|
|
509
|
+
transform: translateX(100%);
|
|
510
|
+
}
|
|
511
|
+
`, pe = x.div`
|
|
512
|
+
position: relative;
|
|
513
|
+
border-radius: 6px;
|
|
514
|
+
overflow: hidden;
|
|
515
|
+
height: 16px;
|
|
516
|
+
width: ${({ $width: t }) => t};
|
|
517
|
+
background: ${({ theme: t }) => {
|
|
518
|
+
var e, a;
|
|
519
|
+
return ((a = (e = t == null ? void 0 : t.skeleton) == null ? void 0 : e.background) == null ? void 0 : a.color) || v.background.color;
|
|
520
|
+
}};
|
|
521
|
+
|
|
522
|
+
${({ $animated: t }) => t && W`
|
|
523
|
+
&::after {
|
|
524
|
+
content: "";
|
|
525
|
+
position: absolute;
|
|
526
|
+
height: 100%;
|
|
527
|
+
width: 100%;
|
|
528
|
+
background: ${({ theme: e }) => {
|
|
529
|
+
var a, o, l, s, c, d;
|
|
530
|
+
return `linear-gradient(
|
|
531
|
+
100deg,
|
|
532
|
+
${((o = (a = e == null ? void 0 : e.skeleton) == null ? void 0 : a.background) == null ? void 0 : o.color) || v.background.color} 0%,
|
|
533
|
+
${((s = (l = e == null ? void 0 : e.skeleton) == null ? void 0 : l.animation) == null ? void 0 : s.color) || v.animation.color} 50%,
|
|
534
|
+
${((d = (c = e == null ? void 0 : e.skeleton) == null ? void 0 : c.background) == null ? void 0 : d.color) || v.background.color} 100%
|
|
535
|
+
);`;
|
|
536
|
+
}};
|
|
537
|
+
animation: ${ue} 2s linear infinite;
|
|
538
|
+
}
|
|
539
|
+
`}
|
|
540
|
+
`, $ = (t) => {
|
|
541
|
+
const { width: e = "100%", animated: a = !1 } = t;
|
|
542
|
+
return /* @__PURE__ */ n(pe, { $width: e, $animated: a });
|
|
543
|
+
}, je = (t) => {
|
|
544
|
+
const { decision: e, loading: a = !1, textValues: o } = t, l = (c) => c && Object.keys(c).length > 0, s = {
|
|
545
|
+
name: (e == null ? void 0 : e.name) || "",
|
|
546
|
+
dataType: (e == null ? void 0 : e.dataType) || "alphabetical",
|
|
547
|
+
value: j(e),
|
|
548
|
+
valueUse: (e == null ? void 0 : e.valueUse) || "equal"
|
|
453
549
|
};
|
|
454
|
-
return /* @__PURE__ */
|
|
455
|
-
/* @__PURE__ */
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
550
|
+
return !a && e && o ? /* @__PURE__ */ p(u, { direction: "column", gap: "12px", children: [
|
|
551
|
+
e && /* @__PURE__ */ n(u, { direction: "column", alignItems: "center", children: /* @__PURE__ */ n(
|
|
552
|
+
F,
|
|
553
|
+
{
|
|
554
|
+
element: s,
|
|
555
|
+
valueData: j(s),
|
|
556
|
+
type: "decision"
|
|
557
|
+
}
|
|
558
|
+
) }, e.name),
|
|
559
|
+
/* @__PURE__ */ n(C, { dashed: !0 }),
|
|
560
|
+
/* @__PURE__ */ n(X, { children: /* @__PURE__ */ p(
|
|
561
|
+
u,
|
|
562
|
+
{
|
|
563
|
+
direction: "column",
|
|
564
|
+
gap: "12px",
|
|
565
|
+
justifyContent: "space-between",
|
|
566
|
+
height: "203px",
|
|
567
|
+
children: [
|
|
568
|
+
/* @__PURE__ */ n(
|
|
569
|
+
D,
|
|
570
|
+
{
|
|
571
|
+
type: "label",
|
|
572
|
+
size: "large",
|
|
573
|
+
appearance: "dark",
|
|
574
|
+
weight: "bold",
|
|
575
|
+
textAlign: "center",
|
|
576
|
+
children: o.factsThatConditionIt
|
|
577
|
+
}
|
|
578
|
+
),
|
|
579
|
+
e.conditions && e.conditions.map((c) => {
|
|
580
|
+
if (c.hidden) return null;
|
|
581
|
+
const d = c.value;
|
|
582
|
+
return (typeof d == "object" && l(d) || d) && /* @__PURE__ */ n(B, { children: /* @__PURE__ */ n(u, { direction: "column", padding: "8px", children: /* @__PURE__ */ n(
|
|
583
|
+
F,
|
|
584
|
+
{
|
|
585
|
+
element: {
|
|
586
|
+
...c,
|
|
587
|
+
value: d
|
|
588
|
+
},
|
|
589
|
+
valueData: j(c)
|
|
590
|
+
}
|
|
591
|
+
) }) }, c.name);
|
|
592
|
+
}),
|
|
593
|
+
/* @__PURE__ */ n(C, { dashed: !0 }),
|
|
594
|
+
/* @__PURE__ */ n(u, { direction: "column", gap: "12px", children: (e == null ? void 0 : e.startDate) && (e == null ? void 0 : e.endDate) && /* @__PURE__ */ n(
|
|
595
|
+
F,
|
|
596
|
+
{
|
|
597
|
+
element: {
|
|
598
|
+
name: o.terms,
|
|
599
|
+
value: String(e.startDate),
|
|
600
|
+
valueUse: m.RANGE,
|
|
601
|
+
dataType: I.DATE
|
|
602
|
+
},
|
|
603
|
+
valueData: j({
|
|
604
|
+
name: o.terms,
|
|
605
|
+
value: {
|
|
606
|
+
from: String(e.startDate),
|
|
607
|
+
to: String(e.endDate)
|
|
608
|
+
},
|
|
609
|
+
valueUse: m.RANGE,
|
|
610
|
+
dataType: I.DATE
|
|
611
|
+
}),
|
|
612
|
+
type: "decision"
|
|
475
613
|
},
|
|
476
|
-
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
}
|
|
614
|
+
o.terms
|
|
615
|
+
) })
|
|
616
|
+
]
|
|
617
|
+
}
|
|
618
|
+
) })
|
|
619
|
+
] }) : /* @__PURE__ */ p(u, { direction: "column", gap: "12px", children: [
|
|
620
|
+
/* @__PURE__ */ p(u, { direction: "column", alignItems: "center", gap: "4px", children: [
|
|
621
|
+
/* @__PURE__ */ n($, { animated: !0, width: "180px" }),
|
|
622
|
+
/* @__PURE__ */ n($, { animated: !0, width: "85px" })
|
|
623
|
+
] }, "loading"),
|
|
624
|
+
/* @__PURE__ */ p(u, { direction: "column", gap: "12px", alignItems: "center", children: [
|
|
625
|
+
/* @__PURE__ */ n(C, { dashed: !0 }),
|
|
626
|
+
/* @__PURE__ */ n($, { animated: !0, width: "150px" })
|
|
480
627
|
] }),
|
|
481
|
-
/* @__PURE__ */
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
valueUse: f.EQUAL,
|
|
491
|
-
dataType: A.DATE
|
|
492
|
-
},
|
|
493
|
-
valueData: String(e.startDate)
|
|
494
|
-
},
|
|
495
|
-
"startDate"
|
|
496
|
-
),
|
|
497
|
-
(e == null ? void 0 : e.endDate) && /* @__PURE__ */ n(
|
|
498
|
-
V,
|
|
628
|
+
/* @__PURE__ */ n(X, { children: /* @__PURE__ */ n(
|
|
629
|
+
u,
|
|
630
|
+
{
|
|
631
|
+
direction: "column",
|
|
632
|
+
gap: "12px",
|
|
633
|
+
justifyContent: "space-between",
|
|
634
|
+
height: "203px",
|
|
635
|
+
children: Array.from({ length: 5 }).map((c, d) => /* @__PURE__ */ n(B, { children: /* @__PURE__ */ p(
|
|
636
|
+
u,
|
|
499
637
|
{
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
)
|
|
510
|
-
|
|
511
|
-
|
|
638
|
+
direction: "column",
|
|
639
|
+
gap: "12px",
|
|
640
|
+
alignItems: "start",
|
|
641
|
+
padding: "8px",
|
|
642
|
+
children: [
|
|
643
|
+
/* @__PURE__ */ n($, { animated: !0, width: "180px" }),
|
|
644
|
+
/* @__PURE__ */ n($, { animated: !0, width: "85px" })
|
|
645
|
+
]
|
|
646
|
+
}
|
|
647
|
+
) }, `condition-${d}`))
|
|
648
|
+
}
|
|
649
|
+
) })
|
|
512
650
|
] });
|
|
513
|
-
},
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
651
|
+
}, me = x.div`
|
|
652
|
+
border-radius: 8px;
|
|
653
|
+
border: 1px solid ${V.palette.neutral.N30};
|
|
654
|
+
box-sizing: border-box;
|
|
655
|
+
display: flex;
|
|
656
|
+
flex-direction: column;
|
|
657
|
+
// height: 364px;
|
|
658
|
+
// width: 332px;
|
|
659
|
+
width: 100%;
|
|
660
|
+
height: 100%;
|
|
661
|
+
box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
|
|
662
|
+
`;
|
|
663
|
+
x.div`
|
|
523
664
|
width: 100%;
|
|
524
665
|
height: 100%;
|
|
525
666
|
overflow-y: auto;
|
|
@@ -537,34 +678,35 @@ const Y = (t) => {
|
|
|
537
678
|
background-color: #ebecf0;
|
|
538
679
|
border-radius: 8px;
|
|
539
680
|
}
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
/* @__PURE__ */
|
|
681
|
+
`;
|
|
682
|
+
const Re = (t) => {
|
|
683
|
+
const { children: e, controls: a = !0, handleDelete: o, handleView: l, id: s } = t;
|
|
684
|
+
return /* @__PURE__ */ n(me, { children: /* @__PURE__ */ p(u, { direction: "column", gap: "16px", padding: "12px 16px", children: [
|
|
685
|
+
e,
|
|
686
|
+
a && /* @__PURE__ */ p(R, { children: [
|
|
687
|
+
/* @__PURE__ */ n(C, {}),
|
|
688
|
+
/* @__PURE__ */ p(u, { gap: "16px", justifyContent: "end", children: [
|
|
547
689
|
/* @__PURE__ */ n(
|
|
548
|
-
|
|
690
|
+
G,
|
|
549
691
|
{
|
|
550
692
|
appearance: "dark",
|
|
551
693
|
size: "24px",
|
|
552
694
|
cursorHover: !0,
|
|
553
|
-
icon: /* @__PURE__ */ n(
|
|
695
|
+
icon: /* @__PURE__ */ n(ne, {}),
|
|
554
696
|
onClick: () => {
|
|
555
|
-
|
|
697
|
+
l(s);
|
|
556
698
|
}
|
|
557
699
|
}
|
|
558
700
|
),
|
|
559
701
|
/* @__PURE__ */ n(
|
|
560
|
-
|
|
702
|
+
G,
|
|
561
703
|
{
|
|
562
704
|
cursorHover: !0,
|
|
563
705
|
appearance: "dark",
|
|
564
706
|
size: "24px",
|
|
565
|
-
icon: /* @__PURE__ */ n(
|
|
707
|
+
icon: /* @__PURE__ */ n(re, {}),
|
|
566
708
|
onClick: () => {
|
|
567
|
-
|
|
709
|
+
o(s);
|
|
568
710
|
}
|
|
569
711
|
}
|
|
570
712
|
)
|
|
@@ -573,7 +715,7 @@ const Y = (t) => {
|
|
|
573
715
|
] }) });
|
|
574
716
|
};
|
|
575
717
|
export {
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
718
|
+
Re as BusinessRuleCard,
|
|
719
|
+
je as BusinessRuleView,
|
|
720
|
+
Oe as RulesForm
|
|
579
721
|
};
|
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.21",
|
|
14
14
|
"type": "module",
|
|
15
15
|
"exports": {
|
|
16
16
|
".": {
|
|
@@ -37,19 +37,22 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@inubekit/button": "^4.44.1",
|
|
40
|
+
"@inubekit/blanket": "2.25.0",
|
|
40
41
|
"@inubekit/checkbox": "^0.2.2",
|
|
41
42
|
"@inubekit/date": "^2.39.1",
|
|
42
43
|
"@inubekit/divider": "^0.16.1",
|
|
43
44
|
"@inubekit/foundations": "^5.11.3",
|
|
45
|
+
"@inubekit/hooks": "^1.2.0",
|
|
44
46
|
"@inubekit/grid": "^2.14.1",
|
|
45
47
|
"@inubekit/icon": "^2.18.1",
|
|
46
48
|
"@inubekit/input": "^1.6.3",
|
|
47
49
|
"@inubekit/stack": "^3.8.1",
|
|
50
|
+
"@inubekit/skeleton": "^2.11.1",
|
|
48
51
|
"@inubekit/text": "^2.17.0",
|
|
49
52
|
"@inubekit/textarea": "^2.45.0",
|
|
50
53
|
"@inubekit/toggle": "^3.8.2",
|
|
51
|
-
"@isettingkit/input": "^0.1.
|
|
52
|
-
"@isettingkit/view": "^0.1.
|
|
54
|
+
"@isettingkit/input": "^0.1.30",
|
|
55
|
+
"@isettingkit/view": "^0.1.18"
|
|
53
56
|
},
|
|
54
57
|
"peerDependencies": {
|
|
55
58
|
"formik": "^2.4.6",
|