@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.
@@ -1 +1 @@
1
- {"version":3,"file":"foreign.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../src/components/free-form/filler/playwright/handlers/foreign.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAA;AAClF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAG5C,wBAAsB,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,kBAAkB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAe1F"}
1
+ {"version":3,"file":"foreign.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../src/components/free-form/filler/playwright/handlers/foreign.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAA;AAClF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAG5C,wBAAsB,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,kBAAkB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAc1F"}
@@ -1 +1 @@
1
- {"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../src/components/free-form/filler/playwright/handlers/record.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAGlD,wBAAsB,UAAU,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAoC3E"}
1
+ {"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../src/components/free-form/filler/playwright/handlers/record.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAGlD,wBAAsB,UAAU,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAwD3E"}
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../../../../../../src/components/free-form/shared/composables/schema.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACV,gBAAgB,EAEhB,UAAU,EACV,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACf,MAAM,uCAAuC,CAAA;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAA;AAG3C,wBAAgB,cAAc,CAAC,MAAM,EAAE,gBAAgB,EAAE,UAAU,GAAE,MAAW,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAYlH;AAED,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,iBAAiB,EAAE,UAAU,GAAE,MAAW,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAuB/H;AAED,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,gBAAgB,EAAE,UAAU,GAAE,MAAW,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAmB5H;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,cAAc,EAAE,UAAU,GAAE,MAAW,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAkBtH;AAGD;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,UAqBpF;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,CAAC,UAAU,GAAG,gBAAgB,CAAC;;;YAehE,UAAU;SACb,CAAC,SAAS,gBAAgB,2BAA2B,MAAM,GAAG,CAAC,GAAG,SAAS;;wBA0EnE,MAAM,KAAG,GAAG;gCAqBJ,MAAM,KAAG,UAAU,EAAE;oCAXjB,MAAM,KAAG,eAAe;gCAgB5B,MAAM,KAAG,MAAM,GAAG,IAAI;wBA6B9B,CAAC,mBAAmB,MAAM,KAAG,CAAC,GAAG,IAAI;EAejE"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../../../../../../src/components/free-form/shared/composables/schema.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACV,gBAAgB,EAEhB,UAAU,EACV,iBAAiB,EAEjB,gBAAgB,EAChB,cAAc,EACf,MAAM,uCAAuC,CAAA;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAA;AAG3C,wBAAgB,cAAc,CAAC,MAAM,EAAE,gBAAgB,EAAE,UAAU,GAAE,MAAW,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAYlH;AAED,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,iBAAiB,EAAE,UAAU,GAAE,MAAW,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAuB/H;AAED,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,gBAAgB,EAAE,UAAU,GAAE,MAAW,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAmB5H;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,cAAc,EAAE,UAAU,GAAE,MAAW,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAkBtH;AAGD;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,UAqBpF;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,CAAC,UAAU,GAAG,gBAAgB,CAAC;;;YAehE,UAAU;SACb,CAAC,SAAS,gBAAgB,2BAA2B,MAAM,GAAG,CAAC,GAAG,SAAS;;wBAoFnE,MAAM,KAAG,GAAG;gCAqBJ,MAAM,KAAG,UAAU,EAAE;oCAXjB,MAAM,KAAG,eAAe;gCAgB5B,MAAM,KAAG,MAAM,GAAG,IAAI;wBA6B9B,CAAC,mBAAmB,MAAM,KAAG,CAAC,GAAG,IAAI;EAejE"}
@@ -1,205 +1,204 @@
1
- import { s as f, i as h, c as p, g as k, w as S, a as v, b as F, d as A } from "../field-walker-B9V32Dwy.js";
2
- async function B(o) {
3
- const { page: a, fieldKey: n, value: t } = o, e = f.field(n), i = a.locator(e);
1
+ import { s as w, i as k, c as p, g as b, w as S, a as v, b as F, d as A } from "../field-walker-CAXA5GF4.js";
2
+ async function C(e) {
3
+ const { page: a, fieldKey: n, value: t } = e, o = w.field(n), i = a.locator(o);
4
4
  await i.clear(), t != null && t !== "" && await i.fill(String(t));
5
5
  }
6
- async function C(o) {
7
- const { page: a, fieldKey: n, value: t } = o, e = f.field(n), i = a.locator(e);
6
+ async function B(e) {
7
+ const { page: a, fieldKey: n, value: t } = e, o = w.field(n), i = a.locator(o);
8
8
  await i.clear(), t != null && await i.fill(String(t));
9
9
  }
10
- async function E(o) {
11
- const { page: a, fieldKey: n, value: t } = o, e = f.field(n), i = a.locator(e);
10
+ async function E(e) {
11
+ const { page: a, fieldKey: n, value: t } = e, o = w.field(n), i = a.locator(o);
12
12
  t === !0 ? await i.check() : t === !1 && await i.uncheck();
13
13
  }
14
- async function I(o) {
15
- const { page: a, fieldKey: n, fieldSchema: t, value: e } = o, i = h(t), w = i ? Array.isArray(e) ? e : [e] : [e], d = f.field(n);
16
- await a.locator(d).click();
17
- const m = f.selectTrigger(n);
18
- for (const u of t.one_of ?? t.elements?.one_of ?? [])
19
- if (u != null) {
20
- const b = i ? f.multiSelectItem(String(u)) : f.selectItem(String(u));
21
- i && await a.locator(m).locator(`${b} button.selected`).count() > 0 && await a.locator(m).locator(b).click(), w.includes(u) && await a.locator(m).locator(b).click();
14
+ async function I(e) {
15
+ const { page: a, fieldKey: n, fieldSchema: t, value: o } = e, i = k(t), s = i ? Array.isArray(o) ? o : [o] : [o], u = w.field(n);
16
+ await a.locator(u).click();
17
+ const d = w.selectTrigger(n);
18
+ for (const y of t.one_of ?? t.elements?.one_of ?? [])
19
+ if (y != null) {
20
+ const h = i ? w.multiSelectItem(String(y)) : w.selectItem(String(y));
21
+ i && await a.locator(d).locator(`${h} button.selected`).count() > 0 && await a.locator(d).locator(h).click(), s.includes(y) && await a.locator(d).locator(h).click();
22
22
  }
23
23
  }
24
- async function j(o) {
25
- const { page: a, fieldKey: n, value: t } = o, e = Array.isArray(t) ? t : [t], i = f.tagInput(n);
26
- await a.locator(i).fill(e.join(","));
24
+ async function j(e) {
25
+ const { page: a, fieldKey: n, value: t } = e, o = Array.isArray(t) ? t : [t], i = w.tagInput(n);
26
+ await a.locator(i).fill(o.join(","));
27
27
  }
28
- async function M(o) {
29
- 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, m = await a.locator(w).count() > 0;
30
- if (d || m) {
31
- const u = f.arrayRemoveBtns(n), b = async () => {
32
- await a.locator(u).count() > 0 && (await a.locator(u).first().click(), await b());
28
+ async function M(e) {
29
+ const { page: a, fieldKey: n, value: t, onFillItem: o } = e, i = w.arrayTabContainer(n), s = w.arrayBasicContainer(n), u = await a.locator(i).count() > 0, d = await a.locator(s).count() > 0;
30
+ if (u || d) {
31
+ const y = w.arrayRemoveBtns(n), h = async () => {
32
+ await a.locator(y).count() > 0 && (await a.locator(y).first().click(), await h());
33
33
  };
34
- if (await b(), !Array.isArray(t))
34
+ if (await h(), !Array.isArray(t))
35
35
  return;
36
36
  for (let r = 0; r < t.length; r++) {
37
- const c = f.arrayAddBtn(n);
38
- await a.locator(c).click(), await e(r, t[r]);
37
+ const c = w.arrayAddBtn(n);
38
+ await a.locator(c).click(), await o(r, t[r]);
39
39
  }
40
40
  }
41
41
  }
42
- async function T(o) {
43
- const { page: a, fieldKey: n, onFillChildren: t } = o, e = f.objectSwitch(n), i = await a.locator(e).count() > 0;
44
- if ((o.value === null || o.value === void 0) && i) {
45
- await a.locator(e).locator("..").locator('[data-testid="switch-control"]').click();
46
- return;
42
+ async function T(e) {
43
+ const { page: a, fieldKey: n, onFillChildren: t } = e, o = w.objectSwitch(n);
44
+ if (await a.locator(o).count() > 0) {
45
+ const s = a.locator(o).locator("..").locator('[data-testid="switch-control"]'), u = await s.getAttribute("aria-checked") === "true", d = e.value !== null && e.value !== void 0;
46
+ if (u !== d && (await s.click(), d && await a.locator(w.objectContent(n)).waitFor({ state: "visible" })), !d)
47
+ return;
47
48
  }
48
- i && (await a.locator(e).locator("..").locator('[data-testid="switch-control"]').click(), await a.locator(f.objectContent(n)).waitFor({ state: "visible" })), await t();
49
+ await t();
49
50
  }
50
- function x(o, a) {
51
- if (!o)
51
+ function x(e, a) {
52
+ if (!e)
52
53
  throw new Error(`Unable to find map entry test id for "${a}"`);
53
- const n = o.match(/kid:\d+/);
54
+ const n = e.match(/kid:\d+/);
54
55
  if (!n)
55
- throw new Error(`Unable to extract map entry kid id from test id "${o}"`);
56
+ throw new Error(`Unable to extract map entry kid id from test id "${e}"`);
56
57
  return n[0];
57
58
  }
58
- async function R(o) {
59
- const { page: a, fieldKey: n, value: t, onFillEntry: e } = o, i = async () => {
60
- const d = f.mapRemoveBtns(n);
61
- await a.locator(d).count() !== 0 && (await a.locator(d).first().click(), await i());
59
+ async function R(e) {
60
+ const { page: a, fieldKey: n, value: t, onFillEntry: o } = e, i = async () => {
61
+ const u = w.mapRemoveBtns(n);
62
+ await a.locator(u).count() !== 0 && (await a.locator(u).first().click(), await i());
62
63
  };
63
64
  if (await i(), typeof t != "object" || t == null)
64
65
  return;
65
- const w = Object.entries(t);
66
- if (w.length !== 0)
67
- for (let d = 0; d < w.length; d++) {
68
- const [m, u] = w[d];
69
- await a.locator(f.mapAddBtn(n)).click();
70
- const b = f.mapContainer(n, d), r = a.locator(b);
66
+ const s = Object.entries(t);
67
+ if (s.length !== 0)
68
+ for (let u = 0; u < s.length; u++) {
69
+ const [d, y] = s[u];
70
+ await a.locator(w.mapAddBtn(n)).click();
71
+ const h = w.mapContainer(n, u), r = a.locator(h);
71
72
  await r.waitFor();
72
- const c = a.locator(f.mapKey(n, d));
73
- await c.clear(), await c.fill(String(m));
73
+ const c = a.locator(w.mapKey(n, u));
74
+ await c.clear(), await c.fill(String(d));
74
75
  const l = r.locator(`[data-testid*="${n}.kid:"]`).first();
75
76
  await l.waitFor();
76
- const s = x(await l.getAttribute("data-testid"), n);
77
- await e(s, u);
77
+ const f = x(await l.getAttribute("data-testid"), n);
78
+ await o(f, y);
78
79
  }
79
80
  }
80
- async function $(o) {
81
- 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
- await i.clear(), await i.fill(w);
81
+ async function N(e) {
82
+ const { page: a, fieldKey: n, value: t } = e, o = w.json(n), i = a.locator(o).locator("textarea"), s = typeof t == "string" ? t : JSON.stringify(t, null, 2);
83
+ await i.clear(), await i.fill(s);
83
84
  }
84
- async function N(o) {
85
- const { page: a, fieldKey: n, value: t } = o, e = f.field(n);
86
- await a.locator(e).click();
87
- const i = typeof t == "object" && t?.id ? t.id : t;
88
- i && await a.locator(`[data-testid="select-item-${i}"]`).click();
85
+ async function $(e) {
86
+ const { page: a, fieldKey: n, value: t } = e, o = w.field(n), i = a.locator(o), s = typeof t == "object" && t?.id ? t.id : t;
87
+ await i.clear(), s && await i.fill(String(s));
89
88
  }
90
89
  const J = {
91
- fillString: B,
92
- fillNumber: C,
90
+ fillString: C,
91
+ fillNumber: B,
93
92
  fillBoolean: E,
94
93
  fillEnum: I,
95
94
  fillTag: j,
96
95
  fillArray: M,
97
96
  fillRecord: T,
98
97
  fillMap: R,
99
- fillJson: $,
100
- fillForeign: N
98
+ fillJson: N,
99
+ fillForeign: $
101
100
  };
102
- function K(o, a, n) {
103
- const t = p(a), e = { ...J, ...n };
101
+ function K(e, a, n) {
102
+ const t = p(a), o = { ...J, ...n };
104
103
  async function i(r, c, l = "") {
105
- for (const s of S(r, c, t, l))
106
- await w(s);
104
+ for (const f of S(r, c, t, l))
105
+ await s(f);
107
106
  }
108
- async function w({ handlerType: r, fieldKey: c, fieldSchema: l, value: s }) {
107
+ async function s({ handlerType: r, fieldKey: c, fieldSchema: l, value: f }) {
109
108
  switch (r) {
110
109
  case "string":
111
- await e.fillString({ page: o, fieldKey: c, fieldSchema: l, value: s });
110
+ await o.fillString({ page: e, fieldKey: c, fieldSchema: l, value: f });
112
111
  break;
113
112
  case "number":
114
- await e.fillNumber({ page: o, fieldKey: c, fieldSchema: l, value: s });
113
+ await o.fillNumber({ page: e, fieldKey: c, fieldSchema: l, value: f });
115
114
  break;
116
115
  case "boolean":
117
- await e.fillBoolean({ page: o, fieldKey: c, fieldSchema: l, value: s });
116
+ await o.fillBoolean({ page: e, fieldKey: c, fieldSchema: l, value: f });
118
117
  break;
119
118
  case "enum":
120
- await e.fillEnum({ page: o, fieldKey: c, fieldSchema: l, value: s });
119
+ await o.fillEnum({ page: e, fieldKey: c, fieldSchema: l, value: f });
121
120
  break;
122
121
  case "tag":
123
- await e.fillTag({ page: o, fieldKey: c, fieldSchema: l, value: s });
122
+ await o.fillTag({ page: e, fieldKey: c, fieldSchema: l, value: f });
124
123
  break;
125
124
  case "map":
126
- await e.fillMap({
127
- page: o,
125
+ await o.fillMap({
126
+ page: e,
128
127
  fieldKey: c,
129
128
  fieldSchema: l,
130
- value: s,
131
- onFillEntry: async (g, y) => {
132
- await m(t, c, g, y);
129
+ value: f,
130
+ onFillEntry: async (g, m) => {
131
+ await d(t, c, g, m);
133
132
  }
134
133
  });
135
134
  break;
136
135
  case "json":
137
- await e.fillJson({ page: o, fieldKey: c, fieldSchema: l, value: s });
136
+ await o.fillJson({ page: e, fieldKey: c, fieldSchema: l, value: f });
138
137
  break;
139
138
  case "foreign":
140
- await e.fillForeign({ page: o, fieldKey: c, fieldSchema: l, value: s });
139
+ await o.fillForeign({ page: e, fieldKey: c, fieldSchema: l, value: f });
141
140
  break;
142
141
  case "array":
143
- await e.fillArray({
144
- page: o,
142
+ await o.fillArray({
143
+ page: e,
145
144
  fieldKey: c,
146
145
  fieldSchema: l,
147
- value: s,
148
- onFillItem: async (g, y) => {
149
- await d(t, c, g, y);
146
+ value: f,
147
+ onFillItem: async (g, m) => {
148
+ await u(t, c, g, m);
150
149
  }
151
150
  });
152
151
  break;
153
152
  case "record":
154
- await e.fillRecord({
155
- page: o,
153
+ await o.fillRecord({
154
+ page: e,
156
155
  fieldKey: c,
157
156
  fieldSchema: l,
158
- value: s,
157
+ value: f,
159
158
  onFillChildren: async () => {
160
- await i(l.fields, s, c);
159
+ await i(l.fields, f, c);
161
160
  }
162
161
  });
163
162
  break;
164
163
  }
165
164
  }
166
- async function d(r, c, l, s) {
167
- const { itemKey: g, itemSchema: y } = v(c, l, r);
168
- F(y) ? await i(y.fields, s, g) : await w({
169
- handlerType: k(y),
165
+ async function u(r, c, l, f) {
166
+ const { itemKey: g, itemSchema: m } = v(c, l, r);
167
+ F(m) ? await i(m.fields, f, g) : await s({
168
+ handlerType: b(m),
170
169
  fieldKey: g,
171
- fieldSchema: y,
172
- value: s
170
+ fieldSchema: m,
171
+ value: f
173
172
  });
174
173
  }
175
- async function m(r, c, l, s) {
176
- const { entryKey: g, entrySchema: y } = A(c, l, r);
177
- await w({
178
- handlerType: k(y),
174
+ async function d(r, c, l, f) {
175
+ const { entryKey: g, entrySchema: m } = A(c, l, r);
176
+ await s({
177
+ handlerType: b(m),
179
178
  fieldKey: g,
180
- fieldSchema: y,
181
- value: s
179
+ fieldSchema: m,
180
+ value: f
182
181
  });
183
182
  }
184
- async function u(r) {
183
+ async function y(r) {
185
184
  a.fields && Array.isArray(a.fields) && await i(a.fields, r);
186
185
  }
187
- async function b(r, c) {
186
+ async function h(r, c) {
188
187
  const l = t.schemaMap[r];
189
188
  if (!l)
190
189
  throw new Error(`Field schema for "${r}" not found in schema map`);
191
- await w({
192
- handlerType: k(l),
190
+ await s({
191
+ handlerType: b(l),
193
192
  fieldKey: r,
194
193
  fieldSchema: l,
195
194
  value: c
196
195
  });
197
196
  }
198
197
  return {
199
- fill: u,
200
- fillField: b,
198
+ fill: y,
199
+ fillField: h,
201
200
  schemaMap: t.schemaMap,
202
- handlers: e
201
+ handlers: o
203
202
  };
204
203
  }
205
204
  export {
@@ -207,12 +206,12 @@ export {
207
206
  M as fillArray,
208
207
  E as fillBoolean,
209
208
  I as fillEnum,
210
- N as fillForeign,
211
- $ as fillJson,
209
+ $ as fillForeign,
210
+ N as fillJson,
212
211
  R as fillMap,
213
- C as fillNumber,
212
+ B as fillNumber,
214
213
  T as fillRecord,
215
- B as fillString,
214
+ C as fillString,
216
215
  j as fillTag,
217
216
  J as handlers
218
217
  };
@@ -190,7 +190,12 @@ function Gt(e) {
190
190
  }
191
191
  function r(l, u = !1) {
192
192
  const f = n(l);
193
- return f ? f.default !== void 0 ? f.default : u || f.required ? f.type === "record" ? a(f, l) : f.type === "array" ? [] : f.type === "map" ? {} : null : null : null;
193
+ if (!f)
194
+ return null;
195
+ if (f.default !== void 0)
196
+ return f.default;
197
+ if (!f.auto)
198
+ return u || f.required ? f.type === "record" ? a(f, l) : f.type === "array" ? [] : f.type === "map" ? {} : null : null;
194
199
  }
195
200
  function a(l, u) {
196
201
  const f = {};