@kong-ui-public/entities-plugins 9.216.4 → 9.218.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/entities-plugins.es.js +22978 -22775
- package/dist/entities-plugins.umd.js +120 -120
- package/dist/freeform/index.js +161 -154
- package/dist/style.css +1 -1
- package/dist/types/components/PluginEntityForm.vue.d.ts +5 -1
- package/dist/types/components/PluginEntityForm.vue.d.ts.map +1 -1
- package/dist/types/components/PluginForm.vue.d.ts +5 -1
- package/dist/types/components/PluginForm.vue.d.ts.map +1 -1
- package/dist/types/components/fields/kong-identity/ConfigFormContent.vue.d.ts +8 -1
- package/dist/types/components/fields/kong-identity/ConfigFormContent.vue.d.ts.map +1 -1
- package/dist/types/components/fields/kong-identity/ConfigFormWithIdentity.vue.d.ts +8 -1
- package/dist/types/components/fields/kong-identity/ConfigFormWithIdentity.vue.d.ts.map +1 -1
- package/dist/types/components/fields/kong-identity/KongIdentityField.vue.d.ts.map +1 -1
- package/dist/types/components/fields/kong-identity/PrincipalsCreationGuide.vue.d.ts +20 -0
- package/dist/types/components/fields/kong-identity/PrincipalsCreationGuide.vue.d.ts.map +1 -0
- package/dist/types/components/free-form/plugins/basic-auth/index.d.ts.map +1 -1
- package/dist/types/components/free-form/plugins/datakit/flow-editor/FlowCanvas.vue.d.ts +23 -3
- package/dist/types/components/free-form/plugins/datakit/flow-editor/FlowCanvas.vue.d.ts.map +1 -1
- package/dist/types/components/free-form/plugins/datakit/flow-editor/FlowEditor.vue.d.ts +6 -6
- package/dist/types/components/free-form/plugins/datakit/flow-editor/FlowPanels.vue.d.ts +1 -1
- package/dist/types/components/free-form/plugins/datakit/flow-editor/FlowPanels.vue.d.ts.map +1 -1
- package/dist/types/components/free-form/plugins/datakit/flow-editor/node/FlowNode.vue.d.ts +18 -1
- package/dist/types/components/free-form/plugins/datakit/flow-editor/node/FlowNode.vue.d.ts.map +1 -1
- package/dist/types/components/free-form/plugins/datakit/schema/compat.d.ts +16 -16
- package/dist/types/components/free-form/plugins/datakit/schema/strict.d.ts +57 -57
- package/dist/types/components/free-form/plugins/key-auth/index.d.ts.map +1 -1
- package/dist/types/index.d.ts +5 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/types/plugin-form.d.ts +13 -0
- package/dist/types/types/plugin-form.d.ts.map +1 -1
- package/package.json +6 -6
package/dist/freeform/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { toValue as
|
|
1
|
+
import { toValue as R, computed as C, ref as le, readonly as vt, watch as ne, onBeforeUnmount as bt, reactive as et, toRef as E, useSlots as we, provide as qe, inject as ke, defineComponent as N, useAttrs as ye, openBlock as w, createBlock as q, unref as r, mergeProps as W, createSlots as X, renderList as se, withCtx as x, renderSlot as D, normalizeProps as Ue, guardReactiveProps as tt, createPropsRestProxy as ue, resolveComponent as F, withDirectives as Y, createElementBlock as j, createVNode as K, createElementVNode as U, resolveDynamicComponent as re, createCommentVNode as z, Fragment as te, vShow as Q, useCssVars as _t, useTemplateRef as at, normalizeClass as Pe, createTextVNode as me, toDisplayString as de, withModifiers as Ie, nextTick as Re, Transition as At, useId as wt, useModel as Ve, onBeforeMount as kt, mergeModels as je, withKeys as We, toRaw as St } from "vue";
|
|
2
2
|
import { marked as Tt } from "marked";
|
|
3
|
-
import
|
|
4
|
-
import { get as Ne, isEqual as he, omit as
|
|
3
|
+
import Ct from "dompurify";
|
|
4
|
+
import { get as Ne, isEqual as he, omit as Pt, cloneDeep as Je, set as nt, isFunction as Ge, uniqueId as It, upperFirst as qt } from "lodash-es";
|
|
5
5
|
import { createInjectionState as Lt } from "@vueuse/core";
|
|
6
6
|
import { AUTOFILL_SLOT as it } from "@kong-ui-public/forms";
|
|
7
7
|
import { createI18n as ot, i18nTComponent as rt } from "@kong-ui-public/i18n";
|
|
8
|
-
import { KTextArea as xt, KInput as Mt, KCheckbox as $t, KCard as Ee, KLabel as
|
|
8
|
+
import { KTextArea as xt, KInput as Mt, KCheckbox as $t, KCard as Ee, KLabel as Kt, KMultiselect as Rt, KSelect as Vt, KInputSwitch as jt } from "@kong/kongponents";
|
|
9
9
|
import { AddIcon as Oe, CloseIcon as st, TrashIcon as Et, ChevronRightIcon as Ot } from "@kong/icons";
|
|
10
10
|
import { KUI_ICON_SIZE_30 as Dt } from "@kong/design-tokens";
|
|
11
11
|
function Ft(e) {
|
|
@@ -32,7 +32,7 @@ function Bt(e) {
|
|
|
32
32
|
return e.startsWith(pe) && (e = M(...ae(e).slice(1))), e;
|
|
33
33
|
}
|
|
34
34
|
function Ut(e) {
|
|
35
|
-
const c =
|
|
35
|
+
const c = R(e);
|
|
36
36
|
return c ? c.type === "set" && c.elements.type === "string" && !c.elements.one_of : !1;
|
|
37
37
|
}
|
|
38
38
|
function lt(e, c) {
|
|
@@ -103,7 +103,7 @@ function Nt(e) {
|
|
|
103
103
|
return t;
|
|
104
104
|
}
|
|
105
105
|
function ct(e) {
|
|
106
|
-
return
|
|
106
|
+
return C(() => Nt(R(e)));
|
|
107
107
|
}
|
|
108
108
|
const Ye = Symbol("free-form-field-path"), Fe = Symbol("free-form-field-renderer-slots"), Qe = Symbol("free-form-field-reset-label-path-setting"), Se = "free-form-field-renderers-slot", zt = {
|
|
109
109
|
tooltipAttributes: {
|
|
@@ -173,7 +173,7 @@ function Ae(e, c) {
|
|
|
173
173
|
return M(...n);
|
|
174
174
|
}
|
|
175
175
|
function Wt(e) {
|
|
176
|
-
const c =
|
|
176
|
+
const c = R(e), t = C(() => c ? Ht(c) : {});
|
|
177
177
|
function n(l) {
|
|
178
178
|
var s;
|
|
179
179
|
if (l) {
|
|
@@ -199,7 +199,7 @@ function Wt(e) {
|
|
|
199
199
|
return l ? o(l, !0) : a(n(), "");
|
|
200
200
|
}
|
|
201
201
|
function d(l) {
|
|
202
|
-
const s = n(l), u = s != null && s.description ?
|
|
202
|
+
const s = n(l), u = s != null && s.description ? Ct.sanitize(Tt.parse(s.description, { async: !1 })) : void 0;
|
|
203
203
|
return {
|
|
204
204
|
...zt,
|
|
205
205
|
"data-testid": `ff-label-${l}`,
|
|
@@ -246,7 +246,7 @@ function Wt(e) {
|
|
|
246
246
|
};
|
|
247
247
|
}
|
|
248
248
|
const Be = Symbol("ff-render-rule-exact-match");
|
|
249
|
-
function
|
|
249
|
+
function Rn(e) {
|
|
250
250
|
return { [Be]: e };
|
|
251
251
|
}
|
|
252
252
|
function Jt(e, c) {
|
|
@@ -338,7 +338,7 @@ ${L}`
|
|
|
338
338
|
const b = ae(m);
|
|
339
339
|
return b.pop(), M(...b);
|
|
340
340
|
}
|
|
341
|
-
const h =
|
|
341
|
+
const h = C(() => {
|
|
342
342
|
const m = {};
|
|
343
343
|
for (const [b, y] of Object.entries(t.value)) {
|
|
344
344
|
const v = b === pe ? "" : b;
|
|
@@ -378,9 +378,9 @@ ${L}`
|
|
|
378
378
|
}
|
|
379
379
|
function l(m) {
|
|
380
380
|
let b = !1;
|
|
381
|
-
return
|
|
381
|
+
return C(() => {
|
|
382
382
|
if (b) return;
|
|
383
|
-
const y =
|
|
383
|
+
const y = R(m);
|
|
384
384
|
try {
|
|
385
385
|
return g(y);
|
|
386
386
|
} catch (v) {
|
|
@@ -397,27 +397,27 @@ ${L}`
|
|
|
397
397
|
omittedFields: A
|
|
398
398
|
} = m;
|
|
399
399
|
ne([
|
|
400
|
-
() =>
|
|
401
|
-
() =>
|
|
400
|
+
() => R(y),
|
|
401
|
+
() => R(b)
|
|
402
402
|
], ([_, k], [, S]) => {
|
|
403
403
|
_ ? t.value[k] = _ : delete t.value[k], S && S !== k && delete t.value[S];
|
|
404
404
|
}, { immediate: !0, deep: !0 });
|
|
405
405
|
const I = l(b);
|
|
406
406
|
return ne(
|
|
407
407
|
[
|
|
408
|
-
() =>
|
|
408
|
+
() => R(v),
|
|
409
409
|
() => {
|
|
410
410
|
var _;
|
|
411
|
-
return (_ =
|
|
411
|
+
return (_ = R(I)) == null ? void 0 : _.dependencies;
|
|
412
412
|
},
|
|
413
|
-
() =>
|
|
414
|
-
() =>
|
|
413
|
+
() => R(b),
|
|
414
|
+
() => R(A)
|
|
415
415
|
],
|
|
416
416
|
([_, k, S, L]) => {
|
|
417
|
-
!k || !_ || Object.entries(k).forEach(([V, [B,
|
|
417
|
+
!k || !_ || Object.entries(k).forEach(([V, [B, P]]) => {
|
|
418
418
|
if (L != null && L.includes(V)) return;
|
|
419
419
|
const T = Ne(_, B), $ = S ? Bt(M(S, V)) : V;
|
|
420
|
-
if (typeof
|
|
420
|
+
if (typeof P == "object" && P !== null && Be in P ? he(T, P[Be]) : Array.isArray(P) ? P.some((J) => he(T, J)) : he(T, P)) {
|
|
421
421
|
n.value.delete($), e();
|
|
422
422
|
return;
|
|
423
423
|
}
|
|
@@ -426,7 +426,7 @@ ${L}`
|
|
|
426
426
|
},
|
|
427
427
|
{ deep: !0, immediate: !0 }
|
|
428
428
|
), bt(() => {
|
|
429
|
-
const _ =
|
|
429
|
+
const _ = R(b);
|
|
430
430
|
delete t.value[_];
|
|
431
431
|
}), I;
|
|
432
432
|
}
|
|
@@ -549,7 +549,7 @@ const [ta, aa] = Lt(
|
|
|
549
549
|
getEmptyOrDefault: f,
|
|
550
550
|
...i
|
|
551
551
|
} = Wt(t), h = Yt(i.getSchema), g = /* @__PURE__ */ new Map(), l = et({}), s = E(() => p ?? {}), u = we();
|
|
552
|
-
qe(Fe,
|
|
552
|
+
qe(Fe, Pt(u, "default", Se));
|
|
553
553
|
const {
|
|
554
554
|
useCurrentRules: m,
|
|
555
555
|
createComputedRules: b,
|
|
@@ -567,13 +567,13 @@ const [ta, aa] = Lt(
|
|
|
567
567
|
}
|
|
568
568
|
function _(T) {
|
|
569
569
|
let $;
|
|
570
|
-
!T || !k(
|
|
570
|
+
!T || !k(R(T)) ? $ = d() : $ = Je(R(T)), Ge(s.value.prepareFormData) ? I(s.value.prepareFormData($)) : I($);
|
|
571
571
|
}
|
|
572
572
|
function k(T) {
|
|
573
573
|
return Ge(s.value.hasValue) ? s.value.hasValue(T) : !!T;
|
|
574
574
|
}
|
|
575
575
|
function S() {
|
|
576
|
-
const T =
|
|
576
|
+
const T = R(l), $ = Je(T);
|
|
577
577
|
if (y.value.size > 0)
|
|
578
578
|
for (const ee of y.value) {
|
|
579
579
|
const H = ae(ee), J = H.slice(0, -1);
|
|
@@ -586,7 +586,7 @@ const [ta, aa] = Lt(
|
|
|
586
586
|
}, { deep: !0 });
|
|
587
587
|
let L = !1;
|
|
588
588
|
ne(() => n == null ? void 0 : n.value, (T) => {
|
|
589
|
-
L && he(S(),
|
|
589
|
+
L && he(S(), R(T)) || (_(T), L = !0);
|
|
590
590
|
}, { deep: !0, immediate: !0 });
|
|
591
591
|
function V(T) {
|
|
592
592
|
return T != null && typeof T == "object" && !Array.isArray(T) ? h.serialize(T) : T;
|
|
@@ -594,7 +594,7 @@ const [ta, aa] = Lt(
|
|
|
594
594
|
function B(T) {
|
|
595
595
|
return V(d(T));
|
|
596
596
|
}
|
|
597
|
-
function
|
|
597
|
+
function P(T) {
|
|
598
598
|
return V(f(T));
|
|
599
599
|
}
|
|
600
600
|
return {
|
|
@@ -614,7 +614,7 @@ const [ta, aa] = Lt(
|
|
|
614
614
|
isFieldHidden: v,
|
|
615
615
|
keyIdMap: h,
|
|
616
616
|
getDefault: B,
|
|
617
|
-
getEmptyOrDefault:
|
|
617
|
+
getEmptyOrDefault: P
|
|
618
618
|
};
|
|
619
619
|
}
|
|
620
620
|
);
|
|
@@ -625,23 +625,23 @@ function ie() {
|
|
|
625
625
|
return e;
|
|
626
626
|
}
|
|
627
627
|
const dt = (e) => {
|
|
628
|
-
const c = ke(Ye,
|
|
629
|
-
const n =
|
|
628
|
+
const c = ke(Ye, C(() => "")), t = C(() => {
|
|
629
|
+
const n = R(e);
|
|
630
630
|
let o = n;
|
|
631
631
|
return !Xe(n) && c.value && (o = M(c.value, n)), Xe(n) && (o = o.slice(De("").length)), o;
|
|
632
632
|
});
|
|
633
633
|
return qe(Ye, t), t;
|
|
634
634
|
}, na = (e) => {
|
|
635
|
-
const { getSchema: c, getSchemaMap: t, fieldRendererRegistry: n } = ie(), { default: o, ...a } = we(), p = ke(Fe), d =
|
|
636
|
-
const f =
|
|
637
|
-
const s = Ae(M(
|
|
635
|
+
const { getSchema: c, getSchemaMap: t, fieldRendererRegistry: n } = ie(), { default: o, ...a } = we(), p = ke(Fe), d = C(() => {
|
|
636
|
+
const f = R(p), i = t(), h = Object.keys(a).filter((g) => g !== Se && g !== "item").reduce((g, l) => {
|
|
637
|
+
const s = Ae(M(R(e), l), i);
|
|
638
638
|
return { ...g, [s]: a[l] };
|
|
639
639
|
}, {});
|
|
640
640
|
return f ? { ...f, ...h } : h;
|
|
641
641
|
});
|
|
642
|
-
return qe(Fe, d),
|
|
642
|
+
return qe(Fe, d), C(() => {
|
|
643
643
|
if (o) return;
|
|
644
|
-
const f =
|
|
644
|
+
const f = R(e), i = d.value[Ae(f, t())];
|
|
645
645
|
if (i) return i;
|
|
646
646
|
const h = t();
|
|
647
647
|
for (const [g, l] of n) {
|
|
@@ -654,14 +654,14 @@ const dt = (e) => {
|
|
|
654
654
|
function ia(e) {
|
|
655
655
|
const { formData: c } = ie(), t = dt(e);
|
|
656
656
|
return {
|
|
657
|
-
value:
|
|
657
|
+
value: C({
|
|
658
658
|
get: () => Ne(c, ae(t.value)),
|
|
659
659
|
set: (o) => nt(c, ae(t.value), o)
|
|
660
660
|
})
|
|
661
661
|
};
|
|
662
662
|
}
|
|
663
663
|
function Z(e) {
|
|
664
|
-
const { getSchema: c, isFieldHidden: t, getEmptyOrDefault: n } = ie(), o = dt(e), a = na(o), { value: p } = ia(e), d =
|
|
664
|
+
const { getSchema: c, isFieldHidden: t, getEmptyOrDefault: n } = ie(), o = dt(e), a = na(o), { value: p } = ia(e), d = C(() => c(o.value)), f = C(() => t(o.value)), i = C(() => n(o.value));
|
|
665
665
|
return d.value ? {
|
|
666
666
|
schema: d,
|
|
667
667
|
path: o,
|
|
@@ -692,7 +692,7 @@ function oa(e, c) {
|
|
|
692
692
|
return n.set(d, f), t.set(p, f), f;
|
|
693
693
|
}
|
|
694
694
|
return ne(c, (p) => {
|
|
695
|
-
const d =
|
|
695
|
+
const d = R(p), f = /* @__PURE__ */ new Set();
|
|
696
696
|
d.forEach((i, h) => {
|
|
697
697
|
f.add(h);
|
|
698
698
|
}), Array.from(n.keys()).forEach((i) => {
|
|
@@ -742,7 +742,7 @@ function sa(e, c) {
|
|
|
742
742
|
const t = ke(Qe, {
|
|
743
743
|
parentPath: null,
|
|
744
744
|
isolate: !1
|
|
745
|
-
}), { parentPath: n, isolate: o } =
|
|
745
|
+
}), { parentPath: n, isolate: o } = R(t), a = le(n ? M(n, e) : e), p = le({
|
|
746
746
|
parentPath: a.value,
|
|
747
747
|
isolate: o
|
|
748
748
|
});
|
|
@@ -775,8 +775,8 @@ function ft(e) {
|
|
|
775
775
|
return ae(e).map((t) => t.split("_").map(pt).join(" ")).map(qt).join(" › ");
|
|
776
776
|
}
|
|
777
777
|
function la(e, c) {
|
|
778
|
-
const t =
|
|
779
|
-
return
|
|
778
|
+
const t = R(e), n = fe(t), { config: o, getSchema: a } = ie(), p = sa(n, c), d = ct(e);
|
|
779
|
+
return C(() => {
|
|
780
780
|
var s;
|
|
781
781
|
const f = p.value ?? n, i = (s = d.value.parent) != null && s.path ? a(d.value.parent.path) : null, h = (i == null ? void 0 : i.type) === "array", g = (i == null ? void 0 : i.type) === "map";
|
|
782
782
|
if (h || g)
|
|
@@ -786,8 +786,8 @@ function la(e, c) {
|
|
|
786
786
|
});
|
|
787
787
|
}
|
|
788
788
|
function oe(e, c) {
|
|
789
|
-
const { getLabelAttributes: t, getPlaceholder: n, getSchema: o } = ie(), a =
|
|
790
|
-
return
|
|
789
|
+
const { getLabelAttributes: t, getPlaceholder: n, getSchema: o } = ie(), a = R(e), p = R(c), d = la(e, E(() => R(c).resetLabelPath));
|
|
790
|
+
return C(() => {
|
|
791
791
|
var f;
|
|
792
792
|
return {
|
|
793
793
|
...p,
|
|
@@ -800,10 +800,10 @@ function oe(e, c) {
|
|
|
800
800
|
}
|
|
801
801
|
function ua(e, c) {
|
|
802
802
|
var s;
|
|
803
|
-
const { value: t, ...n } = Z(e), { getEmptyOrDefault: o, keyIdMap: a } = ie(), p =
|
|
803
|
+
const { value: t, ...n } = Z(e), { getEmptyOrDefault: o, keyIdMap: a } = ie(), p = C(() => {
|
|
804
804
|
if (n.path)
|
|
805
805
|
return n.schema.value.values;
|
|
806
|
-
}), d =
|
|
806
|
+
}), d = C(() => t ? Object.keys(t.value || {}).map((m) => {
|
|
807
807
|
const b = m, y = a.getKey(b) ?? "";
|
|
808
808
|
return [b, y];
|
|
809
809
|
}) : []);
|
|
@@ -827,7 +827,7 @@ function ua(e, c) {
|
|
|
827
827
|
function g(u) {
|
|
828
828
|
return a.getKey(u);
|
|
829
829
|
}
|
|
830
|
-
const l =
|
|
830
|
+
const l = C(() => {
|
|
831
831
|
if (!n.path) return "";
|
|
832
832
|
const u = fe(n.path.value);
|
|
833
833
|
let m = u;
|
|
@@ -895,7 +895,7 @@ const be = /* @__PURE__ */ N({
|
|
|
895
895
|
},
|
|
896
896
|
emits: ["update:modelValue"],
|
|
897
897
|
setup(e, { emit: c }) {
|
|
898
|
-
const t = e, n = ye(), o = c, a =
|
|
898
|
+
const t = e, n = ye(), o = c, a = C(() => t.multiline ? xt : Mt), p = C(() => n.characterLimit ?? (t.multiline ? !1 : void 0)), d = le(t.modelValue);
|
|
899
899
|
ne(() => t.modelValue, (g) => {
|
|
900
900
|
d.value = g;
|
|
901
901
|
});
|
|
@@ -949,13 +949,13 @@ const be = /* @__PURE__ */ N({
|
|
|
949
949
|
function g(y) {
|
|
950
950
|
h !== void 0 && y === "" && y !== h ? (p.value = null, a("update:modelValue", null)) : (p.value = y.trim(), a("update:modelValue", y.trim()));
|
|
951
951
|
}
|
|
952
|
-
const l =
|
|
952
|
+
const l = C(() => {
|
|
953
953
|
var y;
|
|
954
954
|
return e.showPasswordMaskToggle !== void 0 ? e.showPasswordMaskToggle : o.type === "password" ? !0 : !!((y = f.schema) == null ? void 0 : y.value).encrypted;
|
|
955
|
-
}), s = ke(it, void 0), u =
|
|
955
|
+
}), s = ke(it, void 0), u = C(() => {
|
|
956
956
|
var y;
|
|
957
957
|
return e.showVaultSecretPicker !== void 0 ? e.showVaultSecretPicker : !!((y = f.schema.value) != null && y.referenceable);
|
|
958
|
-
}), m =
|
|
958
|
+
}), m = C(() => ({ referenceable: u.value })), b = C(() => t["data-1p-ignore"] !== void 0 ? t["data-1p-ignore"] : fe(e.name) === "name");
|
|
959
959
|
return (y, v) => {
|
|
960
960
|
var I;
|
|
961
961
|
const A = F("KAlert");
|
|
@@ -964,7 +964,7 @@ const be = /* @__PURE__ */ N({
|
|
|
964
964
|
appearance: "danger",
|
|
965
965
|
message: f.error.message
|
|
966
966
|
}, null, 8, ["message"])) : Y((w(), j("div", Ue(W({ key: 1 }, y.$attrs)), [
|
|
967
|
-
|
|
967
|
+
K(be, W({
|
|
968
968
|
...r(i),
|
|
969
969
|
showPasswordMaskToggle: l.value,
|
|
970
970
|
type: l.value ? "password" : "text"
|
|
@@ -1098,7 +1098,7 @@ const be = /* @__PURE__ */ N({
|
|
|
1098
1098
|
},
|
|
1099
1099
|
emits: ["update:modelValue"],
|
|
1100
1100
|
setup(e, { emit: c }) {
|
|
1101
|
-
const t = ye(), n = ue(e, ["autofocus", "name"]), o = c, { value: a, hide: p, ...d } = Z(E(() => e.name)), f = oe(d.path, E({ ...n, ...t })), i =
|
|
1101
|
+
const t = ye(), n = ue(e, ["autofocus", "name"]), o = c, { value: a, hide: p, ...d } = Z(E(() => e.name)), f = oe(d.path, E({ ...n, ...t })), i = C(() => {
|
|
1102
1102
|
var m, b;
|
|
1103
1103
|
return ((b = (m = d.schema) == null ? void 0 : m.value) == null ? void 0 : b.len_min) && d.schema.value.len_min > 0;
|
|
1104
1104
|
}), h = le("");
|
|
@@ -1113,7 +1113,7 @@ const be = /* @__PURE__ */ N({
|
|
|
1113
1113
|
const b = l(m), y = !b.length && i.value ? null : b;
|
|
1114
1114
|
a.value = y, o("update:modelValue", y);
|
|
1115
1115
|
}
|
|
1116
|
-
const u =
|
|
1116
|
+
const u = C(() => t["data-1p-ignore"] !== void 0 ? t["data-1p-ignore"] : fe(e.name) === "name");
|
|
1117
1117
|
return ne(a, (m) => {
|
|
1118
1118
|
const b = m ? g(m) : "";
|
|
1119
1119
|
g(l(h.value)) !== b && (h.value = b);
|
|
@@ -1128,7 +1128,7 @@ const be = /* @__PURE__ */ N({
|
|
|
1128
1128
|
key: 1,
|
|
1129
1129
|
"data-testid": `ff-tag-${d.path.value}`
|
|
1130
1130
|
}, [
|
|
1131
|
-
|
|
1131
|
+
K(be, W(r(f), {
|
|
1132
1132
|
class: "ff-tag-field",
|
|
1133
1133
|
"data-1p-ignore": u.value,
|
|
1134
1134
|
"data-autofocus": e.autofocus ? "true" : void 0,
|
|
@@ -1153,7 +1153,7 @@ const be = /* @__PURE__ */ N({
|
|
|
1153
1153
|
]);
|
|
1154
1154
|
};
|
|
1155
1155
|
}
|
|
1156
|
-
}), gt = /* @__PURE__ */ G(_a, [["__scopeId", "data-v-3aa09162"]]), Aa = ["data-appearance", "data-testid"], wa = ["data-testid"], ka = ["innerHTML"], Sa = ["data-testid"], Ta = { class: "ff-array-field-item-content" },
|
|
1156
|
+
}), gt = /* @__PURE__ */ G(_a, [["__scopeId", "data-v-3aa09162"]]), Aa = ["data-appearance", "data-testid"], wa = ["data-testid"], ka = ["innerHTML"], Sa = ["data-testid"], Ta = { class: "ff-array-field-item-content" }, Ca = ["data-index", "data-testid"], Ke = 'input:not(:disabled), textarea:not(:disabled), select:not(:disabled), button:not(:disabled), [contenteditable="true"], [tabindex]:not([tabindex="-1"]):not(:disabled)', Pa = /* @__PURE__ */ N({
|
|
1157
1157
|
__name: "ArrayField",
|
|
1158
1158
|
props: {
|
|
1159
1159
|
name: {},
|
|
@@ -1169,51 +1169,51 @@ const be = /* @__PURE__ */ N({
|
|
|
1169
1169
|
emits: ["add", "remove"],
|
|
1170
1170
|
setup(e, { emit: c }) {
|
|
1171
1171
|
var B;
|
|
1172
|
-
_t((
|
|
1172
|
+
_t((P) => ({
|
|
1173
1173
|
v2cc732dc: V.value
|
|
1174
1174
|
}));
|
|
1175
|
-
const t = e, n = c, { i18n: { t: o } } = ve(), { getDefault: a, getSchema: p } = ie(), { value: d, hide: f, ...i } = Z(E(t, "name")), h = oe(i.path, E({ ...t, ...ye() })), g =
|
|
1175
|
+
const t = e, n = c, { i18n: { t: o } } = ve(), { getDefault: a, getSchema: p } = ie(), { value: d, hide: f, ...i } = Z(E(t, "name")), h = oe(i.path, E({ ...t, ...ye() })), g = C(() => {
|
|
1176
1176
|
if (!i.path) throw new Error("Field path is required for sub-schema retrieval");
|
|
1177
|
-
const
|
|
1178
|
-
if (!
|
|
1179
|
-
return
|
|
1180
|
-
}), l =
|
|
1177
|
+
const P = p(i.path.value);
|
|
1178
|
+
if (!P) throw new Error(`Schema not found for path: ${i.path.value}`);
|
|
1179
|
+
return P.elements;
|
|
1180
|
+
}), l = C(() => {
|
|
1181
1181
|
if (!i.path) return "";
|
|
1182
|
-
const
|
|
1183
|
-
return mt(
|
|
1184
|
-
}), s =
|
|
1185
|
-
function y(
|
|
1186
|
-
return typeof t.itemLabel == "function" ? t.itemLabel(
|
|
1182
|
+
const P = fe(i.path.value);
|
|
1183
|
+
return mt(P);
|
|
1184
|
+
}), s = C(() => t.items ?? R(d) ?? []), { getKey: u } = oa("ff-array-field", s), m = C(() => t.appearance ? t.appearance : g.value.type === "record" || g.value.type === "map" ? "card" : "default"), b = C(() => m.value === "card" ? Ee : "div");
|
|
1185
|
+
function y(P, T) {
|
|
1186
|
+
return typeof t.itemLabel == "function" ? t.itemLabel(P, T) : t.itemLabel || h.value.label || `Item #${T}`;
|
|
1187
1187
|
}
|
|
1188
|
-
const v =
|
|
1189
|
-
hash: `#${u(
|
|
1188
|
+
const v = C(() => s.value.map((P, T) => ({
|
|
1189
|
+
hash: `#${u(P, T)}`,
|
|
1190
1190
|
title: ""
|
|
1191
1191
|
}))), A = le((B = v.value[0]) == null ? void 0 : B.hash), I = async () => {
|
|
1192
1192
|
var T;
|
|
1193
|
-
const
|
|
1194
|
-
Array.isArray(d.value) || (d.value = []), d.value.push(
|
|
1195
|
-
}, _ = async (
|
|
1193
|
+
const P = a(M(i.path.value, ze));
|
|
1194
|
+
Array.isArray(d.value) || (d.value = []), d.value.push(P), n("add"), t.appearance === "tabs" && (await Re(), A.value = (T = v.value[v.value.length - 1]) == null ? void 0 : T.hash), await Re(), S(s.value.length + 1);
|
|
1195
|
+
}, _ = async (P) => {
|
|
1196
1196
|
var T;
|
|
1197
|
-
Array.isArray(d.value) && (d.value.splice(
|
|
1197
|
+
Array.isArray(d.value) && (d.value.splice(P, 1), d.value.length === 0 && !h.value.required && (d.value = null)), n("remove", P), t.appearance === "tabs" && (A.value = (T = v.value[Math.max(0, P - 1)]) == null ? void 0 : T.hash);
|
|
1198
1198
|
}, k = at("root");
|
|
1199
|
-
function S(
|
|
1199
|
+
function S(P) {
|
|
1200
1200
|
if (!k.value)
|
|
1201
1201
|
return;
|
|
1202
|
-
const T = Math.max(0, Math.min(
|
|
1202
|
+
const T = Math.max(0, Math.min(P, s.value.length - 1)), $ = k.value.querySelector(`[data-index="${T}"]`);
|
|
1203
1203
|
if (!$)
|
|
1204
1204
|
return;
|
|
1205
1205
|
const ee = L($);
|
|
1206
1206
|
ee == null || ee.focus();
|
|
1207
1207
|
}
|
|
1208
|
-
function L(
|
|
1209
|
-
const T =
|
|
1210
|
-
return T ? T.matches(
|
|
1208
|
+
function L(P) {
|
|
1209
|
+
const T = P.querySelector('[data-autofocus="true"]');
|
|
1210
|
+
return T ? T.matches(Ke) ? T : T.querySelector(Ke) : P.querySelector(Ke);
|
|
1211
1211
|
}
|
|
1212
|
-
const V =
|
|
1213
|
-
const { appearance:
|
|
1214
|
-
return
|
|
1212
|
+
const V = C(() => {
|
|
1213
|
+
const { appearance: P, stickyTabs: T } = t;
|
|
1214
|
+
return P !== "tabs" || T == null || T === !1 ? null : typeof T == "number" ? `${t.stickyTabs}px` : typeof T == "string" ? T : "0";
|
|
1215
1215
|
});
|
|
1216
|
-
return (
|
|
1216
|
+
return (P, T) => {
|
|
1217
1217
|
var Te;
|
|
1218
1218
|
const $ = F("KAlert"), ee = F("KLabel"), H = F("KButton"), J = F("KTooltip"), _e = F("KTabs");
|
|
1219
1219
|
return i.error ? (w(), q($, {
|
|
@@ -1224,7 +1224,7 @@ const be = /* @__PURE__ */ N({
|
|
|
1224
1224
|
key: 1,
|
|
1225
1225
|
ref_key: "root",
|
|
1226
1226
|
ref: k,
|
|
1227
|
-
class:
|
|
1227
|
+
class: Pe(["ff-array-field", {
|
|
1228
1228
|
[`ff-array-field-${m.value ?? "default"}`]: !0,
|
|
1229
1229
|
"ff-array-field-sticky-tabs": e.stickyTabs
|
|
1230
1230
|
}]),
|
|
@@ -1236,7 +1236,7 @@ const be = /* @__PURE__ */ N({
|
|
|
1236
1236
|
class: "ff-array-field-header",
|
|
1237
1237
|
"data-testid": `ff-array-header-${i.path.value}`
|
|
1238
1238
|
}, [
|
|
1239
|
-
|
|
1239
|
+
K(ee, W({ class: "ff-array-field-label" }, r(h), {
|
|
1240
1240
|
"data-testid": `ff-label-${i.path.value}`,
|
|
1241
1241
|
"tooltip-attributes": r(h).labelAttributes.tooltipAttributes
|
|
1242
1242
|
}), X({
|
|
@@ -1248,7 +1248,7 @@ const be = /* @__PURE__ */ N({
|
|
|
1248
1248
|
(Te = r(h).labelAttributes) != null && Te.info ? {
|
|
1249
1249
|
name: "tooltip",
|
|
1250
1250
|
fn: x(() => [
|
|
1251
|
-
D(
|
|
1251
|
+
D(P.$slots, "tooltip", {}, () => [
|
|
1252
1252
|
U("div", {
|
|
1253
1253
|
innerHTML: r(h).labelAttributes.info
|
|
1254
1254
|
}, null, 8, ka)
|
|
@@ -1266,7 +1266,7 @@ const be = /* @__PURE__ */ N({
|
|
|
1266
1266
|
onClick: I
|
|
1267
1267
|
}, {
|
|
1268
1268
|
default: x(() => [
|
|
1269
|
-
|
|
1269
|
+
K(r(Oe))
|
|
1270
1270
|
]),
|
|
1271
1271
|
_: 1
|
|
1272
1272
|
}, 8, ["aria-label", "data-testid"])) : z("", !0)
|
|
@@ -1278,13 +1278,13 @@ const be = /* @__PURE__ */ N({
|
|
|
1278
1278
|
}, [
|
|
1279
1279
|
(w(!0), j(te, null, se(s.value, (ce, O) => (w(), q(r(b), {
|
|
1280
1280
|
key: r(u)(ce, O),
|
|
1281
|
-
class:
|
|
1281
|
+
class: Pe(["ff-array-field-item", { "ff-array-field-item-card": m.value === "card" }]),
|
|
1282
1282
|
"data-index": O,
|
|
1283
1283
|
"data-testid": `ff-array-item-${i.path.value}.${O}`
|
|
1284
1284
|
}, {
|
|
1285
1285
|
default: x(() => [
|
|
1286
1286
|
U("div", Ta, [
|
|
1287
|
-
|
|
1287
|
+
P.$slots.item ? D(P.$slots, "item", {
|
|
1288
1288
|
key: 0,
|
|
1289
1289
|
autofocus: !0,
|
|
1290
1290
|
fieldName: String(O),
|
|
@@ -1300,12 +1300,12 @@ const be = /* @__PURE__ */ N({
|
|
|
1300
1300
|
name: String(O)
|
|
1301
1301
|
}, null, 8, ["name"]))
|
|
1302
1302
|
]),
|
|
1303
|
-
|
|
1303
|
+
K(J, {
|
|
1304
1304
|
class: "ff-array-field-item-remove-tooltip",
|
|
1305
1305
|
text: r(o)("actions.remove_entity", { entity: l.value })
|
|
1306
1306
|
}, {
|
|
1307
1307
|
default: x(() => [
|
|
1308
|
-
|
|
1308
|
+
K(H, {
|
|
1309
1309
|
appearance: "tertiary",
|
|
1310
1310
|
"aria-label": r(o)("actions.remove_entity", { entity: l.value }),
|
|
1311
1311
|
class: "ff-array-field-item-remove",
|
|
@@ -1314,7 +1314,7 @@ const be = /* @__PURE__ */ N({
|
|
|
1314
1314
|
onClick: Ie((yt) => _(O), ["stop"])
|
|
1315
1315
|
}, {
|
|
1316
1316
|
default: x(() => [
|
|
1317
|
-
|
|
1317
|
+
K(r(st))
|
|
1318
1318
|
]),
|
|
1319
1319
|
_: 1
|
|
1320
1320
|
}, 8, ["aria-label", "data-testid", "onClick"])
|
|
@@ -1325,7 +1325,7 @@ const be = /* @__PURE__ */ N({
|
|
|
1325
1325
|
_: 2
|
|
1326
1326
|
}, 1032, ["class", "data-index", "data-testid"]))), 128))
|
|
1327
1327
|
], 8, Sa),
|
|
1328
|
-
|
|
1328
|
+
K(H, {
|
|
1329
1329
|
appearance: "tertiary",
|
|
1330
1330
|
"aria-label": r(o)("actions.add_entity", { entity: l.value }),
|
|
1331
1331
|
class: "ff-array-field-add-item-btn",
|
|
@@ -1333,7 +1333,7 @@ const be = /* @__PURE__ */ N({
|
|
|
1333
1333
|
onClick: I
|
|
1334
1334
|
}, {
|
|
1335
1335
|
default: x(() => [
|
|
1336
|
-
|
|
1336
|
+
K(r(Oe)),
|
|
1337
1337
|
me(" " + de(r(o)("actions.add_entity", { entity: l.value })), 1)
|
|
1338
1338
|
]),
|
|
1339
1339
|
_: 1
|
|
@@ -1343,7 +1343,7 @@ const be = /* @__PURE__ */ N({
|
|
|
1343
1343
|
"data-testid": `ff-array-tab-container-${i.path.value}`
|
|
1344
1344
|
}, {
|
|
1345
1345
|
default: x(() => [
|
|
1346
|
-
|
|
1346
|
+
K(_e, {
|
|
1347
1347
|
modelValue: A.value,
|
|
1348
1348
|
"onUpdate:modelValue": T[0] || (T[0] = (ce) => A.value = ce),
|
|
1349
1349
|
"data-testid": `ff-array-tabs-${i.path.value}`,
|
|
@@ -1357,7 +1357,7 @@ const be = /* @__PURE__ */ N({
|
|
|
1357
1357
|
"data-index": O,
|
|
1358
1358
|
"data-testid": `ff-array-item-${i.path.value}.${O}`
|
|
1359
1359
|
}, [
|
|
1360
|
-
|
|
1360
|
+
P.$slots.item ? D(P.$slots, "item", {
|
|
1361
1361
|
key: 0,
|
|
1362
1362
|
autofocus: !0,
|
|
1363
1363
|
fieldName: String(O),
|
|
@@ -1367,14 +1367,14 @@ const be = /* @__PURE__ */ N({
|
|
|
1367
1367
|
autofocus: "",
|
|
1368
1368
|
name: String(O)
|
|
1369
1369
|
}, null, 8, ["name"]))
|
|
1370
|
-
], 8,
|
|
1370
|
+
], 8, Ca)
|
|
1371
1371
|
])
|
|
1372
1372
|
})),
|
|
1373
1373
|
se(s.value, (ce, O) => ({
|
|
1374
1374
|
name: `${r(u)(ce, O)}-anchor`,
|
|
1375
1375
|
fn: x(() => [
|
|
1376
1376
|
me(de(y(ce, O)) + " ", 1),
|
|
1377
|
-
|
|
1377
|
+
K(H, {
|
|
1378
1378
|
appearance: "tertiary",
|
|
1379
1379
|
"aria-label": r(o)("actions.remove_entity", { entity: l.value }),
|
|
1380
1380
|
class: "ff-array-field-item-remove",
|
|
@@ -1383,7 +1383,7 @@ const be = /* @__PURE__ */ N({
|
|
|
1383
1383
|
onClick: Ie((yt) => _(O), ["stop"])
|
|
1384
1384
|
}, {
|
|
1385
1385
|
default: x(() => [
|
|
1386
|
-
|
|
1386
|
+
K(r(Et))
|
|
1387
1387
|
]),
|
|
1388
1388
|
_: 1
|
|
1389
1389
|
}, 8, ["aria-label", "data-testid", "onClick"])
|
|
@@ -1398,7 +1398,7 @@ const be = /* @__PURE__ */ N({
|
|
|
1398
1398
|
]);
|
|
1399
1399
|
};
|
|
1400
1400
|
}
|
|
1401
|
-
}), Ia = /* @__PURE__ */ G(
|
|
1401
|
+
}), Ia = /* @__PURE__ */ G(Pa, [["__scopeId", "data-v-04b60981"]]), qa = /* @__PURE__ */ N({
|
|
1402
1402
|
__name: "SlideTransition",
|
|
1403
1403
|
setup(e) {
|
|
1404
1404
|
const c = [
|
|
@@ -1477,7 +1477,7 @@ const be = /* @__PURE__ */ N({
|
|
|
1477
1477
|
visibleFields: {}
|
|
1478
1478
|
},
|
|
1479
1479
|
setup(e) {
|
|
1480
|
-
const { i18n: { t: c } } = ve(), t =
|
|
1480
|
+
const { i18n: { t: c } } = ve(), t = C(() => {
|
|
1481
1481
|
if (!Array.isArray(e.entityChecks) || e.entityChecks.length === 0)
|
|
1482
1482
|
return null;
|
|
1483
1483
|
const a = [], p = [
|
|
@@ -1523,7 +1523,7 @@ const be = /* @__PURE__ */ N({
|
|
|
1523
1523
|
})) : z("", !0);
|
|
1524
1524
|
};
|
|
1525
1525
|
}
|
|
1526
|
-
}), Ze = /* @__PURE__ */ G(Ma, [["__scopeId", "data-v-374c59bc"]]), $a = ["data-testid"],
|
|
1526
|
+
}), Ze = /* @__PURE__ */ G(Ma, [["__scopeId", "data-v-374c59bc"]]), $a = ["data-testid"], Ka = ["data-testid"], Ra = ["data-testid"], Va = { class: "ff-object-field-header-toggle" }, ja = ["aria-controls", "aria-expanded", "aria-label", "data-testid", "disabled"], Ea = ["innerHTML"], Oa = ["data-testid"], Da = {
|
|
1527
1527
|
key: 0,
|
|
1528
1528
|
class: "indent-guide"
|
|
1529
1529
|
}, Fa = /* @__PURE__ */ N({
|
|
@@ -1561,7 +1561,7 @@ const be = /* @__PURE__ */ N({
|
|
|
1561
1561
|
rules: E(t, "renderRules"),
|
|
1562
1562
|
omittedFields: E(() => e.omit),
|
|
1563
1563
|
parentValue: n
|
|
1564
|
-
}), h = Ve(e, "added"), g = Ve(e, "expanded"), l =
|
|
1564
|
+
}), h = Ve(e, "added"), g = Ve(e, "expanded"), l = C(() => {
|
|
1565
1565
|
var _, k;
|
|
1566
1566
|
if ((_ = a.ancestors) != null && _.value) {
|
|
1567
1567
|
const S = a.ancestors.value.parent;
|
|
@@ -1569,7 +1569,7 @@ const be = /* @__PURE__ */ N({
|
|
|
1569
1569
|
return ((k = p(S.path)) == null ? void 0 : k.type) === "array";
|
|
1570
1570
|
}
|
|
1571
1571
|
return !1;
|
|
1572
|
-
}), s =
|
|
1572
|
+
}), s = C(() => {
|
|
1573
1573
|
var _, k;
|
|
1574
1574
|
if ((_ = a.ancestors) != null && _.value) {
|
|
1575
1575
|
const S = a.ancestors.value.parent;
|
|
@@ -1577,11 +1577,11 @@ const be = /* @__PURE__ */ N({
|
|
|
1577
1577
|
return ((k = p(S.path)) == null ? void 0 : k.type) === "map";
|
|
1578
1578
|
}
|
|
1579
1579
|
return !1;
|
|
1580
|
-
}), u = oe(a.path, { required: e.required, ...t, resetLabelPath: e.resetLabelPath }), m =
|
|
1580
|
+
}), u = oe(a.path, { required: e.required, ...t, resetLabelPath: e.resetLabelPath }), m = C(() => u.value.required ? !0 : h.value ?? e.defaultAdded), b = C(() => e.asChild !== void 0 ? e.asChild : l.value), y = C(() => {
|
|
1581
1581
|
var k;
|
|
1582
1582
|
let _ = a.schema.value.fields;
|
|
1583
1583
|
return e.omit && (_ = _.filter((S) => !e.omit.includes(Object.keys(S)[0]))), e.fieldsOrder ? lt(_, e.fieldsOrder) : ((k = i.value) != null && k.bundles && (_ = ut([..._], i.value.bundles)), _);
|
|
1584
|
-
}), v =
|
|
1584
|
+
}), v = C(() => y.value.map((_) => Object.keys(_)[0]));
|
|
1585
1585
|
function A() {
|
|
1586
1586
|
g.value = !g.value;
|
|
1587
1587
|
}
|
|
@@ -1612,13 +1612,13 @@ const be = /* @__PURE__ */ N({
|
|
|
1612
1612
|
D(_.$slots, "default", {}, () => {
|
|
1613
1613
|
var B;
|
|
1614
1614
|
return [
|
|
1615
|
-
|
|
1615
|
+
K(Ze, {
|
|
1616
1616
|
"entity-checks": (B = a.schema.value) == null ? void 0 : B.entity_checks,
|
|
1617
1617
|
"visible-fields": v.value
|
|
1618
1618
|
}, null, 8, ["entity-checks", "visible-fields"]),
|
|
1619
|
-
(w(!0), j(te, null, se(y.value, (
|
|
1620
|
-
key: Object.keys(
|
|
1621
|
-
name: Object.keys(
|
|
1619
|
+
(w(!0), j(te, null, se(y.value, (P) => (w(), q(ge, {
|
|
1620
|
+
key: Object.keys(P)[0],
|
|
1621
|
+
name: Object.keys(P)[0]
|
|
1622
1622
|
}, null, 8, ["name"]))), 128))
|
|
1623
1623
|
];
|
|
1624
1624
|
}, !0)
|
|
@@ -1644,14 +1644,14 @@ const be = /* @__PURE__ */ N({
|
|
|
1644
1644
|
type: "button",
|
|
1645
1645
|
onClick: Ie(A, ["prevent", "stop"])
|
|
1646
1646
|
}, [
|
|
1647
|
-
|
|
1648
|
-
class:
|
|
1647
|
+
K(r(Ot), {
|
|
1648
|
+
class: Pe(["ff-object-field-toggle-btn-trigger-icon", { "collapse-expanded": g.value }]),
|
|
1649
1649
|
"data-testid": `ff-object-toggle-trigger-icon-${a.path.value}`,
|
|
1650
1650
|
decorative: "",
|
|
1651
1651
|
size: `var(--kui-icon-size-30, ${r(Dt)})`
|
|
1652
1652
|
}, null, 8, ["class", "data-testid", "size"])
|
|
1653
1653
|
], 8, ja),
|
|
1654
|
-
s.value ? z("", !0) : (w(), q(r(
|
|
1654
|
+
s.value ? z("", !0) : (w(), q(r(Kt), W({
|
|
1655
1655
|
key: 0,
|
|
1656
1656
|
class: "ff-object-field-label",
|
|
1657
1657
|
"data-testid": `ff-label-${a.path.value}`
|
|
@@ -1688,8 +1688,8 @@ const be = /* @__PURE__ */ N({
|
|
|
1688
1688
|
],
|
|
1689
1689
|
"data-testid": `ff-object-switch-${a.path.value}`
|
|
1690
1690
|
}, null, 8, ["modelValue", "data-testid"]))
|
|
1691
|
-
], 8,
|
|
1692
|
-
|
|
1691
|
+
], 8, Ra),
|
|
1692
|
+
K(La, null, {
|
|
1693
1693
|
default: x(() => [
|
|
1694
1694
|
g.value ? (w(), j("div", {
|
|
1695
1695
|
key: 0,
|
|
@@ -1699,13 +1699,13 @@ const be = /* @__PURE__ */ N({
|
|
|
1699
1699
|
D(_.$slots, "default", {}, () => {
|
|
1700
1700
|
var B;
|
|
1701
1701
|
return [
|
|
1702
|
-
|
|
1702
|
+
K(Ze, {
|
|
1703
1703
|
"entity-checks": (B = a.schema.value) == null ? void 0 : B.entity_checks,
|
|
1704
1704
|
"visible-fields": v.value
|
|
1705
1705
|
}, null, 8, ["entity-checks", "visible-fields"]),
|
|
1706
|
-
(w(!0), j(te, null, se(y.value, (
|
|
1707
|
-
key: Object.keys(
|
|
1708
|
-
name: Object.keys(
|
|
1706
|
+
(w(!0), j(te, null, se(y.value, (P) => (w(), q(ge, {
|
|
1707
|
+
key: Object.keys(P)[0],
|
|
1708
|
+
name: Object.keys(P)[0]
|
|
1709
1709
|
}, null, 8, ["name"]))), 128))
|
|
1710
1710
|
];
|
|
1711
1711
|
}, !0)
|
|
@@ -1714,7 +1714,7 @@ const be = /* @__PURE__ */ N({
|
|
|
1714
1714
|
_: 3
|
|
1715
1715
|
}),
|
|
1716
1716
|
g.value ? (w(), j("div", Da)) : z("", !0)
|
|
1717
|
-
], 16,
|
|
1717
|
+
], 16, Ka)), [
|
|
1718
1718
|
[Q, !r(o)]
|
|
1719
1719
|
])
|
|
1720
1720
|
], 64);
|
|
@@ -1745,7 +1745,7 @@ const be = /* @__PURE__ */ N({
|
|
|
1745
1745
|
},
|
|
1746
1746
|
emits: ["update:modelValue"],
|
|
1747
1747
|
setup(e, { emit: c }) {
|
|
1748
|
-
const t = ue(e, ["autofocus", "showVaultSecretPicker", "name"]), { value: n, hide: o, ...a } = Z(E(() => e.name)), p = oe(a.path, t), { i18n: d } = ve(), f =
|
|
1748
|
+
const t = ue(e, ["autofocus", "showVaultSecretPicker", "name"]), { value: n, hide: o, ...a } = Z(E(() => e.name)), p = oe(a.path, t), { i18n: d } = ve(), f = C(() => {
|
|
1749
1749
|
var _;
|
|
1750
1750
|
const v = (_ = a.schema) == null ? void 0 : _.value;
|
|
1751
1751
|
if (typeof v.gt == "number")
|
|
@@ -1755,7 +1755,7 @@ const be = /* @__PURE__ */ N({
|
|
|
1755
1755
|
min: t.min ?? A,
|
|
1756
1756
|
max: t.max ?? I
|
|
1757
1757
|
};
|
|
1758
|
-
}), i = c, h = n.value, g =
|
|
1758
|
+
}), i = c, h = n.value, g = C(() => {
|
|
1759
1759
|
const v = n == null ? void 0 : n.value;
|
|
1760
1760
|
if (v == null || v === "") return "";
|
|
1761
1761
|
if (b.value) return `${v}`;
|
|
@@ -1773,10 +1773,10 @@ const be = /* @__PURE__ */ N({
|
|
|
1773
1773
|
const I = Number(A);
|
|
1774
1774
|
return Number.isFinite(I) ? I : b.value ? v : null;
|
|
1775
1775
|
}
|
|
1776
|
-
const u = ke(it, void 0), m =
|
|
1776
|
+
const u = ke(it, void 0), m = C(() => ({ referenceable: b.value })), b = C(() => {
|
|
1777
1777
|
var v;
|
|
1778
1778
|
return e.showVaultSecretPicker !== void 0 ? e.showVaultSecretPicker : !!((v = a.schema.value) != null && v.referenceable);
|
|
1779
|
-
}), y =
|
|
1779
|
+
}), y = C(() => b.value ? "text" : "number");
|
|
1780
1780
|
return (v, A) => {
|
|
1781
1781
|
var _;
|
|
1782
1782
|
const I = F("KAlert");
|
|
@@ -1785,7 +1785,7 @@ const be = /* @__PURE__ */ N({
|
|
|
1785
1785
|
appearance: "danger",
|
|
1786
1786
|
message: a.error.message
|
|
1787
1787
|
}, null, 8, ["message"])) : Y((w(), j("div", Ua, [
|
|
1788
|
-
|
|
1788
|
+
K(be, W({ class: "ff-number-field" }, {
|
|
1789
1789
|
...r(p),
|
|
1790
1790
|
min: f.value.min,
|
|
1791
1791
|
max: f.value.max
|
|
@@ -1875,10 +1875,10 @@ const be = /* @__PURE__ */ N({
|
|
|
1875
1875
|
set: (u) => {
|
|
1876
1876
|
a.value = i(u);
|
|
1877
1877
|
}
|
|
1878
|
-
}), g =
|
|
1878
|
+
}), g = C(() => e.items ? e.items : d.path ? o(d.path.value) : []), l = C(() => {
|
|
1879
1879
|
var u;
|
|
1880
1880
|
return e.multiple !== void 0 ? e.multiple : ((u = d.schema.value) == null ? void 0 : u.type) === "set";
|
|
1881
|
-
}), s =
|
|
1881
|
+
}), s = C(() => l.value ? Rt : Vt);
|
|
1882
1882
|
return (u, m) => {
|
|
1883
1883
|
var y;
|
|
1884
1884
|
const b = F("KAlert");
|
|
@@ -1922,7 +1922,7 @@ const be = /* @__PURE__ */ N({
|
|
|
1922
1922
|
]);
|
|
1923
1923
|
};
|
|
1924
1924
|
}
|
|
1925
|
-
}),
|
|
1925
|
+
}), Ce = /* @__PURE__ */ G(Ja, [["__scopeId", "data-v-b283cc11"]]), Ga = ["data-testid"], Xa = ["innerHTML"], Ya = /* @__PURE__ */ N({
|
|
1926
1926
|
inheritAttrs: !1,
|
|
1927
1927
|
__name: "JsonField",
|
|
1928
1928
|
props: {
|
|
@@ -1943,7 +1943,7 @@ const be = /* @__PURE__ */ N({
|
|
|
1943
1943
|
}
|
|
1944
1944
|
a.value = s, o("update:modelValue", s);
|
|
1945
1945
|
}
|
|
1946
|
-
const g =
|
|
1946
|
+
const g = C(() => t["data-1p-ignore"] !== void 0 ? t["data-1p-ignore"] : fe(e.name) === "name");
|
|
1947
1947
|
return ne(a, (l) => {
|
|
1948
1948
|
if (l && typeof l == "object") {
|
|
1949
1949
|
try {
|
|
@@ -1966,7 +1966,7 @@ const be = /* @__PURE__ */ N({
|
|
|
1966
1966
|
key: 1,
|
|
1967
1967
|
"data-testid": `ff-json-${d.path.value}`
|
|
1968
1968
|
}, [
|
|
1969
|
-
|
|
1969
|
+
K(be, W(r(f), {
|
|
1970
1970
|
class: "ff-json-field",
|
|
1971
1971
|
"data-1p-ignore": g.value,
|
|
1972
1972
|
"data-autofocus": e.autofocus ? "true" : void 0,
|
|
@@ -2014,14 +2014,14 @@ const be = /* @__PURE__ */ N({
|
|
|
2014
2014
|
const t = ye(), { i18n: { t: n } } = ve(), o = ue(e, ["autofocus", "name"]), a = c, { value: p, hide: d, ...f } = Z(E(() => e.name));
|
|
2015
2015
|
if (f.error)
|
|
2016
2016
|
throw new Error(f.error.message);
|
|
2017
|
-
const i = oe(f.path, E({ ...o, ...t })), h = p.value ? p.value.id : null, g =
|
|
2017
|
+
const i = oe(f.path, E({ ...o, ...t })), h = p.value ? p.value.id : null, g = C(() => {
|
|
2018
2018
|
var m;
|
|
2019
2019
|
return i.value.placeholder ? i.value.placeholder : n("plugins.free-form.foreign_placeholder", { entity: ((m = f.schema.value) == null ? void 0 : m.reference) ?? "entity" });
|
|
2020
2020
|
}), l = le(h ?? "");
|
|
2021
2021
|
function s(m) {
|
|
2022
2022
|
h !== void 0 && m === "" && m !== h ? (p.value = null, a("update:modelValue", null)) : (p.value = { id: m.trim() }, a("update:modelValue", p.value));
|
|
2023
2023
|
}
|
|
2024
|
-
const u =
|
|
2024
|
+
const u = C(() => t["data-1p-ignore"] !== void 0 ? t["data-1p-ignore"] : fe(e.name) === "name");
|
|
2025
2025
|
return (m, b) => {
|
|
2026
2026
|
var y;
|
|
2027
2027
|
return Y((w(), q(be, W(r(i), {
|
|
@@ -2071,23 +2071,23 @@ const be = /* @__PURE__ */ N({
|
|
|
2071
2071
|
removeKey: f,
|
|
2072
2072
|
field: i,
|
|
2073
2073
|
fieldDisplayName: h
|
|
2074
|
-
} = ua(E(n, "name"), _), g = oe(i.path, n), l = ["string", "number", "boolean", "integer", "foreign"], s =
|
|
2074
|
+
} = ua(E(n, "name"), _), g = oe(i.path, n), l = ["string", "number", "boolean", "integer", "foreign"], s = C(() => {
|
|
2075
2075
|
var k, S, L, V;
|
|
2076
2076
|
return n.oneLine ? !0 : ((S = (k = i.schema) == null ? void 0 : k.value) == null ? void 0 : S.type) === "map" && l.includes(i.schema.value.values.type) && !((V = (L = n.appearance) == null ? void 0 : L.string) != null && V.multiline);
|
|
2077
|
-
}), u =
|
|
2077
|
+
}), u = C(() => {
|
|
2078
2078
|
var k, S;
|
|
2079
2079
|
return ((S = (k = i.schema) == null ? void 0 : k.value) == null ? void 0 : S.type) === "map" ? i.schema.value.values : void 0;
|
|
2080
|
-
}), m =
|
|
2080
|
+
}), m = C(() => {
|
|
2081
2081
|
var k, S;
|
|
2082
2082
|
return ((k = u.value) == null ? void 0 : k.type) === "string" && !((S = u.value) != null && S.one_of);
|
|
2083
|
-
}), b =
|
|
2083
|
+
}), b = C(() => s.value ? "div" : Ee), y = at("root");
|
|
2084
2084
|
function v(k, S) {
|
|
2085
2085
|
var L, V;
|
|
2086
2086
|
(V = (L = n.appearance) == null ? void 0 : L.string) != null && V.multiline || (k.preventDefault(), S === a.value.length - 1 && d(), A(S + 1));
|
|
2087
2087
|
}
|
|
2088
2088
|
async function A(k) {
|
|
2089
2089
|
var S;
|
|
2090
|
-
y.value && (await
|
|
2090
|
+
y.value && (await Re(), (S = y.value.querySelector(`[data-key-input="${k}"]`)) == null || S.focus());
|
|
2091
2091
|
}
|
|
2092
2092
|
function I() {
|
|
2093
2093
|
d();
|
|
@@ -2099,7 +2099,7 @@ const be = /* @__PURE__ */ N({
|
|
|
2099
2099
|
}
|
|
2100
2100
|
return (k, S) => {
|
|
2101
2101
|
var T;
|
|
2102
|
-
const L = F("KAlert"), V = F("KLabel"), B = F("KButton"),
|
|
2102
|
+
const L = F("KAlert"), V = F("KLabel"), B = F("KButton"), P = F("KTooltip");
|
|
2103
2103
|
return r(i).error ? (w(), q(L, {
|
|
2104
2104
|
key: 0,
|
|
2105
2105
|
appearance: "danger",
|
|
@@ -2116,7 +2116,7 @@ const be = /* @__PURE__ */ N({
|
|
|
2116
2116
|
class: "ff-map-field-header",
|
|
2117
2117
|
"data-testid": `ff-map-header-${r(i).path.value}`
|
|
2118
2118
|
}, [
|
|
2119
|
-
|
|
2119
|
+
K(V, W({ class: "ff-map-field-label" }, r(g).labelAttributes, {
|
|
2120
2120
|
"data-testid": `ff-label-${r(i).path.value}`,
|
|
2121
2121
|
required: r(g).required,
|
|
2122
2122
|
"tooltip-attributes": r(g).labelAttributes.tooltipAttributes
|
|
@@ -2141,7 +2141,7 @@ const be = /* @__PURE__ */ N({
|
|
|
2141
2141
|
], 8, nn)) : z("", !0),
|
|
2142
2142
|
(w(!0), j(te, null, se(r(a), ([$, ee], H) => (w(), q(re(b.value), {
|
|
2143
2143
|
key: $,
|
|
2144
|
-
class:
|
|
2144
|
+
class: Pe(["ff-map-field-item", {
|
|
2145
2145
|
"ff-map-field-item-simple": s.value,
|
|
2146
2146
|
"ff-map-field-item-complex": !s.value
|
|
2147
2147
|
}]),
|
|
@@ -2149,7 +2149,7 @@ const be = /* @__PURE__ */ N({
|
|
|
2149
2149
|
}, {
|
|
2150
2150
|
default: x(() => [
|
|
2151
2151
|
U("div", rn, [
|
|
2152
|
-
|
|
2152
|
+
K(be, {
|
|
2153
2153
|
class: "ff-map-field-fields-key",
|
|
2154
2154
|
"data-key-input": H,
|
|
2155
2155
|
"data-testid": `ff-map-key-${r(i).path.value}.${H}`,
|
|
@@ -2174,11 +2174,11 @@ const be = /* @__PURE__ */ N({
|
|
|
2174
2174
|
];
|
|
2175
2175
|
}, !0)
|
|
2176
2176
|
]),
|
|
2177
|
-
|
|
2177
|
+
K(P, {
|
|
2178
2178
|
text: r(t).t("actions.remove_entity", { entity: r(h) })
|
|
2179
2179
|
}, {
|
|
2180
2180
|
default: x(() => [
|
|
2181
|
-
|
|
2181
|
+
K(B, {
|
|
2182
2182
|
appearance: "tertiary",
|
|
2183
2183
|
"aria-label": r(t).t("actions.remove_entity", { entity: r(h) }),
|
|
2184
2184
|
"data-testid": `ff-map-remove-btn-${r(i).path.value}.${H}`,
|
|
@@ -2186,7 +2186,7 @@ const be = /* @__PURE__ */ N({
|
|
|
2186
2186
|
onClick: (J) => r(f)($)
|
|
2187
2187
|
}, {
|
|
2188
2188
|
default: x(() => [
|
|
2189
|
-
|
|
2189
|
+
K(r(st))
|
|
2190
2190
|
]),
|
|
2191
2191
|
_: 1
|
|
2192
2192
|
}, 8, ["aria-label", "data-testid", "onClick"])
|
|
@@ -2196,7 +2196,7 @@ const be = /* @__PURE__ */ N({
|
|
|
2196
2196
|
]),
|
|
2197
2197
|
_: 2
|
|
2198
2198
|
}, 1032, ["class", "data-testid"]))), 128)),
|
|
2199
|
-
|
|
2199
|
+
K(B, {
|
|
2200
2200
|
appearance: "tertiary",
|
|
2201
2201
|
"aria-label": r(t).t("actions.add_entity", { entity: r(h) }),
|
|
2202
2202
|
class: "ff-map-field-add-entry-btn",
|
|
@@ -2204,7 +2204,7 @@ const be = /* @__PURE__ */ N({
|
|
|
2204
2204
|
onClick: I
|
|
2205
2205
|
}, {
|
|
2206
2206
|
default: x(() => [
|
|
2207
|
-
|
|
2207
|
+
K(r(Oe)),
|
|
2208
2208
|
me(" " + de(r(t).t("actions.add_entity", { entity: r(h) })), 1)
|
|
2209
2209
|
]),
|
|
2210
2210
|
_: 1
|
|
@@ -2224,20 +2224,20 @@ const be = /* @__PURE__ */ N({
|
|
|
2224
2224
|
},
|
|
2225
2225
|
emits: ["globalAction"],
|
|
2226
2226
|
setup(e) {
|
|
2227
|
-
const c = e, t = Z(E(c, "name")), n =
|
|
2227
|
+
const c = e, t = Z(E(c, "name")), n = C(() => {
|
|
2228
2228
|
var o, a;
|
|
2229
2229
|
switch ((a = (o = t.schema) == null ? void 0 : o.value) == null ? void 0 : a.type) {
|
|
2230
2230
|
case "string":
|
|
2231
|
-
return "one_of" in t.schema.value ?
|
|
2231
|
+
return "one_of" in t.schema.value ? Ce : ht;
|
|
2232
2232
|
case "boolean":
|
|
2233
|
-
return "one_of" in t.schema.value ?
|
|
2233
|
+
return "one_of" in t.schema.value ? Ce : ya;
|
|
2234
2234
|
case "number":
|
|
2235
2235
|
case "integer":
|
|
2236
|
-
return "one_of" in t.schema.value ?
|
|
2236
|
+
return "one_of" in t.schema.value ? Ce : Ha;
|
|
2237
2237
|
case "array":
|
|
2238
2238
|
return Ia;
|
|
2239
2239
|
case "set":
|
|
2240
|
-
return Ut(t.schema) ? gt :
|
|
2240
|
+
return Ut(t.schema) ? gt : Ce;
|
|
2241
2241
|
case "record":
|
|
2242
2242
|
return Ba;
|
|
2243
2243
|
case "map":
|
|
@@ -2293,11 +2293,11 @@ const be = /* @__PURE__ */ N({
|
|
|
2293
2293
|
setup(e, { expose: c, emit: t }) {
|
|
2294
2294
|
const n = t, o = we(), { getSchema: a, formData: p, setValue: d, getValue: f, rootRenderRules: i } = ta({
|
|
2295
2295
|
schema: e.schema,
|
|
2296
|
-
propsData:
|
|
2296
|
+
propsData: C(() => e.data),
|
|
2297
2297
|
propsConfig: e.config,
|
|
2298
2298
|
propsRenderRules: E(() => e.renderRules),
|
|
2299
2299
|
onChange: (g) => n("change", g)
|
|
2300
|
-
}), h =
|
|
2300
|
+
}), h = C(() => {
|
|
2301
2301
|
var s;
|
|
2302
2302
|
const { fields: g } = a();
|
|
2303
2303
|
let l = [...g];
|
|
@@ -3519,7 +3519,14 @@ const be = /* @__PURE__ */ N({
|
|
|
3519
3519
|
error_on_miss_reject_label: "Reject the request",
|
|
3520
3520
|
error_on_miss_reject_description: "Treat the request as unauthenticated if Kong Identity cannot resolve the principal.",
|
|
3521
3521
|
error_on_miss_continue_label: "Continue without a principal",
|
|
3522
|
-
error_on_miss_continue_description: "Allow the request to continue without resolving a principal."
|
|
3522
|
+
error_on_miss_continue_description: "Allow the request to continue without resolving a principal.",
|
|
3523
|
+
configure_title: "Configure Kong Identity",
|
|
3524
|
+
configure_description: "Kong Identity uses principals to represent authenticated users, services, or applications. Create your first principal in Kong Identity to start using principal-based authentication.",
|
|
3525
|
+
create_principal: "Create principal",
|
|
3526
|
+
configure_learn_more: "Learn more",
|
|
3527
|
+
leave_prompt_title: "Leave this page?",
|
|
3528
|
+
leave_prompt_message: "Your unsaved changes will be lost if you continue.",
|
|
3529
|
+
leave_prompt_action: "Leave page"
|
|
3523
3530
|
}
|
|
3524
3531
|
}, bn = {
|
|
3525
3532
|
window_type: {
|
|
@@ -3757,7 +3764,7 @@ const kn = ["data-testid"], Sn = /* @__PURE__ */ N({
|
|
|
3757
3764
|
class: "ff-switch-field",
|
|
3758
3765
|
"data-testid": `ff-${d.path.value}`
|
|
3759
3766
|
}, [
|
|
3760
|
-
|
|
3767
|
+
K(r(jt), W(r(h), {
|
|
3761
3768
|
"model-value": !!(r(o) == null ? r(p) : r(o)),
|
|
3762
3769
|
"onUpdate:modelValue": i
|
|
3763
3770
|
}), {
|
|
@@ -3775,7 +3782,7 @@ const kn = ["data-testid"], Sn = /* @__PURE__ */ N({
|
|
|
3775
3782
|
export {
|
|
3776
3783
|
Ia as ArrayField,
|
|
3777
3784
|
ya as BooleanField,
|
|
3778
|
-
|
|
3785
|
+
Ce as EnumField,
|
|
3779
3786
|
Se as FIELD_RENDERERS,
|
|
3780
3787
|
ge as Field,
|
|
3781
3788
|
jn as FieldRenderer,
|
|
@@ -3788,5 +3795,5 @@ export {
|
|
|
3788
3795
|
gt as StringArrayField,
|
|
3789
3796
|
ht as StringField,
|
|
3790
3797
|
En as SwitchField,
|
|
3791
|
-
|
|
3798
|
+
Rn as renderRuleExactMatch
|
|
3792
3799
|
};
|