@kong-ui-public/entities-plugins 9.247.2 → 9.247.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities-plugins.es.js +14471 -14199
- package/dist/entities-plugins.umd.js +136 -136
- package/dist/filler/cypress/index.js +61 -61
- package/dist/filler/{field-walker-B9V32Dwy.js → field-walker-CAXA5GF4.js} +1556 -1516
- package/dist/filler/packages/entities/entities-plugins/src/components/free-form/filler/playwright/handlers/foreign.d.ts.map +1 -1
- package/dist/filler/packages/entities/entities-plugins/src/components/free-form/filler/playwright/handlers/record.d.ts.map +1 -1
- package/dist/filler/packages/entities/entities-plugins/src/components/free-form/shared/composables/schema.d.ts.map +1 -1
- package/dist/filler/playwright/index.js +110 -111
- package/dist/freeform/index.js +6 -1
- package/dist/style.css +1 -1
- package/dist/types/components/free-form/shared/composables/schema.d.ts.map +1 -1
- package/package.json +16 -16
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { s as a, i as w, c as
|
|
1
|
+
import { s as a, i as w, c as S, g as k, w as v, a as A, b as B, d as F } from "../field-walker-CAXA5GF4.js";
|
|
2
2
|
const f = { scrollBehavior: "center" };
|
|
3
|
-
function p(
|
|
4
|
-
cy.get(
|
|
3
|
+
function p(r) {
|
|
4
|
+
cy.get(r).then((n) => {
|
|
5
5
|
n[0]?.scrollIntoView({ block: "center", inline: "nearest" });
|
|
6
6
|
});
|
|
7
7
|
}
|
|
8
|
-
function I(
|
|
9
|
-
const { fieldKey: n, value: e } =
|
|
8
|
+
function I(r) {
|
|
9
|
+
const { fieldKey: n, value: e } = r, t = a.field(n);
|
|
10
10
|
p(t), cy.get(t).then((o) => {
|
|
11
11
|
cy.wrap(o).clear(f), e != null && e !== "" && cy.wrap(o).type(String(e), f);
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
|
-
function C(
|
|
15
|
-
const { fieldKey: n, value: e } =
|
|
14
|
+
function C(r) {
|
|
15
|
+
const { fieldKey: n, value: e } = r, t = a.field(n);
|
|
16
16
|
p(t), cy.get(t).then((o) => {
|
|
17
17
|
cy.wrap(o).clear(f), e != null && cy.wrap(o).type(String(e), f);
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
|
-
function E(
|
|
21
|
-
const { fieldKey: n, value: e } =
|
|
20
|
+
function E(r) {
|
|
21
|
+
const { fieldKey: n, value: e } = r, t = a.field(n);
|
|
22
22
|
p(t), e === !0 ? cy.get(t).check(f) : e === !1 && cy.get(t).uncheck(f);
|
|
23
23
|
}
|
|
24
|
-
function j(
|
|
25
|
-
const { fieldKey: n, fieldSchema: e, value: t } =
|
|
24
|
+
function j(r) {
|
|
25
|
+
const { fieldKey: n, fieldSchema: e, value: t } = r, o = w(e), y = o ? Array.isArray(t) ? t : [t] : [t], d = a.field(n);
|
|
26
26
|
p(d), cy.get(d).click(f);
|
|
27
27
|
const g = a.selectTrigger(n);
|
|
28
28
|
for (const u of e.one_of ?? e.elements?.one_of ?? [])
|
|
@@ -33,32 +33,32 @@ function j(i) {
|
|
|
33
33
|
}), y.includes(u) && cy.get(g).find(m).click(f);
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
function x(
|
|
37
|
-
const { fieldKey: n, value: e } =
|
|
36
|
+
function x(r) {
|
|
37
|
+
const { fieldKey: n, value: e } = r, t = Array.isArray(e) ? e : [e], o = a.tagInput(n);
|
|
38
38
|
p(o), cy.get(o).type(t.join(","), f);
|
|
39
39
|
}
|
|
40
|
-
function M(
|
|
41
|
-
const { fieldKey: n, value: e, onFillItem: t } =
|
|
40
|
+
function M(r) {
|
|
41
|
+
const { fieldKey: n, value: e, onFillItem: t } = r, o = a.arrayTabContainer(n), y = a.arrayBasicContainer(n);
|
|
42
42
|
cy.get("body").then((d) => {
|
|
43
43
|
const g = d.find(o).length > 0, u = d.find(y).length > 0;
|
|
44
44
|
if (g || u) {
|
|
45
45
|
const m = a.arrayRemoveBtns(n), l = () => {
|
|
46
46
|
cy.get("body").then((c) => {
|
|
47
|
-
const
|
|
48
|
-
|
|
47
|
+
const i = c.find(m).first();
|
|
48
|
+
i.length > 0 && (cy.wrap(i).click(f), l());
|
|
49
49
|
});
|
|
50
50
|
};
|
|
51
51
|
if (l(), !Array.isArray(e))
|
|
52
52
|
return;
|
|
53
53
|
for (let c = 0; c < e.length; c++) {
|
|
54
|
-
const
|
|
55
|
-
p(
|
|
54
|
+
const i = a.arrayAddBtn(n);
|
|
55
|
+
p(i), cy.get(i).click(f), cy.get(a.arrayItem(n, c)).should("exist"), t(c, e[c]);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
|
-
function R(
|
|
61
|
-
const { fieldKey: n, value: e, onFillChildren: t } =
|
|
60
|
+
function R(r) {
|
|
61
|
+
const { fieldKey: n, value: e, onFillChildren: t } = r, o = a.objectSwitch(n);
|
|
62
62
|
cy.get("body").then((y) => {
|
|
63
63
|
const d = y.find(o).length > 0;
|
|
64
64
|
if (e == null && d) {
|
|
@@ -68,16 +68,16 @@ function R(i) {
|
|
|
68
68
|
d && (cy.get(o).check({ force: !0 }), cy.get(a.objectContent(n)).should("not.have.class", "ff-slide-active")), t();
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
|
-
function T(
|
|
72
|
-
if (!
|
|
71
|
+
function T(r, n) {
|
|
72
|
+
if (!r)
|
|
73
73
|
throw new Error(`Unable to find map entry test id for "${n}"`);
|
|
74
|
-
const e =
|
|
74
|
+
const e = r.match(/kid:\d+/);
|
|
75
75
|
if (!e)
|
|
76
|
-
throw new Error(`Unable to extract map entry kid id from test id "${
|
|
76
|
+
throw new Error(`Unable to extract map entry kid id from test id "${r}"`);
|
|
77
77
|
return e[0];
|
|
78
78
|
}
|
|
79
|
-
function N(
|
|
80
|
-
const { fieldKey: n, value: e, onFillEntry: t } =
|
|
79
|
+
function N(r) {
|
|
80
|
+
const { fieldKey: n, value: e, onFillEntry: t } = r, o = a.mapRemoveBtns(n), y = () => {
|
|
81
81
|
cy.get("body").then((g) => {
|
|
82
82
|
const u = g.find(o).first();
|
|
83
83
|
u.length > 0 && (cy.wrap(u).click(f), y());
|
|
@@ -91,23 +91,23 @@ function N(i) {
|
|
|
91
91
|
const [u, m] = d[g], l = a.mapAddBtn(n);
|
|
92
92
|
p(l), cy.get(l).click(f);
|
|
93
93
|
const c = a.mapKey(n, g);
|
|
94
|
-
p(c), cy.get(c).clear(f), cy.get(c).type(String(u), f), cy.get(a.mapContainer(n, g)).find(`[data-testid*="${n}.kid:"]`).first().invoke("attr", "data-testid").then((
|
|
95
|
-
const s = T(
|
|
94
|
+
p(c), cy.get(c).clear(f), cy.get(c).type(String(u), f), cy.get(a.mapContainer(n, g)).find(`[data-testid*="${n}.kid:"]`).first().invoke("attr", "data-testid").then((i) => {
|
|
95
|
+
const s = T(i, n);
|
|
96
96
|
t(s, m);
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
-
function O(
|
|
101
|
-
const { fieldKey: n, value: e } =
|
|
100
|
+
function O(r) {
|
|
101
|
+
const { fieldKey: n, value: e } = r, t = a.json(n), o = typeof e == "string" ? e : JSON.stringify(e, null, 2);
|
|
102
102
|
p(t), cy.get(t).then((y) => {
|
|
103
103
|
cy.wrap(y.find("textarea")).clear(f), cy.wrap(y.find("textarea")).type(o, f);
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
|
-
function V(
|
|
107
|
-
const { fieldKey: n, value: e } =
|
|
108
|
-
p(t), cy.get(t).
|
|
109
|
-
|
|
110
|
-
|
|
106
|
+
function V(r) {
|
|
107
|
+
const { fieldKey: n, value: e } = r, t = a.field(n), o = typeof e == "object" && e?.id ? e.id : e;
|
|
108
|
+
p(t), cy.get(t).then((y) => {
|
|
109
|
+
cy.wrap(y).clear(f), o && cy.wrap(y).type(String(o), f);
|
|
110
|
+
});
|
|
111
111
|
}
|
|
112
112
|
const H = {
|
|
113
113
|
fillString: I,
|
|
@@ -121,33 +121,33 @@ const H = {
|
|
|
121
121
|
fillJson: O,
|
|
122
122
|
fillForeign: V
|
|
123
123
|
};
|
|
124
|
-
function K(
|
|
125
|
-
const e =
|
|
126
|
-
function o(l, c,
|
|
127
|
-
for (const s of
|
|
124
|
+
function K(r, n) {
|
|
125
|
+
const e = S(r), t = { ...H, ...n };
|
|
126
|
+
function o(l, c, i = "") {
|
|
127
|
+
for (const s of v(l, c, e, i))
|
|
128
128
|
y(s);
|
|
129
129
|
}
|
|
130
|
-
function y({ handlerType: l, fieldKey: c, fieldSchema:
|
|
130
|
+
function y({ handlerType: l, fieldKey: c, fieldSchema: i, value: s }) {
|
|
131
131
|
switch (l) {
|
|
132
132
|
case "string":
|
|
133
|
-
t.fillString({ fieldKey: c, fieldSchema:
|
|
133
|
+
t.fillString({ fieldKey: c, fieldSchema: i, value: s });
|
|
134
134
|
break;
|
|
135
135
|
case "number":
|
|
136
|
-
t.fillNumber({ fieldKey: c, fieldSchema:
|
|
136
|
+
t.fillNumber({ fieldKey: c, fieldSchema: i, value: s });
|
|
137
137
|
break;
|
|
138
138
|
case "boolean":
|
|
139
|
-
t.fillBoolean({ fieldKey: c, fieldSchema:
|
|
139
|
+
t.fillBoolean({ fieldKey: c, fieldSchema: i, value: s });
|
|
140
140
|
break;
|
|
141
141
|
case "enum":
|
|
142
|
-
t.fillEnum({ fieldKey: c, fieldSchema:
|
|
142
|
+
t.fillEnum({ fieldKey: c, fieldSchema: i, value: s });
|
|
143
143
|
break;
|
|
144
144
|
case "tag":
|
|
145
|
-
t.fillTag({ fieldKey: c, fieldSchema:
|
|
145
|
+
t.fillTag({ fieldKey: c, fieldSchema: i, value: s });
|
|
146
146
|
break;
|
|
147
147
|
case "map":
|
|
148
148
|
t.fillMap({
|
|
149
149
|
fieldKey: c,
|
|
150
|
-
fieldSchema:
|
|
150
|
+
fieldSchema: i,
|
|
151
151
|
value: s,
|
|
152
152
|
onFillEntry: (b, h) => {
|
|
153
153
|
g(e, c, b, h);
|
|
@@ -155,15 +155,15 @@ function K(i, n) {
|
|
|
155
155
|
});
|
|
156
156
|
break;
|
|
157
157
|
case "json":
|
|
158
|
-
t.fillJson({ fieldKey: c, fieldSchema:
|
|
158
|
+
t.fillJson({ fieldKey: c, fieldSchema: i, value: s });
|
|
159
159
|
break;
|
|
160
160
|
case "foreign":
|
|
161
|
-
t.fillForeign({ fieldKey: c, fieldSchema:
|
|
161
|
+
t.fillForeign({ fieldKey: c, fieldSchema: i, value: s });
|
|
162
162
|
break;
|
|
163
163
|
case "array":
|
|
164
164
|
t.fillArray({
|
|
165
165
|
fieldKey: c,
|
|
166
|
-
fieldSchema:
|
|
166
|
+
fieldSchema: i,
|
|
167
167
|
value: s,
|
|
168
168
|
onFillItem: (b, h) => {
|
|
169
169
|
d(e, c, b, h);
|
|
@@ -173,17 +173,17 @@ function K(i, n) {
|
|
|
173
173
|
case "record":
|
|
174
174
|
t.fillRecord({
|
|
175
175
|
fieldKey: c,
|
|
176
|
-
fieldSchema:
|
|
176
|
+
fieldSchema: i,
|
|
177
177
|
value: s,
|
|
178
178
|
onFillChildren: () => {
|
|
179
|
-
o(
|
|
179
|
+
o(i.fields, s, c);
|
|
180
180
|
}
|
|
181
181
|
});
|
|
182
182
|
break;
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
|
-
function d(l, c,
|
|
186
|
-
const { itemKey: b, itemSchema: h } = A(c,
|
|
185
|
+
function d(l, c, i, s) {
|
|
186
|
+
const { itemKey: b, itemSchema: h } = A(c, i, l);
|
|
187
187
|
B(h) ? o(h.fields, s, b) : y({
|
|
188
188
|
handlerType: k(h),
|
|
189
189
|
fieldKey: b,
|
|
@@ -191,8 +191,8 @@ function K(i, n) {
|
|
|
191
191
|
value: s
|
|
192
192
|
});
|
|
193
193
|
}
|
|
194
|
-
function g(l, c,
|
|
195
|
-
const { entryKey: b, entrySchema: h } = F(c,
|
|
194
|
+
function g(l, c, i, s) {
|
|
195
|
+
const { entryKey: b, entrySchema: h } = F(c, i, l);
|
|
196
196
|
y({
|
|
197
197
|
handlerType: k(h),
|
|
198
198
|
fieldKey: b,
|
|
@@ -201,16 +201,16 @@ function K(i, n) {
|
|
|
201
201
|
});
|
|
202
202
|
}
|
|
203
203
|
function u(l) {
|
|
204
|
-
|
|
204
|
+
r.fields && Array.isArray(r.fields) && o(r.fields, l);
|
|
205
205
|
}
|
|
206
206
|
function m(l, c) {
|
|
207
|
-
const
|
|
208
|
-
if (!
|
|
207
|
+
const i = e.schemaMap[l];
|
|
208
|
+
if (!i)
|
|
209
209
|
throw new Error(`Field schema for "${l}" not found in schema map`);
|
|
210
210
|
y({
|
|
211
|
-
handlerType: k(
|
|
211
|
+
handlerType: k(i),
|
|
212
212
|
fieldKey: l,
|
|
213
|
-
fieldSchema:
|
|
213
|
+
fieldSchema: i,
|
|
214
214
|
value: c
|
|
215
215
|
});
|
|
216
216
|
}
|