@kong-ui-public/freeform 0.12.2 → 0.13.0
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/README.md +39 -0
- package/dist/filler/cypress/index.js +161 -151
- package/dist/filler/field-walker-D6znOWwk.js +6682 -0
- package/dist/filler/packages/core/freeform/src/composables/field-path.d.ts +1 -3
- package/dist/filler/packages/core/freeform/src/composables/field-path.d.ts.map +1 -1
- package/dist/filler/packages/core/freeform/src/composables/field.d.ts +1 -3
- package/dist/filler/packages/core/freeform/src/composables/field.d.ts.map +1 -1
- package/dist/filler/packages/core/freeform/src/composables/useI18n.d.ts +72 -0
- package/dist/filler/packages/core/freeform/src/composables/useI18n.d.ts.map +1 -1
- package/dist/filler/packages/core/freeform/src/composables/useMapField.d.ts +1 -3
- package/dist/filler/packages/core/freeform/src/composables/useMapField.d.ts.map +1 -1
- package/dist/filler/packages/core/freeform/src/filler/cypress/create-filler.d.ts.map +1 -1
- package/dist/filler/packages/core/freeform/src/filler/cypress/handlers/expression.d.ts +9 -4
- package/dist/filler/packages/core/freeform/src/filler/cypress/handlers/expression.d.ts.map +1 -1
- package/dist/filler/packages/core/freeform/src/filler/cypress/handlers/index.d.ts +2 -1
- package/dist/filler/packages/core/freeform/src/filler/cypress/handlers/index.d.ts.map +1 -1
- package/dist/filler/packages/core/freeform/src/filler/cypress/handlers/string.d.ts.map +1 -1
- package/dist/filler/packages/core/freeform/src/filler/fixtures/cel.d.ts +7 -0
- package/dist/filler/packages/core/freeform/src/filler/fixtures/cel.d.ts.map +1 -0
- package/dist/filler/packages/core/freeform/src/filler/playwright/create-filler.d.ts.map +1 -1
- package/dist/filler/packages/core/freeform/src/filler/playwright/handlers/expression.d.ts +9 -4
- package/dist/filler/packages/core/freeform/src/filler/playwright/handlers/expression.d.ts.map +1 -1
- package/dist/filler/packages/core/freeform/src/filler/playwright/handlers/index.d.ts +2 -1
- package/dist/filler/packages/core/freeform/src/filler/playwright/handlers/index.d.ts.map +1 -1
- package/dist/filler/packages/core/freeform/src/filler/playwright/handlers/string.d.ts.map +1 -1
- package/dist/filler/packages/core/freeform/src/filler/shared/selectors.d.ts +0 -1
- package/dist/filler/packages/core/freeform/src/filler/shared/selectors.d.ts.map +1 -1
- package/dist/filler/packages/core/freeform/src/types.d.ts +4 -3
- package/dist/filler/packages/core/freeform/src/types.d.ts.map +1 -1
- package/dist/filler/playwright/index.js +151 -142
- package/dist/freeform.es.js +2186 -1958
- package/dist/freeform.umd.js +10 -5
- package/dist/style.css +1 -1
- package/dist/types/components/CelField.vue.d.ts +29 -0
- package/dist/types/components/CelField.vue.d.ts.map +1 -0
- package/dist/types/components/CelInput.vue.d.ts +48 -0
- package/dist/types/components/CelInput.vue.d.ts.map +1 -0
- package/dist/types/components/ExpressionEditor.vue.d.ts.map +1 -1
- package/dist/types/components/FieldRenderer.vue.d.ts +3 -1
- package/dist/types/components/FieldRenderer.vue.d.ts.map +1 -1
- package/dist/types/composables/field-path.d.ts +1 -3
- package/dist/types/composables/field-path.d.ts.map +1 -1
- package/dist/types/composables/field.d.ts +1 -3
- package/dist/types/composables/field.d.ts.map +1 -1
- package/dist/types/composables/useI18n.d.ts +72 -0
- package/dist/types/composables/useI18n.d.ts.map +1 -1
- package/dist/types/composables/useMapField.d.ts +1 -3
- package/dist/types/composables/useMapField.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/types.d.ts +4 -3
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +4 -1
- package/dist/filler/field-walker-D8i4HBJh.js +0 -22993
package/README.md
CHANGED
|
@@ -45,6 +45,8 @@ src/
|
|
|
45
45
|
├── ExpressionEditor.vue # The collapsible expression editor; StringField/NumberField render one inline, or a host places it itself
|
|
46
46
|
├── EnhancedInput.vue # Base input wrapper (help text, errors, tooltips)
|
|
47
47
|
├── FieldErrors.vue # The list of a field's errors, rendered under its control
|
|
48
|
+
├── CelInput.vue # Standalone CEL input using the shared Monaco language API
|
|
49
|
+
├── CelField.vue # CEL form binding; selected by a custom renderer for a string field
|
|
48
50
|
├── SwitchField.vue # Boolean toggle switch (KInputSwitch)
|
|
49
51
|
├── SlideTransition.vue # Height-animated collapse transition
|
|
50
52
|
├── EntityChecksAlert.vue (+ .spec.ts) # Validation constraint alerts
|
|
@@ -56,6 +58,43 @@ Everything here is generic: no plugin registry, no layout, no scope/Redis/creden
|
|
|
56
58
|
entities-plugins-specific code (layout, plugin registry, Redis types, credential fields, etc.) stays in
|
|
57
59
|
`@kong-ui-public/entities-plugins`, which depends on this package — never the other way around.
|
|
58
60
|
|
|
61
|
+
## CEL input
|
|
62
|
+
|
|
63
|
+
Import `CelInput` from `@kong-ui-public/freeform` and language declarations from `@kong-ui-public/monaco-editor/languages/cel`. The input works standalone without a Freeform `Form` parent. Each editor takes a `kind`: the variables and functions its kind of expression can use, for completion, hover, signature help, and hints. In an AI Manager ACL form the host can pass its authorized records and runtime capabilities directly.
|
|
64
|
+
|
|
65
|
+
```vue
|
|
66
|
+
<script setup lang="ts">
|
|
67
|
+
import { computed } from 'vue'
|
|
68
|
+
import { KTextArea } from '@kong/kongponents'
|
|
69
|
+
import { CelInput } from '@kong-ui-public/freeform'
|
|
70
|
+
import '@kong-ui-public/freeform/style.css'
|
|
71
|
+
import {
|
|
72
|
+
defineCelKind, kongConsumer, kongConsumerGroup, kongPrincipal,
|
|
73
|
+
type CelSubjects,
|
|
74
|
+
} from '@kong-ui-public/monaco-editor/languages/cel'
|
|
75
|
+
|
|
76
|
+
const expression = defineModel<string>({ required: true })
|
|
77
|
+
const props = defineProps<{ enableCelEditor: boolean, subjects: CelSubjects, supportsPrincipalGroups: boolean }>()
|
|
78
|
+
const records = () => props.subjects
|
|
79
|
+
const kind = computed(() => defineCelKind([
|
|
80
|
+
kongConsumer(records),
|
|
81
|
+
kongConsumerGroup(records),
|
|
82
|
+
kongPrincipal(records, { supportsPrincipalGroups: props.supportsPrincipalGroups }),
|
|
83
|
+
], { standardCallables: ['has', 'matches', 'contains', 'startsWith', 'endsWith', 'all', 'exists', 'map', 'filter'] }))
|
|
84
|
+
</script>
|
|
85
|
+
|
|
86
|
+
<template>
|
|
87
|
+
<CelInput v-if="enableCelEditor" v-model="expression" label="ACL expression" :kind="kind" />
|
|
88
|
+
<KTextArea v-else v-model="expression" label="ACL expression" />
|
|
89
|
+
</template>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Gateway Manager can add declarations such as `kongHttp()` and `kongRoute()`. Omitting `standardCallables` enables all built-in functions and methods. Custom kinds can provide their own `CelPlugin.variables`, `values`, and `keys`. Record collections are optional. A missing collection still allows completion of its declared field names.
|
|
93
|
+
|
|
94
|
+
Use `<CelField :name="fieldName" :kind="kind" />` for a form-bound string field. The host selects the kind and supplies authorized records. The Monaco runtime loads when a CEL input is rendered.
|
|
95
|
+
|
|
96
|
+
For expression twins, register your input component with `FieldRenderer :component` in the form's field-renderers slot. Match the twin with `isExpressionFieldSchema(schema)`. When expanded, `ExpressionEditor` passes its field name, update listener, tooltip and help slots to the registered component. Slot renderers do not replace the twin input, because a slot cannot receive those named slots. Its default input is `StringField`.
|
|
97
|
+
|
|
59
98
|
## Schema System
|
|
60
99
|
|
|
61
100
|
### FormSchema Structure
|
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
import { s as l, i as
|
|
1
|
+
import { s as l, i as v, c as A, g as k, E as x, w as E, a as C, b as B, d as F } from "../field-walker-D6znOWwk.js";
|
|
2
2
|
import "lodash-es";
|
|
3
|
-
const
|
|
4
|
-
function
|
|
5
|
-
cy.get(
|
|
3
|
+
const s = { scrollBehavior: "center" };
|
|
4
|
+
function b(r) {
|
|
5
|
+
cy.get(r).then((n) => {
|
|
6
6
|
n[0]?.scrollIntoView({ block: "center", inline: "nearest" });
|
|
7
7
|
});
|
|
8
8
|
}
|
|
9
|
-
function
|
|
10
|
-
const { fieldKey: n, value: e } =
|
|
11
|
-
|
|
12
|
-
cy.wrap(c).clear(
|
|
9
|
+
function w(r) {
|
|
10
|
+
const { fieldKey: n, value: e } = r, t = l.field(n);
|
|
11
|
+
b(t), cy.get(t).then((c) => {
|
|
12
|
+
cy.wrap(c).clear(s), cy.wrap(c).trigger("change"), e != null && e !== "" && cy.wrap(c).type(String(e), { ...s, parseSpecialCharSequences: !1 }), cy.wrap(c).blur();
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
const { fieldKey: n, value: e } =
|
|
17
|
-
|
|
18
|
-
cy.wrap(c).clear(
|
|
15
|
+
function I(r) {
|
|
16
|
+
const { fieldKey: n, value: e } = r, t = l.field(n);
|
|
17
|
+
b(t), cy.get(t).then((c) => {
|
|
18
|
+
cy.wrap(c).clear(s), e != null && cy.wrap(c).type(String(e), s);
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
const { fieldKey: n, value: e } =
|
|
23
|
-
|
|
21
|
+
function R(r) {
|
|
22
|
+
const { fieldKey: n, value: e } = r, t = l.field(n);
|
|
23
|
+
b(t), e === !0 ? cy.get(t).check(s) : e === !1 && cy.get(t).uncheck(s);
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
const { fieldKey: n, fieldSchema: e, value: t } =
|
|
27
|
-
|
|
28
|
-
const
|
|
25
|
+
function M(r) {
|
|
26
|
+
const { fieldKey: n, fieldSchema: e, value: t } = r, c = v(e), f = c ? Array.isArray(t) ? t : [t] : [t], d = l.field(n);
|
|
27
|
+
b(d), cy.get(d).click(s);
|
|
28
|
+
const u = l.selectTrigger(n);
|
|
29
29
|
for (const p of e.one_of ?? e.elements?.one_of ?? [])
|
|
30
30
|
if (p != null) {
|
|
31
|
-
const
|
|
32
|
-
c && cy.get(
|
|
33
|
-
|
|
34
|
-
}),
|
|
31
|
+
const m = c ? l.multiSelectItem(String(p)) : l.selectItem(String(p));
|
|
32
|
+
c && cy.get(u).find(m).within((y) => {
|
|
33
|
+
y.find("button.selected").length > 0 && cy.get("button").click(s);
|
|
34
|
+
}), f.includes(p) && cy.get(u).find(m).click(s);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
const { fieldKey: n, value: e } =
|
|
39
|
-
|
|
37
|
+
function T(r) {
|
|
38
|
+
const { fieldKey: n, value: e } = r, t = Array.isArray(e) ? e : [e], c = l.tagInput(n);
|
|
39
|
+
b(c), cy.get(c).type(t.join(","), s);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
const { fieldKey: n, value: e, onFillItem: t } =
|
|
41
|
+
function j(r) {
|
|
42
|
+
const { fieldKey: n, value: e, onFillItem: t } = r, c = l.arrayTabContainer(n), f = l.arrayBasicContainer(n);
|
|
43
43
|
cy.get("body").then((d) => {
|
|
44
|
-
const
|
|
45
|
-
if (
|
|
46
|
-
const
|
|
47
|
-
cy.get("body").then((
|
|
48
|
-
const
|
|
49
|
-
|
|
44
|
+
const u = d.find(c).length > 0, p = d.find(f).length > 0;
|
|
45
|
+
if (u || p) {
|
|
46
|
+
const m = l.arrayRemoveBtns(n), y = () => {
|
|
47
|
+
cy.get("body").then((i) => {
|
|
48
|
+
const o = i.find(m).first();
|
|
49
|
+
o.length > 0 && (cy.wrap(o).click(s), y());
|
|
50
50
|
});
|
|
51
51
|
};
|
|
52
|
-
if (
|
|
52
|
+
if (y(), !Array.isArray(e))
|
|
53
53
|
return;
|
|
54
|
-
for (let
|
|
55
|
-
const
|
|
56
|
-
|
|
54
|
+
for (let i = 0; i < e.length; i++) {
|
|
55
|
+
const o = l.arrayAddBtn(n);
|
|
56
|
+
b(o), cy.get(o).click(s), cy.get(l.arrayItem(n, i)).should("exist"), t(i, e[i]);
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
const { fieldKey: n, value: e, onFillChildren: t } =
|
|
63
|
-
cy.get("body").then((
|
|
64
|
-
const d =
|
|
61
|
+
function N(r) {
|
|
62
|
+
const { fieldKey: n, value: e, onFillChildren: t } = r, c = l.objectSwitch(n);
|
|
63
|
+
cy.get("body").then((f) => {
|
|
64
|
+
const d = f.find(c).length > 0;
|
|
65
65
|
if (e == null && d) {
|
|
66
66
|
cy.get(c).uncheck({ force: !0 });
|
|
67
67
|
return;
|
|
@@ -69,190 +69,200 @@ function T(o) {
|
|
|
69
69
|
d && (cy.get(c).check({ force: !0 }), cy.get(l.objectContent(n)).should("not.have.class", "ff-slide-active")), t();
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
if (!
|
|
72
|
+
function O(r, n) {
|
|
73
|
+
if (!r)
|
|
74
74
|
throw new Error(`Unable to find map entry test id for "${n}"`);
|
|
75
|
-
const e =
|
|
75
|
+
const e = r.match(/kid:\d+/);
|
|
76
76
|
if (!e)
|
|
77
|
-
throw new Error(`Unable to extract map entry kid id from test id "${
|
|
77
|
+
throw new Error(`Unable to extract map entry kid id from test id "${r}"`);
|
|
78
78
|
return e[0];
|
|
79
79
|
}
|
|
80
|
-
function
|
|
81
|
-
const { fieldKey: n, value: e, onFillEntry: t } =
|
|
82
|
-
cy.get("body").then((
|
|
83
|
-
const p =
|
|
84
|
-
p.length > 0 && (cy.wrap(p).click(
|
|
80
|
+
function _(r) {
|
|
81
|
+
const { fieldKey: n, value: e, onFillEntry: t } = r, c = l.mapRemoveBtns(n), f = () => {
|
|
82
|
+
cy.get("body").then((u) => {
|
|
83
|
+
const p = u.find(c).first();
|
|
84
|
+
p.length > 0 && (cy.wrap(p).click(s), f());
|
|
85
85
|
});
|
|
86
86
|
};
|
|
87
|
-
if (
|
|
87
|
+
if (f(), typeof e != "object" || e == null)
|
|
88
88
|
return;
|
|
89
89
|
const d = Object.entries(e);
|
|
90
90
|
if (d.length !== 0)
|
|
91
|
-
for (let
|
|
92
|
-
const [p,
|
|
93
|
-
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
const
|
|
97
|
-
t(
|
|
91
|
+
for (let u = 0; u < d.length; u++) {
|
|
92
|
+
const [p, m] = d[u], y = l.mapAddBtn(n);
|
|
93
|
+
b(y), cy.get(y).click(s);
|
|
94
|
+
const i = l.mapKey(n, u);
|
|
95
|
+
b(i), cy.get(i).clear(s), cy.get(i).type(String(p), s), cy.get(l.mapContainer(n, u)).find(`[data-testid*="${n}.kid:"]`).first().invoke("attr", "data-testid").then((o) => {
|
|
96
|
+
const a = O(o, n);
|
|
97
|
+
t(a, m);
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
function
|
|
102
|
-
const { fieldKey: n, value: e } =
|
|
103
|
-
|
|
104
|
-
cy.wrap(
|
|
101
|
+
function H(r) {
|
|
102
|
+
const { fieldKey: n, value: e } = r, t = l.json(n), c = typeof e == "string" ? e : JSON.stringify(e, null, 2);
|
|
103
|
+
b(t), cy.get(t).then((f) => {
|
|
104
|
+
cy.wrap(f.find("textarea")).clear(s), cy.wrap(f.find("textarea")).type(c, s);
|
|
105
105
|
});
|
|
106
106
|
}
|
|
107
|
-
function
|
|
108
|
-
const { fieldKey: n, value: e } =
|
|
109
|
-
|
|
110
|
-
cy.wrap(
|
|
107
|
+
function J(r) {
|
|
108
|
+
const { fieldKey: n, value: e } = r, t = l.field(n), c = typeof e == "object" && e?.id ? e.id : e;
|
|
109
|
+
b(t), cy.get(t).then((f) => {
|
|
110
|
+
cy.wrap(f).clear(s), c && cy.wrap(f).type(String(c), s);
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
|
-
function
|
|
114
|
-
const { fieldKey: n
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}), cy.get(l.
|
|
118
|
-
|
|
113
|
+
function P(r) {
|
|
114
|
+
const { fieldKey: n } = r, e = l.expression(n);
|
|
115
|
+
b(e), cy.get(e).then((t) => {
|
|
116
|
+
t.find('[data-testid^="ff-expression-add-"]').length && cy.get(l.expressionAddBtn(n)).click(s);
|
|
117
|
+
}), cy.get(l.field(n)).then((t) => {
|
|
118
|
+
t.hasClass("cel-input") ? S(r) : w(r);
|
|
119
119
|
});
|
|
120
120
|
}
|
|
121
|
+
function S(r) {
|
|
122
|
+
const { fieldKey: n, value: e } = r, t = l.field(n), c = `${t} .monaco-editor textarea`;
|
|
123
|
+
b(t), cy.get(c, { timeout: 2e4 }).should("be.visible"), cy.get(c).focus(), cy.window().then((f) => {
|
|
124
|
+
cy.get(c).type(f.navigator.userAgent.includes("Macintosh") ? "{meta}a" : "{ctrl}a", s);
|
|
125
|
+
}), cy.get(c).type("{backspace}", s), e != null && e !== "" && (cy.get(c).invoke("val", String(e)), cy.get(c).trigger("input", { inputType: "insertFromPaste", force: !0 })), cy.get(c).type("{esc}", s), cy.get(c).blur();
|
|
126
|
+
}
|
|
121
127
|
const K = {
|
|
122
|
-
fillString:
|
|
123
|
-
fillNumber:
|
|
124
|
-
fillBoolean:
|
|
125
|
-
fillEnum:
|
|
126
|
-
fillTag:
|
|
127
|
-
fillArray:
|
|
128
|
-
fillRecord:
|
|
129
|
-
fillMap:
|
|
130
|
-
fillJson:
|
|
131
|
-
fillForeign:
|
|
132
|
-
fillExpression:
|
|
128
|
+
fillString: w,
|
|
129
|
+
fillNumber: I,
|
|
130
|
+
fillBoolean: R,
|
|
131
|
+
fillEnum: M,
|
|
132
|
+
fillTag: T,
|
|
133
|
+
fillArray: j,
|
|
134
|
+
fillRecord: N,
|
|
135
|
+
fillMap: _,
|
|
136
|
+
fillJson: H,
|
|
137
|
+
fillForeign: J,
|
|
138
|
+
fillExpression: P,
|
|
139
|
+
fillCel: S
|
|
133
140
|
};
|
|
134
|
-
function
|
|
135
|
-
const e =
|
|
136
|
-
function c(
|
|
137
|
-
for (const
|
|
138
|
-
|
|
141
|
+
function Y(r, n) {
|
|
142
|
+
const e = A(r), t = { ...K, ...n };
|
|
143
|
+
function c(y, i, o = "") {
|
|
144
|
+
for (const a of E(y, i, e, o))
|
|
145
|
+
f(a);
|
|
139
146
|
}
|
|
140
|
-
function
|
|
141
|
-
switch (
|
|
147
|
+
function f({ handlerType: y, fieldKey: i, fieldSchema: o, value: a }) {
|
|
148
|
+
switch (y) {
|
|
142
149
|
case "string":
|
|
143
|
-
|
|
150
|
+
cy.get(l.field(i)).then((g) => {
|
|
151
|
+
(g.hasClass("cel-input") ? t.fillCel : t.fillString)({ fieldKey: i, fieldSchema: o, value: a });
|
|
152
|
+
});
|
|
144
153
|
break;
|
|
145
154
|
case "number":
|
|
146
|
-
t.fillNumber({ fieldKey:
|
|
155
|
+
t.fillNumber({ fieldKey: i, fieldSchema: o, value: a });
|
|
147
156
|
break;
|
|
148
157
|
case "boolean":
|
|
149
|
-
t.fillBoolean({ fieldKey:
|
|
158
|
+
t.fillBoolean({ fieldKey: i, fieldSchema: o, value: a });
|
|
150
159
|
break;
|
|
151
160
|
case "enum":
|
|
152
|
-
t.fillEnum({ fieldKey:
|
|
161
|
+
t.fillEnum({ fieldKey: i, fieldSchema: o, value: a });
|
|
153
162
|
break;
|
|
154
163
|
case "tag":
|
|
155
|
-
t.fillTag({ fieldKey:
|
|
164
|
+
t.fillTag({ fieldKey: i, fieldSchema: o, value: a });
|
|
156
165
|
break;
|
|
157
166
|
case "map":
|
|
158
167
|
t.fillMap({
|
|
159
|
-
fieldKey:
|
|
160
|
-
fieldSchema:
|
|
161
|
-
value:
|
|
162
|
-
onFillEntry: (
|
|
163
|
-
|
|
168
|
+
fieldKey: i,
|
|
169
|
+
fieldSchema: o,
|
|
170
|
+
value: a,
|
|
171
|
+
onFillEntry: (g, h) => {
|
|
172
|
+
u(e, i, g, h);
|
|
164
173
|
}
|
|
165
174
|
});
|
|
166
175
|
break;
|
|
167
176
|
case "json":
|
|
168
|
-
t.fillJson({ fieldKey:
|
|
177
|
+
t.fillJson({ fieldKey: i, fieldSchema: o, value: a });
|
|
169
178
|
break;
|
|
170
179
|
case "foreign":
|
|
171
|
-
t.fillForeign({ fieldKey:
|
|
180
|
+
t.fillForeign({ fieldKey: i, fieldSchema: o, value: a });
|
|
172
181
|
break;
|
|
173
182
|
case "expression":
|
|
174
|
-
t.fillExpression({ fieldKey:
|
|
183
|
+
t.fillExpression({ fieldKey: i, fieldSchema: o, value: a });
|
|
175
184
|
break;
|
|
176
185
|
case "expressionArray":
|
|
177
|
-
Array.isArray(
|
|
178
|
-
|
|
186
|
+
Array.isArray(a) && a.forEach((g, h) => {
|
|
187
|
+
g == null || g === x || d(e, i, h, g);
|
|
179
188
|
});
|
|
180
189
|
break;
|
|
181
190
|
case "array":
|
|
182
191
|
t.fillArray({
|
|
183
|
-
fieldKey:
|
|
184
|
-
fieldSchema:
|
|
185
|
-
value:
|
|
186
|
-
onFillItem: (
|
|
187
|
-
d(e,
|
|
192
|
+
fieldKey: i,
|
|
193
|
+
fieldSchema: o,
|
|
194
|
+
value: a,
|
|
195
|
+
onFillItem: (g, h) => {
|
|
196
|
+
d(e, i, g, h);
|
|
188
197
|
}
|
|
189
198
|
});
|
|
190
199
|
break;
|
|
191
200
|
case "record":
|
|
192
201
|
t.fillRecord({
|
|
193
|
-
fieldKey:
|
|
194
|
-
fieldSchema:
|
|
195
|
-
value:
|
|
202
|
+
fieldKey: i,
|
|
203
|
+
fieldSchema: o,
|
|
204
|
+
value: a,
|
|
196
205
|
onFillChildren: () => {
|
|
197
|
-
c(
|
|
206
|
+
c(o.fields, a, i);
|
|
198
207
|
}
|
|
199
208
|
});
|
|
200
209
|
break;
|
|
201
210
|
}
|
|
202
211
|
}
|
|
203
|
-
function d(
|
|
204
|
-
const { itemKey:
|
|
205
|
-
|
|
212
|
+
function d(y, i, o, a) {
|
|
213
|
+
const { itemKey: g, itemSchema: h } = C(i, o, y);
|
|
214
|
+
B(h) ? c(h.fields, a, g) : f({
|
|
206
215
|
handlerType: k(h),
|
|
207
|
-
fieldKey:
|
|
216
|
+
fieldKey: g,
|
|
208
217
|
fieldSchema: h,
|
|
209
|
-
value:
|
|
218
|
+
value: a
|
|
210
219
|
});
|
|
211
220
|
}
|
|
212
|
-
function
|
|
213
|
-
const { entryKey:
|
|
214
|
-
|
|
221
|
+
function u(y, i, o, a) {
|
|
222
|
+
const { entryKey: g, entrySchema: h } = F(i, o, y);
|
|
223
|
+
f({
|
|
215
224
|
handlerType: k(h),
|
|
216
|
-
fieldKey:
|
|
225
|
+
fieldKey: g,
|
|
217
226
|
fieldSchema: h,
|
|
218
|
-
value:
|
|
227
|
+
value: a
|
|
219
228
|
});
|
|
220
229
|
}
|
|
221
|
-
function p(
|
|
222
|
-
|
|
230
|
+
function p(y) {
|
|
231
|
+
r.fields && Array.isArray(r.fields) && c(r.fields, y);
|
|
223
232
|
}
|
|
224
|
-
function
|
|
225
|
-
const
|
|
226
|
-
if (!
|
|
227
|
-
throw new Error(`Field schema for "${
|
|
228
|
-
|
|
229
|
-
handlerType: k(
|
|
230
|
-
fieldKey:
|
|
231
|
-
fieldSchema:
|
|
232
|
-
value:
|
|
233
|
+
function m(y, i) {
|
|
234
|
+
const o = e.schemaMap[y];
|
|
235
|
+
if (!o)
|
|
236
|
+
throw new Error(`Field schema for "${y}" not found in schema map`);
|
|
237
|
+
f({
|
|
238
|
+
handlerType: k(o),
|
|
239
|
+
fieldKey: y,
|
|
240
|
+
fieldSchema: o,
|
|
241
|
+
value: i
|
|
233
242
|
});
|
|
234
243
|
}
|
|
235
244
|
return {
|
|
236
245
|
fill: p,
|
|
237
|
-
fillField:
|
|
246
|
+
fillField: m,
|
|
238
247
|
schemaMap: e.schemaMap,
|
|
239
248
|
handlers: t
|
|
240
249
|
};
|
|
241
250
|
}
|
|
242
251
|
export {
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
252
|
+
s as SCROLL_BEHAVIOR,
|
|
253
|
+
Y as createFiller,
|
|
254
|
+
j as fillArray,
|
|
255
|
+
R as fillBoolean,
|
|
256
|
+
S as fillCel,
|
|
257
|
+
M as fillEnum,
|
|
258
|
+
P as fillExpression,
|
|
259
|
+
J as fillForeign,
|
|
260
|
+
H as fillJson,
|
|
261
|
+
_ as fillMap,
|
|
262
|
+
I as fillNumber,
|
|
263
|
+
N as fillRecord,
|
|
264
|
+
w as fillString,
|
|
265
|
+
T as fillTag,
|
|
256
266
|
K as handlers,
|
|
257
|
-
|
|
267
|
+
b as scrollIntoViewNative
|
|
258
268
|
};
|