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