@kong-ui-public/entities-plugins 9.222.4 → 9.222.6
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/entities-plugins.es.js +7893 -7893
- package/dist/entities-plugins.umd.js +108 -108
- package/dist/filler/cypress/index.js +64 -63
- package/dist/filler/packages/entities/entities-plugins/src/components/free-form/filler/cypress/handlers/enum.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/PluginForm.vue.d.ts.map +1 -1
- package/dist/types/components/select/PluginCatalogCard.vue.d.ts.map +1 -1
- package/dist/types/components/select/PluginSelectCard.vue.d.ts.map +1 -1
- package/package.json +12 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as f, i as w, c as S, g as b, w as A, a as
|
|
1
|
+
import { s as f, i as w, c as S, g as b, w as A, a as I, b as v, d as F } from "../field-walker-_YAwDcC1.js";
|
|
2
2
|
const m = {
|
|
3
3
|
type: { force: !0 },
|
|
4
4
|
click: { force: !0 },
|
|
@@ -6,60 +6,61 @@ const m = {
|
|
|
6
6
|
clear: { force: !0 }
|
|
7
7
|
};
|
|
8
8
|
function B(r) {
|
|
9
|
-
const { fieldKey:
|
|
9
|
+
const { fieldKey: c, value: e, actionOptions: t = m } = r, l = f.field(c);
|
|
10
10
|
cy.get(l).then((i) => {
|
|
11
11
|
t.clear !== !1 && cy.wrap(i).clear(t.clear), e != null && e !== "" && cy.wrap(i).type(String(e), t.type);
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
14
|
function C(r) {
|
|
15
|
-
const { fieldKey:
|
|
15
|
+
const { fieldKey: c, value: e, actionOptions: t = m } = r, l = f.field(c);
|
|
16
16
|
cy.get(l).then((i) => {
|
|
17
17
|
t.clear !== !1 && cy.wrap(i).clear(t.clear), e != null && cy.wrap(i).type(String(e), t.type);
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
function E(r) {
|
|
21
|
-
const { fieldKey:
|
|
21
|
+
const { fieldKey: c, value: e, actionOptions: t = m } = r, l = f.field(c);
|
|
22
22
|
e === !0 ? cy.get(l).check(t.check) : e === !1 && cy.get(l).uncheck(t.check);
|
|
23
23
|
}
|
|
24
24
|
function j(r) {
|
|
25
25
|
var h;
|
|
26
|
-
const { fieldKey:
|
|
26
|
+
const { fieldKey: c, fieldSchema: e, value: t, actionOptions: l = m } = r, i = w(e), y = i ? Array.isArray(t) ? t : [t] : [t], d = f.field(c);
|
|
27
27
|
cy.get(d).scrollIntoView(), cy.get(d).click(l.click);
|
|
28
|
-
const g = f.selectTrigger(
|
|
28
|
+
const g = f.selectTrigger(c);
|
|
29
|
+
cy.get(g).scrollIntoView();
|
|
29
30
|
for (const a of e.one_of ?? ((h = e.elements) == null ? void 0 : h.one_of) ?? [])
|
|
30
31
|
if (a != null) {
|
|
31
|
-
const
|
|
32
|
-
i && cy.get(g).find(
|
|
33
|
-
o.find("button.selected").length > 0 && cy.get("button").click();
|
|
34
|
-
}), y.includes(a) && cy.get(g).find(
|
|
32
|
+
const n = i ? f.multiSelectItem(String(a)) : f.selectItem(String(a));
|
|
33
|
+
i && cy.get(g).find(n).within((o) => {
|
|
34
|
+
o.find("button.selected").length > 0 && (cy.get("button").scrollIntoView(), cy.get("button").click());
|
|
35
|
+
}), y.includes(a) && (cy.get(g).find(n).scrollIntoView(), cy.get(g).find(n).click());
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
38
|
function x(r) {
|
|
38
|
-
const { fieldKey:
|
|
39
|
+
const { fieldKey: c, value: e, actionOptions: t = m } = r, l = Array.isArray(e) ? e : [e], i = f.tagInput(c);
|
|
39
40
|
cy.get(i).type(l.join(","), t.type);
|
|
40
41
|
}
|
|
41
42
|
function M(r) {
|
|
42
|
-
const { fieldKey:
|
|
43
|
+
const { fieldKey: c, value: e, onFillItem: t } = r, l = f.arrayTabContainer(c), i = f.arrayBasicContainer(c);
|
|
43
44
|
cy.get("body").then((y) => {
|
|
44
45
|
const d = y.find(l).length > 0, g = y.find(i).length > 0;
|
|
45
46
|
if (d || g) {
|
|
46
|
-
const h = f.arrayRemoveBtns(
|
|
47
|
-
cy.get("body").then((
|
|
48
|
-
const o =
|
|
47
|
+
const h = f.arrayRemoveBtns(c), a = () => {
|
|
48
|
+
cy.get("body").then((n) => {
|
|
49
|
+
const o = n.find(h).first();
|
|
49
50
|
o.length > 0 && (cy.wrap(o).click(), a());
|
|
50
51
|
});
|
|
51
52
|
};
|
|
52
53
|
if (a(), !Array.isArray(e))
|
|
53
54
|
return;
|
|
54
|
-
for (let
|
|
55
|
-
const o = f.arrayAddBtn(
|
|
56
|
-
cy.get(o).scrollIntoView(), cy.get(o).click({ force: !0 }), t(
|
|
55
|
+
for (let n = 0; n < e.length; n++) {
|
|
56
|
+
const o = f.arrayAddBtn(c);
|
|
57
|
+
cy.get(o).scrollIntoView(), cy.get(o).click({ force: !0 }), t(n, e[n]);
|
|
57
58
|
}
|
|
58
59
|
}
|
|
59
60
|
});
|
|
60
61
|
}
|
|
61
62
|
function T(r) {
|
|
62
|
-
const { fieldKey:
|
|
63
|
+
const { fieldKey: c, value: e, onFillChildren: t } = r, l = f.objectSwitch(c);
|
|
63
64
|
cy.get("body").then((i) => {
|
|
64
65
|
const y = i.find(l).length > 0;
|
|
65
66
|
if (e == null && y) {
|
|
@@ -69,16 +70,16 @@ function T(r) {
|
|
|
69
70
|
y && cy.get(l).check({ force: !0 }), t();
|
|
70
71
|
});
|
|
71
72
|
}
|
|
72
|
-
function R(r,
|
|
73
|
+
function R(r, c) {
|
|
73
74
|
if (!r)
|
|
74
|
-
throw new Error(`Unable to find map entry test id for "${
|
|
75
|
+
throw new Error(`Unable to find map entry test id for "${c}"`);
|
|
75
76
|
const e = r.match(/kid:\d+/);
|
|
76
77
|
if (!e)
|
|
77
78
|
throw new Error(`Unable to extract map entry kid id from test id "${r}"`);
|
|
78
79
|
return e[0];
|
|
79
80
|
}
|
|
80
|
-
function
|
|
81
|
-
const { fieldKey:
|
|
81
|
+
function V(r) {
|
|
82
|
+
const { fieldKey: c, value: e, onFillEntry: t } = r, l = f.mapRemoveBtns(c), i = () => {
|
|
82
83
|
cy.get("body").then((d) => {
|
|
83
84
|
const g = d.find(l).first();
|
|
84
85
|
g.length > 0 && (cy.wrap(g).click(), i());
|
|
@@ -90,25 +91,25 @@ function N(r) {
|
|
|
90
91
|
if (y.length !== 0)
|
|
91
92
|
for (let d = 0; d < y.length; d++) {
|
|
92
93
|
const [g, h] = y[d];
|
|
93
|
-
cy.get(f.mapAddBtn(
|
|
94
|
-
const
|
|
95
|
-
t(
|
|
94
|
+
cy.get(f.mapAddBtn(c)).click(), cy.get(f.mapKey(c, d)).clear({ force: !0 }), cy.get(f.mapKey(c, d)).type(String(g), { force: !0 }), cy.get(f.mapContainer(c, d)).find(`[data-testid*="${c}.kid:"]`).first().invoke("attr", "data-testid").then((a) => {
|
|
95
|
+
const n = R(a, c);
|
|
96
|
+
t(n, h);
|
|
96
97
|
});
|
|
97
98
|
}
|
|
98
99
|
}
|
|
99
|
-
function
|
|
100
|
-
const { fieldKey:
|
|
100
|
+
function N(r) {
|
|
101
|
+
const { fieldKey: c, value: e, actionOptions: t = m } = r, l = f.json(c), i = typeof e == "string" ? e : JSON.stringify(e, null, 2);
|
|
101
102
|
cy.get(l).then((y) => {
|
|
102
103
|
t.clear !== !1 && cy.wrap(y.find("textarea")).clear(t.clear), cy.wrap(y.find("textarea")).type(i, t.type);
|
|
103
104
|
});
|
|
104
105
|
}
|
|
105
|
-
function
|
|
106
|
-
const { fieldKey:
|
|
106
|
+
function O(r) {
|
|
107
|
+
const { fieldKey: c, value: e, actionOptions: t = m } = r, l = f.field(c);
|
|
107
108
|
cy.get(l).click(t.click);
|
|
108
109
|
const i = typeof e == "object" && (e != null && e.id) ? e.id : e;
|
|
109
110
|
i && cy.get(`[data-testid="select-item-${i}"]`).click(t.click);
|
|
110
111
|
}
|
|
111
|
-
const
|
|
112
|
+
const J = {
|
|
112
113
|
fillString: B,
|
|
113
114
|
fillNumber: C,
|
|
114
115
|
fillBoolean: E,
|
|
@@ -116,82 +117,82 @@ const K = {
|
|
|
116
117
|
fillTag: x,
|
|
117
118
|
fillArray: M,
|
|
118
119
|
fillRecord: T,
|
|
119
|
-
fillMap:
|
|
120
|
-
fillJson:
|
|
121
|
-
fillForeign:
|
|
120
|
+
fillMap: V,
|
|
121
|
+
fillJson: N,
|
|
122
|
+
fillForeign: O
|
|
122
123
|
};
|
|
123
|
-
function $(r,
|
|
124
|
-
const e = S(r), t = { ...
|
|
125
|
-
function l(a,
|
|
126
|
-
for (const s of A(a,
|
|
124
|
+
function $(r, c) {
|
|
125
|
+
const e = S(r), t = { ...J, ...c };
|
|
126
|
+
function l(a, n, o = "") {
|
|
127
|
+
for (const s of A(a, n, e, o))
|
|
127
128
|
i(s);
|
|
128
129
|
}
|
|
129
|
-
function i({ handlerType: a, fieldKey:
|
|
130
|
+
function i({ handlerType: a, fieldKey: n, fieldSchema: o, value: s }, u) {
|
|
130
131
|
switch (a) {
|
|
131
132
|
case "string":
|
|
132
|
-
t.fillString({ fieldKey:
|
|
133
|
+
t.fillString({ fieldKey: n, fieldSchema: o, value: s, actionOptions: u });
|
|
133
134
|
break;
|
|
134
135
|
case "number":
|
|
135
|
-
t.fillNumber({ fieldKey:
|
|
136
|
+
t.fillNumber({ fieldKey: n, fieldSchema: o, value: s, actionOptions: u });
|
|
136
137
|
break;
|
|
137
138
|
case "boolean":
|
|
138
|
-
t.fillBoolean({ fieldKey:
|
|
139
|
+
t.fillBoolean({ fieldKey: n, fieldSchema: o, value: s, actionOptions: u });
|
|
139
140
|
break;
|
|
140
141
|
case "enum":
|
|
141
|
-
t.fillEnum({ fieldKey:
|
|
142
|
+
t.fillEnum({ fieldKey: n, fieldSchema: o, value: s, actionOptions: u });
|
|
142
143
|
break;
|
|
143
144
|
case "tag":
|
|
144
|
-
t.fillTag({ fieldKey:
|
|
145
|
+
t.fillTag({ fieldKey: n, fieldSchema: o, value: s, actionOptions: u });
|
|
145
146
|
break;
|
|
146
147
|
case "map":
|
|
147
148
|
t.fillMap({
|
|
148
|
-
fieldKey:
|
|
149
|
+
fieldKey: n,
|
|
149
150
|
fieldSchema: o,
|
|
150
151
|
value: s,
|
|
151
152
|
onFillEntry: (p, k) => {
|
|
152
|
-
d(e,
|
|
153
|
+
d(e, n, p, k);
|
|
153
154
|
}
|
|
154
155
|
});
|
|
155
156
|
break;
|
|
156
157
|
case "json":
|
|
157
|
-
t.fillJson({ fieldKey:
|
|
158
|
+
t.fillJson({ fieldKey: n, fieldSchema: o, value: s, actionOptions: u });
|
|
158
159
|
break;
|
|
159
160
|
case "foreign":
|
|
160
|
-
t.fillForeign({ fieldKey:
|
|
161
|
+
t.fillForeign({ fieldKey: n, fieldSchema: o, value: s, actionOptions: u });
|
|
161
162
|
break;
|
|
162
163
|
case "array":
|
|
163
164
|
t.fillArray({
|
|
164
|
-
fieldKey:
|
|
165
|
+
fieldKey: n,
|
|
165
166
|
fieldSchema: o,
|
|
166
167
|
value: s,
|
|
167
168
|
onFillItem: (p, k) => {
|
|
168
|
-
y(e,
|
|
169
|
+
y(e, n, p, k);
|
|
169
170
|
}
|
|
170
171
|
});
|
|
171
172
|
break;
|
|
172
173
|
case "record":
|
|
173
174
|
t.fillRecord({
|
|
174
|
-
fieldKey:
|
|
175
|
+
fieldKey: n,
|
|
175
176
|
fieldSchema: o,
|
|
176
177
|
value: s,
|
|
177
178
|
onFillChildren: () => {
|
|
178
|
-
l(o.fields, s,
|
|
179
|
+
l(o.fields, s, n);
|
|
179
180
|
}
|
|
180
181
|
});
|
|
181
182
|
break;
|
|
182
183
|
}
|
|
183
184
|
}
|
|
184
|
-
function y(a,
|
|
185
|
-
const { itemKey: u, itemSchema: p } =
|
|
186
|
-
|
|
185
|
+
function y(a, n, o, s) {
|
|
186
|
+
const { itemKey: u, itemSchema: p } = I(n, o, a);
|
|
187
|
+
v(p) ? l(p.fields, s, u) : i({
|
|
187
188
|
handlerType: b(p),
|
|
188
189
|
fieldKey: u,
|
|
189
190
|
fieldSchema: p,
|
|
190
191
|
value: s
|
|
191
192
|
});
|
|
192
193
|
}
|
|
193
|
-
function d(a,
|
|
194
|
-
const { entryKey: u, entrySchema: p } =
|
|
194
|
+
function d(a, n, o, s) {
|
|
195
|
+
const { entryKey: u, entrySchema: p } = F(n, o, a);
|
|
195
196
|
i({
|
|
196
197
|
handlerType: b(p),
|
|
197
198
|
fieldKey: u,
|
|
@@ -202,7 +203,7 @@ function $(r, n) {
|
|
|
202
203
|
function g(a) {
|
|
203
204
|
r.fields && Array.isArray(r.fields) && l(r.fields, a);
|
|
204
205
|
}
|
|
205
|
-
function h(a,
|
|
206
|
+
function h(a, n, o) {
|
|
206
207
|
const s = e.schemaMap[a];
|
|
207
208
|
if (!s)
|
|
208
209
|
throw new Error(`Field schema for "${a}" not found in schema map`);
|
|
@@ -210,7 +211,7 @@ function $(r, n) {
|
|
|
210
211
|
handlerType: b(s),
|
|
211
212
|
fieldKey: a,
|
|
212
213
|
fieldSchema: s,
|
|
213
|
-
value:
|
|
214
|
+
value: n
|
|
214
215
|
}, o);
|
|
215
216
|
}
|
|
216
217
|
return {
|
|
@@ -226,12 +227,12 @@ export {
|
|
|
226
227
|
M as fillArray,
|
|
227
228
|
E as fillBoolean,
|
|
228
229
|
j as fillEnum,
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
230
|
+
O as fillForeign,
|
|
231
|
+
N as fillJson,
|
|
232
|
+
V as fillMap,
|
|
232
233
|
C as fillNumber,
|
|
233
234
|
T as fillRecord,
|
|
234
235
|
B as fillString,
|
|
235
236
|
x as fillTag,
|
|
236
|
-
|
|
237
|
+
J as handlers
|
|
237
238
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enum.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../src/components/free-form/filler/cypress/handlers/enum.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAA;AACxH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAK5C,wBAAgB,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,iBAAiB,GAAG,qBAAqB,GAAG,cAAc,CAAC,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"enum.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../src/components/free-form/filler/cypress/handlers/enum.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAA;AACxH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAK5C,wBAAgB,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,iBAAiB,GAAG,qBAAqB,GAAG,cAAc,CAAC,GAAG,IAAI,CAuChH"}
|