@ironsource/shared-ui 2.1.1-rc.1 → 2.1.1-test.1
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/{CardPanel.vue_vue_type_style_index_0_scoped_3cda0f04_lang.css → CardPanel.vue_vue_type_style_index_0_scoped_d2b5d12f_lang.css} +1 -1
- package/DataGrid.vue_vue_type_style_index_0_scoped_9cc6b34e_lang.css +1 -0
- package/{FormCard.vue_vue_type_style_index_0_scoped_bb7d27f9_lang.css → FormCard.vue_vue_type_style_index_0_scoped_ad5e4be0_lang.css} +1 -1
- package/FormRow.vue_vue_type_style_index_0_scoped_017dc22e_lang.css +1 -0
- package/components/{layout → forms}/CardPanel.vue.js +2 -2
- package/components/{layout → forms}/CardPanel.vue2.js +1 -1
- package/components/forms/FormCard.vue.js +7 -0
- package/components/{layout → forms}/FormCard.vue2.js +1 -1
- package/components/forms/FormRow.vue.js +7 -0
- package/components/forms/FormRow.vue2.js +41 -0
- package/components/forms/index.d.ts +397 -0
- package/components/forms/index.js +9 -2
- package/components/forms/validation/examples/dynamicForm/useFormTestValidation.d.ts +2 -1
- package/components/forms/validation/examples/simpleForm/useSimpleFormValidation.d.ts +2 -1
- package/components/layout/index.d.ts +3 -398
- package/components/layout/index.js +4 -10
- package/components/table/v4/DataGrid.vue.js +4 -4
- package/components/table/v4/DataGrid.vue2.js +83 -90
- package/composables/useFormValidation.d.ts +2 -2
- package/composables/useFormValidation.js +12 -12
- package/index.js +85 -84
- package/package.json +1 -1
- package/DataGrid.vue_vue_type_style_index_0_scoped_09d33c49_lang.css +0 -1
- package/FormRow.vue_vue_type_style_index_0_scoped_8daca9c2_lang.css +0 -1
- package/components/layout/FormCard.vue.js +0 -7
- package/components/layout/FormRow.vue.js +0 -7
- package/components/layout/FormRow.vue2.js +0 -43
- /package/components/{layout → forms}/CardPanel.vue.d.ts +0 -0
- /package/components/{layout → forms}/FormCard.vue.d.ts +0 -0
- /package/components/{layout → forms}/FormRow.vue.d.ts +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../../../DataGrid.
|
|
2
|
-
import
|
|
1
|
+
import "../../../DataGrid.vue_vue_type_style_index_0_scoped_9cc6b34e_lang.css"; import { defineComponent as ee, useCssVars as te, unref as e, useSlots as se, computed as g, openBlock as i, createElementBlock as l, createElementVNode as r, normalizeStyle as R, normalizeClass as y, renderSlot as n, createVNode as u, withCtx as T, createTextVNode as C, toDisplayString as E, isRef as ae, createCommentVNode as h, Fragment as x, renderList as B, createBlock as ie, mergeProps as le } from "vue";
|
|
2
|
+
import V from "../../typography/v4/Typography.vue.js";
|
|
3
3
|
import de from "../../skeleton/v4/SkeletonV4.vue.js";
|
|
4
4
|
import oe from "../../emptyState/v4/EmptyStateV4.vue.js";
|
|
5
|
-
import
|
|
5
|
+
import U from "../../checkbox/v4/CheckboxV4.vue.js";
|
|
6
6
|
import { TableTestIdModifiers as f } from "../../../testids/index.js";
|
|
7
7
|
import { tableCommon as ne } from "../common/Table.common.js";
|
|
8
8
|
import ce from "./SortIcon.vue.js";
|
|
@@ -18,16 +18,16 @@ const ye = ["data-testid"], fe = ["data-testid"], Se = ["data-testid"], ke = ["d
|
|
|
18
18
|
}, Te = ["onClick"], Ce = { class: "table-head-container" }, Ee = ["data-testid"], xe = ["onMouseenter"], Be = {
|
|
19
19
|
key: 0,
|
|
20
20
|
class: "checkbox-cell"
|
|
21
|
-
},
|
|
21
|
+
}, Ve = {
|
|
22
22
|
key: 1,
|
|
23
23
|
class: "expand-toggle-cell"
|
|
24
24
|
}, we = {
|
|
25
25
|
key: 2,
|
|
26
26
|
class: "expanded-row"
|
|
27
|
-
},
|
|
27
|
+
}, Ie = { key: 1 }, Pe = {
|
|
28
28
|
key: 0,
|
|
29
29
|
class: "table-footer"
|
|
30
|
-
},
|
|
30
|
+
}, pe = /* @__PURE__ */ ee({
|
|
31
31
|
__name: "DataGrid",
|
|
32
32
|
props: {
|
|
33
33
|
title: { default: "" },
|
|
@@ -57,66 +57,60 @@ const ye = ["data-testid"], fe = ["data-testid"], Se = ["data-testid"], ke = ["d
|
|
|
57
57
|
},
|
|
58
58
|
emits: ["update:sort", "update:search", "update:selection", "onScroll", "saveRow", "loadMore"],
|
|
59
59
|
setup(s, { emit: S }) {
|
|
60
|
-
const
|
|
60
|
+
const o = s;
|
|
61
61
|
te((a) => ({
|
|
62
|
-
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
b72a9fc4: s.zIndexBase,
|
|
63
|
+
"30b75412": e(J),
|
|
64
|
+
b002aaea: e(H),
|
|
65
|
+
"2e048053": e(q)
|
|
66
66
|
}));
|
|
67
67
|
const b = se(), {
|
|
68
|
-
list:
|
|
69
|
-
containerProps:
|
|
70
|
-
wrapperProps:
|
|
68
|
+
list: A,
|
|
69
|
+
containerProps: G,
|
|
70
|
+
wrapperProps: p,
|
|
71
71
|
activeRow: w,
|
|
72
|
-
gridColumnTemplate:
|
|
72
|
+
gridColumnTemplate: H,
|
|
73
73
|
toggleSortOrder: Y,
|
|
74
|
-
columnsStickyPositions:
|
|
75
|
-
hasSearchSlot:
|
|
76
|
-
containerStyle:
|
|
74
|
+
columnsStickyPositions: L,
|
|
75
|
+
hasSearchSlot: Q,
|
|
76
|
+
containerStyle: W,
|
|
77
77
|
onScroll: N,
|
|
78
78
|
savingRows: F,
|
|
79
79
|
hasExpandSlot: v,
|
|
80
|
-
toggleExpandRow:
|
|
81
|
-
cssRowHeight:
|
|
82
|
-
cssExpandGridCol:
|
|
83
|
-
isRowExpanded:
|
|
80
|
+
toggleExpandRow: j,
|
|
81
|
+
cssRowHeight: q,
|
|
82
|
+
cssExpandGridCol: J,
|
|
83
|
+
isRowExpanded: I,
|
|
84
84
|
hasCheckboxes: M
|
|
85
|
-
} = ne(
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
z(a) ? $(d.selection.filter((o) => o !== a)) : $([...d.selection, a]);
|
|
85
|
+
} = ne(o, S), O = g(() => !!b.footer), k = he(o, "search", S), z = g(() => o.selection.length || 0), P = g(
|
|
86
|
+
() => o.rows.length && z.value === o.rows.length
|
|
87
|
+
), D = (a) => o.selection.includes(a), K = (a) => {
|
|
88
|
+
D(a) ? $(o.selection.filter((c) => c !== a)) : $([...o.selection, a]);
|
|
90
89
|
}, X = () => {
|
|
91
|
-
|
|
92
|
-
$([]);
|
|
93
|
-
else {
|
|
94
|
-
const a = d.rows.map((o, t) => d.getRowId(o, t)).filter((o) => !d.selection.includes(o));
|
|
95
|
-
$([...d.selection, ...a]);
|
|
96
|
-
}
|
|
90
|
+
P.value ? $([]) : $(o.rows.map((a, c) => o.getRowId(a, c)));
|
|
97
91
|
}, $ = (a) => {
|
|
98
92
|
S("update:selection", a);
|
|
99
93
|
}, Z = g(
|
|
100
|
-
() =>
|
|
94
|
+
() => o.emptyStateVariant ?? (k.value ? "no-results" : "no-data")
|
|
101
95
|
), _ = g(
|
|
102
|
-
() =>
|
|
96
|
+
() => o.emptyStateSubtitle ? o.emptyStateSubtitle : k.value ? "Search again with different filters" : void 0
|
|
103
97
|
);
|
|
104
|
-
return (a,
|
|
98
|
+
return (a, c) => (i(), l("div", {
|
|
105
99
|
class: "table-container",
|
|
106
100
|
"data-testid": `${s.testId}-${e(f).CONTAINER}`,
|
|
107
|
-
onMouseleave:
|
|
101
|
+
onMouseleave: c[2] || (c[2] = (t) => w.value = null)
|
|
108
102
|
}, [
|
|
109
103
|
r("table", {
|
|
110
|
-
ref: e(
|
|
111
|
-
style: R(e(
|
|
104
|
+
ref: e(G).ref,
|
|
105
|
+
style: R(e(W)),
|
|
112
106
|
class: y({
|
|
113
107
|
hasFooter: e(O)
|
|
114
108
|
}),
|
|
115
109
|
"data-testid": `${s.testId}-${e(f).TABLE}`,
|
|
116
|
-
onScrollPassive:
|
|
110
|
+
onScrollPassive: c[1] || (c[1] = //@ts-ignore
|
|
117
111
|
(...t) => e(N) && e(N)(...t))
|
|
118
112
|
}, [
|
|
119
|
-
s.title || e(b).title || e(
|
|
113
|
+
s.title || e(b).title || e(Q) || e(b)["table-header-actions"] ? (i(), l("div", {
|
|
120
114
|
key: 0,
|
|
121
115
|
class: y(["table-header", { isStickyHeader: s.isStickyHeader }]),
|
|
122
116
|
"data-testid": `${s.testId}-${e(f).HEADER}`
|
|
@@ -125,8 +119,8 @@ const ye = ["data-testid"], fe = ["data-testid"], Se = ["data-testid"], ke = ["d
|
|
|
125
119
|
class: "table-title",
|
|
126
120
|
"data-testid": `${s.testId}-${e(f).TITLE}`
|
|
127
121
|
}, [
|
|
128
|
-
|
|
129
|
-
u(e(
|
|
122
|
+
n(a.$slots, "title", {}, () => [
|
|
123
|
+
u(e(V), { variant: "h3" }, {
|
|
130
124
|
default: T(() => [
|
|
131
125
|
C(E(s.title), 1)
|
|
132
126
|
]),
|
|
@@ -138,11 +132,11 @@ const ye = ["data-testid"], fe = ["data-testid"], Se = ["data-testid"], ke = ["d
|
|
|
138
132
|
class: "table-header-right",
|
|
139
133
|
"data-testid": `${s.testId}-${e(f).HEADER_RIGHT}`
|
|
140
134
|
}, [
|
|
141
|
-
s.showSearch ?
|
|
135
|
+
s.showSearch ? n(a.$slots, "search", { key: 0 }, () => [
|
|
142
136
|
r("div", ge, [
|
|
143
137
|
u(e(ue), {
|
|
144
138
|
modelValue: e(k),
|
|
145
|
-
"onUpdate:modelValue":
|
|
139
|
+
"onUpdate:modelValue": c[0] || (c[0] = (t) => ae(k) ? k.value = t : null),
|
|
146
140
|
placeholder: s.searchPlaceholder,
|
|
147
141
|
"auto-focus": s.searchAutoFocus,
|
|
148
142
|
"test-id": s.testId
|
|
@@ -155,7 +149,7 @@ const ye = ["data-testid"], fe = ["data-testid"], Se = ["data-testid"], ke = ["d
|
|
|
155
149
|
class: "table-header-actions",
|
|
156
150
|
"data-testid": `${s.testId}-${e(f).ACTIONS}`
|
|
157
151
|
}, [
|
|
158
|
-
|
|
152
|
+
n(a.$slots, "table-header-actions", {}, void 0, !0)
|
|
159
153
|
], 8, be)) : h("", !0)
|
|
160
154
|
], 10, Se)) : h("", !0),
|
|
161
155
|
r("thead", {
|
|
@@ -169,12 +163,12 @@ const ye = ["data-testid"], fe = ["data-testid"], Se = ["data-testid"], ke = ["d
|
|
|
169
163
|
key: t.id,
|
|
170
164
|
class: y(["section-container", { sticky: t.isSticky }])
|
|
171
165
|
}, [
|
|
172
|
-
|
|
166
|
+
n(a.$slots, `section-${t.id}`, {}, () => [
|
|
173
167
|
r("div", {
|
|
174
168
|
style: R({ width: t.width + "px" }),
|
|
175
169
|
class: y({ section: !0 })
|
|
176
170
|
}, [
|
|
177
|
-
u(e(
|
|
171
|
+
u(e(V), { variant: "body2" }, {
|
|
178
172
|
default: T(() => [
|
|
179
173
|
C(E(t.title), 1)
|
|
180
174
|
]),
|
|
@@ -186,13 +180,12 @@ const ye = ["data-testid"], fe = ["data-testid"], Se = ["data-testid"], ke = ["d
|
|
|
186
180
|
], 8, ve),
|
|
187
181
|
r("tr", null, [
|
|
188
182
|
e(M) ? (i(), l("th", $e, [
|
|
189
|
-
|
|
190
|
-
u(e(
|
|
191
|
-
|
|
192
|
-
"is-
|
|
193
|
-
"is-indeterminate": !e(L) && e(J) > 0,
|
|
183
|
+
n(a.$slots, "select-all-checkbox", {}, () => [
|
|
184
|
+
u(e(U), {
|
|
185
|
+
"is-checked": e(P),
|
|
186
|
+
"is-indeterminate": !e(P) && e(z) > 0,
|
|
194
187
|
"onUpdate:isChecked": X
|
|
195
|
-
}, null, 8, ["
|
|
188
|
+
}, null, 8, ["is-checked", "is-indeterminate"])
|
|
196
189
|
], !0)
|
|
197
190
|
])) : h("", !0),
|
|
198
191
|
e(v) ? (i(), l("th", Re)) : h("", !0),
|
|
@@ -206,12 +199,12 @@ const ye = ["data-testid"], fe = ["data-testid"], Se = ["data-testid"], ke = ["d
|
|
|
206
199
|
isSortable: t.isSortable,
|
|
207
200
|
[`column-${t.id}`]: !0
|
|
208
201
|
}),
|
|
209
|
-
style: R(t.isSticky ? e(
|
|
202
|
+
style: R(t.isSticky ? e(L)[t.id] : null),
|
|
210
203
|
onClick: (m) => t.isSortable ? e(Y)(t) : null
|
|
211
204
|
}, [
|
|
212
205
|
r("div", Ce, [
|
|
213
|
-
|
|
214
|
-
u(e(
|
|
206
|
+
n(a.$slots, `header-${t.id}`, { column: t }, () => [
|
|
207
|
+
u(e(V), { variant: "tableLabel" }, {
|
|
215
208
|
default: T(() => [
|
|
216
209
|
C(E(t.title), 1)
|
|
217
210
|
]),
|
|
@@ -227,77 +220,77 @@ const ye = ["data-testid"], fe = ["data-testid"], Se = ["data-testid"], ke = ["d
|
|
|
227
220
|
])
|
|
228
221
|
], 2),
|
|
229
222
|
r("tbody", null, [
|
|
230
|
-
e(
|
|
223
|
+
e(A).length > 0 ? (i(), l("div", le({
|
|
231
224
|
key: 0,
|
|
232
225
|
class: "table-body-wrapper",
|
|
233
226
|
"data-testid": `${s.testId}-${e(f).BODY_WRAPPER}`
|
|
234
|
-
}, e(
|
|
235
|
-
(i(!0), l(x, null, B(e(
|
|
227
|
+
}, e(p)), [
|
|
228
|
+
(i(!0), l(x, null, B(e(A), (t) => (i(), l("tr", {
|
|
236
229
|
key: t.index,
|
|
237
230
|
class: y(["table-row", {
|
|
238
231
|
loading: s.isLoading || s.isLoading && !t.data || e(F).includes(t.index),
|
|
239
232
|
active: e(w) === t.index,
|
|
240
|
-
expanded: e(v) && e(
|
|
233
|
+
expanded: e(v) && e(I)(t.index)
|
|
241
234
|
}]),
|
|
242
235
|
onMouseenter: (m) => w.value = t.index
|
|
243
236
|
}, [
|
|
244
237
|
e(M) ? (i(), l("td", Be, [
|
|
245
|
-
u(e(
|
|
246
|
-
"is-checked":
|
|
238
|
+
u(e(U), {
|
|
239
|
+
"is-checked": D(s.getRowId(t.data, t.index)),
|
|
247
240
|
size: "sm",
|
|
248
241
|
"onUpdate:isChecked": (m) => K(s.getRowId(t.data, t.index))
|
|
249
242
|
}, null, 8, ["is-checked", "onUpdate:isChecked"])
|
|
250
243
|
])) : h("", !0),
|
|
251
|
-
e(v) ? (i(), l("td",
|
|
244
|
+
e(v) ? (i(), l("td", Ve, [
|
|
252
245
|
u(re, {
|
|
253
|
-
expanded: e(
|
|
254
|
-
onClick: (m) => e(
|
|
246
|
+
expanded: e(I)(t.index),
|
|
247
|
+
onClick: (m) => e(j)(t.index, m)
|
|
255
248
|
}, null, 8, ["expanded", "onClick"])
|
|
256
249
|
])) : h("", !0),
|
|
257
|
-
(i(!0), l(x, null, B(s.columns, (m,
|
|
258
|
-
key:
|
|
250
|
+
(i(!0), l(x, null, B(s.columns, (m, d) => (i(), l("td", {
|
|
251
|
+
key: d,
|
|
259
252
|
class: y({
|
|
260
|
-
sticky: s.columns[
|
|
261
|
-
isStickyRight: s.columns[
|
|
262
|
-
bordered: s.columns[
|
|
263
|
-
isTextRight: s.columns[
|
|
264
|
-
[`column-${s.columns[
|
|
253
|
+
sticky: s.columns[d].isSticky,
|
|
254
|
+
isStickyRight: s.columns[d].isStickyRight,
|
|
255
|
+
bordered: s.columns[d].isBordered,
|
|
256
|
+
isTextRight: s.columns[d].isTextRight,
|
|
257
|
+
[`column-${s.columns[d].id}`]: !0
|
|
265
258
|
}),
|
|
266
259
|
style: R(
|
|
267
|
-
s.columns[
|
|
260
|
+
s.columns[d].isSticky ? e(L)[s.columns[d].id] : null
|
|
268
261
|
)
|
|
269
262
|
}, [
|
|
270
|
-
!s.isLoading || s.isLoading && t.data[
|
|
263
|
+
!s.isLoading || s.isLoading && t.data[d] ? (i(), l("div", {
|
|
271
264
|
key: 0,
|
|
272
|
-
class: y(["table-cell", { last:
|
|
265
|
+
class: y(["table-cell", { last: d === t.data.length - 1 }])
|
|
273
266
|
}, [
|
|
274
|
-
|
|
275
|
-
cell: t.data[
|
|
267
|
+
n(a.$slots, `cell-${s.columns[d].id}`, {
|
|
268
|
+
cell: t.data[d],
|
|
276
269
|
isLoading: e(F).includes(t.index),
|
|
277
|
-
cellIndex:
|
|
270
|
+
cellIndex: d,
|
|
278
271
|
row: t,
|
|
279
272
|
rowIndex: t.index
|
|
280
273
|
}, () => [
|
|
281
|
-
u(e(
|
|
274
|
+
u(e(V), { variant: "body1" }, {
|
|
282
275
|
default: T(() => [
|
|
283
|
-
C(E(t.data[
|
|
276
|
+
C(E(t.data[d]), 1)
|
|
284
277
|
]),
|
|
285
278
|
_: 2
|
|
286
279
|
}, 1024)
|
|
287
280
|
], !0)
|
|
288
|
-
], 2)) :
|
|
281
|
+
], 2)) : n(a.$slots, "loader", { key: 1 }, () => [
|
|
289
282
|
u(e(de), { round: "" })
|
|
290
283
|
], !0)
|
|
291
284
|
], 6))), 128)),
|
|
292
|
-
e(v) && e(
|
|
293
|
-
|
|
285
|
+
e(v) && e(I)(t.index) ? (i(), l("div", we, [
|
|
286
|
+
n(a.$slots, "expanded", {
|
|
294
287
|
row: t,
|
|
295
|
-
gridColumnTemplate: e(
|
|
288
|
+
gridColumnTemplate: e(H)
|
|
296
289
|
}, void 0, !0)
|
|
297
290
|
])) : h("", !0)
|
|
298
291
|
], 42, xe))), 128))
|
|
299
|
-
], 16, Ee)) : (i(), l("div",
|
|
300
|
-
|
|
292
|
+
], 16, Ee)) : (i(), l("div", Ie, [
|
|
293
|
+
n(a.$slots, "empty-state", {}, () => [
|
|
301
294
|
u(e(oe), {
|
|
302
295
|
class: "empty-state",
|
|
303
296
|
title: s.emptyStateTitle,
|
|
@@ -309,12 +302,12 @@ const ye = ["data-testid"], fe = ["data-testid"], Se = ["data-testid"], ke = ["d
|
|
|
309
302
|
]))
|
|
310
303
|
])
|
|
311
304
|
], 46, fe),
|
|
312
|
-
e(O) ? (i(), l("div",
|
|
313
|
-
|
|
305
|
+
e(O) ? (i(), l("div", Pe, [
|
|
306
|
+
n(a.$slots, "footer", {}, void 0, !0)
|
|
314
307
|
])) : h("", !0)
|
|
315
308
|
], 40, ye));
|
|
316
309
|
}
|
|
317
310
|
});
|
|
318
311
|
export {
|
|
319
|
-
|
|
312
|
+
pe as default
|
|
320
313
|
};
|
|
@@ -7,7 +7,7 @@ export type ValidationStateType<T> = {
|
|
|
7
7
|
};
|
|
8
8
|
export type FormValidationSchemaYupType<T> = Record<keyof T, yup.AnySchema<any, any, any, any>>;
|
|
9
9
|
export type UseFormValidationType<T> = {
|
|
10
|
-
formState: T
|
|
10
|
+
formState: Ref<T>;
|
|
11
11
|
formValidationSchema: FormValidationSchemaYupType<T>;
|
|
12
12
|
};
|
|
13
13
|
export type UseFormValidationReponseType<T> = {
|
|
@@ -17,5 +17,5 @@ export type UseFormValidationReponseType<T> = {
|
|
|
17
17
|
};
|
|
18
18
|
export declare const scrollToElementByClass: (elementClass: string, index?: number) => void;
|
|
19
19
|
export declare const scrollToFirstInvalidElement: <T>(validationErrors: Partial<Record<keyof T, string>>) => void;
|
|
20
|
-
export declare const yupValidation: <T>(schema: FormValidationSchemaYupType<T>, formState: T) => ValidationStateType<T>;
|
|
20
|
+
export declare const yupValidation: <T>(schema: FormValidationSchemaYupType<T>, formState: Ref<T>) => ValidationStateType<T>;
|
|
21
21
|
export declare const useFormValidation: <T extends object>({ formState, formValidationSchema, }: UseFormValidationType<T>) => UseFormValidationReponseType<T>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { ref as
|
|
1
|
+
import * as m from "yup";
|
|
2
|
+
import { ref as u, reactive as f, watch as v } from "vue";
|
|
3
3
|
const E = (e, r = 0) => {
|
|
4
4
|
try {
|
|
5
5
|
window.document.getElementsByClassName(e)[r].scrollIntoView({ behavior: "smooth" });
|
|
@@ -10,25 +10,25 @@ const E = (e, r = 0) => {
|
|
|
10
10
|
const r = Object.keys(e)?.[0];
|
|
11
11
|
r && E(`form-field-${r}`);
|
|
12
12
|
}, y = (e, r) => {
|
|
13
|
-
const o =
|
|
13
|
+
const o = m.object().shape(e);
|
|
14
14
|
try {
|
|
15
|
-
return o.validateSync(r, { abortEarly: !1 }), { isValid: !0, errors: {} };
|
|
15
|
+
return o.validateSync(r.value, { abortEarly: !1 }), { isValid: !0, errors: {} };
|
|
16
16
|
} catch (i) {
|
|
17
|
-
return { isValid: !1, errors: i.inner.reduce((s,
|
|
17
|
+
return { isValid: !1, errors: i.inner.reduce((s, l) => (s[l.path] = l.message, s), {}) };
|
|
18
18
|
}
|
|
19
19
|
}, b = ({
|
|
20
20
|
formState: e,
|
|
21
21
|
formValidationSchema: r
|
|
22
22
|
}) => {
|
|
23
|
-
const o =
|
|
24
|
-
const { isValid:
|
|
25
|
-
o.value = !0, i.value =
|
|
23
|
+
const o = u(!1), i = u(!0), t = f({}), s = (l) => {
|
|
24
|
+
const { isValid: n, errors: c } = y(r, e);
|
|
25
|
+
o.value = !0, i.value = n, Object.keys(t).forEach((a) => {
|
|
26
26
|
a && !c[a] && delete t[a];
|
|
27
|
-
}), Object.entries(c).forEach(([a,
|
|
28
|
-
t[a] =
|
|
29
|
-
}), !
|
|
27
|
+
}), Object.entries(c).forEach(([a, d]) => {
|
|
28
|
+
t[a] = d;
|
|
29
|
+
}), !n && !l && h(t);
|
|
30
30
|
};
|
|
31
|
-
return v(e, () => {
|
|
31
|
+
return v(e.value, () => {
|
|
32
32
|
o.value && s(!0);
|
|
33
33
|
}), {
|
|
34
34
|
validationErrors: t,
|
package/index.js
CHANGED
|
@@ -13,8 +13,8 @@ import { TypographyTypes as no } from "./components/typography/index.js";
|
|
|
13
13
|
import { TypographyTypesV4 as uo } from "./components/typography/v4/index.js";
|
|
14
14
|
import { PopoverTypes as To } from "./components/popover/index.js";
|
|
15
15
|
import { MultiBarTypes as yo } from "./components/multibar/index.js";
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
16
|
+
import { FoldableSectionTypes as Fo } from "./components/layout/index.js";
|
|
17
|
+
import { FormCardTypes as Do, FormFieldTypes as Eo } from "./components/forms/index.js";
|
|
18
18
|
import * as o from "./components/button/v3/index.js";
|
|
19
19
|
import * as r from "./components/button/v4/index.js";
|
|
20
20
|
import * as e from "./components/chip/v3/index.js";
|
|
@@ -42,57 +42,57 @@ import * as E from "./components/toggle/v4/index.js";
|
|
|
42
42
|
import * as A from "./components/tooltip/v3/index.js";
|
|
43
43
|
import * as B from "./components/tooltip/v4/index.js";
|
|
44
44
|
import * as C from "./components/table/v3/index.js";
|
|
45
|
-
import * as
|
|
46
|
-
import * as
|
|
47
|
-
import * as
|
|
48
|
-
import * as
|
|
45
|
+
import * as b from "./components/table/v4/index.js";
|
|
46
|
+
import * as h from "./components/table-cells/v3/index.js";
|
|
47
|
+
import * as w from "./components/table-cells/v4/index.js";
|
|
48
|
+
import * as M from "./components/skeleton/v3/index.js";
|
|
49
49
|
import * as P from "./components/skeleton/v4/index.js";
|
|
50
50
|
import * as v from "./components/emptyState/v3/index.js";
|
|
51
51
|
import * as k from "./components/emptyState/v4/index.js";
|
|
52
52
|
import * as O from "./components/snackbar/v3/index.js";
|
|
53
53
|
import * as R from "./components/snackbar/v4/index.js";
|
|
54
|
-
import * as
|
|
55
|
-
import * as
|
|
56
|
-
import * as
|
|
57
|
-
import * as
|
|
54
|
+
import * as S from "./components/radioButton/v3/index.js";
|
|
55
|
+
import * as V from "./components/radioButton/v4/index.js";
|
|
56
|
+
import * as H from "./components/ThemeWrapper/index.js";
|
|
57
|
+
import * as N from "./components/appHeader/index.js";
|
|
58
58
|
import * as _ from "./components/inlineCopy/index.js";
|
|
59
|
-
import { TextAreaTypes as
|
|
60
|
-
import { useToggle as
|
|
59
|
+
import { TextAreaTypes as Bo } from "./components/textArea/index.js";
|
|
60
|
+
import { useToggle as bo } from "./composables/useToggle.js";
|
|
61
61
|
import { useSearch as wo } from "./composables/useSearch.js";
|
|
62
|
-
import { scrollToElementByClass as
|
|
63
|
-
import { DateRangeTypes as
|
|
62
|
+
import { scrollToElementByClass as Po, scrollToFirstInvalidElement as vo, useFormValidation as ko, yupValidation as Oo } from "./composables/useFormValidation.js";
|
|
63
|
+
import { DateRangeTypes as So } from "./components/dateRange/index.js";
|
|
64
64
|
import { DatePickerTypes as Ho } from "./components/datePicker/index.js";
|
|
65
|
-
import { BannerTypes as
|
|
66
|
-
import { default as
|
|
67
|
-
import { default as
|
|
68
|
-
import { default as
|
|
69
|
-
import { default as
|
|
70
|
-
import { default as
|
|
71
|
-
import { default as
|
|
72
|
-
import { default as
|
|
73
|
-
import { default as
|
|
74
|
-
import { default as
|
|
75
|
-
import { default as
|
|
76
|
-
import { default as
|
|
77
|
-
import { default as
|
|
78
|
-
import { default as
|
|
79
|
-
import { default as
|
|
80
|
-
import { default as
|
|
81
|
-
import { default as
|
|
82
|
-
import { default as
|
|
83
|
-
import { default as
|
|
84
|
-
import { default as
|
|
85
|
-
import { default as
|
|
65
|
+
import { BannerTypes as _o } from "./components/banner/index.js";
|
|
66
|
+
import { default as qo } from "./components/appTrigger/AppTrigger.vue.js";
|
|
67
|
+
import { default as Jo } from "./components/autocompleteDropdown/AutocompleteDropdown.vue.js";
|
|
68
|
+
import { default as Yo } from "./components/menuItem/MenuItem.vue.js";
|
|
69
|
+
import { default as Lo } from "./components/menu/Menu.vue.js";
|
|
70
|
+
import { default as Uo } from "./components/appIcon/AppIcon.vue.js";
|
|
71
|
+
import { default as Xo } from "./components/floatingToolbar/FloatingToolbar.vue.js";
|
|
72
|
+
import { default as or } from "./components/includeExclude/IncludeExclude.vue.js";
|
|
73
|
+
import { default as er } from "./components/includeExclude/IncludeExcludeDragDrop.vue.js";
|
|
74
|
+
import { default as mr } from "./components/includeExclude/IncludeExcludeOption.vue.js";
|
|
75
|
+
import { default as ar } from "./components/includeExclude/IncludeExcludeOptionDraggable.vue.js";
|
|
76
|
+
import { default as ir } from "./components/includeExclude/IncludeExcludeAppTrigger.vue.js";
|
|
77
|
+
import { default as sr } from "./components/includeExclude/IncludeExcludeAppHeader.vue.js";
|
|
78
|
+
import { default as nr } from "./components/includeExclude/IncludeExcludeChipFilter.vue.js";
|
|
79
|
+
import { default as ur } from "./components/cssBaseline/CssBaseline.vue.js";
|
|
80
|
+
import { default as Tr } from "./components/filterDropdown/FilterDropdown.vue.js";
|
|
81
|
+
import { default as yr } from "./components/filterDropdown/AddFilterButton.vue.js";
|
|
82
|
+
import { default as Fr } from "./components/typography/Heading.vue.js";
|
|
83
|
+
import { default as Dr } from "./components/typography/Text.vue.js";
|
|
84
|
+
import { default as Ar } from "./components/typography/v4/Typography.vue.js";
|
|
85
|
+
import { default as Cr } from "./components/popover/Popover.vue.js";
|
|
86
86
|
import { default as hr } from "./components/multibar/MultiBar.vue.js";
|
|
87
|
-
import { default as Mr } from "./components/layout/
|
|
88
|
-
import { default as
|
|
89
|
-
import { default as
|
|
90
|
-
import { default as
|
|
87
|
+
import { default as Mr } from "./components/layout/FoldableSection.vue.js";
|
|
88
|
+
import { default as vr } from "./components/forms/FormRow.vue.js";
|
|
89
|
+
import { default as Or } from "./components/forms/FormCard.vue.js";
|
|
90
|
+
import { default as Sr } from "./components/forms/CardPanel.vue.js";
|
|
91
91
|
import { default as Hr } from "./components/forms/FormField.vue.js";
|
|
92
|
-
import { default as
|
|
93
|
-
import { default as
|
|
94
|
-
import { default as
|
|
95
|
-
import { default as
|
|
92
|
+
import { default as _r } from "./components/textArea/TextArea.vue.js";
|
|
93
|
+
import { default as qr } from "./components/dateRange/DateRange.vue.js";
|
|
94
|
+
import { default as Jr } from "./components/datePicker/DatePicker.vue.js";
|
|
95
|
+
import { default as Yr } from "./components/banner/Banner.vue.js";
|
|
96
96
|
const j = {
|
|
97
97
|
...e,
|
|
98
98
|
...t,
|
|
@@ -119,80 +119,81 @@ const j = {
|
|
|
119
119
|
...D,
|
|
120
120
|
...E,
|
|
121
121
|
...C,
|
|
122
|
+
...b,
|
|
122
123
|
...h,
|
|
123
124
|
...w,
|
|
124
|
-
...M,
|
|
125
125
|
...v,
|
|
126
126
|
...k,
|
|
127
|
-
...
|
|
127
|
+
...M,
|
|
128
128
|
...P,
|
|
129
129
|
...O,
|
|
130
130
|
...R,
|
|
131
131
|
...n,
|
|
132
132
|
...l,
|
|
133
|
+
...S,
|
|
133
134
|
...V,
|
|
134
135
|
...H,
|
|
135
136
|
...N,
|
|
136
|
-
...S,
|
|
137
137
|
..._
|
|
138
138
|
};
|
|
139
139
|
export {
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
yr as AddFilterButton,
|
|
141
|
+
Uo as AppIcon,
|
|
142
142
|
X as AppIconTypes,
|
|
143
|
-
|
|
143
|
+
qo as AppTrigger,
|
|
144
144
|
J as AppTriggerTypes,
|
|
145
|
-
|
|
145
|
+
Jo as AutocompleteDropdown,
|
|
146
146
|
Y as AutocompleteDropdownTypes,
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
147
|
+
Yr as Banner,
|
|
148
|
+
_o as BannerTypes,
|
|
149
|
+
Sr as CardPanel,
|
|
150
|
+
ur as CssBaseline,
|
|
151
151
|
mo as CssBaselineTypes,
|
|
152
|
-
|
|
152
|
+
Jr as DatePicker,
|
|
153
153
|
Ho as DatePickerTypes,
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
154
|
+
qr as DateRange,
|
|
155
|
+
So as DateRangeTypes,
|
|
156
|
+
Tr as FilterDropdown,
|
|
157
157
|
so as FilterDropdownTypes,
|
|
158
|
-
|
|
158
|
+
Xo as FloatingToolbar,
|
|
159
159
|
oo as FloatingToolbarTypes,
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
160
|
+
Mr as FoldableSection,
|
|
161
|
+
Fo as FoldableSectionTypes,
|
|
162
|
+
Or as FormCard,
|
|
163
|
+
Do as FormCardTypes,
|
|
163
164
|
Hr as FormField,
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
165
|
+
Eo as FormFieldTypes,
|
|
166
|
+
vr as FormRow,
|
|
167
|
+
Fr as Heading,
|
|
167
168
|
ao as ID_INJECTION_KEY,
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
169
|
+
or as IncludeExclude,
|
|
170
|
+
sr as IncludeExcludeAppHeader,
|
|
171
|
+
ir as IncludeExcludeAppTrigger,
|
|
172
|
+
nr as IncludeExcludeChipFilter,
|
|
173
|
+
er as IncludeExcludeDragDrop,
|
|
174
|
+
mr as IncludeExcludeOption,
|
|
175
|
+
ar as IncludeExcludeOptionDraggable,
|
|
175
176
|
eo as IncludeExcludeTypes,
|
|
176
|
-
|
|
177
|
-
|
|
177
|
+
Lo as Menu,
|
|
178
|
+
Yo as MenuItem,
|
|
178
179
|
L as MenuItemTypes,
|
|
179
180
|
U as MenuTypes,
|
|
180
181
|
hr as MultiBar,
|
|
181
182
|
yo as MultiBarTypes,
|
|
182
|
-
|
|
183
|
+
Cr as Popover,
|
|
183
184
|
To as PopoverTypes,
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
185
|
+
Dr as Text,
|
|
186
|
+
_r as TextArea,
|
|
187
|
+
Bo as TextAreaTypes,
|
|
188
|
+
Ar as Typography,
|
|
188
189
|
no as TypographyTypes,
|
|
189
190
|
uo as TypographyTypesV4,
|
|
190
191
|
j as default,
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
192
|
+
Po as scrollToElementByClass,
|
|
193
|
+
vo as scrollToFirstInvalidElement,
|
|
194
|
+
ko as useFormValidation,
|
|
194
195
|
fo as useId,
|
|
195
196
|
wo as useSearch,
|
|
196
|
-
|
|
197
|
-
|
|
197
|
+
bo as useToggle,
|
|
198
|
+
Oo as yupValidation
|
|
198
199
|
};
|