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