@kong-ui-public/entities-plugins 9.247.3 → 9.247.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 +3093 -3090
- package/dist/entities-plugins.umd.js +59 -59
- package/dist/filler/cypress/index.js +61 -61
- package/dist/filler/{field-walker-B9V32Dwy.js → field-walker-DP5ZupX8.js} +1465 -1426
- 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/form-context.d.ts +0 -2
- package/dist/filler/packages/entities/entities-plugins/src/components/free-form/shared/composables/form-context.d.ts.map +1 -1
- package/dist/filler/packages/entities/entities-plugins/src/components/free-form/shared/composables/render-rules.d.ts +9 -3
- package/dist/filler/packages/entities/entities-plugins/src/components/free-form/shared/composables/render-rules.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 +986 -983
- package/dist/freeform/style.css +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/free-form/shared/ObjectField.vue.d.ts.map +1 -1
- package/dist/types/components/free-form/shared/composables/form-context.d.ts +0 -2
- package/dist/types/components/free-form/shared/composables/form-context.d.ts.map +1 -1
- package/dist/types/components/free-form/shared/composables/render-rules.d.ts +9 -3
- package/dist/types/components/free-form/shared/composables/render-rules.d.ts.map +1 -1
- package/dist/types/components/free-form/shared/composables/schema.d.ts.map +1 -1
- package/package.json +16 -16
|
@@ -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,
|
|
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,
|
|
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"}
|
|
@@ -48,7 +48,6 @@ export declare const provideFormShared: (options: {
|
|
|
48
48
|
useCurrentRenderRules: (options: {
|
|
49
49
|
fieldPath: MaybeRefOrGetter<string>;
|
|
50
50
|
rules?: MaybeRefOrGetter<RenderRules | undefined>;
|
|
51
|
-
parentValue?: MaybeRefOrGetter<unknown>;
|
|
52
51
|
omittedFields?: MaybeRefOrGetter<string[] | undefined>;
|
|
53
52
|
}) => ComputedRef<RenderRules | undefined>;
|
|
54
53
|
rootRenderRules: ComputedRef<RenderRules | undefined>;
|
|
@@ -94,7 +93,6 @@ export declare const provideFormShared: (options: {
|
|
|
94
93
|
useCurrentRenderRules: (options: {
|
|
95
94
|
fieldPath: MaybeRefOrGetter<string>;
|
|
96
95
|
rules?: MaybeRefOrGetter<RenderRules | undefined>;
|
|
97
|
-
parentValue?: MaybeRefOrGetter<unknown>;
|
|
98
96
|
omittedFields?: MaybeRefOrGetter<string[] | undefined>;
|
|
99
97
|
}) => ComputedRef<RenderRules | undefined>;
|
|
100
98
|
rootRenderRules: ComputedRef<RenderRules | undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-context.d.ts","sourceRoot":"","sources":["../../../../../../../../../../src/components/free-form/shared/composables/form-context.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAA;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AAEzF,eAAO,MAAO,iBAAiB;YAEnB,UAAU,GAAG,gBAAgB;;;uBAGlB,gBAAgB,CAAC,WAAW,GAAG,SAAS,CAAC;kDACjC,IAAI;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"form-context.d.ts","sourceRoot":"","sources":["../../../../../../../../../../src/components/free-form/shared/composables/form-context.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAA;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AAEzF,eAAO,MAAO,iBAAiB;YAEnB,UAAU,GAAG,gBAAgB;;;uBAGlB,gBAAgB,CAAC,WAAW,GAAG,SAAS,CAAC;kDACjC,IAAI;;;;;;;;;;;;;;;;;;;;;wBAwHJ,MAAM;wBAIN,CAAC,mBAAmB,MAAM;;;;;;;;;IAKnD;;OAEG;;;;;;;;aAgC8uP,CAAC;qBAA6D,CAAC;;;;GAzKrxP,qBAAqB;;;;;;;;;;;;;;;;;;;;wBA8HvB,MAAM;wBAIN,CAAC,mBAAmB,MAAM;;;;;;;;;IAKnD;;OAEG;;;;;;;;aAgC8uP,CAAC;qBAA6D,CAAC;;;;aAfrzP,CAAA;AAED,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAM/D,UAAU,CAAC,OAAO,qBAAqB,CAAC,GAAG;IACzD,QAAQ,EAAE,CAAC,CAAA;IACX,MAAM,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA;IAClC,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,IAAI,CAAA;IAC/B,QAAQ,EAAE,MAAM,CAAC,CAAA;CAClB,CACF"}
|
|
@@ -25,15 +25,21 @@ export declare const RENDER_RULE_EXACT_MATCH: unique symbol;
|
|
|
25
25
|
export declare function renderRuleExactMatch<T>(value: T): {
|
|
26
26
|
[RENDER_RULE_EXACT_MATCH]: T;
|
|
27
27
|
};
|
|
28
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Evaluates whether a dependency condition is satisfied.
|
|
30
|
+
* - `renderRuleExactMatch(value)` → exact deep equality (dependency field holds an array).
|
|
31
|
+
* - array → any-of: satisfied when the actual value matches any element.
|
|
32
|
+
* - anything else → exact deep equality.
|
|
33
|
+
*/
|
|
34
|
+
export declare function meetsDependency(actual: unknown, expected: unknown): boolean;
|
|
35
|
+
export declare function createRenderRuleRegistry(getSchemaMap: () => Record<string, UnionFieldSchema>, getFormData: () => Record<string, any>): {
|
|
29
36
|
useCurrentRules: (options: {
|
|
30
37
|
fieldPath: MaybeRefOrGetter<string>;
|
|
31
38
|
rules?: MaybeRefOrGetter<RenderRules | undefined>;
|
|
32
|
-
parentValue?: MaybeRefOrGetter<unknown>;
|
|
33
39
|
omittedFields?: MaybeRefOrGetter<string[] | undefined>;
|
|
34
40
|
}) => import("vue").ComputedRef<RenderRules | undefined>;
|
|
35
41
|
createComputedRules: (fieldPath: MaybeRefOrGetter<string | undefined>) => import("vue").ComputedRef<RenderRules | undefined>;
|
|
36
|
-
|
|
42
|
+
hasDependencies: import("vue").ComputedRef<boolean>;
|
|
37
43
|
isFieldHidden: (fieldPath: string) => boolean;
|
|
38
44
|
};
|
|
39
45
|
//# sourceMappingURL=render-rules.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-rules.d.ts","sourceRoot":"","sources":["../../../../../../../../../../src/components/free-form/shared/composables/render-rules.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAC3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AAE7E;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,eAAuC,CAAA;AAE3E;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG;IAAE,CAAC,uBAAuB,CAAC,EAAE,CAAC,CAAA;CAAE,CAElF;AAED,wBAAgB,
|
|
1
|
+
{"version":3,"file":"render-rules.d.ts","sourceRoot":"","sources":["../../../../../../../../../../src/components/free-form/shared/composables/render-rules.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAC3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AAE7E;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,eAAuC,CAAA;AAE3E;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG;IAAE,CAAC,uBAAuB,CAAC,EAAE,CAAC,CAAA;CAAE,CAElF;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAY3E;AAED,wBAAgB,wBAAwB,CACtC,YAAY,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,EACpD,WAAW,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;+BA6VJ;QAChC,SAAS,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;QACnC,KAAK,CAAC,EAAE,gBAAgB,CAAC,WAAW,GAAG,SAAS,CAAC,CAAA;QACjD,aAAa,CAAC,EAAE,gBAAgB,CAAC,MAAM,EAAE,GAAG,SAAS,CAAC,CAAA;KACvD;qCA9BuC,gBAAgB,CAAC,MAAM,GAAG,SAAS,CAAC;;+BAoF1C,MAAM,KAAG,OAAO;EA6BnD"}
|
|
@@ -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,
|
|
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
|
|
2
|
-
async function
|
|
3
|
-
const { page: a, fieldKey: n, value: t } =
|
|
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-DP5ZupX8.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
|
|
7
|
-
const { page: a, fieldKey: n, value: t } =
|
|
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(
|
|
11
|
-
const { page: a, fieldKey: n, value: t } =
|
|
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(
|
|
15
|
-
const { page: a, fieldKey: n, fieldSchema: t, value:
|
|
16
|
-
await a.locator(
|
|
17
|
-
const
|
|
18
|
-
for (const
|
|
19
|
-
if (
|
|
20
|
-
const
|
|
21
|
-
i && await a.locator(
|
|
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(
|
|
25
|
-
const { page: a, fieldKey: n, value: t } =
|
|
26
|
-
await a.locator(i).fill(
|
|
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(
|
|
29
|
-
const { page: a, fieldKey: n, value: t, onFillItem:
|
|
30
|
-
if (
|
|
31
|
-
const
|
|
32
|
-
await a.locator(
|
|
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
|
|
34
|
+
if (await h(), !Array.isArray(t))
|
|
35
35
|
return;
|
|
36
36
|
for (let r = 0; r < t.length; r++) {
|
|
37
|
-
const c =
|
|
38
|
-
await a.locator(c).click(), await
|
|
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(
|
|
43
|
-
const { page: a, fieldKey: n, onFillChildren: t } =
|
|
44
|
-
if ((o.
|
|
45
|
-
|
|
46
|
-
|
|
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
|
-
|
|
49
|
+
await t();
|
|
49
50
|
}
|
|
50
|
-
function x(
|
|
51
|
-
if (!
|
|
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 =
|
|
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 "${
|
|
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(
|
|
59
|
-
const { page: a, fieldKey: n, value: t, onFillEntry:
|
|
60
|
-
const
|
|
61
|
-
await a.locator(
|
|
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
|
|
66
|
-
if (
|
|
67
|
-
for (let
|
|
68
|
-
const [
|
|
69
|
-
await a.locator(
|
|
70
|
-
const
|
|
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(
|
|
73
|
-
await c.clear(), await c.fill(String(
|
|
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
|
|
77
|
-
await
|
|
77
|
+
const f = x(await l.getAttribute("data-testid"), n);
|
|
78
|
+
await o(f, y);
|
|
78
79
|
}
|
|
79
80
|
}
|
|
80
|
-
async function
|
|
81
|
-
const { page: a, fieldKey: n, value: t } =
|
|
82
|
-
await i.clear(), await i.fill(
|
|
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
|
|
85
|
-
const { page: a, fieldKey: n, value: t } =
|
|
86
|
-
await
|
|
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:
|
|
92
|
-
fillNumber:
|
|
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:
|
|
98
|
+
fillJson: N,
|
|
99
|
+
fillForeign: $
|
|
101
100
|
};
|
|
102
|
-
function K(
|
|
103
|
-
const t = p(a),
|
|
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
|
|
106
|
-
await
|
|
104
|
+
for (const f of S(r, c, t, l))
|
|
105
|
+
await s(f);
|
|
107
106
|
}
|
|
108
|
-
async function
|
|
107
|
+
async function s({ handlerType: r, fieldKey: c, fieldSchema: l, value: f }) {
|
|
109
108
|
switch (r) {
|
|
110
109
|
case "string":
|
|
111
|
-
await
|
|
110
|
+
await o.fillString({ page: e, fieldKey: c, fieldSchema: l, value: f });
|
|
112
111
|
break;
|
|
113
112
|
case "number":
|
|
114
|
-
await
|
|
113
|
+
await o.fillNumber({ page: e, fieldKey: c, fieldSchema: l, value: f });
|
|
115
114
|
break;
|
|
116
115
|
case "boolean":
|
|
117
|
-
await
|
|
116
|
+
await o.fillBoolean({ page: e, fieldKey: c, fieldSchema: l, value: f });
|
|
118
117
|
break;
|
|
119
118
|
case "enum":
|
|
120
|
-
await
|
|
119
|
+
await o.fillEnum({ page: e, fieldKey: c, fieldSchema: l, value: f });
|
|
121
120
|
break;
|
|
122
121
|
case "tag":
|
|
123
|
-
await
|
|
122
|
+
await o.fillTag({ page: e, fieldKey: c, fieldSchema: l, value: f });
|
|
124
123
|
break;
|
|
125
124
|
case "map":
|
|
126
|
-
await
|
|
127
|
-
page:
|
|
125
|
+
await o.fillMap({
|
|
126
|
+
page: e,
|
|
128
127
|
fieldKey: c,
|
|
129
128
|
fieldSchema: l,
|
|
130
|
-
value:
|
|
131
|
-
onFillEntry: async (g,
|
|
132
|
-
await
|
|
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
|
|
136
|
+
await o.fillJson({ page: e, fieldKey: c, fieldSchema: l, value: f });
|
|
138
137
|
break;
|
|
139
138
|
case "foreign":
|
|
140
|
-
await
|
|
139
|
+
await o.fillForeign({ page: e, fieldKey: c, fieldSchema: l, value: f });
|
|
141
140
|
break;
|
|
142
141
|
case "array":
|
|
143
|
-
await
|
|
144
|
-
page:
|
|
142
|
+
await o.fillArray({
|
|
143
|
+
page: e,
|
|
145
144
|
fieldKey: c,
|
|
146
145
|
fieldSchema: l,
|
|
147
|
-
value:
|
|
148
|
-
onFillItem: async (g,
|
|
149
|
-
await
|
|
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
|
|
155
|
-
page:
|
|
153
|
+
await o.fillRecord({
|
|
154
|
+
page: e,
|
|
156
155
|
fieldKey: c,
|
|
157
156
|
fieldSchema: l,
|
|
158
|
-
value:
|
|
157
|
+
value: f,
|
|
159
158
|
onFillChildren: async () => {
|
|
160
|
-
await i(l.fields,
|
|
159
|
+
await i(l.fields, f, c);
|
|
161
160
|
}
|
|
162
161
|
});
|
|
163
162
|
break;
|
|
164
163
|
}
|
|
165
164
|
}
|
|
166
|
-
async function
|
|
167
|
-
const { itemKey: g, itemSchema:
|
|
168
|
-
F(
|
|
169
|
-
handlerType:
|
|
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:
|
|
172
|
-
value:
|
|
170
|
+
fieldSchema: m,
|
|
171
|
+
value: f
|
|
173
172
|
});
|
|
174
173
|
}
|
|
175
|
-
async function
|
|
176
|
-
const { entryKey: g, entrySchema:
|
|
177
|
-
await
|
|
178
|
-
handlerType:
|
|
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:
|
|
181
|
-
value:
|
|
179
|
+
fieldSchema: m,
|
|
180
|
+
value: f
|
|
182
181
|
});
|
|
183
182
|
}
|
|
184
|
-
async function
|
|
183
|
+
async function y(r) {
|
|
185
184
|
a.fields && Array.isArray(a.fields) && await i(a.fields, r);
|
|
186
185
|
}
|
|
187
|
-
async function
|
|
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
|
|
192
|
-
handlerType:
|
|
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:
|
|
200
|
-
fillField:
|
|
198
|
+
fill: y,
|
|
199
|
+
fillField: h,
|
|
201
200
|
schemaMap: t.schemaMap,
|
|
202
|
-
handlers:
|
|
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
|
-
|
|
211
|
-
|
|
209
|
+
$ as fillForeign,
|
|
210
|
+
N as fillJson,
|
|
212
211
|
R as fillMap,
|
|
213
|
-
|
|
212
|
+
B as fillNumber,
|
|
214
213
|
T as fillRecord,
|
|
215
|
-
|
|
214
|
+
C as fillString,
|
|
216
215
|
j as fillTag,
|
|
217
216
|
J as handlers
|
|
218
217
|
};
|