@kong-ui-public/entities-plugins 9.222.3 → 9.222.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.
@@ -1,71 +1,72 @@
1
- import { s as f, i as w, c as S, g as b, w as A, a as F, b as v, d as B } from "../field-walker-_YAwDcC1.js";
1
+ import { s as f, i as w, c as S, g as b, w as A, a as v, b as F, d as I } from "../field-walker-_YAwDcC1.js";
2
2
  const m = {
3
3
  type: { force: !0 },
4
4
  click: { force: !0 },
5
5
  check: { force: !0 },
6
6
  clear: { force: !0 }
7
7
  };
8
- function I(r) {
9
- const { fieldKey: n, value: e, actionOptions: t = m } = r, o = f.field(n);
10
- cy.get(o).then((i) => {
8
+ function B(r) {
9
+ const { fieldKey: n, value: e, actionOptions: t = m } = r, l = f.field(n);
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: n, value: e, actionOptions: t = m } = r, o = f.field(n);
16
- cy.get(o).then((i) => {
15
+ const { fieldKey: n, value: e, actionOptions: t = m } = r, l = f.field(n);
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: n, value: e, actionOptions: t = m } = r, o = f.field(n);
22
- e === !0 ? cy.get(o).check(t.check) : e === !1 && cy.get(o).uncheck(t.check);
21
+ const { fieldKey: n, value: e, actionOptions: t = m } = r, l = f.field(n);
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
- var g;
26
- const { fieldKey: n, fieldSchema: e, value: t, actionOptions: o = m } = r, i = w(e), y = i ? Array.isArray(t) ? t : [t] : [t], d = f.field(n);
27
- cy.get(d).scrollIntoView(), cy.get(d).click(o.click);
28
- for (const p of e.one_of ?? ((g = e.elements) == null ? void 0 : g.one_of) ?? [])
29
- if (p != null) {
30
- const s = i ? f.multiSelectItem(String(p)) : f.selectItem(String(p));
31
- i && cy.get(s).within((c) => {
32
- c.find("button.selected").length > 0 && cy.get("button").click();
33
- }), y.includes(p) && cy.get(s).click();
25
+ var h;
26
+ const { fieldKey: n, fieldSchema: e, value: t, actionOptions: l = m } = r, i = w(e), y = i ? Array.isArray(t) ? t : [t] : [t], d = f.field(n);
27
+ cy.get(d).scrollIntoView(), cy.get(d).click(l.click);
28
+ const g = f.selectTrigger(n);
29
+ for (const a of e.one_of ?? ((h = e.elements) == null ? void 0 : h.one_of) ?? [])
30
+ if (a != null) {
31
+ const c = i ? f.multiSelectItem(String(a)) : f.selectItem(String(a));
32
+ i && cy.get(g).find(c).within((o) => {
33
+ o.find("button.selected").length > 0 && cy.get("button").click();
34
+ }), y.includes(a) && cy.get(g).find(c).click();
34
35
  }
35
36
  }
36
37
  function x(r) {
37
- const { fieldKey: n, value: e, actionOptions: t = m } = r, o = Array.isArray(e) ? e : [e], i = f.tagInput(n);
38
- cy.get(i).type(o.join(","), t.type);
38
+ const { fieldKey: n, value: e, actionOptions: t = m } = r, l = Array.isArray(e) ? e : [e], i = f.tagInput(n);
39
+ cy.get(i).type(l.join(","), t.type);
39
40
  }
40
41
  function M(r) {
41
- const { fieldKey: n, value: e, onFillItem: t } = r, o = f.arrayTabContainer(n), i = f.arrayBasicContainer(n);
42
+ const { fieldKey: n, value: e, onFillItem: t } = r, l = f.arrayTabContainer(n), i = f.arrayBasicContainer(n);
42
43
  cy.get("body").then((y) => {
43
- const d = y.find(o).length > 0, g = y.find(i).length > 0;
44
+ const d = y.find(l).length > 0, g = y.find(i).length > 0;
44
45
  if (d || g) {
45
- const p = f.arrayRemoveBtns(n), s = () => {
46
+ const h = f.arrayRemoveBtns(n), a = () => {
46
47
  cy.get("body").then((c) => {
47
- const l = c.find(p).first();
48
- l.length > 0 && (cy.wrap(l).click(), s());
48
+ const o = c.find(h).first();
49
+ o.length > 0 && (cy.wrap(o).click(), a());
49
50
  });
50
51
  };
51
- if (s(), !Array.isArray(e))
52
+ if (a(), !Array.isArray(e))
52
53
  return;
53
54
  for (let c = 0; c < e.length; c++) {
54
- const l = f.arrayAddBtn(n);
55
- cy.get(l).click(), t(c, e[c]);
55
+ const o = f.arrayAddBtn(n);
56
+ cy.get(o).scrollIntoView(), cy.get(o).click({ force: !0 }), t(c, e[c]);
56
57
  }
57
58
  }
58
59
  });
59
60
  }
60
61
  function T(r) {
61
- const { fieldKey: n, value: e, onFillChildren: t } = r, o = f.objectSwitch(n);
62
+ const { fieldKey: n, value: e, onFillChildren: t } = r, l = f.objectSwitch(n);
62
63
  cy.get("body").then((i) => {
63
- const y = i.find(o).length > 0;
64
+ const y = i.find(l).length > 0;
64
65
  if (e == null && y) {
65
- cy.get(o).uncheck({ force: !0 });
66
+ cy.get(l).uncheck({ force: !0 });
66
67
  return;
67
68
  }
68
- y && cy.get(o).check({ force: !0 }), t();
69
+ y && cy.get(l).check({ force: !0 }), t();
69
70
  });
70
71
  }
71
72
  function R(r, n) {
@@ -77,9 +78,9 @@ function R(r, n) {
77
78
  return e[0];
78
79
  }
79
80
  function N(r) {
80
- const { fieldKey: n, value: e, onFillEntry: t } = r, o = f.mapRemoveBtns(n), i = () => {
81
+ const { fieldKey: n, value: e, onFillEntry: t } = r, l = f.mapRemoveBtns(n), i = () => {
81
82
  cy.get("body").then((d) => {
82
- const g = d.find(o).first();
83
+ const g = d.find(l).first();
83
84
  g.length > 0 && (cy.wrap(g).click(), i());
84
85
  });
85
86
  };
@@ -88,27 +89,27 @@ function N(r) {
88
89
  const y = Object.entries(e);
89
90
  if (y.length !== 0)
90
91
  for (let d = 0; d < y.length; d++) {
91
- const [g, p] = y[d];
92
- cy.get(f.mapAddBtn(n)).click(), cy.get(f.mapKey(n, d)).clear({ force: !0 }), cy.get(f.mapKey(n, d)).type(String(g), { force: !0 }), cy.get(f.mapContainer(n, d)).find(`[data-testid*="${n}.kid:"]`).first().invoke("attr", "data-testid").then((s) => {
93
- const c = R(s, n);
94
- t(c, p);
92
+ const [g, h] = y[d];
93
+ cy.get(f.mapAddBtn(n)).click(), cy.get(f.mapKey(n, d)).clear({ force: !0 }), cy.get(f.mapKey(n, d)).type(String(g), { force: !0 }), cy.get(f.mapContainer(n, d)).find(`[data-testid*="${n}.kid:"]`).first().invoke("attr", "data-testid").then((a) => {
94
+ const c = R(a, n);
95
+ t(c, h);
95
96
  });
96
97
  }
97
98
  }
98
99
  function O(r) {
99
- const { fieldKey: n, value: e, actionOptions: t = m } = r, o = f.json(n), i = typeof e == "string" ? e : JSON.stringify(e, null, 2);
100
- cy.get(o).then((y) => {
100
+ const { fieldKey: n, value: e, actionOptions: t = m } = r, l = f.json(n), i = typeof e == "string" ? e : JSON.stringify(e, null, 2);
101
+ cy.get(l).then((y) => {
101
102
  t.clear !== !1 && cy.wrap(y.find("textarea")).clear(t.clear), cy.wrap(y.find("textarea")).type(i, t.type);
102
103
  });
103
104
  }
104
105
  function J(r) {
105
- const { fieldKey: n, value: e, actionOptions: t = m } = r, o = f.field(n);
106
- cy.get(o).click(t.click);
106
+ const { fieldKey: n, value: e, actionOptions: t = m } = r, l = f.field(n);
107
+ cy.get(l).click(t.click);
107
108
  const i = typeof e == "object" && (e != null && e.id) ? e.id : e;
108
109
  i && cy.get(`[data-testid="select-item-${i}"]`).click(t.click);
109
110
  }
110
111
  const K = {
111
- fillString: I,
112
+ fillString: B,
112
113
  fillNumber: C,
113
114
  fillBoolean: E,
114
115
  fillEnum: j,
@@ -119,108 +120,108 @@ const K = {
119
120
  fillJson: O,
120
121
  fillForeign: J
121
122
  };
122
- function H(r, n) {
123
+ function $(r, n) {
123
124
  const e = S(r), t = { ...K, ...n };
124
- function o(s, c, l = "") {
125
- for (const a of A(s, c, e, l))
126
- i(a);
125
+ function l(a, c, o = "") {
126
+ for (const s of A(a, c, e, o))
127
+ i(s);
127
128
  }
128
- function i({ handlerType: s, fieldKey: c, fieldSchema: l, value: a }, u) {
129
- switch (s) {
129
+ function i({ handlerType: a, fieldKey: c, fieldSchema: o, value: s }, u) {
130
+ switch (a) {
130
131
  case "string":
131
- t.fillString({ fieldKey: c, fieldSchema: l, value: a, actionOptions: u });
132
+ t.fillString({ fieldKey: c, fieldSchema: o, value: s, actionOptions: u });
132
133
  break;
133
134
  case "number":
134
- t.fillNumber({ fieldKey: c, fieldSchema: l, value: a, actionOptions: u });
135
+ t.fillNumber({ fieldKey: c, fieldSchema: o, value: s, actionOptions: u });
135
136
  break;
136
137
  case "boolean":
137
- t.fillBoolean({ fieldKey: c, fieldSchema: l, value: a, actionOptions: u });
138
+ t.fillBoolean({ fieldKey: c, fieldSchema: o, value: s, actionOptions: u });
138
139
  break;
139
140
  case "enum":
140
- t.fillEnum({ fieldKey: c, fieldSchema: l, value: a, actionOptions: u });
141
+ t.fillEnum({ fieldKey: c, fieldSchema: o, value: s, actionOptions: u });
141
142
  break;
142
143
  case "tag":
143
- t.fillTag({ fieldKey: c, fieldSchema: l, value: a, actionOptions: u });
144
+ t.fillTag({ fieldKey: c, fieldSchema: o, value: s, actionOptions: u });
144
145
  break;
145
146
  case "map":
146
147
  t.fillMap({
147
148
  fieldKey: c,
148
- fieldSchema: l,
149
- value: a,
150
- onFillEntry: (h, k) => {
151
- d(e, c, h, k);
149
+ fieldSchema: o,
150
+ value: s,
151
+ onFillEntry: (p, k) => {
152
+ d(e, c, p, k);
152
153
  }
153
154
  });
154
155
  break;
155
156
  case "json":
156
- t.fillJson({ fieldKey: c, fieldSchema: l, value: a, actionOptions: u });
157
+ t.fillJson({ fieldKey: c, fieldSchema: o, value: s, actionOptions: u });
157
158
  break;
158
159
  case "foreign":
159
- t.fillForeign({ fieldKey: c, fieldSchema: l, value: a, actionOptions: u });
160
+ t.fillForeign({ fieldKey: c, fieldSchema: o, value: s, actionOptions: u });
160
161
  break;
161
162
  case "array":
162
163
  t.fillArray({
163
164
  fieldKey: c,
164
- fieldSchema: l,
165
- value: a,
166
- onFillItem: (h, k) => {
167
- y(e, c, h, k);
165
+ fieldSchema: o,
166
+ value: s,
167
+ onFillItem: (p, k) => {
168
+ y(e, c, p, k);
168
169
  }
169
170
  });
170
171
  break;
171
172
  case "record":
172
173
  t.fillRecord({
173
174
  fieldKey: c,
174
- fieldSchema: l,
175
- value: a,
175
+ fieldSchema: o,
176
+ value: s,
176
177
  onFillChildren: () => {
177
- o(l.fields, a, c);
178
+ l(o.fields, s, c);
178
179
  }
179
180
  });
180
181
  break;
181
182
  }
182
183
  }
183
- function y(s, c, l, a) {
184
- const { itemKey: u, itemSchema: h } = F(c, l, s);
185
- v(h) ? o(h.fields, a, u) : i({
186
- handlerType: b(h),
184
+ function y(a, c, o, s) {
185
+ const { itemKey: u, itemSchema: p } = v(c, o, a);
186
+ F(p) ? l(p.fields, s, u) : i({
187
+ handlerType: b(p),
187
188
  fieldKey: u,
188
- fieldSchema: h,
189
- value: a
189
+ fieldSchema: p,
190
+ value: s
190
191
  });
191
192
  }
192
- function d(s, c, l, a) {
193
- const { entryKey: u, entrySchema: h } = B(c, l, s);
193
+ function d(a, c, o, s) {
194
+ const { entryKey: u, entrySchema: p } = I(c, o, a);
194
195
  i({
195
- handlerType: b(h),
196
+ handlerType: b(p),
196
197
  fieldKey: u,
197
- fieldSchema: h,
198
- value: a
198
+ fieldSchema: p,
199
+ value: s
199
200
  });
200
201
  }
201
- function g(s) {
202
- r.fields && Array.isArray(r.fields) && o(r.fields, s);
202
+ function g(a) {
203
+ r.fields && Array.isArray(r.fields) && l(r.fields, a);
203
204
  }
204
- function p(s, c, l) {
205
- const a = e.schemaMap[s];
206
- if (!a)
207
- throw new Error(`Field schema for "${s}" not found in schema map`);
205
+ function h(a, c, o) {
206
+ const s = e.schemaMap[a];
207
+ if (!s)
208
+ throw new Error(`Field schema for "${a}" not found in schema map`);
208
209
  i({
209
- handlerType: b(a),
210
- fieldKey: s,
211
- fieldSchema: a,
210
+ handlerType: b(s),
211
+ fieldKey: a,
212
+ fieldSchema: s,
212
213
  value: c
213
- }, l);
214
+ }, o);
214
215
  }
215
216
  return {
216
217
  fill: g,
217
- fillField: p,
218
+ fillField: h,
218
219
  schemaMap: e.schemaMap,
219
220
  handlers: t
220
221
  };
221
222
  }
222
223
  export {
223
- H as createFiller,
224
+ $ as createFiller,
224
225
  m as defaultActionOptions,
225
226
  M as fillArray,
226
227
  E as fillBoolean,
@@ -230,7 +231,7 @@ export {
230
231
  N as fillMap,
231
232
  C as fillNumber,
232
233
  T as fillRecord,
233
- I as fillString,
234
+ B as fillString,
234
235
  x as fillTag,
235
236
  K as handlers
236
237
  };
@@ -1 +1 @@
1
- {"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../src/components/free-form/filler/cypress/handlers/array.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAGjD,wBAAgB,SAAS,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAyC1D"}
1
+ {"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../src/components/free-form/filler/cypress/handlers/array.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAGjD,wBAAgB,SAAS,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,CA2C1D"}
@@ -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,CAgChH"}
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,CAoChH"}
@@ -1 +1 @@
1
- {"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../src/components/free-form/filler/playwright/handlers/array.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAGjD,wBAAsB,SAAS,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAoCzE"}
1
+ {"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../src/components/free-form/filler/playwright/handlers/array.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAGjD,wBAAsB,SAAS,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAsCzE"}
@@ -1 +1 @@
1
- {"version":3,"file":"enum.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../src/components/free-form/filler/playwright/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;AAI5C,wBAAsB,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,iBAAiB,GAAG,qBAAqB,GAAG,cAAc,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CA8B/H"}
1
+ {"version":3,"file":"enum.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../src/components/free-form/filler/playwright/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;AAI5C,wBAAsB,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,iBAAiB,GAAG,qBAAqB,GAAG,cAAc,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAkC/H"}
@@ -1,218 +1,219 @@
1
- import { s as f, i as S, c as F, g as h, w as v, a as A, b as B, d as p } from "../field-walker-_YAwDcC1.js";
2
- async function C(e) {
3
- const { page: a, fieldKey: n, value: t } = e, o = f.field(n), i = a.locator(o);
1
+ import { s as f, i as S, c as F, g as h, w as v, a as A, b as p, d as B } from "../field-walker-_YAwDcC1.js";
2
+ async function I(o) {
3
+ const { page: a, fieldKey: n, value: t } = o, e = f.field(n), i = a.locator(e);
4
4
  await i.clear(), t != null && t !== "" && await i.fill(String(t));
5
5
  }
6
- async function E(e) {
7
- const { page: a, fieldKey: n, value: t } = e, o = f.field(n), i = a.locator(o);
6
+ async function C(o) {
7
+ const { page: a, fieldKey: n, value: t } = o, e = f.field(n), i = a.locator(e);
8
8
  await i.clear(), t != null && await i.fill(String(t));
9
9
  }
10
- async function I(e) {
11
- const { page: a, fieldKey: n, value: t } = e, o = f.field(n), i = a.locator(o);
10
+ async function E(o) {
11
+ const { page: a, fieldKey: n, value: t } = o, e = f.field(n), i = a.locator(e);
12
12
  t === !0 ? await i.check({ force: !0 }) : t === !1 && await i.uncheck({ force: !0 });
13
13
  }
14
- async function j(e) {
15
- var b;
16
- const { page: a, fieldKey: n, fieldSchema: t, value: o } = e, i = S(t), w = i ? Array.isArray(o) ? o : [o] : [o], u = f.field(n);
17
- await a.locator(u).click();
18
- for (const d of t.one_of ?? ((b = t.elements) == null ? void 0 : b.one_of) ?? [])
19
- if (d != null) {
20
- const k = i ? f.multiSelectItem(String(d)) : f.selectItem(String(d));
21
- i && await a.locator(`${k} button.selected`).count() > 0 && await a.locator(k).click(), w.includes(d) && await a.locator(k).click();
14
+ async function T(o) {
15
+ var k;
16
+ const { page: a, fieldKey: n, fieldSchema: t, value: e } = o, i = S(t), w = i ? Array.isArray(e) ? e : [e] : [e], d = f.field(n);
17
+ await a.locator(d).click();
18
+ const g = f.selectTrigger(n);
19
+ for (const u of t.one_of ?? ((k = t.elements) == null ? void 0 : k.one_of) ?? [])
20
+ if (u != null) {
21
+ const r = i ? f.multiSelectItem(String(u)) : f.selectItem(String(u));
22
+ i && await a.locator(g).locator(`${r} button.selected`).count() > 0 && await a.locator(g).locator(r).click(), w.includes(u) && await a.locator(g).locator(r).click();
22
23
  }
23
24
  }
24
- async function M(e) {
25
- const { page: a, fieldKey: n, value: t } = e, o = Array.isArray(t) ? t : [t], i = f.tagInput(n);
26
- await a.locator(i).fill(o.join(","));
25
+ async function j(o) {
26
+ const { page: a, fieldKey: n, value: t } = o, e = Array.isArray(t) ? t : [t], i = f.tagInput(n);
27
+ await a.locator(i).fill(e.join(","));
27
28
  }
28
- async function T(e) {
29
- const { page: a, fieldKey: n, value: t, onFillItem: o } = e, i = f.arrayTabContainer(n), w = f.arrayBasicContainer(n), u = await a.locator(i).count() > 0, b = await a.locator(w).count() > 0;
30
- if (u || b) {
31
- const d = f.arrayRemoveBtns(n), k = async () => {
32
- await a.locator(d).count() > 0 && (await a.locator(d).first().click(), await k());
29
+ async function M(o) {
30
+ const { page: a, fieldKey: n, value: t, onFillItem: e } = o, i = f.arrayTabContainer(n), w = f.arrayBasicContainer(n), d = await a.locator(i).count() > 0, g = await a.locator(w).count() > 0;
31
+ if (d || g) {
32
+ const k = f.arrayRemoveBtns(n), u = async () => {
33
+ await a.locator(k).count() > 0 && (await a.locator(k).first().click(), await u());
33
34
  };
34
- if (await k(), !Array.isArray(t))
35
+ if (await u(), !Array.isArray(t))
35
36
  return;
36
- for (let l = 0; l < t.length; l++) {
37
+ for (let r = 0; r < t.length; r++) {
37
38
  const c = f.arrayAddBtn(n);
38
- await a.locator(c).click(), await o(l, t[l]);
39
+ await a.locator(c).scrollIntoViewIfNeeded(), await a.locator(c).click({ force: !0 }), await e(r, t[r]);
39
40
  }
40
41
  }
41
42
  }
42
- async function x(e) {
43
- const { page: a, fieldKey: n, onFillChildren: t } = e, o = f.objectSwitch(n), i = await a.locator(o).count() > 0;
44
- if ((e.value === null || e.value === void 0) && i) {
45
- await a.locator(o).locator("..").locator('[data-testid="switch-control"]').click({ force: !0 });
43
+ async function x(o) {
44
+ const { page: a, fieldKey: n, onFillChildren: t } = o, e = f.objectSwitch(n), i = await a.locator(e).count() > 0;
45
+ if ((o.value === null || o.value === void 0) && i) {
46
+ await a.locator(e).locator("..").locator('[data-testid="switch-control"]').click({ force: !0 });
46
47
  return;
47
48
  }
48
- i && await a.locator(o).locator("..").locator('[data-testid="switch-control"]').click({ force: !0 }), await new Promise((w) => setTimeout(w, 300)), await t();
49
+ i && await a.locator(e).locator("..").locator('[data-testid="switch-control"]').click({ force: !0 }), await new Promise((w) => setTimeout(w, 300)), await t();
49
50
  }
50
- function R(e, a) {
51
- if (!e)
51
+ function N(o, a) {
52
+ if (!o)
52
53
  throw new Error(`Unable to find map entry test id for "${a}"`);
53
- const n = e.match(/kid:\d+/);
54
+ const n = o.match(/kid:\d+/);
54
55
  if (!n)
55
- throw new Error(`Unable to extract map entry kid id from test id "${e}"`);
56
+ throw new Error(`Unable to extract map entry kid id from test id "${o}"`);
56
57
  return n[0];
57
58
  }
58
- async function $(e) {
59
- const { page: a, fieldKey: n, value: t, onFillEntry: o } = e, i = async () => {
60
- const u = f.mapRemoveBtns(n);
61
- await a.locator(u).count() !== 0 && (await a.locator(u).first().click(), await i());
59
+ async function R(o) {
60
+ const { page: a, fieldKey: n, value: t, onFillEntry: e } = o, i = async () => {
61
+ const d = f.mapRemoveBtns(n);
62
+ await a.locator(d).count() !== 0 && (await a.locator(d).first().click(), await i());
62
63
  };
63
64
  if (await i(), typeof t != "object" || t == null)
64
65
  return;
65
66
  const w = Object.entries(t);
66
67
  if (w.length !== 0)
67
- for (let u = 0; u < w.length; u++) {
68
- const [b, d] = w[u];
68
+ for (let d = 0; d < w.length; d++) {
69
+ const [g, k] = w[d];
69
70
  await a.locator(f.mapAddBtn(n)).click();
70
- const k = f.mapContainer(n, u), l = a.locator(k);
71
- await l.waitFor();
72
- const c = a.locator(f.mapKey(n, u));
73
- await c.clear(), await c.fill(String(b));
74
- const s = l.locator(`[data-testid*="${n}.kid:"]`).first();
71
+ const u = f.mapContainer(n, d), r = a.locator(u);
72
+ await r.waitFor();
73
+ const c = a.locator(f.mapKey(n, d));
74
+ await c.clear(), await c.fill(String(g));
75
+ const s = r.locator(`[data-testid*="${n}.kid:"]`).first();
75
76
  await s.waitFor();
76
- const r = R(await s.getAttribute("data-testid"), n);
77
- await o(r, d);
77
+ const l = N(await s.getAttribute("data-testid"), n);
78
+ await e(l, k);
78
79
  }
79
80
  }
80
- async function N(e) {
81
- const { page: a, fieldKey: n, value: t } = e, o = f.json(n), i = a.locator(o).locator("textarea"), w = typeof t == "string" ? t : JSON.stringify(t, null, 2);
81
+ async function $(o) {
82
+ const { page: a, fieldKey: n, value: t } = o, e = f.json(n), i = a.locator(e).locator("textarea"), w = typeof t == "string" ? t : JSON.stringify(t, null, 2);
82
83
  await i.clear(), await i.fill(w);
83
84
  }
84
- async function J(e) {
85
- const { page: a, fieldKey: n, value: t } = e, o = f.field(n);
86
- await a.locator(o).click();
85
+ async function J(o) {
86
+ const { page: a, fieldKey: n, value: t } = o, e = f.field(n);
87
+ await a.locator(e).click();
87
88
  const i = typeof t == "object" && (t != null && t.id) ? t.id : t;
88
89
  i && await a.locator(`[data-testid="select-item-${i}"]`).click();
89
90
  }
90
91
  const H = {
91
- fillString: C,
92
- fillNumber: E,
93
- fillBoolean: I,
94
- fillEnum: j,
95
- fillTag: M,
96
- fillArray: T,
92
+ fillString: I,
93
+ fillNumber: C,
94
+ fillBoolean: E,
95
+ fillEnum: T,
96
+ fillTag: j,
97
+ fillArray: M,
97
98
  fillRecord: x,
98
- fillMap: $,
99
- fillJson: N,
99
+ fillMap: R,
100
+ fillJson: $,
100
101
  fillForeign: J
101
102
  };
102
- function U(e, a, n) {
103
- const t = F(a), o = { ...H, ...n };
104
- async function i(l, c, s = "") {
105
- for (const r of v(l, c, t, s))
106
- await w(r);
103
+ function U(o, a, n) {
104
+ const t = F(a), e = { ...H, ...n };
105
+ async function i(r, c, s = "") {
106
+ for (const l of v(r, c, t, s))
107
+ await w(l);
107
108
  }
108
- async function w({ handlerType: l, fieldKey: c, fieldSchema: s, value: r }, y) {
109
- switch (l) {
109
+ async function w({ handlerType: r, fieldKey: c, fieldSchema: s, value: l }, y) {
110
+ switch (r) {
110
111
  case "string":
111
- await o.fillString({ page: e, fieldKey: c, fieldSchema: s, value: r, typeOptions: y });
112
+ await e.fillString({ page: o, fieldKey: c, fieldSchema: s, value: l, typeOptions: y });
112
113
  break;
113
114
  case "number":
114
- await o.fillNumber({ page: e, fieldKey: c, fieldSchema: s, value: r, typeOptions: y });
115
+ await e.fillNumber({ page: o, fieldKey: c, fieldSchema: s, value: l, typeOptions: y });
115
116
  break;
116
117
  case "boolean":
117
- await o.fillBoolean({ page: e, fieldKey: c, fieldSchema: s, value: r, typeOptions: y });
118
+ await e.fillBoolean({ page: o, fieldKey: c, fieldSchema: s, value: l, typeOptions: y });
118
119
  break;
119
120
  case "enum":
120
- await o.fillEnum({ page: e, fieldKey: c, fieldSchema: s, value: r, typeOptions: y });
121
+ await e.fillEnum({ page: o, fieldKey: c, fieldSchema: s, value: l, typeOptions: y });
121
122
  break;
122
123
  case "tag":
123
- await o.fillTag({ page: e, fieldKey: c, fieldSchema: s, value: r, typeOptions: y });
124
+ await e.fillTag({ page: o, fieldKey: c, fieldSchema: s, value: l, typeOptions: y });
124
125
  break;
125
126
  case "map":
126
- await o.fillMap({
127
- page: e,
127
+ await e.fillMap({
128
+ page: o,
128
129
  fieldKey: c,
129
130
  fieldSchema: s,
130
- value: r,
131
- onFillEntry: async (m, g) => {
132
- await b(t, c, m, g);
131
+ value: l,
132
+ onFillEntry: async (m, b) => {
133
+ await g(t, c, m, b);
133
134
  }
134
135
  });
135
136
  break;
136
137
  case "json":
137
- await o.fillJson({ page: e, fieldKey: c, fieldSchema: s, value: r, typeOptions: y });
138
+ await e.fillJson({ page: o, fieldKey: c, fieldSchema: s, value: l, typeOptions: y });
138
139
  break;
139
140
  case "foreign":
140
- await o.fillForeign({ page: e, fieldKey: c, fieldSchema: s, value: r, typeOptions: y });
141
+ await e.fillForeign({ page: o, fieldKey: c, fieldSchema: s, value: l, typeOptions: y });
141
142
  break;
142
143
  case "array":
143
- await o.fillArray({
144
- page: e,
144
+ await e.fillArray({
145
+ page: o,
145
146
  fieldKey: c,
146
147
  fieldSchema: s,
147
- value: r,
148
- onFillItem: async (m, g) => {
149
- await u(t, c, m, g);
148
+ value: l,
149
+ onFillItem: async (m, b) => {
150
+ await d(t, c, m, b);
150
151
  }
151
152
  });
152
153
  break;
153
154
  case "record":
154
- await o.fillRecord({
155
- page: e,
155
+ await e.fillRecord({
156
+ page: o,
156
157
  fieldKey: c,
157
158
  fieldSchema: s,
158
- value: r,
159
+ value: l,
159
160
  onFillChildren: async () => {
160
- await i(s.fields, r, c);
161
+ await i(s.fields, l, c);
161
162
  }
162
163
  });
163
164
  break;
164
165
  }
165
166
  }
166
- async function u(l, c, s, r) {
167
- const { itemKey: y, itemSchema: m } = A(c, s, l);
168
- B(m) ? await i(m.fields, r, y) : await w({
167
+ async function d(r, c, s, l) {
168
+ const { itemKey: y, itemSchema: m } = A(c, s, r);
169
+ p(m) ? await i(m.fields, l, y) : await w({
169
170
  handlerType: h(m),
170
171
  fieldKey: y,
171
172
  fieldSchema: m,
172
- value: r
173
+ value: l
173
174
  });
174
175
  }
175
- async function b(l, c, s, r) {
176
- const { entryKey: y, entrySchema: m } = p(c, s, l);
176
+ async function g(r, c, s, l) {
177
+ const { entryKey: y, entrySchema: m } = B(c, s, r);
177
178
  await w({
178
179
  handlerType: h(m),
179
180
  fieldKey: y,
180
181
  fieldSchema: m,
181
- value: r
182
+ value: l
182
183
  });
183
184
  }
184
- async function d(l) {
185
- a.fields && Array.isArray(a.fields) && await i(a.fields, l);
185
+ async function k(r) {
186
+ a.fields && Array.isArray(a.fields) && await i(a.fields, r);
186
187
  }
187
- async function k(l, c, s) {
188
- const r = t.schemaMap[l];
189
- if (!r)
190
- throw new Error(`Field schema for "${l}" not found in schema map`);
188
+ async function u(r, c, s) {
189
+ const l = t.schemaMap[r];
190
+ if (!l)
191
+ throw new Error(`Field schema for "${r}" not found in schema map`);
191
192
  await w({
192
- handlerType: h(r),
193
- fieldKey: l,
194
- fieldSchema: r,
193
+ handlerType: h(l),
194
+ fieldKey: r,
195
+ fieldSchema: l,
195
196
  value: c
196
197
  }, s);
197
198
  }
198
199
  return {
199
- fill: d,
200
- fillField: k,
200
+ fill: k,
201
+ fillField: u,
201
202
  schemaMap: t.schemaMap,
202
- handlers: o
203
+ handlers: e
203
204
  };
204
205
  }
205
206
  export {
206
207
  U as createFiller,
207
- T as fillArray,
208
- I as fillBoolean,
209
- j as fillEnum,
208
+ M as fillArray,
209
+ E as fillBoolean,
210
+ T as fillEnum,
210
211
  J as fillForeign,
211
- N as fillJson,
212
- $ as fillMap,
213
- E as fillNumber,
212
+ $ as fillJson,
213
+ R as fillMap,
214
+ C as fillNumber,
214
215
  x as fillRecord,
215
- C as fillString,
216
- M as fillTag,
216
+ I as fillString,
217
+ j as fillTag,
217
218
  H as handlers
218
219
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/entities-plugins",
3
- "version": "9.222.3",
3
+ "version": "9.222.4",
4
4
  "type": "module",
5
5
  "main": "./dist/entities-plugins.umd.js",
6
6
  "module": "./dist/entities-plugins.es.js",
@@ -92,9 +92,9 @@
92
92
  "vue-router": "^5.1.0",
93
93
  "zod": "^4.4.3",
94
94
  "@kong-ui-public/entities-shared": "^3.53.3",
95
- "@kong-ui-public/monaco-editor": "^0.22.23",
96
95
  "@kong-ui-public/i18n": "^2.4.6",
97
- "@kong-ui-public/entities-vaults": "^4.12.2"
96
+ "@kong-ui-public/entities-vaults": "^4.12.2",
97
+ "@kong-ui-public/monaco-editor": "^0.22.23"
98
98
  },
99
99
  "repository": {
100
100
  "type": "git",
@@ -115,14 +115,14 @@
115
115
  "lodash-es": "^4.18.1",
116
116
  "marked": "^14.1.4",
117
117
  "@kong-ui-public/entities-consumer-groups": "^4.5.36",
118
+ "@kong-ui-public/entities-plugins-icon": "^1.6.7",
118
119
  "@kong-ui-public/entities-consumers": "^4.4.34",
119
120
  "@kong-ui-public/entities-gateway-services": "^3.20.34",
120
121
  "@kong-ui-public/entities-plugins-metadata": "^1.13.3",
121
- "@kong-ui-public/entities-redis-configurations": "^1.15.46",
122
- "@kong-ui-public/entities-plugins-icon": "^1.6.7",
123
- "@kong-ui-public/entities-routes": "^3.22.42",
124
- "@kong-ui-public/entities-vaults": "^4.12.2",
125
- "@kong-ui-public/forms": "^4.29.4"
122
+ "@kong-ui-public/entities-redis-configurations": "^1.15.47",
123
+ "@kong-ui-public/entities-routes": "^3.22.43",
124
+ "@kong-ui-public/forms": "^4.29.5",
125
+ "@kong-ui-public/entities-vaults": "^4.12.2"
126
126
  },
127
127
  "scripts": {
128
128
  "dev": "cross-env USE_SANDBOX=true vite",