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