@kong-ui-public/entities-plugins 9.267.1 → 9.267.2
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { toValue as It, warn as vy, onScopeDispose as yy, inject as Ze, openBlock as b, createElementBlock as D, createElementVNode as O, computed as I, ref as G, nextTick as tn, shallowRef as Cn, watch as
|
|
1
|
+
import { toValue as It, warn as vy, onScopeDispose as yy, inject as Ze, openBlock as b, createElementBlock as D, createElementVNode as O, computed as I, ref as G, nextTick as tn, shallowRef as Cn, watch as Be, provide as Tt, readonly as _y, defineComponent as le, normalizeClass as ft, toDisplayString as M, createCommentVNode as X, unref as s, withModifiers as St, normalizeStyle as io, Fragment as Se, renderList as Ye, createBlock as L, withCtx as C, resolveDynamicComponent as Rt, useCssVars as dr, resolveComponent as ne, createSlots as ct, createTextVNode as re, useSlots as Yt, createVNode as y, renderSlot as Je, useTemplateRef as Et, mergeProps as Le, useModel as li, onMounted as pn, mergeModels as ci, toRef as vt, isRef as Wc, markRaw as Wf, onBeforeUnmount as pr, reactive as si, toRaw as Is, onUnmounted as fr, createPropsRestProxy as Tn, withDirectives as Bt, vShow as zt, normalizeProps as In, useAttrs as Qn, guardReactiveProps as qn, Transition as by, useId as mr, onBeforeMount as Bi, withKeys as hi, Teleport as As, getCurrentInstance as ky, watchEffect as Yf, shallowReactive as wy } from "vue";
|
|
2
2
|
import { NetworkIcon as Cy, CachedIcon as Ey, ArrowSplitIcon as Jf, GatewayIcon as Sy, CodeblockIcon as Yc, DataObjectIcon as Iy, CodeIcon as Ay, StackIcon as Ty, DeployIcon as Xf, EditSquareIcon as $y, KeyIcon as Ts, CloudIcon as Er, WarningIcon as xy, MoreIcon as sa, UnfoldMoreIcon as kd, UnfoldLessIcon as wd, AddIcon as Ht, RemoveIcon as $s, FullscreenIcon as Ny, AutoLayoutIcon as Py, CloseIcon as ji, TrashIcon as Zf, ChevronRightIcon as Qf, InfoIcon as Oy, TeamIcon as Ry, AccountTreeIcon as Ly, BookIcon as Ga, SparklesIcon as My, ChevronDownIcon as Cd, ArrowLeftIcon as Fy, ChevronDoubleLeftIcon as Ky, ChevronDoubleRightIcon as Dy, UndoIcon as jy, RedoIcon as qy, ExternalLinkIcon as Vy, DatabaseIcon as Uy, ExpandIcon as By, DesignIcon as zy, WorldIcon as Gy, ClearIcon as Sr, CheckCircleIcon as Hy, SearchIcon as Wy, ArrowTopLeftIcon as Yy, PlugIcon as Jy, TransformationIcon as Xy, TrafficIcon as Zy, RuntimeServerlessIcon as Qy, SecurityIcon as e_, MoneyIcon as t_, ServiceDocumentIcon as n_, LockIcon as i_, AnalyticsIcon as o_, BotIcon as a_, PopularIcon as r_, GridIcon as s_, ListIcon as l_, GroupsIcon as c_, PasskeyIcon as u_ } from "@kong/icons";
|
|
3
3
|
import { KTooltip as Jn, KDropdown as em, KButton as on, KDropdownItem as Ur, KInputSwitch as Jc, KLabel as Wt, KTextArea as d_, KInput as vi, KCheckbox as Zr, KCard as Qr, KMultiselect as Xc, KSelect as es, KSegmentedControl as tm, KRadio as dn, KCollapse as xs, KExternalLink as Fi, KSkeletonBox as p_, KEmptyState as f_, KAlert as Zc, KPrompt as nm, KBadge as m_, KModal as g_, KSlideout as h_, KSkeleton as Ed, KTabs as v_ } from "@kong/kongponents";
|
|
4
4
|
import { Background as y_ } from "@vue-flow/background";
|
|
@@ -4696,8 +4696,8 @@ const [nh, gT] = Qc(
|
|
|
4696
4696
|
}
|
|
4697
4697
|
const m = I(() => {
|
|
4698
4698
|
const q = { request: 0, response: 0 };
|
|
4699
|
-
return i.value.nodes.forEach((
|
|
4700
|
-
wn(
|
|
4699
|
+
return i.value.nodes.forEach((U) => {
|
|
4700
|
+
wn(U.type) || q[U.phase]++;
|
|
4701
4701
|
}), q;
|
|
4702
4702
|
}), h = I(
|
|
4703
4703
|
() => new Map(
|
|
@@ -4709,12 +4709,12 @@ const [nh, gT] = Qc(
|
|
|
4709
4709
|
)
|
|
4710
4710
|
), g = I(
|
|
4711
4711
|
() => {
|
|
4712
|
-
const q = /* @__PURE__ */ new Map(),
|
|
4712
|
+
const q = /* @__PURE__ */ new Map(), U = /* @__PURE__ */ new Map();
|
|
4713
4713
|
for (const Q of i.value.edges)
|
|
4714
|
-
q.set(Q.id, Q),
|
|
4714
|
+
q.set(Q.id, Q), U.has(Q.source) || U.set(Q.source, /* @__PURE__ */ new Set()), U.get(Q.source).add(Q.id), U.has(Q.target) || U.set(Q.target, /* @__PURE__ */ new Set()), U.get(Q.target).add(Q.id);
|
|
4715
4715
|
return {
|
|
4716
4716
|
edgeMapById: q,
|
|
4717
|
-
edgeIdMapByNodeId:
|
|
4717
|
+
edgeIdMapByNodeId: U
|
|
4718
4718
|
};
|
|
4719
4719
|
}
|
|
4720
4720
|
), _ = I(() => g.value.edgeMapById), k = I(() => g.value.edgeIdMapByNodeId), w = I(
|
|
@@ -4742,17 +4742,17 @@ const [nh, gT] = Qc(
|
|
|
4742
4742
|
function j(q) {
|
|
4743
4743
|
if (!k.value.has(q))
|
|
4744
4744
|
return [];
|
|
4745
|
-
const
|
|
4745
|
+
const U = [];
|
|
4746
4746
|
return k.value.get(q).forEach((Q) => {
|
|
4747
4747
|
const ce = F(Q);
|
|
4748
|
-
ce &&
|
|
4749
|
-
}),
|
|
4748
|
+
ce && U.push(ce);
|
|
4749
|
+
}), U;
|
|
4750
4750
|
}
|
|
4751
4751
|
function V(q) {
|
|
4752
|
-
return j(q).filter(((
|
|
4752
|
+
return j(q).filter(((U) => U.target === q));
|
|
4753
4753
|
}
|
|
4754
4754
|
function oe(q) {
|
|
4755
|
-
return j(q).filter(((
|
|
4755
|
+
return j(q).filter(((U) => U.source === q));
|
|
4756
4756
|
}
|
|
4757
4757
|
const ge = I(
|
|
4758
4758
|
() => o.value ? A(o.value) : void 0
|
|
@@ -4763,7 +4763,7 @@ const [nh, gT] = Qc(
|
|
|
4763
4763
|
function z(q) {
|
|
4764
4764
|
a.value = q;
|
|
4765
4765
|
}
|
|
4766
|
-
function
|
|
4766
|
+
function B(q) {
|
|
4767
4767
|
if (wn(q.type))
|
|
4768
4768
|
throw new Error("[createNode] implicit nodes are fixed.");
|
|
4769
4769
|
return th({
|
|
@@ -4776,31 +4776,31 @@ const [nh, gT] = Qc(
|
|
|
4776
4776
|
config: q.config
|
|
4777
4777
|
});
|
|
4778
4778
|
}
|
|
4779
|
-
function ie(q,
|
|
4780
|
-
const Q =
|
|
4779
|
+
function ie(q, U = !0) {
|
|
4780
|
+
const Q = B(q);
|
|
4781
4781
|
if (Q)
|
|
4782
|
-
return i.value.nodes.push(Q),
|
|
4782
|
+
return i.value.nodes.push(Q), U && c.commit(), u.value = !0, Q.id;
|
|
4783
4783
|
}
|
|
4784
|
-
function Y(q,
|
|
4784
|
+
function Y(q, U, Q = !0) {
|
|
4785
4785
|
const ce = A(q);
|
|
4786
4786
|
if (!ce || wn(ce.type)) return;
|
|
4787
4787
|
const me = {
|
|
4788
4788
|
...yi(ce),
|
|
4789
4789
|
id: jo("node"),
|
|
4790
4790
|
name: up(ce.name, T.value),
|
|
4791
|
-
position:
|
|
4791
|
+
position: U ?? {
|
|
4792
4792
|
x: ce.position.x + 20,
|
|
4793
4793
|
y: ce.position.y + 20
|
|
4794
4794
|
}
|
|
4795
4795
|
}, we = tr(me.type);
|
|
4796
4796
|
if (we.length && me.config) {
|
|
4797
|
-
for (const
|
|
4798
|
-
delete me.config[
|
|
4797
|
+
for (const Ge of we)
|
|
4798
|
+
delete me.config[Ge];
|
|
4799
4799
|
Object.keys(me.config).length === 0 && delete me.config;
|
|
4800
4800
|
}
|
|
4801
4801
|
return i.value.nodes.push(me), Q && c.commit(), u.value = !0, me.id;
|
|
4802
4802
|
}
|
|
4803
|
-
function ue(q,
|
|
4803
|
+
function ue(q, U = !0) {
|
|
4804
4804
|
if (!A(q)) return;
|
|
4805
4805
|
i.value.edges = i.value.edges.filter(
|
|
4806
4806
|
(me) => me.source !== q && me.target !== q
|
|
@@ -4808,74 +4808,74 @@ const [nh, gT] = Qc(
|
|
|
4808
4808
|
(me) => me.id !== q
|
|
4809
4809
|
), o.value === q && (o.value = void 0);
|
|
4810
4810
|
const ce = $();
|
|
4811
|
-
ce.ok || console.warn("[removeNode] topology invalid:", ce.errors.join("; ")),
|
|
4811
|
+
ce.ok || console.warn("[removeNode] topology invalid:", ce.errors.join("; ")), U && c.commit();
|
|
4812
4812
|
}
|
|
4813
|
-
function de(q,
|
|
4813
|
+
function de(q, U, Q = !0, ce) {
|
|
4814
4814
|
const me = A(q);
|
|
4815
4815
|
if (!me) return;
|
|
4816
4816
|
if (Au(me.name)) {
|
|
4817
4817
|
console.warn("[renameNode] implicit node name is reserved.");
|
|
4818
4818
|
return;
|
|
4819
4819
|
}
|
|
4820
|
-
me.name !==
|
|
4820
|
+
me.name !== U && (me.name = U, Q && c.commit(ce));
|
|
4821
4821
|
}
|
|
4822
|
-
function J(q,
|
|
4822
|
+
function J(q, U, Q = !0) {
|
|
4823
4823
|
const ce = A(q);
|
|
4824
|
-
ce && (ce.position = { ...
|
|
4824
|
+
ce && (ce.position = { ...U }, Q && c.commit());
|
|
4825
4825
|
}
|
|
4826
|
-
function fe(q,
|
|
4826
|
+
function fe(q, U, Q = !0) {
|
|
4827
4827
|
const ce = w.value.get(q);
|
|
4828
4828
|
if (!ce) return;
|
|
4829
4829
|
const me = ce.position;
|
|
4830
|
-
me && me.x ===
|
|
4830
|
+
me && me.x === U.x && me.y === U.y || (ce.position = { ...U }, Q && c.commit());
|
|
4831
4831
|
}
|
|
4832
|
-
function Te(q,
|
|
4832
|
+
function Te(q, U, Q = !0) {
|
|
4833
4833
|
const ce = w.value.get(q);
|
|
4834
4834
|
if (!ce) return !1;
|
|
4835
|
-
const me = { ...
|
|
4836
|
-
return
|
|
4835
|
+
const me = { ...U.position }, we = { ...U.dimensions }, Ge = ce.position && ce.position.x === me.x && ce.position.y === me.y, rt = ce.dimensions && ce.dimensions.width === we.width && ce.dimensions.height === we.height;
|
|
4836
|
+
return Ge && rt ? !1 : (ce.position = me, ce.dimensions = we, Q && c.commit(), !0);
|
|
4837
4837
|
}
|
|
4838
|
-
function _e(q,
|
|
4838
|
+
function _e(q, U, Q, ce = !0, me) {
|
|
4839
4839
|
const we = A(q);
|
|
4840
4840
|
if (!we) return;
|
|
4841
|
-
const
|
|
4842
|
-
|
|
4841
|
+
const Ge = Q ?? !we.expanded[U];
|
|
4842
|
+
Ge !== !!we.expanded[U] && (we.expanded[U] = Ge, ce && c.commit(me ?? `toggle:${q}:${U}`));
|
|
4843
4843
|
}
|
|
4844
|
-
function
|
|
4844
|
+
function ze(q, U, Q = !0, ce) {
|
|
4845
4845
|
const me = A(q);
|
|
4846
|
-
me && (me.config = yi(
|
|
4846
|
+
me && (me.config = yi(U), Q && c.commit(ce));
|
|
4847
4847
|
}
|
|
4848
|
-
function se(q,
|
|
4848
|
+
function se(q, U, Q, ce = !0) {
|
|
4849
4849
|
const me = A(q);
|
|
4850
4850
|
if (!me) return;
|
|
4851
|
-
const we = me.fields[
|
|
4852
|
-
if (we.some((
|
|
4853
|
-
console.warn(`[addField] field "${Q}" already exists on ${
|
|
4851
|
+
const we = me.fields[U];
|
|
4852
|
+
if (we.some((Ge) => Ge.name === Q)) {
|
|
4853
|
+
console.warn(`[addField] field "${Q}" already exists on ${U}.`);
|
|
4854
4854
|
return;
|
|
4855
4855
|
}
|
|
4856
|
-
we.push({ id: jo("field"), name: Q }),
|
|
4856
|
+
we.push({ id: jo("field"), name: Q }), U === "input" ? me.fields.input = we : me.fields.output = we, ce && c.commit();
|
|
4857
4857
|
}
|
|
4858
|
-
function te(q,
|
|
4858
|
+
function te(q, U, Q, ce = !0) {
|
|
4859
4859
|
const me = A(q);
|
|
4860
4860
|
if (!me) return;
|
|
4861
|
-
const we = me.fields.input,
|
|
4861
|
+
const we = me.fields.input, Ge = me.fields.output, rt = we.find((Me) => Me.id === U) ?? Ge.find((Me) => Me.id === U);
|
|
4862
4862
|
rt && (rt.name = Q, ce && c.commit());
|
|
4863
4863
|
}
|
|
4864
|
-
function he(q,
|
|
4864
|
+
function he(q, U, Q = !0, ce = !0) {
|
|
4865
4865
|
const me = A(q);
|
|
4866
4866
|
if (!me) return;
|
|
4867
|
-
const we = me.fields.input,
|
|
4867
|
+
const we = me.fields.input, Ge = me.fields.output, rt = we.findIndex((Ne) => Ne.id === U);
|
|
4868
4868
|
rt >= 0 && we.splice(rt, 1);
|
|
4869
|
-
const Me =
|
|
4870
|
-
(Ne) => Ne.id ===
|
|
4869
|
+
const Me = Ge.findIndex(
|
|
4870
|
+
(Ne) => Ne.id === U
|
|
4871
4871
|
);
|
|
4872
|
-
Me >= 0 &&
|
|
4873
|
-
(Ne) => Ne.sourceField !==
|
|
4872
|
+
Me >= 0 && Ge.splice(Me, 1), me.fields.input = we, me.fields.output = Ge, Q && (i.value.edges = i.value.edges.filter(
|
|
4873
|
+
(Ne) => Ne.sourceField !== U && Ne.targetField !== U
|
|
4874
4874
|
));
|
|
4875
4875
|
const Jt = $();
|
|
4876
4876
|
Jt.ok || console.warn("[removeField] topology invalid:", Jt.errors.join("; ")), ce && c.commit();
|
|
4877
4877
|
}
|
|
4878
|
-
function Ie(q,
|
|
4878
|
+
function Ie(q, U = !0) {
|
|
4879
4879
|
const Q = E(q), ce = P(Q);
|
|
4880
4880
|
if (!ce.ok) {
|
|
4881
4881
|
console.warn(
|
|
@@ -4891,12 +4891,12 @@ const [nh, gT] = Qc(
|
|
|
4891
4891
|
i.value.edges.pop(), console.warn("[connectEdge] topology invalid:", we.errors.join("; "));
|
|
4892
4892
|
return;
|
|
4893
4893
|
}
|
|
4894
|
-
return
|
|
4894
|
+
return U && c.commit(), me.id;
|
|
4895
4895
|
}
|
|
4896
|
-
function De(q,
|
|
4897
|
-
je(q, !1), Ie(
|
|
4896
|
+
function De(q, U, Q = !0) {
|
|
4897
|
+
je(q, !1), Ie(U, !1), Q && c.commit();
|
|
4898
4898
|
}
|
|
4899
|
-
function je(q,
|
|
4899
|
+
function je(q, U = !0) {
|
|
4900
4900
|
const Q = i.value.edges.findIndex((we) => we.id === q);
|
|
4901
4901
|
if (Q < 0) return;
|
|
4902
4902
|
const ce = i.value.edges[Q];
|
|
@@ -4909,54 +4909,54 @@ const [nh, gT] = Qc(
|
|
|
4909
4909
|
);
|
|
4910
4910
|
return;
|
|
4911
4911
|
}
|
|
4912
|
-
|
|
4912
|
+
U && c.commit();
|
|
4913
4913
|
}
|
|
4914
|
-
function Ae(q,
|
|
4914
|
+
function Ae(q, U = !0) {
|
|
4915
4915
|
const Q = V(q);
|
|
4916
4916
|
for (const ce of Q)
|
|
4917
4917
|
je(ce.id, !1);
|
|
4918
|
-
|
|
4918
|
+
U && c.commit();
|
|
4919
4919
|
}
|
|
4920
|
-
function Oe(q,
|
|
4920
|
+
function Oe(q, U = !0) {
|
|
4921
4921
|
const Q = oe(q);
|
|
4922
4922
|
for (const ce of Q)
|
|
4923
4923
|
je(ce.id, !1);
|
|
4924
|
-
|
|
4924
|
+
U && c.commit();
|
|
4925
4925
|
}
|
|
4926
4926
|
function Re() {
|
|
4927
4927
|
const q = [];
|
|
4928
|
-
for (const
|
|
4929
|
-
if (wn(
|
|
4928
|
+
for (const U of i.value.nodes) {
|
|
4929
|
+
if (wn(U.type))
|
|
4930
4930
|
continue;
|
|
4931
4931
|
let Q;
|
|
4932
4932
|
const ce = {};
|
|
4933
4933
|
let me;
|
|
4934
4934
|
const we = {};
|
|
4935
|
-
for (const Ne of i.value.edges.filter((Ve) => Ve.target ===
|
|
4935
|
+
for (const Ne of i.value.edges.filter((Ve) => Ve.target === U.id)) {
|
|
4936
4936
|
const Ve = A(Ne.source);
|
|
4937
4937
|
if (!Ve)
|
|
4938
4938
|
continue;
|
|
4939
|
-
const st = Ri(Ve, "output", Ne.sourceField)?.name, yt = st ? `${Ve.name}.${st}` : Ve.name, ke = Ri(
|
|
4939
|
+
const st = Ri(Ve, "output", Ne.sourceField)?.name, yt = st ? `${Ve.name}.${st}` : Ve.name, ke = Ri(U, "input", Ne.targetField)?.name;
|
|
4940
4940
|
ke ? ce[ke] = yt : Q === void 0 && (Q = yt);
|
|
4941
4941
|
}
|
|
4942
|
-
for (const Ne of i.value.edges.filter((Ve) => Ve.source ===
|
|
4942
|
+
for (const Ne of i.value.edges.filter((Ve) => Ve.source === U.id)) {
|
|
4943
4943
|
const Ve = A(Ne.target);
|
|
4944
4944
|
if (!Ve)
|
|
4945
4945
|
continue;
|
|
4946
4946
|
const st = Ve.type;
|
|
4947
4947
|
if (!wn(st) || !Ks[st].io?.input)
|
|
4948
4948
|
continue;
|
|
4949
|
-
const yt = Ri(Ve, "input", Ne.targetField)?.name, ke = yt ? `${Ve.name}.${yt}` : Ve.name, Pe = Ri(
|
|
4949
|
+
const yt = Ri(Ve, "input", Ne.targetField)?.name, ke = yt ? `${Ve.name}.${yt}` : Ve.name, Pe = Ri(U, "output", Ne.sourceField)?.name;
|
|
4950
4950
|
Pe ? we[Pe] = ke : me === void 0 && (me = ke);
|
|
4951
4951
|
}
|
|
4952
|
-
const
|
|
4953
|
-
...yi(
|
|
4954
|
-
name:
|
|
4955
|
-
type:
|
|
4956
|
-
}, rt = tr(
|
|
4952
|
+
const Ge = {
|
|
4953
|
+
...yi(U.config),
|
|
4954
|
+
name: U.name,
|
|
4955
|
+
type: U.type
|
|
4956
|
+
}, rt = tr(U.type);
|
|
4957
4957
|
if (rt.length)
|
|
4958
4958
|
for (const Ne of rt) {
|
|
4959
|
-
const Ve =
|
|
4959
|
+
const Ve = Ge[Ne];
|
|
4960
4960
|
if (!Array.isArray(Ve))
|
|
4961
4961
|
continue;
|
|
4962
4962
|
const st = [];
|
|
@@ -4964,9 +4964,9 @@ const [nh, gT] = Qc(
|
|
|
4964
4964
|
const ke = A(yt);
|
|
4965
4965
|
ke && st.push(ke.name);
|
|
4966
4966
|
}
|
|
4967
|
-
st.length ?
|
|
4967
|
+
st.length ? Ge[Ne] = Array.from(new Set(st)) : delete Ge[Ne];
|
|
4968
4968
|
}
|
|
4969
|
-
Object.keys(ce).length > 0 ?
|
|
4969
|
+
Object.keys(ce).length > 0 ? Ge.inputs = ce : Q !== void 0 && (Ge.input = Q), Object.keys(we).length > 0 ? Ge.outputs = we : me !== void 0 && (Ge.output = me), q.push(Ge);
|
|
4970
4970
|
}
|
|
4971
4971
|
return q;
|
|
4972
4972
|
}
|
|
@@ -4978,16 +4978,16 @@ const [nh, gT] = Qc(
|
|
|
4978
4978
|
position: { ...q.position },
|
|
4979
4979
|
expanded: { ...q.expanded },
|
|
4980
4980
|
fields: {
|
|
4981
|
-
input: q.fields.input.map((
|
|
4982
|
-
output: q.fields.output.map((
|
|
4981
|
+
input: q.fields.input.map((U) => U.name),
|
|
4982
|
+
output: q.fields.output.map((U) => U.name)
|
|
4983
4983
|
}
|
|
4984
4984
|
})
|
|
4985
4985
|
);
|
|
4986
4986
|
}
|
|
4987
4987
|
function pe() {
|
|
4988
|
-
const q = {},
|
|
4989
|
-
if (
|
|
4990
|
-
const Q = lT(
|
|
4988
|
+
const q = {}, U = N("vault");
|
|
4989
|
+
if (U) {
|
|
4990
|
+
const Q = lT(U.config);
|
|
4991
4991
|
Q && Object.keys(Q).length > 0 && (q.vault = Q);
|
|
4992
4992
|
}
|
|
4993
4993
|
if (i.value.cacheConfig) {
|
|
@@ -4999,12 +4999,12 @@ const [nh, gT] = Qc(
|
|
|
4999
4999
|
}
|
|
5000
5000
|
function ee() {
|
|
5001
5001
|
const q = [];
|
|
5002
|
-
for (const
|
|
5003
|
-
const Q = A(
|
|
5002
|
+
for (const U of i.value.groups) {
|
|
5003
|
+
const Q = A(U.ownerId);
|
|
5004
5004
|
if (!Q) continue;
|
|
5005
|
-
const ce =
|
|
5005
|
+
const ce = U.position;
|
|
5006
5006
|
ce && q.push({
|
|
5007
|
-
name: Hr(Q.name,
|
|
5007
|
+
name: Hr(Q.name, U.branch),
|
|
5008
5008
|
position: { ...ce }
|
|
5009
5009
|
});
|
|
5010
5010
|
}
|
|
@@ -5016,8 +5016,8 @@ const [nh, gT] = Qc(
|
|
|
5016
5016
|
groups: ee()
|
|
5017
5017
|
};
|
|
5018
5018
|
}
|
|
5019
|
-
function ae(q,
|
|
5020
|
-
|
|
5019
|
+
function ae(q, U) {
|
|
5020
|
+
U && c.commit(), i.value = xp(q, U), U || c.clear();
|
|
5021
5021
|
}
|
|
5022
5022
|
return {
|
|
5023
5023
|
// state
|
|
@@ -5045,7 +5045,7 @@ const [nh, gT] = Qc(
|
|
|
5045
5045
|
selectNode: Z,
|
|
5046
5046
|
selectPortalEdge: z,
|
|
5047
5047
|
// node ops
|
|
5048
|
-
createNode:
|
|
5048
|
+
createNode: B,
|
|
5049
5049
|
addNode: ie,
|
|
5050
5050
|
duplicateNode: Y,
|
|
5051
5051
|
removeNode: ue,
|
|
@@ -5054,7 +5054,7 @@ const [nh, gT] = Qc(
|
|
|
5054
5054
|
moveGroup: fe,
|
|
5055
5055
|
setGroupLayout: Te,
|
|
5056
5056
|
toggleExpanded: _e,
|
|
5057
|
-
replaceConfig:
|
|
5057
|
+
replaceConfig: ze,
|
|
5058
5058
|
branchGroups: S,
|
|
5059
5059
|
// field ops
|
|
5060
5060
|
addField: se,
|
|
@@ -5141,14 +5141,14 @@ function hT(e) {
|
|
|
5141
5141
|
const fe = J.source, Te = J.target;
|
|
5142
5142
|
if (m(fe) || m(Te))
|
|
5143
5143
|
continue;
|
|
5144
|
-
const _e = oe(fe),
|
|
5144
|
+
const _e = oe(fe), ze = oe(Te);
|
|
5145
5145
|
if (_e) {
|
|
5146
|
-
if (!
|
|
5146
|
+
if (!ze)
|
|
5147
5147
|
throw new Error(`Cannot find target node '${Te}' for edge '${J.id}' via findNode`);
|
|
5148
5148
|
} else throw new Error(`Cannot find source node '${fe}' for edge '${J.id}' via findNode`);
|
|
5149
|
-
if (z(_e) === z(
|
|
5149
|
+
if (z(_e) === z(ze))
|
|
5150
5150
|
continue;
|
|
5151
|
-
let se = _e, te =
|
|
5151
|
+
let se = _e, te = ze, he = Z(se.id), Ie = Z(te.id);
|
|
5152
5152
|
for (; he !== Ie; )
|
|
5153
5153
|
if (he > Ie) {
|
|
5154
5154
|
const De = z(se);
|
|
@@ -5193,8 +5193,8 @@ function hT(e) {
|
|
|
5193
5193
|
se = Ae, te = Oe, he--, Ie--;
|
|
5194
5194
|
}
|
|
5195
5195
|
}
|
|
5196
|
-
const
|
|
5197
|
-
for (const J of
|
|
5196
|
+
const B = l.value.groups.toSorted((J, fe) => Z(fe.ownerId) - Z(J.ownerId));
|
|
5197
|
+
for (const J of B)
|
|
5198
5198
|
x(
|
|
5199
5199
|
J.memberIds.reduce((fe, Te) => {
|
|
5200
5200
|
const _e = u(Te);
|
|
@@ -5202,8 +5202,8 @@ function hT(e) {
|
|
|
5202
5202
|
return console.warn(`Cannot find node '${Te}' of group '${J.id}' by getNodeById`), fe;
|
|
5203
5203
|
if (_e.phase !== n) return fe;
|
|
5204
5204
|
if (_e.type === "branch") {
|
|
5205
|
-
const
|
|
5206
|
-
|
|
5205
|
+
const ze = h.value.get(_e.id);
|
|
5206
|
+
ze && fe.push(...ze);
|
|
5207
5207
|
}
|
|
5208
5208
|
return F.delete(_e.id), fe.push(_e), fe;
|
|
5209
5209
|
}, []),
|
|
@@ -5228,9 +5228,9 @@ function hT(e) {
|
|
|
5228
5228
|
}
|
|
5229
5229
|
function x(N, F) {
|
|
5230
5230
|
const { leftNode: j, rightNode: V, virtualEdges: oe, cachedFindNode: ge } = F || {}, Z = j ? (ge ?? r)(j.id) : void 0, z = V ? (ge ?? r)(V.id) : void 0;
|
|
5231
|
-
let
|
|
5231
|
+
let B;
|
|
5232
5232
|
if (N.length > 0) {
|
|
5233
|
-
|
|
5233
|
+
B = new xg.Graph({ multigraph: !0 }), B.setGraph({
|
|
5234
5234
|
rankdir: n === "request" ? "LR" : "RL",
|
|
5235
5235
|
nodesep: E,
|
|
5236
5236
|
edgesep: P,
|
|
@@ -5243,11 +5243,11 @@ function hT(e) {
|
|
|
5243
5243
|
console.warn(`Cannot find graph node '${te.id}' in ${n} phase`);
|
|
5244
5244
|
continue;
|
|
5245
5245
|
}
|
|
5246
|
-
se.add(te.id), Ta(te) ?
|
|
5246
|
+
se.add(te.id), Ta(te) ? B.setNode(te.id, { ...te.dimensions ?? he.dimensions }) : B.setNode(te.id, { ...he.dimensions });
|
|
5247
5247
|
}
|
|
5248
5248
|
for (const te of a.value)
|
|
5249
|
-
!se.has(te.source) || !se.has(te.target) ||
|
|
5250
|
-
oe?.forEach((te) =>
|
|
5249
|
+
!se.has(te.source) || !se.has(te.target) || B.setEdge(te.source, te.target, { points: [] });
|
|
5250
|
+
oe?.forEach((te) => B.setEdge(te, { points: [] })), MA(B);
|
|
5251
5251
|
}
|
|
5252
5252
|
const ie = [], Y = (se) => ({
|
|
5253
5253
|
x: se.x - se.width / 2,
|
|
@@ -5256,10 +5256,10 @@ function hT(e) {
|
|
|
5256
5256
|
height: se.height
|
|
5257
5257
|
});
|
|
5258
5258
|
if (N.length > 0) {
|
|
5259
|
-
if (!
|
|
5259
|
+
if (!B)
|
|
5260
5260
|
throw new Error("Expected dagreGraph to be initialized");
|
|
5261
5261
|
for (const se of N) {
|
|
5262
|
-
const te =
|
|
5262
|
+
const te = B.node(se.id), he = Y(te);
|
|
5263
5263
|
ie.push(he), Ta(se) ? _(
|
|
5264
5264
|
se.id,
|
|
5265
5265
|
he,
|
|
@@ -5271,13 +5271,13 @@ function hT(e) {
|
|
|
5271
5271
|
const ue = ie.length > 0 ? Tg(ie) : { x: 0, y: 0, width: 0, height: 0 }, de = ue.width, J = ue.height, fe = ue.x, Te = ue.x + ue.width, _e = Math.max(
|
|
5272
5272
|
0,
|
|
5273
5273
|
Math.min(It(w?.width) ?? Number.POSITIVE_INFINITY, Gb) - de - 2 * E - (Z?.dimensions?.width ?? 0) - (z?.dimensions?.width ?? 0) - 2 * T
|
|
5274
|
-
),
|
|
5274
|
+
), ze = ue.y + J / 2;
|
|
5275
5275
|
j && d(j.id, {
|
|
5276
5276
|
x: fe - E - _e / 2 - (Z?.dimensions?.width ?? 0),
|
|
5277
|
-
y:
|
|
5277
|
+
y: ze - (Z?.dimensions?.height ?? 0) / 2
|
|
5278
5278
|
}, !1), V && d(V.id, {
|
|
5279
5279
|
x: Te + E + _e / 2,
|
|
5280
|
-
y:
|
|
5280
|
+
y: ze - (z?.dimensions?.height ?? 0) / 2
|
|
5281
5281
|
}, !1);
|
|
5282
5282
|
}
|
|
5283
5283
|
function A(N) {
|
|
@@ -5396,42 +5396,42 @@ function yT({
|
|
|
5396
5396
|
getGroupDepth: _
|
|
5397
5397
|
} = m, k = (z) => !!z && z.startsWith("branch:");
|
|
5398
5398
|
function w(z) {
|
|
5399
|
-
const
|
|
5399
|
+
const B = [];
|
|
5400
5400
|
for (const ie of z.memberIds) {
|
|
5401
5401
|
const Y = c(ie);
|
|
5402
|
-
Y &&
|
|
5402
|
+
Y && B.push(Y);
|
|
5403
5403
|
}
|
|
5404
|
-
return
|
|
5404
|
+
return B;
|
|
5405
5405
|
}
|
|
5406
5406
|
const T = I(() => {
|
|
5407
5407
|
const z = /* @__PURE__ */ new Map();
|
|
5408
|
-
return h.value.forEach((
|
|
5409
|
-
if (
|
|
5408
|
+
return h.value.forEach((B, ie) => {
|
|
5409
|
+
if (B.phase !== e || !B.position) return;
|
|
5410
5410
|
const Y = c(ie);
|
|
5411
|
-
Y && (Y.phase !== e || Y.hidden || z.set(ie,
|
|
5411
|
+
Y && (Y.phase !== e || Y.hidden || z.set(ie, B));
|
|
5412
5412
|
}), z;
|
|
5413
5413
|
}), S = I(() => {
|
|
5414
5414
|
const z = /* @__PURE__ */ new Map();
|
|
5415
|
-
return v.value.forEach((
|
|
5416
|
-
const Y =
|
|
5415
|
+
return v.value.forEach((B, ie) => {
|
|
5416
|
+
const Y = B.filter((ue) => ue.phase === e);
|
|
5417
5417
|
Y.length > 0 && z.set(ie, Y);
|
|
5418
5418
|
}), z;
|
|
5419
5419
|
}), E = I(() => {
|
|
5420
5420
|
const z = [];
|
|
5421
|
-
for (const
|
|
5422
|
-
const ie = c(
|
|
5421
|
+
for (const B of r.value.groups) {
|
|
5422
|
+
const ie = c(B.ownerId);
|
|
5423
5423
|
if (!ie || ie.phase !== e) continue;
|
|
5424
|
-
const Y =
|
|
5424
|
+
const Y = B.position, ue = B.dimensions;
|
|
5425
5425
|
if (!Y || !ue) continue;
|
|
5426
|
-
const de = w(
|
|
5426
|
+
const de = w(B).filter((fe) => fe.phase === e && !fe.hidden), J = _(B.id);
|
|
5427
5427
|
z.push({
|
|
5428
|
-
id:
|
|
5428
|
+
id: B.id,
|
|
5429
5429
|
type: "group",
|
|
5430
5430
|
position: Y,
|
|
5431
5431
|
width: ue.width,
|
|
5432
5432
|
height: ue.height,
|
|
5433
5433
|
data: {
|
|
5434
|
-
...
|
|
5434
|
+
...B,
|
|
5435
5435
|
memberIds: de.map((fe) => fe.id)
|
|
5436
5436
|
},
|
|
5437
5437
|
draggable: !t,
|
|
@@ -5442,23 +5442,23 @@ function yT({
|
|
|
5442
5442
|
return z;
|
|
5443
5443
|
}), P = I(() => {
|
|
5444
5444
|
let z = 0;
|
|
5445
|
-
for (const
|
|
5446
|
-
if (
|
|
5447
|
-
const ie = _(
|
|
5445
|
+
for (const B of r.value.groups) {
|
|
5446
|
+
if (B.phase !== e) continue;
|
|
5447
|
+
const ie = _(B.id);
|
|
5448
5448
|
ie > z && (z = ie);
|
|
5449
5449
|
}
|
|
5450
5450
|
return z;
|
|
5451
5451
|
}), $ = I(() => {
|
|
5452
5452
|
const z = [];
|
|
5453
|
-
for (const
|
|
5454
|
-
if (
|
|
5455
|
-
const ie = c(
|
|
5456
|
-
if (!ie || ie.phase !== e || ie.hidden || !w(
|
|
5457
|
-
const ue = Math.max(g(ie.id), _(
|
|
5458
|
-
id: `branch:${
|
|
5453
|
+
for (const B of r.value.groups) {
|
|
5454
|
+
if (B.phase !== e || !B.position || !B.dimensions) continue;
|
|
5455
|
+
const ie = c(B.ownerId);
|
|
5456
|
+
if (!ie || ie.phase !== e || ie.hidden || !w(B).filter((J) => J.phase === e && !J.hidden).length) continue;
|
|
5457
|
+
const ue = Math.max(g(ie.id), _(B.id)) + P.value + 1, de = {
|
|
5458
|
+
id: `branch:${B.id}`,
|
|
5459
5459
|
source: ie.id,
|
|
5460
|
-
target:
|
|
5461
|
-
sourceHandle: `branch@${
|
|
5460
|
+
target: B.id,
|
|
5461
|
+
sourceHandle: `branch@${B.branch}`,
|
|
5462
5462
|
targetHandle: "input",
|
|
5463
5463
|
markerEnd: im.ArrowClosed,
|
|
5464
5464
|
selectable: !1,
|
|
@@ -5467,8 +5467,8 @@ function yT({
|
|
|
5467
5467
|
data: {
|
|
5468
5468
|
type: "branch",
|
|
5469
5469
|
ownerId: ie.id,
|
|
5470
|
-
branch:
|
|
5471
|
-
groupId:
|
|
5470
|
+
branch: B.branch,
|
|
5471
|
+
groupId: B.id
|
|
5472
5472
|
},
|
|
5473
5473
|
zIndex: ue * ts + Bb
|
|
5474
5474
|
};
|
|
@@ -5477,18 +5477,18 @@ function yT({
|
|
|
5477
5477
|
return z;
|
|
5478
5478
|
}), R = /* @__PURE__ */ new Map(), x = /* @__PURE__ */ new Map();
|
|
5479
5479
|
let A;
|
|
5480
|
-
function N(z,
|
|
5480
|
+
function N(z, B = !0) {
|
|
5481
5481
|
if (z.phase !== e) return;
|
|
5482
5482
|
const ie = w(z).filter((fe) => fe.phase === e && !fe.hidden);
|
|
5483
5483
|
if (!ie.length) return;
|
|
5484
5484
|
const Y = [];
|
|
5485
5485
|
for (const fe of ie) {
|
|
5486
|
-
const _e = o(fe.id)?.dimensions,
|
|
5487
|
-
if (
|
|
5486
|
+
const _e = o(fe.id)?.dimensions, ze = _e?.width ?? 0, se = _e?.height ?? 0;
|
|
5487
|
+
if (ze <= 0 || se <= 0)
|
|
5488
5488
|
return;
|
|
5489
5489
|
Y.push({
|
|
5490
5490
|
...fe.position,
|
|
5491
|
-
width:
|
|
5491
|
+
width: ze,
|
|
5492
5492
|
height: se
|
|
5493
5493
|
});
|
|
5494
5494
|
const te = v.value.get(fe.id) ?? [];
|
|
@@ -5513,7 +5513,7 @@ function yT({
|
|
|
5513
5513
|
width: Math.round(de),
|
|
5514
5514
|
height: Math.round(J)
|
|
5515
5515
|
},
|
|
5516
|
-
commit:
|
|
5516
|
+
commit: B
|
|
5517
5517
|
};
|
|
5518
5518
|
}
|
|
5519
5519
|
function F() {
|
|
@@ -5522,10 +5522,10 @@ function yT({
|
|
|
5522
5522
|
return;
|
|
5523
5523
|
}
|
|
5524
5524
|
const z = [];
|
|
5525
|
-
let
|
|
5525
|
+
let B = !1;
|
|
5526
5526
|
R.forEach((ie, Y) => {
|
|
5527
5527
|
const ue = p(Y, ie, !1);
|
|
5528
|
-
z.push({ id: Y, changed: ue, commit: ie.commit }), ie.commit && ue && !
|
|
5528
|
+
z.push({ id: Y, changed: ue, commit: ie.commit }), ie.commit && ue && !B && (B = !0);
|
|
5529
5529
|
}), R.clear(), A = void 0;
|
|
5530
5530
|
for (const { id: ie, changed: Y, commit: ue } of z) {
|
|
5531
5531
|
if (!Y) continue;
|
|
@@ -5540,35 +5540,35 @@ function yT({
|
|
|
5540
5540
|
for (const [Y, { commit: ue }] of ie)
|
|
5541
5541
|
V(Y, ue);
|
|
5542
5542
|
}
|
|
5543
|
-
|
|
5543
|
+
B && f("*");
|
|
5544
5544
|
}
|
|
5545
5545
|
function j() {
|
|
5546
5546
|
R.size !== 0 && (A || (A = tn().then(F)));
|
|
5547
5547
|
}
|
|
5548
|
-
function V(z,
|
|
5548
|
+
function V(z, B = !0) {
|
|
5549
5549
|
const ie = l.value.get(z);
|
|
5550
5550
|
if (!ie) return;
|
|
5551
|
-
const Y = N(ie,
|
|
5551
|
+
const Y = N(ie, B);
|
|
5552
5552
|
Y && (R.set(z, Y), j());
|
|
5553
5553
|
}
|
|
5554
|
-
function oe(z,
|
|
5554
|
+
function oe(z, B, ie, Y) {
|
|
5555
5555
|
const ue = l.value.get(z);
|
|
5556
5556
|
if (!ue) return;
|
|
5557
5557
|
if (!ue.position) {
|
|
5558
|
-
d(z,
|
|
5558
|
+
d(z, B, !1), V(z);
|
|
5559
5559
|
return;
|
|
5560
5560
|
}
|
|
5561
5561
|
if (ie === 0 && Y === 0) {
|
|
5562
|
-
d(z,
|
|
5562
|
+
d(z, B, !1);
|
|
5563
5563
|
return;
|
|
5564
5564
|
}
|
|
5565
|
-
d(z,
|
|
5565
|
+
d(z, B, !1);
|
|
5566
5566
|
const de = [z], J = /* @__PURE__ */ new Set([z]), fe = /* @__PURE__ */ new Set();
|
|
5567
5567
|
for (; de.length; ) {
|
|
5568
5568
|
const Te = de.shift(), _e = l.value.get(Te);
|
|
5569
5569
|
if (!_e) continue;
|
|
5570
|
-
const
|
|
5571
|
-
for (const se of
|
|
5570
|
+
const ze = w(_e).filter((se) => se.phase === e && !se.hidden);
|
|
5571
|
+
for (const se of ze) {
|
|
5572
5572
|
fe.has(se.id) || (u(se.id, {
|
|
5573
5573
|
x: se.position.x + ie,
|
|
5574
5574
|
y: se.position.y + Y
|
|
@@ -5585,32 +5585,32 @@ function yT({
|
|
|
5585
5585
|
}
|
|
5586
5586
|
}
|
|
5587
5587
|
}
|
|
5588
|
-
function ge(z,
|
|
5588
|
+
function ge(z, B) {
|
|
5589
5589
|
const ie = i?.value;
|
|
5590
5590
|
if (!ie) return !1;
|
|
5591
|
-
if (ie === z ||
|
|
5592
|
-
for (const Y of
|
|
5591
|
+
if (ie === z || B.some((Y) => ie === Y)) return !0;
|
|
5592
|
+
for (const Y of B)
|
|
5593
5593
|
if ((S.value.get(Y) ?? [])?.some((de) => de.id === ie))
|
|
5594
5594
|
return !0;
|
|
5595
5595
|
return !1;
|
|
5596
5596
|
}
|
|
5597
5597
|
const Z = /* @__PURE__ */ new Map();
|
|
5598
|
-
return
|
|
5599
|
-
() => r.value.groups.filter((
|
|
5600
|
-
const ie =
|
|
5598
|
+
return Be(
|
|
5599
|
+
() => r.value.groups.filter((B) => B.phase === e).map((B) => {
|
|
5600
|
+
const ie = B.memberIds.map((Y) => {
|
|
5601
5601
|
const ue = o(Y), de = Math.round(ue?.dimensions?.width ?? 0), J = Math.round(ue?.dimensions?.height ?? 0);
|
|
5602
5602
|
return `${Y}:${de}x${J}`;
|
|
5603
5603
|
});
|
|
5604
5604
|
return {
|
|
5605
|
-
id:
|
|
5606
|
-
memberIds:
|
|
5605
|
+
id: B.id,
|
|
5606
|
+
memberIds: B.memberIds,
|
|
5607
5607
|
signature: ie.join(",")
|
|
5608
5608
|
};
|
|
5609
5609
|
}),
|
|
5610
5610
|
(z) => {
|
|
5611
|
-
const
|
|
5611
|
+
const B = new Set(z.map((ie) => ie.id));
|
|
5612
5612
|
for (const ie of Z.keys())
|
|
5613
|
-
|
|
5613
|
+
B.has(ie) || Z.delete(ie);
|
|
5614
5614
|
for (const ie of z)
|
|
5615
5615
|
ge(ie.id, ie.memberIds) || Z.get(ie.id) === ie.signature || (Z.set(ie.id, ie.signature), V(ie.id));
|
|
5616
5616
|
},
|
|
@@ -5719,16 +5719,16 @@ const [wT, CT] = Qc(
|
|
|
5719
5719
|
selectNode: ge,
|
|
5720
5720
|
removeNode: Z,
|
|
5721
5721
|
getNodeById: z,
|
|
5722
|
-
connectEdge:
|
|
5722
|
+
connectEdge: B,
|
|
5723
5723
|
disconnectEdge: ie,
|
|
5724
5724
|
getInEdgesByNodeId: Y,
|
|
5725
5725
|
branchGroups: ue,
|
|
5726
5726
|
commit: de,
|
|
5727
5727
|
reset: J,
|
|
5728
5728
|
groupMapById: fe
|
|
5729
|
-
} = d, { isGroupId: Te, canAddMember: _e } = ue,
|
|
5730
|
-
|
|
5731
|
-
}, te = _y(
|
|
5729
|
+
} = d, { isGroupId: Te, canAddMember: _e } = ue, ze = Cn(), se = (H) => {
|
|
5730
|
+
ze.value = H;
|
|
5731
|
+
}, te = _y(ze);
|
|
5732
5732
|
function he(H, Fe) {
|
|
5733
5733
|
const $e = z(H.source), xe = z(H.target);
|
|
5734
5734
|
return !!($e && xe && $e.phase === Fe && xe.phase === Fe);
|
|
@@ -5751,7 +5751,7 @@ const [wT, CT] = Qc(
|
|
|
5751
5751
|
activeGroupId: W,
|
|
5752
5752
|
start: ae,
|
|
5753
5753
|
updateActiveGroup: q,
|
|
5754
|
-
end:
|
|
5754
|
+
end: U
|
|
5755
5755
|
} = vT({
|
|
5756
5756
|
phase: t,
|
|
5757
5757
|
groupMapById: fe,
|
|
@@ -5810,10 +5810,10 @@ const [wT, CT] = Qc(
|
|
|
5810
5810
|
bT({
|
|
5811
5811
|
readonly: o,
|
|
5812
5812
|
flowId: n
|
|
5813
|
-
}),
|
|
5813
|
+
}), Be([Q, je, me], ([H, Fe, $e]) => {
|
|
5814
5814
|
x([...Fe, ...H]), A($e);
|
|
5815
5815
|
}, { immediate: !0 });
|
|
5816
|
-
const
|
|
5816
|
+
const Ge = I(() => ({
|
|
5817
5817
|
// Padding in VueFlow is a ratio
|
|
5818
5818
|
padding: r / Math.max(It(a?.width) ?? 0, It(a?.height) ?? 0)
|
|
5819
5819
|
// maxZoom and minZoom come from the VueFlow store
|
|
@@ -5837,7 +5837,7 @@ const [wT, CT] = Qc(
|
|
|
5837
5837
|
et.push(ja(Gt, z)), ie(Gt.id, !1);
|
|
5838
5838
|
});
|
|
5839
5839
|
}
|
|
5840
|
-
if (!
|
|
5840
|
+
if (!B({
|
|
5841
5841
|
source: H,
|
|
5842
5842
|
sourceField: ut?.field,
|
|
5843
5843
|
target: $e,
|
|
@@ -5943,7 +5943,7 @@ const [wT, CT] = Qc(
|
|
|
5943
5943
|
}
|
|
5944
5944
|
oe(Fe, xe, !1);
|
|
5945
5945
|
const ut = $e && Te($e) ? $e : De.value.get(Fe)?.id;
|
|
5946
|
-
ut && Re(ut, !1), ke(Fe),
|
|
5946
|
+
ut && Re(ut, !1), ke(Fe), U(), V();
|
|
5947
5947
|
}), S((H) => {
|
|
5948
5948
|
H.filter((xe) => xe.type === "select").sort((xe, ut) => xe.selected === ut.selected ? 0 : xe.selected ? 1 : -1).forEach((xe) => {
|
|
5949
5949
|
Oe(xe.id) || (ah = xe.selected ? xe.id : void 0, A((ut) => ut.map((Ue) => Ue.id !== xe.id || !Ue.markerEnd ? Ue : Tr({
|
|
@@ -5967,7 +5967,7 @@ const [wT, CT] = Qc(
|
|
|
5967
5967
|
});
|
|
5968
5968
|
function Ne(H) {
|
|
5969
5969
|
v({
|
|
5970
|
-
...
|
|
5970
|
+
...Ge.value,
|
|
5971
5971
|
...H
|
|
5972
5972
|
});
|
|
5973
5973
|
}
|
|
@@ -6021,12 +6021,12 @@ const [wT, CT] = Qc(
|
|
|
6021
6021
|
autoLayout: we,
|
|
6022
6022
|
placeToRight: st,
|
|
6023
6023
|
scrollRightToReveal: yt,
|
|
6024
|
-
fitViewParams:
|
|
6024
|
+
fitViewParams: Ge,
|
|
6025
6025
|
fitView: Ne,
|
|
6026
6026
|
groupDrop: {
|
|
6027
6027
|
activeGroupId: W,
|
|
6028
6028
|
startPanelDrag: () => ae("panel"),
|
|
6029
|
-
endPanelDrag:
|
|
6029
|
+
endPanelDrag: U,
|
|
6030
6030
|
updateActiveGroup: q,
|
|
6031
6031
|
attachNodeToActiveGroup: ke
|
|
6032
6032
|
}
|
|
@@ -6312,12 +6312,12 @@ const $T = {
|
|
|
6312
6312
|
const Te = Y === "input" ? J.targetField || "input" : J.sourceField || "output";
|
|
6313
6313
|
let _e;
|
|
6314
6314
|
Y === "input" && J.sourceField ? _e = fe.fields.output.find((he) => he.id === J.sourceField)?.name : Y === "output" && J.targetField && (_e = fe.fields.input.find((he) => he.id === J.targetField)?.name);
|
|
6315
|
-
const
|
|
6315
|
+
const ze = {
|
|
6316
6316
|
edgeId: J.id,
|
|
6317
6317
|
node: fe,
|
|
6318
6318
|
fieldName: _e
|
|
6319
6319
|
}, se = ue.get(Te);
|
|
6320
|
-
se ? se.push(
|
|
6320
|
+
se ? se.push(ze) : ue.set(Te, [ze]);
|
|
6321
6321
|
}
|
|
6322
6322
|
return ue;
|
|
6323
6323
|
}
|
|
@@ -6325,7 +6325,7 @@ const $T = {
|
|
|
6325
6325
|
function z(Y) {
|
|
6326
6326
|
!i || i.readonly || Y === "input" && !v.value || Y === "output" && !g.value || l(e.data.id, Y);
|
|
6327
6327
|
}
|
|
6328
|
-
async function
|
|
6328
|
+
async function B() {
|
|
6329
6329
|
if (!i || i.readonly) return;
|
|
6330
6330
|
const Y = c(e.data.id, i.placeToRight(e.data.id));
|
|
6331
6331
|
await i.selectNode(Y), i.scrollRightToReveal(Y), d.value = !0;
|
|
@@ -6333,13 +6333,13 @@ const $T = {
|
|
|
6333
6333
|
function ie() {
|
|
6334
6334
|
p.removeMember(e.data.id);
|
|
6335
6335
|
}
|
|
6336
|
-
return
|
|
6336
|
+
return Be(v, (Y) => {
|
|
6337
6337
|
Y || l(e.data.id, "input", !0, !0, "*");
|
|
6338
|
-
}, { immediate: !0 }),
|
|
6338
|
+
}, { immediate: !0 }), Be(g, (Y) => {
|
|
6339
6339
|
Y || l(e.data.id, "output", !0, !0, "*");
|
|
6340
|
-
}, { immediate: !0 }),
|
|
6340
|
+
}, { immediate: !0 }), Be(() => e.data.fields.input, (Y, ue) => {
|
|
6341
6341
|
Xt(Y, ue) || l(e.data.id, "input", Y.length > 0, !0, "*");
|
|
6342
|
-
}, { deep: !0 }),
|
|
6342
|
+
}, { deep: !0 }), Be(() => e.data.fields.output, (Y, ue) => {
|
|
6343
6343
|
Xt(Y, ue) || l(e.data.id, "output", Y.length > 0, !0, "*");
|
|
6344
6344
|
}, { deep: !0 }), (Y, ue) => (b(), D("div", {
|
|
6345
6345
|
class: ft(["dk-flow-node", {
|
|
@@ -6388,7 +6388,7 @@ const $T = {
|
|
|
6388
6388
|
}, ["stop"]))
|
|
6389
6389
|
}, {
|
|
6390
6390
|
items: C(() => [
|
|
6391
|
-
y(s(Ur), { onClick:
|
|
6391
|
+
y(s(Ur), { onClick: B }, {
|
|
6392
6392
|
default: C(() => [
|
|
6393
6393
|
y(ms, {
|
|
6394
6394
|
keys: s(ns).duplicate,
|
|
@@ -6669,10 +6669,10 @@ const $T = {
|
|
|
6669
6669
|
updateActiveGroup: Z,
|
|
6670
6670
|
attachNodeToActiveGroup: z
|
|
6671
6671
|
} = _;
|
|
6672
|
-
function
|
|
6673
|
-
const
|
|
6674
|
-
if (
|
|
6675
|
-
return
|
|
6672
|
+
function B(_e) {
|
|
6673
|
+
const ze = _e.dataTransfer?.types.find((se) => se.startsWith(`${Fa}/`));
|
|
6674
|
+
if (ze)
|
|
6675
|
+
return ze.replace(`${Fa}/`, "");
|
|
6676
6676
|
}
|
|
6677
6677
|
function ie(_e) {
|
|
6678
6678
|
if (e.mode === "inspect") {
|
|
@@ -6694,10 +6694,10 @@ const $T = {
|
|
|
6694
6694
|
}
|
|
6695
6695
|
function ue(_e) {
|
|
6696
6696
|
if (e.mode !== "edit") return;
|
|
6697
|
-
const
|
|
6698
|
-
if (!
|
|
6697
|
+
const ze = _e.dataTransfer?.getData(Fa);
|
|
6698
|
+
if (!ze) return;
|
|
6699
6699
|
_e.preventDefault();
|
|
6700
|
-
const se = JSON.parse(
|
|
6700
|
+
const se = JSON.parse(ze);
|
|
6701
6701
|
if (se.action !== "create-node") return;
|
|
6702
6702
|
const te = R({ x: _e.clientX, y: _e.clientY }), { type: he, anchor: Ie } = se.data, De = {
|
|
6703
6703
|
type: he,
|
|
@@ -6731,20 +6731,20 @@ const $T = {
|
|
|
6731
6731
|
return e.mode === "edit" && _e.push({ name: "auto_layout", icon: Py, action: J }), _e;
|
|
6732
6732
|
});
|
|
6733
6733
|
e.mode === "edit" && (Ha("dragstart", (_e) => {
|
|
6734
|
-
|
|
6734
|
+
B(_e) && oe();
|
|
6735
6735
|
}), Ha("dragend", () => {
|
|
6736
6736
|
ge();
|
|
6737
6737
|
}));
|
|
6738
6738
|
async function Te() {
|
|
6739
6739
|
const _e = S.value;
|
|
6740
6740
|
if (e.mode !== "edit" || !_e || _e.phase !== e.phase) return;
|
|
6741
|
-
const
|
|
6742
|
-
|
|
6741
|
+
const ze = E(_e.id, v(_e.id));
|
|
6742
|
+
ze && (await h(ze), w.value = !0, g(ze));
|
|
6743
6743
|
}
|
|
6744
6744
|
return mm({
|
|
6745
6745
|
enabled: I(() => !!S.value && e.mode === "edit" && S.value.phase === e.phase),
|
|
6746
6746
|
duplicate: Te
|
|
6747
|
-
}), t({ autoLayout: p, fitView: m }), (_e,
|
|
6747
|
+
}), t({ autoLayout: p, fitView: m }), (_e, ze) => (b(), D("div", {
|
|
6748
6748
|
ref_key: "flowCanvas",
|
|
6749
6749
|
ref: a,
|
|
6750
6750
|
class: "dk-flow-canvas"
|
|
@@ -6763,7 +6763,7 @@ const $T = {
|
|
|
6763
6763
|
onDragover: Y,
|
|
6764
6764
|
onDrop: ue,
|
|
6765
6765
|
onNodeClick: ie,
|
|
6766
|
-
onNodesChange:
|
|
6766
|
+
onNodesChange: ze[0] || (ze[0] = (se) => o("nodes-change")),
|
|
6767
6767
|
onNodesInitialized: de
|
|
6768
6768
|
}), {
|
|
6769
6769
|
"node-flow": C(({ data: se }) => [
|
|
@@ -7100,7 +7100,7 @@ const Hi = (e) => {
|
|
|
7100
7100
|
};
|
|
7101
7101
|
return pn(() => {
|
|
7102
7102
|
t.realms === void 0 && p();
|
|
7103
|
-
}),
|
|
7103
|
+
}), Be(() => t.realms, (h) => {
|
|
7104
7104
|
h && (d.value = [a, ...h.map((v) => ({
|
|
7105
7105
|
...v,
|
|
7106
7106
|
group: o("custom_field.key_auth_identity_realms.realm_group_label")
|
|
@@ -9365,7 +9365,7 @@ ${N}`
|
|
|
9365
9365
|
rules: S,
|
|
9366
9366
|
omittedFields: E
|
|
9367
9367
|
} = w, P = vr("omit-");
|
|
9368
|
-
|
|
9368
|
+
Be([
|
|
9369
9369
|
() => It(S),
|
|
9370
9370
|
() => It(T),
|
|
9371
9371
|
() => It(E)
|
|
@@ -9535,11 +9535,11 @@ const [Ox, Rx] = Qc(
|
|
|
9535
9535
|
c
|
|
9536
9536
|
), d.deserialize(N);
|
|
9537
9537
|
}
|
|
9538
|
-
|
|
9538
|
+
Be(f, () => {
|
|
9539
9539
|
o?.(P());
|
|
9540
9540
|
}, { deep: !0 });
|
|
9541
9541
|
let $ = !1;
|
|
9542
|
-
|
|
9542
|
+
Be(() => i?.value, (N) => {
|
|
9543
9543
|
$ && Xt(P(), It(N)) || (S(N), $ = !0);
|
|
9544
9544
|
}, { deep: !0, immediate: !0 });
|
|
9545
9545
|
function R(N) {
|
|
@@ -9646,7 +9646,7 @@ function Du(e, t) {
|
|
|
9646
9646
|
const c = i.has(l) ? i.get(l) : o();
|
|
9647
9647
|
return i.set(l, c), n.set(r, c), c;
|
|
9648
9648
|
}
|
|
9649
|
-
return
|
|
9649
|
+
return Be(t, (r) => {
|
|
9650
9650
|
const l = It(r), c = /* @__PURE__ */ new Set();
|
|
9651
9651
|
l.forEach((u, d) => {
|
|
9652
9652
|
c.add(d);
|
|
@@ -9656,7 +9656,7 @@ function Du(e, t) {
|
|
|
9656
9656
|
}, { immediate: !0, deep: !0 }), { getKey: a };
|
|
9657
9657
|
}
|
|
9658
9658
|
function Mx(e, t) {
|
|
9659
|
-
|
|
9659
|
+
Be(e, (n) => {
|
|
9660
9660
|
window[Aa] || (window[Aa] = {}), window[Aa][t] = Is(n);
|
|
9661
9661
|
}, { immediate: !0, deep: !0 }), fr(() => {
|
|
9662
9662
|
window[Aa] && delete window[Aa][t];
|
|
@@ -9718,7 +9718,7 @@ function Kx(e, t) {
|
|
|
9718
9718
|
parentPath: a.value,
|
|
9719
9719
|
isolate: o
|
|
9720
9720
|
});
|
|
9721
|
-
return
|
|
9721
|
+
return Be([vt(t), vt(n)], ([l, c]) => {
|
|
9722
9722
|
const { parentPath: u, isolate: d } = c, p = u ? kt(u, e) : e;
|
|
9723
9723
|
l ? {
|
|
9724
9724
|
isolate: () => {
|
|
@@ -9805,7 +9805,7 @@ function qu(e, t) {
|
|
|
9805
9805
|
}
|
|
9806
9806
|
return v;
|
|
9807
9807
|
}, h = null;
|
|
9808
|
-
|
|
9808
|
+
Be(() => n?.value, (v) => {
|
|
9809
9809
|
const g = m();
|
|
9810
9810
|
Xt(h, g) || (h = g, t?.(g));
|
|
9811
9811
|
}, { deep: !0 });
|
|
@@ -9963,7 +9963,7 @@ const ma = /* @__PURE__ */ le({
|
|
|
9963
9963
|
emits: ["update:modelValue"],
|
|
9964
9964
|
setup(e, { emit: t }) {
|
|
9965
9965
|
const n = e, i = Qn(), o = t, a = I(() => n.multiline ? d_ : vi), r = I(() => i.characterLimit ?? (n.multiline ? !1 : void 0)), l = G(n.modelValue);
|
|
9966
|
-
|
|
9966
|
+
Be(() => n.modelValue, (p) => {
|
|
9967
9967
|
l.value = p;
|
|
9968
9968
|
});
|
|
9969
9969
|
const { config: c } = dt(), u = (p) => {
|
|
@@ -10165,7 +10165,7 @@ const ma = /* @__PURE__ */ le({
|
|
|
10165
10165
|
a.value = _, o("update:modelValue", _);
|
|
10166
10166
|
}
|
|
10167
10167
|
const h = I(() => n["data-1p-ignore"] !== void 0 ? n["data-1p-ignore"] : Co(e.name) === "name");
|
|
10168
|
-
return
|
|
10168
|
+
return Be(a, (v) => {
|
|
10169
10169
|
const g = v ? p(v) : "";
|
|
10170
10170
|
p(f(d.value)) !== g && (d.value = g);
|
|
10171
10171
|
}, { immediate: !0 }), (v, g) => {
|
|
@@ -10361,7 +10361,7 @@ const ma = /* @__PURE__ */ le({
|
|
|
10361
10361
|
class: "ff-array-field-item-remove",
|
|
10362
10362
|
"data-testid": `ff-array-remove-item-btn-${u.path.value}.${z}`,
|
|
10363
10363
|
icon: "",
|
|
10364
|
-
onClick: St((
|
|
10364
|
+
onClick: St((B) => E(z), ["stop"])
|
|
10365
10365
|
}, {
|
|
10366
10366
|
default: C(() => [
|
|
10367
10367
|
y(s(ji))
|
|
@@ -10430,7 +10430,7 @@ const ma = /* @__PURE__ */ le({
|
|
|
10430
10430
|
class: "ff-array-field-item-remove",
|
|
10431
10431
|
"data-testid": `ff-array-remove-item-btn-${u.path.value}.${z}`,
|
|
10432
10432
|
icon: "",
|
|
10433
|
-
onClick: St((
|
|
10433
|
+
onClick: St((B) => E(z), ["stop"])
|
|
10434
10434
|
}, {
|
|
10435
10435
|
default: C(() => [
|
|
10436
10436
|
y(s(Zf))
|
|
@@ -10634,7 +10634,7 @@ const ma = /* @__PURE__ */ le({
|
|
|
10634
10634
|
function T() {
|
|
10635
10635
|
d.value ? i.value = l(a.path.value) : i.value = a.emptyValue.value;
|
|
10636
10636
|
}
|
|
10637
|
-
return
|
|
10637
|
+
return Be(v, (S) => {
|
|
10638
10638
|
e.collapsible && (p.value = S);
|
|
10639
10639
|
}), Bi(() => {
|
|
10640
10640
|
if (a.error || !i) return;
|
|
@@ -10984,7 +10984,7 @@ const ma = /* @__PURE__ */ le({
|
|
|
10984
10984
|
a.value = m, o("update:modelValue", m);
|
|
10985
10985
|
}
|
|
10986
10986
|
const p = I(() => n["data-1p-ignore"] !== void 0 ? n["data-1p-ignore"] : Co(e.name) === "name");
|
|
10987
|
-
return
|
|
10987
|
+
return Be(a, (f) => {
|
|
10988
10988
|
if (f && typeof f == "object") {
|
|
10989
10989
|
try {
|
|
10990
10990
|
const m = JSON.parse(u.value);
|
|
@@ -18913,24 +18913,24 @@ const W2 = {
|
|
|
18913
18913
|
try {
|
|
18914
18914
|
const z = await V.get(j(Z));
|
|
18915
18915
|
if (z.data.config) {
|
|
18916
|
-
const
|
|
18917
|
-
delete
|
|
18916
|
+
const B = Object.assign(z.data, z.data.config);
|
|
18917
|
+
delete B.config, p.value = B;
|
|
18918
18918
|
}
|
|
18919
18919
|
} catch (z) {
|
|
18920
18920
|
console.error(z);
|
|
18921
18921
|
}
|
|
18922
18922
|
};
|
|
18923
|
-
return
|
|
18923
|
+
return Be(() => f.value, () => {
|
|
18924
18924
|
oe();
|
|
18925
18925
|
}), Bi(() => {
|
|
18926
18926
|
if (o.defaultRedisConfigItem || _?.value) {
|
|
18927
18927
|
const Z = o.defaultRedisConfigItem || _?.value?.[0].id;
|
|
18928
18928
|
ge(Z), f.value = !0;
|
|
18929
18929
|
} else k?.value && (v.value = k.value);
|
|
18930
|
-
}),
|
|
18930
|
+
}), Be(() => w?.value, (Z) => {
|
|
18931
18931
|
f.value && (Z && _.value ? _.value = l ? null : void 0 : Z || g.value && (_.value = g.value, ge(g.value[0].id)));
|
|
18932
18932
|
}), (Z, z) => {
|
|
18933
|
-
const
|
|
18933
|
+
const B = ne("KBadge"), ie = ne("KRadio");
|
|
18934
18934
|
return d.value ? Bt((b(), L(Rt(e.borderless ? "div" : s(Qr)), {
|
|
18935
18935
|
key: 0,
|
|
18936
18936
|
class: ft(["redis-config-card", { "redis-config-card--borderless": e.borderless }]),
|
|
@@ -18951,7 +18951,7 @@ const W2 = {
|
|
|
18951
18951
|
"selected-value": !0
|
|
18952
18952
|
}, {
|
|
18953
18953
|
default: C(() => [
|
|
18954
|
-
e.isKonnectManagedRedisEnabled ? (b(), L(
|
|
18954
|
+
e.isKonnectManagedRedisEnabled ? (b(), L(B, {
|
|
18955
18955
|
key: 0,
|
|
18956
18956
|
appearance: "success"
|
|
18957
18957
|
}, {
|
|
@@ -19259,11 +19259,11 @@ const W2 = {
|
|
|
19259
19259
|
}), P = I(
|
|
19260
19260
|
() => new Set(E.value.fields.map((Y) => Object.keys(Y)[0]))
|
|
19261
19261
|
), $ = I(() => rc(i.model, t)), R = I(() => k.value?.fields.map((Y) => Y.model) ?? []), x = I(() => R.value.map((Y) => Y.split("-")[0])), A = G(
|
|
19262
|
-
i.isEditing ? rc($.value, x.value) :
|
|
19262
|
+
i.isEditing ? rc($.value, x.value) : B()
|
|
19263
19263
|
), N = G(Object.values(A.value).some(z)), F = Et("form");
|
|
19264
19264
|
let j = !1;
|
|
19265
19265
|
function V(Y) {
|
|
19266
|
-
return i.isEditing ? Y : { ...Y, ...
|
|
19266
|
+
return i.isEditing ? Y : { ...Y, ...B() };
|
|
19267
19267
|
}
|
|
19268
19268
|
function oe() {
|
|
19269
19269
|
if (!F.value) return;
|
|
@@ -19291,7 +19291,7 @@ const W2 = {
|
|
|
19291
19291
|
function z(Y) {
|
|
19292
19292
|
return rs(Y, "id") && Y.id != null;
|
|
19293
19293
|
}
|
|
19294
|
-
function
|
|
19294
|
+
function B() {
|
|
19295
19295
|
const Y = {};
|
|
19296
19296
|
return R.value.forEach((ue) => {
|
|
19297
19297
|
if (i.formModel[ue]) {
|
|
@@ -19577,7 +19577,7 @@ const Bn = /* @__PURE__ */ le({
|
|
|
19577
19577
|
const k = o(`config.${d.value}`);
|
|
19578
19578
|
return p.value ? { ...k, info: l(m.value.description) } : k;
|
|
19579
19579
|
}), v = G(!1), g = G({});
|
|
19580
|
-
|
|
19580
|
+
Be(() => i.config, (k) => {
|
|
19581
19581
|
if (v.value || !k) return;
|
|
19582
19582
|
const w = u.value.find((T) => Array.isArray(k[T]) && k[T].length > 0);
|
|
19583
19583
|
w && (d.value = w);
|
|
@@ -20423,13 +20423,13 @@ const lM = {
|
|
|
20423
20423
|
return !Array.isArray(J) || J.length === 0 ? !1 : J.some((fe) => fe.scope !== "cp" && fe.id != null);
|
|
20424
20424
|
}
|
|
20425
20425
|
const j = G(N());
|
|
20426
|
-
|
|
20426
|
+
Be(
|
|
20427
20427
|
() => c?.principalsDirectoryName,
|
|
20428
20428
|
(J) => {
|
|
20429
20429
|
r?.value || j.value !== "kong-identity" || J == null || m.config?.principals && (m.config.principals.directory = J);
|
|
20430
20430
|
},
|
|
20431
20431
|
{ immediate: !0 }
|
|
20432
|
-
),
|
|
20432
|
+
), Be(j, (J) => {
|
|
20433
20433
|
if (J !== "kong-identity") return;
|
|
20434
20434
|
const fe = c?.principalsDirectoryName;
|
|
20435
20435
|
fe == null || !m.config?.principals || (m.config.principals.directory = fe);
|
|
@@ -20438,17 +20438,17 @@ const lM = {
|
|
|
20438
20438
|
() => u.value && j.value === "centrally-managed" && !F(m.config?.identity_realms)
|
|
20439
20439
|
), oe = G(!1), ge = G(!1);
|
|
20440
20440
|
let Z = !1;
|
|
20441
|
-
|
|
20441
|
+
Be(j, async (J) => {
|
|
20442
20442
|
J === "centrally-managed" && (oe.value = !1, ge.value = !1, Z = !1, await tn(), Z = !0);
|
|
20443
20443
|
}), pn(() => {
|
|
20444
20444
|
j.value === "centrally-managed" && (Z = !0);
|
|
20445
|
-
}),
|
|
20445
|
+
}), Be(() => m.config?.identity_realms, () => {
|
|
20446
20446
|
j.value === "centrally-managed" && Z && (oe.value = !0);
|
|
20447
20447
|
}, { deep: !0 });
|
|
20448
20448
|
function z() {
|
|
20449
20449
|
Z && (oe.value = !0);
|
|
20450
20450
|
}
|
|
20451
|
-
const
|
|
20451
|
+
const B = I(
|
|
20452
20452
|
() => (oe.value || ge.value) && V.value
|
|
20453
20453
|
), ie = a?.(() => V.value ? (ge.value = !0, !1) : !0);
|
|
20454
20454
|
fr(() => ie?.());
|
|
@@ -20485,7 +20485,7 @@ const lM = {
|
|
|
20485
20485
|
name: "$.config.identity_realms",
|
|
20486
20486
|
required: !0
|
|
20487
20487
|
}),
|
|
20488
|
-
|
|
20488
|
+
B.value ? (b(), D("p", hM, M(s(l).t("custom_field.kong_identity.identity_realms_required")), 1)) : X("", !0)
|
|
20489
20489
|
])) : X("", !0),
|
|
20490
20490
|
u.value && x.value && j.value === "kong-identity" ? (b(), L(gM, {
|
|
20491
20491
|
key: 2,
|
|
@@ -21311,7 +21311,7 @@ const oF = { class: "label-content" }, aF = { class: "count" }, rF = { class: "l
|
|
|
21311
21311
|
}
|
|
21312
21312
|
De(qe), je(qe), Ie(() => qe());
|
|
21313
21313
|
}
|
|
21314
|
-
_(v, g), _(g, v),
|
|
21314
|
+
_(v, g), _(g, v), Be(p, (te) => {
|
|
21315
21315
|
te && (v.removeSelectedElements(), g.removeSelectedElements());
|
|
21316
21316
|
});
|
|
21317
21317
|
const k = Et("flowPanels"), w = Et("requestLabel"), T = Et("requestCanvasContainer"), S = Et("requestFlow"), E = Et("resizeHandle"), P = Et("responseLabel"), $ = Et("responseCanvasContainer"), R = Et("responseFlow"), x = Gi(k), A = Gi(w), N = Gi(T), F = Gi(E), j = Gi(P), V = Gi($), oe = I(() => Math.max(lF, x.height.value * Ul)), ge = I(
|
|
@@ -21319,7 +21319,7 @@ const oF = { class: "label-content" }, aF = { class: "count" }, rF = { class: "l
|
|
|
21319
21319
|
), Z = I(() => {
|
|
21320
21320
|
const te = ge.value;
|
|
21321
21321
|
return te ? Math.max(Ul, oe.value / te) : Ul;
|
|
21322
|
-
}), z = G(xf),
|
|
21322
|
+
}), z = G(xf), B = I(() => `${z.value * 100}%`), ie = I(() => `${(1 - z.value) * 100}%`), Y = I(() => z.value <= Z.value), ue = I(() => 1 - z.value <= Z.value);
|
|
21323
21323
|
function de(te, { persist: he = !0 } = {}) {
|
|
21324
21324
|
const Ie = Math.min(1, Math.max(0, te));
|
|
21325
21325
|
z.value = Ie, he && e.mode === "edit" && (o.value = ue.value);
|
|
@@ -21334,14 +21334,14 @@ const oF = { class: "label-content" }, aF = { class: "count" }, rF = { class: "l
|
|
|
21334
21334
|
const te = r.value.response === 0, he = o.value;
|
|
21335
21335
|
J(te || he, !1);
|
|
21336
21336
|
} else
|
|
21337
|
-
|
|
21337
|
+
Be(() => r.value.response, (te) => {
|
|
21338
21338
|
J(te === 0, !1);
|
|
21339
21339
|
}, { immediate: !0 });
|
|
21340
21340
|
const Te = () => {
|
|
21341
21341
|
e.resizable && (Y.value ? J(!1) : fe());
|
|
21342
21342
|
}, _e = () => {
|
|
21343
21343
|
e.resizable && J(!ue.value);
|
|
21344
|
-
}, { isDragging:
|
|
21344
|
+
}, { isDragging: ze } = E_(E, {
|
|
21345
21345
|
onMove(te) {
|
|
21346
21346
|
if (!e.resizable) return;
|
|
21347
21347
|
const he = Math.max(0, te.y - N.top.value), Ie = Math.min(
|
|
@@ -21362,7 +21362,7 @@ const oF = { class: "label-content" }, aF = { class: "count" }, rF = { class: "l
|
|
|
21362
21362
|
S.value?.fitView(), R.value?.fitView();
|
|
21363
21363
|
});
|
|
21364
21364
|
}
|
|
21365
|
-
return
|
|
21365
|
+
return Be(
|
|
21366
21366
|
[n, i, () => a.value.pendingLayout, () => a.value.pendingFitView],
|
|
21367
21367
|
([te, he, Ie, De]) => {
|
|
21368
21368
|
e.inactive || !te || !he || !Ie && !De || (Ie && l(), De && c(!1), setTimeout(async () => {
|
|
@@ -21398,8 +21398,8 @@ const oF = { class: "label-content" }, aF = { class: "count" }, rF = { class: "l
|
|
|
21398
21398
|
O("div", {
|
|
21399
21399
|
ref_key: "requestCanvasContainer",
|
|
21400
21400
|
ref: T,
|
|
21401
|
-
class: ft(["canvas", { dragging: s(
|
|
21402
|
-
style: io({ flexBasis:
|
|
21401
|
+
class: ft(["canvas", { dragging: s(ze) }]),
|
|
21402
|
+
style: io({ flexBasis: B.value })
|
|
21403
21403
|
}, [
|
|
21404
21404
|
y(Rp, {
|
|
21405
21405
|
ref_key: "requestFlow",
|
|
@@ -21419,7 +21419,7 @@ const oF = { class: "label-content" }, aF = { class: "count" }, rF = { class: "l
|
|
|
21419
21419
|
O("div", {
|
|
21420
21420
|
ref_key: "responseLabel",
|
|
21421
21421
|
ref: P,
|
|
21422
|
-
class: ft(["label response", { dragging: s(
|
|
21422
|
+
class: ft(["label response", { dragging: s(ze), resizable: e.resizable }]),
|
|
21423
21423
|
onClick: _e
|
|
21424
21424
|
}, [
|
|
21425
21425
|
e.resizable ? (b(), L(s(Cd), {
|
|
@@ -21440,7 +21440,7 @@ const oF = { class: "label-content" }, aF = { class: "count" }, rF = { class: "l
|
|
|
21440
21440
|
O("div", {
|
|
21441
21441
|
ref_key: "responseCanvasContainer",
|
|
21442
21442
|
ref: $,
|
|
21443
|
-
class: ft(["canvas response", { dragging: s(
|
|
21443
|
+
class: ft(["canvas response", { dragging: s(ze) }]),
|
|
21444
21444
|
style: io({ flexBasis: ie.value })
|
|
21445
21445
|
}, [
|
|
21446
21446
|
y(Rp, {
|
|
@@ -21957,7 +21957,7 @@ const VF = /* @__PURE__ */ le({
|
|
|
21957
21957
|
}, f = () => {
|
|
21958
21958
|
a.value = "", r.value = "", n("cancel");
|
|
21959
21959
|
};
|
|
21960
|
-
return
|
|
21960
|
+
return Be(() => e.secretName, (m) => {
|
|
21961
21961
|
a.value = m || "", r.value = "";
|
|
21962
21962
|
}), (m, h) => {
|
|
21963
21963
|
const v = ne("KInput"), g = ne("KEmptyState");
|
|
@@ -22234,9 +22234,9 @@ const ZF = { key: 1 }, QF = ["innerHTML"], eK = { class: "horizontal-container"
|
|
|
22234
22234
|
indent: 2,
|
|
22235
22235
|
noRefs: !0
|
|
22236
22236
|
}) : "");
|
|
22237
|
-
|
|
22237
|
+
Be([f, v], ([$, R]) => {
|
|
22238
22238
|
$ && R === "redis" && !u.value && (d.value = g.value || i, p.value = "");
|
|
22239
|
-
}),
|
|
22239
|
+
}), Be(d, ($) => {
|
|
22240
22240
|
if (!u.value && v.value === "redis")
|
|
22241
22241
|
try {
|
|
22242
22242
|
const R = Ki($, { json: !0 });
|
|
@@ -22458,7 +22458,7 @@ const ZF = { key: 1 }, QF = ["innerHTML"], eK = { class: "horizontal-container"
|
|
|
22458
22458
|
function r() {
|
|
22459
22459
|
i.value = !1;
|
|
22460
22460
|
}
|
|
22461
|
-
|
|
22461
|
+
Be(o, (c) => {
|
|
22462
22462
|
c || r();
|
|
22463
22463
|
});
|
|
22464
22464
|
const l = G(!1);
|
|
@@ -23245,14 +23245,14 @@ const Gn = K.object({
|
|
|
23245
23245
|
const F = c(A);
|
|
23246
23246
|
F && i("change:inputs", F, N);
|
|
23247
23247
|
}
|
|
23248
|
-
return
|
|
23248
|
+
return Be(o, (A) => {
|
|
23249
23249
|
const N = new Set(A.map(([F]) => F));
|
|
23250
23250
|
Object.keys(v.value).forEach((F) => {
|
|
23251
23251
|
N.has(F) ? v.value[F] = v.value[F] ?? c(F) ?? "" : (delete v.value[F], delete h.value[F]);
|
|
23252
23252
|
}), A.forEach(([F, j]) => {
|
|
23253
23253
|
v.value[F] = v.value[F] ?? j;
|
|
23254
23254
|
}), m.value && !N.has(m.value) && (m.value = null);
|
|
23255
|
-
}, { immediate: !0 }),
|
|
23255
|
+
}, { immediate: !0 }), Be(() => n.keyOrder, () => {
|
|
23256
23256
|
if (!m.value)
|
|
23257
23257
|
return;
|
|
23258
23258
|
const A = _.value.findIndex(([N]) => N === m.value);
|
|
@@ -23269,13 +23269,13 @@ const Gn = K.object({
|
|
|
23269
23269
|
ref: f,
|
|
23270
23270
|
class: "dk-inputs-map-field"
|
|
23271
23271
|
}, [
|
|
23272
|
-
(b(!0), D(Se, null, Ye(_.value, ([Z, z],
|
|
23272
|
+
(b(!0), D(Se, null, Ye(_.value, ([Z, z], B) => (b(), D("div", {
|
|
23273
23273
|
key: Z,
|
|
23274
23274
|
class: "dk-inputs-map-field-entry",
|
|
23275
|
-
"data-testid": `ff-kv-container-${s(u).path.value}.${
|
|
23275
|
+
"data-testid": `ff-kv-container-${s(u).path.value}.${B}`
|
|
23276
23276
|
}, [
|
|
23277
23277
|
y(j, {
|
|
23278
|
-
for: `ff-kv-entry-key-${s(u).path.value}.${
|
|
23278
|
+
for: `ff-kv-entry-key-${s(u).path.value}.${B}`
|
|
23279
23279
|
}, {
|
|
23280
23280
|
default: C(() => [
|
|
23281
23281
|
re(M(s(p)("plugins.free-form.datakit.flow_editor.node_properties.input_name.label")), 1)
|
|
@@ -23285,10 +23285,10 @@ const Gn = K.object({
|
|
|
23285
23285
|
O("div", ID, [
|
|
23286
23286
|
O("div", AD, [
|
|
23287
23287
|
y(V, {
|
|
23288
|
-
id: `ff-kv-entry-key-${s(u).path.value}.${
|
|
23288
|
+
id: `ff-kv-entry-key-${s(u).path.value}.${B}`,
|
|
23289
23289
|
class: "ff-kv-field-entry-key",
|
|
23290
|
-
"data-key-input":
|
|
23291
|
-
"data-testid": `ff-key-${s(u).path.value}.${
|
|
23290
|
+
"data-key-input": B,
|
|
23291
|
+
"data-testid": `ff-key-${s(u).path.value}.${B}`,
|
|
23292
23292
|
error: !!h.value[Z],
|
|
23293
23293
|
"error-message": h.value[Z],
|
|
23294
23294
|
"model-value": v.value[Z] ?? z,
|
|
@@ -23301,7 +23301,7 @@ const Gn = K.object({
|
|
|
23301
23301
|
y(oe, {
|
|
23302
23302
|
class: "ff-kv-field-entry-value",
|
|
23303
23303
|
clearable: "",
|
|
23304
|
-
"data-testid": `ff-value-${s(u).path.value}.${
|
|
23304
|
+
"data-testid": `ff-value-${s(u).path.value}.${B}`,
|
|
23305
23305
|
"enable-filtering": "",
|
|
23306
23306
|
items: e.items,
|
|
23307
23307
|
label: s(p)("plugins.free-form.datakit.flow_editor.node_properties.input.source"),
|
|
@@ -23321,7 +23321,7 @@ const Gn = K.object({
|
|
|
23321
23321
|
y(ge, {
|
|
23322
23322
|
appearance: "tertiary",
|
|
23323
23323
|
class: "dk-inputs-map-field-remove-btn",
|
|
23324
|
-
"data-testid": `ff-kv-remove-btn-${s(u).path.value}.${
|
|
23324
|
+
"data-testid": `ff-kv-remove-btn-${s(u).path.value}.${B}`,
|
|
23325
23325
|
icon: "",
|
|
23326
23326
|
onClick: (ie) => T(Z, z)
|
|
23327
23327
|
}, {
|
|
@@ -23810,7 +23810,7 @@ function $i(e) {
|
|
|
23810
23810
|
i(!f);
|
|
23811
23811
|
} catch {
|
|
23812
23812
|
}
|
|
23813
|
-
}),
|
|
23813
|
+
}), Be(() => c.value, i, { immediate: !0 }), {
|
|
23814
23814
|
fields: l.value,
|
|
23815
23815
|
isValid: c,
|
|
23816
23816
|
validateAll: u,
|
|
@@ -23836,12 +23836,12 @@ function xn(e, t) {
|
|
|
23836
23836
|
if (!Z) throw new Error("Node not existed");
|
|
23837
23837
|
return Z;
|
|
23838
23838
|
}), _ = I(() => {
|
|
23839
|
-
const z = n.value.edges.filter((
|
|
23839
|
+
const z = n.value.edges.filter((B) => B.target === e).reduce((B, ie) => {
|
|
23840
23840
|
const Y = o(ie.source), ue = Ri(Y, "output", ie.sourceField)?.id, de = Ri(g.value, "input", ie.targetField)?.name, J = Y.id + (ue ? `.${ue}` : "");
|
|
23841
|
-
return de ?
|
|
23841
|
+
return de ? B.inputs = { ...B.inputs, [de]: J } : B.input = J, B;
|
|
23842
23842
|
}, {});
|
|
23843
|
-
return g.value.fields.input.forEach((
|
|
23844
|
-
z.inputs || (z.inputs = {}), z.inputs[
|
|
23843
|
+
return g.value.fields.input.forEach((B) => {
|
|
23844
|
+
z.inputs || (z.inputs = {}), z.inputs[B.name] || (z.inputs[B.name] = null);
|
|
23845
23845
|
}), {
|
|
23846
23846
|
...g.value.config,
|
|
23847
23847
|
...z,
|
|
@@ -23851,25 +23851,25 @@ function xn(e, t) {
|
|
|
23851
23851
|
i(e, Z ?? "", !0, `${e}:rename`);
|
|
23852
23852
|
}, w = (Z, z = !0) => {
|
|
23853
23853
|
if (!t) throw new Error("getFormValue is not defined");
|
|
23854
|
-
const
|
|
23855
|
-
c(e,
|
|
23854
|
+
const B = qi(t(), ["name", "input", "inputs"]), ie = Z ? `update:${e}:${Z}` : void 0;
|
|
23855
|
+
c(e, B, z, ie);
|
|
23856
23856
|
}, T = (Z, z) => {
|
|
23857
|
-
const
|
|
23858
|
-
if (!
|
|
23857
|
+
const B = Vi(g.value, Z, z);
|
|
23858
|
+
if (!B)
|
|
23859
23859
|
throw new Error(`Field with name "${z}" not found in node "${g.value.name}"`);
|
|
23860
|
-
return
|
|
23861
|
-
}, S = (Z, z,
|
|
23862
|
-
const ie = !!
|
|
23863
|
-
a(e, Z, z, !ie), ie && x(z,
|
|
23864
|
-
}, E = (Z, z,
|
|
23860
|
+
return B;
|
|
23861
|
+
}, S = (Z, z, B) => {
|
|
23862
|
+
const ie = !!B;
|
|
23863
|
+
a(e, Z, z, !ie), ie && x(z, B);
|
|
23864
|
+
}, E = (Z, z, B) => {
|
|
23865
23865
|
const ie = T(Z, z).id;
|
|
23866
|
-
r(e, ie,
|
|
23866
|
+
r(e, ie, B);
|
|
23867
23867
|
}, P = (Z, z) => {
|
|
23868
|
-
const
|
|
23869
|
-
l(e,
|
|
23868
|
+
const B = T(Z, z).id;
|
|
23869
|
+
l(e, B);
|
|
23870
23870
|
}, $ = I(() => n.value.edges.filter((Z) => Z.target === e && !Z.targetField)[0]), R = I(() => n.value.edges.filter((Z) => Z.target === e && Z.targetField)), x = async (Z, z) => {
|
|
23871
|
-
const
|
|
23872
|
-
if (
|
|
23871
|
+
const B = z == null, ie = T("input", Z).id;
|
|
23872
|
+
if (B) {
|
|
23873
23873
|
const se = R.value.find((te) => te.targetField === ie);
|
|
23874
23874
|
se && u(se.id);
|
|
23875
23875
|
return;
|
|
@@ -23905,9 +23905,9 @@ function xn(e, t) {
|
|
|
23905
23905
|
$.value && u($.value.id);
|
|
23906
23906
|
return;
|
|
23907
23907
|
}
|
|
23908
|
-
const
|
|
23908
|
+
const B = [];
|
|
23909
23909
|
for (const J of R.value)
|
|
23910
|
-
|
|
23910
|
+
B.push(ja(J, o)), u(J.id, !1);
|
|
23911
23911
|
$.value && u($.value.id, !1);
|
|
23912
23912
|
const { nodeId: ie, fieldId: Y } = sp(Z);
|
|
23913
23913
|
d({
|
|
@@ -23924,12 +23924,12 @@ function xn(e, t) {
|
|
|
23924
23924
|
void 0,
|
|
23925
23925
|
o
|
|
23926
23926
|
);
|
|
23927
|
-
if (f(),
|
|
23927
|
+
if (f(), B.length === 0)
|
|
23928
23928
|
return;
|
|
23929
23929
|
await v(
|
|
23930
23930
|
h("plugins.free-form.datakit.flow_editor.confirm.message.switch"),
|
|
23931
23931
|
[ue],
|
|
23932
|
-
|
|
23932
|
+
B
|
|
23933
23933
|
) || m();
|
|
23934
23934
|
}, N = (Z) => {
|
|
23935
23935
|
const z = [
|
|
@@ -23955,11 +23955,11 @@ function xn(e, t) {
|
|
|
23955
23955
|
p.value.delete(e), Z || p.value.add(e);
|
|
23956
23956
|
}
|
|
23957
23957
|
const oe = UD(e);
|
|
23958
|
-
function ge(Z, z,
|
|
23958
|
+
function ge(Z, z, B) {
|
|
23959
23959
|
const ie = o(e);
|
|
23960
23960
|
if (!ie) throw new Error("Node not found when validating field name");
|
|
23961
23961
|
const Y = Vi(ie, Z, z);
|
|
23962
|
-
return oe(Z,
|
|
23962
|
+
return oe(Z, B, Y?.id);
|
|
23963
23963
|
}
|
|
23964
23964
|
return {
|
|
23965
23965
|
// states
|
|
@@ -24032,7 +24032,7 @@ const Hn = /* @__PURE__ */ le({
|
|
|
24032
24032
|
function u() {
|
|
24033
24033
|
l = a.value.trim();
|
|
24034
24034
|
}
|
|
24035
|
-
return
|
|
24035
|
+
return Be(() => n.name, (d) => {
|
|
24036
24036
|
d !== a.value && (a.value = d);
|
|
24037
24037
|
}), (d, p) => {
|
|
24038
24038
|
const f = ne("KInput");
|
|
@@ -24401,7 +24401,7 @@ const Hn = /* @__PURE__ */ le({
|
|
|
24401
24401
|
function R(x) {
|
|
24402
24402
|
$(x);
|
|
24403
24403
|
}
|
|
24404
|
-
return
|
|
24404
|
+
return Be(() => a?.value, (x) => {
|
|
24405
24405
|
if (Xt(x, f))
|
|
24406
24406
|
return;
|
|
24407
24407
|
f = x;
|
|
@@ -24647,7 +24647,7 @@ const QD = /* @__PURE__ */ le({
|
|
|
24647
24647
|
function h(v) {
|
|
24648
24648
|
c.value !== Pa(v?.value) && (l.property = v?.value || null, c.value = Pa(l.property), a.validators.property.handleBlur(() => l.property), r("update:model-value", l.property));
|
|
24649
24649
|
}
|
|
24650
|
-
return
|
|
24650
|
+
return Be(() => l.property, (v) => {
|
|
24651
24651
|
d.value = sc(v), c.value = Pa(v);
|
|
24652
24652
|
}), (v, g) => {
|
|
24653
24653
|
const _ = ne("KBadge"), k = ne("KSelect"), w = ne("KInput");
|
|
@@ -25722,7 +25722,7 @@ const lj = /* @__PURE__ */ le({
|
|
|
25722
25722
|
function i() {
|
|
25723
25723
|
t.value = !1;
|
|
25724
25724
|
}
|
|
25725
|
-
|
|
25725
|
+
Be(n, (a) => {
|
|
25726
25726
|
a || i();
|
|
25727
25727
|
});
|
|
25728
25728
|
const o = G(!1);
|
|
@@ -25762,7 +25762,7 @@ const lj = /* @__PURE__ */ le({
|
|
|
25762
25762
|
return n.value = !1, c;
|
|
25763
25763
|
});
|
|
25764
25764
|
const a = S_(document);
|
|
25765
|
-
|
|
25765
|
+
Be(t, (l) => {
|
|
25766
25766
|
a.value = !!l, l || o();
|
|
25767
25767
|
}, { immediate: !0 });
|
|
25768
25768
|
function r() {
|
|
@@ -25806,7 +25806,7 @@ const lj = /* @__PURE__ */ le({
|
|
|
25806
25806
|
onChange: l,
|
|
25807
25807
|
isEditing: e.isEditing
|
|
25808
25808
|
});
|
|
25809
|
-
return
|
|
25809
|
+
return Be(c, () => {
|
|
25810
25810
|
u(!0);
|
|
25811
25811
|
}, { flush: "post" }), iF({ enabled: c }), (d, p) => {
|
|
25812
25812
|
const f = ne("KButton");
|
|
@@ -25896,7 +25896,7 @@ const lj = /* @__PURE__ */ le({
|
|
|
25896
25896
|
// @ts-ignore MessageFormatPrimitiveValue should have function type
|
|
25897
25897
|
code: (P) => `<code>${WE(P)}</code>`
|
|
25898
25898
|
}));
|
|
25899
|
-
|
|
25899
|
+
Be(l, () => {
|
|
25900
25900
|
n.onValidityChange?.({
|
|
25901
25901
|
model: "config",
|
|
25902
25902
|
valid: !0
|
|
@@ -27372,7 +27372,7 @@ const r8 = {
|
|
|
27372
27372
|
function E(x) {
|
|
27373
27373
|
S.value = x, u.value = T(x.trim());
|
|
27374
27374
|
}
|
|
27375
|
-
|
|
27375
|
+
Be(u, (x) => {
|
|
27376
27376
|
const A = T(S.value.trim());
|
|
27377
27377
|
Xt(x ?? null, A ?? null) || (S.value = w(x));
|
|
27378
27378
|
});
|
|
@@ -27582,10 +27582,10 @@ const r8 = {
|
|
|
27582
27582
|
return Array.isArray(Ae) && Ae.length > 0 ? Ae : [null];
|
|
27583
27583
|
}), V = I(
|
|
27584
27584
|
() => oe.value && !E.value || F.value.length <= 1
|
|
27585
|
-
), oe = I(() => r?.isKongIdentityAuthServersAvailable !== !1), ge = I(() => r?.canCreateAuthServer !== !1), Z = I(() => r?.canCreateAuthServerClient !== !1), z = I(() => r?.principalsCreationGuideVisible),
|
|
27586
|
-
() => !
|
|
27585
|
+
), oe = I(() => r?.isKongIdentityAuthServersAvailable !== !1), ge = I(() => r?.canCreateAuthServer !== !1), Z = I(() => r?.canCreateAuthServerClient !== !1), z = I(() => r?.principalsCreationGuideVisible), B = I(() => z.value === !0), ie = I(() => z.value === void 0), Y = I(
|
|
27586
|
+
() => !B.value && (r?.dataPlaneVersions ?? []).some(i)
|
|
27587
27587
|
);
|
|
27588
|
-
|
|
27588
|
+
Be(() => r?.principalsDirectoryName, (Ae) => {
|
|
27589
27589
|
u.value || _.value !== gi || Ae == null || d.config?.principals && (d.config.principals.directory = Ae);
|
|
27590
27590
|
}, { immediate: !0 }), pn(() => {
|
|
27591
27591
|
u.value || tn(() => {
|
|
@@ -27636,7 +27636,7 @@ const r8 = {
|
|
|
27636
27636
|
function _e() {
|
|
27637
27637
|
v.value = [...F.value, null], g.value = [...j.value, null];
|
|
27638
27638
|
}
|
|
27639
|
-
function
|
|
27639
|
+
function ze(Ae) {
|
|
27640
27640
|
if (F.value.length <= 1) return;
|
|
27641
27641
|
const Oe = [...F.value];
|
|
27642
27642
|
Oe.splice(Ae, 1), v.value = Oe;
|
|
@@ -27735,7 +27735,7 @@ const r8 = {
|
|
|
27735
27735
|
key: 0,
|
|
27736
27736
|
class: "principals-create-guide-skeleton",
|
|
27737
27737
|
"data-testid": "principals-create-guide-loading"
|
|
27738
|
-
})) :
|
|
27738
|
+
})) : B.value && _.value === gi ? (b(), D("div", K8, [
|
|
27739
27739
|
O("div", D8, M(s(a)("plugins.free-form.openid-connect.principals.guide.title")), 1),
|
|
27740
27740
|
O("div", j8, M(s(a)("plugins.free-form.openid-connect.principals.guide.description")), 1),
|
|
27741
27741
|
O("div", q8, [
|
|
@@ -27886,7 +27886,7 @@ const r8 = {
|
|
|
27886
27886
|
"data-testid": "remove-client-action",
|
|
27887
27887
|
disabled: V.value,
|
|
27888
27888
|
type: "button",
|
|
27889
|
-
onClick: (pe) =>
|
|
27889
|
+
onClick: (pe) => ze(qe)
|
|
27890
27890
|
}, [
|
|
27891
27891
|
y(s(ji), {
|
|
27892
27892
|
size: `var(--kui-icon-size-30, ${s(Pn)})`
|
|
@@ -27978,7 +27978,7 @@ const r8 = {
|
|
|
27978
27978
|
"data-testid": "remove-external-client-action",
|
|
27979
27979
|
disabled: F.value.length <= 1,
|
|
27980
27980
|
type: "button",
|
|
27981
|
-
onClick: (pe) =>
|
|
27981
|
+
onClick: (pe) => ze(qe)
|
|
27982
27982
|
}, [
|
|
27983
27983
|
y(s(ji), {
|
|
27984
27984
|
size: `var(--kui-icon-size-30, ${s(Pn)})`
|
|
@@ -28790,7 +28790,7 @@ const za = "_callout_id", YV = /* @__PURE__ */ le({
|
|
|
28790
28790
|
const { callouts: r } = n.config;
|
|
28791
28791
|
return r == null ? [] : r.filter(({ name: l }) => l && l !== r[t.index]?.name);
|
|
28792
28792
|
}), o = I(() => i.value.map(({ [za]: r, name: l }) => ({ value: r, label: l }))), a = I(() => n.config.callouts[t.index]);
|
|
28793
|
-
return
|
|
28793
|
+
return Be(o, () => {
|
|
28794
28794
|
a.value.depends_on = a.value.depends_on.filter(
|
|
28795
28795
|
(r) => o.value.some((l) => l.value === r)
|
|
28796
28796
|
);
|
|
@@ -30025,7 +30025,7 @@ const ly = (e) => {
|
|
|
30025
30025
|
N.forEach((ie) => {
|
|
30026
30026
|
u(x[ie], ie, x, V, j, $);
|
|
30027
30027
|
});
|
|
30028
|
-
const oe = V.name, ge = E._sourcePlugin || oe, Z = Mn[ge], z = [],
|
|
30028
|
+
const oe = V.name, ge = E._sourcePlugin || oe, Z = Mn[ge], z = [], B = (ie) => {
|
|
30029
30029
|
const Y = ["cluster-cache"];
|
|
30030
30030
|
for (const ue of Y)
|
|
30031
30031
|
if (ie.model.includes(ue))
|
|
@@ -30035,11 +30035,11 @@ const ly = (e) => {
|
|
|
30035
30035
|
if (j._supported_redis_partial_type = E._supported_redis_partial_type, j._redis_partial_path = E._redis_partial_path, um(ge) || ry(ge, o, R) || Z?.useLegacyForm || e?.credential) {
|
|
30036
30036
|
if (Z?.useLegacyForm && e?.enableRedisPartial && E._supported_redis_partial_type) {
|
|
30037
30037
|
for (const ie of j.fields)
|
|
30038
|
-
if (
|
|
30038
|
+
if (B(ie)) {
|
|
30039
30039
|
z.push(ie);
|
|
30040
30040
|
continue;
|
|
30041
30041
|
}
|
|
30042
|
-
j.fields = j.fields.filter((ie) => !
|
|
30042
|
+
j.fields = j.fields.filter((ie) => !B(ie)), z.length && j.fields.push({
|
|
30043
30043
|
id: "_redis",
|
|
30044
30044
|
fields: z,
|
|
30045
30045
|
model: "__redis_partial",
|
|
@@ -30058,14 +30058,14 @@ const ly = (e) => {
|
|
|
30058
30058
|
...Z.fieldRules.mutuallyRequired ?? []
|
|
30059
30059
|
];
|
|
30060
30060
|
if (Z.fieldRules.onlyOneOfMutuallyRequired)
|
|
30061
|
-
for (const
|
|
30062
|
-
_e.push(...
|
|
30063
|
-
for (const
|
|
30064
|
-
for (const se of
|
|
30061
|
+
for (const ze of Z.fieldRules.onlyOneOfMutuallyRequired)
|
|
30062
|
+
_e.push(...ze);
|
|
30063
|
+
for (const ze of _e)
|
|
30064
|
+
for (const se of ze)
|
|
30065
30065
|
J[se.replace(/-/g, "_").replace(/\./g, "-")] = !1;
|
|
30066
30066
|
}
|
|
30067
30067
|
for (const _e of j.fields) {
|
|
30068
|
-
if (e?.enableRedisPartial && E._supported_redis_partial_type &&
|
|
30068
|
+
if (e?.enableRedisPartial && E._supported_redis_partial_type && B(_e)) {
|
|
30069
30069
|
de.push(_e);
|
|
30070
30070
|
continue;
|
|
30071
30071
|
}
|
|
@@ -30448,7 +30448,7 @@ const at = {
|
|
|
30448
30448
|
const he = o.config.workspace ?? "", Ie = o.config.app === "konnect" ? o.config.controlPlaneId : "";
|
|
30449
30449
|
return `${o.config.apiBaseUrl}${se}`.replace(/{controlPlaneId}/gi, Ie).replace(/{pluginId}/gi, te ?? "").replace(/\/\{workspace\}/gi, he ? `/${he}` : "");
|
|
30450
30450
|
}, S = I(() => {
|
|
30451
|
-
const se =
|
|
30451
|
+
const se = B.fields.pluginType;
|
|
30452
30452
|
if (!se) return "";
|
|
30453
30453
|
const te = R.value ? o.pluginName : void 0, he = te ? "edit" : "create";
|
|
30454
30454
|
if (o.config.app === "konnect") {
|
|
@@ -30460,8 +30460,8 @@ const at = {
|
|
|
30460
30460
|
if (se === "cloned") return T(nt.customPlugin.kongManager.cloned[he], te);
|
|
30461
30461
|
}
|
|
30462
30462
|
return "";
|
|
30463
|
-
}), E = I(() => R.value ?
|
|
30464
|
-
switch (
|
|
30463
|
+
}), E = I(() => R.value ? B.fields.pluginType === "cloned" ? o.config.app === "konnect" ? "put" : "patch" : o.config.app === "kongManager" && B.fields.pluginType === "streamed" ? "patch" : "put" : "post"), P = I(() => {
|
|
30464
|
+
switch (B.fields.pluginType) {
|
|
30465
30465
|
case "installed":
|
|
30466
30466
|
return Yn.PluginSchema;
|
|
30467
30467
|
case "streamed":
|
|
@@ -30472,20 +30472,20 @@ const at = {
|
|
|
30472
30472
|
return Yn.Plugin;
|
|
30473
30473
|
}
|
|
30474
30474
|
}), $ = I(() => {
|
|
30475
|
-
switch (
|
|
30475
|
+
switch (B.fields.pluginType) {
|
|
30476
30476
|
case "installed":
|
|
30477
|
-
return { lua_schema:
|
|
30477
|
+
return { lua_schema: B.fields.schemaContent };
|
|
30478
30478
|
case "streamed":
|
|
30479
30479
|
return {
|
|
30480
|
-
name:
|
|
30481
|
-
schema:
|
|
30482
|
-
handler:
|
|
30480
|
+
name: B.fields.name,
|
|
30481
|
+
schema: B.fields.schemaContent,
|
|
30482
|
+
handler: B.fields.handlerContent
|
|
30483
30483
|
};
|
|
30484
30484
|
case "cloned":
|
|
30485
30485
|
return {
|
|
30486
|
-
ref:
|
|
30487
|
-
name:
|
|
30488
|
-
...
|
|
30486
|
+
ref: B.fields.sourcePlugin,
|
|
30487
|
+
name: B.fields.aliasName,
|
|
30488
|
+
...B.fields.priority ? { priority: parseInt(B.fields.priority, 10) } : {}
|
|
30489
30489
|
};
|
|
30490
30490
|
default:
|
|
30491
30491
|
return {};
|
|
@@ -30493,10 +30493,10 @@ const at = {
|
|
|
30493
30493
|
}), R = I(() => !!o.pluginName), x = G(!1), A = G(""), N = I(() => new Set(o.unsupportedTypes)), F = I(() => i.filter((se) => !N.value.has(se))), j = I(() => !R.value && F.value.length === 0), V = I(() => !R.value && F.value.length > 1), oe = () => F.value[0] ?? null, ge = (se) => F.value.includes(se), Z = (se) => {
|
|
30494
30494
|
if (R.value || !V.value) {
|
|
30495
30495
|
const te = se - 1;
|
|
30496
|
-
return (
|
|
30496
|
+
return (B.fields.pluginType === "installed" ? 1 : 2) > 1 ? te : void 0;
|
|
30497
30497
|
}
|
|
30498
30498
|
return se;
|
|
30499
|
-
}, z = G(!0),
|
|
30499
|
+
}, z = G(!0), B = si({
|
|
30500
30500
|
fields: {
|
|
30501
30501
|
pluginType: oe(),
|
|
30502
30502
|
schemaContent: "",
|
|
@@ -30510,10 +30510,10 @@ const at = {
|
|
|
30510
30510
|
errorMessage: ""
|
|
30511
30511
|
});
|
|
30512
30512
|
let ie = "";
|
|
30513
|
-
|
|
30514
|
-
R.value || (!
|
|
30515
|
-
}, { immediate: !0 }),
|
|
30516
|
-
R.value || (
|
|
30513
|
+
Be(F, (se) => {
|
|
30514
|
+
R.value || (!B.fields.pluginType || !se.includes(B.fields.pluginType)) && (B.fields.pluginType = se[0] ?? null);
|
|
30515
|
+
}, { immediate: !0 }), Be(() => B.fields.pluginType, () => {
|
|
30516
|
+
R.value || (B.fields.schemaContent = "", B.fields.handlerContent = "", B.fields.name = "", B.fields.sourcePlugin = "", B.fields.aliasName = "", B.fields.priority = "");
|
|
30517
30517
|
});
|
|
30518
30518
|
const { getDisplayName: Y } = dh(), ue = I(() => {
|
|
30519
30519
|
const se = o.config?.clonablePlugins ?? n;
|
|
@@ -30534,15 +30534,15 @@ const at = {
|
|
|
30534
30534
|
});
|
|
30535
30535
|
}), he;
|
|
30536
30536
|
}), de = I(() => {
|
|
30537
|
-
if (j.value || !
|
|
30537
|
+
if (j.value || !B.fields.pluginType)
|
|
30538
30538
|
return !1;
|
|
30539
|
-
switch (
|
|
30539
|
+
switch (B.fields.pluginType) {
|
|
30540
30540
|
case "installed":
|
|
30541
|
-
return
|
|
30541
|
+
return B.fields.schemaContent.length > 0;
|
|
30542
30542
|
case "streamed":
|
|
30543
|
-
return
|
|
30543
|
+
return B.fields.schemaContent.length > 0 && B.fields.handlerContent.length > 0 && B.fields.name.trim().length > 0;
|
|
30544
30544
|
case "cloned":
|
|
30545
|
-
return !!
|
|
30545
|
+
return !!B.fields.sourcePlugin && B.fields.aliasName.trim().length > 0;
|
|
30546
30546
|
default:
|
|
30547
30547
|
return !1;
|
|
30548
30548
|
}
|
|
@@ -30556,18 +30556,18 @@ const at = {
|
|
|
30556
30556
|
const he = te[0];
|
|
30557
30557
|
if (he) {
|
|
30558
30558
|
if (he.size > zB) {
|
|
30559
|
-
|
|
30559
|
+
B.errorMessage = r("custom_plugin_form.errors.file_too_large");
|
|
30560
30560
|
return;
|
|
30561
30561
|
}
|
|
30562
30562
|
try {
|
|
30563
30563
|
const Ie = await J(he);
|
|
30564
|
-
se === "schema" ?
|
|
30564
|
+
se === "schema" ? B.fields.schemaContent = Ie : B.fields.handlerContent = Ie;
|
|
30565
30565
|
} catch {
|
|
30566
|
-
|
|
30566
|
+
B.errorMessage = r("custom_plugin_form.errors.file_read_error"), se === "schema" ? B.fields.schemaContent = "" : B.fields.handlerContent = "";
|
|
30567
30567
|
}
|
|
30568
30568
|
}
|
|
30569
30569
|
}, Te = (se) => {
|
|
30570
|
-
se === "schema" ?
|
|
30570
|
+
se === "schema" ? B.fields.schemaContent = "" : B.fields.handlerContent = "";
|
|
30571
30571
|
}, _e = () => {
|
|
30572
30572
|
c.push(o.config.cancelRoute);
|
|
30573
30573
|
};
|
|
@@ -30581,14 +30581,14 @@ const at = {
|
|
|
30581
30581
|
return;
|
|
30582
30582
|
}
|
|
30583
30583
|
const te = v(se);
|
|
30584
|
-
if (
|
|
30585
|
-
|
|
30584
|
+
if (B.fields.pluginType = te, te === "installed")
|
|
30585
|
+
B.fields.schemaContent = se.item.lua_schema;
|
|
30586
30586
|
else if (te === "streamed") {
|
|
30587
30587
|
const { name: he, schema: Ie, handler: De } = se;
|
|
30588
|
-
|
|
30588
|
+
B.fields.name = he, B.fields.schemaContent = Ie, B.fields.handlerContent = De;
|
|
30589
30589
|
} else if (te === "cloned") {
|
|
30590
30590
|
const { ref: he, name: Ie, priority: De } = se;
|
|
30591
|
-
|
|
30591
|
+
B.fields.aliasName = Ie, B.fields.sourcePlugin = he, B.fields.priority = De !== null ? String(De) : "", ie = Ie;
|
|
30592
30592
|
} else
|
|
30593
30593
|
A.value = r("custom_plugin_form.errors.unsupported_plugin_type", { type: te }), a("error", new Error(A.value));
|
|
30594
30594
|
} catch (se) {
|
|
@@ -30598,31 +30598,31 @@ const at = {
|
|
|
30598
30598
|
}
|
|
30599
30599
|
}
|
|
30600
30600
|
});
|
|
30601
|
-
const
|
|
30602
|
-
|
|
30601
|
+
const ze = async () => {
|
|
30602
|
+
B.errorMessage = "", B.readonly = !0;
|
|
30603
30603
|
try {
|
|
30604
|
-
const se =
|
|
30604
|
+
const se = B.fields.pluginType;
|
|
30605
30605
|
if (!se)
|
|
30606
30606
|
return;
|
|
30607
30607
|
if (se === "installed") {
|
|
30608
|
-
const te = { lua_schema:
|
|
30608
|
+
const te = { lua_schema: B.fields.schemaContent }, he = R.value ? await f(o.pluginName, te) : await p(te);
|
|
30609
30609
|
a("update", he);
|
|
30610
30610
|
} else if (se === "streamed") {
|
|
30611
30611
|
const te = {
|
|
30612
|
-
name:
|
|
30613
|
-
schema:
|
|
30614
|
-
handler:
|
|
30612
|
+
name: B.fields.name,
|
|
30613
|
+
schema: B.fields.schemaContent,
|
|
30614
|
+
handler: B.fields.handlerContent
|
|
30615
30615
|
}, he = R.value ? await h(o.pluginName, te) : await m(te);
|
|
30616
30616
|
a("update", he);
|
|
30617
30617
|
} else {
|
|
30618
30618
|
const te = R.value ? await k(ie, {
|
|
30619
|
-
aliasName:
|
|
30620
|
-
sourcePlugin:
|
|
30621
|
-
priority:
|
|
30619
|
+
aliasName: B.fields.aliasName,
|
|
30620
|
+
sourcePlugin: B.fields.sourcePlugin,
|
|
30621
|
+
priority: B.fields.priority ? parseInt(B.fields.priority, 10) : void 0
|
|
30622
30622
|
}) : await _({
|
|
30623
|
-
aliasName:
|
|
30624
|
-
sourcePlugin:
|
|
30625
|
-
priority:
|
|
30623
|
+
aliasName: B.fields.aliasName,
|
|
30624
|
+
sourcePlugin: B.fields.sourcePlugin,
|
|
30625
|
+
priority: B.fields.priority ? parseInt(B.fields.priority, 10) : void 0
|
|
30626
30626
|
});
|
|
30627
30627
|
a("update", {
|
|
30628
30628
|
pluginType: "cloned",
|
|
@@ -30633,9 +30633,9 @@ const at = {
|
|
|
30633
30633
|
}
|
|
30634
30634
|
c.push(o.config.successRoute);
|
|
30635
30635
|
} catch (se) {
|
|
30636
|
-
|
|
30636
|
+
B.errorMessage = dy(se) ? r("delete.plugin_schema_in_use_message") : u(se), a("error", se);
|
|
30637
30637
|
} finally {
|
|
30638
|
-
|
|
30638
|
+
B.readonly = !1;
|
|
30639
30639
|
}
|
|
30640
30640
|
};
|
|
30641
30641
|
return (se, te) => {
|
|
@@ -30647,21 +30647,21 @@ const at = {
|
|
|
30647
30647
|
"can-submit": de.value,
|
|
30648
30648
|
config: e.config,
|
|
30649
30649
|
"entity-type": s(Yn).Plugin,
|
|
30650
|
-
"error-message":
|
|
30650
|
+
"error-message": B.errorMessage,
|
|
30651
30651
|
"form-fields": $.value,
|
|
30652
|
-
"is-readonly":
|
|
30652
|
+
"is-readonly": B.readonly,
|
|
30653
30653
|
"slideout-deck-entity-type": P.value,
|
|
30654
30654
|
"slideout-fetch-url": S.value,
|
|
30655
30655
|
"slideout-request-method": E.value,
|
|
30656
30656
|
onCancel: _e,
|
|
30657
|
-
onSubmit:
|
|
30657
|
+
onSubmit: ze
|
|
30658
30658
|
}, {
|
|
30659
30659
|
"form-actions": C(() => [
|
|
30660
30660
|
x.value || A.value || j.value ? (b(), D("span", BB)) : (b(), D(Se, { key: 0 }, [
|
|
30661
30661
|
y(ee, {
|
|
30662
30662
|
appearance: "primary",
|
|
30663
30663
|
"data-testid": "custom-plugin-form-submit",
|
|
30664
|
-
disabled: !de.value ||
|
|
30664
|
+
disabled: !de.value || B.readonly,
|
|
30665
30665
|
type: "submit"
|
|
30666
30666
|
}, {
|
|
30667
30667
|
default: C(() => [
|
|
@@ -30672,7 +30672,7 @@ const at = {
|
|
|
30672
30672
|
y(ee, {
|
|
30673
30673
|
appearance: "secondary",
|
|
30674
30674
|
"data-testid": "custom-plugin-form-cancel",
|
|
30675
|
-
disabled:
|
|
30675
|
+
disabled: B.readonly,
|
|
30676
30676
|
onClick: _e
|
|
30677
30677
|
}, {
|
|
30678
30678
|
default: C(() => [
|
|
@@ -30727,8 +30727,8 @@ const at = {
|
|
|
30727
30727
|
O("div", fB, [
|
|
30728
30728
|
ge("installed") ? (b(), L(De, {
|
|
30729
30729
|
key: 0,
|
|
30730
|
-
modelValue:
|
|
30731
|
-
"onUpdate:modelValue": te[0] || (te[0] = (W) =>
|
|
30730
|
+
modelValue: B.fields.pluginType,
|
|
30731
|
+
"onUpdate:modelValue": te[0] || (te[0] = (W) => B.fields.pluginType = W),
|
|
30732
30732
|
card: "",
|
|
30733
30733
|
"card-orientation": "horizontal",
|
|
30734
30734
|
"data-testid": "custom-plugin-type-installed",
|
|
@@ -30738,8 +30738,8 @@ const at = {
|
|
|
30738
30738
|
}, null, 8, ["modelValue", "description", "label"])) : X("", !0),
|
|
30739
30739
|
ge("streamed") ? (b(), L(De, {
|
|
30740
30740
|
key: 1,
|
|
30741
|
-
modelValue:
|
|
30742
|
-
"onUpdate:modelValue": te[1] || (te[1] = (W) =>
|
|
30741
|
+
modelValue: B.fields.pluginType,
|
|
30742
|
+
"onUpdate:modelValue": te[1] || (te[1] = (W) => B.fields.pluginType = W),
|
|
30743
30743
|
card: "",
|
|
30744
30744
|
"card-orientation": "horizontal",
|
|
30745
30745
|
"data-testid": "custom-plugin-type-streamed",
|
|
@@ -30749,8 +30749,8 @@ const at = {
|
|
|
30749
30749
|
}, null, 8, ["modelValue", "description", "label"])) : X("", !0),
|
|
30750
30750
|
ge("cloned") ? (b(), L(De, {
|
|
30751
30751
|
key: 2,
|
|
30752
|
-
modelValue:
|
|
30753
|
-
"onUpdate:modelValue": te[2] || (te[2] = (W) =>
|
|
30752
|
+
modelValue: B.fields.pluginType,
|
|
30753
|
+
"onUpdate:modelValue": te[2] || (te[2] = (W) => B.fields.pluginType = W),
|
|
30754
30754
|
card: "",
|
|
30755
30755
|
"card-orientation": "horizontal",
|
|
30756
30756
|
"data-testid": "custom-plugin-type-cloned",
|
|
@@ -30869,7 +30869,7 @@ const at = {
|
|
|
30869
30869
|
]),
|
|
30870
30870
|
_: 1
|
|
30871
30871
|
}, 8, ["title"])) : X("", !0),
|
|
30872
|
-
|
|
30872
|
+
B.fields.pluginType === "installed" ? (b(), L(s(yn), {
|
|
30873
30873
|
key: 1,
|
|
30874
30874
|
class: "custom-plugin-form-steps",
|
|
30875
30875
|
step: Z(2),
|
|
@@ -30882,7 +30882,7 @@ const at = {
|
|
|
30882
30882
|
"data-testid": "custom-plugin-schema-upload",
|
|
30883
30883
|
help: s(r)("custom_plugin_form.step2_files.schema_file.help"),
|
|
30884
30884
|
label: s(r)("custom_plugin_form.step2_files.schema_file.label"),
|
|
30885
|
-
placeholder: R.value &&
|
|
30885
|
+
placeholder: R.value && B.fields.schemaContent ? s(r)("custom_plugin_form.step2_files.schema_file.placeholder_edit") : s(r)("custom_plugin_form.step2_files.schema_file.placeholder"),
|
|
30886
30886
|
required: !R.value,
|
|
30887
30887
|
onFileAdded: te[4] || (te[4] = (W) => fe("schema", W)),
|
|
30888
30888
|
onFileRemoved: te[5] || (te[5] = (W) => Te("schema"))
|
|
@@ -30902,7 +30902,7 @@ const at = {
|
|
|
30902
30902
|
]),
|
|
30903
30903
|
_: 1
|
|
30904
30904
|
}, 8, ["step", "title"])) : X("", !0),
|
|
30905
|
-
|
|
30905
|
+
B.fields.pluginType === "streamed" ? (b(), L(s(yn), {
|
|
30906
30906
|
key: 2,
|
|
30907
30907
|
class: "custom-plugin-form-steps",
|
|
30908
30908
|
step: Z(2),
|
|
@@ -30915,7 +30915,7 @@ const at = {
|
|
|
30915
30915
|
"data-testid": "custom-plugin-schema-upload",
|
|
30916
30916
|
help: s(r)("custom_plugin_form.step2_files.schema_file.help"),
|
|
30917
30917
|
label: s(r)("custom_plugin_form.step2_files.schema_file.label"),
|
|
30918
|
-
placeholder: R.value &&
|
|
30918
|
+
placeholder: R.value && B.fields.schemaContent ? s(r)("custom_plugin_form.step2_files.schema_file.placeholder_edit") : s(r)("custom_plugin_form.step2_files.schema_file.placeholder"),
|
|
30919
30919
|
required: !R.value,
|
|
30920
30920
|
onFileAdded: te[6] || (te[6] = (W) => fe("schema", W)),
|
|
30921
30921
|
onFileRemoved: te[7] || (te[7] = (W) => Te("schema"))
|
|
@@ -30926,7 +30926,7 @@ const at = {
|
|
|
30926
30926
|
"data-testid": "custom-plugin-handler-upload",
|
|
30927
30927
|
help: s(r)("custom_plugin_form.step2_files.handler_file.help"),
|
|
30928
30928
|
label: s(r)("custom_plugin_form.step2_files.handler_file.label"),
|
|
30929
|
-
placeholder: R.value &&
|
|
30929
|
+
placeholder: R.value && B.fields.handlerContent ? s(r)("custom_plugin_form.step2_files.handler_file.placeholder_edit") : s(r)("custom_plugin_form.step2_files.handler_file.placeholder"),
|
|
30930
30930
|
required: !R.value,
|
|
30931
30931
|
onFileAdded: te[8] || (te[8] = (W) => fe("handler", W)),
|
|
30932
30932
|
onFileRemoved: te[9] || (te[9] = (W) => Te("handler"))
|
|
@@ -30934,7 +30934,7 @@ const at = {
|
|
|
30934
30934
|
]),
|
|
30935
30935
|
_: 1
|
|
30936
30936
|
}, 8, ["step", "title"])) : X("", !0),
|
|
30937
|
-
|
|
30937
|
+
B.fields.pluginType === "cloned" ? (b(), L(s(yn), {
|
|
30938
30938
|
key: 3,
|
|
30939
30939
|
class: "custom-plugin-form-steps",
|
|
30940
30940
|
step: Z(2),
|
|
@@ -30942,8 +30942,8 @@ const at = {
|
|
|
30942
30942
|
}, {
|
|
30943
30943
|
default: C(() => [
|
|
30944
30944
|
y(qe, {
|
|
30945
|
-
modelValue:
|
|
30946
|
-
"onUpdate:modelValue": te[10] || (te[10] = (W) =>
|
|
30945
|
+
modelValue: B.fields.sourcePlugin,
|
|
30946
|
+
"onUpdate:modelValue": te[10] || (te[10] = (W) => B.fields.sourcePlugin = W),
|
|
30947
30947
|
"data-testid": "custom-plugin-clone-select",
|
|
30948
30948
|
"enable-filtering": "",
|
|
30949
30949
|
items: ue.value,
|
|
@@ -30974,7 +30974,7 @@ const at = {
|
|
|
30974
30974
|
]),
|
|
30975
30975
|
_: 1
|
|
30976
30976
|
}, 8, ["step", "title"])) : X("", !0),
|
|
30977
|
-
|
|
30977
|
+
B.fields.pluginType === "streamed" ? (b(), L(s(yn), {
|
|
30978
30978
|
key: 4,
|
|
30979
30979
|
class: "custom-plugin-form-steps",
|
|
30980
30980
|
description: s(r)("custom_plugin_form.step3.description"),
|
|
@@ -30983,21 +30983,21 @@ const at = {
|
|
|
30983
30983
|
}, {
|
|
30984
30984
|
default: C(() => [
|
|
30985
30985
|
y(pe, {
|
|
30986
|
-
modelValue:
|
|
30987
|
-
"onUpdate:modelValue": te[11] || (te[11] = (W) =>
|
|
30986
|
+
modelValue: B.fields.name,
|
|
30987
|
+
"onUpdate:modelValue": te[11] || (te[11] = (W) => B.fields.name = W),
|
|
30988
30988
|
modelModifiers: { trim: !0 },
|
|
30989
30989
|
"data-testid": "custom-plugin-name",
|
|
30990
30990
|
help: s(r)("custom_plugin_form.step3.name.help"),
|
|
30991
30991
|
label: s(r)("custom_plugin_form.step3.name.label"),
|
|
30992
30992
|
placeholder: s(r)("custom_plugin_form.step3.name.placeholder"),
|
|
30993
|
-
readonly:
|
|
30993
|
+
readonly: B.readonly,
|
|
30994
30994
|
required: "",
|
|
30995
30995
|
type: "text"
|
|
30996
30996
|
}, null, 8, ["modelValue", "help", "label", "placeholder", "readonly"])
|
|
30997
30997
|
]),
|
|
30998
30998
|
_: 1
|
|
30999
30999
|
}, 8, ["description", "step", "title"])) : X("", !0),
|
|
31000
|
-
|
|
31000
|
+
B.fields.pluginType === "cloned" ? (b(), L(s(yn), {
|
|
31001
31001
|
key: 5,
|
|
31002
31002
|
class: "custom-plugin-form-steps",
|
|
31003
31003
|
description: s(r)("custom_plugin_form.step3.description"),
|
|
@@ -31006,27 +31006,27 @@ const at = {
|
|
|
31006
31006
|
}, {
|
|
31007
31007
|
default: C(() => [
|
|
31008
31008
|
y(pe, {
|
|
31009
|
-
modelValue:
|
|
31010
|
-
"onUpdate:modelValue": te[12] || (te[12] = (W) =>
|
|
31009
|
+
modelValue: B.fields.aliasName,
|
|
31010
|
+
"onUpdate:modelValue": te[12] || (te[12] = (W) => B.fields.aliasName = W),
|
|
31011
31011
|
modelModifiers: { trim: !0 },
|
|
31012
31012
|
"data-testid": "custom-plugin-alias-name",
|
|
31013
31013
|
help: s(r)("custom_plugin_form.step3.alias_name.help"),
|
|
31014
31014
|
label: s(r)("custom_plugin_form.step3.alias_name.label"),
|
|
31015
31015
|
placeholder: s(r)("custom_plugin_form.step3.alias_name.placeholder"),
|
|
31016
|
-
readonly:
|
|
31016
|
+
readonly: B.readonly,
|
|
31017
31017
|
required: "",
|
|
31018
31018
|
type: "text"
|
|
31019
31019
|
}, null, 8, ["modelValue", "help", "label", "placeholder", "readonly"]),
|
|
31020
31020
|
y(pe, {
|
|
31021
|
-
modelValue:
|
|
31022
|
-
"onUpdate:modelValue": te[13] || (te[13] = (W) =>
|
|
31021
|
+
modelValue: B.fields.priority,
|
|
31022
|
+
"onUpdate:modelValue": te[13] || (te[13] = (W) => B.fields.priority = W),
|
|
31023
31023
|
modelModifiers: { trim: !0 },
|
|
31024
31024
|
"data-testid": "custom-plugin-priority",
|
|
31025
31025
|
label: s(r)("custom_plugin_form.step3.priority.label"),
|
|
31026
31026
|
"label-attributes": {
|
|
31027
31027
|
info: s(r)("custom_plugin_form.step3.priority.tooltip")
|
|
31028
31028
|
},
|
|
31029
|
-
readonly:
|
|
31029
|
+
readonly: B.readonly,
|
|
31030
31030
|
type: "number"
|
|
31031
31031
|
}, {
|
|
31032
31032
|
help: C(() => [
|
|
@@ -31429,7 +31429,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
31429
31429
|
return i.config.app === "konnect" ? l.get(W).then((ae) => {
|
|
31430
31430
|
const { data: { data: q } } = ae;
|
|
31431
31431
|
if (delete ee.size, delete ee.offset, q.length && Object.keys(ee).length === 1) {
|
|
31432
|
-
const
|
|
31432
|
+
const U = Object.keys(ee)[0], Q = q.filter((ce) => ce[U] ? !!ce[U].toLowerCase().includes(ee[U].toLowerCase()) : !1);
|
|
31433
31433
|
ae.data.data = Q;
|
|
31434
31434
|
}
|
|
31435
31435
|
return ae;
|
|
@@ -31438,7 +31438,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
31438
31438
|
getAllV2: (pe, ee, W) => {
|
|
31439
31439
|
const ae = E(pe);
|
|
31440
31440
|
if (i.config.app === "konnect") {
|
|
31441
|
-
const { size: q, offset:
|
|
31441
|
+
const { size: q, offset: U, ...Q } = ee;
|
|
31442
31442
|
if (pe === "consumer_groups")
|
|
31443
31443
|
return l.get(ae, {
|
|
31444
31444
|
params: {
|
|
@@ -31448,14 +31448,14 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
31448
31448
|
}).then((me) => {
|
|
31449
31449
|
const { data: { data: we } } = me;
|
|
31450
31450
|
if (we.length && Object.keys(Q).length === 1) {
|
|
31451
|
-
const
|
|
31451
|
+
const Ge = Object.keys(Q)[0], rt = we.filter((Me) => Me[Ge] ? !!Me[Ge].toLowerCase().includes(Q[Ge].toLowerCase()) : !1);
|
|
31452
31452
|
me.data.data = rt;
|
|
31453
31453
|
}
|
|
31454
31454
|
return me;
|
|
31455
31455
|
});
|
|
31456
31456
|
const ce = {
|
|
31457
31457
|
size: q,
|
|
31458
|
-
offset:
|
|
31458
|
+
offset: U
|
|
31459
31459
|
};
|
|
31460
31460
|
for (const me of Object.keys(Q))
|
|
31461
31461
|
ce.filter = {
|
|
@@ -31480,7 +31480,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
31480
31480
|
}
|
|
31481
31481
|
});
|
|
31482
31482
|
const A = wy({ ...i.config });
|
|
31483
|
-
|
|
31483
|
+
Be(() => i.config, (pe) => {
|
|
31484
31484
|
Object.assign(A, pe);
|
|
31485
31485
|
}), Tt(rn, A);
|
|
31486
31486
|
const N = Fs();
|
|
@@ -31488,7 +31488,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
31488
31488
|
component: Wf(ib),
|
|
31489
31489
|
toast: (pe) => N(pe)
|
|
31490
31490
|
});
|
|
31491
|
-
const F = G(""), j = G(), V = Cn(), oe = G(null), ge = G({}), Z = si({}), z = si({}),
|
|
31491
|
+
const F = G(""), j = G(), V = Cn(), oe = G(null), ge = G({}), Z = si({}), z = si({}), B = I(() => oe.value?.options), ie = I(() => {
|
|
31492
31492
|
const pe = r3(
|
|
31493
31493
|
z.name,
|
|
31494
31494
|
i.rawSchema
|
|
@@ -31506,7 +31506,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
31506
31506
|
const ee = i.schema?._sourcePlugin || pe;
|
|
31507
31507
|
j.value = oy(ee), V.value = h(ee, i.engine) ? v(ee) ?? ny : void 0, F.value = um(ee), _(!!V.value);
|
|
31508
31508
|
}, Te = (pe) => {
|
|
31509
|
-
const ee = { ...i.schema }, W = z, ae = Z, q = Object.keys(W),
|
|
31509
|
+
const ee = { ...i.schema }, W = z, ae = Z, q = Object.keys(W), U = {};
|
|
31510
31510
|
if (!f(ge.value))
|
|
31511
31511
|
for (let ce = 0; ce < ge.value?.fields?.length; ce++)
|
|
31512
31512
|
ee[ge.value.fields[ce].model] = ge.value.fields[ce];
|
|
@@ -31518,13 +31518,13 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
31518
31518
|
}), delete ee[ce]);
|
|
31519
31519
|
}), q.forEach((ce) => {
|
|
31520
31520
|
if (!ee[ce]) {
|
|
31521
|
-
ce === "partials" && (
|
|
31521
|
+
ce === "partials" && (U[ce] = W[ce]);
|
|
31522
31522
|
return;
|
|
31523
31523
|
}
|
|
31524
31524
|
const me = ee[ce];
|
|
31525
31525
|
let we = W[ce];
|
|
31526
|
-
const
|
|
31527
|
-
if (we == null &&
|
|
31526
|
+
const Ge = ae[ce], rt = Array.isArray(we) ? "array" : typeof we, Me = me ? me.valueType : null, Jt = me ? me.valueArrayType : null, Ne = me ? me.transform : null;
|
|
31527
|
+
if (we == null && Ge == null && !me.submitWhenNull)
|
|
31528
31528
|
return;
|
|
31529
31529
|
if (me) {
|
|
31530
31530
|
if (Me && rt !== Me)
|
|
@@ -31577,11 +31577,11 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
31577
31577
|
let st;
|
|
31578
31578
|
[Ve, st] = Ve.split(".");
|
|
31579
31579
|
let yt = {};
|
|
31580
|
-
|
|
31580
|
+
U[Ve] && (yt = U[Ve]), yt[st] = we, we = yt;
|
|
31581
31581
|
}
|
|
31582
|
-
|
|
31582
|
+
Ge !== void 0 && we === "" && we !== Ge ? U[Ve] = Me === "object" ? {} : null : me.type === "checklist" && we === "" ? U[Ve] = [] : we !== "" && (U[Ve] = we), U[Ve] = Ne ? Ne(we) : U[Ve], m(Ve, U);
|
|
31583
31583
|
});
|
|
31584
|
-
const Q = d(
|
|
31584
|
+
const Q = d(U);
|
|
31585
31585
|
if (V.value) {
|
|
31586
31586
|
if (pe && pe.length)
|
|
31587
31587
|
for (const ce of pe)
|
|
@@ -31595,7 +31595,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
31595
31595
|
originalModel: Z,
|
|
31596
31596
|
data: Te()
|
|
31597
31597
|
});
|
|
31598
|
-
},
|
|
31598
|
+
}, ze = (pe, ee) => {
|
|
31599
31599
|
const W = { [ee]: pe };
|
|
31600
31600
|
typeof i.schema[ee]?.modelTransformer == "function" && (W[ee] = i.schema[ee].modelTransformer(pe));
|
|
31601
31601
|
const ae = Object.assign({}, z, W);
|
|
@@ -31613,22 +31613,22 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
31613
31613
|
const ce = ee ? `${ee}-${W.replace(/-/g, "_")}` : W.replace(/-/g, "_");
|
|
31614
31614
|
i.schema[ce]?.fieldNameHasDashes && (ae = ce, q = i.schema[ae]), ee && i.schema[ee]?.keyFromObject === W && (ae = ee, q = i.schema[ae]);
|
|
31615
31615
|
}
|
|
31616
|
-
const
|
|
31617
|
-
if (q && q.type === "object-advanced" && !
|
|
31616
|
+
const U = pe[W], Q = typeof U;
|
|
31617
|
+
if (q && q.type === "object-advanced" && !U) {
|
|
31618
31618
|
z[ae] = {}, Z[ae] = {};
|
|
31619
31619
|
return;
|
|
31620
31620
|
}
|
|
31621
|
-
if (Array.isArray(
|
|
31622
|
-
z[ae] = JSON.parse(JSON.stringify(
|
|
31621
|
+
if (Array.isArray(U)) {
|
|
31622
|
+
z[ae] = JSON.parse(JSON.stringify(U)), Z[ae] = JSON.parse(JSON.stringify(U));
|
|
31623
31623
|
return;
|
|
31624
31624
|
}
|
|
31625
|
-
if (Q === "object" &&
|
|
31626
|
-
return te(
|
|
31627
|
-
if (Q === "object" &&
|
|
31628
|
-
z[ae] =
|
|
31625
|
+
if (Q === "object" && U && !U.length)
|
|
31626
|
+
return te(U, ae);
|
|
31627
|
+
if (Q === "object" && U && U.length && q.type === "input") {
|
|
31628
|
+
z[ae] = U.join(", "), Z[ae] = U.join(", ");
|
|
31629
31629
|
return;
|
|
31630
31630
|
}
|
|
31631
|
-
z[ae] =
|
|
31631
|
+
z[ae] = U, Z[ae] = U;
|
|
31632
31632
|
}), n("model-updated", {
|
|
31633
31633
|
model: z,
|
|
31634
31634
|
originalModel: Z,
|
|
@@ -31638,25 +31638,25 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
31638
31638
|
if (!ee) return pe;
|
|
31639
31639
|
if (Array.isArray(pe)) {
|
|
31640
31640
|
const q = ee.elements;
|
|
31641
|
-
return q ? pe.map((
|
|
31641
|
+
return q ? pe.map((U) => he(U, q)) : pe;
|
|
31642
31642
|
}
|
|
31643
31643
|
if (!pe || typeof pe != "object") return pe;
|
|
31644
31644
|
if (ee.type === "map" && ee.values) {
|
|
31645
|
-
const q = ee.values,
|
|
31645
|
+
const q = ee.values, U = {};
|
|
31646
31646
|
for (const Q of Object.keys(pe))
|
|
31647
|
-
|
|
31648
|
-
return
|
|
31647
|
+
U[Q] = he(pe[Q], q);
|
|
31648
|
+
return U;
|
|
31649
31649
|
}
|
|
31650
31650
|
if (!Array.isArray(ee.fields)) return pe;
|
|
31651
31651
|
const W = /* @__PURE__ */ new Map();
|
|
31652
31652
|
for (const q of ee.fields) {
|
|
31653
|
-
const
|
|
31654
|
-
|
|
31653
|
+
const U = q && Object.keys(q)[0];
|
|
31654
|
+
U && W.set(U, q[U]);
|
|
31655
31655
|
}
|
|
31656
31656
|
const ae = {};
|
|
31657
31657
|
for (const q of Object.keys(pe)) {
|
|
31658
|
-
const
|
|
31659
|
-
|
|
31658
|
+
const U = W.get(q);
|
|
31659
|
+
U && (ae[q] = he(pe[q], U));
|
|
31660
31660
|
}
|
|
31661
31661
|
return ae;
|
|
31662
31662
|
}, Ie = () => {
|
|
@@ -31703,9 +31703,9 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
31703
31703
|
}
|
|
31704
31704
|
Re.value = !1;
|
|
31705
31705
|
};
|
|
31706
|
-
return
|
|
31706
|
+
return Be(Re, (pe) => {
|
|
31707
31707
|
n("loading", pe);
|
|
31708
|
-
}),
|
|
31708
|
+
}), Be(() => i.schema, (pe, ee) => {
|
|
31709
31709
|
if (k(pe || {}, ee || {}))
|
|
31710
31710
|
return;
|
|
31711
31711
|
const W = c(pe, void 0, void 0, i.engine);
|
|
@@ -31753,12 +31753,12 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
31753
31753
|
key: 1,
|
|
31754
31754
|
"enable-redis-partial": e.enableRedisPartial,
|
|
31755
31755
|
"form-model": z,
|
|
31756
|
-
"form-options":
|
|
31756
|
+
"form-options": B.value,
|
|
31757
31757
|
"form-schema": ge.value,
|
|
31758
31758
|
"identity-principals-ui-enabled": s(r),
|
|
31759
31759
|
"is-editing": e.editing,
|
|
31760
31760
|
"is-konnect-managed-redis-enabled": o.value,
|
|
31761
|
-
"on-model-updated":
|
|
31761
|
+
"on-model-updated": ze,
|
|
31762
31762
|
"on-partial-toggled": _e,
|
|
31763
31763
|
"show-new-partial-modal": (ae) => pe.$emit("showNewPartialModal", ae),
|
|
31764
31764
|
"onClick:createEntity": ee[3] || (ee[3] = (ae) => pe.$emit("click:create-entity", ae)),
|
|
@@ -31777,9 +31777,9 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
31777
31777
|
"is-editing": e.editing,
|
|
31778
31778
|
"is-konnect-managed-redis-enabled": o.value,
|
|
31779
31779
|
model: z,
|
|
31780
|
-
options:
|
|
31780
|
+
options: B.value,
|
|
31781
31781
|
schema: ge.value,
|
|
31782
|
-
onModelUpdated:
|
|
31782
|
+
onModelUpdated: ze,
|
|
31783
31783
|
onPartialToggled: _e,
|
|
31784
31784
|
onRefreshModel: Te,
|
|
31785
31785
|
onShowNewPartialModal: ee[5] || (ee[5] = (ae) => pe.$emit("showNewPartialModal", ae))
|
|
@@ -31975,7 +31975,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
31975
31975
|
Pe !== -1 && Z.splice(Pe, 1);
|
|
31976
31976
|
}));
|
|
31977
31977
|
const z = G(!1), {
|
|
31978
|
-
isDeckEnabled:
|
|
31978
|
+
isDeckEnabled: B,
|
|
31979
31979
|
deckCustomizationOptions: ie,
|
|
31980
31980
|
deckCalloutPreferenceKey: Y
|
|
31981
31981
|
} = I_(
|
|
@@ -32007,11 +32007,11 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
32007
32007
|
r.config.app === "konnect" && fe.value.splice(1, 0, {
|
|
32008
32008
|
title: c("view_configuration.terraform"),
|
|
32009
32009
|
hash: "#terraform"
|
|
32010
|
-
}),
|
|
32010
|
+
}), B.value && fe.value.push({
|
|
32011
32011
|
title: c("view_configuration.deck"),
|
|
32012
32012
|
hash: "#deck"
|
|
32013
32013
|
});
|
|
32014
|
-
const Te = G(fe.value[0].hash), _e = G(""),
|
|
32014
|
+
const Te = G(fe.value[0].hash), _e = G(""), ze = I(() => {
|
|
32015
32015
|
if (P.value) {
|
|
32016
32016
|
let Pe = nt.form[r.config.app].credential[T.value];
|
|
32017
32017
|
return Pe = Pe.replace(/{resourceEndpoint}/gi, Ie.value), Pe;
|
|
@@ -32420,10 +32420,10 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
32420
32420
|
data: ke.data,
|
|
32421
32421
|
resourceEndpoint: Ie.value
|
|
32422
32422
|
});
|
|
32423
|
-
}, q = G(/* @__PURE__ */ new Map()),
|
|
32423
|
+
}, q = G(/* @__PURE__ */ new Map()), U = I(() => [J.clientErrorMessage, J.serverErrorMessage].filter(Boolean).join("; ")), Q = (ke) => {
|
|
32424
32424
|
ke.valid ? q.value.delete(ke.model) : q.value.set(ke.model, ke.error), J.clientErrorMessage = [...q.value.entries()].map(([Pe, H]) => `${Pe}: ${typeof H == "string" ? H : m(H)}`).join("; "), J.clientErrorMessage && (J.serverErrorMessage = "");
|
|
32425
32425
|
};
|
|
32426
|
-
|
|
32426
|
+
Be([te, qe], (ke, Pe) => {
|
|
32427
32427
|
const H = ke[0] !== Pe[0], Fe = ke[1], $e = Pe[1];
|
|
32428
32428
|
if (!P.value && T.value === zi.Edit && (H || Fe && Fe !== $e)) {
|
|
32429
32429
|
const xe = je("config", R.value, he);
|
|
@@ -32436,7 +32436,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
32436
32436
|
const ke = r.config.entityType && r.config.entityId && !r.developer, Pe = P.value ? nt.form[r.config.app].credential[T.value] : nt.form[r.config.app][T.value][ke ? "forEntity" : "all"];
|
|
32437
32437
|
let H = `${r.config.apiBaseUrl}${Pe}`;
|
|
32438
32438
|
return r.config.app === "konnect" && (H = H.replace(/{controlPlaneId}/gi, r.config.controlPlaneId || "")), H = H.replace(/\/{workspace}/gi, r.config.workspace ? `/${r.config.workspace}` : ""), H = H.replace(/{resourceEndpoint}/gi, Ie.value), H = H.replace(/{id}/gi, r.pluginId ?? ""), H = H.replace(/{entityType}/gi, r.config.entityType || ""), H = H.replace(/{entityId}/gi, r.config.entityId || ""), H;
|
|
32439
|
-
}), we = I(() => !Object.keys(Mn).includes(r.pluginType)),
|
|
32439
|
+
}), we = I(() => !Object.keys(Mn).includes(r.pluginType)), Ge = I(() => {
|
|
32440
32440
|
const ke = W.value;
|
|
32441
32441
|
if (P.value) {
|
|
32442
32442
|
for (const Pe in bt) {
|
|
@@ -32447,14 +32447,14 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
32447
32447
|
}
|
|
32448
32448
|
return W.value.partials && A.value && ap(ke, A.value), ke;
|
|
32449
32449
|
}), rt = I(() => {
|
|
32450
|
-
const { __ui_data: ke, ...Pe } = { ...
|
|
32450
|
+
const { __ui_data: ke, ...Pe } = { ...Ge.value };
|
|
32451
32451
|
return Pe;
|
|
32452
32452
|
}), Me = async () => {
|
|
32453
32453
|
if (Z.every((ke) => ke()) && !J.clientErrorMessage && !r.isWizardStep)
|
|
32454
32454
|
try {
|
|
32455
32455
|
J.isReadonly = !0;
|
|
32456
32456
|
let ke;
|
|
32457
|
-
const Pe = JSON.parse(JSON.stringify(
|
|
32457
|
+
const Pe = JSON.parse(JSON.stringify(Ge.value)), H = u[V.value];
|
|
32458
32458
|
!ge.value && typeof H?.shamefullyTransformPayload == "function" && H.shamefullyTransformPayload({
|
|
32459
32459
|
originalModel: de,
|
|
32460
32460
|
model: J.fields,
|
|
@@ -32541,9 +32541,9 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
32541
32541
|
config: e.config,
|
|
32542
32542
|
"edit-id": e.pluginId,
|
|
32543
32543
|
"entity-type": s(Yn).Plugin,
|
|
32544
|
-
"error-message":
|
|
32545
|
-
"fetch-url":
|
|
32546
|
-
"form-fields":
|
|
32544
|
+
"error-message": U.value,
|
|
32545
|
+
"fetch-url": ze.value,
|
|
32546
|
+
"form-fields": Ge.value,
|
|
32547
32547
|
"is-readonly": J.isReadonly,
|
|
32548
32548
|
"no-validate": "",
|
|
32549
32549
|
"wrapper-component": e.noCardWrapper ? "div" : void 0,
|
|
@@ -32654,7 +32654,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
32654
32654
|
]),
|
|
32655
32655
|
yaml: C(() => [
|
|
32656
32656
|
y(s($_), {
|
|
32657
|
-
"deck-callout-preference-key": s(
|
|
32657
|
+
"deck-callout-preference-key": s(B) ? s(Y) : void 0,
|
|
32658
32658
|
"entity-record": rt.value,
|
|
32659
32659
|
"onDeckCallout:clickCta": Pe[8] || (Pe[8] = (Ue) => Te.value = "#deck")
|
|
32660
32660
|
}, null, 8, ["deck-callout-preference-key", "entity-record"])
|
|
@@ -32775,9 +32775,9 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
32775
32775
|
const P = r.value.tags, $ = Array.isArray(P?.value) ? P.value : [];
|
|
32776
32776
|
return $.length && S.set("tags", $.join("/")), i.value && e.entityId && S.toString() && S.set(`filter[${i.value}][eq]`, e.entityId), S.toString();
|
|
32777
32777
|
});
|
|
32778
|
-
|
|
32778
|
+
Be(w, (S) => {
|
|
32779
32779
|
o.value = S;
|
|
32780
|
-
}),
|
|
32780
|
+
}), Be(o, (S) => {
|
|
32781
32781
|
S || (a.value = "", r.value = {}, d.value = "");
|
|
32782
32782
|
});
|
|
32783
32783
|
const T = (S, E) => {
|
|
@@ -33006,8 +33006,8 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
33006
33006
|
};
|
|
33007
33007
|
g.value && (k.instanceName = { label: a("plugins.list.table_headers.name"), sortable: !1 }), o.config?.entityId || (k.appliedTo = g.value ? { label: a("plugins.list.table_headers.scope"), sortable: !1 } : { label: a("plugins.list.table_headers.applied_to"), sortable: !1 }), k.enabled = g.value ? { label: a("plugins.list.table_headers.status"), sortable: !1 } : { label: a("plugins.list.table_headers.enabled"), searchable: !0, sortable: !0 }, v && (k.ordering = { label: a("plugins.list.table_headers.ordering"), sortable: !0 }), k.tags = { label: a("plugins.list.table_headers.tags"), sortable: !1 }, k.updated_at = { label: a("plugins.list.table_headers.updated_at"), sortable: !0 };
|
|
33008
33008
|
const w = k, T = (q) => {
|
|
33009
|
-
let
|
|
33010
|
-
return o.config.app === "konnect" && (
|
|
33009
|
+
let U = `${o.config.apiBaseUrl}${q}`;
|
|
33010
|
+
return o.config.app === "konnect" && (U = U.replace(/{controlPlaneId}/gi, o.config?.controlPlaneId || "")), U.replace(/\/{workspace}/gi, o.config?.workspace ? `/${o.config.workspace}` : "").replace(/{entityType}/gi, o.config?.entityType || "").replace(/{entityId}/gi, o.config?.entityId || "");
|
|
33011
33011
|
}, S = I(() => T(
|
|
33012
33012
|
o.config.entityType ? nt.list[o.config.app].forEntity : nt.list[o.config.app].all
|
|
33013
33013
|
)), E = G(""), P = I(() => o.config.app === "konnect" || o.config.isExactMatch ? {
|
|
@@ -33039,13 +33039,13 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
33039
33039
|
}, j = () => {
|
|
33040
33040
|
N.value++;
|
|
33041
33041
|
}, V = G(null), oe = (q) => {
|
|
33042
|
-
const
|
|
33043
|
-
return (q.route?.id || q.route_id) &&
|
|
33044
|
-
}, ge = async (q,
|
|
33045
|
-
const Q = Z(q,
|
|
33042
|
+
const U = [];
|
|
33043
|
+
return (q.route?.id || q.route_id) && U.push({ type: "route", badgeText: a("plugins.list.table_headers.applied_to_badges.route") }), (q.service?.id || q.service_id) && U.push({ type: "service", badgeText: a("plugins.list.table_headers.applied_to_badges.service") }), (q.consumer?.id || q.consumer_id) && U.push({ type: "consumer", badgeText: a("plugins.list.table_headers.applied_to_badges.consumer") }), (q.consumer_group?.id || q.consumer_group_id) && U.push({ type: "consumer_group", badgeText: a("plugins.list.table_headers.applied_to_badges.consumer_group") }), U.length ? U : [{ type: null, badgeText: a("plugins.list.table_headers.applied_to_badges.global") }];
|
|
33044
|
+
}, ge = async (q, U) => q === null ? !1 : await o.canRetrieveScopedEntity?.(q, U.id), Z = (q, U) => U[q]?.id, z = (q, U) => {
|
|
33045
|
+
const Q = Z(q, U);
|
|
33046
33046
|
return Q && o.config?.getScopedEntityViewRoute ? o.config.getScopedEntityViewRoute(q, Q) : null;
|
|
33047
|
-
},
|
|
33048
|
-
const Q = z(q,
|
|
33047
|
+
}, B = (q, U) => {
|
|
33048
|
+
const Q = z(q, U);
|
|
33049
33049
|
Q && l.push(Q);
|
|
33050
33050
|
}, ie = G(!1), Y = G(null), ue = I(() => {
|
|
33051
33051
|
const q = {
|
|
@@ -33054,8 +33054,8 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
33054
33054
|
name: ""
|
|
33055
33055
|
};
|
|
33056
33056
|
if (Y.value) {
|
|
33057
|
-
const { enabled:
|
|
33058
|
-
q.action =
|
|
33057
|
+
const { enabled: U, id: Q, name: ce } = Y.value;
|
|
33058
|
+
q.action = U ? "disable" : "enable", q.id = Q, q.name = n.getDisplayName(ce) || Q;
|
|
33059
33059
|
}
|
|
33060
33060
|
return q;
|
|
33061
33061
|
}), de = (q) => {
|
|
@@ -33065,21 +33065,21 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
33065
33065
|
}, fe = async () => {
|
|
33066
33066
|
if (!await o.canEdit?.(Y.value) || !Y.value)
|
|
33067
33067
|
return;
|
|
33068
|
-
let
|
|
33069
|
-
o.config.app === "konnect" && (
|
|
33068
|
+
let U = `${o.config.apiBaseUrl}${nt.item[o.config.app]?.[o.config?.entityType ? "forEntity" : "all"].replace(/{entityType}/gi, o.config?.entityType || "").replace(/{entityId}/gi, o.config?.entityId || "")}`.replace(/{id}/gi, Y.value.id || "");
|
|
33069
|
+
o.config.app === "konnect" && (U = U.replace(/{controlPlaneId}/gi, o.config?.controlPlaneId || "")), U = U.replace(/\/{workspace}/gi, o.config?.workspace ? `/${o.config.workspace}` : "");
|
|
33070
33070
|
const Q = !Y.value.enabled;
|
|
33071
33071
|
try {
|
|
33072
33072
|
const ce = o.config?.app;
|
|
33073
33073
|
let me;
|
|
33074
|
-
E.value && ce === "konnect" && (me = await c.get(
|
|
33075
|
-
const { data: we } = ce === "konnect" ? await c.put(
|
|
33074
|
+
E.value && ce === "konnect" && (me = await c.get(U));
|
|
33075
|
+
const { data: we } = ce === "konnect" ? await c.put(U, { ...me?.data || Y.value, enabled: Q }, { timeout: 12e4 }) : await c.patch(U, { ...Y.value, enabled: Q }, { timeout: 12e4 });
|
|
33076
33076
|
i("toggle-enabled", Q, we), Y.value.enabled = Q;
|
|
33077
33077
|
} catch (ce) {
|
|
33078
33078
|
i("error", ce);
|
|
33079
33079
|
}
|
|
33080
|
-
}, Te = async (q,
|
|
33080
|
+
}, Te = async (q, U) => {
|
|
33081
33081
|
const Q = q.id;
|
|
33082
|
-
if (!await
|
|
33082
|
+
if (!await U(Q)) {
|
|
33083
33083
|
i("copy:error", {
|
|
33084
33084
|
entity: q,
|
|
33085
33085
|
field: "id",
|
|
@@ -33092,9 +33092,9 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
33092
33092
|
field: "id",
|
|
33093
33093
|
message: a("copy.success", { val: Q })
|
|
33094
33094
|
});
|
|
33095
|
-
}, _e = async (q,
|
|
33095
|
+
}, _e = async (q, U) => {
|
|
33096
33096
|
const Q = JSON.stringify(q);
|
|
33097
|
-
if (!await
|
|
33097
|
+
if (!await U(Q)) {
|
|
33098
33098
|
i("copy:error", {
|
|
33099
33099
|
entity: q,
|
|
33100
33100
|
message: a("errors.copy")
|
|
@@ -33105,7 +33105,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
33105
33105
|
entity: q,
|
|
33106
33106
|
message: a("copy.success_brief")
|
|
33107
33107
|
});
|
|
33108
|
-
},
|
|
33108
|
+
}, ze = async (q) => {
|
|
33109
33109
|
await o.canRetrieve?.(q) && l.push(o.config.getViewRoute(q));
|
|
33110
33110
|
}, se = (q) => ({
|
|
33111
33111
|
label: a("actions.view"),
|
|
@@ -33134,7 +33134,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
33134
33134
|
}, ee = () => {
|
|
33135
33135
|
l.push(o.config.createRoute);
|
|
33136
33136
|
};
|
|
33137
|
-
|
|
33137
|
+
Be(A, (q) => {
|
|
33138
33138
|
if (q.status === L_.Error) {
|
|
33139
33139
|
V.value = {
|
|
33140
33140
|
title: a("errors.general")
|
|
@@ -33151,8 +33151,8 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
33151
33151
|
}), ae = G(!1);
|
|
33152
33152
|
return Bi(async () => {
|
|
33153
33153
|
ae.value = await o.canCreate(), ae.value && (W.value.title = a("plugins.list.empty_state.title"), W.value.ctaText = a("actions.create"));
|
|
33154
|
-
}), (q,
|
|
33155
|
-
const Q = ne("KButton"), ce = ne("KEmptyState"), me = ne("RouterLink"), we = ne("KBadge"),
|
|
33154
|
+
}), (q, U) => {
|
|
33155
|
+
const Q = ne("KButton"), ce = ne("KEmptyState"), me = ne("RouterLink"), we = ne("KBadge"), Ge = ne("KTruncate"), rt = ne("KInputSwitch"), Me = ne("KDropdownItem"), Jt = ne("KClipboardProvider");
|
|
33156
33156
|
return b(), D("div", S3, [
|
|
33157
33157
|
y(s(M_), {
|
|
33158
33158
|
"cache-identifier": e.cacheIdentifier,
|
|
@@ -33169,7 +33169,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
33169
33169
|
title: e.title,
|
|
33170
33170
|
"title-tag": e.titleTag,
|
|
33171
33171
|
onClearSearchInput: F,
|
|
33172
|
-
"onClick:row":
|
|
33172
|
+
"onClick:row": U[5] || (U[5] = (Ne) => ze(Ne)),
|
|
33173
33173
|
onSort: j,
|
|
33174
33174
|
onState: s(d)
|
|
33175
33175
|
}, ct({
|
|
@@ -33177,13 +33177,13 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
33177
33177
|
g.value ? (b(), L(E3, {
|
|
33178
33178
|
key: 0,
|
|
33179
33179
|
modelValue: E.value,
|
|
33180
|
-
"onUpdate:modelValue":
|
|
33180
|
+
"onUpdate:modelValue": U[0] || (U[0] = (Ne) => E.value = Ne),
|
|
33181
33181
|
"entity-id": o.config?.entityId,
|
|
33182
33182
|
"entity-type": o.config?.entityType
|
|
33183
33183
|
}, null, 8, ["modelValue", "entity-id", "entity-type"])) : (b(), L(s(K_), {
|
|
33184
33184
|
key: 1,
|
|
33185
33185
|
modelValue: E.value,
|
|
33186
|
-
"onUpdate:modelValue":
|
|
33186
|
+
"onUpdate:modelValue": U[1] || (U[1] = (Ne) => E.value = Ne),
|
|
33187
33187
|
config: P.value
|
|
33188
33188
|
}, null, 8, ["modelValue", "config"]))
|
|
33189
33189
|
]),
|
|
@@ -33199,7 +33199,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
33199
33199
|
class: "open-learning-hub",
|
|
33200
33200
|
"data-testid": "plugins-learn-more-button",
|
|
33201
33201
|
icon: "",
|
|
33202
|
-
onClick:
|
|
33202
|
+
onClick: U[2] || (U[2] = (Ne) => q.$emit("click:learn-more"))
|
|
33203
33203
|
}, {
|
|
33204
33204
|
default: C(() => [
|
|
33205
33205
|
y(s(Ga), { decorative: "" })
|
|
@@ -33247,7 +33247,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
33247
33247
|
re(M(Ne.instance_name || "-"), 1)
|
|
33248
33248
|
]),
|
|
33249
33249
|
appliedTo: C(({ row: Ne }) => [
|
|
33250
|
-
oe(Ne).length > 0 ? (b(), L(
|
|
33250
|
+
oe(Ne).length > 0 ? (b(), L(Ge, { key: 0 }, {
|
|
33251
33251
|
default: C(() => [
|
|
33252
33252
|
(b(!0), D(Se, null, Ye(oe(Ne), (Ve, st) => (b(), L(s(Ni), {
|
|
33253
33253
|
key: Ve.badgeText,
|
|
@@ -33270,7 +33270,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
33270
33270
|
])) : (b(), L(we, {
|
|
33271
33271
|
key: 1,
|
|
33272
33272
|
class: ft(yt || "disabled"),
|
|
33273
|
-
onClick: St((ke) => yt && Ve.type &&
|
|
33273
|
+
onClick: St((ke) => yt && Ve.type && B(Ve.type, Ne), ["stop"])
|
|
33274
33274
|
}, {
|
|
33275
33275
|
default: C(() => [
|
|
33276
33276
|
re(M(Ve.badgeText), 1)
|
|
@@ -33300,7 +33300,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
33300
33300
|
}, {
|
|
33301
33301
|
default: C(({ isAllowed: Ve }) => [
|
|
33302
33302
|
O("div", {
|
|
33303
|
-
onClick:
|
|
33303
|
+
onClick: U[4] || (U[4] = St(() => {
|
|
33304
33304
|
}, ["stop"]))
|
|
33305
33305
|
}, [
|
|
33306
33306
|
y(rt, {
|
|
@@ -33463,7 +33463,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
33463
33463
|
y(Q, {
|
|
33464
33464
|
appearance: "secondary",
|
|
33465
33465
|
"data-testid": "entity-learn-more-button",
|
|
33466
|
-
onClick:
|
|
33466
|
+
onClick: U[3] || (U[3] = (Ne) => q.$emit("click:learn-more"))
|
|
33467
33467
|
}, {
|
|
33468
33468
|
default: C(() => [
|
|
33469
33469
|
y(s(Ga), { decorative: "" }),
|
|
@@ -34317,14 +34317,14 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
34317
34317
|
return {};
|
|
34318
34318
|
const W = p.value.toLowerCase(), ae = JSON.parse(JSON.stringify(w.value));
|
|
34319
34319
|
for (const q in w.value) {
|
|
34320
|
-
const
|
|
34321
|
-
|
|
34320
|
+
const U = w.value[q]?.filter((Q) => Q.name.toLowerCase().includes(W) || Q.id.toLowerCase().includes(W) || Q.group.toLowerCase().includes(W) || Q.clonedFromRef?.toLowerCase().includes(W) || Q.customPluginType?.toLowerCase().includes(W)) || [];
|
|
34321
|
+
U.length ? ae[q] = U : delete ae[q];
|
|
34322
34322
|
}
|
|
34323
34323
|
return ae;
|
|
34324
34324
|
}), z = I(() => n.highlightedPluginIds.reduce((W, ae) => {
|
|
34325
34325
|
const q = ge.value[ae];
|
|
34326
34326
|
return q && W.push(q), W;
|
|
34327
|
-
}, [])),
|
|
34327
|
+
}, [])), B = I(() => Object.keys(Z.value).length > 0), ie = I(() => Object.keys(w.value).length > 0 && !B.value), Y = I(() => n.config.app !== "konnect" || !N.value ? [] : [
|
|
34328
34328
|
{
|
|
34329
34329
|
hash: "#kong",
|
|
34330
34330
|
title: r("plugins.select.tabs.kong.title")
|
|
@@ -34338,7 +34338,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
34338
34338
|
let W = Y.value.length && (o?.hash || Y.value[0]?.hash) || "";
|
|
34339
34339
|
return W === "#custom" && A.value && (W = "#kong"), W;
|
|
34340
34340
|
}), de = () => {
|
|
34341
|
-
const W = new Map(k.value.map((
|
|
34341
|
+
const W = new Map(k.value.map((U) => [U.name, U])), ae = new Set(_.value.map((U) => U.name)), q = /* @__PURE__ */ new Set([
|
|
34342
34342
|
...ae,
|
|
34343
34343
|
...W.keys()
|
|
34344
34344
|
]);
|
|
@@ -34348,13 +34348,13 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
34348
34348
|
...g.value,
|
|
34349
34349
|
...q
|
|
34350
34350
|
]
|
|
34351
|
-
)].filter((
|
|
34351
|
+
)].filter((U) => !n.ignoredPlugins.includes(U)).filter((U) => {
|
|
34352
34352
|
if (!n.config.entityType)
|
|
34353
|
-
return
|
|
34354
|
-
const Q = W.has(
|
|
34355
|
-
return n.config.entityType === "services" && l[Q] && !l[Q].scope.includes(bt.SERVICE) || n.config.entityType === "routes" && l[Q] && !l[Q].scope.includes(bt.ROUTE) || n.config.entityType === "consumer_groups" && l[Q] && !l[Q].scope.includes(bt.CONSUMER_GROUP) || n.config.entityType === "consumers" && l[Q] && !l[Q].scope.includes(bt.CONSUMER) ? !1 :
|
|
34356
|
-
}).reduce((
|
|
34357
|
-
const ce = l[Q] && l[Q].name || Q, me = W.get(Q), we = ae.has(Q),
|
|
34353
|
+
return U;
|
|
34354
|
+
const Q = W.has(U) ? W.get(U).ref : U;
|
|
34355
|
+
return n.config.entityType === "services" && l[Q] && !l[Q].scope.includes(bt.SERVICE) || n.config.entityType === "routes" && l[Q] && !l[Q].scope.includes(bt.ROUTE) || n.config.entityType === "consumer_groups" && l[Q] && !l[Q].scope.includes(bt.CONSUMER_GROUP) || n.config.entityType === "consumers" && l[Q] && !l[Q].scope.includes(bt.CONSUMER) ? !1 : U;
|
|
34356
|
+
}).reduce((U, Q) => {
|
|
34357
|
+
const ce = l[Q] && l[Q].name || Q, me = W.get(Q), we = ae.has(Q), Ge = {
|
|
34358
34358
|
...l[Q],
|
|
34359
34359
|
id: Q,
|
|
34360
34360
|
name: ce,
|
|
@@ -34362,10 +34362,10 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
34362
34362
|
disabledMessage: "",
|
|
34363
34363
|
group: l[Q]?.group || ot.CUSTOM_PLUGINS
|
|
34364
34364
|
};
|
|
34365
|
-
|
|
34366
|
-
const rt =
|
|
34367
|
-
let Me =
|
|
34368
|
-
return Me || (Me = []), Me.push(
|
|
34365
|
+
Ge.group === ot.CUSTOM_PLUGINS && (me ? (Ge.customPluginType = "cloned", Ge.clonedFromRef = me.ref) : we ? Ge.customPluginType = "streaming" : Ge.customPluginType = "schema"), n.disabledPlugins && (Ge.disabledMessage = n.disabledPlugins[Q]);
|
|
34366
|
+
const rt = Ge.group || r("plugins.select.misc_plugins");
|
|
34367
|
+
let Me = U[rt];
|
|
34368
|
+
return Me || (Me = []), Me.push(Ge), Me.sort(u("name")), U[rt] = Me, U;
|
|
34369
34369
|
}, {});
|
|
34370
34370
|
}, J = I(() => {
|
|
34371
34371
|
let W = `${n.config.apiBaseUrl}${nt.select[n.config.app].availablePlugins}`;
|
|
@@ -34392,14 +34392,14 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
34392
34392
|
return n.config.app === "konnect" && (W = W.replace(/{controlPlaneId}/gi, n.config.controlPlaneId || "")), W.replace(/\/{workspace}/gi, n.config.workspace ? `/${n.config.workspace}` : "").replace(/{entityType}/gi, n.config.entityType || "").replace(/{entityId}/gi, n.config.entityId || "");
|
|
34393
34393
|
}
|
|
34394
34394
|
return "";
|
|
34395
|
-
}),
|
|
34395
|
+
}), ze = (W) => {
|
|
34396
34396
|
a.replace({ hash: W, query: o.query });
|
|
34397
34397
|
};
|
|
34398
|
-
|
|
34398
|
+
Be(() => n.disabledPlugins, (W, ae) => {
|
|
34399
34399
|
!d(W, ae) && !f.value && (w.value = de());
|
|
34400
|
-
}),
|
|
34400
|
+
}), Be(() => n.ignoredPlugins, (W, ae) => {
|
|
34401
34401
|
!d(W, ae) && !f.value && (w.value = de());
|
|
34402
|
-
}),
|
|
34402
|
+
}), Be(f, (W) => {
|
|
34403
34403
|
i("loading", W);
|
|
34404
34404
|
});
|
|
34405
34405
|
const se = async (W) => {
|
|
@@ -34409,7 +34409,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
34409
34409
|
}
|
|
34410
34410
|
try {
|
|
34411
34411
|
const { data: { data: ae } } = await P.get(_e.value, { signal: W });
|
|
34412
|
-
ae?.length && (T.value = ae.reduce((q,
|
|
34412
|
+
ae?.length && (T.value = ae.reduce((q, U) => (U.name && q.push(U.name), q), []));
|
|
34413
34413
|
} catch (ae) {
|
|
34414
34414
|
V(ae) || (T.value = []);
|
|
34415
34415
|
}
|
|
@@ -34427,8 +34427,8 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
34427
34427
|
}).catch((q) => {
|
|
34428
34428
|
if (V(q))
|
|
34429
34429
|
return;
|
|
34430
|
-
const
|
|
34431
|
-
(
|
|
34430
|
+
const U = oe(q);
|
|
34431
|
+
(U || !v.value) && (v.value = U ? r("plugins.select.tabs.custom.license_required") : c(q) ?? r("plugins.select.tabs.custom.fetch_error"));
|
|
34432
34432
|
})
|
|
34433
34433
|
), ae.push(se(W)), await Promise.allSettled(ae);
|
|
34434
34434
|
}, he = async () => {
|
|
@@ -34456,7 +34456,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
34456
34456
|
W,
|
|
34457
34457
|
ae,
|
|
34458
34458
|
q,
|
|
34459
|
-
|
|
34459
|
+
U,
|
|
34460
34460
|
Q,
|
|
34461
34461
|
ce,
|
|
34462
34462
|
me
|
|
@@ -34469,12 +34469,12 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
34469
34469
|
n.canDeleteClonedPlugin ? n.canDeleteClonedPlugin() : Promise.resolve(null),
|
|
34470
34470
|
n.canReadClonedPlugin()
|
|
34471
34471
|
]);
|
|
34472
|
-
Ie.value = W, De.value = ae, je.value = q, Ae.value =
|
|
34472
|
+
Ie.value = W, De.value = ae, je.value = q, Ae.value = U, Oe.value = Q ?? ae, Re.value = ce ?? q, qe.value = me;
|
|
34473
34473
|
});
|
|
34474
34474
|
const ee = Et("filter-input");
|
|
34475
34475
|
return pn(async () => {
|
|
34476
34476
|
E.value = !0, ee.value?.input?.focus(), await he();
|
|
34477
|
-
}),
|
|
34477
|
+
}), Be(
|
|
34478
34478
|
() => [
|
|
34479
34479
|
n.config.app === "konnect" ? n.config.controlPlaneId : void 0,
|
|
34480
34480
|
n.config.workspace,
|
|
@@ -34490,7 +34490,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
34490
34490
|
), pr(() => {
|
|
34491
34491
|
S.value?.abort();
|
|
34492
34492
|
}), (W, ae) => {
|
|
34493
|
-
const q = ne("KInput"),
|
|
34493
|
+
const q = ne("KInput"), U = ne("KSkeletonBox"), Q = ne("KSkeleton"), ce = ne("KEmptyState"), me = ne("KTooltip"), we = ne("KAlert"), Ge = ne("KTabs");
|
|
34494
34494
|
return b(), D("div", r4, [
|
|
34495
34495
|
O("div", s4, [
|
|
34496
34496
|
y(q, {
|
|
@@ -34505,7 +34505,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
34505
34505
|
}, null, 8, ["modelValue", "placeholder"])
|
|
34506
34506
|
]),
|
|
34507
34507
|
f.value ? (b(), D("section", l4, [
|
|
34508
|
-
y(
|
|
34508
|
+
y(U, {
|
|
34509
34509
|
class: "plugins-skeleton-title",
|
|
34510
34510
|
width: "10"
|
|
34511
34511
|
}),
|
|
@@ -34535,13 +34535,13 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
34535
34535
|
]),
|
|
34536
34536
|
_: 1
|
|
34537
34537
|
})) : (b(), D("section", c4, [
|
|
34538
|
-
Y.value.length ? (b(), L(
|
|
34538
|
+
Y.value.length ? (b(), L(Ge, {
|
|
34539
34539
|
key: 0,
|
|
34540
34540
|
modelValue: ue.value,
|
|
34541
34541
|
"onUpdate:modelValue": ae[3] || (ae[3] = (rt) => ue.value = rt),
|
|
34542
34542
|
"data-testid": "plugins-tabs",
|
|
34543
34543
|
tabs: Y.value,
|
|
34544
|
-
onChange:
|
|
34544
|
+
onChange: ze
|
|
34545
34545
|
}, ct({
|
|
34546
34546
|
kong: C(() => [
|
|
34547
34547
|
O("div", u4, [
|
|
@@ -35030,7 +35030,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
35030
35030
|
const x = f.value.length, A = Math.max(1, Math.ceil(x / d.value)), F = (Math.min(p.value, A) - 1) * d.value;
|
|
35031
35031
|
return f.value.slice(F, F + d.value);
|
|
35032
35032
|
});
|
|
35033
|
-
|
|
35033
|
+
Be(c, () => {
|
|
35034
35034
|
f.value = [...c.value], p.value = 1, u.value++;
|
|
35035
35035
|
});
|
|
35036
35036
|
const P = ({ page: x }) => {
|
|
@@ -35192,6 +35192,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
35192
35192
|
__name: "PluginCatalog",
|
|
35193
35193
|
props: {
|
|
35194
35194
|
config: {},
|
|
35195
|
+
ignoredPlugins: { default: () => [] },
|
|
35195
35196
|
disabledPlugins: {},
|
|
35196
35197
|
highlightedPluginIds: {},
|
|
35197
35198
|
customPluginSupport: { default: "none" },
|
|
@@ -35205,7 +35206,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
35205
35206
|
},
|
|
35206
35207
|
emits: ["loading", "plugin-clicked", "delete-custom:success"],
|
|
35207
35208
|
setup(e, { emit: t }) {
|
|
35208
|
-
const n = t, { i18n: { t: i } } = at.useI18n(), { pluginMetaData: o } = at.usePluginMetaData(), { getMessageFromError: a } = pi(), { sortAlpha: r, objectsAreEqual: l } = gr(), c = e, { axiosInstance: u } = Zt(c.config?.axiosRequestConfig), d = Et("filter-input"), p = G(""), f = G(!1), m = G(!1), h = G(Object.fromEntries(hc.concat(vc).map((ee) => [ee, !1]))), v = G(!0), g = G(!1), _ = G(""), k = G(""), w = G([]), T = G([]), S = G([]), E = G({}), P = G([]), $ = G(!1), R = G(null), x = G(!1), A = I(() => $.value ? s_ : l_), N = Ze(Dn.KM_2485_CLONED_PLUGINS, !1), F = I(() => s(N)), j = (ee) => ee === "none" || ee === "disabled" ? /* @__PURE__ */ new Set() : new Set(Array.isArray(ee) ? ee : [ee]), V = I(() => j(c.customPluginSupport)), oe = I(() => [...V.value].sort().join("|")), ge = I(() => V.value.has("streaming")), Z = I(() => F.value && V.value.has("cloned")), z = (ee) => Do(ee) && ee.code === "ERR_CANCELED",
|
|
35209
|
+
const n = t, { i18n: { t: i } } = at.useI18n(), { pluginMetaData: o } = at.usePluginMetaData(), { getMessageFromError: a } = pi(), { sortAlpha: r, objectsAreEqual: l } = gr(), c = e, { axiosInstance: u } = Zt(c.config?.axiosRequestConfig), d = Et("filter-input"), p = G(""), f = G(!1), m = G(!1), h = G(Object.fromEntries(hc.concat(vc).map((ee) => [ee, !1]))), v = G(!0), g = G(!1), _ = G(""), k = G(""), w = G([]), T = G([]), S = G([]), E = G({}), P = G([]), $ = G(!1), R = G(null), x = G(!1), A = I(() => $.value ? s_ : l_), N = Ze(Dn.KM_2485_CLONED_PLUGINS, !1), F = I(() => s(N)), j = (ee) => ee === "none" || ee === "disabled" ? /* @__PURE__ */ new Set() : new Set(Array.isArray(ee) ? ee : [ee]), V = I(() => j(c.customPluginSupport)), oe = I(() => [...V.value].sort().join("|")), ge = I(() => V.value.has("streaming")), Z = I(() => F.value && V.value.has("cloned")), z = (ee) => Do(ee) && ee.code === "ERR_CANCELED", B = (ee) => a(ee).toLowerCase().includes("requires a license"), ie = I(() => {
|
|
35209
35210
|
let ee = `${c.config.apiBaseUrl}${nt.select[c.config.app].availablePlugins}`;
|
|
35210
35211
|
if (c.config.app === "konnect")
|
|
35211
35212
|
ee = ee.replace(/{controlPlaneId}/gi, c.config.controlPlaneId || "");
|
|
@@ -35252,14 +35253,14 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
35252
35253
|
score: me.score
|
|
35253
35254
|
});
|
|
35254
35255
|
}
|
|
35255
|
-
const
|
|
35256
|
-
return
|
|
35256
|
+
const U = Array.from(q.values()).sort((Q, ce) => Q.score - ce.score || Q.plugin.name.localeCompare(ce.plugin.name)).map((Q) => Q.plugin);
|
|
35257
|
+
return U.length ? { "Query Result": U } : {};
|
|
35257
35258
|
}), fe = I(() => Object.keys(J.value).length > 0), Te = I(() => Object.keys(E.value).length > 0 && !fe.value), _e = () => {
|
|
35258
35259
|
Object.keys(h.value).forEach((ee) => {
|
|
35259
35260
|
h.value[ee] = !1;
|
|
35260
35261
|
});
|
|
35261
|
-
},
|
|
35262
|
-
const ee = new Map(S.value.map((
|
|
35262
|
+
}, ze = () => {
|
|
35263
|
+
const ee = new Map(S.value.map((U) => [U.name, U])), W = new Set(T.value.map((U) => U.name)), ae = /* @__PURE__ */ new Set([
|
|
35263
35264
|
...W,
|
|
35264
35265
|
...ee.keys()
|
|
35265
35266
|
]), q = [.../* @__PURE__ */ new Set(
|
|
@@ -35268,13 +35269,13 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
35268
35269
|
...w.value,
|
|
35269
35270
|
...ae
|
|
35270
35271
|
]
|
|
35271
|
-
)].filter((
|
|
35272
|
+
)].filter((U) => !c.ignoredPlugins.includes(U)).filter((U) => {
|
|
35272
35273
|
if (!c.config.entityType)
|
|
35273
|
-
return
|
|
35274
|
-
const Q = ee.has(
|
|
35275
|
-
return c.config.entityType === "services" && o[Q] && !o[Q].scope.includes(bt.SERVICE) || c.config.entityType === "routes" && o[Q] && !o[Q].scope.includes(bt.ROUTE) || c.config.entityType === "consumer_groups" && o[Q] && !o[Q].scope.includes(bt.CONSUMER_GROUP) || c.config.entityType === "consumers" && o[Q] && !o[Q].scope.includes(bt.CONSUMER) ? !1 :
|
|
35276
|
-
}).reduce((
|
|
35277
|
-
const ce = o[Q] && o[Q].name || Q, me = ee.get(Q), we = W.has(Q),
|
|
35274
|
+
return U;
|
|
35275
|
+
const Q = ee.has(U) ? ee.get(U).ref : U;
|
|
35276
|
+
return c.config.entityType === "services" && o[Q] && !o[Q].scope.includes(bt.SERVICE) || c.config.entityType === "routes" && o[Q] && !o[Q].scope.includes(bt.ROUTE) || c.config.entityType === "consumer_groups" && o[Q] && !o[Q].scope.includes(bt.CONSUMER_GROUP) || c.config.entityType === "consumers" && o[Q] && !o[Q].scope.includes(bt.CONSUMER) ? !1 : U;
|
|
35277
|
+
}).reduce((U, Q) => {
|
|
35278
|
+
const ce = o[Q] && o[Q].name || Q, me = ee.get(Q), we = W.has(Q), Ge = {
|
|
35278
35279
|
...o[Q],
|
|
35279
35280
|
id: Q,
|
|
35280
35281
|
name: ce,
|
|
@@ -35282,15 +35283,15 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
35282
35283
|
disabledMessage: "",
|
|
35283
35284
|
group: o[Q]?.group || ot.CUSTOM_PLUGINS
|
|
35284
35285
|
};
|
|
35285
|
-
|
|
35286
|
-
const rt =
|
|
35287
|
-
let Me =
|
|
35288
|
-
return Me || (Me = []), Me.push(
|
|
35286
|
+
Ge.group === ot.CUSTOM_PLUGINS && (me ? (Ge.customPluginType = "cloned", Ge.clonedFromRef = me.ref) : we ? Ge.customPluginType = "streaming" : Ge.customPluginType = "schema"), c.disabledPlugins && (Ge.disabledMessage = c.disabledPlugins[Q]);
|
|
35287
|
+
const rt = Ge.group || i("plugins.select.misc_plugins");
|
|
35288
|
+
let Me = U[rt];
|
|
35289
|
+
return Me || (Me = []), Me.push(Ge), Me.sort(r("name")), U[rt] = Me, U;
|
|
35289
35290
|
}, {});
|
|
35290
35291
|
if (c.highlightedPluginIds && c.highlightedPluginIds.length > 0) {
|
|
35291
|
-
const
|
|
35292
|
+
const U = new Set(Object.values(q).flat().map((ce) => ce?.id)), Q = c.highlightedPluginIds.flatMap((ce) => {
|
|
35292
35293
|
const me = o[ce];
|
|
35293
|
-
return !me || !
|
|
35294
|
+
return !me || !U.has(ce) ? [] : {
|
|
35294
35295
|
...me,
|
|
35295
35296
|
id: ce,
|
|
35296
35297
|
name: me.name || ce,
|
|
@@ -35303,9 +35304,11 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
35303
35304
|
}
|
|
35304
35305
|
return q;
|
|
35305
35306
|
};
|
|
35306
|
-
|
|
35307
|
-
!l(ee || {}, W || {}) && !v.value && (E.value =
|
|
35308
|
-
}),
|
|
35307
|
+
Be(() => c.disabledPlugins, (ee, W) => {
|
|
35308
|
+
!l(ee || {}, W || {}) && !v.value && (E.value = ze());
|
|
35309
|
+
}), Be(() => c.ignoredPlugins, (ee, W) => {
|
|
35310
|
+
!l(ee, W) && !v.value && (E.value = ze());
|
|
35311
|
+
}), Be(v, (ee) => {
|
|
35309
35312
|
n("loading", ee);
|
|
35310
35313
|
});
|
|
35311
35314
|
const se = G(!1), te = G(!1), he = G(!1), Ie = G(!1), De = G(!1), je = G(!1), Ae = async () => {
|
|
@@ -35315,7 +35318,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
35315
35318
|
W,
|
|
35316
35319
|
ae,
|
|
35317
35320
|
q,
|
|
35318
|
-
|
|
35321
|
+
U,
|
|
35319
35322
|
Q
|
|
35320
35323
|
] = await Promise.all([
|
|
35321
35324
|
c.canEditCustomPlugin(),
|
|
@@ -35325,7 +35328,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
35325
35328
|
c.canDeleteClonedPlugin ? c.canDeleteClonedPlugin() : Promise.resolve(null),
|
|
35326
35329
|
c.canReadClonedPlugin()
|
|
35327
35330
|
]);
|
|
35328
|
-
se.value = ee, te.value = W, he.value = ae, Ie.value = q ?? ee, De.value =
|
|
35331
|
+
se.value = ee, te.value = W, he.value = ae, Ie.value = q ?? ee, De.value = U ?? W, je.value = Q;
|
|
35329
35332
|
} catch {
|
|
35330
35333
|
se.value = !1, te.value = !1, he.value = !1, Ie.value = !1, De.value = !1, je.value = !1;
|
|
35331
35334
|
}
|
|
@@ -35354,7 +35357,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
35354
35357
|
}).catch((ae) => {
|
|
35355
35358
|
if (z(ae))
|
|
35356
35359
|
return;
|
|
35357
|
-
const q =
|
|
35360
|
+
const q = B(ae);
|
|
35358
35361
|
(q || !k.value) && (k.value = q ? i("plugins.select.tabs.custom.license_required") : a(ae) ?? i("plugins.select.tabs.custom.fetch_error"));
|
|
35359
35362
|
})
|
|
35360
35363
|
), W.push(Oe(ee)), await Promise.allSettled(W);
|
|
@@ -35371,7 +35374,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
35371
35374
|
const { plugins: { available_on_server: ae } } = W;
|
|
35372
35375
|
w.value = ae ? Object.keys(ae) : [];
|
|
35373
35376
|
}
|
|
35374
|
-
await Re(ee.signal), E.value =
|
|
35377
|
+
await Re(ee.signal), E.value = ze();
|
|
35375
35378
|
} catch (W) {
|
|
35376
35379
|
z(W) || (g.value = !0, _.value = a(W));
|
|
35377
35380
|
} finally {
|
|
@@ -35382,7 +35385,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
35382
35385
|
};
|
|
35383
35386
|
return pn(async () => {
|
|
35384
35387
|
x.value = !0, d.value?.input?.focus(), await Ae(), await qe();
|
|
35385
|
-
}),
|
|
35388
|
+
}), Be(
|
|
35386
35389
|
() => [
|
|
35387
35390
|
c.config.app === "konnect" ? c.config.controlPlaneId : void 0,
|
|
35388
35391
|
c.config.workspace,
|
|
@@ -35398,7 +35401,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
35398
35401
|
), pr(() => {
|
|
35399
35402
|
R.value?.abort();
|
|
35400
35403
|
}), (ee, W) => {
|
|
35401
|
-
const ae = ne("KButton"), q = ne("KCheckbox"),
|
|
35404
|
+
const ae = ne("KButton"), q = ne("KCheckbox"), U = ne("KBadge"), Q = ne("KCollapse"), ce = ne("KInput"), me = ne("KSkeletonBox"), we = ne("KSkeleton"), Ge = ne("KEmptyState"), rt = ne("KAlert");
|
|
35402
35405
|
return b(), D("div", Y4, [
|
|
35403
35406
|
O("div", J4, [
|
|
35404
35407
|
O("div", X4, [
|
|
@@ -35435,7 +35438,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
35435
35438
|
"onUpdate:modelValue": (Jt) => h.value[Me] = Jt,
|
|
35436
35439
|
label: Me
|
|
35437
35440
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "label"]),
|
|
35438
|
-
y(
|
|
35441
|
+
y(U, { appearance: "neutral" }, {
|
|
35439
35442
|
default: C(() => [
|
|
35440
35443
|
re(M(E.value?.[Me]?.length || 0), 1)
|
|
35441
35444
|
]),
|
|
@@ -35466,7 +35469,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
35466
35469
|
"data-testid": `plugin-filter-checkbox-${Me}`,
|
|
35467
35470
|
label: Me
|
|
35468
35471
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "label"]),
|
|
35469
|
-
y(
|
|
35472
|
+
y(U, {
|
|
35470
35473
|
appearance: "neutral",
|
|
35471
35474
|
"data-testid": `plugin-filter-count-${Me}`
|
|
35472
35475
|
}, {
|
|
@@ -35511,7 +35514,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
35511
35514
|
class: "plugins-skeleton-cards",
|
|
35512
35515
|
type: "card"
|
|
35513
35516
|
})
|
|
35514
|
-
])) : g.value ? (b(), L(
|
|
35517
|
+
])) : g.value ? (b(), L(Ge, {
|
|
35515
35518
|
key: 1,
|
|
35516
35519
|
"action-button-visible": !1,
|
|
35517
35520
|
"data-testid": "plugins-fetch-error",
|
|
@@ -35521,7 +35524,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
35521
35524
|
O("h3", null, M(_.value), 1)
|
|
35522
35525
|
]),
|
|
35523
35526
|
_: 1
|
|
35524
|
-
})) : Te.value && p.value ? (b(), L(
|
|
35527
|
+
})) : Te.value && p.value ? (b(), L(Ge, {
|
|
35525
35528
|
key: 2,
|
|
35526
35529
|
"action-button-visible": !1,
|
|
35527
35530
|
"data-testid": "plugins-empty-state",
|
|
@@ -35563,7 +35566,7 @@ const l3 = { class: "kong-ui-entities-plugin-form" }, c3 = {
|
|
|
35563
35566
|
]);
|
|
35564
35567
|
};
|
|
35565
35568
|
}
|
|
35566
|
-
}), w6 = /* @__PURE__ */ Ee(cz, [["__scopeId", "data-v-
|
|
35569
|
+
}), w6 = /* @__PURE__ */ Ee(cz, [["__scopeId", "data-v-a7e2cc9c"]]), uz = {
|
|
35567
35570
|
key: 1,
|
|
35568
35571
|
class: "datakit-config-card-canvas"
|
|
35569
35572
|
}, dz = {
|
|
@@ -35990,7 +35993,7 @@ const Az = /* @__PURE__ */ le({
|
|
|
35990
35993
|
const n = /* @__PURE__ */ new Set(["id", "created_at", "consumer"]), { i18n: { t: i } } = at.useI18n(), o = t, { axiosInstance: a } = Zt(e.config?.axiosRequestConfig), r = G({}), l = (g) => {
|
|
35991
35994
|
r.value = g, o("update:modelValue", g);
|
|
35992
35995
|
}, c = G(!1);
|
|
35993
|
-
|
|
35996
|
+
Be(c, (g) => o("update:loading", g), { immediate: !0 });
|
|
35994
35997
|
const u = G(), d = (g) => Object.keys(g)[0], p = I(() => {
|
|
35995
35998
|
if (u.value)
|
|
35996
35999
|
return {
|