@kong-ui-public/freeform 0.10.0 → 0.11.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 +19 -0
- package/dist/filler/cypress/index.js +1 -1
- package/dist/filler/{field-walker-DB8aXUj-.js → field-walker-BmTo4SFN.js} +4991 -4870
- package/dist/filler/packages/core/freeform/src/composables/errors.d.ts +27 -0
- package/dist/filler/packages/core/freeform/src/composables/errors.d.ts.map +1 -0
- package/dist/filler/packages/core/freeform/src/composables/field.d.ts +6 -0
- package/dist/filler/packages/core/freeform/src/composables/field.d.ts.map +1 -1
- package/dist/filler/packages/core/freeform/src/composables/form-context.d.ts +13 -1
- package/dist/filler/packages/core/freeform/src/composables/form-context.d.ts.map +1 -1
- package/dist/filler/packages/core/freeform/src/composables/useMapField.d.ts +6 -0
- package/dist/filler/packages/core/freeform/src/composables/useMapField.d.ts.map +1 -1
- package/dist/filler/packages/core/freeform/src/types.d.ts +8 -0
- package/dist/filler/packages/core/freeform/src/types.d.ts.map +1 -1
- package/dist/filler/playwright/index.js +1 -1
- package/dist/freeform.es.js +1940 -1740
- package/dist/freeform.umd.js +5 -5
- package/dist/style.css +1 -1
- package/dist/types/components/ArrayField.vue.d.ts.map +1 -1
- package/dist/types/components/BooleanField.vue.d.ts +2 -2
- package/dist/types/components/BooleanField.vue.d.ts.map +1 -1
- package/dist/types/components/EnumField.vue.d.ts.map +1 -1
- package/dist/types/components/FieldErrors.vue.d.ts +10 -0
- package/dist/types/components/FieldErrors.vue.d.ts.map +1 -0
- package/dist/types/components/Form.vue.d.ts +15 -2
- package/dist/types/components/Form.vue.d.ts.map +1 -1
- package/dist/types/components/JsonField.vue.d.ts.map +1 -1
- package/dist/types/components/MapField.vue.d.ts.map +1 -1
- package/dist/types/components/NumberField.vue.d.ts.map +1 -1
- package/dist/types/components/ObjectField.vue.d.ts.map +1 -1
- package/dist/types/components/StringArrayField.vue.d.ts.map +1 -1
- package/dist/types/components/StringField.vue.d.ts.map +1 -1
- package/dist/types/components/SwitchField.vue.d.ts.map +1 -1
- package/dist/types/composables/errors.d.ts +27 -0
- package/dist/types/composables/errors.d.ts.map +1 -0
- package/dist/types/composables/field.d.ts +6 -0
- package/dist/types/composables/field.d.ts.map +1 -1
- package/dist/types/composables/form-context.d.ts +13 -1
- package/dist/types/composables/form-context.d.ts.map +1 -1
- package/dist/types/composables/useMapField.d.ts +6 -0
- package/dist/types/composables/useMapField.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/types.d.ts +8 -0
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/freeform.es.js
CHANGED
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
import { toValue as
|
|
2
|
-
import { get as
|
|
3
|
-
import { createInjectionState as
|
|
4
|
-
import { marked as
|
|
5
|
-
import
|
|
6
|
-
import { createI18n as
|
|
7
|
-
import { KTextArea as
|
|
8
|
-
import { AUTOFILL_SLOT as
|
|
9
|
-
import { SecretInput as
|
|
1
|
+
import { toValue as B, computed as E, ref as ce, watch as ee, onBeforeUnmount as Tt, reactive as Ft, shallowRef as Xt, nextTick as je, toRef as z, useSlots as Le, provide as De, inject as Se, getCurrentInstance as Qt, toRaw as It, onUnmounted as Zt, defineComponent as G, openBlock as A, createElementBlock as F, Fragment as Q, renderList as ie, toDisplayString as q, createCommentVNode as O, useAttrs as $e, createBlock as K, unref as n, mergeProps as X, createSlots as te, withCtx as I, renderSlot as C, normalizeProps as rt, guardReactiveProps as Pt, withDirectives as ne, resolveDynamicComponent as ue, createVNode as L, createTextVNode as ae, createElementVNode as me, vShow as re, createPropsRestProxy as ye, resolveComponent as J, useCssVars as ea, useTemplateRef as Mt, normalizeClass as xe, withModifiers as Ke, Transition as ta, useId as aa, useModel as Ye, onBeforeMount as na, normalizeStyle as ra, mergeModels as Xe, withKeys as pt } from "vue";
|
|
2
|
+
import { get as ge, uniqueId as Kt, isEqual as _e, omit as la, cloneDeep as mt, isFunction as vt, set as Qe, upperFirst as oa } from "lodash-es";
|
|
3
|
+
import { createInjectionState as sa } from "@vueuse/core";
|
|
4
|
+
import { marked as ia } from "marked";
|
|
5
|
+
import ua from "dompurify";
|
|
6
|
+
import { createI18n as ca, i18nTComponent as da } from "@kong-ui-public/i18n";
|
|
7
|
+
import { KTextArea as fa, KInput as pa, KTooltip as Lt, KButton as ht, KExternalLink as ma, KCheckbox as va, KCard as Ze, KLabel as ha, KMultiselect as ya, KSelect as ba, KInputSwitch as ga } from "@kong/kongponents";
|
|
8
|
+
import { AUTOFILL_SLOT as Ot } from "@kong-ui-public/forms";
|
|
9
|
+
import { SecretInput as ka } from "@kong-ui-public/misc-widgets";
|
|
10
10
|
import "@kong-ui-public/misc-widgets/dist/style.css";
|
|
11
|
-
import { AddIcon as
|
|
12
|
-
import { KUI_ICON_SIZE_30 as
|
|
13
|
-
function
|
|
11
|
+
import { AddIcon as Ce, CloseIcon as lt, TrashIcon as $a, ChevronRightIcon as Aa } from "@kong/icons";
|
|
12
|
+
import { KUI_ICON_SIZE_30 as Ea } from "@kong/design-tokens";
|
|
13
|
+
function _a(e) {
|
|
14
14
|
return e.map((a) => ({ value: a, label: `${a}` }));
|
|
15
15
|
}
|
|
16
|
-
const
|
|
17
|
-
function
|
|
18
|
-
return e.join(
|
|
16
|
+
const ot = "*", st = "#", se = "$", ke = ".";
|
|
17
|
+
function R(...e) {
|
|
18
|
+
return e.join(ke);
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
return
|
|
20
|
+
function Ve(...e) {
|
|
21
|
+
return R(se, ...e);
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
return e.startsWith(
|
|
23
|
+
function yt(e) {
|
|
24
|
+
return e.startsWith(R(se, ""));
|
|
25
25
|
}
|
|
26
26
|
function N(e) {
|
|
27
|
-
return e.split(
|
|
27
|
+
return e.split(ke).filter((a) => a !== "");
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function Ae(e) {
|
|
30
30
|
const a = N(e);
|
|
31
31
|
return a[a.length - 1];
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
return e.startsWith(
|
|
33
|
+
function it(e) {
|
|
34
|
+
return e.startsWith(se) && (e = R(...N(e).slice(1))), e;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
return e === a || e.startsWith(`${a}${
|
|
36
|
+
function Rt(e, a) {
|
|
37
|
+
return e === a || e.startsWith(`${a}${ke}`);
|
|
38
38
|
}
|
|
39
|
-
const
|
|
40
|
-
function
|
|
41
|
-
return e.reduce((a, t) =>
|
|
39
|
+
const wa = /^[^.[\]"]+$/;
|
|
40
|
+
function ut(e) {
|
|
41
|
+
return e.reduce((a, t) => wa.test(t) ? a ? `${a}${ke}${t}` : t : `${a}[${JSON.stringify(t)}]`, "");
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
const a = e ===
|
|
45
|
-
let
|
|
46
|
-
const
|
|
47
|
-
|
|
43
|
+
function Pe(e) {
|
|
44
|
+
const a = e === se ? "" : e.startsWith(`${se}${ke}`) ? e.slice(2) : e, t = [];
|
|
45
|
+
let r = "", l = 0;
|
|
46
|
+
const c = () => {
|
|
47
|
+
r && (t.push(r), r = "");
|
|
48
48
|
};
|
|
49
|
-
for (;
|
|
50
|
-
const o = a[
|
|
51
|
-
if (o ===
|
|
52
|
-
|
|
49
|
+
for (; l < a.length; ) {
|
|
50
|
+
const o = a[l];
|
|
51
|
+
if (o === ke)
|
|
52
|
+
c(), l++;
|
|
53
53
|
else if (o === "[") {
|
|
54
|
-
|
|
55
|
-
const
|
|
56
|
-
if (
|
|
54
|
+
c();
|
|
55
|
+
const d = a[l + 1] === '"' ? Sa(a, l + 1) + 1 : a.indexOf("]", l);
|
|
56
|
+
if (d <= l || a[d] !== "]")
|
|
57
57
|
throw new Error(`Malformed data path: ${e}`);
|
|
58
|
-
const
|
|
59
|
-
t.push(
|
|
58
|
+
const i = a.slice(l + 1, d);
|
|
59
|
+
t.push(i.startsWith('"') ? JSON.parse(i) : i), l = d + 1;
|
|
60
60
|
} else
|
|
61
|
-
|
|
61
|
+
r += o, l++;
|
|
62
62
|
}
|
|
63
|
-
return
|
|
63
|
+
return c(), t;
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function Sa(e, a) {
|
|
66
66
|
for (let t = a + 1; t < e.length; t++)
|
|
67
67
|
if (e[t] === "\\")
|
|
68
68
|
t++;
|
|
@@ -70,337 +70,337 @@ function ka(e, a) {
|
|
|
70
70
|
return t;
|
|
71
71
|
return -1;
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function jt(e, a, t, r = "") {
|
|
74
74
|
if (e == null || typeof e != "object") return;
|
|
75
|
-
const
|
|
76
|
-
for (const
|
|
77
|
-
const o =
|
|
78
|
-
a(o) ? e[
|
|
75
|
+
const l = Array.isArray(e) ? e.map((c, o) => String(o)) : Object.keys(e);
|
|
76
|
+
for (const c of l) {
|
|
77
|
+
const o = r ? R(r, c) : c;
|
|
78
|
+
a(o) ? e[c] = t(o) : jt(e[c], a, t, o);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
const a =
|
|
81
|
+
function Va(e) {
|
|
82
|
+
const a = B(e);
|
|
83
83
|
return a ? a.type === "set" && a.elements.type === "string" && !a.elements.one_of : !1;
|
|
84
84
|
}
|
|
85
|
-
function
|
|
86
|
-
return [...e].sort((t,
|
|
87
|
-
const
|
|
88
|
-
return o === -1 &&
|
|
85
|
+
function xt(e, a) {
|
|
86
|
+
return [...e].sort((t, r) => {
|
|
87
|
+
const l = Object.keys(t)[0], c = Object.keys(r)[0], o = a.indexOf(l), d = a.indexOf(c);
|
|
88
|
+
return o === -1 && d === -1 ? 0 : o === -1 ? 1 : d === -1 ? -1 : o - d;
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function Ct(e, a) {
|
|
92
92
|
const t = /* @__PURE__ */ new Map();
|
|
93
93
|
e.forEach((s) => {
|
|
94
|
-
const
|
|
95
|
-
t.set(
|
|
94
|
+
const v = Object.keys(s)[0];
|
|
95
|
+
t.set(v, s);
|
|
96
96
|
});
|
|
97
|
-
const
|
|
98
|
-
a.forEach((s,
|
|
99
|
-
s.forEach((
|
|
100
|
-
|
|
97
|
+
const r = /* @__PURE__ */ new Map();
|
|
98
|
+
a.forEach((s, v) => {
|
|
99
|
+
s.forEach((f, m) => {
|
|
100
|
+
r.has(f) || r.set(f, []), r.get(f).push({ bundleIndex: v, position: m });
|
|
101
101
|
});
|
|
102
102
|
});
|
|
103
|
-
const
|
|
104
|
-
const
|
|
105
|
-
if (!
|
|
106
|
-
for (const { bundleIndex:
|
|
107
|
-
const
|
|
108
|
-
for (let
|
|
109
|
-
const
|
|
110
|
-
if (t.has(
|
|
103
|
+
const l = /* @__PURE__ */ new Set(), c = [], o = /* @__PURE__ */ new Set(), d = (s) => {
|
|
104
|
+
const v = r.get(s);
|
|
105
|
+
if (!v) return !0;
|
|
106
|
+
for (const { bundleIndex: f, position: m } of v) {
|
|
107
|
+
const b = a[f];
|
|
108
|
+
for (let h = 0; h < m; h++) {
|
|
109
|
+
const y = b[h];
|
|
110
|
+
if (t.has(y) && !l.has(y))
|
|
111
111
|
return !1;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
return !0;
|
|
115
|
-
},
|
|
116
|
-
if (
|
|
117
|
-
const
|
|
118
|
-
if (!
|
|
119
|
-
|
|
120
|
-
const
|
|
121
|
-
if (
|
|
122
|
-
for (const { bundleIndex:
|
|
123
|
-
const
|
|
124
|
-
for (let
|
|
125
|
-
const
|
|
126
|
-
if (!
|
|
127
|
-
const
|
|
128
|
-
|
|
115
|
+
}, i = (s) => {
|
|
116
|
+
if (l.has(s)) return;
|
|
117
|
+
const v = t.get(s);
|
|
118
|
+
if (!v) return;
|
|
119
|
+
c.push(v), l.add(s), o.delete(s);
|
|
120
|
+
const f = r.get(s);
|
|
121
|
+
if (f)
|
|
122
|
+
for (const { bundleIndex: b, position: h } of f) {
|
|
123
|
+
const y = a[b];
|
|
124
|
+
for (let w = h + 1; w < y.length; w++) {
|
|
125
|
+
const p = y[w];
|
|
126
|
+
if (!l.has(p)) {
|
|
127
|
+
const g = t.get(p);
|
|
128
|
+
g && (c.push(g), l.add(p), o.delete(p));
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
const m = Array.from(o);
|
|
133
|
-
for (const
|
|
134
|
-
|
|
133
|
+
for (const b of m)
|
|
134
|
+
d(b) && i(b);
|
|
135
135
|
};
|
|
136
136
|
for (const s of e) {
|
|
137
|
-
const
|
|
138
|
-
|
|
137
|
+
const v = Object.keys(s)[0];
|
|
138
|
+
l.has(v) || (d(v) ? i(v) : o.add(v));
|
|
139
139
|
}
|
|
140
|
-
return
|
|
140
|
+
return c;
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function rl(e) {
|
|
143
143
|
return typeof e == "string" ? ({ genericPath: a }) => a === e : e;
|
|
144
144
|
}
|
|
145
|
-
const
|
|
146
|
-
function
|
|
145
|
+
const et = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", Ta = 256 - 256 % et.length;
|
|
146
|
+
function ll(e = 32) {
|
|
147
147
|
const a = new Uint8Array(e);
|
|
148
148
|
let t = "";
|
|
149
149
|
for (; t.length < e; ) {
|
|
150
150
|
crypto.getRandomValues(a);
|
|
151
|
-
for (const
|
|
151
|
+
for (const r of a) {
|
|
152
152
|
if (t.length >= e) break;
|
|
153
|
-
|
|
153
|
+
r >= Ta || (t += et[r % et.length]);
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
return t;
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function Fa(e) {
|
|
159
159
|
const a = N(e);
|
|
160
160
|
let t = { parent: null };
|
|
161
161
|
for (a.pop(); a.length; ) {
|
|
162
|
-
const
|
|
163
|
-
t.path = t.parent?.path ?
|
|
162
|
+
const r = a.shift();
|
|
163
|
+
t.path = t.parent?.path ? R(t.parent.path, r) : r, t = { parent: t };
|
|
164
164
|
}
|
|
165
165
|
return t;
|
|
166
166
|
}
|
|
167
|
-
function
|
|
168
|
-
return
|
|
169
|
-
}
|
|
170
|
-
const
|
|
171
|
-
actions:
|
|
172
|
-
field_rules:
|
|
173
|
-
tag_helper:
|
|
174
|
-
version_compatibility:
|
|
175
|
-
foreign_placeholder:
|
|
176
|
-
vault_picker:
|
|
177
|
-
expression:
|
|
167
|
+
function Dt(e) {
|
|
168
|
+
return E(() => Fa(B(e)));
|
|
169
|
+
}
|
|
170
|
+
const bt = /* @__PURE__ */ Symbol("free-form-field-path"), tt = /* @__PURE__ */ Symbol("free-form-field-renderer-slots"), gt = /* @__PURE__ */ Symbol("free-form-field-reset-label-path-setting"), Oe = "free-form-field-renderers-slot", Ia = { add_entity: "Add {entity}", remove_entity: "Remove {entity}", enabled: "Enabled", disabled: "Disabled" }, Pa = { at_least_one_of: "At least one of the following values is required: {parameters}.", mutually_required: "These values must be used together: {parameters}.", mutually_exclusive: "Only one of these values can be used: {parameters}." }, Ma = "Use comma to separate values. eg: value1, value2", Ka = { tooltip: "The minimum runtime version required to use this feature is {version}. Please upgrade the minimum runtime version to use this feature." }, La = "Enter a UUID of {entity}", Oa = { component_error: "The vault secret picker is not available" }, Ra = { add: "Add expression", remove: "Remove expression", label: "Kong plug-in dynamic expression", info: "Supply this value as an expression that is evaluated on every request. When set, it takes priority over the value entered above.", help: { text: "Define a Kong plug-in dynamic expression to evaluate each request. The expression must return {type}. {link}", learn: "Learn more" }, returns: { string: "a string", number: "a number", integer: "an integer", boolean: "a boolean value (true or false)", unknown: "a value of the type of the field above" } }, ja = {
|
|
171
|
+
actions: Ia,
|
|
172
|
+
field_rules: Pa,
|
|
173
|
+
tag_helper: Ma,
|
|
174
|
+
version_compatibility: Ka,
|
|
175
|
+
foreign_placeholder: La,
|
|
176
|
+
vault_picker: Oa,
|
|
177
|
+
expression: Ra
|
|
178
178
|
};
|
|
179
|
-
function
|
|
180
|
-
const e =
|
|
179
|
+
function be() {
|
|
180
|
+
const e = ca("en-us", ja);
|
|
181
181
|
return {
|
|
182
182
|
i18n: e,
|
|
183
|
-
i18nT:
|
|
183
|
+
i18nT: da(e)
|
|
184
184
|
};
|
|
185
185
|
}
|
|
186
|
-
const
|
|
186
|
+
const Bt = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, kt = (e) => {
|
|
187
187
|
if (typeof e != "string")
|
|
188
188
|
throw new TypeError("Invalid argument expected string");
|
|
189
|
-
const a = e.match(
|
|
189
|
+
const a = e.match(Bt);
|
|
190
190
|
if (!a)
|
|
191
191
|
throw new Error(`Invalid argument not valid semver ('${e}' received)`);
|
|
192
192
|
return a.shift(), a;
|
|
193
|
-
},
|
|
193
|
+
}, $t = (e) => e === "*" || e === "x" || e === "X", At = (e) => {
|
|
194
194
|
const a = parseInt(e, 10);
|
|
195
195
|
return isNaN(a) ? e : a;
|
|
196
|
-
},
|
|
197
|
-
if (
|
|
196
|
+
}, xa = (e, a) => typeof e != typeof a ? [String(e), String(a)] : [e, a], Ca = (e, a) => {
|
|
197
|
+
if ($t(e) || $t(a))
|
|
198
198
|
return 0;
|
|
199
|
-
const [t,
|
|
200
|
-
return t >
|
|
201
|
-
},
|
|
199
|
+
const [t, r] = xa(At(e), At(a));
|
|
200
|
+
return t > r ? 1 : t < r ? -1 : 0;
|
|
201
|
+
}, Et = (e, a) => {
|
|
202
202
|
for (let t = 0; t < Math.max(e.length, a.length); t++) {
|
|
203
|
-
const
|
|
204
|
-
if (
|
|
205
|
-
return
|
|
203
|
+
const r = Ca(e[t] || "0", a[t] || "0");
|
|
204
|
+
if (r !== 0)
|
|
205
|
+
return r;
|
|
206
206
|
}
|
|
207
207
|
return 0;
|
|
208
|
-
},
|
|
209
|
-
const t =
|
|
210
|
-
return o !== 0 ? o :
|
|
211
|
-
},
|
|
212
|
-
|
|
213
|
-
const
|
|
214
|
-
return
|
|
215
|
-
},
|
|
208
|
+
}, Da = (e, a) => {
|
|
209
|
+
const t = kt(e), r = kt(a), l = t.pop(), c = r.pop(), o = Et(t, r);
|
|
210
|
+
return o !== 0 ? o : l && c ? Et(l.split("."), c.split(".")) : l || c ? l ? -1 : 1 : 0;
|
|
211
|
+
}, Ba = (e, a, t) => {
|
|
212
|
+
Ha(t);
|
|
213
|
+
const r = Da(e, a);
|
|
214
|
+
return Ht[t].includes(r);
|
|
215
|
+
}, Ht = {
|
|
216
216
|
">": [1],
|
|
217
217
|
">=": [0, 1],
|
|
218
218
|
"=": [0],
|
|
219
219
|
"<=": [-1, 0],
|
|
220
220
|
"<": [-1],
|
|
221
221
|
"!=": [-1, 1]
|
|
222
|
-
},
|
|
223
|
-
if (
|
|
224
|
-
throw new Error(`Invalid operator, expected one of ${
|
|
225
|
-
},
|
|
226
|
-
function
|
|
227
|
-
return !e || !a || !
|
|
228
|
-
}
|
|
229
|
-
function
|
|
222
|
+
}, _t = Object.keys(Ht), Ha = (e) => {
|
|
223
|
+
if (_t.indexOf(e) === -1)
|
|
224
|
+
throw new Error(`Invalid operator, expected one of ${_t.join("|")}`);
|
|
225
|
+
}, wt = (e) => typeof e == "string" && /^[v\d]/.test(e) && Bt.test(e);
|
|
226
|
+
function St(e, a) {
|
|
227
|
+
return !e || !a || !wt(e) || !wt(a) ? !0 : Ba(e, a, ">=");
|
|
228
|
+
}
|
|
229
|
+
function Na(e) {
|
|
230
230
|
return e === "undefined" ? void 0 : null;
|
|
231
231
|
}
|
|
232
|
-
const
|
|
232
|
+
const qa = {
|
|
233
233
|
tooltipAttributes: {
|
|
234
234
|
maxWidth: "300px",
|
|
235
235
|
placement: "top"
|
|
236
236
|
}
|
|
237
237
|
};
|
|
238
|
-
function
|
|
239
|
-
const t = {},
|
|
240
|
-
return Array.isArray(
|
|
238
|
+
function Ua(e, a = "") {
|
|
239
|
+
const t = {}, r = e;
|
|
240
|
+
return Array.isArray(r.fields) ? Object.assign(t, Be(r, a)) : e.type === "array" && e.elements ? Object.assign(t, He(e, a)) : e.type === "map" && e.values && Object.assign(t, Ne(e, a)), t;
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function Be(e, a = "") {
|
|
243
243
|
const t = {};
|
|
244
244
|
if (Array.isArray(e.fields))
|
|
245
|
-
for (const
|
|
246
|
-
const
|
|
247
|
-
if (t[o] =
|
|
248
|
-
const
|
|
249
|
-
Object.assign(t,
|
|
250
|
-
} else if (
|
|
251
|
-
const
|
|
252
|
-
Object.assign(t,
|
|
253
|
-
} else if (
|
|
254
|
-
const
|
|
255
|
-
Object.assign(t,
|
|
245
|
+
for (const r of e.fields) {
|
|
246
|
+
const l = Object.keys(r)[0], c = r[l], o = a ? R(a, l) : l;
|
|
247
|
+
if (t[o] = c, c.type === "record" && Array.isArray(c.fields)) {
|
|
248
|
+
const d = Be(c, o);
|
|
249
|
+
Object.assign(t, d);
|
|
250
|
+
} else if (c.type === "array" && c.elements) {
|
|
251
|
+
const d = He(c, o);
|
|
252
|
+
Object.assign(t, d);
|
|
253
|
+
} else if (c.type === "map" && c.values) {
|
|
254
|
+
const d = Ne(c, o);
|
|
255
|
+
Object.assign(t, d);
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
258
|
return t;
|
|
259
259
|
}
|
|
260
|
-
function
|
|
260
|
+
function He(e, a = "") {
|
|
261
261
|
const t = {};
|
|
262
262
|
if (e.elements) {
|
|
263
|
-
let
|
|
264
|
-
const
|
|
265
|
-
if (e.encrypted &&
|
|
266
|
-
const
|
|
267
|
-
Object.assign(t,
|
|
268
|
-
} else if (
|
|
269
|
-
const
|
|
270
|
-
Object.assign(t,
|
|
271
|
-
} else if (
|
|
272
|
-
const
|
|
273
|
-
Object.assign(t,
|
|
263
|
+
let r = e.elements;
|
|
264
|
+
const l = R(a, ot);
|
|
265
|
+
if (e.encrypted && r.type === "string" && (r = { ...r, encrypted: !0 }), t[l] = r, r.type === "record" && Array.isArray(r.fields)) {
|
|
266
|
+
const c = Be(r, l);
|
|
267
|
+
Object.assign(t, c);
|
|
268
|
+
} else if (r.type === "array" && r.elements) {
|
|
269
|
+
const c = He(r, l);
|
|
270
|
+
Object.assign(t, c);
|
|
271
|
+
} else if (r.type === "map" && r.values) {
|
|
272
|
+
const c = Ne(r, l);
|
|
273
|
+
Object.assign(t, c);
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
276
|
return t;
|
|
277
277
|
}
|
|
278
|
-
function
|
|
279
|
-
const t = {},
|
|
280
|
-
if (t[
|
|
281
|
-
const
|
|
282
|
-
Object.assign(t,
|
|
278
|
+
function Ne(e, a = "") {
|
|
279
|
+
const t = {}, r = R(a, st);
|
|
280
|
+
if (t[r] = e.values, e.values.type === "record" && Array.isArray(e.values.fields)) {
|
|
281
|
+
const l = Be(e.values, r);
|
|
282
|
+
Object.assign(t, l);
|
|
283
283
|
} else if ((e.values.type === "array" || e.values.type === "set") && e.values.elements) {
|
|
284
|
-
const
|
|
285
|
-
Object.assign(t,
|
|
284
|
+
const l = He(e.values, r);
|
|
285
|
+
Object.assign(t, l);
|
|
286
286
|
} else if (e.values.type === "map" && e.values.values) {
|
|
287
|
-
const
|
|
288
|
-
Object.assign(t,
|
|
287
|
+
const l = Ne(e.values, r);
|
|
288
|
+
Object.assign(t, l);
|
|
289
289
|
}
|
|
290
290
|
return t;
|
|
291
291
|
}
|
|
292
|
-
function
|
|
293
|
-
const t = N(e),
|
|
294
|
-
for (let
|
|
295
|
-
const
|
|
296
|
-
|
|
292
|
+
function we(e, a) {
|
|
293
|
+
const t = N(e), r = [];
|
|
294
|
+
for (let l = 0; l < t.length; l++) {
|
|
295
|
+
const c = t[l], o = r.length > 0 ? R(...r) : "", d = o ? a[o] : void 0;
|
|
296
|
+
d?.type === "map" ? r.push(st) : d?.type === "array" ? r.push(ot) : r.push(c);
|
|
297
297
|
}
|
|
298
|
-
return
|
|
298
|
+
return R(...r);
|
|
299
299
|
}
|
|
300
|
-
function
|
|
301
|
-
const t =
|
|
302
|
-
function
|
|
300
|
+
function za(e, a) {
|
|
301
|
+
const t = B(e), { i18n: r } = be();
|
|
302
|
+
function l(p) {
|
|
303
303
|
return {
|
|
304
|
-
tooltip:
|
|
304
|
+
tooltip: r.t("version_compatibility.tooltip", { version: p })
|
|
305
305
|
};
|
|
306
306
|
}
|
|
307
|
-
function
|
|
308
|
-
return
|
|
307
|
+
function c() {
|
|
308
|
+
return Na(B(a)?.emptyFieldValue);
|
|
309
309
|
}
|
|
310
|
-
const o =
|
|
311
|
-
function
|
|
312
|
-
if (
|
|
313
|
-
let
|
|
314
|
-
return
|
|
310
|
+
const o = E(() => t ? Ua(t) : {});
|
|
311
|
+
function d(p) {
|
|
312
|
+
if (p) {
|
|
313
|
+
let g = we(p, o.value || {});
|
|
314
|
+
return g.startsWith(`${se}${ke}`) && (g = g.slice(2)), o.value?.[g];
|
|
315
315
|
}
|
|
316
316
|
return t;
|
|
317
317
|
}
|
|
318
|
-
function
|
|
319
|
-
const
|
|
320
|
-
if (!
|
|
321
|
-
return
|
|
322
|
-
if (
|
|
323
|
-
return
|
|
324
|
-
if (!
|
|
325
|
-
return
|
|
326
|
-
}
|
|
327
|
-
function s(
|
|
328
|
-
const
|
|
329
|
-
if (Array.isArray(
|
|
330
|
-
for (const
|
|
331
|
-
const
|
|
332
|
-
|
|
318
|
+
function i(p, g = !1) {
|
|
319
|
+
const u = d(p);
|
|
320
|
+
if (!u)
|
|
321
|
+
return c();
|
|
322
|
+
if (u.default !== void 0)
|
|
323
|
+
return u.default;
|
|
324
|
+
if (!u.auto)
|
|
325
|
+
return g || u.required ? u.type === "record" ? s(u, p) : u.type === "array" ? [] : u.type === "map" ? {} : c() : c();
|
|
326
|
+
}
|
|
327
|
+
function s(p, g) {
|
|
328
|
+
const u = {};
|
|
329
|
+
if (Array.isArray(p.fields))
|
|
330
|
+
for (const $ of p.fields) {
|
|
331
|
+
const k = Object.keys($)[0], _ = g ? `${g}.${k}` : k, V = i(_, !1);
|
|
332
|
+
V !== void 0 && (u[k] = V);
|
|
333
333
|
}
|
|
334
|
-
return
|
|
334
|
+
return u;
|
|
335
335
|
}
|
|
336
|
-
function
|
|
337
|
-
return
|
|
336
|
+
function v(p) {
|
|
337
|
+
return p ? i(p, !0) : s(d(), "");
|
|
338
338
|
}
|
|
339
|
-
function p
|
|
340
|
-
const
|
|
339
|
+
function f(p) {
|
|
340
|
+
const g = d(p), u = g?.description ? ua.sanitize(ia.parse(g.description, { async: !1 })) : void 0;
|
|
341
341
|
return {
|
|
342
|
-
...
|
|
343
|
-
"data-testid": `ff-label-${
|
|
344
|
-
info:
|
|
342
|
+
...qa,
|
|
343
|
+
"data-testid": `ff-label-${p}`,
|
|
344
|
+
info: u
|
|
345
345
|
};
|
|
346
346
|
}
|
|
347
|
-
function m(
|
|
348
|
-
const
|
|
349
|
-
let
|
|
350
|
-
for (;
|
|
351
|
-
const
|
|
352
|
-
if (
|
|
353
|
-
return
|
|
354
|
-
const
|
|
355
|
-
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
function
|
|
359
|
-
const
|
|
360
|
-
if (
|
|
361
|
-
return
|
|
362
|
-
const
|
|
363
|
-
return
|
|
364
|
-
const
|
|
365
|
-
return !
|
|
347
|
+
function m(p) {
|
|
348
|
+
const g = B(a)?.minRuntimeVersion;
|
|
349
|
+
let u = p;
|
|
350
|
+
for (; u; ) {
|
|
351
|
+
const $ = d(u)?.min_ai_gateway_version;
|
|
352
|
+
if ($ && !St(g, $))
|
|
353
|
+
return l($);
|
|
354
|
+
const k = N(u);
|
|
355
|
+
k.pop(), u = k.length ? R(...k) : void 0;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
function b(p) {
|
|
359
|
+
const g = d(p), u = g?.one_of || g.elements?.one_of || [], $ = g?.enum_min_versions || g.elements?.enum_min_versions, k = _a(u);
|
|
360
|
+
if (!$?.length)
|
|
361
|
+
return k;
|
|
362
|
+
const _ = B(a)?.minRuntimeVersion, V = new Map($.map((T) => [T.value, T.min_ai_gateway_version]));
|
|
363
|
+
return k.map((T) => {
|
|
364
|
+
const S = V.get(T.value);
|
|
365
|
+
return !S || St(_, S) ? T : {
|
|
366
366
|
...T,
|
|
367
367
|
disabled: !0,
|
|
368
|
-
versionInfo:
|
|
368
|
+
versionInfo: l(S)
|
|
369
369
|
};
|
|
370
370
|
});
|
|
371
371
|
}
|
|
372
|
-
function
|
|
373
|
-
const
|
|
374
|
-
let
|
|
375
|
-
if (
|
|
376
|
-
|
|
372
|
+
function h(p) {
|
|
373
|
+
const g = d(p), u = g?.default;
|
|
374
|
+
let $ = null;
|
|
375
|
+
if (g?.type === "foreign" && u?.id)
|
|
376
|
+
$ = u.id;
|
|
377
377
|
else {
|
|
378
|
-
if (
|
|
378
|
+
if (u == null || typeof u == "object" || u === "")
|
|
379
379
|
return null;
|
|
380
|
-
if (Array.isArray(
|
|
381
|
-
if (
|
|
380
|
+
if (Array.isArray(u)) {
|
|
381
|
+
if (u.length === 0)
|
|
382
382
|
return null;
|
|
383
|
-
|
|
383
|
+
$ = u.join(", ");
|
|
384
384
|
} else
|
|
385
|
-
|
|
385
|
+
$ = u.toString();
|
|
386
386
|
}
|
|
387
|
-
return `Default: ${
|
|
387
|
+
return `Default: ${$}`;
|
|
388
388
|
}
|
|
389
|
-
function
|
|
389
|
+
function y() {
|
|
390
390
|
return o.value;
|
|
391
391
|
}
|
|
392
|
-
function
|
|
393
|
-
return
|
|
392
|
+
function w(p) {
|
|
393
|
+
return d(p)?.required ? v(p) : c();
|
|
394
394
|
}
|
|
395
395
|
return {
|
|
396
|
-
getSchemaMap:
|
|
397
|
-
getSchema:
|
|
398
|
-
getDefault:
|
|
399
|
-
getSelectItems:
|
|
400
|
-
getLabelAttributes:
|
|
396
|
+
getSchemaMap: y,
|
|
397
|
+
getSchema: d,
|
|
398
|
+
getDefault: v,
|
|
399
|
+
getSelectItems: b,
|
|
400
|
+
getLabelAttributes: f,
|
|
401
401
|
getFieldVersionInfo: m,
|
|
402
|
-
getPlaceholder:
|
|
403
|
-
getEmptyOrDefault:
|
|
402
|
+
getPlaceholder: h,
|
|
403
|
+
getEmptyOrDefault: w,
|
|
404
404
|
/**
|
|
405
405
|
* The configured empty-field sentinel on its own, with no schema/path
|
|
406
406
|
* lookup and no required/default awareness. Use this (not
|
|
@@ -409,421 +409,421 @@ function Da(e, a) {
|
|
|
409
409
|
* back in, which would make it impossible to clear a required field
|
|
410
410
|
* that has an explicit `schema.default`.
|
|
411
411
|
*/
|
|
412
|
-
getEmptyValue:
|
|
412
|
+
getEmptyValue: c
|
|
413
413
|
};
|
|
414
414
|
}
|
|
415
|
-
const
|
|
416
|
-
function
|
|
417
|
-
return { [
|
|
415
|
+
const at = /* @__PURE__ */ Symbol("ff-render-rule-exact-match");
|
|
416
|
+
function ol(e) {
|
|
417
|
+
return { [at]: e };
|
|
418
418
|
}
|
|
419
|
-
function
|
|
420
|
-
return typeof a == "object" && a !== null &&
|
|
419
|
+
function Wa(e, a) {
|
|
420
|
+
return typeof a == "object" && a !== null && at in a ? _e(e, a[at]) : Array.isArray(a) ? a.some((r) => _e(e, r)) : _e(e, a);
|
|
421
421
|
}
|
|
422
|
-
function
|
|
423
|
-
const t =
|
|
424
|
-
function
|
|
425
|
-
|
|
422
|
+
function Ja(e, a) {
|
|
423
|
+
const t = ce({}), r = ce({});
|
|
424
|
+
function l(u, $, k) {
|
|
425
|
+
r.value[u] = { ...r.value[u], [$]: k ? [...k] : [] };
|
|
426
426
|
}
|
|
427
|
-
function
|
|
428
|
-
const
|
|
429
|
-
if (!
|
|
430
|
-
const
|
|
431
|
-
delete
|
|
427
|
+
function c(u, $) {
|
|
428
|
+
const k = r.value[u];
|
|
429
|
+
if (!k || !($ in k)) return;
|
|
430
|
+
const _ = { ...k };
|
|
431
|
+
delete _[$], Object.keys(_).length ? r.value[u] = _ : delete r.value[u];
|
|
432
432
|
}
|
|
433
|
-
function o(
|
|
434
|
-
const
|
|
435
|
-
if (!
|
|
436
|
-
const
|
|
433
|
+
function o(u, $) {
|
|
434
|
+
const k = u.map((V) => N(V).length), _ = k[0];
|
|
435
|
+
if (!k.every((V) => V === _)) {
|
|
436
|
+
const V = u.map((T, S) => ` - '${T}' is at level ${k[S]}`).join(`
|
|
437
437
|
`);
|
|
438
438
|
throw new Error(
|
|
439
|
-
`${
|
|
440
|
-
${
|
|
439
|
+
`${$}: Fields must be at the same level. Found mixed levels:
|
|
440
|
+
${V}`
|
|
441
441
|
);
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
|
-
function u
|
|
445
|
-
for (const [k
|
|
446
|
-
if (!
|
|
447
|
-
for (const
|
|
448
|
-
if (new Set(
|
|
449
|
-
const
|
|
444
|
+
function d(u) {
|
|
445
|
+
for (const [$, k] of Object.entries(u)) {
|
|
446
|
+
if (!k.bundles) continue;
|
|
447
|
+
for (const V of k.bundles)
|
|
448
|
+
if (new Set(V).size !== V.length) {
|
|
449
|
+
const S = V.filter((M, j) => V.indexOf(M) !== j);
|
|
450
450
|
throw new Error(
|
|
451
|
-
`Self-cycle detected in bundle: field '${
|
|
451
|
+
`Self-cycle detected in bundle: field '${S[0]}' appears multiple times in [${V.join(", ")}]`
|
|
452
452
|
);
|
|
453
453
|
}
|
|
454
|
-
const
|
|
455
|
-
for (const
|
|
456
|
-
for (let T = 1; T <
|
|
457
|
-
const
|
|
458
|
-
|
|
454
|
+
const _ = /* @__PURE__ */ new Map();
|
|
455
|
+
for (const V of k.bundles)
|
|
456
|
+
for (let T = 1; T < V.length; T++) {
|
|
457
|
+
const S = V[T], M = V[T - 1];
|
|
458
|
+
_.has(S) || _.set(S, /* @__PURE__ */ new Set()), _.get(S).add(M);
|
|
459
459
|
}
|
|
460
|
-
for (const
|
|
461
|
-
let T = function(
|
|
462
|
-
if (M.includes(
|
|
463
|
-
const
|
|
460
|
+
for (const V of _.keys()) {
|
|
461
|
+
let T = function(j) {
|
|
462
|
+
if (M.includes(j)) {
|
|
463
|
+
const U = [...M, j].join(" -> ");
|
|
464
464
|
throw new Error(
|
|
465
|
-
`Circular bundle detected in path '${
|
|
466
|
-
${
|
|
465
|
+
`Circular bundle detected in path '${$}':
|
|
466
|
+
${U}`
|
|
467
467
|
);
|
|
468
468
|
}
|
|
469
|
-
if (
|
|
470
|
-
|
|
471
|
-
const
|
|
472
|
-
if (
|
|
473
|
-
for (const
|
|
474
|
-
T(
|
|
469
|
+
if (S.has(j)) return;
|
|
470
|
+
S.add(j), M.push(j);
|
|
471
|
+
const x = _.get(j);
|
|
472
|
+
if (x)
|
|
473
|
+
for (const U of x)
|
|
474
|
+
T(U);
|
|
475
475
|
M.pop();
|
|
476
476
|
};
|
|
477
|
-
const
|
|
478
|
-
T(
|
|
477
|
+
const S = /* @__PURE__ */ new Set(), M = [];
|
|
478
|
+
T(V);
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
|
-
function
|
|
483
|
-
for (const [k
|
|
484
|
-
if (
|
|
485
|
-
for (const
|
|
486
|
-
let
|
|
487
|
-
if (
|
|
488
|
-
const
|
|
482
|
+
function i(u) {
|
|
483
|
+
for (const [$, k] of Object.entries(u))
|
|
484
|
+
if (k.dependencies)
|
|
485
|
+
for (const _ of Object.keys(k.dependencies)) {
|
|
486
|
+
let V = function(M) {
|
|
487
|
+
if (S.includes(M)) {
|
|
488
|
+
const x = [...S, M].join(" -> ");
|
|
489
489
|
throw new Error(
|
|
490
|
-
`Circular dependency detected in path '${
|
|
491
|
-
${
|
|
490
|
+
`Circular dependency detected in path '${$}':
|
|
491
|
+
${x}`
|
|
492
492
|
);
|
|
493
493
|
}
|
|
494
494
|
if (T.has(M)) return;
|
|
495
|
-
T.add(M),
|
|
496
|
-
const
|
|
497
|
-
if (
|
|
498
|
-
const [
|
|
499
|
-
|
|
495
|
+
T.add(M), S.push(M);
|
|
496
|
+
const j = k.dependencies[M];
|
|
497
|
+
if (j) {
|
|
498
|
+
const [x] = j;
|
|
499
|
+
k.dependencies[x] && V(x);
|
|
500
500
|
}
|
|
501
|
-
|
|
501
|
+
S.pop();
|
|
502
502
|
};
|
|
503
|
-
const T = /* @__PURE__ */ new Set(),
|
|
504
|
-
|
|
503
|
+
const T = /* @__PURE__ */ new Set(), S = [];
|
|
504
|
+
V(_);
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
|
-
function s(
|
|
508
|
-
const
|
|
509
|
-
return
|
|
507
|
+
function s(u, $) {
|
|
508
|
+
const k = u.map((V) => $ ? R($, V) : V), _ = N(k[0]);
|
|
509
|
+
return _.pop(), R(..._);
|
|
510
510
|
}
|
|
511
|
-
function
|
|
512
|
-
if (
|
|
513
|
-
const
|
|
514
|
-
return
|
|
511
|
+
function v(u, $) {
|
|
512
|
+
if (!$) return u;
|
|
513
|
+
const k = `${$}${ke}`;
|
|
514
|
+
return u.startsWith(k) ? u.slice(k.length) : u;
|
|
515
515
|
}
|
|
516
|
-
function
|
|
517
|
-
const
|
|
518
|
-
return
|
|
516
|
+
function f(u) {
|
|
517
|
+
const $ = N(u);
|
|
518
|
+
return $.pop(), R(...$);
|
|
519
519
|
}
|
|
520
520
|
function m() {
|
|
521
|
-
const
|
|
522
|
-
for (const [k
|
|
523
|
-
const
|
|
524
|
-
if (
|
|
525
|
-
for (const
|
|
526
|
-
if (
|
|
521
|
+
const u = {};
|
|
522
|
+
for (const [$, k] of Object.entries(t.value)) {
|
|
523
|
+
const _ = $ === se ? "" : $;
|
|
524
|
+
if (k.bundles)
|
|
525
|
+
for (const V of k.bundles) {
|
|
526
|
+
if (V.length < 2)
|
|
527
527
|
throw new Error(
|
|
528
|
-
`Bundle must contain at least 2 fields. Found ${
|
|
528
|
+
`Bundle must contain at least 2 fields. Found ${V.length} field(s) in bundle: [${V.join(", ")}]`
|
|
529
529
|
);
|
|
530
|
-
const T =
|
|
531
|
-
o(T, `Bundle [${
|
|
532
|
-
const
|
|
533
|
-
|
|
534
|
-
const M = T.map((
|
|
535
|
-
|
|
530
|
+
const T = V.map((j) => _ ? R(_, j) : j);
|
|
531
|
+
o(T, `Bundle [${V.join(", ")}]`);
|
|
532
|
+
const S = s(V, _) || se;
|
|
533
|
+
u[S] || (u[S] = {}), u[S].bundles || (u[S].bundles = []);
|
|
534
|
+
const M = T.map((j) => v(j, S));
|
|
535
|
+
u[S].bundles.push(M);
|
|
536
536
|
}
|
|
537
|
-
if (
|
|
538
|
-
for (const [
|
|
539
|
-
const M =
|
|
537
|
+
if (k.dependencies)
|
|
538
|
+
for (const [V, [T, S]] of Object.entries(k.dependencies)) {
|
|
539
|
+
const M = _ ? R(_, V) : V, j = _ ? R(_, T) : T;
|
|
540
540
|
o(
|
|
541
|
-
[M,
|
|
542
|
-
`Dependency '${
|
|
541
|
+
[M, j],
|
|
542
|
+
`Dependency '${V}' -> '${T}'`
|
|
543
543
|
);
|
|
544
|
-
const
|
|
545
|
-
|
|
546
|
-
const
|
|
547
|
-
|
|
544
|
+
const x = f(M) || se;
|
|
545
|
+
u[x] || (u[x] = {}), u[x].dependencies || (u[x].dependencies = {});
|
|
546
|
+
const U = v(M, x), P = v(j, x);
|
|
547
|
+
u[x].dependencies[U] = [P, S];
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
|
-
return u
|
|
550
|
+
return d(u), i(u), u;
|
|
551
551
|
}
|
|
552
|
-
const
|
|
552
|
+
const b = E(() => {
|
|
553
553
|
try {
|
|
554
554
|
return m();
|
|
555
|
-
} catch (
|
|
556
|
-
return console.error("Invalid render rules:",
|
|
555
|
+
} catch (u) {
|
|
556
|
+
return console.error("Invalid render rules:", u instanceof Error ? u.message : String(u)), {};
|
|
557
557
|
}
|
|
558
558
|
});
|
|
559
|
-
function
|
|
560
|
-
if (!
|
|
561
|
-
return
|
|
562
|
-
const
|
|
563
|
-
return
|
|
564
|
-
}
|
|
565
|
-
function
|
|
566
|
-
let
|
|
567
|
-
return
|
|
568
|
-
if (
|
|
569
|
-
const
|
|
559
|
+
function h(u) {
|
|
560
|
+
if (!u)
|
|
561
|
+
return b.value;
|
|
562
|
+
const $ = we(u, e());
|
|
563
|
+
return b.value[$];
|
|
564
|
+
}
|
|
565
|
+
function y(u) {
|
|
566
|
+
let $ = !1;
|
|
567
|
+
return E(() => {
|
|
568
|
+
if ($) return;
|
|
569
|
+
const k = B(u);
|
|
570
570
|
try {
|
|
571
|
-
return
|
|
572
|
-
} catch (
|
|
573
|
-
|
|
571
|
+
return h(k);
|
|
572
|
+
} catch (_) {
|
|
573
|
+
$ = !0, console.error(`Failed to get render rules for path: \`${k}\`,`, _ instanceof Error ? _.message : "");
|
|
574
574
|
return;
|
|
575
575
|
}
|
|
576
576
|
});
|
|
577
577
|
}
|
|
578
|
-
const
|
|
579
|
-
() => Object.values(
|
|
580
|
-
(
|
|
578
|
+
const w = E(
|
|
579
|
+
() => Object.values(b.value).some(
|
|
580
|
+
(u) => u.dependencies && Object.keys(u.dependencies).length > 0
|
|
581
581
|
)
|
|
582
582
|
);
|
|
583
|
-
function
|
|
583
|
+
function p(u) {
|
|
584
584
|
const {
|
|
585
|
-
fieldPath:
|
|
586
|
-
rules:
|
|
587
|
-
omittedFields:
|
|
588
|
-
} =
|
|
589
|
-
|
|
590
|
-
() =>
|
|
591
|
-
() =>
|
|
592
|
-
() =>
|
|
593
|
-
], ([
|
|
594
|
-
|
|
585
|
+
fieldPath: $,
|
|
586
|
+
rules: k,
|
|
587
|
+
omittedFields: _
|
|
588
|
+
} = u, V = Kt("omit-");
|
|
589
|
+
ee([
|
|
590
|
+
() => B(k),
|
|
591
|
+
() => B($),
|
|
592
|
+
() => B(_)
|
|
593
|
+
], ([S, M, j], [, x]) => {
|
|
594
|
+
S ? t.value[M] = S : delete t.value[M], l(M, V, j), x && x !== M && (delete t.value[x], c(x, V));
|
|
595
595
|
}, { immediate: !0, deep: !0 });
|
|
596
|
-
const T =
|
|
597
|
-
return
|
|
598
|
-
const
|
|
599
|
-
delete t.value[
|
|
596
|
+
const T = y($);
|
|
597
|
+
return Tt(() => {
|
|
598
|
+
const S = B($);
|
|
599
|
+
delete t.value[S], c(S, V);
|
|
600
600
|
}), T;
|
|
601
601
|
}
|
|
602
|
-
function
|
|
603
|
-
const
|
|
604
|
-
if (
|
|
605
|
-
const
|
|
606
|
-
if (
|
|
607
|
-
const
|
|
608
|
-
if (
|
|
602
|
+
function g(u) {
|
|
603
|
+
const $ = N(u);
|
|
604
|
+
if (!$.length) return !1;
|
|
605
|
+
const k = $[$.length - 1], _ = R(...$.slice(0, -1)), V = r.value[_];
|
|
606
|
+
if (V) {
|
|
607
|
+
const P = Object.values(V);
|
|
608
|
+
if (P.length && P.every((H) => H.includes(k))) return !1;
|
|
609
609
|
}
|
|
610
|
-
const T =
|
|
611
|
-
if (!
|
|
612
|
-
const [M,
|
|
613
|
-
return !
|
|
610
|
+
const T = _ === "" ? se : we(_, e()), S = b.value[T]?.dependencies?.[k];
|
|
611
|
+
if (!S) return !1;
|
|
612
|
+
const [M, j] = S, x = _ ? R(_, M) : M, U = ge(a(), N(x));
|
|
613
|
+
return !Wa(U, j);
|
|
614
614
|
}
|
|
615
615
|
return {
|
|
616
|
-
useCurrentRules:
|
|
617
|
-
createComputedRules:
|
|
618
|
-
hasDependencies:
|
|
619
|
-
isFieldHidden:
|
|
616
|
+
useCurrentRules: p,
|
|
617
|
+
createComputedRules: y,
|
|
618
|
+
hasDependencies: w,
|
|
619
|
+
isFieldHidden: g
|
|
620
620
|
};
|
|
621
621
|
}
|
|
622
|
-
const
|
|
623
|
-
function
|
|
624
|
-
const a = N(
|
|
622
|
+
const qe = "expressions", Ge = "";
|
|
623
|
+
function Ga(e) {
|
|
624
|
+
const a = N(it(e));
|
|
625
625
|
if (!(a.length < 2))
|
|
626
|
-
return
|
|
626
|
+
return R(qe, ...a.slice(1));
|
|
627
627
|
}
|
|
628
|
-
function
|
|
629
|
-
const t = N(
|
|
630
|
-
if (!(t[0] !==
|
|
631
|
-
return
|
|
628
|
+
function Ya(e, a) {
|
|
629
|
+
const t = N(it(e));
|
|
630
|
+
if (!(t[0] !== qe || t.length < 2))
|
|
631
|
+
return R(a, ...t.slice(1));
|
|
632
632
|
}
|
|
633
|
-
function
|
|
633
|
+
function Xa(e) {
|
|
634
634
|
const a = e?.fields;
|
|
635
635
|
if (Array.isArray(a))
|
|
636
636
|
for (const t of a) {
|
|
637
|
-
const
|
|
638
|
-
if (
|
|
639
|
-
const
|
|
640
|
-
if (!(
|
|
641
|
-
return
|
|
637
|
+
const r = Object.keys(t)[0];
|
|
638
|
+
if (r === qe) continue;
|
|
639
|
+
const l = t[r];
|
|
640
|
+
if (!(l?.type !== "record" || !Array.isArray(l.fields)) && l.fields.some((c) => c[Object.keys(c)[0]]?.expressible === !0))
|
|
641
|
+
return r;
|
|
642
642
|
}
|
|
643
643
|
}
|
|
644
|
-
function
|
|
644
|
+
function Qa(e) {
|
|
645
645
|
return !!e && e.type === "string" && "expressible_kong_type" in e;
|
|
646
646
|
}
|
|
647
|
-
let
|
|
648
|
-
function
|
|
649
|
-
return `kid:${++
|
|
647
|
+
let Za = 0;
|
|
648
|
+
function en() {
|
|
649
|
+
return `kid:${++Za}`;
|
|
650
650
|
}
|
|
651
|
-
function
|
|
652
|
-
const a =
|
|
651
|
+
function tn(e) {
|
|
652
|
+
const a = Ft(/* @__PURE__ */ new Map());
|
|
653
653
|
function t(s = "") {
|
|
654
|
-
const
|
|
655
|
-
return a.set(
|
|
654
|
+
const v = en();
|
|
655
|
+
return a.set(v, s), v;
|
|
656
656
|
}
|
|
657
|
-
function
|
|
657
|
+
function r(s) {
|
|
658
658
|
return a.get(s);
|
|
659
659
|
}
|
|
660
|
-
function
|
|
661
|
-
a.has(s) && a.set(s,
|
|
660
|
+
function l(s, v) {
|
|
661
|
+
a.has(s) && a.set(s, v);
|
|
662
662
|
}
|
|
663
|
-
function
|
|
663
|
+
function c(s) {
|
|
664
664
|
a.delete(s);
|
|
665
665
|
}
|
|
666
666
|
function o(s) {
|
|
667
|
-
return
|
|
667
|
+
return an(s, e, t);
|
|
668
668
|
}
|
|
669
|
-
function
|
|
670
|
-
return
|
|
669
|
+
function d(s) {
|
|
670
|
+
return nn(s, e, r);
|
|
671
671
|
}
|
|
672
|
-
function
|
|
672
|
+
function i() {
|
|
673
673
|
a.clear();
|
|
674
674
|
}
|
|
675
675
|
return {
|
|
676
676
|
createKey: t,
|
|
677
|
-
getKey:
|
|
678
|
-
updateKey:
|
|
679
|
-
deleteKey:
|
|
677
|
+
getKey: r,
|
|
678
|
+
updateKey: l,
|
|
679
|
+
deleteKey: c,
|
|
680
680
|
serialize: o,
|
|
681
|
-
deserialize:
|
|
682
|
-
clear:
|
|
681
|
+
deserialize: d,
|
|
682
|
+
clear: i
|
|
683
683
|
};
|
|
684
684
|
}
|
|
685
|
-
function
|
|
686
|
-
const
|
|
687
|
-
if (
|
|
688
|
-
return
|
|
689
|
-
if (Array.isArray(
|
|
690
|
-
return
|
|
691
|
-
const
|
|
692
|
-
return
|
|
685
|
+
function an(e, a, t) {
|
|
686
|
+
const r = (l, c) => {
|
|
687
|
+
if (l == null || typeof l != "object")
|
|
688
|
+
return l;
|
|
689
|
+
if (Array.isArray(l))
|
|
690
|
+
return l.map((i, s) => {
|
|
691
|
+
const v = c ? R(c, `${s}`) : `${s}`;
|
|
692
|
+
return r(i, v);
|
|
693
693
|
});
|
|
694
|
-
if ((
|
|
695
|
-
const
|
|
696
|
-
return Object.keys(
|
|
697
|
-
const
|
|
698
|
-
s[
|
|
694
|
+
if ((c ? a(c) : a())?.type === "map") {
|
|
695
|
+
const i = l, s = {};
|
|
696
|
+
return Object.keys(i).forEach((v) => {
|
|
697
|
+
const f = t(v), m = i[v], b = c ? R(c, v) : v;
|
|
698
|
+
s[f] = r(m, b);
|
|
699
699
|
}), s;
|
|
700
700
|
}
|
|
701
|
-
const
|
|
702
|
-
return Object.keys(
|
|
703
|
-
const s =
|
|
704
|
-
|
|
705
|
-
}),
|
|
701
|
+
const d = {};
|
|
702
|
+
return Object.keys(l).forEach((i) => {
|
|
703
|
+
const s = c ? R(c, i) : i;
|
|
704
|
+
d[i] = r(l[i], s);
|
|
705
|
+
}), d;
|
|
706
706
|
};
|
|
707
|
-
return
|
|
707
|
+
return r(e);
|
|
708
708
|
}
|
|
709
|
-
function
|
|
710
|
-
const
|
|
711
|
-
if (
|
|
712
|
-
return
|
|
713
|
-
if (Array.isArray(
|
|
714
|
-
return
|
|
715
|
-
const
|
|
716
|
-
return
|
|
709
|
+
function nn(e, a, t) {
|
|
710
|
+
const r = (l, c) => {
|
|
711
|
+
if (l == null || typeof l != "object")
|
|
712
|
+
return l;
|
|
713
|
+
if (Array.isArray(l))
|
|
714
|
+
return l.map((i, s) => {
|
|
715
|
+
const v = c ? R(c, `${s}`) : `${s}`;
|
|
716
|
+
return r(i, v);
|
|
717
717
|
});
|
|
718
|
-
if ((
|
|
719
|
-
const
|
|
720
|
-
return Object.keys(
|
|
721
|
-
const
|
|
722
|
-
if (
|
|
723
|
-
console.error(`[FreeForm] Missing name for key ID: ${String(
|
|
718
|
+
if ((c ? a(c) : a())?.type === "map") {
|
|
719
|
+
const i = l, s = {};
|
|
720
|
+
return Object.keys(i).forEach((v) => {
|
|
721
|
+
const f = v, m = i[f], b = t(f);
|
|
722
|
+
if (b == null) {
|
|
723
|
+
console.error(`[FreeForm] Missing name for key ID: ${String(f)}`);
|
|
724
724
|
return;
|
|
725
725
|
}
|
|
726
|
-
const
|
|
727
|
-
s[
|
|
726
|
+
const h = b || st, y = c ? R(c, h) : h;
|
|
727
|
+
s[b] = r(m, y);
|
|
728
728
|
}), s;
|
|
729
729
|
}
|
|
730
|
-
const
|
|
731
|
-
return Object.keys(
|
|
732
|
-
const s =
|
|
733
|
-
|
|
734
|
-
}),
|
|
730
|
+
const d = {};
|
|
731
|
+
return Object.keys(l).forEach((i) => {
|
|
732
|
+
const s = c ? R(c, i) : i;
|
|
733
|
+
d[i] = r(l[i], s);
|
|
734
|
+
}), d;
|
|
735
735
|
};
|
|
736
|
-
return
|
|
736
|
+
return r(e);
|
|
737
737
|
}
|
|
738
|
-
function
|
|
738
|
+
function Ue(e) {
|
|
739
739
|
return /^kid:\d+$/.test(e);
|
|
740
740
|
}
|
|
741
|
-
const
|
|
742
|
-
function
|
|
743
|
-
const
|
|
744
|
-
for (const
|
|
745
|
-
if ((
|
|
746
|
-
const
|
|
747
|
-
|
|
741
|
+
const rn = /* @__PURE__ */ Symbol.for("kong-ui-public:entities-plugins:use-secret-input"), Ie = "__FREEFORM_SCHEMA_MAP__", Me = 'input:not(:disabled), textarea:not(:disabled), select:not(:disabled), button:not(:disabled), [contenteditable="true"], [tabindex]:not([tabindex="-1"]):not(:disabled)', ln = 300, on = 600;
|
|
742
|
+
function Nt(e, { formData: a, getSchema: t, getKey: r }) {
|
|
743
|
+
const l = [];
|
|
744
|
+
for (const c of e)
|
|
745
|
+
if ((l.length ? t(R(...l)) : void 0)?.type === "map") {
|
|
746
|
+
const d = ge(a, l), i = d && Object.keys(d).find((s) => Ue(s) && r(s) === c);
|
|
747
|
+
l.push(i ?? c);
|
|
748
748
|
} else
|
|
749
|
-
|
|
750
|
-
return
|
|
749
|
+
l.push(c);
|
|
750
|
+
return R(...l);
|
|
751
751
|
}
|
|
752
|
-
function
|
|
753
|
-
return
|
|
754
|
-
N(e).map((t) =>
|
|
752
|
+
function ct(e, a) {
|
|
753
|
+
return ut(
|
|
754
|
+
N(e).map((t) => Ue(t) ? a(t) ?? t : t)
|
|
755
755
|
);
|
|
756
756
|
}
|
|
757
|
-
function
|
|
758
|
-
const a =
|
|
759
|
-
function
|
|
760
|
-
return t.add(
|
|
761
|
-
t.delete(
|
|
757
|
+
function sn(e) {
|
|
758
|
+
const a = Xt(null), t = /* @__PURE__ */ new Set();
|
|
759
|
+
function r(i) {
|
|
760
|
+
return t.add(i), () => {
|
|
761
|
+
t.delete(i);
|
|
762
762
|
};
|
|
763
763
|
}
|
|
764
|
-
function
|
|
764
|
+
function l(i) {
|
|
765
765
|
for (const s of t) {
|
|
766
|
-
if (s.path() !==
|
|
766
|
+
if (s.path() !== i)
|
|
767
767
|
continue;
|
|
768
|
-
const
|
|
769
|
-
if (
|
|
770
|
-
return
|
|
768
|
+
const v = s.element();
|
|
769
|
+
if (v?.isConnected && v.getClientRects().length > 0)
|
|
770
|
+
return v;
|
|
771
771
|
}
|
|
772
772
|
return null;
|
|
773
773
|
}
|
|
774
|
-
function i
|
|
775
|
-
const s = N(
|
|
776
|
-
for (let
|
|
777
|
-
const
|
|
774
|
+
function c(i) {
|
|
775
|
+
const s = N(i);
|
|
776
|
+
for (let v = s.length; v > 0; v--) {
|
|
777
|
+
const f = R(...s.slice(0, v)), m = l(f);
|
|
778
778
|
if (m)
|
|
779
|
-
return { path:
|
|
779
|
+
return { path: f, element: m };
|
|
780
780
|
}
|
|
781
781
|
return null;
|
|
782
782
|
}
|
|
783
783
|
let o = 0;
|
|
784
|
-
async function
|
|
785
|
-
let
|
|
784
|
+
async function d(i, { duration: s = ln, highlight: v = !0 } = {}) {
|
|
785
|
+
let f;
|
|
786
786
|
try {
|
|
787
|
-
|
|
787
|
+
f = Pe(i);
|
|
788
788
|
} catch {
|
|
789
789
|
return null;
|
|
790
790
|
}
|
|
791
|
-
if (!
|
|
791
|
+
if (!f.length)
|
|
792
792
|
return null;
|
|
793
|
-
const m = ++o,
|
|
794
|
-
a.value =
|
|
793
|
+
const m = ++o, b = Nt(f, e);
|
|
794
|
+
a.value = b;
|
|
795
795
|
try {
|
|
796
|
-
for (let
|
|
797
|
-
if (await
|
|
796
|
+
for (let g = 0; g <= f.length && !l(b); g++)
|
|
797
|
+
if (await je(), m !== o)
|
|
798
798
|
return null;
|
|
799
|
-
if (await
|
|
799
|
+
if (await cn(), m !== o)
|
|
800
800
|
return null;
|
|
801
|
-
const
|
|
802
|
-
if (!
|
|
801
|
+
const h = c(b);
|
|
802
|
+
if (!h)
|
|
803
803
|
return null;
|
|
804
|
-
const
|
|
805
|
-
return await
|
|
804
|
+
const y = h.path === b, w = dn(), p = w ? 0 : Math.max(0, s);
|
|
805
|
+
return await mn(h.element, p, () => m !== o), m !== o ? null : (y && hn(h.element), v && !w && vn(h.element, p > 0 ? p * 2 : on), { path: ct(h.path, e.getKey), exact: y });
|
|
806
806
|
} finally {
|
|
807
807
|
m === o && (a.value = null);
|
|
808
808
|
}
|
|
809
809
|
}
|
|
810
810
|
return {
|
|
811
811
|
revealTarget: a,
|
|
812
|
-
registerFieldElement:
|
|
813
|
-
reveal:
|
|
812
|
+
registerFieldElement: r,
|
|
813
|
+
reveal: d
|
|
814
814
|
};
|
|
815
815
|
}
|
|
816
|
-
function
|
|
816
|
+
function un() {
|
|
817
817
|
return new Promise((e) => requestAnimationFrame(() => e()));
|
|
818
818
|
}
|
|
819
|
-
async function
|
|
819
|
+
async function cn(e = 1e3) {
|
|
820
820
|
const a = performance.now() + e;
|
|
821
821
|
for (; document.querySelector(".ff-slide-active") && performance.now() < a; )
|
|
822
|
-
await
|
|
822
|
+
await un();
|
|
823
823
|
}
|
|
824
|
-
function
|
|
824
|
+
function qt(e) {
|
|
825
825
|
if (e.component)
|
|
826
|
-
return
|
|
826
|
+
return qt(e.component.subTree);
|
|
827
827
|
const a = e.anchor;
|
|
828
828
|
let t = e.el;
|
|
829
829
|
for (; t; ) {
|
|
@@ -835,247 +835,365 @@ function Rt(e) {
|
|
|
835
835
|
}
|
|
836
836
|
return null;
|
|
837
837
|
}
|
|
838
|
-
function
|
|
838
|
+
function dn() {
|
|
839
839
|
return typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
840
840
|
}
|
|
841
|
-
function
|
|
841
|
+
function fn(e) {
|
|
842
842
|
const a = [];
|
|
843
|
-
for (let
|
|
844
|
-
const { overflowY:
|
|
845
|
-
/auto|scroll|overlay/.test(
|
|
843
|
+
for (let r = e.parentElement; r; r = r.parentElement) {
|
|
844
|
+
const { overflowY: l } = getComputedStyle(r);
|
|
845
|
+
/auto|scroll|overlay/.test(l) && r.scrollHeight > r.clientHeight && a.push(r);
|
|
846
846
|
}
|
|
847
847
|
const t = document.scrollingElement;
|
|
848
848
|
return t instanceof HTMLElement && t.scrollHeight > t.clientHeight && !a.includes(t) && a.push(t), a;
|
|
849
849
|
}
|
|
850
|
-
function
|
|
850
|
+
function pn(e) {
|
|
851
851
|
return e < 0.5 ? 4 * e * e * e : 1 - (-2 * e + 2) ** 3 / 2;
|
|
852
852
|
}
|
|
853
|
-
async function
|
|
853
|
+
async function mn(e, a, t) {
|
|
854
854
|
if (a === 0) {
|
|
855
855
|
e.scrollIntoView({ block: "center" });
|
|
856
856
|
return;
|
|
857
857
|
}
|
|
858
|
-
const
|
|
859
|
-
let
|
|
860
|
-
const
|
|
861
|
-
const
|
|
862
|
-
return
|
|
863
|
-
}).filter(({ from:
|
|
864
|
-
if (!
|
|
858
|
+
const r = e.getBoundingClientRect();
|
|
859
|
+
let l = r.top;
|
|
860
|
+
const c = fn(e).map((d) => {
|
|
861
|
+
const i = d === document.scrollingElement, s = i ? 0 : d.getBoundingClientRect().top, v = i ? window.innerHeight : d.clientHeight, f = d.scrollTop, m = d.scrollHeight - d.clientHeight, b = Math.min(m, Math.max(0, f + l - s - (v - r.height) / 2));
|
|
862
|
+
return l -= b - f, { scroller: d, from: f, to: b };
|
|
863
|
+
}).filter(({ from: d, to: i }) => Math.abs(i - d) >= 1);
|
|
864
|
+
if (!c.length)
|
|
865
865
|
return;
|
|
866
866
|
const o = performance.now();
|
|
867
|
-
await new Promise((
|
|
868
|
-
const
|
|
867
|
+
await new Promise((d) => {
|
|
868
|
+
const i = (s) => {
|
|
869
869
|
if (t()) {
|
|
870
|
-
|
|
870
|
+
d();
|
|
871
871
|
return;
|
|
872
872
|
}
|
|
873
|
-
const
|
|
874
|
-
for (const { scroller: m, from:
|
|
875
|
-
m.scrollTop =
|
|
876
|
-
|
|
873
|
+
const v = Math.min(1, (s - o) / a), f = pn(v);
|
|
874
|
+
for (const { scroller: m, from: b, to: h } of c)
|
|
875
|
+
m.scrollTop = b + (h - b) * f;
|
|
876
|
+
v < 1 ? requestAnimationFrame(i) : d();
|
|
877
877
|
};
|
|
878
|
-
requestAnimationFrame(
|
|
878
|
+
requestAnimationFrame(i);
|
|
879
879
|
});
|
|
880
880
|
}
|
|
881
|
-
function
|
|
881
|
+
function vn(e, a) {
|
|
882
882
|
e instanceof HTMLElement && (e.classList.remove("ff-reveal-highlight"), e.offsetWidth, e.style.setProperty("--kong-ui-freeform-reveal-highlight-duration", `${a}ms`), e.classList.add("ff-reveal-highlight"), e.addEventListener("animationend", () => {
|
|
883
883
|
e.classList.remove("ff-reveal-highlight"), e.style.removeProperty("--kong-ui-freeform-reveal-highlight-duration");
|
|
884
884
|
}, { once: !0 }));
|
|
885
885
|
}
|
|
886
|
-
function
|
|
887
|
-
const a = e.matches(
|
|
886
|
+
function hn(e) {
|
|
887
|
+
const a = e.matches(Me) ? e : e.querySelector(Me);
|
|
888
888
|
a instanceof HTMLElement && a.focus({ preventScroll: !0 });
|
|
889
889
|
}
|
|
890
|
-
|
|
890
|
+
function yn(e) {
|
|
891
|
+
const { formData: a, getSchema: t, getKey: r, isFieldHidden: l, onChange: c } = e;
|
|
892
|
+
function o(y) {
|
|
893
|
+
const w = N(y);
|
|
894
|
+
for (let p = w.length - 1; p > 0; p--) {
|
|
895
|
+
const g = R(...w.slice(0, p)), u = t(g);
|
|
896
|
+
if (u)
|
|
897
|
+
return u.type === "set" || u.type === "json" ? g : null;
|
|
898
|
+
}
|
|
899
|
+
return null;
|
|
900
|
+
}
|
|
901
|
+
function d(y) {
|
|
902
|
+
let w;
|
|
903
|
+
try {
|
|
904
|
+
w = Pe(y.path);
|
|
905
|
+
} catch {
|
|
906
|
+
return null;
|
|
907
|
+
}
|
|
908
|
+
if (!w.length)
|
|
909
|
+
return null;
|
|
910
|
+
let p = Nt(w, e);
|
|
911
|
+
if (!t(p)) {
|
|
912
|
+
const u = o(p);
|
|
913
|
+
if (!u)
|
|
914
|
+
return null;
|
|
915
|
+
p = u;
|
|
916
|
+
}
|
|
917
|
+
const g = N(p);
|
|
918
|
+
for (let u = 1; u <= g.length; u++) {
|
|
919
|
+
const $ = R(...g.slice(0, u)), k = u > 1 ? t(R(...g.slice(0, u - 1))) : void 0;
|
|
920
|
+
if (k?.type === "map" && !Ue(g[u - 1]) || u < g.length && ge(a, g.slice(0, u)) == null)
|
|
921
|
+
return null;
|
|
922
|
+
if (k?.type === "array") {
|
|
923
|
+
const _ = ge(a, g.slice(0, u - 1));
|
|
924
|
+
if (!Array.isArray(_) || Number(g[u - 1]) >= _.length)
|
|
925
|
+
return null;
|
|
926
|
+
}
|
|
927
|
+
if (l($))
|
|
928
|
+
return null;
|
|
929
|
+
}
|
|
930
|
+
return p;
|
|
931
|
+
}
|
|
932
|
+
const i = E(() => {
|
|
933
|
+
const y = /* @__PURE__ */ new Map(), w = [];
|
|
934
|
+
for (const p of B(e.errors) ?? []) {
|
|
935
|
+
const g = d(p);
|
|
936
|
+
if (g == null) {
|
|
937
|
+
w.push(p);
|
|
938
|
+
continue;
|
|
939
|
+
}
|
|
940
|
+
const u = y.get(g);
|
|
941
|
+
u ? u.push(p) : y.set(g, [p]);
|
|
942
|
+
}
|
|
943
|
+
return { byFieldPath: y, unmatched: w };
|
|
944
|
+
});
|
|
945
|
+
function s(y, w = !0) {
|
|
946
|
+
if (!w)
|
|
947
|
+
return i.value.byFieldPath.get(y) ?? [];
|
|
948
|
+
const p = [];
|
|
949
|
+
for (const [g, u] of i.value.byFieldPath)
|
|
950
|
+
Rt(g, y) && p.push(...u);
|
|
951
|
+
return p;
|
|
952
|
+
}
|
|
953
|
+
const v = E(() => i.value.unmatched);
|
|
954
|
+
function f(y, w) {
|
|
955
|
+
const p = B(e.errors) ?? [], g = Pe(ct(y, r));
|
|
956
|
+
let u = !1;
|
|
957
|
+
const $ = p.flatMap((k) => {
|
|
958
|
+
let _;
|
|
959
|
+
try {
|
|
960
|
+
_ = Pe(k.path);
|
|
961
|
+
} catch {
|
|
962
|
+
return [k];
|
|
963
|
+
}
|
|
964
|
+
if (!(_.length > g.length && g.every((M, j) => _[j] === M)))
|
|
965
|
+
return [k];
|
|
966
|
+
const T = w(_.slice(g.length));
|
|
967
|
+
if (!T)
|
|
968
|
+
return u = !0, [];
|
|
969
|
+
const S = ut([...g, ...T]);
|
|
970
|
+
return S === k.path ? [k] : (u = !0, [{ ...k, path: S }]);
|
|
971
|
+
});
|
|
972
|
+
u && c?.($);
|
|
973
|
+
}
|
|
974
|
+
function m(y, w) {
|
|
975
|
+
f(y, ([p, ...g]) => {
|
|
976
|
+
const u = Number(p);
|
|
977
|
+
return u === w ? null : u > w ? [String(u - 1), ...g] : [p, ...g];
|
|
978
|
+
});
|
|
979
|
+
}
|
|
980
|
+
function b(y, w, p) {
|
|
981
|
+
f(y, ([g, ...u]) => g === w ? [p, ...u] : [g, ...u]);
|
|
982
|
+
}
|
|
983
|
+
function h(y, w) {
|
|
984
|
+
f(y, (p) => p[0] === w ? null : p);
|
|
985
|
+
}
|
|
986
|
+
return {
|
|
987
|
+
getFieldErrors: s,
|
|
988
|
+
unmatchedErrors: v,
|
|
989
|
+
onArrayItemRemoved: m,
|
|
990
|
+
onMapKeyRenamed: b,
|
|
991
|
+
onMapKeyRemoved: h
|
|
992
|
+
};
|
|
993
|
+
}
|
|
994
|
+
const [bn, Ut] = sa(
|
|
891
995
|
function(a) {
|
|
892
996
|
const {
|
|
893
997
|
schema: t,
|
|
894
|
-
propsData:
|
|
895
|
-
onChange:
|
|
896
|
-
propsRenderRules:
|
|
897
|
-
propsConfig: o
|
|
998
|
+
propsData: r,
|
|
999
|
+
onChange: l,
|
|
1000
|
+
propsRenderRules: c,
|
|
1001
|
+
propsConfig: o,
|
|
1002
|
+
propsErrors: d,
|
|
1003
|
+
onErrorsChange: i
|
|
898
1004
|
} = a, {
|
|
899
|
-
getDefault:
|
|
900
|
-
getEmptyOrDefault:
|
|
901
|
-
...
|
|
902
|
-
} =
|
|
903
|
-
|
|
1005
|
+
getDefault: s,
|
|
1006
|
+
getEmptyOrDefault: v,
|
|
1007
|
+
...f
|
|
1008
|
+
} = za(t, () => B(o)), m = tn(f.getSchema), b = /* @__PURE__ */ new Map(), h = Ft({}), y = z(() => B(o) ?? {}), w = Le();
|
|
1009
|
+
De(tt, la(w, "default", Oe));
|
|
904
1010
|
const {
|
|
905
|
-
useCurrentRules:
|
|
906
|
-
createComputedRules:
|
|
907
|
-
hasDependencies:
|
|
908
|
-
isFieldHidden:
|
|
909
|
-
} =
|
|
910
|
-
fieldPath:
|
|
911
|
-
rules:
|
|
1011
|
+
useCurrentRules: p,
|
|
1012
|
+
createComputedRules: g,
|
|
1013
|
+
hasDependencies: u,
|
|
1014
|
+
isFieldHidden: $
|
|
1015
|
+
} = Ja(f.getSchemaMap, () => h), k = p({
|
|
1016
|
+
fieldPath: se,
|
|
1017
|
+
rules: c
|
|
912
1018
|
});
|
|
913
|
-
function
|
|
914
|
-
Object.keys(
|
|
915
|
-
delete
|
|
916
|
-
}),
|
|
917
|
-
}
|
|
918
|
-
const
|
|
919
|
-
function
|
|
920
|
-
let
|
|
921
|
-
!
|
|
922
|
-
}
|
|
923
|
-
const S =
|
|
924
|
-
function
|
|
925
|
-
if (
|
|
926
|
-
const
|
|
927
|
-
return !!
|
|
928
|
-
}
|
|
929
|
-
function
|
|
930
|
-
return
|
|
931
|
-
}
|
|
932
|
-
function
|
|
933
|
-
const
|
|
934
|
-
return
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
),
|
|
939
|
-
}
|
|
940
|
-
|
|
941
|
-
|
|
1019
|
+
function _(D) {
|
|
1020
|
+
Object.keys(h).forEach((he) => {
|
|
1021
|
+
delete h[he];
|
|
1022
|
+
}), m.clear(), Object.assign(h, m.serialize(D));
|
|
1023
|
+
}
|
|
1024
|
+
const V = ce(!1);
|
|
1025
|
+
function T(D) {
|
|
1026
|
+
let he;
|
|
1027
|
+
!D || !j(B(D)) ? (V.value = !0, he = s()) : (V.value = !1, he = mt(B(D))), vt(y.value.prepareFormData) ? _(y.value.prepareFormData(he)) : _(he);
|
|
1028
|
+
}
|
|
1029
|
+
const S = Xa(t);
|
|
1030
|
+
function M(D) {
|
|
1031
|
+
if ($(D)) return !0;
|
|
1032
|
+
const he = S && Ya(D, S);
|
|
1033
|
+
return !!he && $(he);
|
|
1034
|
+
}
|
|
1035
|
+
function j(D) {
|
|
1036
|
+
return vt(y.value.hasValue) ? y.value.hasValue(D) : !!D;
|
|
1037
|
+
}
|
|
1038
|
+
function x() {
|
|
1039
|
+
const D = mt(B(h));
|
|
1040
|
+
return u.value && jt(
|
|
1041
|
+
D,
|
|
1042
|
+
M,
|
|
1043
|
+
v
|
|
1044
|
+
), m.deserialize(D);
|
|
1045
|
+
}
|
|
1046
|
+
ee(h, () => {
|
|
1047
|
+
l?.(x());
|
|
942
1048
|
}, { deep: !0 });
|
|
943
|
-
let
|
|
944
|
-
|
|
945
|
-
|
|
1049
|
+
let U = !1;
|
|
1050
|
+
ee(() => r?.value, (D) => {
|
|
1051
|
+
U && _e(x(), B(D)) || (T(D), U = !0);
|
|
946
1052
|
}, { deep: !0, immediate: !0 });
|
|
947
|
-
function D
|
|
948
|
-
return
|
|
1053
|
+
function P(D) {
|
|
1054
|
+
return D != null && typeof D == "object" && !Array.isArray(D) ? m.serialize(D) : D;
|
|
949
1055
|
}
|
|
950
|
-
function
|
|
951
|
-
return
|
|
1056
|
+
function H(D) {
|
|
1057
|
+
return P(s(D));
|
|
952
1058
|
}
|
|
953
|
-
function
|
|
954
|
-
return
|
|
1059
|
+
function Y(D) {
|
|
1060
|
+
return P(v(D));
|
|
955
1061
|
}
|
|
956
|
-
const { revealTarget:
|
|
957
|
-
formData:
|
|
958
|
-
getSchema: (
|
|
959
|
-
getKey:
|
|
1062
|
+
const { revealTarget: fe, registerFieldElement: Ee, reveal: ze } = sn({
|
|
1063
|
+
formData: h,
|
|
1064
|
+
getSchema: (D) => f.getSchema(D),
|
|
1065
|
+
getKey: m.getKey
|
|
1066
|
+
}), { getFieldErrors: We, unmatchedErrors: pe, onArrayItemRemoved: W, onMapKeyRenamed: Je, onMapKeyRemoved: Yt } = yn({
|
|
1067
|
+
errors: d,
|
|
1068
|
+
onChange: i,
|
|
1069
|
+
formData: h,
|
|
1070
|
+
getSchema: (D) => f.getSchema(D),
|
|
1071
|
+
getKey: m.getKey,
|
|
1072
|
+
isFieldHidden: $
|
|
960
1073
|
});
|
|
961
1074
|
return {
|
|
962
1075
|
/**
|
|
963
1076
|
* The reactive form data object
|
|
964
1077
|
*/
|
|
965
|
-
formData:
|
|
966
|
-
isSchemaDefaulted:
|
|
1078
|
+
formData: h,
|
|
1079
|
+
isSchemaDefaulted: V,
|
|
967
1080
|
schema: t,
|
|
968
|
-
config:
|
|
969
|
-
fieldRendererRegistry:
|
|
970
|
-
setValue:
|
|
971
|
-
useCurrentRenderRules:
|
|
972
|
-
rootRenderRules:
|
|
973
|
-
createComputedRenderRules:
|
|
974
|
-
...
|
|
975
|
-
getValue:
|
|
976
|
-
isFieldHidden:
|
|
977
|
-
keyIdMap:
|
|
978
|
-
getDefault:
|
|
979
|
-
getEmptyOrDefault:
|
|
980
|
-
revealTarget:
|
|
981
|
-
registerFieldElement:
|
|
1081
|
+
config: y,
|
|
1082
|
+
fieldRendererRegistry: b,
|
|
1083
|
+
setValue: _,
|
|
1084
|
+
useCurrentRenderRules: p,
|
|
1085
|
+
rootRenderRules: k,
|
|
1086
|
+
createComputedRenderRules: g,
|
|
1087
|
+
...f,
|
|
1088
|
+
getValue: x,
|
|
1089
|
+
isFieldHidden: $,
|
|
1090
|
+
keyIdMap: m,
|
|
1091
|
+
getDefault: H,
|
|
1092
|
+
getEmptyOrDefault: Y,
|
|
1093
|
+
revealTarget: fe,
|
|
1094
|
+
registerFieldElement: Ee,
|
|
982
1095
|
/**
|
|
983
1096
|
* Reveals the field at a data path, see `createFieldReveal`
|
|
984
1097
|
*/
|
|
985
|
-
reveal:
|
|
1098
|
+
reveal: ze,
|
|
1099
|
+
getFieldErrors: We,
|
|
1100
|
+
unmatchedErrors: pe,
|
|
1101
|
+
onArrayItemRemoved: W,
|
|
1102
|
+
onMapKeyRenamed: Je,
|
|
1103
|
+
onMapKeyRemoved: Yt
|
|
986
1104
|
};
|
|
987
1105
|
}
|
|
988
1106
|
);
|
|
989
|
-
function
|
|
990
|
-
const e =
|
|
1107
|
+
function le() {
|
|
1108
|
+
const e = Ut();
|
|
991
1109
|
if (!e)
|
|
992
1110
|
throw new Error("useFormShared() called without provider.");
|
|
993
1111
|
return e;
|
|
994
1112
|
}
|
|
995
|
-
function
|
|
996
|
-
const { getSchema: a, getEmptyValue: t, isFieldHidden:
|
|
1113
|
+
function gn(e) {
|
|
1114
|
+
const { getSchema: a, getEmptyValue: t, isFieldHidden: r, formData: l, getFieldVersionInfo: c } = le(), o = E(() => it(B(e))), d = E(() => Ga(o.value)), i = E(() => d.value ? a(d.value) : void 0), s = E(() => {
|
|
997
1115
|
if (a(o.value)?.expressible) return !0;
|
|
998
|
-
const
|
|
999
|
-
if (
|
|
1000
|
-
const
|
|
1001
|
-
return
|
|
1002
|
-
}),
|
|
1003
|
-
get: () =>
|
|
1004
|
-
set: (
|
|
1005
|
-
if (
|
|
1006
|
-
if (
|
|
1007
|
-
m(
|
|
1116
|
+
const $ = N(o.value);
|
|
1117
|
+
if ($.length < 2) return !1;
|
|
1118
|
+
const k = a(R(...$.slice(0, -1)));
|
|
1119
|
+
return k?.type === "array" && !!k.expressible;
|
|
1120
|
+
}), v = E(() => s.value && Qa(i.value)), f = E({
|
|
1121
|
+
get: () => d.value ? ge(l, N(d.value)) : void 0,
|
|
1122
|
+
set: ($) => {
|
|
1123
|
+
if (d.value) {
|
|
1124
|
+
if (p.value) {
|
|
1125
|
+
m($);
|
|
1008
1126
|
return;
|
|
1009
1127
|
}
|
|
1010
|
-
|
|
1128
|
+
Qe(l, N(d.value), $);
|
|
1011
1129
|
}
|
|
1012
1130
|
}
|
|
1013
1131
|
});
|
|
1014
|
-
function m(
|
|
1015
|
-
const
|
|
1132
|
+
function m($) {
|
|
1133
|
+
const k = N(d.value), _ = Number(k[k.length - 1]), V = k.slice(0, -1), T = ge(l, N(o.value).slice(0, -1)), S = Math.max(
|
|
1016
1134
|
Array.isArray(T) ? T.length : 0,
|
|
1017
|
-
|
|
1018
|
-
), M =
|
|
1019
|
-
const
|
|
1020
|
-
return typeof
|
|
1135
|
+
_ + 1
|
|
1136
|
+
), M = ge(l, V), j = Array.from({ length: S }, (x, U) => {
|
|
1137
|
+
const P = Array.isArray(M) ? M[U] : void 0;
|
|
1138
|
+
return typeof P == "string" ? P : Ge;
|
|
1021
1139
|
});
|
|
1022
|
-
|
|
1140
|
+
j[_] = $ ?? Ge, Qe(l, V, j);
|
|
1023
1141
|
}
|
|
1024
|
-
const
|
|
1025
|
-
if (!
|
|
1026
|
-
const
|
|
1027
|
-
return
|
|
1028
|
-
}),
|
|
1029
|
-
function
|
|
1030
|
-
|
|
1142
|
+
const b = E(() => typeof f.value == "string" && f.value !== ""), h = E(() => i.value?.expressible_kong_type), y = E(() => r(o.value)), w = E(() => c(o.value) ?? (d.value ? c(d.value) : void 0)), p = E(() => {
|
|
1143
|
+
if (!d.value) return !1;
|
|
1144
|
+
const $ = N(d.value);
|
|
1145
|
+
return $.length < 2 ? !1 : a(R(...$.slice(0, -1)))?.type === "array";
|
|
1146
|
+
}), g = E(() => p.value ? Ge : t());
|
|
1147
|
+
function u() {
|
|
1148
|
+
f.value = g.value;
|
|
1031
1149
|
}
|
|
1032
1150
|
return {
|
|
1033
|
-
available:
|
|
1034
|
-
expressionPath:
|
|
1035
|
-
schema:
|
|
1036
|
-
value:
|
|
1037
|
-
hasExpression:
|
|
1038
|
-
kongType:
|
|
1039
|
-
hide:
|
|
1040
|
-
isArrayElement:
|
|
1041
|
-
emptyValue:
|
|
1042
|
-
clear:
|
|
1043
|
-
versionInfo:
|
|
1151
|
+
available: v,
|
|
1152
|
+
expressionPath: d,
|
|
1153
|
+
schema: i,
|
|
1154
|
+
value: f,
|
|
1155
|
+
hasExpression: b,
|
|
1156
|
+
kongType: h,
|
|
1157
|
+
hide: y,
|
|
1158
|
+
isArrayElement: p,
|
|
1159
|
+
emptyValue: g,
|
|
1160
|
+
clear: u,
|
|
1161
|
+
versionInfo: w
|
|
1044
1162
|
};
|
|
1045
1163
|
}
|
|
1046
|
-
const
|
|
1047
|
-
const a =
|
|
1048
|
-
const
|
|
1049
|
-
let
|
|
1050
|
-
return !
|
|
1164
|
+
const dt = (e) => {
|
|
1165
|
+
const a = Se(bt, E(() => "")), t = E(() => {
|
|
1166
|
+
const r = B(e);
|
|
1167
|
+
let l = r;
|
|
1168
|
+
return !yt(r) && a.value && (l = R(a.value, r)), yt(r) && (l = l.slice(Ve("").length)), l;
|
|
1051
1169
|
});
|
|
1052
|
-
return
|
|
1053
|
-
},
|
|
1054
|
-
const { getSchema: a, getSchemaMap: t, fieldRendererRegistry:
|
|
1055
|
-
const s =
|
|
1056
|
-
const
|
|
1057
|
-
return { ...m, [
|
|
1170
|
+
return De(bt, t), t;
|
|
1171
|
+
}, kn = (e) => {
|
|
1172
|
+
const { getSchema: a, getSchemaMap: t, fieldRendererRegistry: r } = le(), { default: l, ...c } = Le(), o = Se(tt), d = [Oe, "item", "label", "tooltip"], i = E(() => {
|
|
1173
|
+
const s = B(o), v = t(), f = Object.keys(c).filter((m) => !d.includes(m)).reduce((m, b) => {
|
|
1174
|
+
const h = we(R(B(e), b), v);
|
|
1175
|
+
return { ...m, [h]: c[b] };
|
|
1058
1176
|
}, {});
|
|
1059
|
-
return s ? { ...s, ...
|
|
1177
|
+
return s ? { ...s, ...f } : f;
|
|
1060
1178
|
});
|
|
1061
|
-
return
|
|
1062
|
-
if (
|
|
1063
|
-
const s =
|
|
1064
|
-
if (
|
|
1065
|
-
const
|
|
1066
|
-
for (const [m,
|
|
1067
|
-
const
|
|
1068
|
-
if (m({ path: s, genericPath:
|
|
1069
|
-
return
|
|
1179
|
+
return De(tt, i), E(() => {
|
|
1180
|
+
if (l) return;
|
|
1181
|
+
const s = B(e), v = i.value[we(s, t())];
|
|
1182
|
+
if (v) return v;
|
|
1183
|
+
const f = t();
|
|
1184
|
+
for (const [m, b] of r) {
|
|
1185
|
+
const h = we(s, f);
|
|
1186
|
+
if (m({ path: s, genericPath: h, schema: a(s) }))
|
|
1187
|
+
return b;
|
|
1070
1188
|
}
|
|
1071
1189
|
});
|
|
1072
1190
|
};
|
|
1073
|
-
function
|
|
1074
|
-
const { formData: a } =
|
|
1191
|
+
function $n(e) {
|
|
1192
|
+
const { formData: a } = le(), t = dt(e);
|
|
1075
1193
|
return {
|
|
1076
|
-
value:
|
|
1077
|
-
get: () =>
|
|
1078
|
-
set: (
|
|
1194
|
+
value: E({
|
|
1195
|
+
get: () => ge(a, N(t.value)),
|
|
1196
|
+
set: (l) => Qe(a, N(t.value), l)
|
|
1079
1197
|
})
|
|
1080
1198
|
};
|
|
1081
1199
|
}
|
|
@@ -1083,70 +1201,74 @@ function oe(e) {
|
|
|
1083
1201
|
const {
|
|
1084
1202
|
getSchema: a,
|
|
1085
1203
|
isFieldHidden: t,
|
|
1086
|
-
getEmptyOrDefault:
|
|
1087
|
-
getEmptyValue:
|
|
1088
|
-
getFieldVersionInfo:
|
|
1204
|
+
getEmptyOrDefault: r,
|
|
1205
|
+
getEmptyValue: l,
|
|
1206
|
+
getFieldVersionInfo: c,
|
|
1089
1207
|
revealTarget: o,
|
|
1090
|
-
registerFieldElement:
|
|
1091
|
-
|
|
1092
|
-
|
|
1208
|
+
registerFieldElement: d,
|
|
1209
|
+
getFieldErrors: i
|
|
1210
|
+
} = le(), s = dt(e), v = kn(s), { value: f } = $n(e), m = E(() => a(s.value)), b = E(() => t(s.value)), h = E(() => c(s.value)), y = E(() => r(s.value)), w = E(() => l());
|
|
1211
|
+
if (!m.value)
|
|
1093
1212
|
return {
|
|
1094
|
-
error: new Error(`path '${
|
|
1213
|
+
error: new Error(`path '${s.value}' is not found in schema.`)
|
|
1095
1214
|
};
|
|
1096
|
-
const
|
|
1215
|
+
const p = E(() => {
|
|
1097
1216
|
const _ = o.value;
|
|
1098
|
-
return _ &&
|
|
1099
|
-
}),
|
|
1100
|
-
return
|
|
1101
|
-
path: () =>
|
|
1102
|
-
element: () =>
|
|
1217
|
+
return _ && Rt(_, s.value) ? _ : null;
|
|
1218
|
+
}), g = E(() => i(s.value)), u = E(() => i(s.value, !1)), $ = E(() => g.value.map((_) => _.message).join("; ")), k = Qt();
|
|
1219
|
+
return k && Tt(d({
|
|
1220
|
+
path: () => s.value,
|
|
1221
|
+
element: () => qt(k.subTree)
|
|
1103
1222
|
})), {
|
|
1104
|
-
schema:
|
|
1105
|
-
path:
|
|
1106
|
-
renderer:
|
|
1107
|
-
value:
|
|
1108
|
-
ancestors:
|
|
1223
|
+
schema: m,
|
|
1224
|
+
path: s,
|
|
1225
|
+
renderer: v,
|
|
1226
|
+
value: f,
|
|
1227
|
+
ancestors: Dt(s),
|
|
1109
1228
|
/**
|
|
1110
1229
|
* Hide the field but keep its state.
|
|
1111
1230
|
*/
|
|
1112
|
-
hide:
|
|
1113
|
-
versionInfo:
|
|
1114
|
-
revealTarget:
|
|
1115
|
-
|
|
1231
|
+
hide: b,
|
|
1232
|
+
versionInfo: h,
|
|
1233
|
+
revealTarget: p,
|
|
1234
|
+
fieldErrors: g,
|
|
1235
|
+
ownFieldErrors: u,
|
|
1236
|
+
fieldErrorMessage: $,
|
|
1237
|
+
emptyOrDefaultValue: y,
|
|
1116
1238
|
emptyValue: w,
|
|
1117
1239
|
error: null
|
|
1118
1240
|
};
|
|
1119
1241
|
}
|
|
1120
|
-
function
|
|
1121
|
-
const t = /* @__PURE__ */ new WeakMap(),
|
|
1122
|
-
function
|
|
1123
|
-
return
|
|
1242
|
+
function An(e, a) {
|
|
1243
|
+
const t = /* @__PURE__ */ new WeakMap(), r = /* @__PURE__ */ new Map();
|
|
1244
|
+
function l() {
|
|
1245
|
+
return Kt(`${e}-`);
|
|
1124
1246
|
}
|
|
1125
|
-
function
|
|
1247
|
+
function c(o, d) {
|
|
1126
1248
|
if (o == null || typeof o != "object")
|
|
1127
|
-
return `${e}-${
|
|
1249
|
+
return `${e}-${d}`;
|
|
1128
1250
|
if (t.has(o))
|
|
1129
1251
|
return t.get(o);
|
|
1130
|
-
const
|
|
1131
|
-
return
|
|
1132
|
-
}
|
|
1133
|
-
return
|
|
1134
|
-
const
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
}), Array.from(
|
|
1138
|
-
|
|
1252
|
+
const i = r.has(d) ? r.get(d) : l();
|
|
1253
|
+
return r.set(d, i), t.set(o, i), i;
|
|
1254
|
+
}
|
|
1255
|
+
return ee(a, (o) => {
|
|
1256
|
+
const d = B(o), i = /* @__PURE__ */ new Set();
|
|
1257
|
+
d.forEach((s, v) => {
|
|
1258
|
+
i.add(v);
|
|
1259
|
+
}), Array.from(r.keys()).forEach((s) => {
|
|
1260
|
+
i.has(s) || r.delete(s);
|
|
1139
1261
|
});
|
|
1140
|
-
}, { immediate: !0, deep: !0 }), { getKey:
|
|
1262
|
+
}, { immediate: !0, deep: !0 }), { getKey: c };
|
|
1141
1263
|
}
|
|
1142
|
-
function
|
|
1143
|
-
|
|
1144
|
-
window[
|
|
1145
|
-
}, { immediate: !0, deep: !0 }),
|
|
1146
|
-
window[
|
|
1264
|
+
function sl(e, a) {
|
|
1265
|
+
ee(e, (t) => {
|
|
1266
|
+
window[Ie] || (window[Ie] = {}), window[Ie][a] = It(t);
|
|
1267
|
+
}, { immediate: !0, deep: !0 }), Zt(() => {
|
|
1268
|
+
window[Ie] && delete window[Ie][a];
|
|
1147
1269
|
});
|
|
1148
1270
|
}
|
|
1149
|
-
const
|
|
1271
|
+
const En = {
|
|
1150
1272
|
ip: "IP",
|
|
1151
1273
|
ssl: "SSL",
|
|
1152
1274
|
ttl: "TTL",
|
|
@@ -1188,123 +1310,146 @@ const yn = {
|
|
|
1188
1310
|
redis: "Redis",
|
|
1189
1311
|
uris: "URIs"
|
|
1190
1312
|
};
|
|
1191
|
-
function
|
|
1192
|
-
return
|
|
1313
|
+
function zt(e) {
|
|
1314
|
+
return En[e.toLocaleLowerCase()] ?? e;
|
|
1193
1315
|
}
|
|
1194
|
-
function
|
|
1195
|
-
return e.split("_").map(
|
|
1316
|
+
function Wt(e) {
|
|
1317
|
+
return e.split("_").map(zt).join(" ");
|
|
1196
1318
|
}
|
|
1197
|
-
function
|
|
1198
|
-
const t =
|
|
1319
|
+
function _n(e, a) {
|
|
1320
|
+
const t = Se(gt, {
|
|
1199
1321
|
parentPath: null,
|
|
1200
1322
|
isolate: !1
|
|
1201
|
-
}), { parentPath:
|
|
1202
|
-
parentPath:
|
|
1203
|
-
isolate:
|
|
1323
|
+
}), { parentPath: r, isolate: l } = B(t), c = ce(r ? R(r, e) : e), o = ce({
|
|
1324
|
+
parentPath: c.value,
|
|
1325
|
+
isolate: l
|
|
1204
1326
|
});
|
|
1205
|
-
return
|
|
1206
|
-
const { parentPath: s, isolate:
|
|
1207
|
-
|
|
1327
|
+
return ee([z(a), z(t)], ([d, i]) => {
|
|
1328
|
+
const { parentPath: s, isolate: v } = i, f = s ? R(s, e) : e;
|
|
1329
|
+
d ? {
|
|
1208
1330
|
isolate: () => {
|
|
1209
|
-
|
|
1331
|
+
c.value = e, o.value.isolate = !0, o.value.parentPath = null;
|
|
1210
1332
|
},
|
|
1211
1333
|
"isolate-children": () => {
|
|
1212
1334
|
o.value.isolate = !0, o.value.parentPath = null;
|
|
1213
1335
|
},
|
|
1214
1336
|
reset: () => {
|
|
1215
|
-
|
|
1337
|
+
c.value = e, o.value.isolate = !1, o.value.parentPath = null;
|
|
1216
1338
|
},
|
|
1217
1339
|
"reset-children": () => {
|
|
1218
1340
|
o.value.isolate = !1, o.value.parentPath = null;
|
|
1219
1341
|
},
|
|
1220
1342
|
inherit: () => {
|
|
1221
|
-
|
|
1343
|
+
c.value = f, o.value.isolate = !1, o.value.parentPath = f;
|
|
1222
1344
|
}
|
|
1223
|
-
}[
|
|
1224
|
-
}, { deep: !0, immediate: !0 }),
|
|
1345
|
+
}[d]?.() : v && (c.value = e, o.value.isolate = !0, o.value.parentPath = null);
|
|
1346
|
+
}, { deep: !0, immediate: !0 }), De(gt, o), c;
|
|
1225
1347
|
}
|
|
1226
|
-
function
|
|
1227
|
-
return N(e).map((t) => t.split("_").map(
|
|
1348
|
+
function nt(e) {
|
|
1349
|
+
return N(e).map((t) => t.split("_").map(zt).join(" ")).map(oa).join(" › ");
|
|
1228
1350
|
}
|
|
1229
|
-
function
|
|
1230
|
-
const t =
|
|
1231
|
-
return
|
|
1232
|
-
const
|
|
1233
|
-
if (
|
|
1351
|
+
function wn(e, a) {
|
|
1352
|
+
const t = B(e), r = Ae(t), { config: l, getSchema: c } = le(), o = _n(r, a), d = Dt(e);
|
|
1353
|
+
return E(() => {
|
|
1354
|
+
const i = o.value ?? r, s = d.value.parent?.path ? c(d.value.parent.path) : null, v = s?.type === "array", f = s?.type === "map";
|
|
1355
|
+
if (v || f)
|
|
1234
1356
|
return "";
|
|
1235
|
-
const m =
|
|
1236
|
-
return
|
|
1357
|
+
const m = nt(i);
|
|
1358
|
+
return l.value.transformLabel ? l.value.transformLabel(m, t) : m;
|
|
1237
1359
|
});
|
|
1238
1360
|
}
|
|
1239
|
-
function
|
|
1240
|
-
const { getLabelAttributes: t, getPlaceholder:
|
|
1241
|
-
return
|
|
1361
|
+
function de(e, a) {
|
|
1362
|
+
const { getLabelAttributes: t, getPlaceholder: r, getSchema: l } = le(), c = B(e), o = B(a), d = wn(e, z(() => B(a).resetLabelPath));
|
|
1363
|
+
return E(() => ({
|
|
1242
1364
|
...o,
|
|
1243
|
-
placeholder: o.placeholder ??
|
|
1244
|
-
labelAttributes: o.labelAttributes ?? t(
|
|
1245
|
-
label: o.label ??
|
|
1246
|
-
required: o.required ??
|
|
1365
|
+
placeholder: o.placeholder ?? r(c) ?? void 0,
|
|
1366
|
+
labelAttributes: o.labelAttributes ?? t(c),
|
|
1367
|
+
label: o.label ?? d.value,
|
|
1368
|
+
required: o.required ?? l(c)?.required
|
|
1247
1369
|
}));
|
|
1248
1370
|
}
|
|
1249
|
-
function
|
|
1250
|
-
const { value: t, ...
|
|
1251
|
-
if (
|
|
1252
|
-
return
|
|
1253
|
-
}),
|
|
1254
|
-
const
|
|
1255
|
-
return [
|
|
1371
|
+
function Sn(e, a) {
|
|
1372
|
+
const { value: t, ...r } = oe(e), { getEmptyOrDefault: l, keyIdMap: c, onMapKeyRenamed: o, onMapKeyRemoved: d } = le(), i = E(() => {
|
|
1373
|
+
if (r.path)
|
|
1374
|
+
return r.schema.value.values;
|
|
1375
|
+
}), s = E(() => t ? Object.keys(t.value || {}).map((w) => {
|
|
1376
|
+
const p = w, g = c.getKey(p) ?? "";
|
|
1377
|
+
return [p, g];
|
|
1256
1378
|
}) : []);
|
|
1257
|
-
function
|
|
1258
|
-
|
|
1379
|
+
function v(y, w) {
|
|
1380
|
+
if (!t) return;
|
|
1381
|
+
const p = c.getKey(y);
|
|
1382
|
+
c.updateKey(y, w), p !== void 0 && p !== w && o(r.path.value, p, w), t.value = { ...t.value };
|
|
1259
1383
|
}
|
|
1260
|
-
function
|
|
1384
|
+
function f() {
|
|
1261
1385
|
if (!t) return;
|
|
1262
|
-
const
|
|
1386
|
+
const y = c.createKey(), w = l(R(r.path.value, y));
|
|
1263
1387
|
return t.value = {
|
|
1264
1388
|
...t.value,
|
|
1265
|
-
[
|
|
1266
|
-
},
|
|
1267
|
-
}
|
|
1268
|
-
function
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1389
|
+
[y]: w
|
|
1390
|
+
}, y;
|
|
1391
|
+
}
|
|
1392
|
+
function m(y) {
|
|
1393
|
+
const w = c.getKey(y);
|
|
1394
|
+
if (w !== void 0 && r.path && d(r.path.value, w), c.deleteKey(y), !t) return;
|
|
1395
|
+
const { [y]: p, ...g } = t.value || {};
|
|
1396
|
+
Object.keys(g).length === 0 ? t.value = r.schema?.value?.required ? {} : r.emptyValue.value : t.value = g;
|
|
1397
|
+
}
|
|
1398
|
+
function b(y) {
|
|
1399
|
+
return c.getKey(y);
|
|
1400
|
+
}
|
|
1401
|
+
const h = E(() => {
|
|
1402
|
+
if (!r.path) return "";
|
|
1403
|
+
const y = Ae(r.path.value);
|
|
1404
|
+
let w = y;
|
|
1405
|
+
return Ue(y) && (w = c.getKey(y) ?? ""), Wt(w);
|
|
1281
1406
|
});
|
|
1282
|
-
if (a &&
|
|
1283
|
-
let
|
|
1407
|
+
if (a && i.value?.type === "string") {
|
|
1408
|
+
let y = function() {
|
|
1284
1409
|
if (!t || !t.value) return null;
|
|
1285
|
-
const
|
|
1286
|
-
for (const [
|
|
1287
|
-
const
|
|
1288
|
-
|
|
1410
|
+
const p = {};
|
|
1411
|
+
for (const [g, u] of Object.entries(t.value)) {
|
|
1412
|
+
const $ = c.getKey(g);
|
|
1413
|
+
$ && (p[$] = u);
|
|
1289
1414
|
}
|
|
1290
|
-
return
|
|
1291
|
-
},
|
|
1292
|
-
|
|
1293
|
-
const
|
|
1294
|
-
|
|
1415
|
+
return p;
|
|
1416
|
+
}, w = null;
|
|
1417
|
+
ee(() => t?.value, (p) => {
|
|
1418
|
+
const g = y();
|
|
1419
|
+
_e(w, g) || (w = g, a?.(g));
|
|
1295
1420
|
}, { deep: !0 });
|
|
1296
1421
|
}
|
|
1297
1422
|
return {
|
|
1298
|
-
keys:
|
|
1299
|
-
updateKey:
|
|
1300
|
-
addKey:
|
|
1301
|
-
removeKey:
|
|
1302
|
-
field:
|
|
1303
|
-
fieldDisplayName:
|
|
1304
|
-
getKeyName:
|
|
1423
|
+
keys: s,
|
|
1424
|
+
updateKey: v,
|
|
1425
|
+
addKey: f,
|
|
1426
|
+
removeKey: m,
|
|
1427
|
+
field: r,
|
|
1428
|
+
fieldDisplayName: h,
|
|
1429
|
+
getKeyName: b
|
|
1305
1430
|
};
|
|
1306
1431
|
}
|
|
1307
|
-
const
|
|
1432
|
+
const Vn = ["data-testid"], Tn = /* @__PURE__ */ G({
|
|
1433
|
+
__name: "FieldErrors",
|
|
1434
|
+
props: {
|
|
1435
|
+
errors: {},
|
|
1436
|
+
path: {}
|
|
1437
|
+
},
|
|
1438
|
+
setup(e) {
|
|
1439
|
+
return (a, t) => e.errors?.length ? (A(), F("ul", {
|
|
1440
|
+
key: 0,
|
|
1441
|
+
class: "ff-field-errors",
|
|
1442
|
+
"data-testid": `ff-field-errors-${e.path}`
|
|
1443
|
+
}, [
|
|
1444
|
+
(A(!0), F(Q, null, ie(e.errors, (r, l) => (A(), F("li", { key: l }, q(r.message), 1))), 128))
|
|
1445
|
+
], 8, Vn)) : O("", !0);
|
|
1446
|
+
}
|
|
1447
|
+
}), Z = (e, a) => {
|
|
1448
|
+
const t = e.__vccOpts || e;
|
|
1449
|
+
for (const [r, l] of a)
|
|
1450
|
+
t[r] = l;
|
|
1451
|
+
return t;
|
|
1452
|
+
}, ve = /* @__PURE__ */ Z(Tn, [["__scopeId", "data-v-eb0e5af6"]]), Fe = /* @__PURE__ */ G({
|
|
1308
1453
|
__name: "EnhancedInput",
|
|
1309
1454
|
props: {
|
|
1310
1455
|
modelValue: {},
|
|
@@ -1313,39 +1458,39 @@ const Ve = /* @__PURE__ */ J({
|
|
|
1313
1458
|
},
|
|
1314
1459
|
emits: ["update:modelValue"],
|
|
1315
1460
|
setup(e, { emit: a }) {
|
|
1316
|
-
const t = e,
|
|
1317
|
-
|
|
1318
|
-
|
|
1461
|
+
const t = e, r = $e(), l = a, c = E(() => t.multiline ? fa : t.secret ? ka : pa), o = E(() => r.characterLimit ?? (t.multiline ? !1 : void 0)), d = ce(t.modelValue);
|
|
1462
|
+
ee(() => t.modelValue, (f) => {
|
|
1463
|
+
d.value = f;
|
|
1319
1464
|
});
|
|
1320
|
-
const { config:
|
|
1321
|
-
|
|
1322
|
-
},
|
|
1323
|
-
|
|
1465
|
+
const { config: i } = le(), s = (f) => {
|
|
1466
|
+
f !== d.value && (d.value = f, i.value.updateOnChange || l("update:modelValue", f));
|
|
1467
|
+
}, v = () => {
|
|
1468
|
+
i.value.updateOnChange && l("update:modelValue", d.value);
|
|
1324
1469
|
};
|
|
1325
|
-
return (
|
|
1470
|
+
return (f, m) => (A(), K(n(c), X(f.$attrs, {
|
|
1326
1471
|
"character-limit": o.value,
|
|
1327
1472
|
"model-value": e.modelValue,
|
|
1328
1473
|
resizable: e.multiline ? !0 : void 0,
|
|
1329
|
-
onChange:
|
|
1474
|
+
onChange: v,
|
|
1330
1475
|
"onUpdate:modelValue": s
|
|
1331
|
-
}),
|
|
1332
|
-
|
|
1333
|
-
name:
|
|
1334
|
-
fn:
|
|
1335
|
-
C(
|
|
1476
|
+
}), te({ _: 2 }, [
|
|
1477
|
+
ie(Le(), (b, h) => ({
|
|
1478
|
+
name: h,
|
|
1479
|
+
fn: I((y) => [
|
|
1480
|
+
C(f.$slots, h, rt(Pt(y)))
|
|
1336
1481
|
])
|
|
1337
1482
|
}))
|
|
1338
1483
|
]), 1040, ["character-limit", "model-value", "resizable"]));
|
|
1339
1484
|
}
|
|
1340
|
-
}),
|
|
1485
|
+
}), Fn = {
|
|
1341
1486
|
condition: "https://developer.konghq.com/gateway/plugins/expressions/"
|
|
1342
|
-
},
|
|
1487
|
+
}, In = ["data-expression-for", "data-testid"], Pn = {
|
|
1343
1488
|
key: 1,
|
|
1344
1489
|
class: "ff-expression-editor-expanded"
|
|
1345
|
-
},
|
|
1490
|
+
}, Mn = {
|
|
1346
1491
|
key: 0,
|
|
1347
1492
|
class: "ff-version-compatibility-note"
|
|
1348
|
-
},
|
|
1493
|
+
}, Kn = ["innerHTML"], Ln = /* @__PURE__ */ G({
|
|
1349
1494
|
name: "ExpressionEditor",
|
|
1350
1495
|
__name: "ExpressionEditor",
|
|
1351
1496
|
props: {
|
|
@@ -1353,67 +1498,67 @@ const Ve = /* @__PURE__ */ J({
|
|
|
1353
1498
|
placeholder: {}
|
|
1354
1499
|
},
|
|
1355
1500
|
setup(e) {
|
|
1356
|
-
const { i18n: a, i18nT: t } =
|
|
1357
|
-
|
|
1358
|
-
|
|
1501
|
+
const { i18n: a, i18nT: t } = be(), r = dt(z(() => e.name)), l = gn(r), c = E(() => Ve(l.expressionPath.value)), o = l.versionInfo, d = E(() => !!o.value), i = ce(l.hasExpression.value);
|
|
1502
|
+
ee(l.hasExpression, (h) => {
|
|
1503
|
+
h && (i.value = !0);
|
|
1359
1504
|
});
|
|
1360
1505
|
const s = {
|
|
1361
1506
|
string: "expression.returns.string",
|
|
1362
1507
|
number: "expression.returns.number",
|
|
1363
1508
|
integer: "expression.returns.integer",
|
|
1364
1509
|
boolean: "expression.returns.boolean"
|
|
1365
|
-
},
|
|
1366
|
-
const
|
|
1367
|
-
return
|
|
1368
|
-
}),
|
|
1510
|
+
}, v = E(() => {
|
|
1511
|
+
const h = l.kongType.value;
|
|
1512
|
+
return h && h in s ? s[h] : "expression.returns.unknown";
|
|
1513
|
+
}), f = E(() => ({
|
|
1369
1514
|
info: a.t("expression.info"),
|
|
1370
1515
|
tooltipAttributes: { maxWidth: "300px", placement: "top" },
|
|
1371
|
-
"data-testid": `ff-expression-label-${
|
|
1516
|
+
"data-testid": `ff-expression-label-${r.value}`
|
|
1372
1517
|
}));
|
|
1373
|
-
function m(
|
|
1374
|
-
|
|
1518
|
+
function m(h) {
|
|
1519
|
+
l.value.value = h;
|
|
1375
1520
|
}
|
|
1376
|
-
function
|
|
1377
|
-
|
|
1521
|
+
function b() {
|
|
1522
|
+
l.clear(), i.value = !1;
|
|
1378
1523
|
}
|
|
1379
|
-
return (
|
|
1524
|
+
return (h, y) => n(l).available.value ? ne((A(), F("div", {
|
|
1380
1525
|
key: 0,
|
|
1381
1526
|
class: "ff-expression-editor",
|
|
1382
|
-
"data-expression-for": n(
|
|
1383
|
-
"data-testid": `ff-expression-${n(
|
|
1527
|
+
"data-expression-for": n(l).expressionPath.value,
|
|
1528
|
+
"data-testid": `ff-expression-${n(r)}`
|
|
1384
1529
|
}, [
|
|
1385
|
-
|
|
1386
|
-
|
|
1530
|
+
i.value ? (A(), F("div", Pn, [
|
|
1531
|
+
L(ft, {
|
|
1387
1532
|
class: "ff-expression-editor-input",
|
|
1388
|
-
disabled:
|
|
1533
|
+
disabled: d.value,
|
|
1389
1534
|
label: n(a).t("expression.label"),
|
|
1390
|
-
"label-attributes":
|
|
1535
|
+
"label-attributes": f.value,
|
|
1391
1536
|
multiline: "",
|
|
1392
|
-
name:
|
|
1537
|
+
name: c.value,
|
|
1393
1538
|
placeholder: e.placeholder ?? "",
|
|
1394
1539
|
rows: 3,
|
|
1395
1540
|
"onUpdate:modelValue": m
|
|
1396
1541
|
}, {
|
|
1397
|
-
tooltip:
|
|
1398
|
-
n(o) ? (
|
|
1542
|
+
tooltip: I(() => [
|
|
1543
|
+
n(o) ? (A(), F("p", Mn, q(n(o).tooltip), 1)) : O("", !0),
|
|
1399
1544
|
me("div", {
|
|
1400
1545
|
class: "ff-label-tooltip-info",
|
|
1401
|
-
innerHTML:
|
|
1402
|
-
}, null, 8,
|
|
1546
|
+
innerHTML: f.value.info
|
|
1547
|
+
}, null, 8, Kn)
|
|
1403
1548
|
]),
|
|
1404
|
-
help:
|
|
1405
|
-
C(
|
|
1406
|
-
|
|
1407
|
-
type:
|
|
1408
|
-
|
|
1549
|
+
help: I(() => [
|
|
1550
|
+
C(h.$slots, "help", {}, () => [
|
|
1551
|
+
L(n(t), { keypath: "expression.help.text" }, {
|
|
1552
|
+
type: I(() => [
|
|
1553
|
+
ae(q(n(a).t(v.value)), 1)
|
|
1409
1554
|
]),
|
|
1410
|
-
link:
|
|
1411
|
-
|
|
1555
|
+
link: I(() => [
|
|
1556
|
+
L(n(ma), {
|
|
1412
1557
|
"hide-icon": "",
|
|
1413
|
-
href: n(
|
|
1558
|
+
href: n(Fn).condition
|
|
1414
1559
|
}, {
|
|
1415
|
-
default:
|
|
1416
|
-
|
|
1560
|
+
default: I(() => [
|
|
1561
|
+
ae(q(n(a).t("expression.help.learn")), 1)
|
|
1417
1562
|
]),
|
|
1418
1563
|
_: 1
|
|
1419
1564
|
}, 8, ["href"])
|
|
@@ -1424,55 +1569,50 @@ const Ve = /* @__PURE__ */ J({
|
|
|
1424
1569
|
]),
|
|
1425
1570
|
_: 3
|
|
1426
1571
|
}, 8, ["disabled", "label", "label-attributes", "name", "placeholder"]),
|
|
1427
|
-
|
|
1572
|
+
L(n(ht), {
|
|
1428
1573
|
appearance: "tertiary",
|
|
1429
1574
|
"aria-label": n(a).t("expression.remove"),
|
|
1430
1575
|
class: "ff-expression-editor-remove",
|
|
1431
|
-
"data-testid": `ff-expression-remove-${n(
|
|
1432
|
-
disabled:
|
|
1576
|
+
"data-testid": `ff-expression-remove-${n(r)}`,
|
|
1577
|
+
disabled: d.value,
|
|
1433
1578
|
icon: "",
|
|
1434
|
-
onClick:
|
|
1579
|
+
onClick: b
|
|
1435
1580
|
}, {
|
|
1436
|
-
default:
|
|
1437
|
-
|
|
1581
|
+
default: I(() => [
|
|
1582
|
+
L(n(lt))
|
|
1438
1583
|
]),
|
|
1439
1584
|
_: 1
|
|
1440
1585
|
}, 8, ["aria-label", "data-testid", "disabled"])
|
|
1441
|
-
])) : (
|
|
1586
|
+
])) : (A(), K(ue(d.value ? n(Lt) : "div"), {
|
|
1442
1587
|
key: 0,
|
|
1443
1588
|
"max-width": "300",
|
|
1444
1589
|
text: n(o)?.tooltip
|
|
1445
1590
|
}, {
|
|
1446
|
-
default:
|
|
1447
|
-
|
|
1591
|
+
default: I(() => [
|
|
1592
|
+
L(n(ht), {
|
|
1448
1593
|
appearance: "tertiary",
|
|
1449
1594
|
class: "ff-expression-editor-add",
|
|
1450
|
-
"data-testid": `ff-expression-add-${n(
|
|
1451
|
-
disabled:
|
|
1452
|
-
onClick:
|
|
1595
|
+
"data-testid": `ff-expression-add-${n(r)}`,
|
|
1596
|
+
disabled: d.value,
|
|
1597
|
+
onClick: y[0] || (y[0] = (w) => i.value = !0)
|
|
1453
1598
|
}, {
|
|
1454
|
-
default:
|
|
1455
|
-
|
|
1456
|
-
|
|
1599
|
+
default: I(() => [
|
|
1600
|
+
L(n(Ce)),
|
|
1601
|
+
ae(" " + q(n(a).t("expression.add")), 1)
|
|
1457
1602
|
]),
|
|
1458
1603
|
_: 1
|
|
1459
1604
|
}, 8, ["data-testid", "disabled"])
|
|
1460
1605
|
]),
|
|
1461
1606
|
_: 1
|
|
1462
1607
|
}, 8, ["text"]))
|
|
1463
|
-
], 8,
|
|
1464
|
-
[
|
|
1608
|
+
], 8, In)), [
|
|
1609
|
+
[re, !n(l).hide.value]
|
|
1465
1610
|
]) : O("", !0);
|
|
1466
1611
|
}
|
|
1467
|
-
}),
|
|
1468
|
-
const t = e.__vccOpts || e;
|
|
1469
|
-
for (const [l, r] of a)
|
|
1470
|
-
t[l] = r;
|
|
1471
|
-
return t;
|
|
1472
|
-
}, Bt = /* @__PURE__ */ ee(Sn, [["__scopeId", "data-v-63a9b2f2"]]), Vn = {
|
|
1612
|
+
}), Jt = /* @__PURE__ */ Z(Ln, [["__scopeId", "data-v-63a9b2f2"]]), On = {
|
|
1473
1613
|
key: 0,
|
|
1474
1614
|
class: "ff-version-compatibility-note"
|
|
1475
|
-
},
|
|
1615
|
+
}, Rn = ["innerHTML"], jn = /* @__PURE__ */ G({
|
|
1476
1616
|
inheritAttrs: !1,
|
|
1477
1617
|
__name: "StringField",
|
|
1478
1618
|
props: {
|
|
@@ -1501,123 +1641,127 @@ const Ve = /* @__PURE__ */ J({
|
|
|
1501
1641
|
},
|
|
1502
1642
|
emits: ["update:modelValue"],
|
|
1503
1643
|
setup(e, { emit: a }) {
|
|
1504
|
-
const t =
|
|
1505
|
-
function
|
|
1506
|
-
|
|
1507
|
-
}
|
|
1508
|
-
const
|
|
1509
|
-
return (k
|
|
1510
|
-
const
|
|
1511
|
-
return
|
|
1644
|
+
const t = $e(), { i18n: r } = be(), l = Se(rn, E(() => !1)), c = ye(e, ["autofocus", "showVaultSecretPicker", "showPasswordMaskToggle", "expressionEditor", "name"]), o = a, { value: d, hide: i, versionInfo: s, ...v } = oe(z(() => e.name)), f = de(v.path, z({ ...c, ...t })), m = E(() => c.disabled || !!s?.value);
|
|
1645
|
+
function b($) {
|
|
1646
|
+
d.value = $ === "" ? v.emptyValue.value : $, o("update:modelValue", d.value);
|
|
1647
|
+
}
|
|
1648
|
+
const h = E(() => e.showPasswordMaskToggle !== void 0 ? e.showPasswordMaskToggle : c.type === "password" ? !0 : !!(v.schema?.value).encrypted), y = Se(Ot, void 0), w = E(() => e.showVaultSecretPicker !== void 0 ? e.showVaultSecretPicker : !!v.schema.value?.referenceable), p = E(() => ({ referenceable: w.value })), g = E(() => Ve(v.path?.value ?? "")), u = E(() => t["data-1p-ignore"] !== void 0 ? t["data-1p-ignore"] : Ae(e.name) === "name");
|
|
1649
|
+
return ($, k) => {
|
|
1650
|
+
const _ = J("KAlert");
|
|
1651
|
+
return v.error ? (A(), K(_, {
|
|
1512
1652
|
key: 0,
|
|
1513
1653
|
appearance: "danger",
|
|
1514
|
-
message:
|
|
1515
|
-
}, null, 8, ["message"])) :
|
|
1516
|
-
|
|
1654
|
+
message: v.error.message
|
|
1655
|
+
}, null, 8, ["message"])) : ne((A(), F("div", rt(X({ key: 1 }, $.$attrs)), [
|
|
1656
|
+
L(Fe, X(n(f), {
|
|
1517
1657
|
id: e.inputId,
|
|
1518
1658
|
class: "ff-string-field",
|
|
1519
|
-
"data-1p-ignore":
|
|
1659
|
+
"data-1p-ignore": u.value,
|
|
1520
1660
|
"data-autofocus": e.autofocus ? "true" : void 0,
|
|
1521
|
-
"data-testid": `ff-${
|
|
1661
|
+
"data-testid": `ff-${v.path.value}`,
|
|
1522
1662
|
disabled: m.value,
|
|
1523
|
-
error: e.error,
|
|
1663
|
+
error: e.error || !!v.fieldErrors?.value.length,
|
|
1524
1664
|
"error-message": e.errorMessage,
|
|
1525
1665
|
help: e.multiline && e.error ? e.errorMessage : e.help,
|
|
1526
|
-
"model-value": n(
|
|
1666
|
+
"model-value": n(d) ?? "",
|
|
1527
1667
|
multiline: e.multiline,
|
|
1528
|
-
placeholder: e.placeholder ?? n(
|
|
1529
|
-
secret:
|
|
1530
|
-
"show-password-mask-toggle":
|
|
1531
|
-
type:
|
|
1532
|
-
"onUpdate:modelValue":
|
|
1533
|
-
}),
|
|
1534
|
-
|
|
1668
|
+
placeholder: e.placeholder ?? n(f).placeholder,
|
|
1669
|
+
secret: h.value && n(l),
|
|
1670
|
+
"show-password-mask-toggle": h.value && !n(l),
|
|
1671
|
+
type: h.value && !n(l) ? "password" : h.value ? void 0 : "text",
|
|
1672
|
+
"onUpdate:modelValue": b
|
|
1673
|
+
}), te({ _: 2 }, [
|
|
1674
|
+
$.$slots.label ? {
|
|
1535
1675
|
name: "label",
|
|
1536
|
-
fn:
|
|
1537
|
-
C(
|
|
1538
|
-
label: n(
|
|
1676
|
+
fn: I(() => [
|
|
1677
|
+
C($.$slots, "label", {
|
|
1678
|
+
label: n(f).label
|
|
1539
1679
|
}, void 0, !0)
|
|
1540
1680
|
]),
|
|
1541
1681
|
key: "0"
|
|
1542
1682
|
} : void 0,
|
|
1543
|
-
n(
|
|
1683
|
+
n(f).labelAttributes?.info || n(s) ? {
|
|
1544
1684
|
name: "label-tooltip",
|
|
1545
|
-
fn:
|
|
1546
|
-
C(
|
|
1547
|
-
n(s) ? (
|
|
1548
|
-
n(
|
|
1685
|
+
fn: I(() => [
|
|
1686
|
+
C($.$slots, "tooltip", {}, () => [
|
|
1687
|
+
n(s) ? (A(), F("p", On, q(n(s).tooltip), 1)) : O("", !0),
|
|
1688
|
+
n(f).labelAttributes?.info ? (A(), F("div", {
|
|
1549
1689
|
key: 1,
|
|
1550
1690
|
class: "ff-label-tooltip-info",
|
|
1551
|
-
innerHTML: n(
|
|
1552
|
-
}, null, 8,
|
|
1691
|
+
innerHTML: n(f).labelAttributes.info
|
|
1692
|
+
}, null, 8, Rn)) : O("", !0)
|
|
1553
1693
|
], !0)
|
|
1554
1694
|
]),
|
|
1555
1695
|
key: "1"
|
|
1556
1696
|
} : void 0,
|
|
1557
|
-
!(e.multiline && e.error) &&
|
|
1697
|
+
!(e.multiline && e.error) && $.$slots.help ? {
|
|
1558
1698
|
name: "help",
|
|
1559
|
-
fn:
|
|
1560
|
-
C(
|
|
1699
|
+
fn: I(() => [
|
|
1700
|
+
C($.$slots, "help", {}, void 0, !0)
|
|
1561
1701
|
]),
|
|
1562
1702
|
key: "2"
|
|
1563
1703
|
} : void 0,
|
|
1564
1704
|
!e.multiline && e.inlineVaultPicker ? {
|
|
1565
1705
|
name: "after",
|
|
1566
|
-
fn:
|
|
1567
|
-
n(
|
|
1706
|
+
fn: I(() => [
|
|
1707
|
+
n(y) && w.value ? (A(), K(ue(n(y)), {
|
|
1568
1708
|
key: 0,
|
|
1569
1709
|
disabled: m.value,
|
|
1570
|
-
schema:
|
|
1571
|
-
update:
|
|
1572
|
-
value: n(
|
|
1710
|
+
schema: p.value,
|
|
1711
|
+
update: b,
|
|
1712
|
+
value: n(d) ?? ""
|
|
1573
1713
|
}, null, 8, ["disabled", "schema", "value"])) : O("", !0),
|
|
1574
|
-
|
|
1714
|
+
w.value && !n(y) ? (A(), K(_, {
|
|
1575
1715
|
key: 1,
|
|
1576
1716
|
appearance: "warning",
|
|
1577
|
-
"data-testid": `ff-vault-secret-picker-warning-${
|
|
1578
|
-
message: n(
|
|
1717
|
+
"data-testid": `ff-vault-secret-picker-warning-${v.path.value}`,
|
|
1718
|
+
message: n(r).t("vault_picker.component_error")
|
|
1579
1719
|
}, null, 8, ["data-testid", "message"])) : O("", !0)
|
|
1580
1720
|
]),
|
|
1581
1721
|
key: "3"
|
|
1582
1722
|
} : void 0
|
|
1583
1723
|
]), 1040, ["id", "data-1p-ignore", "data-autofocus", "data-testid", "disabled", "error", "error-message", "help", "model-value", "multiline", "placeholder", "secret", "show-password-mask-toggle", "type"]),
|
|
1584
|
-
|
|
1585
|
-
|
|
1724
|
+
L(ve, {
|
|
1725
|
+
errors: v.fieldErrors?.value,
|
|
1726
|
+
path: v.path?.value
|
|
1727
|
+
}, null, 8, ["errors", "path"]),
|
|
1728
|
+
e.inlineVaultPicker ? O("", !0) : (A(), F(Q, { key: 0 }, [
|
|
1729
|
+
n(y) && w.value ? (A(), K(ue(n(y)), {
|
|
1586
1730
|
key: 0,
|
|
1587
1731
|
disabled: m.value,
|
|
1588
|
-
schema:
|
|
1589
|
-
update:
|
|
1590
|
-
value: n(
|
|
1732
|
+
schema: p.value,
|
|
1733
|
+
update: b,
|
|
1734
|
+
value: n(d) ?? ""
|
|
1591
1735
|
}, null, 8, ["disabled", "schema", "value"])) : O("", !0),
|
|
1592
|
-
|
|
1736
|
+
w.value && !n(y) ? (A(), K(_, {
|
|
1593
1737
|
key: 1,
|
|
1594
1738
|
appearance: "warning",
|
|
1595
|
-
"data-testid": `ff-vault-secret-picker-warning-${
|
|
1596
|
-
message: n(
|
|
1739
|
+
"data-testid": `ff-vault-secret-picker-warning-${v.path.value}`,
|
|
1740
|
+
message: n(r).t("vault_picker.component_error")
|
|
1597
1741
|
}, null, 8, ["data-testid", "message"])) : O("", !0)
|
|
1598
1742
|
], 64)),
|
|
1599
|
-
e.expressionEditor !== !1 ? (
|
|
1743
|
+
e.expressionEditor !== !1 ? (A(), K(Jt, X({
|
|
1600
1744
|
key: 1,
|
|
1601
1745
|
class: "ff-string-field-expression",
|
|
1602
|
-
name:
|
|
1603
|
-
}, e.expressionEditor || {}),
|
|
1604
|
-
|
|
1746
|
+
name: g.value
|
|
1747
|
+
}, e.expressionEditor || {}), te({ _: 2 }, [
|
|
1748
|
+
$.$slots["expression-help"] ? {
|
|
1605
1749
|
name: "help",
|
|
1606
|
-
fn:
|
|
1607
|
-
C(
|
|
1750
|
+
fn: I(() => [
|
|
1751
|
+
C($.$slots, "expression-help", {}, void 0, !0)
|
|
1608
1752
|
]),
|
|
1609
1753
|
key: "0"
|
|
1610
1754
|
} : void 0
|
|
1611
1755
|
]), 1040, ["name"])) : O("", !0)
|
|
1612
1756
|
], 16)), [
|
|
1613
|
-
[
|
|
1757
|
+
[re, !n(i)]
|
|
1614
1758
|
]);
|
|
1615
1759
|
};
|
|
1616
1760
|
}
|
|
1617
|
-
}),
|
|
1761
|
+
}), ft = /* @__PURE__ */ Z(jn, [["__scopeId", "data-v-a73a4c3b"]]), xn = {
|
|
1618
1762
|
key: 0,
|
|
1619
1763
|
class: "ff-version-compatibility-note"
|
|
1620
|
-
},
|
|
1764
|
+
}, Cn = ["innerHTML"], Dn = /* @__PURE__ */ G({
|
|
1621
1765
|
inheritAttrs: !1,
|
|
1622
1766
|
__name: "BooleanField",
|
|
1623
1767
|
props: {
|
|
@@ -1628,46 +1772,57 @@ const Ve = /* @__PURE__ */ J({
|
|
|
1628
1772
|
},
|
|
1629
1773
|
emits: ["update:modelValue"],
|
|
1630
1774
|
setup(e, { emit: a }) {
|
|
1631
|
-
const t =
|
|
1632
|
-
|
|
1633
|
-
}, m =
|
|
1634
|
-
return (
|
|
1635
|
-
const
|
|
1636
|
-
return
|
|
1775
|
+
const t = $e(), r = ye(e, ["autofocus", "name"]), { value: l, hide: c, emptyOrDefaultValue: o, versionInfo: d, ...i } = oe(z(() => e.name)), s = a, v = E(() => !!t.disabled || !!d?.value), f = (b) => {
|
|
1776
|
+
l.value = b, s("update:modelValue", b);
|
|
1777
|
+
}, m = de(i.path, r);
|
|
1778
|
+
return (b, h) => {
|
|
1779
|
+
const y = J("KAlert");
|
|
1780
|
+
return i.error ? (A(), K(y, {
|
|
1637
1781
|
key: 0,
|
|
1638
1782
|
appearance: "danger",
|
|
1639
|
-
message:
|
|
1640
|
-
}, null, 8, ["message"])) :
|
|
1783
|
+
message: i.error.message
|
|
1784
|
+
}, null, 8, ["message"])) : ne((A(), K(n(va), X({ key: 1 }, { ...n(m), ...b.$attrs }, {
|
|
1641
1785
|
class: "ff-boolean-field",
|
|
1642
1786
|
"data-autofocus": e.autofocus ? "true" : void 0,
|
|
1643
|
-
"data-testid": `ff-${
|
|
1644
|
-
disabled:
|
|
1645
|
-
|
|
1646
|
-
"
|
|
1647
|
-
|
|
1648
|
-
|
|
1787
|
+
"data-testid": `ff-${i.path.value}`,
|
|
1788
|
+
disabled: v.value,
|
|
1789
|
+
error: !!b.$attrs.error || !!i.fieldErrors?.value.length,
|
|
1790
|
+
"model-value": !!(n(l) == null ? n(o) : n(l)),
|
|
1791
|
+
"onUpdate:modelValue": f
|
|
1792
|
+
}), te({ _: 2 }, [
|
|
1793
|
+
i.fieldErrors?.value.length ? {
|
|
1794
|
+
name: "description",
|
|
1795
|
+
fn: I(() => [
|
|
1796
|
+
L(ve, {
|
|
1797
|
+
errors: i.fieldErrors.value,
|
|
1798
|
+
path: i.path?.value
|
|
1799
|
+
}, null, 8, ["errors", "path"])
|
|
1800
|
+
]),
|
|
1801
|
+
key: "0"
|
|
1802
|
+
} : void 0,
|
|
1803
|
+
n(m).labelAttributes?.info || n(d) ? {
|
|
1649
1804
|
name: "tooltip",
|
|
1650
|
-
fn:
|
|
1651
|
-
C(
|
|
1652
|
-
n(
|
|
1653
|
-
n(m).labelAttributes?.info ? (
|
|
1805
|
+
fn: I(() => [
|
|
1806
|
+
C(b.$slots, "tooltip", {}, () => [
|
|
1807
|
+
n(d) ? (A(), F("p", xn, q(n(d).tooltip), 1)) : O("", !0),
|
|
1808
|
+
n(m).labelAttributes?.info ? (A(), F("div", {
|
|
1654
1809
|
key: 1,
|
|
1655
1810
|
class: "ff-label-tooltip-info",
|
|
1656
1811
|
innerHTML: n(m).labelAttributes.info
|
|
1657
|
-
}, null, 8,
|
|
1812
|
+
}, null, 8, Cn)) : O("", !0)
|
|
1658
1813
|
], !0)
|
|
1659
1814
|
]),
|
|
1660
|
-
key: "
|
|
1815
|
+
key: "1"
|
|
1661
1816
|
} : void 0
|
|
1662
|
-
]), 1040, ["data-autofocus", "data-testid", "disabled", "model-value"])), [
|
|
1663
|
-
[
|
|
1817
|
+
]), 1040, ["data-autofocus", "data-testid", "disabled", "error", "model-value"])), [
|
|
1818
|
+
[re, !n(c)]
|
|
1664
1819
|
]);
|
|
1665
1820
|
};
|
|
1666
1821
|
}
|
|
1667
|
-
}),
|
|
1822
|
+
}), Bn = /* @__PURE__ */ Z(Dn, [["__scopeId", "data-v-3dc15b68"]]), Hn = ["data-testid"], Nn = {
|
|
1668
1823
|
key: 0,
|
|
1669
1824
|
class: "ff-version-compatibility-note"
|
|
1670
|
-
},
|
|
1825
|
+
}, qn = ["innerHTML"], Un = /* @__PURE__ */ G({
|
|
1671
1826
|
inheritAttrs: !1,
|
|
1672
1827
|
__name: "StringArrayField",
|
|
1673
1828
|
props: {
|
|
@@ -1678,74 +1833,79 @@ const Ve = /* @__PURE__ */ J({
|
|
|
1678
1833
|
},
|
|
1679
1834
|
emits: ["update:modelValue"],
|
|
1680
1835
|
setup(e, { emit: a }) {
|
|
1681
|
-
const t =
|
|
1682
|
-
function
|
|
1683
|
-
return
|
|
1684
|
-
}
|
|
1685
|
-
function
|
|
1686
|
-
return
|
|
1687
|
-
}
|
|
1688
|
-
function
|
|
1689
|
-
m.value =
|
|
1690
|
-
const
|
|
1691
|
-
|
|
1692
|
-
}
|
|
1693
|
-
const
|
|
1694
|
-
return
|
|
1695
|
-
const
|
|
1696
|
-
|
|
1697
|
-
}, { immediate: !0 }), (
|
|
1698
|
-
const
|
|
1699
|
-
return
|
|
1836
|
+
const t = $e(), r = ye(e, ["autofocus", "name"]), l = a, { value: c, hide: o, versionInfo: d, ...i } = oe(z(() => e.name)), s = de(i.path, z({ ...r, ...t })), v = E(() => i.schema?.value?.len_min && i.schema.value.len_min > 0), f = E(() => !!t.disabled || !!d?.value), m = ce("");
|
|
1837
|
+
function b(p) {
|
|
1838
|
+
return p.map((g) => g.trim()).filter(Boolean).join(", ");
|
|
1839
|
+
}
|
|
1840
|
+
function h(p) {
|
|
1841
|
+
return p.trim().split(",").map((g) => g.trim()).filter(Boolean);
|
|
1842
|
+
}
|
|
1843
|
+
function y(p) {
|
|
1844
|
+
m.value = p;
|
|
1845
|
+
const g = h(p), u = !g.length && v.value ? i.emptyValue.value : g;
|
|
1846
|
+
c.value = u, l("update:modelValue", u);
|
|
1847
|
+
}
|
|
1848
|
+
const w = E(() => t["data-1p-ignore"] !== void 0 ? t["data-1p-ignore"] : Ae(e.name) === "name");
|
|
1849
|
+
return ee(c, (p) => {
|
|
1850
|
+
const g = p ? b(p) : "";
|
|
1851
|
+
b(h(m.value)) !== g && (m.value = g);
|
|
1852
|
+
}, { immediate: !0 }), (p, g) => {
|
|
1853
|
+
const u = J("KAlert");
|
|
1854
|
+
return i.error ? (A(), K(u, {
|
|
1700
1855
|
key: 0,
|
|
1701
1856
|
appearance: "danger",
|
|
1702
|
-
message:
|
|
1703
|
-
}, null, 8, ["message"])) :
|
|
1857
|
+
message: i.error.message
|
|
1858
|
+
}, null, 8, ["message"])) : ne((A(), F("div", {
|
|
1704
1859
|
key: 1,
|
|
1705
|
-
"data-testid": `ff-tag-${
|
|
1860
|
+
"data-testid": `ff-tag-${i.path.value}`
|
|
1706
1861
|
}, [
|
|
1707
|
-
|
|
1862
|
+
L(Fe, X({ ...n(s), ...p.$attrs }, {
|
|
1708
1863
|
class: "ff-tag-field",
|
|
1709
|
-
"data-1p-ignore":
|
|
1864
|
+
"data-1p-ignore": w.value,
|
|
1710
1865
|
"data-autofocus": e.autofocus ? "true" : void 0,
|
|
1711
|
-
"data-testid": `ff-${
|
|
1712
|
-
disabled:
|
|
1866
|
+
"data-testid": `ff-${i.path.value}`,
|
|
1867
|
+
disabled: f.value,
|
|
1868
|
+
error: !!p.$attrs.error || !!i.fieldErrors?.value.length,
|
|
1713
1869
|
"model-value": m.value ?? "",
|
|
1714
|
-
"onUpdate:modelValue":
|
|
1715
|
-
}),
|
|
1716
|
-
|
|
1870
|
+
"onUpdate:modelValue": y
|
|
1871
|
+
}), te({ _: 2 }, [
|
|
1872
|
+
p.$slots.label ? {
|
|
1717
1873
|
name: "label",
|
|
1718
|
-
fn:
|
|
1719
|
-
C(
|
|
1874
|
+
fn: I(() => [
|
|
1875
|
+
C(p.$slots, "label", {
|
|
1720
1876
|
label: n(s).label
|
|
1721
1877
|
}, void 0, !0)
|
|
1722
1878
|
]),
|
|
1723
1879
|
key: "0"
|
|
1724
1880
|
} : void 0,
|
|
1725
|
-
n(s).labelAttributes?.info || n(
|
|
1881
|
+
n(s).labelAttributes?.info || n(d) ? {
|
|
1726
1882
|
name: "label-tooltip",
|
|
1727
|
-
fn:
|
|
1728
|
-
C(
|
|
1729
|
-
n(
|
|
1730
|
-
n(s).labelAttributes?.info ? (
|
|
1883
|
+
fn: I(() => [
|
|
1884
|
+
C(p.$slots, "tooltip", {}, () => [
|
|
1885
|
+
n(d) ? (A(), F("p", Nn, q(n(d).tooltip), 1)) : O("", !0),
|
|
1886
|
+
n(s).labelAttributes?.info ? (A(), F("div", {
|
|
1731
1887
|
key: 1,
|
|
1732
1888
|
class: "ff-label-tooltip-info",
|
|
1733
1889
|
innerHTML: n(s).labelAttributes.info
|
|
1734
|
-
}, null, 8,
|
|
1890
|
+
}, null, 8, qn)) : O("", !0)
|
|
1735
1891
|
], !0)
|
|
1736
1892
|
]),
|
|
1737
1893
|
key: "1"
|
|
1738
1894
|
} : void 0
|
|
1739
|
-
]), 1040, ["data-1p-ignore", "data-autofocus", "data-testid", "disabled", "model-value"])
|
|
1740
|
-
|
|
1741
|
-
|
|
1895
|
+
]), 1040, ["data-1p-ignore", "data-autofocus", "data-testid", "disabled", "error", "model-value"]),
|
|
1896
|
+
L(ve, {
|
|
1897
|
+
errors: i.fieldErrors?.value,
|
|
1898
|
+
path: i.path?.value
|
|
1899
|
+
}, null, 8, ["errors", "path"])
|
|
1900
|
+
], 8, Hn)), [
|
|
1901
|
+
[re, !n(o)]
|
|
1742
1902
|
]);
|
|
1743
1903
|
};
|
|
1744
1904
|
}
|
|
1745
|
-
}),
|
|
1905
|
+
}), Gt = /* @__PURE__ */ Z(Un, [["__scopeId", "data-v-8350b3d6"]]), zn = ["data-appearance", "data-testid"], Wn = ["data-testid"], Jn = {
|
|
1746
1906
|
key: 0,
|
|
1747
1907
|
class: "ff-version-compatibility-note"
|
|
1748
|
-
},
|
|
1908
|
+
}, Gn = ["innerHTML"], Yn = ["data-testid"], Xn = { class: "ff-array-field-item-content" }, Qn = ["data-index", "data-testid"], Zn = /* @__PURE__ */ G({
|
|
1749
1909
|
__name: "ArrayField",
|
|
1750
1910
|
props: {
|
|
1751
1911
|
name: {},
|
|
@@ -1761,162 +1921,166 @@ const Ve = /* @__PURE__ */ J({
|
|
|
1761
1921
|
},
|
|
1762
1922
|
emits: ["add", "remove"],
|
|
1763
1923
|
setup(e, { emit: a }) {
|
|
1764
|
-
|
|
1765
|
-
|
|
1924
|
+
ea((P) => ({
|
|
1925
|
+
v77b50198: U.value
|
|
1766
1926
|
}));
|
|
1767
|
-
const t = e,
|
|
1768
|
-
if (!
|
|
1769
|
-
const
|
|
1770
|
-
if (!
|
|
1771
|
-
return
|
|
1772
|
-
}),
|
|
1773
|
-
if (!
|
|
1774
|
-
const
|
|
1775
|
-
return
|
|
1776
|
-
}), w =
|
|
1777
|
-
function k(
|
|
1778
|
-
return typeof t.itemLabel == "function" ? t.itemLabel(
|
|
1779
|
-
}
|
|
1780
|
-
const
|
|
1781
|
-
hash: `#${
|
|
1927
|
+
const t = e, r = a, { i18n: { t: l } } = be(), { getDefault: c, getSchema: o, onArrayItemRemoved: d } = le(), { value: i, hide: s, versionInfo: v, ...f } = oe(z(t, "name")), m = de(f.path, z({ ...t, ...$e() })), b = E(() => !!v?.value), h = E(() => {
|
|
1928
|
+
if (!f.path) throw new Error("Field path is required for sub-schema retrieval");
|
|
1929
|
+
const P = o(f.path.value);
|
|
1930
|
+
if (!P) throw new Error(`Schema not found for path: ${f.path.value}`);
|
|
1931
|
+
return P.elements;
|
|
1932
|
+
}), y = E(() => {
|
|
1933
|
+
if (!f.path) return "";
|
|
1934
|
+
const P = Ae(f.path.value);
|
|
1935
|
+
return Wt(P);
|
|
1936
|
+
}), w = E(() => t.addItemLabel ?? l("actions.add_entity", { entity: y.value })), p = E(() => t.items ?? B(i) ?? []), { getKey: g } = An("ff-array-field", p), u = E(() => t.appearance ? t.appearance : h.value.type === "record" || h.value.type === "map" ? "card" : "default"), $ = E(() => u.value === "card" ? Ze : "div");
|
|
1937
|
+
function k(P, H) {
|
|
1938
|
+
return typeof t.itemLabel == "function" ? t.itemLabel(P, H) : t.itemLabel || m.value.label || `Item #${H}`;
|
|
1939
|
+
}
|
|
1940
|
+
const _ = E(() => p.value.map((P, H) => ({
|
|
1941
|
+
hash: `#${g(P, H)}`,
|
|
1782
1942
|
title: ""
|
|
1783
|
-
}))),
|
|
1784
|
-
|
|
1785
|
-
if (!
|
|
1786
|
-
const
|
|
1787
|
-
|
|
1943
|
+
}))), V = ce(_.value[0]?.hash);
|
|
1944
|
+
ee(() => f.revealTarget?.value, (P) => {
|
|
1945
|
+
if (!P || u.value !== "tabs") return;
|
|
1946
|
+
const H = Number(N(P.slice(f.path.value.length))[0]), Y = _.value[H];
|
|
1947
|
+
Y && (V.value = Y.hash);
|
|
1788
1948
|
}, { immediate: !0 });
|
|
1789
|
-
const
|
|
1790
|
-
const
|
|
1791
|
-
Array.isArray(
|
|
1792
|
-
},
|
|
1793
|
-
Array.isArray(
|
|
1794
|
-
},
|
|
1795
|
-
function
|
|
1796
|
-
if (!
|
|
1949
|
+
const T = async () => {
|
|
1950
|
+
const P = c(R(f.path.value, ot));
|
|
1951
|
+
Array.isArray(i.value) || (i.value = []), i.value.push(P), r("add"), t.appearance === "tabs" && (await je(), V.value = _.value[_.value.length - 1]?.hash), await je(), j(p.value.length + 1);
|
|
1952
|
+
}, S = async (P) => {
|
|
1953
|
+
Array.isArray(i.value) && (d(f.path.value, P), i.value.splice(P, 1), i.value.length === 0 && !m.value.required && (i.value = f.emptyValue.value)), r("remove", P), t.appearance === "tabs" && (V.value = _.value[Math.max(0, P - 1)]?.hash);
|
|
1954
|
+
}, M = Mt("root");
|
|
1955
|
+
function j(P) {
|
|
1956
|
+
if (!M.value)
|
|
1797
1957
|
return;
|
|
1798
|
-
const
|
|
1799
|
-
if (!
|
|
1958
|
+
const H = Math.max(0, Math.min(P, p.value.length - 1)), Y = M.value.querySelector(`[data-index="${H}"]`);
|
|
1959
|
+
if (!Y)
|
|
1800
1960
|
return;
|
|
1801
|
-
|
|
1961
|
+
x(Y)?.focus();
|
|
1802
1962
|
}
|
|
1803
|
-
function
|
|
1804
|
-
const
|
|
1805
|
-
return
|
|
1963
|
+
function x(P) {
|
|
1964
|
+
const H = P.querySelector('[data-autofocus="true"]');
|
|
1965
|
+
return H ? H.matches(Me) ? H : H.querySelector(Me) : P.querySelector(Me);
|
|
1806
1966
|
}
|
|
1807
|
-
const
|
|
1808
|
-
const { appearance:
|
|
1809
|
-
return
|
|
1967
|
+
const U = E(() => {
|
|
1968
|
+
const { appearance: P, stickyTabs: H } = t;
|
|
1969
|
+
return P !== "tabs" || H == null || H === !1 ? null : typeof H == "number" ? `${t.stickyTabs}px` : typeof H == "string" ? H : "0";
|
|
1810
1970
|
});
|
|
1811
|
-
return (
|
|
1812
|
-
const
|
|
1813
|
-
return
|
|
1971
|
+
return (P, H) => {
|
|
1972
|
+
const Y = J("KAlert"), fe = J("KLabel"), Ee = J("KButton"), ze = J("KTooltip"), We = J("KTabs");
|
|
1973
|
+
return f.error ? (A(), K(Y, {
|
|
1814
1974
|
key: 0,
|
|
1815
1975
|
appearance: "danger",
|
|
1816
|
-
message:
|
|
1817
|
-
}, null, 8, ["message"])) :
|
|
1976
|
+
message: f.error.message
|
|
1977
|
+
}, null, 8, ["message"])) : ne((A(), F("div", {
|
|
1818
1978
|
key: 1,
|
|
1819
1979
|
ref_key: "root",
|
|
1820
|
-
ref:
|
|
1980
|
+
ref: M,
|
|
1821
1981
|
class: xe(["ff-array-field", {
|
|
1822
|
-
[`ff-array-field-${
|
|
1982
|
+
[`ff-array-field-${u.value ?? "default"}`]: !0,
|
|
1823
1983
|
"ff-array-field-sticky-tabs": e.stickyTabs
|
|
1824
1984
|
}]),
|
|
1825
|
-
"data-appearance":
|
|
1826
|
-
"data-testid": `ff-array-${
|
|
1985
|
+
"data-appearance": u.value,
|
|
1986
|
+
"data-testid": `ff-array-${f.path.value}`
|
|
1827
1987
|
}, [
|
|
1828
|
-
n(
|
|
1988
|
+
n(m).label && !e.hideLabel ? (A(), F("header", {
|
|
1829
1989
|
key: 0,
|
|
1830
1990
|
class: "ff-array-field-header",
|
|
1831
|
-
"data-testid": `ff-array-header-${
|
|
1991
|
+
"data-testid": `ff-array-header-${f.path.value}`
|
|
1832
1992
|
}, [
|
|
1833
|
-
|
|
1834
|
-
"data-testid": `ff-label-${
|
|
1835
|
-
"tooltip-attributes": n(
|
|
1836
|
-
}),
|
|
1837
|
-
default:
|
|
1838
|
-
C(
|
|
1839
|
-
label: n(
|
|
1993
|
+
L(fe, X({ class: "ff-array-field-label" }, n(m), {
|
|
1994
|
+
"data-testid": `ff-label-${f.path.value}`,
|
|
1995
|
+
"tooltip-attributes": n(m).labelAttributes.tooltipAttributes
|
|
1996
|
+
}), te({
|
|
1997
|
+
default: I(() => [
|
|
1998
|
+
C(P.$slots, "label", {
|
|
1999
|
+
label: n(m).label
|
|
1840
2000
|
}, () => [
|
|
1841
|
-
|
|
2001
|
+
ae(q(n(m).label), 1)
|
|
1842
2002
|
], !0)
|
|
1843
2003
|
]),
|
|
1844
2004
|
_: 2
|
|
1845
2005
|
}, [
|
|
1846
|
-
n(
|
|
2006
|
+
n(m).labelAttributes?.info || n(v) ? {
|
|
1847
2007
|
name: "tooltip",
|
|
1848
|
-
fn:
|
|
1849
|
-
C(
|
|
1850
|
-
n(
|
|
1851
|
-
n(
|
|
2008
|
+
fn: I(() => [
|
|
2009
|
+
C(P.$slots, "tooltip", {}, () => [
|
|
2010
|
+
n(v) ? (A(), F("p", Jn, q(n(v).tooltip), 1)) : O("", !0),
|
|
2011
|
+
n(m).labelAttributes?.info ? (A(), F("div", {
|
|
1852
2012
|
key: 1,
|
|
1853
2013
|
class: "ff-label-tooltip-info",
|
|
1854
|
-
innerHTML: n(
|
|
1855
|
-
}, null, 8,
|
|
2014
|
+
innerHTML: n(m).labelAttributes.info
|
|
2015
|
+
}, null, 8, Gn)) : O("", !0)
|
|
1856
2016
|
], !0)
|
|
1857
2017
|
]),
|
|
1858
2018
|
key: "0"
|
|
1859
2019
|
} : void 0
|
|
1860
2020
|
]), 1040, ["data-testid", "tooltip-attributes"]),
|
|
1861
|
-
e.appearance === "tabs" ? (
|
|
2021
|
+
e.appearance === "tabs" ? (A(), K(Ee, {
|
|
1862
2022
|
key: 0,
|
|
1863
2023
|
appearance: "tertiary",
|
|
1864
2024
|
"aria-label": w.value,
|
|
1865
|
-
"data-testid": `ff-add-item-btn-${
|
|
1866
|
-
disabled:
|
|
2025
|
+
"data-testid": `ff-add-item-btn-${f.path.value}`,
|
|
2026
|
+
disabled: b.value,
|
|
1867
2027
|
icon: "",
|
|
1868
|
-
onClick:
|
|
2028
|
+
onClick: T
|
|
1869
2029
|
}, {
|
|
1870
|
-
default:
|
|
1871
|
-
|
|
2030
|
+
default: I(() => [
|
|
2031
|
+
L(n(Ce))
|
|
1872
2032
|
]),
|
|
1873
2033
|
_: 1
|
|
1874
2034
|
}, 8, ["aria-label", "data-testid", "disabled"])) : O("", !0)
|
|
1875
|
-
], 8,
|
|
1876
|
-
|
|
2035
|
+
], 8, Wn)) : O("", !0),
|
|
2036
|
+
L(ve, {
|
|
2037
|
+
errors: f.ownFieldErrors?.value,
|
|
2038
|
+
path: f.path?.value
|
|
2039
|
+
}, null, 8, ["errors", "path"]),
|
|
2040
|
+
u.value !== "tabs" ? (A(), F(Q, { key: 1 }, [
|
|
1877
2041
|
me("div", {
|
|
1878
2042
|
class: "ff-array-field-container",
|
|
1879
|
-
"data-testid": `ff-array-basic-container-${
|
|
2043
|
+
"data-testid": `ff-array-basic-container-${f.path.value}`
|
|
1880
2044
|
}, [
|
|
1881
|
-
(
|
|
1882
|
-
key: n(
|
|
1883
|
-
class: xe(["ff-array-field-item", { "ff-array-field-item-card":
|
|
1884
|
-
"data-index":
|
|
1885
|
-
"data-testid": `ff-array-item-${
|
|
2045
|
+
(A(!0), F(Q, null, ie(p.value, (pe, W) => (A(), K(n($), {
|
|
2046
|
+
key: n(g)(pe, W),
|
|
2047
|
+
class: xe(["ff-array-field-item", { "ff-array-field-item-card": u.value === "card" }]),
|
|
2048
|
+
"data-index": W,
|
|
2049
|
+
"data-testid": `ff-array-item-${f.path.value}.${W}`
|
|
1886
2050
|
}, {
|
|
1887
|
-
default:
|
|
1888
|
-
me("div",
|
|
1889
|
-
|
|
2051
|
+
default: I(() => [
|
|
2052
|
+
me("div", Xn, [
|
|
2053
|
+
P.$slots.item ? C(P.$slots, "item", {
|
|
1890
2054
|
autofocus: !0,
|
|
1891
|
-
fieldName: String(
|
|
1892
|
-
index:
|
|
1893
|
-
}, void 0, !0, 0) :
|
|
2055
|
+
fieldName: String(W),
|
|
2056
|
+
index: W
|
|
2057
|
+
}, void 0, !0, 0) : h.value.type === "array" && h.value.elements.type === "string" ? (A(), K(Gt, {
|
|
1894
2058
|
key: 1,
|
|
1895
2059
|
autofocus: "",
|
|
1896
|
-
help: n(
|
|
1897
|
-
name: String(
|
|
1898
|
-
}, null, 8, ["help", "name"])) : (
|
|
2060
|
+
help: n(l)("tag_helper"),
|
|
2061
|
+
name: String(W)
|
|
2062
|
+
}, null, 8, ["help", "name"])) : (A(), K(Te, {
|
|
1899
2063
|
key: 2,
|
|
1900
2064
|
autofocus: "",
|
|
1901
|
-
name: String(
|
|
2065
|
+
name: String(W)
|
|
1902
2066
|
}, null, 8, ["name"]))
|
|
1903
2067
|
]),
|
|
1904
|
-
|
|
2068
|
+
L(ze, {
|
|
1905
2069
|
class: "ff-array-field-item-remove-tooltip",
|
|
1906
|
-
text: n(
|
|
2070
|
+
text: n(l)("actions.remove_entity", { entity: y.value })
|
|
1907
2071
|
}, {
|
|
1908
|
-
default:
|
|
1909
|
-
|
|
2072
|
+
default: I(() => [
|
|
2073
|
+
L(Ee, {
|
|
1910
2074
|
appearance: "tertiary",
|
|
1911
|
-
"aria-label": n(
|
|
2075
|
+
"aria-label": n(l)("actions.remove_entity", { entity: y.value }),
|
|
1912
2076
|
class: "ff-array-field-item-remove",
|
|
1913
|
-
"data-testid": `ff-array-remove-item-btn-${
|
|
1914
|
-
disabled:
|
|
2077
|
+
"data-testid": `ff-array-remove-item-btn-${f.path.value}.${W}`,
|
|
2078
|
+
disabled: b.value,
|
|
1915
2079
|
icon: "",
|
|
1916
|
-
onClick:
|
|
2080
|
+
onClick: Ke((Je) => S(W), ["stop"])
|
|
1917
2081
|
}, {
|
|
1918
|
-
default:
|
|
1919
|
-
|
|
2082
|
+
default: I(() => [
|
|
2083
|
+
L(n(lt))
|
|
1920
2084
|
]),
|
|
1921
2085
|
_: 1
|
|
1922
2086
|
}, 8, ["aria-label", "data-testid", "disabled", "onClick"])
|
|
@@ -1926,67 +2090,67 @@ const Ve = /* @__PURE__ */ J({
|
|
|
1926
2090
|
]),
|
|
1927
2091
|
_: 2
|
|
1928
2092
|
}, 1032, ["class", "data-index", "data-testid"]))), 128))
|
|
1929
|
-
], 8,
|
|
1930
|
-
|
|
2093
|
+
], 8, Yn),
|
|
2094
|
+
L(Ee, {
|
|
1931
2095
|
appearance: "tertiary",
|
|
1932
2096
|
"aria-label": w.value,
|
|
1933
2097
|
class: "ff-array-field-add-item-btn",
|
|
1934
|
-
"data-testid": `ff-add-item-btn-${
|
|
1935
|
-
disabled:
|
|
1936
|
-
onClick:
|
|
2098
|
+
"data-testid": `ff-add-item-btn-${f.path.value}`,
|
|
2099
|
+
disabled: b.value,
|
|
2100
|
+
onClick: T
|
|
1937
2101
|
}, {
|
|
1938
|
-
default:
|
|
1939
|
-
|
|
1940
|
-
|
|
2102
|
+
default: I(() => [
|
|
2103
|
+
L(n(Ce)),
|
|
2104
|
+
ae(" " + q(w.value), 1)
|
|
1941
2105
|
]),
|
|
1942
2106
|
_: 1
|
|
1943
2107
|
}, 8, ["aria-label", "data-testid", "disabled"])
|
|
1944
|
-
], 64)) :
|
|
2108
|
+
], 64)) : p.value.length ? (A(), K(n(Ze), {
|
|
1945
2109
|
key: 2,
|
|
1946
|
-
"data-testid": `ff-array-tab-container-${
|
|
2110
|
+
"data-testid": `ff-array-tab-container-${f.path.value}`
|
|
1947
2111
|
}, {
|
|
1948
|
-
default:
|
|
1949
|
-
|
|
1950
|
-
modelValue:
|
|
1951
|
-
"onUpdate:modelValue":
|
|
1952
|
-
"data-testid": `ff-array-tabs-${
|
|
1953
|
-
tabs:
|
|
1954
|
-
},
|
|
1955
|
-
|
|
1956
|
-
name: n(
|
|
1957
|
-
fn:
|
|
2112
|
+
default: I(() => [
|
|
2113
|
+
L(We, {
|
|
2114
|
+
modelValue: V.value,
|
|
2115
|
+
"onUpdate:modelValue": H[0] || (H[0] = (pe) => V.value = pe),
|
|
2116
|
+
"data-testid": `ff-array-tabs-${f.path.value}`,
|
|
2117
|
+
tabs: _.value
|
|
2118
|
+
}, te({ _: 2 }, [
|
|
2119
|
+
ie(p.value, (pe, W) => ({
|
|
2120
|
+
name: n(g)(pe, W),
|
|
2121
|
+
fn: I(() => [
|
|
1958
2122
|
me("div", {
|
|
1959
2123
|
class: "ff-array-field-item",
|
|
1960
|
-
"data-index":
|
|
1961
|
-
"data-testid": `ff-array-item-${
|
|
2124
|
+
"data-index": W,
|
|
2125
|
+
"data-testid": `ff-array-item-${f.path.value}.${W}`
|
|
1962
2126
|
}, [
|
|
1963
|
-
|
|
2127
|
+
P.$slots.item ? C(P.$slots, "item", {
|
|
1964
2128
|
autofocus: !0,
|
|
1965
|
-
fieldName: String(
|
|
1966
|
-
index:
|
|
1967
|
-
}, void 0, !0, 0) : (
|
|
2129
|
+
fieldName: String(W),
|
|
2130
|
+
index: W
|
|
2131
|
+
}, void 0, !0, 0) : (A(), K(Te, {
|
|
1968
2132
|
key: 1,
|
|
1969
2133
|
autofocus: "",
|
|
1970
|
-
name: String(
|
|
2134
|
+
name: String(W)
|
|
1971
2135
|
}, null, 8, ["name"]))
|
|
1972
|
-
], 8,
|
|
2136
|
+
], 8, Qn)
|
|
1973
2137
|
])
|
|
1974
2138
|
})),
|
|
1975
|
-
|
|
1976
|
-
name: `${n(
|
|
1977
|
-
fn:
|
|
1978
|
-
|
|
1979
|
-
|
|
2139
|
+
ie(p.value, (pe, W) => ({
|
|
2140
|
+
name: `${n(g)(pe, W)}-anchor`,
|
|
2141
|
+
fn: I(() => [
|
|
2142
|
+
ae(q(k(pe, W)) + " ", 1),
|
|
2143
|
+
L(Ee, {
|
|
1980
2144
|
appearance: "tertiary",
|
|
1981
|
-
"aria-label": n(
|
|
2145
|
+
"aria-label": n(l)("actions.remove_entity", { entity: y.value }),
|
|
1982
2146
|
class: "ff-array-field-item-remove",
|
|
1983
|
-
"data-testid": `ff-array-remove-item-btn-${
|
|
1984
|
-
disabled:
|
|
2147
|
+
"data-testid": `ff-array-remove-item-btn-${f.path.value}.${W}`,
|
|
2148
|
+
disabled: b.value,
|
|
1985
2149
|
icon: "",
|
|
1986
|
-
onClick:
|
|
2150
|
+
onClick: Ke((Je) => S(W), ["stop"])
|
|
1987
2151
|
}, {
|
|
1988
|
-
default:
|
|
1989
|
-
|
|
2152
|
+
default: I(() => [
|
|
2153
|
+
L(n($a))
|
|
1990
2154
|
]),
|
|
1991
2155
|
_: 1
|
|
1992
2156
|
}, 8, ["aria-label", "data-testid", "disabled", "onClick"])
|
|
@@ -1996,12 +2160,12 @@ const Ve = /* @__PURE__ */ J({
|
|
|
1996
2160
|
]),
|
|
1997
2161
|
_: 3
|
|
1998
2162
|
}, 8, ["data-testid"])) : O("", !0)
|
|
1999
|
-
], 10,
|
|
2000
|
-
[
|
|
2163
|
+
], 10, zn)), [
|
|
2164
|
+
[re, !n(s)]
|
|
2001
2165
|
]);
|
|
2002
2166
|
};
|
|
2003
2167
|
}
|
|
2004
|
-
}),
|
|
2168
|
+
}), er = /* @__PURE__ */ Z(Zn, [["__scopeId", "data-v-268aa3ba"]]), tr = /* @__PURE__ */ G({
|
|
2005
2169
|
__name: "SlideTransition",
|
|
2006
2170
|
setup(e) {
|
|
2007
2171
|
const a = [
|
|
@@ -2012,16 +2176,16 @@ const Ve = /* @__PURE__ */ J({
|
|
|
2012
2176
|
"margin-bottom",
|
|
2013
2177
|
"border-top-width",
|
|
2014
2178
|
"border-bottom-width"
|
|
2015
|
-
], t = Object.fromEntries(a.map((m) => [m, ""])),
|
|
2016
|
-
function
|
|
2017
|
-
const
|
|
2179
|
+
], t = Object.fromEntries(a.map((m) => [m, ""])), r = Object.fromEntries(a.map((m) => [m, "0"]));
|
|
2180
|
+
function l(m) {
|
|
2181
|
+
const b = getComputedStyle(m);
|
|
2018
2182
|
return Object.fromEntries(
|
|
2019
|
-
a.map((
|
|
2183
|
+
a.map((h) => [h, b.getPropertyValue(h)])
|
|
2020
2184
|
);
|
|
2021
2185
|
}
|
|
2022
|
-
function
|
|
2186
|
+
function c(m) {
|
|
2023
2187
|
["overflow", "transition", ...a].forEach(
|
|
2024
|
-
(
|
|
2188
|
+
(b) => m.style.removeProperty(b)
|
|
2025
2189
|
);
|
|
2026
2190
|
}
|
|
2027
2191
|
function o(m) {
|
|
@@ -2030,50 +2194,50 @@ const Ve = /* @__PURE__ */ J({
|
|
|
2030
2194
|
transition: "none"
|
|
2031
2195
|
});
|
|
2032
2196
|
}
|
|
2033
|
-
function
|
|
2034
|
-
const
|
|
2035
|
-
Object.assign(
|
|
2036
|
-
const
|
|
2037
|
-
Object.assign(
|
|
2038
|
-
Object.assign(
|
|
2039
|
-
...
|
|
2197
|
+
function d(m) {
|
|
2198
|
+
const b = m;
|
|
2199
|
+
Object.assign(b.style, t);
|
|
2200
|
+
const h = l(b);
|
|
2201
|
+
Object.assign(b.style, r), requestAnimationFrame(() => {
|
|
2202
|
+
Object.assign(b.style, {
|
|
2203
|
+
...h,
|
|
2040
2204
|
transition: ""
|
|
2041
2205
|
});
|
|
2042
2206
|
});
|
|
2043
2207
|
}
|
|
2044
|
-
function
|
|
2045
|
-
|
|
2208
|
+
function i(m) {
|
|
2209
|
+
c(m);
|
|
2046
2210
|
}
|
|
2047
2211
|
function s(m) {
|
|
2048
|
-
const
|
|
2049
|
-
Object.assign(
|
|
2050
|
-
...
|
|
2212
|
+
const b = m;
|
|
2213
|
+
Object.assign(b.style, {
|
|
2214
|
+
...l(b),
|
|
2051
2215
|
overflow: "hidden"
|
|
2052
2216
|
});
|
|
2053
2217
|
}
|
|
2054
|
-
function
|
|
2055
|
-
Object.assign(m.style,
|
|
2218
|
+
function v(m) {
|
|
2219
|
+
Object.assign(m.style, r);
|
|
2056
2220
|
}
|
|
2057
|
-
function
|
|
2058
|
-
|
|
2221
|
+
function f(m) {
|
|
2222
|
+
c(m);
|
|
2059
2223
|
}
|
|
2060
|
-
return (m,
|
|
2224
|
+
return (m, b) => (A(), K(ta, {
|
|
2061
2225
|
"enter-active-class": "ff-slide-active",
|
|
2062
2226
|
"leave-active-class": "ff-slide-active",
|
|
2063
|
-
onAfterEnter:
|
|
2064
|
-
onAfterLeave:
|
|
2227
|
+
onAfterEnter: i,
|
|
2228
|
+
onAfterLeave: f,
|
|
2065
2229
|
onBeforeEnter: o,
|
|
2066
2230
|
onBeforeLeave: s,
|
|
2067
|
-
onEnter:
|
|
2068
|
-
onLeave:
|
|
2231
|
+
onEnter: d,
|
|
2232
|
+
onLeave: v
|
|
2069
2233
|
}, {
|
|
2070
|
-
default:
|
|
2234
|
+
default: I(() => [
|
|
2071
2235
|
C(m.$slots, "default", {}, void 0, !0)
|
|
2072
2236
|
]),
|
|
2073
2237
|
_: 3
|
|
2074
2238
|
}));
|
|
2075
2239
|
}
|
|
2076
|
-
}),
|
|
2240
|
+
}), ar = /* @__PURE__ */ Z(tr, [["__scopeId", "data-v-d965bf05"]]), nr = { class: "ff-entity-checks-list" }, rr = ["data-testid", "onClick"], lr = /* @__PURE__ */ G({
|
|
2077
2241
|
__name: "EntityChecksAlert",
|
|
2078
2242
|
props: {
|
|
2079
2243
|
entityChecks: {},
|
|
@@ -2081,63 +2245,63 @@ const Ve = /* @__PURE__ */ J({
|
|
|
2081
2245
|
path: { default: "" }
|
|
2082
2246
|
},
|
|
2083
2247
|
setup(e) {
|
|
2084
|
-
const { i18nT: a } =
|
|
2085
|
-
function
|
|
2248
|
+
const { i18nT: a } = be(), t = Ut(), r = t?.reveal;
|
|
2249
|
+
function l(i) {
|
|
2086
2250
|
if (!t) return;
|
|
2087
|
-
const s = e.path ?
|
|
2088
|
-
t.reveal(
|
|
2251
|
+
const s = e.path ? Pe(ct(e.path, t.keyIdMap.getKey)) : [];
|
|
2252
|
+
t.reveal(ut([...s, ...N(i)]));
|
|
2089
2253
|
}
|
|
2090
|
-
const
|
|
2254
|
+
const c = [
|
|
2091
2255
|
{ key: "at_least_one_of", i18nKey: "field_rules.at_least_one_of" },
|
|
2092
2256
|
{ key: "mutually_required", i18nKey: "field_rules.mutually_required" },
|
|
2093
2257
|
{ key: "mutually_exclusive", i18nKey: "field_rules.mutually_exclusive" }
|
|
2094
|
-
], o =
|
|
2258
|
+
], o = E(() => {
|
|
2095
2259
|
if (!Array.isArray(e.entityChecks) || e.entityChecks.length === 0)
|
|
2096
2260
|
return null;
|
|
2097
|
-
const
|
|
2098
|
-
return e.entityChecks.forEach((s,
|
|
2099
|
-
for (const { key:
|
|
2100
|
-
if (
|
|
2101
|
-
const
|
|
2102
|
-
if (Array.isArray(
|
|
2103
|
-
const
|
|
2104
|
-
|
|
2261
|
+
const i = [];
|
|
2262
|
+
return e.entityChecks.forEach((s, v) => {
|
|
2263
|
+
for (const { key: f, i18nKey: m } of c)
|
|
2264
|
+
if (f in s) {
|
|
2265
|
+
const b = s[f];
|
|
2266
|
+
if (Array.isArray(b) && b.length > 0) {
|
|
2267
|
+
const h = d(b);
|
|
2268
|
+
h.length > 0 && i.push({ key: `${v}-${f}`, i18nKey: m, fields: h });
|
|
2105
2269
|
}
|
|
2106
2270
|
break;
|
|
2107
2271
|
}
|
|
2108
|
-
}),
|
|
2272
|
+
}), i.length ? i : null;
|
|
2109
2273
|
});
|
|
2110
|
-
function
|
|
2111
|
-
return Array.isArray(e.visibleFields) ?
|
|
2274
|
+
function d(i) {
|
|
2275
|
+
return Array.isArray(e.visibleFields) ? i.filter((s) => e.visibleFields.includes(s.split(".")[0])) : i;
|
|
2112
2276
|
}
|
|
2113
|
-
return (
|
|
2114
|
-
const
|
|
2115
|
-
return o.value ? (
|
|
2277
|
+
return (i, s) => {
|
|
2278
|
+
const v = J("KAlert");
|
|
2279
|
+
return o.value ? (A(), K(v, {
|
|
2116
2280
|
key: 0,
|
|
2117
2281
|
"data-testid": "ff-entity-checks-alert"
|
|
2118
2282
|
}, {
|
|
2119
|
-
default:
|
|
2120
|
-
me("ul",
|
|
2121
|
-
(
|
|
2122
|
-
key:
|
|
2283
|
+
default: I(() => [
|
|
2284
|
+
me("ul", nr, [
|
|
2285
|
+
(A(!0), F(Q, null, ie(o.value, (f) => (A(), F("li", {
|
|
2286
|
+
key: f.key,
|
|
2123
2287
|
"data-testid": "ff-entity-check-item"
|
|
2124
2288
|
}, [
|
|
2125
|
-
|
|
2126
|
-
keypath:
|
|
2289
|
+
L(n(a), {
|
|
2290
|
+
keypath: f.i18nKey
|
|
2127
2291
|
}, {
|
|
2128
|
-
parameters:
|
|
2129
|
-
(
|
|
2130
|
-
n(
|
|
2292
|
+
parameters: I(() => [
|
|
2293
|
+
(A(!0), F(Q, null, ie(f.fields, (m, b) => (A(), F(Q, { key: m }, [
|
|
2294
|
+
n(r) ? (A(), F("button", {
|
|
2131
2295
|
key: 0,
|
|
2132
2296
|
class: "ff-entity-check-field",
|
|
2133
2297
|
"data-testid": `ff-entity-check-field-${m}`,
|
|
2134
2298
|
type: "button",
|
|
2135
|
-
onClick: (
|
|
2136
|
-
}, q(n(
|
|
2137
|
-
|
|
2299
|
+
onClick: (h) => l(m)
|
|
2300
|
+
}, q(n(nt)(m)), 9, rr)) : (A(), F(Q, { key: 1 }, [
|
|
2301
|
+
ae(q(n(nt)(m)), 1)
|
|
2138
2302
|
], 64)),
|
|
2139
|
-
|
|
2140
|
-
|
|
2303
|
+
b < f.fields.length - 1 ? (A(), F(Q, { key: 2 }, [
|
|
2304
|
+
ae(q(", "))
|
|
2141
2305
|
], 64)) : O("", !0)
|
|
2142
2306
|
], 64))), 128))
|
|
2143
2307
|
]),
|
|
@@ -2150,16 +2314,16 @@ const Ve = /* @__PURE__ */ J({
|
|
|
2150
2314
|
})) : O("", !0);
|
|
2151
2315
|
};
|
|
2152
2316
|
}
|
|
2153
|
-
}),
|
|
2317
|
+
}), Vt = /* @__PURE__ */ Z(lr, [["__scopeId", "data-v-0b8046c8"]]), or = ["data-testid"], sr = ["data-testid"], ir = ["data-testid"], ur = { class: "ff-object-field-header-toggle" }, cr = ["aria-controls", "aria-expanded", "aria-label", "data-testid", "disabled"], dr = {
|
|
2154
2318
|
key: 0,
|
|
2155
2319
|
class: "ff-version-compatibility-note"
|
|
2156
|
-
},
|
|
2320
|
+
}, fr = ["innerHTML"], pr = ["data-testid"], mr = {
|
|
2157
2321
|
key: 0,
|
|
2158
2322
|
class: "indent-guide"
|
|
2159
|
-
},
|
|
2323
|
+
}, vr = /* @__PURE__ */ G({
|
|
2160
2324
|
inheritAttrs: !1,
|
|
2161
2325
|
__name: "ObjectField",
|
|
2162
|
-
props: /* @__PURE__ */
|
|
2326
|
+
props: /* @__PURE__ */ Xe({
|
|
2163
2327
|
name: {},
|
|
2164
2328
|
label: {},
|
|
2165
2329
|
labelAttributes: {},
|
|
@@ -2182,186 +2346,194 @@ const Ve = /* @__PURE__ */ J({
|
|
|
2182
2346
|
}),
|
|
2183
2347
|
emits: ["update:added", "update:expanded"],
|
|
2184
2348
|
setup(e) {
|
|
2185
|
-
const a =
|
|
2186
|
-
getSchema:
|
|
2187
|
-
getDefault:
|
|
2349
|
+
const a = aa(), t = ye(e, ["defaultAdded", "collapsible", "omit", "required", "asChild", "resetLabelPath", "fieldsOrder"]), { value: r, hide: l, versionInfo: c, ...o } = oe(z(t, "name")), {
|
|
2350
|
+
getSchema: d,
|
|
2351
|
+
getDefault: i,
|
|
2188
2352
|
useCurrentRenderRules: s
|
|
2189
|
-
} =
|
|
2353
|
+
} = le(), v = s({
|
|
2190
2354
|
fieldPath: o.path,
|
|
2191
|
-
rules:
|
|
2192
|
-
omittedFields:
|
|
2193
|
-
}),
|
|
2355
|
+
rules: z(t, "renderRules"),
|
|
2356
|
+
omittedFields: z(() => e.omit)
|
|
2357
|
+
}), f = Ye(e, "added"), m = Ye(e, "expanded"), b = E(() => !!c?.value), h = E(() => !b.value && !!m.value), y = E(() => {
|
|
2194
2358
|
if (o.ancestors?.value) {
|
|
2195
|
-
const
|
|
2196
|
-
if (
|
|
2197
|
-
return
|
|
2359
|
+
const S = o.ancestors.value.parent;
|
|
2360
|
+
if (S?.path)
|
|
2361
|
+
return d(S.path)?.type === "array";
|
|
2198
2362
|
}
|
|
2199
2363
|
return !1;
|
|
2200
|
-
}),
|
|
2364
|
+
}), w = E(() => {
|
|
2201
2365
|
if (o.ancestors?.value) {
|
|
2202
|
-
const
|
|
2203
|
-
if (
|
|
2204
|
-
return
|
|
2366
|
+
const S = o.ancestors.value.parent;
|
|
2367
|
+
if (S?.path)
|
|
2368
|
+
return d(S.path)?.type === "map";
|
|
2205
2369
|
}
|
|
2206
2370
|
return !1;
|
|
2207
|
-
}),
|
|
2208
|
-
let
|
|
2209
|
-
return e.omit && (
|
|
2210
|
-
}),
|
|
2211
|
-
function
|
|
2371
|
+
}), p = de(o.path, { required: e.required, ...t, resetLabelPath: e.resetLabelPath }), g = E(() => p.value.required ? !0 : f.value ?? e.defaultAdded), u = E(() => e.asChild !== void 0 ? e.asChild : y.value), $ = E(() => {
|
|
2372
|
+
let S = o.schema.value.fields;
|
|
2373
|
+
return e.omit && (S = S.filter((M) => !e.omit.includes(Object.keys(M)[0]))), e.fieldsOrder ? xt(S, e.fieldsOrder) : (v.value?.bundles && (S = Ct([...S], v.value.bundles)), S);
|
|
2374
|
+
}), k = E(() => $.value.map((S) => Object.keys(S)[0]));
|
|
2375
|
+
function _() {
|
|
2212
2376
|
m.value = !m.value;
|
|
2213
2377
|
}
|
|
2214
|
-
function S
|
|
2215
|
-
|
|
2378
|
+
function V(S) {
|
|
2379
|
+
S ? r.value = i(o.path.value) : r.value = o.emptyValue.value;
|
|
2216
2380
|
}
|
|
2217
|
-
|
|
2218
|
-
e.collapsible && (m.value =
|
|
2381
|
+
ee(g, (S) => {
|
|
2382
|
+
e.collapsible && (m.value = S);
|
|
2219
2383
|
});
|
|
2220
|
-
function T(
|
|
2221
|
-
!
|
|
2222
|
-
}
|
|
2223
|
-
return
|
|
2224
|
-
if (o.error || !
|
|
2225
|
-
const
|
|
2226
|
-
|
|
2227
|
-
}), (
|
|
2228
|
-
const
|
|
2229
|
-
return
|
|
2230
|
-
(
|
|
2231
|
-
o.error ? (
|
|
2384
|
+
function T(S) {
|
|
2385
|
+
!S || S === o.path.value || !g.value || b.value || (m.value = !0);
|
|
2386
|
+
}
|
|
2387
|
+
return ee(() => o.revealTarget?.value, T), na(() => {
|
|
2388
|
+
if (o.error || !r) return;
|
|
2389
|
+
const S = r.value != null;
|
|
2390
|
+
f.value = S, (p.value.required || S) && (m.value = !0), T(o.revealTarget?.value);
|
|
2391
|
+
}), (S, M) => {
|
|
2392
|
+
const j = J("KAlert"), x = J("KInputSwitch");
|
|
2393
|
+
return A(), F(Q, null, [
|
|
2394
|
+
(A(), K(ue(S.$slots[n(Oe)]))),
|
|
2395
|
+
o.error ? (A(), K(j, {
|
|
2232
2396
|
key: 0,
|
|
2233
2397
|
appearance: "danger",
|
|
2234
2398
|
message: o.error.message
|
|
2235
|
-
}, null, 8, ["message"])) :
|
|
2399
|
+
}, null, 8, ["message"])) : u.value ? ne((A(), F("div", X({
|
|
2236
2400
|
key: 1,
|
|
2237
2401
|
class: "ff-object-field ff-object-field-as-child"
|
|
2238
|
-
},
|
|
2402
|
+
}, S.$attrs, {
|
|
2239
2403
|
"data-testid": `ff-object-${o.path.value}`
|
|
2240
2404
|
}), [
|
|
2241
|
-
|
|
2242
|
-
|
|
2405
|
+
L(ve, {
|
|
2406
|
+
errors: o.ownFieldErrors?.value,
|
|
2407
|
+
path: o.path?.value
|
|
2408
|
+
}, null, 8, ["errors", "path"]),
|
|
2409
|
+
C(S.$slots, "default", {}, () => [
|
|
2410
|
+
L(Vt, {
|
|
2243
2411
|
"entity-checks": o.schema.value?.entity_checks,
|
|
2244
2412
|
path: o.path.value,
|
|
2245
|
-
"visible-fields":
|
|
2413
|
+
"visible-fields": k.value
|
|
2246
2414
|
}, null, 8, ["entity-checks", "path", "visible-fields"]),
|
|
2247
|
-
(
|
|
2248
|
-
key: Object.keys(
|
|
2249
|
-
name: Object.keys(
|
|
2415
|
+
(A(!0), F(Q, null, ie($.value, (U) => (A(), K(Te, {
|
|
2416
|
+
key: Object.keys(U)[0],
|
|
2417
|
+
name: Object.keys(U)[0]
|
|
2250
2418
|
}, null, 8, ["name"]))), 128))
|
|
2251
2419
|
], !0)
|
|
2252
|
-
], 16,
|
|
2253
|
-
[
|
|
2254
|
-
]) :
|
|
2420
|
+
], 16, or)), [
|
|
2421
|
+
[re, !n(l)]
|
|
2422
|
+
]) : ne((A(), F("div", X({
|
|
2255
2423
|
key: 2,
|
|
2256
|
-
class: ["ff-object-field", { "ff-object-field-collapsed": !
|
|
2424
|
+
class: ["ff-object-field", { "ff-object-field-collapsed": !h.value }],
|
|
2257
2425
|
"data-testid": `ff-object-${o.path.value}`
|
|
2258
|
-
},
|
|
2426
|
+
}, S.$attrs), [
|
|
2259
2427
|
me("header", {
|
|
2260
2428
|
class: "ff-object-field-header",
|
|
2261
2429
|
"data-testid": `ff-object-header-${o.path.value}`
|
|
2262
2430
|
}, [
|
|
2263
|
-
me("div",
|
|
2431
|
+
me("div", ur, [
|
|
2264
2432
|
me("button", {
|
|
2265
2433
|
"aria-controls": n(a),
|
|
2266
|
-
"aria-expanded":
|
|
2267
|
-
"aria-label": n(
|
|
2434
|
+
"aria-expanded": h.value,
|
|
2435
|
+
"aria-label": n(p).label,
|
|
2268
2436
|
class: "ff-object-field-toggle-btn",
|
|
2269
2437
|
"data-testid": `ff-object-toggle-btn-${o.path.value}`,
|
|
2270
|
-
disabled: !
|
|
2271
|
-
style:
|
|
2438
|
+
disabled: !g.value || b.value,
|
|
2439
|
+
style: ra({ visibility: g.value ? void 0 : "hidden" }),
|
|
2272
2440
|
type: "button",
|
|
2273
|
-
onClick:
|
|
2441
|
+
onClick: Ke(_, ["prevent", "stop"])
|
|
2274
2442
|
}, [
|
|
2275
|
-
|
|
2276
|
-
class: xe(["ff-object-field-toggle-btn-trigger-icon", { "collapse-expanded":
|
|
2443
|
+
L(n(Aa), {
|
|
2444
|
+
class: xe(["ff-object-field-toggle-btn-trigger-icon", { "collapse-expanded": h.value }]),
|
|
2277
2445
|
"data-testid": `ff-object-toggle-trigger-icon-${o.path.value}`,
|
|
2278
2446
|
decorative: "",
|
|
2279
|
-
size: `var(--kui-icon-size-30, ${n(
|
|
2447
|
+
size: `var(--kui-icon-size-30, ${n(Ea)})`
|
|
2280
2448
|
}, null, 8, ["class", "data-testid", "size"])
|
|
2281
|
-
], 12,
|
|
2282
|
-
|
|
2449
|
+
], 12, cr),
|
|
2450
|
+
w.value ? O("", !0) : (A(), K(n(ha), X({
|
|
2283
2451
|
key: 0,
|
|
2284
2452
|
class: "ff-object-field-label",
|
|
2285
2453
|
"data-testid": `ff-label-${o.path.value}`
|
|
2286
2454
|
}, {
|
|
2287
|
-
...n(
|
|
2455
|
+
...n(p),
|
|
2288
2456
|
required: !1
|
|
2289
2457
|
}, {
|
|
2290
|
-
"tooltip-attributes": n(
|
|
2291
|
-
onClick:
|
|
2292
|
-
}),
|
|
2293
|
-
default:
|
|
2294
|
-
C(
|
|
2295
|
-
label: n(
|
|
2458
|
+
"tooltip-attributes": n(p).labelAttributes.tooltipAttributes,
|
|
2459
|
+
onClick: Ke(_, ["prevent", "stop"])
|
|
2460
|
+
}), te({
|
|
2461
|
+
default: I(() => [
|
|
2462
|
+
C(S.$slots, "label", {
|
|
2463
|
+
label: n(p).label
|
|
2296
2464
|
}, () => [
|
|
2297
|
-
|
|
2465
|
+
ae(q(n(p).label), 1)
|
|
2298
2466
|
], !0)
|
|
2299
2467
|
]),
|
|
2300
2468
|
_: 2
|
|
2301
2469
|
}, [
|
|
2302
|
-
n(
|
|
2470
|
+
n(p).labelAttributes?.info || n(c) ? {
|
|
2303
2471
|
name: "tooltip",
|
|
2304
|
-
fn:
|
|
2305
|
-
C(
|
|
2306
|
-
n(
|
|
2307
|
-
n(
|
|
2472
|
+
fn: I(() => [
|
|
2473
|
+
C(S.$slots, "tooltip", {}, () => [
|
|
2474
|
+
n(c) ? (A(), F("p", dr, q(n(c).tooltip), 1)) : O("", !0),
|
|
2475
|
+
n(p).labelAttributes?.info ? (A(), F("div", {
|
|
2308
2476
|
key: 1,
|
|
2309
2477
|
class: "ff-label-tooltip-info",
|
|
2310
|
-
innerHTML: n(
|
|
2311
|
-
}, null, 8,
|
|
2478
|
+
innerHTML: n(p).labelAttributes.info
|
|
2479
|
+
}, null, 8, fr)) : O("", !0)
|
|
2312
2480
|
], !0)
|
|
2313
2481
|
]),
|
|
2314
2482
|
key: "0"
|
|
2315
2483
|
} : void 0
|
|
2316
2484
|
]), 1040, ["data-testid", "tooltip-attributes"]))
|
|
2317
2485
|
]),
|
|
2318
|
-
n(
|
|
2486
|
+
n(p).required ? O("", !0) : (A(), K(x, {
|
|
2319
2487
|
key: 0,
|
|
2320
2488
|
"data-testid": `ff-object-switch-${o.path.value}`,
|
|
2321
|
-
disabled:
|
|
2322
|
-
"disabled-tooltip-text": n(
|
|
2323
|
-
"model-value":
|
|
2324
|
-
"onUpdate:modelValue": M[0] || (M[0] = (
|
|
2325
|
-
|
|
2489
|
+
disabled: b.value,
|
|
2490
|
+
"disabled-tooltip-text": n(c)?.tooltip,
|
|
2491
|
+
"model-value": f.value,
|
|
2492
|
+
"onUpdate:modelValue": M[0] || (M[0] = (U) => {
|
|
2493
|
+
f.value = U, V(U);
|
|
2326
2494
|
})
|
|
2327
2495
|
}, null, 8, ["data-testid", "disabled", "disabled-tooltip-text", "model-value"]))
|
|
2328
|
-
], 8,
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2496
|
+
], 8, ir),
|
|
2497
|
+
L(ve, {
|
|
2498
|
+
errors: o.ownFieldErrors?.value,
|
|
2499
|
+
path: o.path?.value
|
|
2500
|
+
}, null, 8, ["errors", "path"]),
|
|
2501
|
+
L(ar, null, {
|
|
2502
|
+
default: I(() => [
|
|
2503
|
+
h.value ? (A(), F("div", {
|
|
2332
2504
|
key: 0,
|
|
2333
2505
|
class: "ff-object-field-content",
|
|
2334
2506
|
"data-testid": `ff-object-content-${o.path.value}`
|
|
2335
2507
|
}, [
|
|
2336
|
-
C(
|
|
2337
|
-
|
|
2508
|
+
C(S.$slots, "default", {}, () => [
|
|
2509
|
+
L(Vt, {
|
|
2338
2510
|
"entity-checks": o.schema.value?.entity_checks,
|
|
2339
2511
|
path: o.path.value,
|
|
2340
|
-
"visible-fields":
|
|
2512
|
+
"visible-fields": k.value
|
|
2341
2513
|
}, null, 8, ["entity-checks", "path", "visible-fields"]),
|
|
2342
|
-
(
|
|
2343
|
-
key: Object.keys(
|
|
2344
|
-
name: Object.keys(
|
|
2514
|
+
(A(!0), F(Q, null, ie($.value, (U) => (A(), K(Te, {
|
|
2515
|
+
key: Object.keys(U)[0],
|
|
2516
|
+
name: Object.keys(U)[0]
|
|
2345
2517
|
}, null, 8, ["name"]))), 128))
|
|
2346
2518
|
], !0)
|
|
2347
|
-
], 8,
|
|
2519
|
+
], 8, pr)) : O("", !0)
|
|
2348
2520
|
]),
|
|
2349
2521
|
_: 3
|
|
2350
2522
|
}),
|
|
2351
|
-
|
|
2352
|
-
], 16,
|
|
2353
|
-
[
|
|
2523
|
+
h.value ? (A(), F("div", mr)) : O("", !0)
|
|
2524
|
+
], 16, sr)), [
|
|
2525
|
+
[re, !n(l)]
|
|
2354
2526
|
])
|
|
2355
2527
|
], 64);
|
|
2356
2528
|
};
|
|
2357
2529
|
}
|
|
2358
|
-
}),
|
|
2530
|
+
}), hr = /* @__PURE__ */ Z(vr, [["__scopeId", "data-v-7c96d99c"]]), yr = {
|
|
2359
2531
|
key: 1,
|
|
2360
2532
|
class: "ff-number-field-wrapper"
|
|
2361
|
-
},
|
|
2533
|
+
}, br = {
|
|
2362
2534
|
key: 0,
|
|
2363
2535
|
class: "ff-version-compatibility-note"
|
|
2364
|
-
},
|
|
2536
|
+
}, gr = ["innerHTML"], kr = /* @__PURE__ */ G({
|
|
2365
2537
|
__name: "NumberField",
|
|
2366
2538
|
props: {
|
|
2367
2539
|
showVaultSecretPicker: { type: Boolean, default: () => {
|
|
@@ -2385,114 +2557,119 @@ const Ve = /* @__PURE__ */ J({
|
|
|
2385
2557
|
},
|
|
2386
2558
|
emits: ["update:modelValue"],
|
|
2387
2559
|
setup(e, { emit: a }) {
|
|
2388
|
-
const t =
|
|
2389
|
-
const
|
|
2390
|
-
if (typeof
|
|
2391
|
-
return { min:
|
|
2392
|
-
const [
|
|
2560
|
+
const t = ye(e, ["autofocus", "showVaultSecretPicker", "expressionEditor", "name"]), { value: r, hide: l, versionInfo: c, ...o } = oe(z(() => e.name)), d = de(o.path, t), i = E(() => !!t.disabled || !!c?.value), s = E(() => Ve(o.path?.value ?? "")), { i18n: v } = be(), f = E(() => {
|
|
2561
|
+
const k = o.schema?.value;
|
|
2562
|
+
if (typeof k.gt == "number")
|
|
2563
|
+
return { min: k.type === "integer" ? k.gt + 1 : k.gt };
|
|
2564
|
+
const [_, V] = k.between ?? [];
|
|
2393
2565
|
return {
|
|
2394
|
-
min: t.min ??
|
|
2395
|
-
max: t.max ??
|
|
2566
|
+
min: t.min ?? _,
|
|
2567
|
+
max: t.max ?? V
|
|
2396
2568
|
};
|
|
2397
|
-
}), m = a,
|
|
2398
|
-
const
|
|
2399
|
-
if (
|
|
2400
|
-
if (
|
|
2401
|
-
const
|
|
2402
|
-
return Number.isFinite(
|
|
2569
|
+
}), m = a, b = r.value, h = E(() => {
|
|
2570
|
+
const k = r?.value;
|
|
2571
|
+
if (k == null || k === "") return "";
|
|
2572
|
+
if (u.value) return `${k}`;
|
|
2573
|
+
const _ = typeof k == "number" ? k : Number(k);
|
|
2574
|
+
return Number.isFinite(_) ? `${_}` : "";
|
|
2403
2575
|
});
|
|
2404
|
-
function
|
|
2405
|
-
const
|
|
2406
|
-
|
|
2407
|
-
}
|
|
2408
|
-
function
|
|
2409
|
-
if (
|
|
2410
|
-
const
|
|
2411
|
-
if (
|
|
2412
|
-
const
|
|
2413
|
-
return Number.isFinite(
|
|
2414
|
-
}
|
|
2415
|
-
const
|
|
2416
|
-
return (
|
|
2417
|
-
const
|
|
2418
|
-
return o.error ? (
|
|
2576
|
+
function y(k) {
|
|
2577
|
+
const _ = w(k);
|
|
2578
|
+
b !== void 0 && k === "" && _ !== b ? (r.value = o.emptyValue.value, m("update:modelValue", o.emptyValue.value)) : (r.value = _, m("update:modelValue", _));
|
|
2579
|
+
}
|
|
2580
|
+
function w(k) {
|
|
2581
|
+
if (k === "") return o.emptyValue.value;
|
|
2582
|
+
const _ = k.trim();
|
|
2583
|
+
if (_ === "") return o.emptyValue.value;
|
|
2584
|
+
const V = Number(_);
|
|
2585
|
+
return Number.isFinite(V) ? V : u.value ? k : o.emptyValue.value;
|
|
2586
|
+
}
|
|
2587
|
+
const p = Se(Ot, void 0), g = E(() => ({ referenceable: u.value })), u = E(() => e.showVaultSecretPicker !== void 0 ? e.showVaultSecretPicker : !!o.schema.value?.referenceable), $ = E(() => u.value ? "text" : "number");
|
|
2588
|
+
return (k, _) => {
|
|
2589
|
+
const V = J("KAlert");
|
|
2590
|
+
return o.error ? (A(), K(V, {
|
|
2419
2591
|
key: 0,
|
|
2420
2592
|
appearance: "danger",
|
|
2421
2593
|
message: o.error.message
|
|
2422
|
-
}, null, 8, ["message"])) :
|
|
2423
|
-
|
|
2424
|
-
...n(
|
|
2425
|
-
min:
|
|
2426
|
-
max:
|
|
2594
|
+
}, null, 8, ["message"])) : ne((A(), F("div", yr, [
|
|
2595
|
+
L(Fe, X({ class: "ff-number-field" }, {
|
|
2596
|
+
...n(d),
|
|
2597
|
+
min: f.value.min,
|
|
2598
|
+
max: f.value.max
|
|
2427
2599
|
}, {
|
|
2428
2600
|
"data-autofocus": e.autofocus ? "true" : void 0,
|
|
2429
2601
|
"data-testid": `ff-${o.path.value}`,
|
|
2430
|
-
disabled:
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2602
|
+
disabled: i.value,
|
|
2603
|
+
error: e.error || !!o.fieldErrors?.value.length,
|
|
2604
|
+
"model-value": h.value,
|
|
2605
|
+
type: $.value,
|
|
2606
|
+
"onUpdate:modelValue": y
|
|
2607
|
+
}), te({ _: 2 }, [
|
|
2608
|
+
k.$slots.label ? {
|
|
2436
2609
|
name: "label",
|
|
2437
|
-
fn:
|
|
2438
|
-
C(
|
|
2439
|
-
label: n(
|
|
2610
|
+
fn: I(() => [
|
|
2611
|
+
C(k.$slots, "label", {
|
|
2612
|
+
label: n(d).label
|
|
2440
2613
|
}, void 0, !0)
|
|
2441
2614
|
]),
|
|
2442
2615
|
key: "0"
|
|
2443
2616
|
} : void 0,
|
|
2444
|
-
n(
|
|
2617
|
+
n(d).labelAttributes?.info || n(c) ? {
|
|
2445
2618
|
name: "label-tooltip",
|
|
2446
|
-
fn:
|
|
2447
|
-
C(
|
|
2448
|
-
n(
|
|
2449
|
-
n(
|
|
2619
|
+
fn: I(() => [
|
|
2620
|
+
C(k.$slots, "tooltip", {}, () => [
|
|
2621
|
+
n(c) ? (A(), F("p", br, q(n(c).tooltip), 1)) : O("", !0),
|
|
2622
|
+
n(d).labelAttributes?.info ? (A(), F("div", {
|
|
2450
2623
|
key: 1,
|
|
2451
2624
|
class: "ff-label-tooltip-info",
|
|
2452
|
-
innerHTML: n(
|
|
2453
|
-
}, null, 8,
|
|
2625
|
+
innerHTML: n(d).labelAttributes.info
|
|
2626
|
+
}, null, 8, gr)) : O("", !0)
|
|
2454
2627
|
], !0)
|
|
2455
2628
|
]),
|
|
2456
2629
|
key: "1"
|
|
2457
2630
|
} : void 0
|
|
2458
|
-
]), 1040, ["data-autofocus", "data-testid", "disabled", "model-value", "type"]),
|
|
2459
|
-
|
|
2631
|
+
]), 1040, ["data-autofocus", "data-testid", "disabled", "error", "model-value", "type"]),
|
|
2632
|
+
L(ve, {
|
|
2633
|
+
errors: o.fieldErrors?.value,
|
|
2634
|
+
path: o.path?.value
|
|
2635
|
+
}, null, 8, ["errors", "path"]),
|
|
2636
|
+
n(p) && u.value ? (A(), K(ue(n(p)), {
|
|
2460
2637
|
key: 0,
|
|
2461
|
-
disabled:
|
|
2462
|
-
schema:
|
|
2463
|
-
update:
|
|
2464
|
-
value: n(
|
|
2638
|
+
disabled: i.value,
|
|
2639
|
+
schema: g.value,
|
|
2640
|
+
update: y,
|
|
2641
|
+
value: n(r) ?? ""
|
|
2465
2642
|
}, null, 8, ["disabled", "schema", "value"])) : O("", !0),
|
|
2466
|
-
|
|
2643
|
+
u.value && !n(p) ? (A(), K(V, {
|
|
2467
2644
|
key: 1,
|
|
2468
2645
|
appearance: "warning",
|
|
2469
2646
|
"data-testid": `ff-vault-secret-picker-warning-${o.path.value}`,
|
|
2470
|
-
message: n(
|
|
2647
|
+
message: n(v).t("vault_picker.component_error")
|
|
2471
2648
|
}, null, 8, ["data-testid", "message"])) : O("", !0),
|
|
2472
|
-
e.expressionEditor !== !1 ? (
|
|
2649
|
+
e.expressionEditor !== !1 ? (A(), K(Jt, X({
|
|
2473
2650
|
key: 2,
|
|
2474
2651
|
class: "ff-number-field-expression",
|
|
2475
2652
|
name: s.value
|
|
2476
|
-
}, e.expressionEditor || {}),
|
|
2477
|
-
|
|
2653
|
+
}, e.expressionEditor || {}), te({ _: 2 }, [
|
|
2654
|
+
k.$slots["expression-help"] ? {
|
|
2478
2655
|
name: "help",
|
|
2479
|
-
fn:
|
|
2480
|
-
C(
|
|
2656
|
+
fn: I(() => [
|
|
2657
|
+
C(k.$slots, "expression-help", {}, void 0, !0)
|
|
2481
2658
|
]),
|
|
2482
2659
|
key: "0"
|
|
2483
2660
|
} : void 0
|
|
2484
2661
|
]), 1040, ["name"])) : O("", !0)
|
|
2485
2662
|
], 512)), [
|
|
2486
|
-
[
|
|
2663
|
+
[re, !n(l)]
|
|
2487
2664
|
]);
|
|
2488
2665
|
};
|
|
2489
2666
|
}
|
|
2490
|
-
}),
|
|
2667
|
+
}), $r = /* @__PURE__ */ Z(kr, [["__scopeId", "data-v-4185e5a4"]]), Ar = {
|
|
2491
2668
|
key: 0,
|
|
2492
2669
|
class: "ff-version-compatibility-note"
|
|
2493
|
-
},
|
|
2670
|
+
}, Er = ["innerHTML"], _r = /* @__PURE__ */ G({
|
|
2494
2671
|
__name: "EnumField",
|
|
2495
|
-
props: /* @__PURE__ */
|
|
2672
|
+
props: /* @__PURE__ */ Xe({
|
|
2496
2673
|
labelAttributes: {},
|
|
2497
2674
|
items: {},
|
|
2498
2675
|
placeholder: {},
|
|
@@ -2527,77 +2704,79 @@ const Ve = /* @__PURE__ */ J({
|
|
|
2527
2704
|
},
|
|
2528
2705
|
modelModifiers: {}
|
|
2529
2706
|
}),
|
|
2530
|
-
emits: /* @__PURE__ */
|
|
2707
|
+
emits: /* @__PURE__ */ Xe(["update"], ["update:modelValue"]),
|
|
2531
2708
|
setup(e, { emit: a }) {
|
|
2532
|
-
const t = a,
|
|
2533
|
-
|
|
2534
|
-
), s =
|
|
2535
|
-
function
|
|
2536
|
-
if (s.value.required) return
|
|
2537
|
-
const
|
|
2538
|
-
return
|
|
2539
|
-
}
|
|
2540
|
-
const
|
|
2709
|
+
const t = a, r = ye(e, ["name", "items", "multiple", "autofocus"]), { getSelectItems: l } = le(), { value: c, hide: o, versionInfo: d, ...i } = oe(
|
|
2710
|
+
z(() => e.name)
|
|
2711
|
+
), s = de(i.path, r), v = E(() => r.disabled || !!d?.value), f = E(() => !!r.error || !!i.fieldErrors?.value.length), m = E(() => i.fieldErrorMessage?.value || r.help);
|
|
2712
|
+
function b(u) {
|
|
2713
|
+
if (s.value.required) return u;
|
|
2714
|
+
const $ = p.value && Array.isArray(u) && u.length === 0;
|
|
2715
|
+
return u == null || u === "" || $ ? i.emptyValue.value : u;
|
|
2716
|
+
}
|
|
2717
|
+
const h = Ye(e, "modelValue", {
|
|
2541
2718
|
// If multiple and value is null/undefined, return empty array for v-model
|
|
2542
|
-
get: () =>
|
|
2543
|
-
set: (
|
|
2544
|
-
|
|
2719
|
+
get: () => p.value && c?.value == null ? [] : c.value,
|
|
2720
|
+
set: (u) => {
|
|
2721
|
+
c.value = b(u);
|
|
2545
2722
|
}
|
|
2546
|
-
}),
|
|
2547
|
-
return (
|
|
2548
|
-
const
|
|
2549
|
-
return
|
|
2723
|
+
}), y = E(() => e.items ? e.items : i.path ? l(i.path.value) : []), w = E(() => y.value.some((u) => u.versionInfo)), p = E(() => e.multiple !== void 0 ? e.multiple : i.schema.value?.type === "set"), g = E(() => p.value ? ya : ba);
|
|
2724
|
+
return (u, $) => {
|
|
2725
|
+
const k = J("KAlert");
|
|
2726
|
+
return i.error ? (A(), K(k, {
|
|
2550
2727
|
key: 0,
|
|
2551
2728
|
appearance: "danger",
|
|
2552
|
-
message:
|
|
2553
|
-
}, null, 8, ["message"])) :
|
|
2554
|
-
modelValue:
|
|
2729
|
+
message: i.error.message
|
|
2730
|
+
}, null, 8, ["message"])) : ne((A(), K(n(g), X({ key: 1 }, { ...r, ...n(s) }, {
|
|
2731
|
+
modelValue: h.value,
|
|
2555
2732
|
"onUpdate:modelValue": [
|
|
2556
|
-
|
|
2557
|
-
|
|
2733
|
+
$[0] || ($[0] = (_) => h.value = _),
|
|
2734
|
+
$[1] || ($[1] = (_) => t("update", b(_)))
|
|
2558
2735
|
],
|
|
2559
2736
|
class: "ff-enum-field",
|
|
2560
2737
|
clearable: !n(s).required,
|
|
2561
2738
|
"data-autofocus": e.autofocus ? "true" : void 0,
|
|
2562
|
-
"data-testid": `ff-${
|
|
2563
|
-
disabled:
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2739
|
+
"data-testid": `ff-${i.path.value}`,
|
|
2740
|
+
disabled: v.value,
|
|
2741
|
+
error: f.value,
|
|
2742
|
+
help: m.value,
|
|
2743
|
+
items: y.value,
|
|
2744
|
+
"kpop-attributes": { "data-testid": `ff-enum-${i.path.value}-items` }
|
|
2745
|
+
}), te({ _: 2 }, [
|
|
2746
|
+
u.$slots.label ? {
|
|
2568
2747
|
name: "label",
|
|
2569
|
-
fn:
|
|
2570
|
-
C(
|
|
2748
|
+
fn: I(() => [
|
|
2749
|
+
C(u.$slots, "label", {
|
|
2571
2750
|
label: n(s).label
|
|
2572
2751
|
}, void 0, !0)
|
|
2573
2752
|
]),
|
|
2574
2753
|
key: "0"
|
|
2575
2754
|
} : void 0,
|
|
2576
|
-
"tooltip" in
|
|
2755
|
+
"tooltip" in u.$slots || n(s).labelAttributes?.info || n(d) ? {
|
|
2577
2756
|
name: "label-tooltip",
|
|
2578
|
-
fn:
|
|
2579
|
-
C(
|
|
2580
|
-
n(
|
|
2581
|
-
n(s).labelAttributes?.info ? (
|
|
2757
|
+
fn: I(() => [
|
|
2758
|
+
C(u.$slots, "tooltip", {}, () => [
|
|
2759
|
+
n(d) ? (A(), F("p", Ar, q(n(d).tooltip), 1)) : O("", !0),
|
|
2760
|
+
n(s).labelAttributes?.info ? (A(), F("div", {
|
|
2582
2761
|
key: 1,
|
|
2583
2762
|
class: "ff-label-tooltip-info",
|
|
2584
2763
|
innerHTML: n(s).labelAttributes.info
|
|
2585
|
-
}, null, 8,
|
|
2764
|
+
}, null, 8, Er)) : O("", !0)
|
|
2586
2765
|
], !0)
|
|
2587
2766
|
]),
|
|
2588
2767
|
key: "1"
|
|
2589
2768
|
} : void 0,
|
|
2590
|
-
|
|
2769
|
+
u.$slots["item-label"] || w.value ? {
|
|
2591
2770
|
name: "item-template",
|
|
2592
|
-
fn:
|
|
2593
|
-
C(
|
|
2594
|
-
|
|
2595
|
-
"kpop-attributes": { "data-testid": `ff-version-tooltip-item-${
|
|
2771
|
+
fn: I(({ item: _ }) => [
|
|
2772
|
+
C(u.$slots, "item-label", rt(Pt(_)), () => [
|
|
2773
|
+
L(n(Lt), {
|
|
2774
|
+
"kpop-attributes": { "data-testid": `ff-version-tooltip-item-${_.value}` },
|
|
2596
2775
|
"max-width": "400px",
|
|
2597
|
-
text:
|
|
2776
|
+
text: _.versionInfo?.tooltip ?? ""
|
|
2598
2777
|
}, {
|
|
2599
|
-
default:
|
|
2600
|
-
|
|
2778
|
+
default: I(() => [
|
|
2779
|
+
ae(q(_.label), 1)
|
|
2601
2780
|
]),
|
|
2602
2781
|
_: 2
|
|
2603
2782
|
}, 1032, ["kpop-attributes", "text"])
|
|
@@ -2605,22 +2784,22 @@ const Ve = /* @__PURE__ */ J({
|
|
|
2605
2784
|
]),
|
|
2606
2785
|
key: "2"
|
|
2607
2786
|
} : void 0,
|
|
2608
|
-
|
|
2787
|
+
u.$slots["dropdown-footer-text"] ? {
|
|
2609
2788
|
name: "dropdown-footer-text",
|
|
2610
|
-
fn:
|
|
2611
|
-
C(
|
|
2789
|
+
fn: I(() => [
|
|
2790
|
+
C(u.$slots, "dropdown-footer-text", {}, void 0, !0)
|
|
2612
2791
|
]),
|
|
2613
2792
|
key: "3"
|
|
2614
2793
|
} : void 0
|
|
2615
|
-
]), 1040, ["modelValue", "clearable", "data-autofocus", "data-testid", "disabled", "items", "kpop-attributes"])), [
|
|
2616
|
-
[
|
|
2794
|
+
]), 1040, ["modelValue", "clearable", "data-autofocus", "data-testid", "disabled", "error", "help", "items", "kpop-attributes"])), [
|
|
2795
|
+
[re, !n(o)]
|
|
2617
2796
|
]);
|
|
2618
2797
|
};
|
|
2619
2798
|
}
|
|
2620
|
-
}),
|
|
2799
|
+
}), Re = /* @__PURE__ */ Z(_r, [["__scopeId", "data-v-f5e7446f"]]), wr = ["data-testid"], Sr = {
|
|
2621
2800
|
key: 0,
|
|
2622
2801
|
class: "ff-version-compatibility-note"
|
|
2623
|
-
},
|
|
2802
|
+
}, Vr = ["innerHTML"], Tr = /* @__PURE__ */ G({
|
|
2624
2803
|
inheritAttrs: !1,
|
|
2625
2804
|
__name: "JsonField",
|
|
2626
2805
|
props: {
|
|
@@ -2630,82 +2809,87 @@ const Ve = /* @__PURE__ */ J({
|
|
|
2630
2809
|
},
|
|
2631
2810
|
emits: ["update:modelValue"],
|
|
2632
2811
|
setup(e, { emit: a }) {
|
|
2633
|
-
const t =
|
|
2634
|
-
function m(
|
|
2635
|
-
|
|
2636
|
-
let
|
|
2812
|
+
const t = $e(), r = ye(e, ["autofocus", "name"]), l = a, { value: c, hide: o, versionInfo: d, ...i } = oe(z(() => e.name)), s = de(i.path, z({ ...r, ...t })), v = E(() => !!t.disabled || !!d?.value), f = ce("");
|
|
2813
|
+
function m(h) {
|
|
2814
|
+
f.value = h;
|
|
2815
|
+
let y = h === "" ? i.emptyValue.value : h;
|
|
2637
2816
|
try {
|
|
2638
|
-
const
|
|
2639
|
-
|
|
2817
|
+
const w = JSON.parse(h);
|
|
2818
|
+
w && typeof w == "object" && (y = w);
|
|
2640
2819
|
} catch {
|
|
2641
2820
|
}
|
|
2642
|
-
|
|
2821
|
+
c.value = y, l("update:modelValue", y);
|
|
2643
2822
|
}
|
|
2644
|
-
const
|
|
2645
|
-
return
|
|
2646
|
-
if (
|
|
2823
|
+
const b = E(() => t["data-1p-ignore"] !== void 0 ? t["data-1p-ignore"] : Ae(e.name) === "name");
|
|
2824
|
+
return ee(c, (h) => {
|
|
2825
|
+
if (h && typeof h == "object") {
|
|
2647
2826
|
try {
|
|
2648
|
-
const
|
|
2649
|
-
|
|
2827
|
+
const y = JSON.parse(f.value);
|
|
2828
|
+
_e(y, h) || (f.value = JSON.stringify(h, null, 2));
|
|
2650
2829
|
} catch {
|
|
2651
|
-
|
|
2830
|
+
f.value = JSON.stringify(h, null, 2);
|
|
2652
2831
|
}
|
|
2653
2832
|
return;
|
|
2654
2833
|
}
|
|
2655
|
-
|
|
2656
|
-
}, { immediate: !0 }), (
|
|
2657
|
-
const
|
|
2658
|
-
return
|
|
2834
|
+
f.value = h || "";
|
|
2835
|
+
}, { immediate: !0 }), (h, y) => {
|
|
2836
|
+
const w = J("KAlert");
|
|
2837
|
+
return i.error ? (A(), K(w, {
|
|
2659
2838
|
key: 0,
|
|
2660
2839
|
appearance: "danger",
|
|
2661
|
-
message:
|
|
2662
|
-
}, null, 8, ["message"])) :
|
|
2840
|
+
message: i.error.message
|
|
2841
|
+
}, null, 8, ["message"])) : ne((A(), F("div", {
|
|
2663
2842
|
key: 1,
|
|
2664
|
-
"data-testid": `ff-json-${
|
|
2843
|
+
"data-testid": `ff-json-${i.path.value}`
|
|
2665
2844
|
}, [
|
|
2666
|
-
|
|
2845
|
+
L(Fe, X(n(s), {
|
|
2667
2846
|
class: "ff-json-field",
|
|
2668
|
-
"data-1p-ignore":
|
|
2847
|
+
"data-1p-ignore": b.value,
|
|
2669
2848
|
"data-autofocus": e.autofocus ? "true" : void 0,
|
|
2670
|
-
"data-testid": `ff-${
|
|
2671
|
-
disabled:
|
|
2672
|
-
|
|
2849
|
+
"data-testid": `ff-${i.path.value}`,
|
|
2850
|
+
disabled: v.value,
|
|
2851
|
+
error: !!h.$attrs.error || !!i.fieldErrors?.value.length,
|
|
2852
|
+
"model-value": f.value ?? "",
|
|
2673
2853
|
multiline: "",
|
|
2674
2854
|
"onUpdate:modelValue": m
|
|
2675
|
-
}),
|
|
2676
|
-
|
|
2855
|
+
}), te({ _: 2 }, [
|
|
2856
|
+
h.$slots.label ? {
|
|
2677
2857
|
name: "label",
|
|
2678
|
-
fn:
|
|
2679
|
-
C(
|
|
2858
|
+
fn: I(() => [
|
|
2859
|
+
C(h.$slots, "label", {
|
|
2680
2860
|
label: n(s).label
|
|
2681
2861
|
}, void 0, !0)
|
|
2682
2862
|
]),
|
|
2683
2863
|
key: "0"
|
|
2684
2864
|
} : void 0,
|
|
2685
|
-
n(s).labelAttributes?.info || n(
|
|
2865
|
+
n(s).labelAttributes?.info || n(d) ? {
|
|
2686
2866
|
name: "label-tooltip",
|
|
2687
|
-
fn:
|
|
2688
|
-
C(
|
|
2689
|
-
n(
|
|
2690
|
-
n(s).labelAttributes?.info ? (
|
|
2867
|
+
fn: I(() => [
|
|
2868
|
+
C(h.$slots, "tooltip", {}, () => [
|
|
2869
|
+
n(d) ? (A(), F("p", Sr, q(n(d).tooltip), 1)) : O("", !0),
|
|
2870
|
+
n(s).labelAttributes?.info ? (A(), F("div", {
|
|
2691
2871
|
key: 1,
|
|
2692
2872
|
class: "ff-label-tooltip-info",
|
|
2693
2873
|
innerHTML: n(s).labelAttributes.info
|
|
2694
|
-
}, null, 8,
|
|
2874
|
+
}, null, 8, Vr)) : O("", !0)
|
|
2695
2875
|
], !0)
|
|
2696
2876
|
]),
|
|
2697
2877
|
key: "1"
|
|
2698
2878
|
} : void 0
|
|
2699
|
-
]), 1040, ["data-1p-ignore", "data-autofocus", "data-testid", "disabled", "model-value"])
|
|
2700
|
-
|
|
2701
|
-
|
|
2879
|
+
]), 1040, ["data-1p-ignore", "data-autofocus", "data-testid", "disabled", "error", "model-value"]),
|
|
2880
|
+
L(ve, {
|
|
2881
|
+
errors: i.fieldErrors?.value,
|
|
2882
|
+
path: i.path?.value
|
|
2883
|
+
}, null, 8, ["errors", "path"])
|
|
2884
|
+
], 8, wr)), [
|
|
2885
|
+
[re, !n(o)]
|
|
2702
2886
|
]);
|
|
2703
2887
|
};
|
|
2704
2888
|
}
|
|
2705
|
-
}),
|
|
2889
|
+
}), Fr = /* @__PURE__ */ Z(Tr, [["__scopeId", "data-v-ba626da4"]]), Ir = {
|
|
2706
2890
|
key: 0,
|
|
2707
2891
|
class: "ff-version-compatibility-note"
|
|
2708
|
-
},
|
|
2892
|
+
}, Pr = ["innerHTML"], Mr = /* @__PURE__ */ G({
|
|
2709
2893
|
inheritAttrs: !1,
|
|
2710
2894
|
__name: "ForeignField",
|
|
2711
2895
|
props: {
|
|
@@ -2724,58 +2908,58 @@ const Ve = /* @__PURE__ */ J({
|
|
|
2724
2908
|
},
|
|
2725
2909
|
emits: ["update:modelValue"],
|
|
2726
2910
|
setup(e, { emit: a }) {
|
|
2727
|
-
const t =
|
|
2911
|
+
const t = $e(), { i18n: { t: r } } = be(), l = ye(e, ["autofocus", "name"]), c = a, { value: o, hide: d, versionInfo: i, ...s } = oe(z(() => e.name));
|
|
2728
2912
|
if (s.error)
|
|
2729
2913
|
throw new Error(s.error.message);
|
|
2730
|
-
const
|
|
2731
|
-
function
|
|
2732
|
-
m !== void 0 &&
|
|
2914
|
+
const v = de(s.path, z({ ...l, ...t })), f = E(() => !!l.disabled || !!i?.value), m = o.value ? o.value.id : null, b = E(() => v.value.placeholder ? v.value.placeholder : r("foreign_placeholder", { entity: s.schema.value?.reference ?? "entity" })), h = ce(m ?? "");
|
|
2915
|
+
function y(p) {
|
|
2916
|
+
m !== void 0 && p === "" && p !== m ? (o.value = s.emptyValue.value, c("update:modelValue", s.emptyValue.value)) : (o.value = { id: p.trim() }, c("update:modelValue", o.value));
|
|
2733
2917
|
}
|
|
2734
|
-
const
|
|
2735
|
-
return (
|
|
2918
|
+
const w = E(() => t["data-1p-ignore"] !== void 0 ? t["data-1p-ignore"] : Ae(e.name) === "name");
|
|
2919
|
+
return (p, g) => ne((A(), K(Fe, X(n(v), {
|
|
2736
2920
|
class: "ff-foreign-field",
|
|
2737
|
-
"data-1p-ignore":
|
|
2921
|
+
"data-1p-ignore": w.value,
|
|
2738
2922
|
"data-autofocus": e.autofocus ? "true" : void 0,
|
|
2739
2923
|
"data-testid": `ff-${s.path.value}`,
|
|
2740
|
-
disabled:
|
|
2741
|
-
error: e.error,
|
|
2742
|
-
"error-message": e.errorMessage,
|
|
2924
|
+
disabled: f.value,
|
|
2925
|
+
error: e.error || !!s.fieldErrors?.value.length,
|
|
2926
|
+
"error-message": e.errorMessage || s.fieldErrorMessage?.value,
|
|
2743
2927
|
help: e.help,
|
|
2744
|
-
"model-value":
|
|
2745
|
-
placeholder:
|
|
2746
|
-
"onUpdate:modelValue":
|
|
2747
|
-
}),
|
|
2748
|
-
|
|
2928
|
+
"model-value": h.value,
|
|
2929
|
+
placeholder: b.value,
|
|
2930
|
+
"onUpdate:modelValue": y
|
|
2931
|
+
}), te({ _: 2 }, [
|
|
2932
|
+
p.$slots.label ? {
|
|
2749
2933
|
name: "label",
|
|
2750
|
-
fn:
|
|
2751
|
-
C(
|
|
2752
|
-
label: n(
|
|
2934
|
+
fn: I(() => [
|
|
2935
|
+
C(p.$slots, "label", {
|
|
2936
|
+
label: n(v).label
|
|
2753
2937
|
}, void 0, !0)
|
|
2754
2938
|
]),
|
|
2755
2939
|
key: "0"
|
|
2756
2940
|
} : void 0,
|
|
2757
|
-
n(
|
|
2941
|
+
n(v).labelAttributes?.info || n(i) ? {
|
|
2758
2942
|
name: "label-tooltip",
|
|
2759
|
-
fn:
|
|
2760
|
-
C(
|
|
2761
|
-
n(
|
|
2762
|
-
n(
|
|
2943
|
+
fn: I(() => [
|
|
2944
|
+
C(p.$slots, "tooltip", {}, () => [
|
|
2945
|
+
n(i) ? (A(), F("p", Ir, q(n(i).tooltip), 1)) : O("", !0),
|
|
2946
|
+
n(v).labelAttributes?.info ? (A(), F("div", {
|
|
2763
2947
|
key: 1,
|
|
2764
2948
|
class: "ff-label-tooltip-info",
|
|
2765
|
-
innerHTML: n(
|
|
2766
|
-
}, null, 8,
|
|
2949
|
+
innerHTML: n(v).labelAttributes.info
|
|
2950
|
+
}, null, 8, Pr)) : O("", !0)
|
|
2767
2951
|
], !0)
|
|
2768
2952
|
]),
|
|
2769
2953
|
key: "1"
|
|
2770
2954
|
} : void 0
|
|
2771
2955
|
]), 1040, ["data-1p-ignore", "data-autofocus", "data-testid", "disabled", "error", "error-message", "help", "model-value", "placeholder"])), [
|
|
2772
|
-
[
|
|
2956
|
+
[re, !n(d)]
|
|
2773
2957
|
]);
|
|
2774
2958
|
}
|
|
2775
|
-
}),
|
|
2959
|
+
}), Kr = /* @__PURE__ */ Z(Mr, [["__scopeId", "data-v-cef643ed"]]), Lr = ["data-testid"], Or = ["data-testid"], Rr = {
|
|
2776
2960
|
key: 0,
|
|
2777
2961
|
class: "ff-version-compatibility-note"
|
|
2778
|
-
},
|
|
2962
|
+
}, jr = ["innerHTML"], xr = { class: "ff-map-field-item-content" }, Cr = { class: "ff-map-field-fields" }, Dr = /* @__PURE__ */ G({
|
|
2779
2963
|
__name: "MapField",
|
|
2780
2964
|
props: {
|
|
2781
2965
|
keyPlaceholder: {},
|
|
@@ -2787,124 +2971,128 @@ const Ve = /* @__PURE__ */ J({
|
|
|
2787
2971
|
},
|
|
2788
2972
|
emits: ["legacyValueChange"],
|
|
2789
2973
|
setup(e, { emit: a }) {
|
|
2790
|
-
const { i18n: t } =
|
|
2791
|
-
keys:
|
|
2974
|
+
const { i18n: t } = be(), r = e, l = a, {
|
|
2975
|
+
keys: c,
|
|
2792
2976
|
updateKey: o,
|
|
2793
|
-
addKey:
|
|
2794
|
-
removeKey:
|
|
2977
|
+
addKey: d,
|
|
2978
|
+
removeKey: i,
|
|
2795
2979
|
field: s,
|
|
2796
|
-
fieldDisplayName:
|
|
2797
|
-
} =
|
|
2798
|
-
function
|
|
2799
|
-
|
|
2980
|
+
fieldDisplayName: v
|
|
2981
|
+
} = Sn(z(r, "name"), V), f = de(s.path, r), m = s.versionInfo, b = E(() => !!m?.value), h = ["string", "number", "boolean", "integer", "foreign"], y = E(() => r.oneLine ? !0 : s.schema?.value?.type === "map" && h.includes(s.schema.value.values.type) && !r.appearance?.string?.multiline), w = E(() => s.schema?.value?.type === "map" ? s.schema.value.values : void 0), p = E(() => w.value?.type === "string" && !w.value?.one_of), g = E(() => y.value ? "div" : Ze), u = Mt("root");
|
|
2982
|
+
function $(T, S) {
|
|
2983
|
+
r.appearance?.string?.multiline || (T.preventDefault(), S === c.value.length - 1 && d(), k(S + 1));
|
|
2800
2984
|
}
|
|
2801
|
-
async function
|
|
2802
|
-
|
|
2985
|
+
async function k(T) {
|
|
2986
|
+
u.value && (await je(), u.value.querySelector(`[data-key-input="${T}"]`)?.focus());
|
|
2803
2987
|
}
|
|
2804
|
-
function
|
|
2805
|
-
|
|
2806
|
-
const T =
|
|
2807
|
-
|
|
2988
|
+
function _() {
|
|
2989
|
+
d();
|
|
2990
|
+
const T = c.value.findIndex(([S, M]) => !M);
|
|
2991
|
+
k(T === -1 ? c.value.length - 1 : T);
|
|
2808
2992
|
}
|
|
2809
|
-
function
|
|
2810
|
-
|
|
2993
|
+
function V(T) {
|
|
2994
|
+
l("legacyValueChange", T);
|
|
2811
2995
|
}
|
|
2812
|
-
return (T,
|
|
2813
|
-
const M =
|
|
2814
|
-
return n(s).error ? (
|
|
2996
|
+
return (T, S) => {
|
|
2997
|
+
const M = J("KAlert"), j = J("KLabel"), x = J("KButton"), U = J("KTooltip");
|
|
2998
|
+
return n(s).error ? (A(), K(M, {
|
|
2815
2999
|
key: 0,
|
|
2816
3000
|
appearance: "danger",
|
|
2817
3001
|
message: n(s).error.message
|
|
2818
|
-
}, null, 8, ["message"])) :
|
|
3002
|
+
}, null, 8, ["message"])) : ne((A(), F("div", {
|
|
2819
3003
|
key: 1,
|
|
2820
3004
|
ref_key: "root",
|
|
2821
|
-
ref:
|
|
3005
|
+
ref: u,
|
|
2822
3006
|
class: "ff-map-field",
|
|
2823
3007
|
"data-testid": `ff-map-${n(s).path.value}`
|
|
2824
3008
|
}, [
|
|
2825
|
-
n(
|
|
3009
|
+
n(f).label ? (A(), F("header", {
|
|
2826
3010
|
key: 0,
|
|
2827
3011
|
class: "ff-map-field-header",
|
|
2828
3012
|
"data-testid": `ff-map-header-${n(s).path.value}`
|
|
2829
3013
|
}, [
|
|
2830
|
-
|
|
3014
|
+
L(j, X({ class: "ff-map-field-label" }, n(f).labelAttributes, {
|
|
2831
3015
|
"data-testid": `ff-label-${n(s).path.value}`,
|
|
2832
|
-
required: n(
|
|
2833
|
-
"tooltip-attributes": n(
|
|
2834
|
-
}),
|
|
2835
|
-
default:
|
|
3016
|
+
required: n(f).required,
|
|
3017
|
+
"tooltip-attributes": n(f).labelAttributes.tooltipAttributes
|
|
3018
|
+
}), te({
|
|
3019
|
+
default: I(() => [
|
|
2836
3020
|
C(T.$slots, "label", {
|
|
2837
|
-
label: n(
|
|
3021
|
+
label: n(f).label
|
|
2838
3022
|
}, () => [
|
|
2839
|
-
|
|
3023
|
+
ae(q(n(f).label), 1)
|
|
2840
3024
|
], !0)
|
|
2841
3025
|
]),
|
|
2842
3026
|
_: 2
|
|
2843
3027
|
}, [
|
|
2844
|
-
n(
|
|
3028
|
+
n(f).labelAttributes?.info || n(m) ? {
|
|
2845
3029
|
name: "tooltip",
|
|
2846
|
-
fn:
|
|
3030
|
+
fn: I(() => [
|
|
2847
3031
|
C(T.$slots, "tooltip", {}, () => [
|
|
2848
|
-
n(m) ? (
|
|
2849
|
-
n(
|
|
3032
|
+
n(m) ? (A(), F("p", Rr, q(n(m).tooltip), 1)) : O("", !0),
|
|
3033
|
+
n(f).labelAttributes?.info ? (A(), F("div", {
|
|
2850
3034
|
key: 1,
|
|
2851
3035
|
class: "ff-label-tooltip-info",
|
|
2852
|
-
innerHTML: n(
|
|
2853
|
-
}, null, 8,
|
|
3036
|
+
innerHTML: n(f).labelAttributes.info
|
|
3037
|
+
}, null, 8, jr)) : O("", !0)
|
|
2854
3038
|
], !0)
|
|
2855
3039
|
]),
|
|
2856
3040
|
key: "0"
|
|
2857
3041
|
} : void 0
|
|
2858
3042
|
]), 1040, ["data-testid", "required", "tooltip-attributes"])
|
|
2859
|
-
], 8,
|
|
2860
|
-
|
|
2861
|
-
|
|
3043
|
+
], 8, Or)) : O("", !0),
|
|
3044
|
+
L(ve, {
|
|
3045
|
+
errors: n(s).ownFieldErrors?.value,
|
|
3046
|
+
path: n(s).path?.value
|
|
3047
|
+
}, null, 8, ["errors", "path"]),
|
|
3048
|
+
(A(!0), F(Q, null, ie(n(c), ([P, H], Y) => (A(), K(ue(g.value), {
|
|
3049
|
+
key: P,
|
|
2862
3050
|
class: xe(["ff-map-field-item", {
|
|
2863
|
-
"ff-map-field-item-simple":
|
|
2864
|
-
"ff-map-field-item-complex": !
|
|
3051
|
+
"ff-map-field-item-simple": y.value,
|
|
3052
|
+
"ff-map-field-item-complex": !y.value
|
|
2865
3053
|
}]),
|
|
2866
|
-
"data-testid": `ff-map-container-${n(s).path.value}.${
|
|
3054
|
+
"data-testid": `ff-map-container-${n(s).path.value}.${Y}`
|
|
2867
3055
|
}, {
|
|
2868
|
-
default:
|
|
2869
|
-
me("div",
|
|
2870
|
-
me("div",
|
|
2871
|
-
|
|
3056
|
+
default: I(() => [
|
|
3057
|
+
me("div", xr, [
|
|
3058
|
+
me("div", Cr, [
|
|
3059
|
+
L(Fe, {
|
|
2872
3060
|
class: "ff-map-field-fields-key",
|
|
2873
|
-
"data-key-input":
|
|
2874
|
-
"data-testid": `ff-map-key-${n(s).path.value}.${
|
|
2875
|
-
disabled:
|
|
2876
|
-
"model-value":
|
|
3061
|
+
"data-key-input": Y,
|
|
3062
|
+
"data-testid": `ff-map-key-${n(s).path.value}.${Y}`,
|
|
3063
|
+
disabled: b.value,
|
|
3064
|
+
"model-value": H,
|
|
2877
3065
|
placeholder: e.keyPlaceholder || "Key",
|
|
2878
|
-
onKeydown:
|
|
2879
|
-
"onUpdate:modelValue": (
|
|
3066
|
+
onKeydown: pt(Ke((fe) => k(Y), ["prevent"]), ["enter"]),
|
|
3067
|
+
"onUpdate:modelValue": (fe) => n(o)(P, fe)
|
|
2880
3068
|
}, null, 8, ["data-key-input", "data-testid", "disabled", "model-value", "placeholder", "onKeydown", "onUpdate:modelValue"]),
|
|
2881
|
-
C(T.$slots, "default", { keyId:
|
|
2882
|
-
|
|
3069
|
+
C(T.$slots, "default", { keyId: P }, () => [
|
|
3070
|
+
p.value ? (A(), K(ft, {
|
|
2883
3071
|
key: 0,
|
|
2884
3072
|
"inline-vault-picker": "",
|
|
2885
3073
|
multiline: e.appearance?.string?.multiline,
|
|
2886
|
-
name:
|
|
2887
|
-
onKeydown:
|
|
2888
|
-
}, null, 8, ["multiline", "name", "onKeydown"])) : (
|
|
3074
|
+
name: P,
|
|
3075
|
+
onKeydown: pt((fe) => $(fe, Y), ["enter"])
|
|
3076
|
+
}, null, 8, ["multiline", "name", "onKeydown"])) : (A(), K(Te, {
|
|
2889
3077
|
key: 1,
|
|
2890
|
-
name:
|
|
3078
|
+
name: P
|
|
2891
3079
|
}, null, 8, ["name"]))
|
|
2892
3080
|
], !0)
|
|
2893
3081
|
]),
|
|
2894
|
-
|
|
2895
|
-
text: n(t).t("actions.remove_entity", { entity: n(
|
|
3082
|
+
L(U, {
|
|
3083
|
+
text: n(t).t("actions.remove_entity", { entity: n(v) })
|
|
2896
3084
|
}, {
|
|
2897
|
-
default:
|
|
2898
|
-
|
|
3085
|
+
default: I(() => [
|
|
3086
|
+
L(x, {
|
|
2899
3087
|
appearance: "tertiary",
|
|
2900
|
-
"aria-label": n(t).t("actions.remove_entity", { entity: n(
|
|
2901
|
-
"data-testid": `ff-map-remove-btn-${n(s).path.value}.${
|
|
2902
|
-
disabled:
|
|
3088
|
+
"aria-label": n(t).t("actions.remove_entity", { entity: n(v) }),
|
|
3089
|
+
"data-testid": `ff-map-remove-btn-${n(s).path.value}.${Y}`,
|
|
3090
|
+
disabled: b.value,
|
|
2903
3091
|
icon: "",
|
|
2904
|
-
onClick: (
|
|
3092
|
+
onClick: (fe) => n(i)(P)
|
|
2905
3093
|
}, {
|
|
2906
|
-
default:
|
|
2907
|
-
|
|
3094
|
+
default: I(() => [
|
|
3095
|
+
L(n(lt))
|
|
2908
3096
|
]),
|
|
2909
3097
|
_: 1
|
|
2910
3098
|
}, 8, ["aria-label", "data-testid", "disabled", "onClick"])
|
|
@@ -2915,55 +3103,55 @@ const Ve = /* @__PURE__ */ J({
|
|
|
2915
3103
|
]),
|
|
2916
3104
|
_: 2
|
|
2917
3105
|
}, 1032, ["class", "data-testid"]))), 128)),
|
|
2918
|
-
|
|
3106
|
+
L(x, {
|
|
2919
3107
|
appearance: "tertiary",
|
|
2920
|
-
"aria-label": n(t).t("actions.add_entity", { entity: n(
|
|
3108
|
+
"aria-label": n(t).t("actions.add_entity", { entity: n(v) }),
|
|
2921
3109
|
class: "ff-map-field-add-entry-btn",
|
|
2922
3110
|
"data-testid": `ff-map-add-btn-${n(s).path.value}`,
|
|
2923
|
-
disabled:
|
|
2924
|
-
onClick:
|
|
3111
|
+
disabled: b.value,
|
|
3112
|
+
onClick: _
|
|
2925
3113
|
}, {
|
|
2926
|
-
default:
|
|
2927
|
-
|
|
2928
|
-
|
|
3114
|
+
default: I(() => [
|
|
3115
|
+
L(n(Ce)),
|
|
3116
|
+
ae(" " + q(n(t).t("actions.add_entity", { entity: n(v) })), 1)
|
|
2929
3117
|
]),
|
|
2930
3118
|
_: 1
|
|
2931
3119
|
}, 8, ["aria-label", "data-testid", "disabled"])
|
|
2932
|
-
], 8,
|
|
2933
|
-
[
|
|
3120
|
+
], 8, Lr)), [
|
|
3121
|
+
[re, !n(s).hide.value]
|
|
2934
3122
|
]);
|
|
2935
3123
|
};
|
|
2936
3124
|
}
|
|
2937
|
-
}),
|
|
2938
|
-
function
|
|
3125
|
+
}), Br = /* @__PURE__ */ Z(Dr, [["__scopeId", "data-v-f33f5ba0"]]);
|
|
3126
|
+
function Hr(e) {
|
|
2939
3127
|
switch (e?.type) {
|
|
2940
3128
|
case "string":
|
|
2941
|
-
return "one_of" in e ?
|
|
3129
|
+
return "one_of" in e ? Re : ft;
|
|
2942
3130
|
case "boolean":
|
|
2943
|
-
return "one_of" in e ?
|
|
3131
|
+
return "one_of" in e ? Re : Bn;
|
|
2944
3132
|
case "number":
|
|
2945
3133
|
case "integer":
|
|
2946
|
-
return "one_of" in e ?
|
|
3134
|
+
return "one_of" in e ? Re : $r;
|
|
2947
3135
|
case "array":
|
|
2948
|
-
return
|
|
3136
|
+
return er;
|
|
2949
3137
|
case "set":
|
|
2950
|
-
return
|
|
3138
|
+
return Va(e) ? Gt : Re;
|
|
2951
3139
|
case "record":
|
|
2952
|
-
return
|
|
3140
|
+
return hr;
|
|
2953
3141
|
case "map":
|
|
2954
|
-
return
|
|
3142
|
+
return Br;
|
|
2955
3143
|
case "json":
|
|
2956
|
-
return
|
|
3144
|
+
return Fr;
|
|
2957
3145
|
case "foreign":
|
|
2958
|
-
return
|
|
3146
|
+
return Kr;
|
|
2959
3147
|
default:
|
|
2960
3148
|
return;
|
|
2961
3149
|
}
|
|
2962
3150
|
}
|
|
2963
|
-
function
|
|
2964
|
-
return
|
|
3151
|
+
function Nr(e) {
|
|
3152
|
+
return Hr(e);
|
|
2965
3153
|
}
|
|
2966
|
-
const
|
|
3154
|
+
const Te = /* @__PURE__ */ G({
|
|
2967
3155
|
name: "AutoField",
|
|
2968
3156
|
__name: "Field",
|
|
2969
3157
|
props: {
|
|
@@ -2973,36 +3161,36 @@ const Se = /* @__PURE__ */ J({
|
|
|
2973
3161
|
},
|
|
2974
3162
|
emits: ["globalAction"],
|
|
2975
3163
|
setup(e) {
|
|
2976
|
-
const a = e, t = oe(
|
|
2977
|
-
return (
|
|
2978
|
-
const o =
|
|
2979
|
-
return
|
|
2980
|
-
(
|
|
2981
|
-
n(t).error ? (
|
|
3164
|
+
const a = e, t = oe(z(a, "name")), r = E(() => Nr(t.schema?.value));
|
|
3165
|
+
return (l, c) => {
|
|
3166
|
+
const o = J("KAlert");
|
|
3167
|
+
return A(), F(Q, null, [
|
|
3168
|
+
(A(), K(ue(l.$slots[n(Oe)]))),
|
|
3169
|
+
n(t).error ? (A(), K(o, {
|
|
2982
3170
|
key: 0,
|
|
2983
3171
|
appearance: "danger",
|
|
2984
3172
|
message: n(t).error.message
|
|
2985
|
-
}, null, 8, ["message"])) : n(t).renderer.value ? (
|
|
3173
|
+
}, null, 8, ["message"])) : n(t).renderer.value ? (A(), K(ue(n(t).renderer.value), {
|
|
2986
3174
|
key: 1,
|
|
2987
3175
|
autofocus: a.autofocus,
|
|
2988
|
-
name:
|
|
2989
|
-
onGlobalAction:
|
|
2990
|
-
}, null, 40, ["autofocus", "name"])) : (
|
|
2991
|
-
|
|
3176
|
+
name: Ve(n(t).path.value),
|
|
3177
|
+
onGlobalAction: c[0] || (c[0] = (d, i) => l.$emit("globalAction", d, i))
|
|
3178
|
+
}, null, 40, ["autofocus", "name"])) : (A(), F(Q, { key: 2 }, [
|
|
3179
|
+
r.value ? (A(), K(ue(r.value), {
|
|
2992
3180
|
key: 0,
|
|
2993
3181
|
autofocus: a.autofocus,
|
|
2994
|
-
name:
|
|
2995
|
-
}, null, 8, ["autofocus", "name"])) : (
|
|
3182
|
+
name: Ve(n(t).path.value)
|
|
3183
|
+
}, null, 8, ["autofocus", "name"])) : (A(), K(o, {
|
|
2996
3184
|
key: 1,
|
|
2997
3185
|
appearance: "warning",
|
|
2998
3186
|
message: `${n(t).path.value} ${n(t).schema.value.type} (no renderer yet)`
|
|
2999
3187
|
}, null, 8, ["message"])),
|
|
3000
|
-
C(
|
|
3188
|
+
C(l.$slots, "default")
|
|
3001
3189
|
], 64))
|
|
3002
3190
|
], 64);
|
|
3003
3191
|
};
|
|
3004
3192
|
}
|
|
3005
|
-
}),
|
|
3193
|
+
}), il = /* @__PURE__ */ G({
|
|
3006
3194
|
name: "SchemaForm",
|
|
3007
3195
|
__name: "Form",
|
|
3008
3196
|
props: {
|
|
@@ -3011,52 +3199,59 @@ const Se = /* @__PURE__ */ J({
|
|
|
3011
3199
|
data: {},
|
|
3012
3200
|
config: {},
|
|
3013
3201
|
fieldsOrder: {},
|
|
3014
|
-
renderRules: {}
|
|
3202
|
+
renderRules: {},
|
|
3203
|
+
errors: {}
|
|
3015
3204
|
},
|
|
3016
|
-
emits: ["change", "globalAction"],
|
|
3205
|
+
emits: ["change", "globalAction", "update:errors"],
|
|
3017
3206
|
setup(e, { expose: a, emit: t }) {
|
|
3018
|
-
const
|
|
3207
|
+
const r = t, l = Le(), { getSchema: c, formData: o, setValue: d, getValue: i, rootRenderRules: s, getEmptyValue: v, reveal: f, unmatchedErrors: m } = bn({
|
|
3019
3208
|
schema: e.schema,
|
|
3020
|
-
propsData:
|
|
3209
|
+
propsData: E(() => e.data),
|
|
3021
3210
|
propsConfig: () => e.config,
|
|
3022
|
-
propsRenderRules:
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3211
|
+
propsRenderRules: z(() => e.renderRules),
|
|
3212
|
+
propsErrors: () => e.errors,
|
|
3213
|
+
onErrorsChange: (h) => r("update:errors", h),
|
|
3214
|
+
onChange: (h) => r("change", h)
|
|
3215
|
+
}), b = E(() => {
|
|
3216
|
+
const { fields: h } = c();
|
|
3217
|
+
let y = h.filter((w) => Object.keys(w)[0] !== qe);
|
|
3218
|
+
return e.fieldsOrder ? xt(y, e.fieldsOrder) : (s.value?.bundles && (y = Ct([...y], s.value.bundles)), y);
|
|
3028
3219
|
});
|
|
3029
3220
|
return a({
|
|
3030
|
-
getValue:
|
|
3031
|
-
getRawValue: () =>
|
|
3032
|
-
setValue:
|
|
3033
|
-
getEmptyValue:
|
|
3034
|
-
reveal:
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3221
|
+
getValue: i,
|
|
3222
|
+
getRawValue: () => It(o),
|
|
3223
|
+
setValue: d,
|
|
3224
|
+
getEmptyValue: v,
|
|
3225
|
+
reveal: f,
|
|
3226
|
+
/**
|
|
3227
|
+
* The errors no field can show in the current state, see `createFieldErrors`
|
|
3228
|
+
*/
|
|
3229
|
+
unmatchedErrors: m
|
|
3230
|
+
}), (h, y) => (A(), K(ue(e.tag), null, {
|
|
3231
|
+
default: I(() => [
|
|
3232
|
+
(A(), K(ue(n(l)[n(Oe)]))),
|
|
3233
|
+
C(h.$slots, "default", {}, () => [
|
|
3234
|
+
(A(!0), F(Q, null, ie(b.value, (w) => (A(), K(Te, {
|
|
3040
3235
|
key: Object.keys(w)[0],
|
|
3041
3236
|
name: Object.keys(w)[0],
|
|
3042
|
-
onGlobalAction:
|
|
3237
|
+
onGlobalAction: y[0] || (y[0] = (p, g) => r("globalAction", p, g))
|
|
3043
3238
|
}, null, 8, ["name"]))), 128))
|
|
3044
3239
|
])
|
|
3045
3240
|
]),
|
|
3046
3241
|
_: 3
|
|
3047
3242
|
}));
|
|
3048
3243
|
}
|
|
3049
|
-
}),
|
|
3244
|
+
}), ul = /* @__PURE__ */ G({
|
|
3050
3245
|
__name: "FieldRenderer",
|
|
3051
3246
|
props: {
|
|
3052
3247
|
match: { type: Function },
|
|
3053
3248
|
priority: {}
|
|
3054
3249
|
},
|
|
3055
3250
|
setup(e) {
|
|
3056
|
-
const a = e, { default: t } =
|
|
3057
|
-
return t &&
|
|
3251
|
+
const a = e, { default: t } = Le(), { fieldRendererRegistry: r } = le();
|
|
3252
|
+
return t && r.set(a.match, t), (l, c) => null;
|
|
3058
3253
|
}
|
|
3059
|
-
}),
|
|
3254
|
+
}), qr = ["data-testid"], Ur = /* @__PURE__ */ G({
|
|
3060
3255
|
__name: "SwitchField",
|
|
3061
3256
|
props: {
|
|
3062
3257
|
labelAttributes: {},
|
|
@@ -3068,118 +3263,123 @@ const Se = /* @__PURE__ */ J({
|
|
|
3068
3263
|
},
|
|
3069
3264
|
emits: ["update:modelValue"],
|
|
3070
3265
|
setup(e, { emit: a }) {
|
|
3071
|
-
const { i18n: { t } } =
|
|
3072
|
-
|
|
3073
|
-
}, m =
|
|
3074
|
-
return (
|
|
3075
|
-
const
|
|
3076
|
-
return
|
|
3266
|
+
const { i18n: { t } } = be(), r = ye(e, ["name", "enabledText", "disabledText"]), { value: l, hide: c, emptyOrDefaultValue: o, versionInfo: d, ...i } = oe(z(() => e.name)), s = a, v = E(() => !!r.disabled || !!d?.value), f = (b) => {
|
|
3267
|
+
l.value = b, s("update:modelValue", b);
|
|
3268
|
+
}, m = de(i.path, r);
|
|
3269
|
+
return (b, h) => {
|
|
3270
|
+
const y = J("KAlert");
|
|
3271
|
+
return i.error ? (A(), K(y, {
|
|
3077
3272
|
key: 0,
|
|
3078
3273
|
appearance: "danger",
|
|
3079
|
-
message:
|
|
3080
|
-
}, null, 8, ["message"])) :
|
|
3274
|
+
message: i.error.message
|
|
3275
|
+
}, null, 8, ["message"])) : ne((A(), F("div", {
|
|
3081
3276
|
key: 1,
|
|
3082
3277
|
class: "ff-switch-field",
|
|
3083
|
-
"data-testid": `ff-${
|
|
3278
|
+
"data-testid": `ff-${i.path.value}`
|
|
3084
3279
|
}, [
|
|
3085
|
-
|
|
3086
|
-
disabled:
|
|
3087
|
-
"disabled-tooltip-text": n(
|
|
3088
|
-
"model-value": !!(n(
|
|
3089
|
-
"onUpdate:modelValue":
|
|
3280
|
+
L(n(ga), X(n(m), {
|
|
3281
|
+
disabled: v.value,
|
|
3282
|
+
"disabled-tooltip-text": n(d)?.tooltip,
|
|
3283
|
+
"model-value": !!(n(l) == null ? n(o) : n(l)),
|
|
3284
|
+
"onUpdate:modelValue": f
|
|
3090
3285
|
}), {
|
|
3091
|
-
label:
|
|
3092
|
-
|
|
3286
|
+
label: I(() => [
|
|
3287
|
+
ae(q(n(l) ? e.enabledText || n(t)("actions.enabled") : e.disabledText || n(t)("actions.disabled")), 1)
|
|
3093
3288
|
]),
|
|
3094
3289
|
_: 1
|
|
3095
|
-
}, 16, ["disabled", "disabled-tooltip-text", "model-value"])
|
|
3096
|
-
|
|
3097
|
-
|
|
3290
|
+
}, 16, ["disabled", "disabled-tooltip-text", "model-value"]),
|
|
3291
|
+
L(ve, {
|
|
3292
|
+
errors: i.fieldErrors?.value,
|
|
3293
|
+
path: i.path?.value
|
|
3294
|
+
}, null, 8, ["errors", "path"])
|
|
3295
|
+
], 8, qr)), [
|
|
3296
|
+
[re, !n(c)]
|
|
3098
3297
|
]);
|
|
3099
3298
|
};
|
|
3100
3299
|
}
|
|
3101
|
-
}),
|
|
3300
|
+
}), cl = /* @__PURE__ */ Z(Ur, [["__scopeId", "data-v-41b643ff"]]);
|
|
3102
3301
|
export {
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3302
|
+
er as ArrayField,
|
|
3303
|
+
Bn as BooleanField,
|
|
3304
|
+
ln as DEFAULT_REVEAL_DURATION,
|
|
3305
|
+
on as DEFAULT_REVEAL_HIGHLIGHT_DURATION,
|
|
3306
|
+
qe as EXPRESSIONS_FIELD,
|
|
3307
|
+
Ge as EXPRESSION_ARRAY_EMPTY,
|
|
3308
|
+
Fe as EnhancedInput,
|
|
3309
|
+
Vt as EntityChecksAlert,
|
|
3310
|
+
Re as EnumField,
|
|
3311
|
+
Jt as ExpressionEditor,
|
|
3312
|
+
bt as FIELD_PATH_KEY,
|
|
3313
|
+
Oe as FIELD_RENDERERS,
|
|
3314
|
+
tt as FIELD_RENDERER_SLOTS,
|
|
3315
|
+
gt as FIELD_RESET_LABEL_PATH_SETTING,
|
|
3316
|
+
Me as FOCUSABLE_SELECTOR,
|
|
3317
|
+
Ie as FREE_FORM_SCHEMA_MAP_KEY,
|
|
3318
|
+
Te as Field,
|
|
3319
|
+
ve as FieldErrors,
|
|
3320
|
+
ul as FieldRenderer,
|
|
3321
|
+
Kr as ForeignField,
|
|
3322
|
+
il as Form,
|
|
3323
|
+
Fr as JsonField,
|
|
3324
|
+
Br as MapField,
|
|
3325
|
+
$r as NumberField,
|
|
3326
|
+
hr as ObjectField,
|
|
3327
|
+
ar as SlideTransition,
|
|
3328
|
+
Gt as StringArrayField,
|
|
3329
|
+
ft as StringField,
|
|
3330
|
+
cl as SwitchField,
|
|
3331
|
+
rn as USE_SECRET_INPUT_KEY,
|
|
3332
|
+
ot as arraySymbol,
|
|
3333
|
+
Fa as buildAncestor,
|
|
3334
|
+
He as buildArraySchemaMap,
|
|
3335
|
+
Ne as buildMapSchemaMap,
|
|
3336
|
+
Be as buildRecordSchemaMap,
|
|
3337
|
+
Ua as buildSchemaMap,
|
|
3338
|
+
nt as defaultLabelFormatter,
|
|
3339
|
+
Xa as findExpressionSourceRecord,
|
|
3340
|
+
ut as formatDataPath,
|
|
3341
|
+
we as generalizePath,
|
|
3342
|
+
ll as generateCredentialSecret,
|
|
3343
|
+
Ae as getName,
|
|
3344
|
+
yt as isAbsolute,
|
|
3345
|
+
Qa as isExpressionFieldSchema,
|
|
3346
|
+
Va as isTagField,
|
|
3347
|
+
St as isVersionSupported,
|
|
3348
|
+
Rt as isWithinPath,
|
|
3349
|
+
st as mapSymbol,
|
|
3350
|
+
rl as normalizeMatch,
|
|
3351
|
+
Pe as parseDataPath,
|
|
3352
|
+
bn as provideFormShared,
|
|
3353
|
+
jt as pruneHiddenPaths,
|
|
3354
|
+
it as removeRootSymbol,
|
|
3355
|
+
ol as renderRuleExactMatch,
|
|
3356
|
+
zt as replaceByDictionary,
|
|
3357
|
+
Wt as replaceByDictionaryInFieldName,
|
|
3358
|
+
R as resolve,
|
|
3359
|
+
Na as resolveEmptyFieldValue,
|
|
3360
|
+
Nr as resolveFieldComponent,
|
|
3361
|
+
Ve as resolveRoot,
|
|
3362
|
+
se as rootSymbol,
|
|
3363
|
+
ke as separator,
|
|
3364
|
+
Ct as sortFieldsByBundles,
|
|
3365
|
+
xt as sortFieldsByFieldNames,
|
|
3166
3366
|
N as toArray,
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3367
|
+
Ga as toExpressionPath,
|
|
3368
|
+
_a as toSelectItems,
|
|
3369
|
+
Ya as toSourcePath,
|
|
3370
|
+
gn as useExpressionField,
|
|
3171
3371
|
oe as useField,
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3372
|
+
Dt as useFieldAncestors,
|
|
3373
|
+
de as useFieldAttrs,
|
|
3374
|
+
wn as useFieldLabel,
|
|
3375
|
+
dt as useFieldPath,
|
|
3376
|
+
kn as useFieldRenderer,
|
|
3377
|
+
$n as useFormData,
|
|
3378
|
+
le as useFormShared,
|
|
3379
|
+
An as useItemKeys,
|
|
3380
|
+
_n as useLabelPath,
|
|
3381
|
+
Sn as useMapField,
|
|
3382
|
+
Ut as useOptionalFormShared,
|
|
3383
|
+
sl as useSchemaExposer,
|
|
3384
|
+
za as useSchemaHelpers
|
|
3185
3385
|
};
|