@kong-ui-public/entities-plugins 9.128.0 → 9.129.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var iv = Object.defineProperty;
|
|
2
2
|
var rv = (e, t, n) => t in e ? iv(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var _t = (e, t, n) => rv(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { defineComponent as _e, useModel as Wi, inject as ct, ref as pe, computed as R, onMounted as Bt, resolveComponent as Ae, createBlock as H, openBlock as k, toRef as He, createElementBlock as Q, createVNode as N, unref as p, isRef as Fo, markRaw as ii, provide as Tt, withCtx as F, createElementVNode as J, createCommentVNode as Ee, Fragment as Be, renderList as Ze, toDisplayString as
|
|
4
|
+
import { defineComponent as _e, useModel as Wi, inject as ct, ref as pe, computed as R, onMounted as Bt, resolveComponent as Ae, createBlock as H, openBlock as k, toRef as He, createElementBlock as Q, createVNode as N, unref as p, isRef as Fo, markRaw as ii, provide as Tt, withCtx as F, createElementVNode as J, createCommentVNode as Ee, Fragment as Be, renderList as Ze, toDisplayString as ve, toValue as De, reactive as wo, useSlots as fn, watch as Le, nextTick as mt, onBeforeUnmount as hr, useAttrs as qn, mergeProps as tt, createSlots as at, renderSlot as qe, normalizeProps as Qt, guardReactiveProps as ln, createPropsRestProxy as pn, resolveDynamicComponent as gt, Transition as av, mergeModels as Hs, onBeforeMount as ao, createTextVNode as Me, normalizeClass as Je, useTemplateRef as pt, withKeys as Xu, withModifiers as Pt, useCssVars as vr, toRaw as jf, withDirectives as sv, vShow as lv, watchEffect as qf, shallowRef as an, getCurrentScope as zf, effectScope as Uf, getCurrentInstance as yr, onScopeDispose as Bi, toRefs as uv, customRef as cv, h as rt, normalizeStyle as Kt, onUnmounted as Bl, isMemoSame as dv, readonly as fv, warn as pv, useId as Hf, Teleport as Vl } from "vue";
|
|
5
5
|
import { useStringHelpers as Na, ConfigurationSchemaType as Vt, useAxios as so, useErrors as ki, EntityFormBlock as Zu, useHelpers as $a, EntityBaseFormType as co, EntityBaseForm as mv, SupportedEntityType as Gs, TerraformCodeBlock as gv, YamlCodeBlock as hv, JsonCodeBlock as vv, useTableState as yv, useGatewayFeatureSupported as _v, useFetcher as bv, useDeleteUrlBuilder as wv, FetcherStatus as Ev, EntityBaseTable as kv, PermissionsWrapper as fo, TableTags as Cv, EntityFilter as xv, EntityToggleModal as Sv, EntityDeleteModal as Gf, EntityTypes as Yf, ConfigurationSchemaSection as Go, useSchemaProvider as Av, EntityBaseConfigCard as Iv, InternalLinkItem as Ii } from "@kong-ui-public/entities-shared";
|
|
6
6
|
import { marked as zr } from "marked";
|
|
7
7
|
import { onBeforeRouteLeave as Tv, useRouter as Oa, useRoute as Nv } from "vue-router";
|
|
@@ -687,10 +687,10 @@ const gy = {
|
|
|
687
687
|
}
|
|
688
688
|
},
|
|
689
689
|
field_rules: {
|
|
690
|
-
at_least_one_of: "At least one of
|
|
690
|
+
at_least_one_of: "At least one of the following values is required: {parameters}.",
|
|
691
691
|
only_one_of: "Exactly one of these parameters is required: {parameters}",
|
|
692
|
-
mutually_required: "These
|
|
693
|
-
mutually_exclusive: "
|
|
692
|
+
mutually_required: "These values must be used together: {parameters}.",
|
|
693
|
+
mutually_exclusive: "Only one of these values can be used: {parameters}.",
|
|
694
694
|
only_one_of_mutually_required: "Exactly one of the following parameter combinations is required (all parameters within a chosen combination are required):"
|
|
695
695
|
},
|
|
696
696
|
sections: {
|
|
@@ -934,15 +934,14 @@ const gy = {
|
|
|
934
934
|
}, wy = {
|
|
935
935
|
title: "Redis Configuration",
|
|
936
936
|
shared_configuration: {
|
|
937
|
-
label: "
|
|
938
|
-
description: "Select an existing shared Redis configuration or create a new one.
|
|
937
|
+
label: "Shared configuration",
|
|
938
|
+
description: "Select an existing shared Redis configuration or create a new one. Changes to this configuration automatically apply to all associated plugins.",
|
|
939
939
|
title: "Shared Redis Configuration",
|
|
940
|
-
error: "Fetching shared Redis configurations failed."
|
|
941
|
-
badge: "Recommended"
|
|
940
|
+
error: "Fetching shared Redis configurations failed."
|
|
942
941
|
},
|
|
943
942
|
dedicated_configuration: {
|
|
944
|
-
label: "
|
|
945
|
-
description: "Create a Redis configuration
|
|
943
|
+
label: "Dedicated configuration",
|
|
944
|
+
description: "Create a Redis configuration that is used only by this plugin. Changes won’t affect other plugins."
|
|
946
945
|
},
|
|
947
946
|
config_card: {
|
|
948
947
|
common_fields: {
|
|
@@ -4646,28 +4645,28 @@ const tk = (e, t) => {
|
|
|
4646
4645
|
}, a = () => ["created_at", "updated_at", "id", "_isCustomPlugin", "_supported_redis_partial_type", "_redis_partial_path"], s = (E, x, T, I) => {
|
|
4647
4646
|
let O = {};
|
|
4648
4647
|
(x || E) && (O = x || (E.fields ? E.fields : E));
|
|
4649
|
-
const M = a().concat(E.blacklist ? E.blacklist : []), b = Object.keys(O).filter((
|
|
4650
|
-
|
|
4648
|
+
const M = a().concat(E.blacklist ? E.blacklist : []), b = Object.keys(O).filter((z) => !M.includes(z)), U = b.indexOf("comparator");
|
|
4649
|
+
U > -1 && b.splice(U, 1);
|
|
4651
4650
|
let A = { fields: [] };
|
|
4652
|
-
const
|
|
4653
|
-
b.forEach((
|
|
4654
|
-
u(O[
|
|
4651
|
+
const j = {};
|
|
4652
|
+
b.forEach((z) => {
|
|
4653
|
+
u(O[z], z, O, j, A, T);
|
|
4655
4654
|
});
|
|
4656
|
-
const V =
|
|
4655
|
+
const V = j.name, ue = on[V], de = [], q = (z) => {
|
|
4657
4656
|
const P = ["cluster-cache"];
|
|
4658
4657
|
for (const K of P)
|
|
4659
|
-
if (
|
|
4658
|
+
if (z.model.includes(K))
|
|
4660
4659
|
return !1;
|
|
4661
|
-
return new RegExp("(?<=-redis-).*").test(
|
|
4660
|
+
return new RegExp("(?<=-redis-).*").test(z.model);
|
|
4662
4661
|
};
|
|
4663
4662
|
if (A._supported_redis_partial_type = E._supported_redis_partial_type, A._redis_partial_path = E._redis_partial_path, Wf(V) || al(V, i) || ue != null && ue.useLegacyForm || e != null && e.credential || I === "freeform") {
|
|
4664
4663
|
if (ue != null && ue.useLegacyForm && (e != null && e.enableRedisPartial) && E._supported_redis_partial_type) {
|
|
4665
|
-
for (const
|
|
4666
|
-
if (z
|
|
4667
|
-
de.push(
|
|
4664
|
+
for (const z of A.fields)
|
|
4665
|
+
if (q(z)) {
|
|
4666
|
+
de.push(z);
|
|
4668
4667
|
continue;
|
|
4669
4668
|
}
|
|
4670
|
-
A.fields = A.fields.filter((
|
|
4669
|
+
A.fields = A.fields.filter((z) => !q(z)), de.length && A.fields.push({
|
|
4671
4670
|
id: "_redis",
|
|
4672
4671
|
fields: de,
|
|
4673
4672
|
model: "__redis_partial",
|
|
@@ -4676,9 +4675,9 @@ const tk = (e, t) => {
|
|
|
4676
4675
|
redisPath: E._redis_partial_path
|
|
4677
4676
|
});
|
|
4678
4677
|
}
|
|
4679
|
-
A.fields.sort((
|
|
4678
|
+
A.fields.sort((z, P) => (z.order = z.order || 0, P.order = P.order || 0, z.order - P.order));
|
|
4680
4679
|
} else {
|
|
4681
|
-
const
|
|
4680
|
+
const z = [], P = [], K = [], ee = [], ae = {};
|
|
4682
4681
|
if (ue != null && ue.fieldRules) {
|
|
4683
4682
|
const ge = [
|
|
4684
4683
|
...ue.fieldRules.atLeastOneOf ?? [],
|
|
@@ -4693,12 +4692,12 @@ const tk = (e, t) => {
|
|
|
4693
4692
|
ae[Se.replace(/-/g, "_").replace(/\./g, "-")] = !1;
|
|
4694
4693
|
}
|
|
4695
4694
|
for (const ge of A.fields) {
|
|
4696
|
-
if (e != null && e.enableRedisPartial && E._supported_redis_partial_type &&
|
|
4695
|
+
if (e != null && e.enableRedisPartial && E._supported_redis_partial_type && q(ge)) {
|
|
4697
4696
|
ee.push(ge);
|
|
4698
4697
|
continue;
|
|
4699
4698
|
}
|
|
4700
4699
|
if (ge.pinned) {
|
|
4701
|
-
|
|
4700
|
+
z.push(ge);
|
|
4702
4701
|
continue;
|
|
4703
4702
|
}
|
|
4704
4703
|
if (ge.required || ae[ge.model] !== void 0) {
|
|
@@ -4720,8 +4719,8 @@ const tk = (e, t) => {
|
|
|
4720
4719
|
const ne = Object.entries(ae).filter(([, ge]) => !ge).map(([ge]) => ge.replace(/-/g, ".").replace(/_/g, "-"));
|
|
4721
4720
|
ne.length > 0 && console.warn(`Unknown checked fields for plugin ${V}: ${ne.join(", ")}`);
|
|
4722
4721
|
const Y = [];
|
|
4723
|
-
|
|
4724
|
-
fields:
|
|
4722
|
+
z.length > 0 && Y.push({
|
|
4723
|
+
fields: z.sort(zp)
|
|
4725
4724
|
}), (P.length > 0 || K.length > 0) && Y.push({
|
|
4726
4725
|
fields: P.sort(qc),
|
|
4727
4726
|
collapsible: {
|
|
@@ -4745,7 +4744,7 @@ const tk = (e, t) => {
|
|
|
4745
4744
|
}
|
|
4746
4745
|
return {
|
|
4747
4746
|
schema: A,
|
|
4748
|
-
model:
|
|
4747
|
+
model: j,
|
|
4749
4748
|
options: {
|
|
4750
4749
|
noneSelectedText: "Nothing Selected...",
|
|
4751
4750
|
helpAsHtml: !0
|
|
@@ -4756,9 +4755,9 @@ const tk = (e, t) => {
|
|
|
4756
4755
|
return I[x] = b ? E.default : null, E.id = x, E.model = x, E.fields && E.type === "record" ? c(E, x, T, I, O, M) : (T[x] = E, S(E, I), M && M[x] && d(T[x], M[x]), O.fields.push(E)), T;
|
|
4757
4756
|
}, d = (E, x) => (x && (Object.assign(E, x), x.label && (E.label = x.label)), E), c = (E, x, T, I, O, M) => {
|
|
4758
4757
|
E.fields.forEach((b) => {
|
|
4759
|
-
Object.keys(b).forEach((
|
|
4760
|
-
const A = b[
|
|
4761
|
-
T = u(A, x + "-" +
|
|
4758
|
+
Object.keys(b).forEach((U) => {
|
|
4759
|
+
const A = b[U];
|
|
4760
|
+
T = u(A, x + "-" + U, T, I, O, M);
|
|
4762
4761
|
});
|
|
4763
4762
|
});
|
|
4764
4763
|
}, f = (E, x) => {
|
|
@@ -4975,16 +4974,16 @@ const tk = (e, t) => {
|
|
|
4975
4974
|
J("ul", null, [
|
|
4976
4975
|
(k(!0), Q(Be, null, Ze(a.value, (d, c) => (k(), Q("li", {
|
|
4977
4976
|
key: `simple-alert-${c}`
|
|
4978
|
-
},
|
|
4977
|
+
}, ve(d), 1))), 128)),
|
|
4979
4978
|
t.rules.onlyOneOfMutuallyRequired && t.rules.onlyOneOfMutuallyRequired.length > 0 ? (k(), Q("li", ok, [
|
|
4980
4979
|
(k(!0), Q(Be, null, Ze(t.rules.onlyOneOfMutuallyRequired, (d, c) => (k(), Q("div", {
|
|
4981
4980
|
key: `only-one-mutually-alert-${c}`
|
|
4982
4981
|
}, [
|
|
4983
|
-
J("div", null,
|
|
4982
|
+
J("div", null, ve(p(o)("plugins.form.field_rules.only_one_of_mutually_required")), 1),
|
|
4984
4983
|
J("ul", null, [
|
|
4985
4984
|
(k(!0), Q(Be, null, Ze(d, (f, m) => (k(), Q("li", {
|
|
4986
4985
|
key: `only-one-mutually-alert-${c}-combination-${m}`
|
|
4987
|
-
},
|
|
4986
|
+
}, ve(i(f)), 1))), 128))
|
|
4988
4987
|
])
|
|
4989
4988
|
]))), 128))
|
|
4990
4989
|
])) : Ee("", !0)
|
|
@@ -5596,9 +5595,9 @@ ${S}`
|
|
|
5596
5595
|
if (T != null && T.includes(I)) return;
|
|
5597
5596
|
const b = pi(C, O);
|
|
5598
5597
|
if (Bn(b, M)) return;
|
|
5599
|
-
const
|
|
5598
|
+
const U = x ? kt(x, I) : I, A = y(U), j = pi(C, I);
|
|
5600
5599
|
let V, ue = !1;
|
|
5601
|
-
A != null && A.required ? (V = v(
|
|
5600
|
+
A != null && A.required ? (V = v(U), ue = !Bn(j, V)) : (V = null, ue = j != null), ue && S.push({ fieldName: I, targetValue: V });
|
|
5602
5601
|
}), S.length > 0)) {
|
|
5603
5602
|
for (_ = !0; S.length > 0; ) {
|
|
5604
5603
|
const { fieldName: I, targetValue: O } = S.pop();
|
|
@@ -5903,7 +5902,7 @@ const $o = /* @__PURE__ */ _e({
|
|
|
5903
5902
|
(k(!0), Q(Be, null, Ze(n.value, (l) => (k(), Q("li", {
|
|
5904
5903
|
key: l,
|
|
5905
5904
|
"data-testid": "ff-entity-check-item"
|
|
5906
|
-
},
|
|
5905
|
+
}, ve(l), 1))), 128))
|
|
5907
5906
|
])
|
|
5908
5907
|
]),
|
|
5909
5908
|
_: 1
|
|
@@ -6015,7 +6014,7 @@ const $o = /* @__PURE__ */ _e({
|
|
|
6015
6014
|
"tooltip-attributes": p(m).labelAttributes.tooltipAttributes
|
|
6016
6015
|
}), at({
|
|
6017
6016
|
default: F(() => [
|
|
6018
|
-
Me(
|
|
6017
|
+
Me(ve(p(m).label) + " ", 1)
|
|
6019
6018
|
]),
|
|
6020
6019
|
_: 2
|
|
6021
6020
|
}, [
|
|
@@ -6411,7 +6410,7 @@ const Kk = ["data-testid"], Bk = ["data-testid"], Vk = ["innerHTML"], jk = ["dat
|
|
|
6411
6410
|
"tooltip-attributes": p(c).labelAttributes.tooltipAttributes
|
|
6412
6411
|
}), at({
|
|
6413
6412
|
default: F(() => [
|
|
6414
|
-
Me(
|
|
6413
|
+
Me(ve(p(c).label) + " ", 1)
|
|
6415
6414
|
]),
|
|
6416
6415
|
_: 2
|
|
6417
6416
|
}, [
|
|
@@ -6446,29 +6445,29 @@ const Kk = ["data-testid"], Bk = ["data-testid"], Vk = ["innerHTML"], jk = ["dat
|
|
|
6446
6445
|
}, [
|
|
6447
6446
|
N($o, {
|
|
6448
6447
|
modelValue: M.key,
|
|
6449
|
-
"onUpdate:modelValue": (
|
|
6448
|
+
"onUpdate:modelValue": (U) => M.key = U,
|
|
6450
6449
|
modelModifiers: { trim: !0 },
|
|
6451
6450
|
class: "ff-kv-field-entry-key",
|
|
6452
6451
|
"data-key-input": b,
|
|
6453
6452
|
"data-testid": `ff-key-${p(f).path.value}.${b}`,
|
|
6454
6453
|
placeholder: e.keyPlaceholder || "Key",
|
|
6455
|
-
onKeydown: Xu(Pt((
|
|
6454
|
+
onKeydown: Xu(Pt((U) => h(b, "value"), ["prevent"]), ["enter"])
|
|
6456
6455
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-key-input", "data-testid", "placeholder", "onKeydown"]),
|
|
6457
6456
|
N($o, {
|
|
6458
6457
|
modelValue: M.value,
|
|
6459
|
-
"onUpdate:modelValue": (
|
|
6458
|
+
"onUpdate:modelValue": (U) => M.value = U,
|
|
6460
6459
|
modelModifiers: { trim: !0 },
|
|
6461
6460
|
class: "ff-kv-field-entry-value",
|
|
6462
6461
|
"data-testid": `ff-value-${p(f).path.value}.${b}`,
|
|
6463
6462
|
"data-value-input": b,
|
|
6464
6463
|
placeholder: e.valuePlaceholder || "Value",
|
|
6465
|
-
onKeydown: Xu(Pt((
|
|
6464
|
+
onKeydown: Xu(Pt((U) => y(b), ["prevent"]), ["enter"])
|
|
6466
6465
|
}, {
|
|
6467
6466
|
after: F(() => [
|
|
6468
6467
|
p(v) && w.value ? (k(), H(gt(p(v)), {
|
|
6469
6468
|
key: 0,
|
|
6470
6469
|
schema: _.value,
|
|
6471
|
-
update: (
|
|
6470
|
+
update: (U) => S(b, U),
|
|
6472
6471
|
value: M.value
|
|
6473
6472
|
}, null, 8, ["schema", "update", "value"])) : Ee("", !0),
|
|
6474
6473
|
w.value && !p(v) ? (k(), H(x, {
|
|
@@ -6484,7 +6483,7 @@ const Kk = ["data-testid"], Bk = ["data-testid"], Vk = ["innerHTML"], jk = ["dat
|
|
|
6484
6483
|
appearance: "tertiary",
|
|
6485
6484
|
"data-testid": `ff-kv-remove-btn-${p(f).path.value}.${b}`,
|
|
6486
6485
|
icon: "",
|
|
6487
|
-
onClick: (
|
|
6486
|
+
onClick: (U) => p(l)(M.id)
|
|
6488
6487
|
}, {
|
|
6489
6488
|
default: F(() => [
|
|
6490
6489
|
N(p(Qr))
|
|
@@ -6792,7 +6791,7 @@ const Kk = ["data-testid"], Bk = ["data-testid"], Vk = ["innerHTML"], jk = ["dat
|
|
|
6792
6791
|
return x !== "tabs" || T == null || T === !1 ? null : typeof T == "number" ? `${n.stickyTabs}px` : typeof T == "string" ? T : "0";
|
|
6793
6792
|
});
|
|
6794
6793
|
return (x, T) => {
|
|
6795
|
-
var
|
|
6794
|
+
var U;
|
|
6796
6795
|
const I = Ae("KAlert"), O = Ae("KLabel"), M = Ae("KButton"), b = Ae("KTabs");
|
|
6797
6796
|
return l.error ? (k(), H(I, {
|
|
6798
6797
|
key: 0,
|
|
@@ -6817,11 +6816,11 @@ const Kk = ["data-testid"], Bk = ["data-testid"], Vk = ["innerHTML"], jk = ["dat
|
|
|
6817
6816
|
"tooltip-attributes": p(u).labelAttributes.tooltipAttributes
|
|
6818
6817
|
}), at({
|
|
6819
6818
|
default: F(() => [
|
|
6820
|
-
Me(
|
|
6819
|
+
Me(ve(p(u).label) + " ", 1)
|
|
6821
6820
|
]),
|
|
6822
6821
|
_: 2
|
|
6823
6822
|
}, [
|
|
6824
|
-
(
|
|
6823
|
+
(U = p(u).labelAttributes) != null && U.info ? {
|
|
6825
6824
|
name: "tooltip",
|
|
6826
6825
|
fn: F(() => [
|
|
6827
6826
|
qe(x.$slots, "tooltip", {}, () => [
|
|
@@ -6852,35 +6851,35 @@ const Kk = ["data-testid"], Bk = ["data-testid"], Vk = ["innerHTML"], jk = ["dat
|
|
|
6852
6851
|
class: "ff-array-field-container",
|
|
6853
6852
|
"data-testid": `ff-array-basic-container-${l.path.value}`
|
|
6854
6853
|
}, [
|
|
6855
|
-
(k(!0), Q(Be, null, Ze(c.value, (A,
|
|
6856
|
-
key: p(f)(A,
|
|
6854
|
+
(k(!0), Q(Be, null, Ze(c.value, (A, j) => (k(), H(p(m), {
|
|
6855
|
+
key: p(f)(A, j),
|
|
6857
6856
|
class: "ff-array-field-item",
|
|
6858
|
-
"data-index":
|
|
6859
|
-
"data-testid": `ff-array-item-${l.path.value}.${
|
|
6857
|
+
"data-index": j,
|
|
6858
|
+
"data-testid": `ff-array-item-${l.path.value}.${j}`
|
|
6860
6859
|
}, {
|
|
6861
6860
|
default: F(() => [
|
|
6862
6861
|
J("div", rC, [
|
|
6863
6862
|
x.$slots.item ? qe(x.$slots, "item", {
|
|
6864
6863
|
key: 0,
|
|
6865
|
-
fieldName: String(
|
|
6866
|
-
index:
|
|
6864
|
+
fieldName: String(j),
|
|
6865
|
+
index: j
|
|
6867
6866
|
}, void 0, !0) : Ee("", !0),
|
|
6868
6867
|
d.value.type === "array" && d.value.elements.type === "string" ? (k(), H(mu, {
|
|
6869
6868
|
key: 1,
|
|
6870
6869
|
help: p(i)("plugins.free-form.tag_helper"),
|
|
6871
|
-
name: String(
|
|
6870
|
+
name: String(j)
|
|
6872
6871
|
}, null, 8, ["help", "name"])) : (k(), H(jt, {
|
|
6873
6872
|
key: 2,
|
|
6874
|
-
name: String(
|
|
6873
|
+
name: String(j)
|
|
6875
6874
|
}, null, 8, ["name"]))
|
|
6876
6875
|
]),
|
|
6877
6876
|
N(M, {
|
|
6878
6877
|
appearance: "tertiary",
|
|
6879
6878
|
"aria-label": p(i)("actions.remove_entity", { entity: p(i)("plugins.free-form.request-callout.entity_name") }),
|
|
6880
6879
|
class: "ff-array-field-item-remove",
|
|
6881
|
-
"data-testid": `ff-array-remove-item-btn-${l.path.value}.${
|
|
6880
|
+
"data-testid": `ff-array-remove-item-btn-${l.path.value}.${j}`,
|
|
6882
6881
|
icon: "",
|
|
6883
|
-
onClick: (V) => w(
|
|
6882
|
+
onClick: (V) => w(j)
|
|
6884
6883
|
}, {
|
|
6885
6884
|
default: F(() => [
|
|
6886
6885
|
N(p(Qr))
|
|
@@ -6901,36 +6900,36 @@ const Kk = ["data-testid"], Bk = ["data-testid"], Vk = ["innerHTML"], jk = ["dat
|
|
|
6901
6900
|
"data-testid": `ff-array-tabs-${l.path.value}`,
|
|
6902
6901
|
tabs: g.value
|
|
6903
6902
|
}, at({ _: 2 }, [
|
|
6904
|
-
Ze(c.value, (A,
|
|
6905
|
-
name: p(f)(A,
|
|
6903
|
+
Ze(c.value, (A, j) => ({
|
|
6904
|
+
name: p(f)(A, j),
|
|
6906
6905
|
fn: F(() => [
|
|
6907
6906
|
J("div", {
|
|
6908
6907
|
class: "ff-array-field-item",
|
|
6909
|
-
"data-index":
|
|
6910
|
-
"data-testid": `ff-array-item-${l.path.value}.${
|
|
6908
|
+
"data-index": j,
|
|
6909
|
+
"data-testid": `ff-array-item-${l.path.value}.${j}`
|
|
6911
6910
|
}, [
|
|
6912
6911
|
x.$slots.item ? qe(x.$slots, "item", {
|
|
6913
6912
|
key: 0,
|
|
6914
|
-
fieldName: String(
|
|
6915
|
-
index:
|
|
6913
|
+
fieldName: String(j),
|
|
6914
|
+
index: j
|
|
6916
6915
|
}, void 0, !0) : (k(), H(jt, {
|
|
6917
6916
|
key: 1,
|
|
6918
|
-
name: String(
|
|
6917
|
+
name: String(j)
|
|
6919
6918
|
}, null, 8, ["name"]))
|
|
6920
6919
|
], 8, aC)
|
|
6921
6920
|
])
|
|
6922
6921
|
})),
|
|
6923
|
-
Ze(c.value, (A,
|
|
6924
|
-
name: `${p(f)(A,
|
|
6922
|
+
Ze(c.value, (A, j) => ({
|
|
6923
|
+
name: `${p(f)(A, j)}-anchor`,
|
|
6925
6924
|
fn: F(() => [
|
|
6926
|
-
Me(
|
|
6925
|
+
Me(ve(h(A, j)) + " ", 1),
|
|
6927
6926
|
N(M, {
|
|
6928
6927
|
appearance: "tertiary",
|
|
6929
6928
|
"aria-label": p(i)("actions.remove_entity", { entity: p(i)("plugins.free-form.request-callout.entity_name") }),
|
|
6930
6929
|
class: "ff-array-field-item-remove",
|
|
6931
|
-
"data-testid": `ff-array-remove-item-btn-${l.path.value}.${
|
|
6930
|
+
"data-testid": `ff-array-remove-item-btn-${l.path.value}.${j}`,
|
|
6932
6931
|
icon: "",
|
|
6933
|
-
onClick: Pt((V) => w(
|
|
6932
|
+
onClick: Pt((V) => w(j), ["stop"])
|
|
6934
6933
|
}, {
|
|
6935
6934
|
default: F(() => [
|
|
6936
6935
|
N(p(Qr))
|
|
@@ -7315,10 +7314,10 @@ const Kk = ["data-testid"], Bk = ["data-testid"], Vk = ["innerHTML"], jk = ["dat
|
|
|
7315
7314
|
class: "ff-form-config-fields"
|
|
7316
7315
|
}, {
|
|
7317
7316
|
title: F(() => [
|
|
7318
|
-
Me(
|
|
7317
|
+
Me(ve(p(t)("plugins.form.grouping.plugin_configuration.title")), 1)
|
|
7319
7318
|
]),
|
|
7320
7319
|
"visible-content": F(() => [
|
|
7321
|
-
Me(
|
|
7320
|
+
Me(ve(p(t)("plugins.form.grouping.plugin_configuration.description")), 1)
|
|
7322
7321
|
]),
|
|
7323
7322
|
default: F(() => [
|
|
7324
7323
|
J("div", gC, [
|
|
@@ -7380,7 +7379,7 @@ const Kk = ["data-testid"], Bk = ["data-testid"], Vk = ["innerHTML"], jk = ["dat
|
|
|
7380
7379
|
}, null, 8, ["message"])) : (k(), Q("div", yC, [
|
|
7381
7380
|
N(f, Qt(ln(p(a).labelAttributes)), at({
|
|
7382
7381
|
default: F(() => [
|
|
7383
|
-
Me(
|
|
7382
|
+
Me(ve(p(a).label) + " ", 1)
|
|
7384
7383
|
]),
|
|
7385
7384
|
_: 2
|
|
7386
7385
|
}, [
|
|
@@ -7507,11 +7506,11 @@ const Kk = ["data-testid"], Bk = ["data-testid"], Vk = ["innerHTML"], jk = ["dat
|
|
|
7507
7506
|
required: ""
|
|
7508
7507
|
}, {
|
|
7509
7508
|
default: F(() => [
|
|
7510
|
-
Me(
|
|
7509
|
+
Me(ve(p(t)("sp.request_limits.title")), 1)
|
|
7511
7510
|
]),
|
|
7512
7511
|
_: 1
|
|
7513
7512
|
}),
|
|
7514
|
-
J("div", EC,
|
|
7513
|
+
J("div", EC, ve(p(t)("sp.request_limits.subtitle")), 1)
|
|
7515
7514
|
]),
|
|
7516
7515
|
default: F(() => [
|
|
7517
7516
|
J("div", kC, [
|
|
@@ -7531,7 +7530,7 @@ const Kk = ["data-testid"], Bk = ["data-testid"], Vk = ["innerHTML"], jk = ["dat
|
|
|
7531
7530
|
for: `sp-form-request-limits-item-${I}-legend`
|
|
7532
7531
|
}, {
|
|
7533
7532
|
default: F(() => [
|
|
7534
|
-
Me(
|
|
7533
|
+
Me(ve(p(t)("sp.request_limits.label_index", { index: I + 1 })), 1)
|
|
7535
7534
|
]),
|
|
7536
7535
|
_: 2
|
|
7537
7536
|
}, 1032, ["for"]),
|
|
@@ -7544,12 +7543,12 @@ const Kk = ["data-testid"], Bk = ["data-testid"], Vk = ["innerHTML"], jk = ["dat
|
|
|
7544
7543
|
name: `$.config.limit.${I}`,
|
|
7545
7544
|
placeholder: p(t)("sp.request_limits.request_number")
|
|
7546
7545
|
}, null, 8, ["name", "placeholder"]),
|
|
7547
|
-
J("div", null,
|
|
7546
|
+
J("div", null, ve(p(t)("sp.request_limits.interval_determiner")), 1),
|
|
7548
7547
|
N(Oo, {
|
|
7549
7548
|
name: `$.config.window_size.${I}`,
|
|
7550
7549
|
placeholder: p(t)("sp.request_limits.time_interval")
|
|
7551
7550
|
}, null, 8, ["name", "placeholder"]),
|
|
7552
|
-
J("div", null,
|
|
7551
|
+
J("div", null, ve(p(t)("sp.request_limits.seconds")), 1)
|
|
7553
7552
|
], 8, AC),
|
|
7554
7553
|
J("div", IC, [
|
|
7555
7554
|
N(S, {
|
|
@@ -7576,17 +7575,17 @@ const Kk = ["data-testid"], Bk = ["data-testid"], Vk = ["innerHTML"], jk = ["dat
|
|
|
7576
7575
|
]))), 128))
|
|
7577
7576
|
]),
|
|
7578
7577
|
h.value.length > 0 ? (k(), Q("div", TC, [
|
|
7579
|
-
J("div", null,
|
|
7578
|
+
J("div", null, ve(p(t)("sp.start_with_a_use_case")), 1),
|
|
7580
7579
|
J("div", NC, [
|
|
7581
7580
|
(k(!0), Q(Be, null, Ze(h.value, (T, I) => (k(), H(E, {
|
|
7582
7581
|
key: `use-case-${I}`,
|
|
7583
7582
|
"max-width": "300"
|
|
7584
7583
|
}, {
|
|
7585
7584
|
content: F(() => [
|
|
7586
|
-
J("div", null,
|
|
7585
|
+
J("div", null, ve(T.description), 1),
|
|
7587
7586
|
w[1] || (w[1] = J("br", null, null, -1)),
|
|
7588
|
-
J("div", null,
|
|
7589
|
-
J("div", null,
|
|
7587
|
+
J("div", null, ve(p(t)("sp.request_limits.label")) + ": " + ve(T.config.limit), 1),
|
|
7588
|
+
J("div", null, ve(p(t)("sp.request_limits.time_interval")) + ": " + ve(T.config.window_size), 1)
|
|
7590
7589
|
]),
|
|
7591
7590
|
default: F(() => [
|
|
7592
7591
|
N(C, {
|
|
@@ -7595,7 +7594,7 @@ const Kk = ["data-testid"], Bk = ["data-testid"], Vk = ["innerHTML"], jk = ["dat
|
|
|
7595
7594
|
onClick: () => g(T, `${d.value}-${I}`)
|
|
7596
7595
|
}, {
|
|
7597
7596
|
default: F(() => [
|
|
7598
|
-
Me(
|
|
7597
|
+
Me(ve(T.label), 1)
|
|
7599
7598
|
]),
|
|
7600
7599
|
_: 2
|
|
7601
7600
|
}, 1032, ["appearance", "onClick"])
|
|
@@ -7630,7 +7629,7 @@ const Kk = ["data-testid"], Bk = ["data-testid"], Vk = ["innerHTML"], jk = ["dat
|
|
|
7630
7629
|
}
|
|
7631
7630
|
}, {
|
|
7632
7631
|
default: F(() => [
|
|
7633
|
-
Me(
|
|
7632
|
+
Me(ve(p(t)("sp.error_message.label")), 1)
|
|
7634
7633
|
]),
|
|
7635
7634
|
_: 1
|
|
7636
7635
|
}, 8, ["info"]),
|
|
@@ -7700,7 +7699,7 @@ const Kk = ["data-testid"], Bk = ["data-testid"], Vk = ["innerHTML"], jk = ["dat
|
|
|
7700
7699
|
class: "partial-config-card-row"
|
|
7701
7700
|
}, [
|
|
7702
7701
|
J("div", FC, [
|
|
7703
|
-
J("div", LC,
|
|
7702
|
+
J("div", LC, ve(g), 1)
|
|
7704
7703
|
]),
|
|
7705
7704
|
J("div", {
|
|
7706
7705
|
class: "config-card-row-value",
|
|
@@ -7718,7 +7717,7 @@ const Kk = ["data-testid"], Bk = ["data-testid"], Vk = ["innerHTML"], jk = ["dat
|
|
|
7718
7717
|
], 8, jC)) : (k(), Q("div", {
|
|
7719
7718
|
key: 1,
|
|
7720
7719
|
"data-testid": `${h}-plain-text`
|
|
7721
|
-
},
|
|
7720
|
+
}, ve(y), 9, qC))
|
|
7722
7721
|
])) : (k(), Q("div", {
|
|
7723
7722
|
key: 0,
|
|
7724
7723
|
"data-testid": `${h}-no-value`
|
|
@@ -7819,8 +7818,8 @@ const GC = {
|
|
|
7819
7818
|
E(I), d.value = !0;
|
|
7820
7819
|
} else y != null && y.value && (m.value = y.value);
|
|
7821
7820
|
}), (T, I) => {
|
|
7822
|
-
const O = Ae("
|
|
7823
|
-
return l.value ? (k(), H(
|
|
7821
|
+
const O = Ae("KRadio"), M = Ae("KCard");
|
|
7822
|
+
return l.value ? (k(), H(M, {
|
|
7824
7823
|
key: 0,
|
|
7825
7824
|
class: "redis-config-card",
|
|
7826
7825
|
"data-testid": "redis-config-card",
|
|
@@ -7828,29 +7827,19 @@ const GC = {
|
|
|
7828
7827
|
}, {
|
|
7829
7828
|
default: F(() => [
|
|
7830
7829
|
J("div", GC, [
|
|
7831
|
-
N(
|
|
7830
|
+
N(O, {
|
|
7832
7831
|
modelValue: d.value,
|
|
7833
|
-
"onUpdate:modelValue": I[0] || (I[0] = (
|
|
7832
|
+
"onUpdate:modelValue": I[0] || (I[0] = (b) => d.value = b),
|
|
7834
7833
|
card: "",
|
|
7835
7834
|
"card-orientation": "horizontal",
|
|
7836
7835
|
"data-testid": "shared-redis-config-radio",
|
|
7837
7836
|
description: p(t)("redis.shared_configuration.description"),
|
|
7838
7837
|
label: p(t)("redis.shared_configuration.label"),
|
|
7839
7838
|
"selected-value": !0
|
|
7840
|
-
},
|
|
7841
|
-
|
|
7842
|
-
N(O, { appearance: "success" }, {
|
|
7843
|
-
default: F(() => [
|
|
7844
|
-
Me(he(p(t)("redis.shared_configuration.badge")), 1)
|
|
7845
|
-
]),
|
|
7846
|
-
_: 1
|
|
7847
|
-
})
|
|
7848
|
-
]),
|
|
7849
|
-
_: 1
|
|
7850
|
-
}, 8, ["modelValue", "description", "label"]),
|
|
7851
|
-
N(M, {
|
|
7839
|
+
}, null, 8, ["modelValue", "description", "label"]),
|
|
7840
|
+
N(O, {
|
|
7852
7841
|
modelValue: d.value,
|
|
7853
|
-
"onUpdate:modelValue": I[1] || (I[1] = (
|
|
7842
|
+
"onUpdate:modelValue": I[1] || (I[1] = (b) => d.value = b),
|
|
7854
7843
|
card: "",
|
|
7855
7844
|
"card-orientation": "horizontal",
|
|
7856
7845
|
"data-testid": "dedicated-redis-config-radio",
|
|
@@ -7860,22 +7849,22 @@ const GC = {
|
|
|
7860
7849
|
}, null, 8, ["modelValue", "description", "label"])
|
|
7861
7850
|
]),
|
|
7862
7851
|
sv(J("div", YC, [
|
|
7863
|
-
J("div", WC,
|
|
7852
|
+
J("div", WC, ve(p(t)("redis.shared_configuration.title")), 1),
|
|
7864
7853
|
J("div", XC, [
|
|
7865
7854
|
N(p(op), {
|
|
7866
7855
|
"data-testid": "redis-config-select-trigger",
|
|
7867
7856
|
"model-value": f.value,
|
|
7868
7857
|
"redis-type": p(s),
|
|
7869
|
-
onErrorChange: I[2] || (I[2] = (
|
|
7858
|
+
onErrorChange: I[2] || (I[2] = (b) => w.value = b),
|
|
7870
7859
|
onToast: p(o),
|
|
7871
|
-
"onUpdate:modelValue": I[3] || (I[3] = (
|
|
7860
|
+
"onUpdate:modelValue": I[3] || (I[3] = (b) => E(b))
|
|
7872
7861
|
}, null, 8, ["model-value", "redis-type", "onToast"])
|
|
7873
7862
|
]),
|
|
7874
7863
|
u.value ? (k(), H(UC, {
|
|
7875
7864
|
key: 0,
|
|
7876
7865
|
"config-fields": u.value
|
|
7877
7866
|
}, null, 8, ["config-fields"])) : Ee("", !0),
|
|
7878
|
-
w.value ? (k(), Q("p", ZC,
|
|
7867
|
+
w.value ? (k(), Q("p", ZC, ve(w.value ? p(c)(w.value) : p(t)("redis.shared_configuration.error")), 1)) : Ee("", !0)
|
|
7879
7868
|
], 512), [
|
|
7880
7869
|
[lv, d.value]
|
|
7881
7870
|
]),
|
|
@@ -7894,7 +7883,7 @@ const GC = {
|
|
|
7894
7883
|
}), null, 16, ["fields-order", "name"]));
|
|
7895
7884
|
};
|
|
7896
7885
|
}
|
|
7897
|
-
}), nm = /* @__PURE__ */ je(JC, [["__scopeId", "data-v-
|
|
7886
|
+
}), nm = /* @__PURE__ */ je(JC, [["__scopeId", "data-v-ebd169c8"]]), QC = /* @__PURE__ */ _e({
|
|
7898
7887
|
__name: "RedisField",
|
|
7899
7888
|
setup(e) {
|
|
7900
7889
|
const { formData: t } = lt();
|
|
@@ -8038,7 +8027,7 @@ const GC = {
|
|
|
8038
8027
|
"tooltip-attributes": p(r).labelAttributes.tooltipAttributes
|
|
8039
8028
|
}), at({
|
|
8040
8029
|
default: F(() => [
|
|
8041
|
-
Me(
|
|
8030
|
+
Me(ve(p(r).label) + " ", 1)
|
|
8042
8031
|
]),
|
|
8043
8032
|
_: 2
|
|
8044
8033
|
}, [
|
|
@@ -8092,8 +8081,8 @@ const GC = {
|
|
|
8092
8081
|
var I, O;
|
|
8093
8082
|
return (I = n.formSchema) != null && I.groups ? n.formSchema.groups.reduce(
|
|
8094
8083
|
(M, b) => {
|
|
8095
|
-
var
|
|
8096
|
-
const
|
|
8084
|
+
var j, V;
|
|
8085
|
+
const U = b.fields, A = (V = (j = b.collapsible) == null ? void 0 : j.nestedCollapsible) != null && V.fields ? U.concat(b.collapsible.nestedCollapsible.fields) : U;
|
|
8097
8086
|
return M.concat(A);
|
|
8098
8087
|
},
|
|
8099
8088
|
[]
|
|
@@ -8153,7 +8142,7 @@ const GC = {
|
|
|
8153
8142
|
type: "set",
|
|
8154
8143
|
elements: {
|
|
8155
8144
|
type: "string",
|
|
8156
|
-
one_of: b.values.map((
|
|
8145
|
+
one_of: b.values.map((U) => U.value)
|
|
8157
8146
|
},
|
|
8158
8147
|
default: [...b.default]
|
|
8159
8148
|
}
|
|
@@ -8196,10 +8185,10 @@ const GC = {
|
|
|
8196
8185
|
function C() {
|
|
8197
8186
|
if (!_.value) return;
|
|
8198
8187
|
const { getInnerData: I, setInnerData: O } = _.value, b = { ...I() };
|
|
8199
|
-
v.value ? g.value.forEach((
|
|
8200
|
-
b[
|
|
8201
|
-
}) : g.value.forEach((
|
|
8202
|
-
b[
|
|
8188
|
+
v.value ? g.value.forEach((U) => {
|
|
8189
|
+
b[U] = y.value[U] ?? null;
|
|
8190
|
+
}) : g.value.forEach((U) => {
|
|
8191
|
+
b[U] = null;
|
|
8203
8192
|
}), S = !0, O(b), mt(() => {
|
|
8204
8193
|
S = !1;
|
|
8205
8194
|
});
|
|
@@ -8235,8 +8224,8 @@ const GC = {
|
|
|
8235
8224
|
[p(jo)]: F(() => [
|
|
8236
8225
|
N(ra, {
|
|
8237
8226
|
match: ({ path: b }) => {
|
|
8238
|
-
var
|
|
8239
|
-
return b === ((A = (
|
|
8227
|
+
var U, A;
|
|
8228
|
+
return b === ((A = (U = p(o)) == null ? void 0 : U.redisPath) == null ? void 0 : A.value);
|
|
8240
8229
|
}
|
|
8241
8230
|
}, {
|
|
8242
8231
|
default: F(() => [
|
|
@@ -10027,19 +10016,19 @@ const OA = {
|
|
|
10027
10016
|
});
|
|
10028
10017
|
Sr.editor.setModelMarkers(E, ws, []), o ? a(T) : r.config = T, s("change", T);
|
|
10029
10018
|
} catch (T) {
|
|
10030
|
-
const { message: I, mark: O } = T, { line: M, column: b } = O || { line: 0, column: 0 },
|
|
10019
|
+
const { message: I, mark: O } = T, { line: M, column: b } = O || { line: 0, column: 0 }, U = I.split(`
|
|
10031
10020
|
`)[0], A = [
|
|
10032
10021
|
{
|
|
10033
10022
|
startLineNumber: M + 1,
|
|
10034
10023
|
startColumn: b + 1,
|
|
10035
10024
|
endLineNumber: M + 1,
|
|
10036
10025
|
endColumn: b + 2,
|
|
10037
|
-
message:
|
|
10026
|
+
message: U,
|
|
10038
10027
|
severity: Sr.MarkerSeverity.Error,
|
|
10039
10028
|
source: ws
|
|
10040
10029
|
}
|
|
10041
10030
|
];
|
|
10042
|
-
Sr.editor.setModelMarkers(E, ws, A), s("error",
|
|
10031
|
+
Sr.editor.setModelMarkers(E, ws, A), s("error", U);
|
|
10043
10032
|
}
|
|
10044
10033
|
});
|
|
10045
10034
|
}), hr(() => {
|
|
@@ -10054,7 +10043,7 @@ const OA = {
|
|
|
10054
10043
|
]),
|
|
10055
10044
|
default: F(() => [
|
|
10056
10045
|
J("div", FA, [
|
|
10057
|
-
Me(
|
|
10046
|
+
Me(ve(p(i)("plugins.free-form.datakit.description_example")) + " ", 1),
|
|
10058
10047
|
(k(!0), Q(Be, null, Ze(w.value, (x, T) => (k(), H(p(Cn), {
|
|
10059
10048
|
key: T,
|
|
10060
10049
|
appearance: "secondary",
|
|
@@ -10062,7 +10051,7 @@ const OA = {
|
|
|
10062
10051
|
onClick: (I) => _(T)
|
|
10063
10052
|
}, {
|
|
10064
10053
|
default: F(() => [
|
|
10065
|
-
Me(
|
|
10054
|
+
Me(ve(p(i)(`plugins.free-form.datakit.examples.${T}`)), 1)
|
|
10066
10055
|
]),
|
|
10067
10056
|
_: 2
|
|
10068
10057
|
}, 1032, ["onClick"]))), 128))
|
|
@@ -10079,7 +10068,7 @@ const OA = {
|
|
|
10079
10068
|
onProceed: y
|
|
10080
10069
|
}, {
|
|
10081
10070
|
default: F(() => [
|
|
10082
|
-
Me(
|
|
10071
|
+
Me(ve(p(i)("plugins.free-form.datakit.detected_config_format", { format: h.value })), 1)
|
|
10083
10072
|
]),
|
|
10084
10073
|
_: 1
|
|
10085
10074
|
}, 8, ["action-button-text", "title", "visible"])
|
|
@@ -10532,37 +10521,37 @@ function pI({ state: e, groupMapById: t, getNodeById: n, history: o }) {
|
|
|
10532
10521
|
return !(!b || Jt(b.type) || b.phase !== O.phase);
|
|
10533
10522
|
}
|
|
10534
10523
|
function c(O, M) {
|
|
10535
|
-
const b = [],
|
|
10524
|
+
const b = [], U = /* @__PURE__ */ new Set();
|
|
10536
10525
|
for (const A of M)
|
|
10537
|
-
|
|
10526
|
+
U.has(A) || (U.add(A), d(O, A) && b.push(A));
|
|
10538
10527
|
return b;
|
|
10539
10528
|
}
|
|
10540
10529
|
function f(O, M, b) {
|
|
10541
|
-
const
|
|
10542
|
-
return u(
|
|
10530
|
+
const U = n(O);
|
|
10531
|
+
return u(U, M) ? c(U, b) : [];
|
|
10543
10532
|
}
|
|
10544
10533
|
function m(O, M, b) {
|
|
10545
|
-
const
|
|
10546
|
-
b.length > 0 ? A ? (A.phase !== O.phase && (A.phase = O.phase), gl(A.memberIds, b) || (A.position = void 0, A.dimensions = void 0, A.memberIds = [...b])) : e.value.groups.push(Qm(O.id, M, O.phase, b)) : A && (e.value.groups = e.value.groups.filter((
|
|
10534
|
+
const U = hl(O.id, M), A = t.value.get(U);
|
|
10535
|
+
b.length > 0 ? A ? (A.phase !== O.phase && (A.phase = O.phase), gl(A.memberIds, b) || (A.position = void 0, A.dimensions = void 0, A.memberIds = [...b])) : e.value.groups.push(Qm(O.id, M, O.phase, b)) : A && (e.value.groups = e.value.groups.filter((j) => j.id !== U));
|
|
10547
10536
|
}
|
|
10548
|
-
function h(O, M, b,
|
|
10537
|
+
function h(O, M, b, U = {}) {
|
|
10549
10538
|
const A = n(O);
|
|
10550
10539
|
if (!u(A, M)) return !1;
|
|
10551
|
-
const
|
|
10552
|
-
if (gl(V,
|
|
10540
|
+
const j = c(A, b), V = ks(A, M);
|
|
10541
|
+
if (gl(V, j)) return !1;
|
|
10553
10542
|
const ue = A.config ?? (A.config = {});
|
|
10554
|
-
return
|
|
10543
|
+
return j.length > 0 ? ue[M] = [...j] : (delete ue[M], Object.keys(ue).length === 0 && delete A.config), m(A, M, j), (U.commit ?? !0) && o.commit(U.tag), !0;
|
|
10555
10544
|
}
|
|
10556
10545
|
function g(O, M = {}) {
|
|
10557
|
-
const b = e.value.groups.filter((
|
|
10546
|
+
const b = e.value.groups.filter((U) => U.ownerId !== O);
|
|
10558
10547
|
return b.length === e.value.groups.length ? !1 : (e.value.groups = b, (M.commit ?? !0) && o.commit(M.tag), !0);
|
|
10559
10548
|
}
|
|
10560
10549
|
function y(O, M) {
|
|
10561
10550
|
const b = t.value.get(hl(O, M));
|
|
10562
10551
|
if (b)
|
|
10563
10552
|
return [...b.memberIds];
|
|
10564
|
-
const
|
|
10565
|
-
return
|
|
10553
|
+
const U = n(O);
|
|
10554
|
+
return U ? ks(U, M) : [];
|
|
10566
10555
|
}
|
|
10567
10556
|
function v(O) {
|
|
10568
10557
|
return i.value.get(O);
|
|
@@ -10577,44 +10566,44 @@ function pI({ state: e, groupMapById: t, getNodeById: n, history: o }) {
|
|
|
10577
10566
|
function _(O, M) {
|
|
10578
10567
|
const b = w(M);
|
|
10579
10568
|
if (b.length === 0) return !1;
|
|
10580
|
-
const
|
|
10581
|
-
return
|
|
10569
|
+
const U = new Set(w(O));
|
|
10570
|
+
return U.size === 0 ? !0 : b.some((A) => !U.has(A));
|
|
10582
10571
|
}
|
|
10583
10572
|
function S(O, M) {
|
|
10584
10573
|
if (O === M) return !0;
|
|
10585
|
-
const b = /* @__PURE__ */ new Set(),
|
|
10586
|
-
for (;
|
|
10587
|
-
const A =
|
|
10574
|
+
const b = /* @__PURE__ */ new Set(), U = [M];
|
|
10575
|
+
for (; U.length > 0; ) {
|
|
10576
|
+
const A = U.pop();
|
|
10588
10577
|
if (b.has(A)) continue;
|
|
10589
10578
|
if (b.add(A), A === O) return !0;
|
|
10590
|
-
const
|
|
10591
|
-
if (
|
|
10592
|
-
for (const V of
|
|
10593
|
-
b.has(V) ||
|
|
10579
|
+
const j = l.value.get(A);
|
|
10580
|
+
if (j)
|
|
10581
|
+
for (const V of j)
|
|
10582
|
+
b.has(V) || U.push(V);
|
|
10594
10583
|
}
|
|
10595
10584
|
return !1;
|
|
10596
10585
|
}
|
|
10597
|
-
function C(O, M, b,
|
|
10586
|
+
function C(O, M, b, U = {}) {
|
|
10598
10587
|
const A = n(O);
|
|
10599
10588
|
if (!A || !u(A, M) || !d(A, b) || S(O, b)) return !1;
|
|
10600
|
-
const
|
|
10601
|
-
if (
|
|
10589
|
+
const j = ks(A, M);
|
|
10590
|
+
if (j.includes(b)) return !1;
|
|
10602
10591
|
E(b, { commit: !1 });
|
|
10603
|
-
const V = [...
|
|
10604
|
-
return h(O, M, V, { commit: !1 }) ? ((
|
|
10592
|
+
const V = [...j, b];
|
|
10593
|
+
return h(O, M, V, { commit: !1 }) ? ((U.commit ?? !0) && o.commit(U.tag), !0) : !1;
|
|
10605
10594
|
}
|
|
10606
10595
|
function E(O, M = {}) {
|
|
10607
10596
|
const b = v(O);
|
|
10608
10597
|
if (!b) return !1;
|
|
10609
|
-
const
|
|
10610
|
-
return A.length ===
|
|
10598
|
+
const U = y(b.ownerId, b.branch), A = U.filter((j) => j !== O);
|
|
10599
|
+
return A.length === U.length ? !1 : h(b.ownerId, b.branch, A, M);
|
|
10611
10600
|
}
|
|
10612
10601
|
function x(O) {
|
|
10613
10602
|
let M = 0;
|
|
10614
10603
|
const b = /* @__PURE__ */ new Set();
|
|
10615
|
-
let
|
|
10616
|
-
for (;
|
|
10617
|
-
M += 1, b.add(
|
|
10604
|
+
let U = r.value.get(O);
|
|
10605
|
+
for (; U && !b.has(U.id); )
|
|
10606
|
+
M += 1, b.add(U.id), U = r.value.get(U.ownerId);
|
|
10618
10607
|
return M;
|
|
10619
10608
|
}
|
|
10620
10609
|
function T(O) {
|
|
@@ -10754,17 +10743,17 @@ function vd(e, t) {
|
|
|
10754
10743
|
continue;
|
|
10755
10744
|
}
|
|
10756
10745
|
const b = [];
|
|
10757
|
-
for (const
|
|
10758
|
-
if (typeof
|
|
10746
|
+
for (const U of M) {
|
|
10747
|
+
if (typeof U != "string")
|
|
10759
10748
|
continue;
|
|
10760
|
-
const A = u.get(
|
|
10749
|
+
const A = u.get(U);
|
|
10761
10750
|
A && !Jt(A.type) && b.push(A.id);
|
|
10762
10751
|
}
|
|
10763
10752
|
if (b.length) {
|
|
10764
10753
|
I[O] = b;
|
|
10765
|
-
const
|
|
10754
|
+
const U = Gr(x.name, O), A = a.get(U), j = A ? {
|
|
10766
10755
|
position: $n(A.position)
|
|
10767
|
-
} : void 0, V = Qm(x.id, O, x.phase, b,
|
|
10756
|
+
} : void 0, V = Qm(x.id, O, x.phase, b, j);
|
|
10768
10757
|
d.push(V), !A && !h && (h = !0);
|
|
10769
10758
|
} else
|
|
10770
10759
|
delete I[O], a.has(Gr(x.name, O)) && (h = !0);
|
|
@@ -11055,7 +11044,7 @@ const [ng, CI] = ql(
|
|
|
11055
11044
|
function b(Z) {
|
|
11056
11045
|
return g.value.get(Z);
|
|
11057
11046
|
}
|
|
11058
|
-
function
|
|
11047
|
+
function U(Z) {
|
|
11059
11048
|
return v.value.get(Z);
|
|
11060
11049
|
}
|
|
11061
11050
|
function A(Z) {
|
|
@@ -11063,11 +11052,11 @@ const [ng, CI] = ql(
|
|
|
11063
11052
|
return [];
|
|
11064
11053
|
const ie = [];
|
|
11065
11054
|
return w.value.get(Z).forEach((ye) => {
|
|
11066
|
-
const Te =
|
|
11055
|
+
const Te = U(ye);
|
|
11067
11056
|
Te && ie.push(Te);
|
|
11068
11057
|
}), ie;
|
|
11069
11058
|
}
|
|
11070
|
-
function
|
|
11059
|
+
function j(Z) {
|
|
11071
11060
|
return A(Z).filter((ie) => ie.target === Z);
|
|
11072
11061
|
}
|
|
11073
11062
|
function V(Z) {
|
|
@@ -11079,10 +11068,10 @@ const [ng, CI] = ql(
|
|
|
11079
11068
|
function de(Z) {
|
|
11080
11069
|
i.value = Z;
|
|
11081
11070
|
}
|
|
11082
|
-
function
|
|
11071
|
+
function q(Z) {
|
|
11083
11072
|
r.value = Z;
|
|
11084
11073
|
}
|
|
11085
|
-
function
|
|
11074
|
+
function z(Z) {
|
|
11086
11075
|
if (Jt(Z.type))
|
|
11087
11076
|
throw new Error("[createNode] implicit nodes are fixed.");
|
|
11088
11077
|
return tg({
|
|
@@ -11096,7 +11085,7 @@ const [ng, CI] = ql(
|
|
|
11096
11085
|
});
|
|
11097
11086
|
}
|
|
11098
11087
|
function P(Z, ie = !0) {
|
|
11099
|
-
const ye =
|
|
11088
|
+
const ye = z(Z);
|
|
11100
11089
|
if (ye)
|
|
11101
11090
|
return o.value.nodes.push(ye), ie && l.commit(), u.value = !0, ye.id;
|
|
11102
11091
|
}
|
|
@@ -11194,7 +11183,7 @@ const [ng, CI] = ql(
|
|
|
11194
11183
|
const ft = T();
|
|
11195
11184
|
ft.ok || console.warn("[removeField] topology invalid:", ft.errors.join("; ")), Te && l.commit();
|
|
11196
11185
|
}
|
|
11197
|
-
function
|
|
11186
|
+
function he(Z, ie = !0) {
|
|
11198
11187
|
const ye = E(Z), Te = x(ye);
|
|
11199
11188
|
if (!Te.ok) {
|
|
11200
11189
|
console.warn(
|
|
@@ -11213,7 +11202,7 @@ const [ng, CI] = ql(
|
|
|
11213
11202
|
return ie && l.commit(), re.id;
|
|
11214
11203
|
}
|
|
11215
11204
|
function D(Z, ie, ye = !0) {
|
|
11216
|
-
$(Z, !1),
|
|
11205
|
+
$(Z, !1), he(ie, !1), ye && l.commit();
|
|
11217
11206
|
}
|
|
11218
11207
|
function $(Z, ie = !0) {
|
|
11219
11208
|
const ye = o.value.edges.findIndex((Ie) => Ie.id === Z);
|
|
@@ -11231,7 +11220,7 @@ const [ng, CI] = ql(
|
|
|
11231
11220
|
ie && l.commit();
|
|
11232
11221
|
}
|
|
11233
11222
|
function L(Z, ie = !0) {
|
|
11234
|
-
const ye =
|
|
11223
|
+
const ye = j(Z);
|
|
11235
11224
|
for (const Te of ye)
|
|
11236
11225
|
$(Te.id, !1);
|
|
11237
11226
|
ie && l.commit();
|
|
@@ -11357,15 +11346,15 @@ const [ng, CI] = ql(
|
|
|
11357
11346
|
groupMapById: _,
|
|
11358
11347
|
getNodeById: M,
|
|
11359
11348
|
getNodeByName: b,
|
|
11360
|
-
getEdgeById:
|
|
11349
|
+
getEdgeById: U,
|
|
11361
11350
|
getEdgesByNodeId: A,
|
|
11362
|
-
getInEdgesByNodeId:
|
|
11351
|
+
getInEdgesByNodeId: j,
|
|
11363
11352
|
getOutEdgesByNodeId: V,
|
|
11364
11353
|
selectedNode: ue,
|
|
11365
11354
|
selectNode: de,
|
|
11366
|
-
selectPortalEdge:
|
|
11355
|
+
selectPortalEdge: q,
|
|
11367
11356
|
// node ops
|
|
11368
|
-
createNode:
|
|
11357
|
+
createNode: z,
|
|
11369
11358
|
addNode: P,
|
|
11370
11359
|
duplicateNode: K,
|
|
11371
11360
|
removeNode: ee,
|
|
@@ -11381,7 +11370,7 @@ const [ng, CI] = ql(
|
|
|
11381
11370
|
renameField: X,
|
|
11382
11371
|
removeField: fe,
|
|
11383
11372
|
// edge ops
|
|
11384
|
-
connectEdge:
|
|
11373
|
+
connectEdge: he,
|
|
11385
11374
|
replaceConnection: D,
|
|
11386
11375
|
disconnectEdge: $,
|
|
11387
11376
|
disconnectInEdges: L,
|
|
@@ -12483,7 +12472,7 @@ function SN() {
|
|
|
12483
12472
|
(T = i[C[x].identifier]) && (xs(S), T("end", S, C[x]));
|
|
12484
12473
|
}
|
|
12485
12474
|
function _(S, C, E, x, T, I) {
|
|
12486
|
-
var O = r.copy(), M = bn(I || E, C), b,
|
|
12475
|
+
var O = r.copy(), M = bn(I || E, C), b, U, A;
|
|
12487
12476
|
if ((A = n.call(S, new wl("beforestart", {
|
|
12488
12477
|
sourceEvent: E,
|
|
12489
12478
|
target: f,
|
|
@@ -12495,16 +12484,16 @@ function SN() {
|
|
|
12495
12484
|
dy: 0,
|
|
12496
12485
|
dispatch: O
|
|
12497
12486
|
}), x)) != null)
|
|
12498
|
-
return b = A.x - M[0] || 0,
|
|
12499
|
-
var
|
|
12487
|
+
return b = A.x - M[0] || 0, U = A.y - M[1] || 0, function j(V, ue, de) {
|
|
12488
|
+
var q = M, z;
|
|
12500
12489
|
switch (V) {
|
|
12501
12490
|
case "start":
|
|
12502
|
-
i[T] =
|
|
12491
|
+
i[T] = j, z = a++;
|
|
12503
12492
|
break;
|
|
12504
12493
|
case "end":
|
|
12505
12494
|
delete i[T], --a;
|
|
12506
12495
|
case "drag":
|
|
12507
|
-
M = bn(de || ue, C),
|
|
12496
|
+
M = bn(de || ue, C), z = a;
|
|
12508
12497
|
break;
|
|
12509
12498
|
}
|
|
12510
12499
|
O.call(
|
|
@@ -12515,11 +12504,11 @@ function SN() {
|
|
|
12515
12504
|
subject: A,
|
|
12516
12505
|
target: f,
|
|
12517
12506
|
identifier: T,
|
|
12518
|
-
active:
|
|
12507
|
+
active: z,
|
|
12519
12508
|
x: M[0] + b,
|
|
12520
|
-
y: M[1] +
|
|
12521
|
-
dx: M[0] -
|
|
12522
|
-
dy: M[1] -
|
|
12509
|
+
y: M[1] + U,
|
|
12510
|
+
dx: M[0] - q[0],
|
|
12511
|
+
dy: M[1] - q[1],
|
|
12523
12512
|
dispatch: O
|
|
12524
12513
|
}),
|
|
12525
12514
|
x
|
|
@@ -13737,56 +13726,56 @@ function yO(e, t, n) {
|
|
|
13737
13726
|
function _O() {
|
|
13738
13727
|
var e = mO, t = gO, n = yO, o = hO, i = vO, r = [0, 1 / 0], a = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], s = 250, l = Wr, u = Xa("start", "zoom", "end"), d, c, f, m = 500, h = 150, g = 0, y = 10;
|
|
13739
13728
|
function v(A) {
|
|
13740
|
-
A.property("__zoom", Fd).on("wheel.zoom", T, { passive: !1 }).on("mousedown.zoom", I).on("dblclick.zoom", O).filter(i).on("touchstart.zoom", M).on("touchmove.zoom", b).on("touchend.zoom touchcancel.zoom",
|
|
13729
|
+
A.property("__zoom", Fd).on("wheel.zoom", T, { passive: !1 }).on("mousedown.zoom", I).on("dblclick.zoom", O).filter(i).on("touchstart.zoom", M).on("touchmove.zoom", b).on("touchend.zoom touchcancel.zoom", U).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
|
|
13741
13730
|
}
|
|
13742
|
-
v.transform = function(A,
|
|
13731
|
+
v.transform = function(A, j, V, ue) {
|
|
13743
13732
|
var de = A.selection ? A.selection() : A;
|
|
13744
|
-
de.property("__zoom", Fd), A !== de ? C(A,
|
|
13745
|
-
E(this, arguments).event(ue).start().zoom(null, typeof
|
|
13733
|
+
de.property("__zoom", Fd), A !== de ? C(A, j, V, ue) : de.interrupt().each(function() {
|
|
13734
|
+
E(this, arguments).event(ue).start().zoom(null, typeof j == "function" ? j.apply(this, arguments) : j).end();
|
|
13746
13735
|
});
|
|
13747
|
-
}, v.scaleBy = function(A,
|
|
13736
|
+
}, v.scaleBy = function(A, j, V, ue) {
|
|
13748
13737
|
v.scaleTo(A, function() {
|
|
13749
|
-
var de = this.__zoom.k,
|
|
13750
|
-
return de *
|
|
13738
|
+
var de = this.__zoom.k, q = typeof j == "function" ? j.apply(this, arguments) : j;
|
|
13739
|
+
return de * q;
|
|
13751
13740
|
}, V, ue);
|
|
13752
|
-
}, v.scaleTo = function(A,
|
|
13741
|
+
}, v.scaleTo = function(A, j, V, ue) {
|
|
13753
13742
|
v.transform(A, function() {
|
|
13754
|
-
var de = t.apply(this, arguments),
|
|
13755
|
-
return n(_(w(
|
|
13743
|
+
var de = t.apply(this, arguments), q = this.__zoom, z = V == null ? S(de) : typeof V == "function" ? V.apply(this, arguments) : V, P = q.invert(z), K = typeof j == "function" ? j.apply(this, arguments) : j;
|
|
13744
|
+
return n(_(w(q, K), z, P), de, a);
|
|
13756
13745
|
}, V, ue);
|
|
13757
|
-
}, v.translateBy = function(A,
|
|
13746
|
+
}, v.translateBy = function(A, j, V, ue) {
|
|
13758
13747
|
v.transform(A, function() {
|
|
13759
13748
|
return n(this.__zoom.translate(
|
|
13760
|
-
typeof
|
|
13749
|
+
typeof j == "function" ? j.apply(this, arguments) : j,
|
|
13761
13750
|
typeof V == "function" ? V.apply(this, arguments) : V
|
|
13762
13751
|
), t.apply(this, arguments), a);
|
|
13763
13752
|
}, null, ue);
|
|
13764
|
-
}, v.translateTo = function(A,
|
|
13753
|
+
}, v.translateTo = function(A, j, V, ue, de) {
|
|
13765
13754
|
v.transform(A, function() {
|
|
13766
|
-
var
|
|
13767
|
-
return n(_i.translate(P[0], P[1]).scale(
|
|
13768
|
-
typeof
|
|
13755
|
+
var q = t.apply(this, arguments), z = this.__zoom, P = ue == null ? S(q) : typeof ue == "function" ? ue.apply(this, arguments) : ue;
|
|
13756
|
+
return n(_i.translate(P[0], P[1]).scale(z.k).translate(
|
|
13757
|
+
typeof j == "function" ? -j.apply(this, arguments) : -j,
|
|
13769
13758
|
typeof V == "function" ? -V.apply(this, arguments) : -V
|
|
13770
|
-
),
|
|
13759
|
+
), q, a);
|
|
13771
13760
|
}, ue, de);
|
|
13772
13761
|
};
|
|
13773
|
-
function w(A,
|
|
13774
|
-
return
|
|
13762
|
+
function w(A, j) {
|
|
13763
|
+
return j = Math.max(r[0], Math.min(r[1], j)), j === A.k ? A : new Mn(j, A.x, A.y);
|
|
13775
13764
|
}
|
|
13776
|
-
function _(A,
|
|
13777
|
-
var ue =
|
|
13765
|
+
function _(A, j, V) {
|
|
13766
|
+
var ue = j[0] - V[0] * A.k, de = j[1] - V[1] * A.k;
|
|
13778
13767
|
return ue === A.x && de === A.y ? A : new Mn(A.k, ue, de);
|
|
13779
13768
|
}
|
|
13780
13769
|
function S(A) {
|
|
13781
13770
|
return [(+A[0][0] + +A[1][0]) / 2, (+A[0][1] + +A[1][1]) / 2];
|
|
13782
13771
|
}
|
|
13783
|
-
function C(A,
|
|
13772
|
+
function C(A, j, V, ue) {
|
|
13784
13773
|
A.on("start.zoom", function() {
|
|
13785
13774
|
E(this, arguments).event(ue).start();
|
|
13786
13775
|
}).on("interrupt.zoom end.zoom", function() {
|
|
13787
13776
|
E(this, arguments).event(ue).end();
|
|
13788
13777
|
}).tween("zoom", function() {
|
|
13789
|
-
var de = this,
|
|
13778
|
+
var de = this, q = arguments, z = E(de, q).event(ue), P = t.apply(de, q), K = V == null ? S(P) : typeof V == "function" ? V.apply(de, q) : V, ee = Math.max(P[1][0] - P[0][0], P[1][1] - P[0][1]), ae = de.__zoom, ne = typeof j == "function" ? j.apply(de, q) : j, Y = l(ae.invert(K).concat(ee / ae.k), ne.invert(K).concat(ee / ne.k));
|
|
13790
13779
|
return function(ge) {
|
|
13791
13780
|
if (ge === 1)
|
|
13792
13781
|
ge = ne;
|
|
@@ -13794,15 +13783,15 @@ function _O() {
|
|
|
13794
13783
|
var we = Y(ge), Se = ee / we[2];
|
|
13795
13784
|
ge = new Mn(Se, K[0] - we[0] * Se, K[1] - we[1] * Se);
|
|
13796
13785
|
}
|
|
13797
|
-
|
|
13786
|
+
z.zoom(null, ge);
|
|
13798
13787
|
};
|
|
13799
13788
|
});
|
|
13800
13789
|
}
|
|
13801
|
-
function E(A,
|
|
13802
|
-
return !V && A.__zooming || new x(A,
|
|
13790
|
+
function E(A, j, V) {
|
|
13791
|
+
return !V && A.__zooming || new x(A, j);
|
|
13803
13792
|
}
|
|
13804
|
-
function x(A,
|
|
13805
|
-
this.that = A, this.args =
|
|
13793
|
+
function x(A, j) {
|
|
13794
|
+
this.that = A, this.args = j, this.active = 0, this.sourceEvent = null, this.extent = t.apply(A, j), this.taps = 0;
|
|
13806
13795
|
}
|
|
13807
13796
|
x.prototype = {
|
|
13808
13797
|
event: function(A) {
|
|
@@ -13811,14 +13800,14 @@ function _O() {
|
|
|
13811
13800
|
start: function() {
|
|
13812
13801
|
return ++this.active === 1 && (this.that.__zooming = this, this.emit("start")), this;
|
|
13813
13802
|
},
|
|
13814
|
-
zoom: function(A,
|
|
13815
|
-
return this.mouse && A !== "mouse" && (this.mouse[1] =
|
|
13803
|
+
zoom: function(A, j) {
|
|
13804
|
+
return this.mouse && A !== "mouse" && (this.mouse[1] = j.invert(this.mouse[0])), this.touch0 && A !== "touch" && (this.touch0[1] = j.invert(this.touch0[0])), this.touch1 && A !== "touch" && (this.touch1[1] = j.invert(this.touch1[0])), this.that.__zoom = j, this.emit("zoom"), this;
|
|
13816
13805
|
},
|
|
13817
13806
|
end: function() {
|
|
13818
13807
|
return --this.active === 0 && (delete this.that.__zooming, this.emit("end")), this;
|
|
13819
13808
|
},
|
|
13820
13809
|
emit: function(A) {
|
|
13821
|
-
var
|
|
13810
|
+
var j = gn(this.that).datum();
|
|
13822
13811
|
u.call(
|
|
13823
13812
|
A,
|
|
13824
13813
|
this.that,
|
|
@@ -13828,34 +13817,34 @@ function _O() {
|
|
|
13828
13817
|
transform: this.that.__zoom,
|
|
13829
13818
|
dispatch: u
|
|
13830
13819
|
}),
|
|
13831
|
-
|
|
13820
|
+
j
|
|
13832
13821
|
);
|
|
13833
13822
|
}
|
|
13834
13823
|
};
|
|
13835
|
-
function T(A, ...
|
|
13824
|
+
function T(A, ...j) {
|
|
13836
13825
|
if (!e.apply(this, arguments))
|
|
13837
13826
|
return;
|
|
13838
|
-
var V = E(this,
|
|
13827
|
+
var V = E(this, j).event(A), ue = this.__zoom, de = Math.max(r[0], Math.min(r[1], ue.k * Math.pow(2, o.apply(this, arguments)))), q = bn(A);
|
|
13839
13828
|
if (V.wheel)
|
|
13840
|
-
(V.mouse[0][0] !==
|
|
13829
|
+
(V.mouse[0][0] !== q[0] || V.mouse[0][1] !== q[1]) && (V.mouse[1] = ue.invert(V.mouse[0] = q)), clearTimeout(V.wheel);
|
|
13841
13830
|
else {
|
|
13842
13831
|
if (ue.k === de)
|
|
13843
13832
|
return;
|
|
13844
|
-
V.mouse = [
|
|
13833
|
+
V.mouse = [q, ue.invert(q)], Jr(this), V.start();
|
|
13845
13834
|
}
|
|
13846
|
-
Oi(A), V.wheel = setTimeout(
|
|
13847
|
-
function
|
|
13835
|
+
Oi(A), V.wheel = setTimeout(z, h), V.zoom("mouse", n(_(w(ue, de), V.mouse[0], V.mouse[1]), V.extent, a));
|
|
13836
|
+
function z() {
|
|
13848
13837
|
V.wheel = null, V.end();
|
|
13849
13838
|
}
|
|
13850
13839
|
}
|
|
13851
|
-
function I(A, ...
|
|
13840
|
+
function I(A, ...j) {
|
|
13852
13841
|
if (f || !e.apply(this, arguments))
|
|
13853
13842
|
return;
|
|
13854
|
-
var V = A.currentTarget, ue = E(this,
|
|
13855
|
-
yg(A.view), Is(A), ue.mouse = [
|
|
13843
|
+
var V = A.currentTarget, ue = E(this, j, !0).event(A), de = gn(A.view).on("mousemove.zoom", K, !0).on("mouseup.zoom", ee, !0), q = bn(A, V), z = A.clientX, P = A.clientY;
|
|
13844
|
+
yg(A.view), Is(A), ue.mouse = [q, this.__zoom.invert(q)], Jr(this), ue.start();
|
|
13856
13845
|
function K(ae) {
|
|
13857
13846
|
if (Oi(ae), !ue.moved) {
|
|
13858
|
-
var ne = ae.clientX -
|
|
13847
|
+
var ne = ae.clientX - z, Y = ae.clientY - P;
|
|
13859
13848
|
ue.moved = ne * ne + Y * Y > g;
|
|
13860
13849
|
}
|
|
13861
13850
|
ue.event(ae).zoom("mouse", n(_(ue.that.__zoom, ue.mouse[0] = bn(ae, V), ue.mouse[1]), ue.extent, a));
|
|
@@ -13864,47 +13853,47 @@ function _O() {
|
|
|
13864
13853
|
de.on("mousemove.zoom mouseup.zoom", null), _g(ae.view, ue.moved), Oi(ae), ue.event(ae).end();
|
|
13865
13854
|
}
|
|
13866
13855
|
}
|
|
13867
|
-
function O(A, ...
|
|
13856
|
+
function O(A, ...j) {
|
|
13868
13857
|
if (e.apply(this, arguments)) {
|
|
13869
|
-
var V = this.__zoom, ue = bn(A.changedTouches ? A.changedTouches[0] : A, this), de = V.invert(ue),
|
|
13870
|
-
Oi(A), s > 0 ? gn(this).transition().duration(s).call(C,
|
|
13858
|
+
var V = this.__zoom, ue = bn(A.changedTouches ? A.changedTouches[0] : A, this), de = V.invert(ue), q = V.k * (A.shiftKey ? 0.5 : 2), z = n(_(w(V, q), ue, de), t.apply(this, j), a);
|
|
13859
|
+
Oi(A), s > 0 ? gn(this).transition().duration(s).call(C, z, ue, A) : gn(this).call(v.transform, z, ue, A);
|
|
13871
13860
|
}
|
|
13872
13861
|
}
|
|
13873
|
-
function M(A, ...
|
|
13862
|
+
function M(A, ...j) {
|
|
13874
13863
|
if (e.apply(this, arguments)) {
|
|
13875
|
-
var V = A.touches, ue = V.length, de = E(this,
|
|
13876
|
-
for (Is(A),
|
|
13877
|
-
P = V[
|
|
13878
|
-
d && (d = clearTimeout(d)),
|
|
13864
|
+
var V = A.touches, ue = V.length, de = E(this, j, A.changedTouches.length === ue).event(A), q, z, P, K;
|
|
13865
|
+
for (Is(A), z = 0; z < ue; ++z)
|
|
13866
|
+
P = V[z], K = bn(P, this), K = [K, this.__zoom.invert(K), P.identifier], de.touch0 ? !de.touch1 && de.touch0[2] !== K[2] && (de.touch1 = K, de.taps = 0) : (de.touch0 = K, q = !0, de.taps = 1 + !!d);
|
|
13867
|
+
d && (d = clearTimeout(d)), q && (de.taps < 2 && (c = K[0], d = setTimeout(function() {
|
|
13879
13868
|
d = null;
|
|
13880
13869
|
}, m)), Jr(this), de.start());
|
|
13881
13870
|
}
|
|
13882
13871
|
}
|
|
13883
|
-
function b(A, ...
|
|
13872
|
+
function b(A, ...j) {
|
|
13884
13873
|
if (this.__zooming) {
|
|
13885
|
-
var V = E(this,
|
|
13886
|
-
for (Oi(A),
|
|
13887
|
-
|
|
13888
|
-
if (
|
|
13874
|
+
var V = E(this, j).event(A), ue = A.changedTouches, de = ue.length, q, z, P, K;
|
|
13875
|
+
for (Oi(A), q = 0; q < de; ++q)
|
|
13876
|
+
z = ue[q], P = bn(z, this), V.touch0 && V.touch0[2] === z.identifier ? V.touch0[0] = P : V.touch1 && V.touch1[2] === z.identifier && (V.touch1[0] = P);
|
|
13877
|
+
if (z = V.that.__zoom, V.touch1) {
|
|
13889
13878
|
var ee = V.touch0[0], ae = V.touch0[1], ne = V.touch1[0], Y = V.touch1[1], ge = (ge = ne[0] - ee[0]) * ge + (ge = ne[1] - ee[1]) * ge, we = (we = Y[0] - ae[0]) * we + (we = Y[1] - ae[1]) * we;
|
|
13890
|
-
|
|
13879
|
+
z = w(z, Math.sqrt(ge / we)), P = [(ee[0] + ne[0]) / 2, (ee[1] + ne[1]) / 2], K = [(ae[0] + Y[0]) / 2, (ae[1] + Y[1]) / 2];
|
|
13891
13880
|
} else if (V.touch0)
|
|
13892
13881
|
P = V.touch0[0], K = V.touch0[1];
|
|
13893
13882
|
else
|
|
13894
13883
|
return;
|
|
13895
|
-
V.zoom("touch", n(_(
|
|
13884
|
+
V.zoom("touch", n(_(z, P, K), V.extent, a));
|
|
13896
13885
|
}
|
|
13897
13886
|
}
|
|
13898
|
-
function
|
|
13887
|
+
function U(A, ...j) {
|
|
13899
13888
|
if (this.__zooming) {
|
|
13900
|
-
var V = E(this,
|
|
13889
|
+
var V = E(this, j).event(A), ue = A.changedTouches, de = ue.length, q, z;
|
|
13901
13890
|
for (Is(A), f && clearTimeout(f), f = setTimeout(function() {
|
|
13902
13891
|
f = null;
|
|
13903
|
-
}, m),
|
|
13904
|
-
|
|
13892
|
+
}, m), q = 0; q < de; ++q)
|
|
13893
|
+
z = ue[q], V.touch0 && V.touch0[2] === z.identifier ? delete V.touch0 : V.touch1 && V.touch1[2] === z.identifier && delete V.touch1;
|
|
13905
13894
|
if (V.touch1 && !V.touch0 && (V.touch0 = V.touch1, delete V.touch1), V.touch0)
|
|
13906
13895
|
V.touch0[1] = this.__zoom.invert(V.touch0[0]);
|
|
13907
|
-
else if (V.end(), V.taps === 2 && (
|
|
13896
|
+
else if (V.end(), V.taps === 2 && (z = bn(z, this), Math.hypot(c[0] - z[0], c[1] - z[1]) < y)) {
|
|
13908
13897
|
var P = gn(this).on("dblclick.zoom");
|
|
13909
13898
|
P && P.apply(this, arguments);
|
|
13910
13899
|
}
|
|
@@ -14902,12 +14891,12 @@ function Jg(e) {
|
|
|
14902
14891
|
addSelectedNodes: w,
|
|
14903
14892
|
updateNodePositions: _,
|
|
14904
14893
|
emits: S
|
|
14905
|
-
} = nt(), { onStart: C, onDrag: E, onStop: x, onClick: T, el: I, disabled: O, id: M, selectable: b, dragHandle:
|
|
14906
|
-
let
|
|
14894
|
+
} = nt(), { onStart: C, onDrag: E, onStop: x, onClick: T, el: I, disabled: O, id: M, selectable: b, dragHandle: U } = e, A = an(!1);
|
|
14895
|
+
let j = [], V, ue = null, de = { x: void 0, y: void 0 }, q = { x: 0, y: 0 }, z = null, P = !1, K = 0, ee = !1;
|
|
14907
14896
|
const ae = nP(), ne = ({ x: X, y: fe }) => {
|
|
14908
14897
|
de = { x: X, y: fe };
|
|
14909
|
-
let
|
|
14910
|
-
if (
|
|
14898
|
+
let he = !1;
|
|
14899
|
+
if (j = j.map((D) => {
|
|
14911
14900
|
const $ = { x: X - D.distance.x, y: fe - D.distance.y }, { computedPosition: L } = Lu(
|
|
14912
14901
|
D,
|
|
14913
14902
|
n.value ? ts($, o.value) : $,
|
|
@@ -14915,32 +14904,32 @@ function Jg(e) {
|
|
|
14915
14904
|
a.value,
|
|
14916
14905
|
D.parentNode ? m(D.parentNode) : void 0
|
|
14917
14906
|
);
|
|
14918
|
-
return
|
|
14919
|
-
}), !!
|
|
14907
|
+
return he = he || D.position.x !== L.x || D.position.y !== L.y, D.position = L, D;
|
|
14908
|
+
}), !!he && (_(j, !0, !0), A.value = !0, z)) {
|
|
14920
14909
|
const [D, $] = Ns({
|
|
14921
14910
|
id: M,
|
|
14922
|
-
dragItems:
|
|
14911
|
+
dragItems: j,
|
|
14923
14912
|
findNode: m
|
|
14924
14913
|
});
|
|
14925
|
-
E({ event:
|
|
14914
|
+
E({ event: z, node: D, nodes: $ });
|
|
14926
14915
|
}
|
|
14927
14916
|
}, Y = () => {
|
|
14928
14917
|
if (!ue)
|
|
14929
14918
|
return;
|
|
14930
|
-
const [X, fe] = Hg(
|
|
14919
|
+
const [X, fe] = Hg(q, ue, d.value);
|
|
14931
14920
|
if (X !== 0 || fe !== 0) {
|
|
14932
|
-
const
|
|
14921
|
+
const he = {
|
|
14933
14922
|
x: (de.x ?? 0) - X / l.value.zoom,
|
|
14934
14923
|
y: (de.y ?? 0) - fe / l.value.zoom
|
|
14935
14924
|
};
|
|
14936
|
-
f({ x: X, y: fe }) && ne(
|
|
14925
|
+
f({ x: X, y: fe }) && ne(he);
|
|
14937
14926
|
}
|
|
14938
14927
|
K = requestAnimationFrame(Y);
|
|
14939
14928
|
}, ge = (X, fe) => {
|
|
14940
14929
|
P = !0;
|
|
14941
|
-
const
|
|
14942
|
-
!y.value && !h.value &&
|
|
14943
|
-
|
|
14930
|
+
const he = m(M);
|
|
14931
|
+
!y.value && !h.value && he && (he.selected || v()), he && De(b) && y.value && $l(
|
|
14932
|
+
he,
|
|
14944
14933
|
h.value,
|
|
14945
14934
|
w,
|
|
14946
14935
|
v,
|
|
@@ -14949,46 +14938,46 @@ function Jg(e) {
|
|
|
14949
14938
|
fe
|
|
14950
14939
|
);
|
|
14951
14940
|
const D = ae(X.sourceEvent);
|
|
14952
|
-
if (de = D,
|
|
14941
|
+
if (de = D, j = MO(r.value, c.value, D, m, M), j.length) {
|
|
14953
14942
|
const [$, L] = Ns({
|
|
14954
14943
|
id: M,
|
|
14955
|
-
dragItems:
|
|
14944
|
+
dragItems: j,
|
|
14956
14945
|
findNode: m
|
|
14957
14946
|
});
|
|
14958
14947
|
C({ event: X.sourceEvent, node: $, nodes: L });
|
|
14959
14948
|
}
|
|
14960
14949
|
}, we = (X, fe) => {
|
|
14961
|
-
var
|
|
14962
|
-
X.sourceEvent.type === "touchmove" && X.sourceEvent.touches.length > 1 || (s.value === 0 && ge(X, fe), de = ae(X.sourceEvent), ue = ((
|
|
14950
|
+
var he;
|
|
14951
|
+
X.sourceEvent.type === "touchmove" && X.sourceEvent.touches.length > 1 || (s.value === 0 && ge(X, fe), de = ae(X.sourceEvent), ue = ((he = t.value) == null ? void 0 : he.getBoundingClientRect()) || null, q = En(X.sourceEvent, ue));
|
|
14963
14952
|
}, Se = (X, fe) => {
|
|
14964
|
-
const
|
|
14953
|
+
const he = ae(X.sourceEvent);
|
|
14965
14954
|
if (!ee && P && u.value && (ee = !0, Y()), !P) {
|
|
14966
|
-
const D =
|
|
14955
|
+
const D = he.xSnapped - (de.x ?? 0), $ = he.ySnapped - (de.y ?? 0);
|
|
14967
14956
|
Math.sqrt(D * D + $ * $) > s.value && ge(X, fe);
|
|
14968
14957
|
}
|
|
14969
|
-
(de.x !==
|
|
14958
|
+
(de.x !== he.xSnapped || de.y !== he.ySnapped) && j.length && P && (z = X.sourceEvent, q = En(X.sourceEvent, ue), ne(he));
|
|
14970
14959
|
}, ce = (X) => {
|
|
14971
14960
|
let fe = !1;
|
|
14972
14961
|
if (!P && !A.value && !h.value) {
|
|
14973
|
-
const
|
|
14974
|
-
B !== 0 && B <= s.value && (T == null || T(
|
|
14962
|
+
const he = X.sourceEvent, D = ae(he), $ = D.xSnapped - (de.x ?? 0), L = D.ySnapped - (de.y ?? 0), B = Math.sqrt($ * $ + L * L);
|
|
14963
|
+
B !== 0 && B <= s.value && (T == null || T(he), fe = !0);
|
|
14975
14964
|
}
|
|
14976
|
-
if (
|
|
14977
|
-
_(
|
|
14978
|
-
const [
|
|
14965
|
+
if (j.length && !fe) {
|
|
14966
|
+
_(j, !1, !1);
|
|
14967
|
+
const [he, D] = Ns({
|
|
14979
14968
|
id: M,
|
|
14980
|
-
dragItems:
|
|
14969
|
+
dragItems: j,
|
|
14981
14970
|
findNode: m
|
|
14982
14971
|
});
|
|
14983
|
-
x({ event: X.sourceEvent, node:
|
|
14972
|
+
x({ event: X.sourceEvent, node: he, nodes: D });
|
|
14984
14973
|
}
|
|
14985
|
-
|
|
14974
|
+
j = [], A.value = !1, ee = !1, P = !1, de = { x: void 0, y: void 0 }, cancelAnimationFrame(K);
|
|
14986
14975
|
};
|
|
14987
|
-
return Le([() => De(O), I], ([X, fe],
|
|
14976
|
+
return Le([() => De(O), I], ([X, fe], he, D) => {
|
|
14988
14977
|
if (fe) {
|
|
14989
14978
|
const $ = gn(fe);
|
|
14990
14979
|
X || (V = SN().on("start", (L) => we(L, fe)).on("drag", (L) => Se(L, fe)).on("end", (L) => ce(L)).filter((L) => {
|
|
14991
|
-
const B = L.target, le = De(
|
|
14980
|
+
const B = L.target, le = De(U);
|
|
14992
14981
|
return !L.button && (!i.value || !Hd(B, `.${i.value}`, fe) && (!le || Hd(B, le, fe)));
|
|
14993
14982
|
}), $.call(V)), D(() => {
|
|
14994
14983
|
$.on(".drag", null), V && (V.on("start", null), V.on("drag", null), V.on("end", null));
|
|
@@ -15089,11 +15078,11 @@ function Qg({
|
|
|
15089
15078
|
isValidConnection: I,
|
|
15090
15079
|
nodeLookup: O
|
|
15091
15080
|
} = nt();
|
|
15092
|
-
let M = null, b = !1,
|
|
15081
|
+
let M = null, b = !1, U = null;
|
|
15093
15082
|
function A(V) {
|
|
15094
15083
|
var ue;
|
|
15095
|
-
const de = De(n) === "target",
|
|
15096
|
-
if (
|
|
15084
|
+
const de = De(n) === "target", q = Ku(V), z = Kd(V.target);
|
|
15085
|
+
if (q && V.button === 0 || !q) {
|
|
15097
15086
|
let P = function(me) {
|
|
15098
15087
|
D = En(me, X), ne = UO(
|
|
15099
15088
|
pr(D, E.value, !1, [1, 1]),
|
|
@@ -15110,7 +15099,7 @@ function Qg({
|
|
|
15110
15099
|
fromHandleId: De(e),
|
|
15111
15100
|
fromType: de ? "target" : "source",
|
|
15112
15101
|
isValidConnection: ae,
|
|
15113
|
-
doc:
|
|
15102
|
+
doc: z,
|
|
15114
15103
|
lib: "vue",
|
|
15115
15104
|
flowId: s,
|
|
15116
15105
|
nodeLookup: O.value
|
|
@@ -15119,7 +15108,7 @@ function Qg({
|
|
|
15119
15108
|
T.value,
|
|
15120
15109
|
y
|
|
15121
15110
|
);
|
|
15122
|
-
|
|
15111
|
+
U = W.handleDomNode, M = W.connection, b = GO(!!ne, W.isValid);
|
|
15123
15112
|
const Z = {
|
|
15124
15113
|
// from stays the same
|
|
15125
15114
|
...G,
|
|
@@ -15140,24 +15129,24 @@ function Qg({
|
|
|
15140
15129
|
) : D,
|
|
15141
15130
|
W.toHandle,
|
|
15142
15131
|
HO(!!ne, b)
|
|
15143
|
-
), G = Z, !ne && !b && !
|
|
15144
|
-
return $s(
|
|
15145
|
-
M && M.source !== M.target &&
|
|
15132
|
+
), G = Z, !ne && !b && !U)
|
|
15133
|
+
return $s(he);
|
|
15134
|
+
M && M.source !== M.target && U && ($s(he), he = U, U.classList.add("connecting", "vue-flow__handle-connecting"), U.classList.toggle("valid", !!b), U.classList.toggle("vue-flow__handle-valid", !!b));
|
|
15146
15135
|
}
|
|
15147
15136
|
}, K = function(me) {
|
|
15148
|
-
(ne ||
|
|
15137
|
+
(ne || U) && M && b && (r ? r(me, M) : C.connect(M)), C.connectEnd(me), i && (a == null || a(me)), $s(he), cancelAnimationFrame(Y), S(me), $ = !1, b = !1, M = null, U = null, z.removeEventListener("mousemove", P), z.removeEventListener("mouseup", K), z.removeEventListener("touchmove", P), z.removeEventListener("touchend", K);
|
|
15149
15138
|
};
|
|
15150
15139
|
const ee = y(De(t));
|
|
15151
15140
|
let ae = De(o) || I.value || Fr;
|
|
15152
15141
|
!ae && ee && (ae = (de ? ee.isValidSourcePos : ee.isValidTargetPos) || Fr);
|
|
15153
15142
|
let ne, Y = 0;
|
|
15154
|
-
const { x: ge, y: we } = En(V), Se =
|
|
15143
|
+
const { x: ge, y: we } = En(V), Se = z == null ? void 0 : z.elementFromPoint(ge, we), ce = Yg(De(i), Se), X = (ue = l.value) == null ? void 0 : ue.getBoundingClientRect();
|
|
15155
15144
|
if (!X || !ce)
|
|
15156
15145
|
return;
|
|
15157
15146
|
const fe = YO(De(t), ce, De(e), O.value, u.value);
|
|
15158
15147
|
if (!fe)
|
|
15159
15148
|
return;
|
|
15160
|
-
let
|
|
15149
|
+
let he, D = En(V, X), $ = !1;
|
|
15161
15150
|
const L = () => {
|
|
15162
15151
|
if (!h.value)
|
|
15163
15152
|
return;
|
|
@@ -15194,14 +15183,14 @@ function Qg({
|
|
|
15194
15183
|
}
|
|
15195
15184
|
), C.connectStart({ event: V, nodeId: De(t), handleId: De(e), handleType: ce });
|
|
15196
15185
|
let G = te;
|
|
15197
|
-
|
|
15186
|
+
z.addEventListener("mousemove", P), z.addEventListener("mouseup", K), z.addEventListener("touchmove", P), z.addEventListener("touchend", K);
|
|
15198
15187
|
}
|
|
15199
15188
|
}
|
|
15200
|
-
function
|
|
15189
|
+
function j(V) {
|
|
15201
15190
|
var ue, de;
|
|
15202
15191
|
if (!c.value)
|
|
15203
15192
|
return;
|
|
15204
|
-
const
|
|
15193
|
+
const q = De(n) === "target";
|
|
15205
15194
|
if (!f.value) {
|
|
15206
15195
|
C.clickConnectStart({ event: V, nodeId: De(t), handleId: De(e) }), w(
|
|
15207
15196
|
{
|
|
@@ -15216,9 +15205,9 @@ function Qg({
|
|
|
15216
15205
|
);
|
|
15217
15206
|
return;
|
|
15218
15207
|
}
|
|
15219
|
-
let
|
|
15208
|
+
let z = De(o) || I.value || Fr;
|
|
15220
15209
|
const P = y(De(t));
|
|
15221
|
-
if (!
|
|
15210
|
+
if (!z && P && (z = (q ? P.isValidSourcePos : P.isValidTargetPos) || Fr), P && (typeof P.connectable > "u" ? m.value : P.connectable) === !1)
|
|
15222
15211
|
return;
|
|
15223
15212
|
const K = Kd(V.target), ee = Wd(
|
|
15224
15213
|
V,
|
|
@@ -15234,7 +15223,7 @@ function Qg({
|
|
|
15234
15223
|
fromNodeId: f.value.nodeId,
|
|
15235
15224
|
fromHandleId: f.value.id ?? null,
|
|
15236
15225
|
fromType: f.value.type,
|
|
15237
|
-
isValidConnection:
|
|
15226
|
+
isValidConnection: z,
|
|
15238
15227
|
doc: K,
|
|
15239
15228
|
lib: "vue",
|
|
15240
15229
|
flowId: s,
|
|
@@ -15248,7 +15237,7 @@ function Qg({
|
|
|
15248
15237
|
}
|
|
15249
15238
|
return {
|
|
15250
15239
|
handlePointerDown: A,
|
|
15251
|
-
handleClick:
|
|
15240
|
+
handleClick: j
|
|
15252
15241
|
};
|
|
15253
15242
|
}
|
|
15254
15243
|
function oP() {
|
|
@@ -15965,7 +15954,7 @@ function pP(e, t, n) {
|
|
|
15965
15954
|
}, b = (D) => {
|
|
15966
15955
|
const $ = D instanceof Function ? D([...e.nodes, ...e.edges]) : D;
|
|
15967
15956
|
!e.initialized && !$.length || (O($.filter(xo)), M($.filter(ro)));
|
|
15968
|
-
},
|
|
15957
|
+
}, U = (D) => {
|
|
15969
15958
|
let $ = D instanceof Function ? D(e.nodes) : D;
|
|
15970
15959
|
$ = Array.isArray($) ? $ : [$];
|
|
15971
15960
|
const L = Zd($, u, e.hooks.error.trigger), B = [];
|
|
@@ -15988,7 +15977,7 @@ function pP(e, t, n) {
|
|
|
15988
15977
|
for (const le of L)
|
|
15989
15978
|
B.push(qd(le));
|
|
15990
15979
|
B.length && e.hooks.edgesChange.trigger(B);
|
|
15991
|
-
},
|
|
15980
|
+
}, j = (D, $ = !0, L = !1) => {
|
|
15992
15981
|
const B = D instanceof Function ? D(e.nodes) : D, le = Array.isArray(B) ? B : [B], oe = [], te = [];
|
|
15993
15982
|
function G(W) {
|
|
15994
15983
|
const Z = s(W);
|
|
@@ -16052,7 +16041,7 @@ function pP(e, t, n) {
|
|
|
16052
16041
|
return;
|
|
16053
16042
|
const le = typeof $ == "function" ? $(B) : $;
|
|
16054
16043
|
B.data = L.replace ? le : { ...B.data, ...le };
|
|
16055
|
-
},
|
|
16044
|
+
}, q = (D) => jd(D, e.nodes), z = (D) => {
|
|
16056
16045
|
const $ = jd(D, e.edges);
|
|
16057
16046
|
return Os(e.connectionLookup, n.value, $), $;
|
|
16058
16047
|
}, P = (D, $, L = { replace: !1 }) => {
|
|
@@ -16131,9 +16120,9 @@ function pP(e, t, n) {
|
|
|
16131
16120
|
setElements: b,
|
|
16132
16121
|
setNodes: O,
|
|
16133
16122
|
setEdges: M,
|
|
16134
|
-
addNodes:
|
|
16123
|
+
addNodes: U,
|
|
16135
16124
|
addEdges: A,
|
|
16136
|
-
removeNodes:
|
|
16125
|
+
removeNodes: j,
|
|
16137
16126
|
removeEdges: V,
|
|
16138
16127
|
findNode: u,
|
|
16139
16128
|
findEdge: d,
|
|
@@ -16141,8 +16130,8 @@ function pP(e, t, n) {
|
|
|
16141
16130
|
updateEdgeData: de,
|
|
16142
16131
|
updateNode: P,
|
|
16143
16132
|
updateNodeData: K,
|
|
16144
|
-
applyEdgeChanges:
|
|
16145
|
-
applyNodeChanges:
|
|
16133
|
+
applyEdgeChanges: z,
|
|
16134
|
+
applyNodeChanges: q,
|
|
16146
16135
|
addSelectedElements: y,
|
|
16147
16136
|
addSelectedNodes: h,
|
|
16148
16137
|
addSelectedEdges: g,
|
|
@@ -16268,13 +16257,13 @@ const mP = ["data-id", "data-handleid", "data-nodeid", "data-handlepos"], gP = {
|
|
|
16268
16257
|
noPanClassName: f
|
|
16269
16258
|
} = nt(), { id: m, node: h, nodeEl: g, connectedEdges: y } = eh(), v = pe(), w = He(() => typeof e.connectableStart < "u" ? e.connectableStart : !0), _ = He(() => typeof e.connectableEnd < "u" ? e.connectableEnd : !0), S = He(
|
|
16270
16259
|
() => {
|
|
16271
|
-
var M, b,
|
|
16272
|
-
return ((M = a.value) == null ? void 0 : M.nodeId) === m && ((b = a.value) == null ? void 0 : b.id) === e.id && ((
|
|
16260
|
+
var M, b, U, A, j, V;
|
|
16261
|
+
return ((M = a.value) == null ? void 0 : M.nodeId) === m && ((b = a.value) == null ? void 0 : b.id) === e.id && ((U = a.value) == null ? void 0 : U.type) === o.value || ((A = l.value) == null ? void 0 : A.nodeId) === m && ((j = l.value) == null ? void 0 : j.id) === e.id && ((V = l.value) == null ? void 0 : V.type) === o.value;
|
|
16273
16262
|
}
|
|
16274
16263
|
), C = He(
|
|
16275
16264
|
() => {
|
|
16276
|
-
var M, b,
|
|
16277
|
-
return ((M = s.value) == null ? void 0 : M.nodeId) === m && ((b = s.value) == null ? void 0 : b.id) === e.id && ((
|
|
16265
|
+
var M, b, U;
|
|
16266
|
+
return ((M = s.value) == null ? void 0 : M.nodeId) === m && ((b = s.value) == null ? void 0 : b.id) === e.id && ((U = s.value) == null ? void 0 : U.type) === o.value;
|
|
16278
16267
|
}
|
|
16279
16268
|
), { handlePointerDown: E, handleClick: x } = Qg({
|
|
16280
16269
|
nodeId: m,
|
|
@@ -16292,17 +16281,17 @@ const mP = ["data-id", "data-handleid", "data-nodeid", "data-handlepos"], gP = {
|
|
|
16292
16281
|
var M;
|
|
16293
16282
|
if (!h.dimensions.width || !h.dimensions.height)
|
|
16294
16283
|
return;
|
|
16295
|
-
const b = (M = h.handleBounds[o.value]) == null ? void 0 : M.find((
|
|
16284
|
+
const b = (M = h.handleBounds[o.value]) == null ? void 0 : M.find((q) => q.id === e.id);
|
|
16296
16285
|
if (!u.value || b)
|
|
16297
16286
|
return;
|
|
16298
|
-
const
|
|
16299
|
-
if (!g.value || !v.value || !
|
|
16287
|
+
const U = u.value.querySelector(".vue-flow__transformationpane");
|
|
16288
|
+
if (!g.value || !v.value || !U || !e.id)
|
|
16300
16289
|
return;
|
|
16301
|
-
const A = g.value.getBoundingClientRect(),
|
|
16290
|
+
const A = g.value.getBoundingClientRect(), j = v.value.getBoundingClientRect(), V = window.getComputedStyle(U), { m22: ue } = new window.DOMMatrixReadOnly(V.transform), de = {
|
|
16302
16291
|
id: e.id,
|
|
16303
16292
|
position: e.position,
|
|
16304
|
-
x: (
|
|
16305
|
-
y: (
|
|
16293
|
+
x: (j.left - A.left) / ue,
|
|
16294
|
+
y: (j.top - A.top) / ue,
|
|
16306
16295
|
type: o.value,
|
|
16307
16296
|
nodeId: m,
|
|
16308
16297
|
...es(v.value)
|
|
@@ -16449,7 +16438,7 @@ const yP = as, _P = ["transform"], bP = ["width", "height", "x", "y", "rx", "ry"
|
|
|
16449
16438
|
}), [
|
|
16450
16439
|
qe(r.$slots, "default", {}, () => [
|
|
16451
16440
|
typeof r.label != "string" ? (k(), H(gt(r.label), { key: 0 })) : (k(), Q(Be, { key: 1 }, [
|
|
16452
|
-
Me(
|
|
16441
|
+
Me(ve(r.label), 1)
|
|
16453
16442
|
], 64))
|
|
16454
16443
|
])
|
|
16455
16444
|
], 16, wP)
|
|
@@ -16703,15 +16692,15 @@ function IP({
|
|
|
16703
16692
|
} else {
|
|
16704
16693
|
const x = [{ x: l.x, y: u.y }], T = [{ x: u.x, y: l.y }];
|
|
16705
16694
|
if (c === "x" ? m = a.x === f ? T : x : m = a.y === f ? x : T, t === o) {
|
|
16706
|
-
const
|
|
16707
|
-
if (
|
|
16708
|
-
const A = Math.min(r - 1, r -
|
|
16695
|
+
const U = Math.abs(e[c] - n[c]);
|
|
16696
|
+
if (U <= r) {
|
|
16697
|
+
const A = Math.min(r - 1, r - U);
|
|
16709
16698
|
a[c] === f ? y[c] = (l[c] > e[c] ? -1 : 1) * A : v[c] = (u[c] > n[c] ? -1 : 1) * A;
|
|
16710
16699
|
}
|
|
16711
16700
|
}
|
|
16712
16701
|
if (t !== o) {
|
|
16713
|
-
const
|
|
16714
|
-
(a[c] === 1 && (!A &&
|
|
16702
|
+
const U = c === "x" ? "y" : "x", A = a[c] === s[U], j = l[U] > u[U], V = l[U] < u[U];
|
|
16703
|
+
(a[c] === 1 && (!A && j || A && V) || a[c] !== 1 && (!A && V || A && j)) && (m = c === "x" ? x : T);
|
|
16715
16704
|
}
|
|
16716
16705
|
const I = { x: l.x + y.x, y: l.y + y.y }, O = { x: u.x + v.x, y: u.y + v.y }, M = Math.max(Math.abs(I.x - m[0].x), Math.abs(O.x - m[0].x)), b = Math.max(Math.abs(I.y - m[0].y), Math.abs(O.y - m[0].y));
|
|
16717
16706
|
M >= b ? (h = (I.x + O.x) / 2, g = m[0].y) : (h = m[0].x, g = (I.y + O.y) / 2);
|
|
@@ -17253,9 +17242,9 @@ const XP = {
|
|
|
17253
17242
|
defaultEdgeOptions: C,
|
|
17254
17243
|
connectionStartHandle: E
|
|
17255
17244
|
} = nt(), x = pe(null), T = pe(/* @__PURE__ */ new Set()), I = pe(/* @__PURE__ */ new Set()), O = pe(), M = He(() => l.value && (e.isSelecting || r.value)), b = He(() => E.value !== null);
|
|
17256
|
-
let
|
|
17257
|
-
const
|
|
17258
|
-
Le(
|
|
17245
|
+
let U = !1, A = !1;
|
|
17246
|
+
const j = Hi(g, { actInsideInputWithModifier: !1 }), V = Hi(y);
|
|
17247
|
+
Le(j, (ae) => {
|
|
17259
17248
|
ae && (f(c.value), m(d.value), u.value = !1);
|
|
17260
17249
|
}), Le(V, (ae) => {
|
|
17261
17250
|
v.value = ae;
|
|
@@ -17266,16 +17255,16 @@ const XP = {
|
|
|
17266
17255
|
};
|
|
17267
17256
|
}
|
|
17268
17257
|
function de(ae) {
|
|
17269
|
-
if (
|
|
17270
|
-
|
|
17258
|
+
if (U || b.value) {
|
|
17259
|
+
U = !1;
|
|
17271
17260
|
return;
|
|
17272
17261
|
}
|
|
17273
17262
|
i.paneClick(ae), a(), u.value = !1;
|
|
17274
17263
|
}
|
|
17275
|
-
function
|
|
17264
|
+
function q(ae) {
|
|
17276
17265
|
ae.preventDefault(), ae.stopPropagation(), i.paneContextMenu(ae);
|
|
17277
17266
|
}
|
|
17278
|
-
function
|
|
17267
|
+
function z(ae) {
|
|
17279
17268
|
i.paneScroll(ae);
|
|
17280
17269
|
}
|
|
17281
17270
|
function P(ae) {
|
|
@@ -17284,7 +17273,7 @@ const XP = {
|
|
|
17284
17273
|
return;
|
|
17285
17274
|
(ge = (Y = ae.target) == null ? void 0 : Y.setPointerCapture) == null || ge.call(Y, ae.pointerId);
|
|
17286
17275
|
const { x: we, y: Se } = WP(ae, O.value);
|
|
17287
|
-
A = !0,
|
|
17276
|
+
A = !0, U = !1, a(), s.value = {
|
|
17288
17277
|
width: 0,
|
|
17289
17278
|
height: 0,
|
|
17290
17279
|
startX: we,
|
|
@@ -17297,7 +17286,7 @@ const XP = {
|
|
|
17297
17286
|
var ne;
|
|
17298
17287
|
if (!O.value || !s.value)
|
|
17299
17288
|
return;
|
|
17300
|
-
|
|
17289
|
+
U = !0;
|
|
17301
17290
|
const { x: Y, y: ge } = En(ae, O.value), { startX: we = 0, startY: Se = 0 } = s.value, ce = {
|
|
17302
17291
|
startX: we,
|
|
17303
17292
|
startY: Se,
|
|
@@ -17311,13 +17300,13 @@ const XP = {
|
|
|
17311
17300
|
(D) => D.id
|
|
17312
17301
|
)
|
|
17313
17302
|
), I.value = /* @__PURE__ */ new Set();
|
|
17314
|
-
const
|
|
17303
|
+
const he = ((ne = C.value) == null ? void 0 : ne.selectable) ?? !0;
|
|
17315
17304
|
for (const D of T.value) {
|
|
17316
17305
|
const $ = S.value.get(D);
|
|
17317
17306
|
if ($)
|
|
17318
17307
|
for (const { edgeId: L } of $.values()) {
|
|
17319
17308
|
const B = w.value.get(L);
|
|
17320
|
-
B && (B.selectable ??
|
|
17309
|
+
B && (B.selectable ?? he) && I.value.add(L);
|
|
17321
17310
|
}
|
|
17322
17311
|
}
|
|
17323
17312
|
if (!Qd(X, T.value)) {
|
|
@@ -17332,15 +17321,15 @@ const XP = {
|
|
|
17332
17321
|
}
|
|
17333
17322
|
function ee(ae) {
|
|
17334
17323
|
var ne;
|
|
17335
|
-
ae.button !== 0 || !A || ((ne = ae.target) == null || ne.releasePointerCapture(ae.pointerId), !r.value && s.value && ae.target === x.value && de(ae), r.value = !1, s.value = null, u.value = T.value.size > 0, i.selectionEnd(ae), e.selectionKeyPressed && (
|
|
17324
|
+
ae.button !== 0 || !A || ((ne = ae.target) == null || ne.releasePointerCapture(ae.pointerId), !r.value && s.value && ae.target === x.value && de(ae), r.value = !1, s.value = null, u.value = T.value.size > 0, i.selectionEnd(ae), e.selectionKeyPressed && (U = !1), A = !1);
|
|
17336
17325
|
}
|
|
17337
17326
|
return (ae, ne) => (k(), Q("div", {
|
|
17338
17327
|
ref_key: "container",
|
|
17339
17328
|
ref: x,
|
|
17340
17329
|
class: Je(["vue-flow__pane vue-flow__container", { selection: ae.isSelecting }]),
|
|
17341
17330
|
onClick: ne[0] || (ne[0] = (Y) => M.value ? void 0 : ue(de, x.value)(Y)),
|
|
17342
|
-
onContextmenu: ne[1] || (ne[1] = (Y) => ue(
|
|
17343
|
-
onWheelPassive: ne[2] || (ne[2] = (Y) => ue(
|
|
17331
|
+
onContextmenu: ne[1] || (ne[1] = (Y) => ue(q, x.value)(Y)),
|
|
17332
|
+
onWheelPassive: ne[2] || (ne[2] = (Y) => ue(z, x.value)(Y)),
|
|
17344
17333
|
onPointerenter: ne[3] || (ne[3] = (Y) => M.value ? void 0 : p(i).paneMouseEnter(Y)),
|
|
17345
17334
|
onPointerdown: ne[4] || (ne[4] = (Y) => M.value ? P(Y) : p(i).paneMouseMove(Y)),
|
|
17346
17335
|
onPointermove: ne[5] || (ne[5] = (Y) => M.value ? K(Y) : p(i).paneMouseMove(Y)),
|
|
@@ -17405,25 +17394,25 @@ const XP = {
|
|
|
17405
17394
|
paneClickDistance: M
|
|
17406
17395
|
} = nt();
|
|
17407
17396
|
qP(O);
|
|
17408
|
-
const b = an(!1),
|
|
17409
|
-
let A = null,
|
|
17397
|
+
const b = an(!1), U = an(!1);
|
|
17398
|
+
let A = null, j = !1, V = 0, ue = {
|
|
17410
17399
|
x: 0,
|
|
17411
17400
|
y: 0,
|
|
17412
17401
|
zoom: 0
|
|
17413
17402
|
};
|
|
17414
|
-
const de = Hi(s),
|
|
17415
|
-
() => (!
|
|
17416
|
-
), K = He(() => de.value || l.value), ee = He(() =>
|
|
17403
|
+
const de = Hi(s), q = Hi(a), z = Hi(r), P = He(
|
|
17404
|
+
() => (!q.value || q.value && a.value === !0) && (de.value || c.value)
|
|
17405
|
+
), K = He(() => de.value || l.value), ee = He(() => q.value || a.value === !0 && P.value !== !0);
|
|
17417
17406
|
Bt(() => {
|
|
17418
17407
|
if (!O.value) {
|
|
17419
17408
|
ns("Viewport element is missing");
|
|
17420
17409
|
return;
|
|
17421
17410
|
}
|
|
17422
|
-
const Se = O.value, ce = Se.getBoundingClientRect(), X = _O().clickDistance(M.value).scaleExtent([t.value, n.value]).translateExtent(i.value), fe = gn(Se).call(X),
|
|
17411
|
+
const Se = O.value, ce = Se.getBoundingClientRect(), X = _O().clickDistance(M.value).scaleExtent([t.value, n.value]).translateExtent(i.value), fe = gn(Se).call(X), he = fe.on("wheel.zoom"), D = _i.translate(o.value.x ?? 0, o.value.y ?? 0).scale(Ro(o.value.zoom ?? 1, t.value, n.value)), $ = [
|
|
17423
17412
|
[0, 0],
|
|
17424
17413
|
[ce.width, ce.height]
|
|
17425
17414
|
], L = X.constrain()(D, $, i.value);
|
|
17426
|
-
X.transform(fe, L), X.wheelDelta(ne), E.value = X, x.value = fe, T.value =
|
|
17415
|
+
X.transform(fe, L), X.wheelDelta(ne), E.value = X, x.value = fe, T.value = he, I.value = { x: L.x, y: L.y, zoom: L.k }, X.on("start", (B) => {
|
|
17427
17416
|
var le;
|
|
17428
17417
|
if (!B.sourceEvent)
|
|
17429
17418
|
return null;
|
|
@@ -17433,16 +17422,16 @@ const XP = {
|
|
|
17433
17422
|
}), X.on("end", (B) => {
|
|
17434
17423
|
if (!B.sourceEvent)
|
|
17435
17424
|
return null;
|
|
17436
|
-
if (b.value = !1, C.value = !1, ae(P.value, V ?? 0) && !
|
|
17425
|
+
if (b.value = !1, C.value = !1, ae(P.value, V ?? 0) && !j && w.paneContextMenu(B.sourceEvent), j = !1, Y(ue, B.transform)) {
|
|
17437
17426
|
const le = ge(B.transform);
|
|
17438
17427
|
ue = le, w.viewportChangeEnd(le), w.moveEnd({ event: B, flowTransform: le });
|
|
17439
17428
|
}
|
|
17440
17429
|
}), X.filter((B) => {
|
|
17441
17430
|
var le;
|
|
17442
|
-
const oe =
|
|
17431
|
+
const oe = z.value || h.value, te = m.value && B.ctrlKey, G = B.button;
|
|
17443
17432
|
if (G === 1 && B.type === "mousedown" && (we(B, "vue-flow__node") || we(B, "vue-flow__edge")))
|
|
17444
17433
|
return !0;
|
|
17445
|
-
if (!P.value && !oe && !K.value && !f.value && !m.value || S.value || !f.value && B.type === "dblclick" || we(B, y.value) && B.type === "wheel" || we(B, v.value) && (B.type !== "wheel" || K.value && B.type === "wheel" && !
|
|
17434
|
+
if (!P.value && !oe && !K.value && !f.value && !m.value || S.value || !f.value && B.type === "dblclick" || we(B, y.value) && B.type === "wheel" || we(B, v.value) && (B.type !== "wheel" || K.value && B.type === "wheel" && !z.value) || !m.value && B.ctrlKey && B.type === "wheel" || !oe && !K.value && !te && B.type === "wheel")
|
|
17446
17435
|
return !1;
|
|
17447
17436
|
if (!m && B.type === "touchstart" && ((le = B.touches) == null ? void 0 : le.length) > 1)
|
|
17448
17437
|
return B.preventDefault(), !1;
|
|
@@ -17456,19 +17445,19 @@ const XP = {
|
|
|
17456
17445
|
S.value && !b.value ? X.on("zoom", null) : S.value || X.on("zoom", (B) => {
|
|
17457
17446
|
I.value = { x: B.transform.x, y: B.transform.y, zoom: B.transform.k };
|
|
17458
17447
|
const le = ge(B.transform);
|
|
17459
|
-
|
|
17448
|
+
j = ae(P.value, V ?? 0), w.viewportChange(le), w.move({ event: B, flowTransform: le });
|
|
17460
17449
|
});
|
|
17461
17450
|
},
|
|
17462
17451
|
{ immediate: !0 }
|
|
17463
17452
|
), Le(
|
|
17464
|
-
[S, K, u,
|
|
17453
|
+
[S, K, u, z, m, g, y],
|
|
17465
17454
|
() => {
|
|
17466
|
-
K.value && !
|
|
17455
|
+
K.value && !z.value && !S.value ? fe.on(
|
|
17467
17456
|
"wheel.zoom",
|
|
17468
17457
|
(B) => {
|
|
17469
17458
|
if (we(B, y.value))
|
|
17470
17459
|
return !1;
|
|
17471
|
-
const le =
|
|
17460
|
+
const le = z.value || h.value, oe = m.value && B.ctrlKey;
|
|
17472
17461
|
if (!(!g.value || K.value || le || oe))
|
|
17473
17462
|
return !1;
|
|
17474
17463
|
B.preventDefault(), B.stopImmediatePropagation();
|
|
@@ -17486,18 +17475,18 @@ const XP = {
|
|
|
17486
17475
|
-(ie / G) * d.value
|
|
17487
17476
|
);
|
|
17488
17477
|
const ye = ge(fe.property("__zoom"));
|
|
17489
|
-
A && clearTimeout(A),
|
|
17490
|
-
w.moveEnd({ event: B, flowTransform: ye }), w.viewportChangeEnd(ye),
|
|
17491
|
-
}, 150)) : (
|
|
17478
|
+
A && clearTimeout(A), U.value ? (w.move({ event: B, flowTransform: ye }), w.viewportChange(ye), A = setTimeout(() => {
|
|
17479
|
+
w.moveEnd({ event: B, flowTransform: ye }), w.viewportChangeEnd(ye), U.value = !1;
|
|
17480
|
+
}, 150)) : (U.value = !0, w.moveStart({ event: B, flowTransform: ye }), w.viewportChangeStart(ye));
|
|
17492
17481
|
},
|
|
17493
17482
|
{ passive: !1 }
|
|
17494
|
-
) : typeof
|
|
17483
|
+
) : typeof he < "u" && fe.on(
|
|
17495
17484
|
"wheel.zoom",
|
|
17496
17485
|
function(B, le) {
|
|
17497
|
-
const oe = !g.value && B.type === "wheel" && !B.ctrlKey, te =
|
|
17486
|
+
const oe = !g.value && B.type === "wheel" && !B.ctrlKey, te = z.value || h.value, G = m.value && B.ctrlKey;
|
|
17498
17487
|
if (!te && !l.value && !G && B.type === "wheel" || oe || we(B, y.value))
|
|
17499
17488
|
return null;
|
|
17500
|
-
B.preventDefault(),
|
|
17489
|
+
B.preventDefault(), he.call(this, B, le);
|
|
17501
17490
|
},
|
|
17502
17491
|
{ passive: !1 }
|
|
17503
17492
|
);
|
|
@@ -17532,7 +17521,7 @@ const XP = {
|
|
|
17532
17521
|
}, [
|
|
17533
17522
|
N(ZP, {
|
|
17534
17523
|
"is-selecting": ee.value,
|
|
17535
|
-
"selection-key-pressed": p(
|
|
17524
|
+
"selection-key-pressed": p(q),
|
|
17536
17525
|
class: Je({
|
|
17537
17526
|
connecting: !!p(_),
|
|
17538
17527
|
dragging: p(C),
|
|
@@ -17562,7 +17551,7 @@ const XP = {
|
|
|
17562
17551
|
J("div", {
|
|
17563
17552
|
id: `${p(Mg)}-${p(t)}`,
|
|
17564
17553
|
style: { display: "none" }
|
|
17565
|
-
}, " Press enter or space to select a node. " +
|
|
17554
|
+
}, " Press enter or space to select a node. " + ve(p(n) ? "" : "You can then use the arrow keys to move the node around.") + " You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel. ", 9, nM),
|
|
17566
17555
|
J("div", {
|
|
17567
17556
|
id: `${p(Rg)}-${p(t)}`,
|
|
17568
17557
|
style: { display: "none" }
|
|
@@ -17573,7 +17562,7 @@ const XP = {
|
|
|
17573
17562
|
"aria-live": "assertive",
|
|
17574
17563
|
"aria-atomic": "true",
|
|
17575
17564
|
style: { position: "absolute", width: "1px", height: "1px", margin: "-1px", border: "0", padding: "0", overflow: "hidden", clip: "rect(0px, 0px, 0px, 0px)", "clip-path": "inset(100%)" }
|
|
17576
|
-
},
|
|
17565
|
+
}, ve(p(o)), 9, iM))
|
|
17577
17566
|
], 64));
|
|
17578
17567
|
}
|
|
17579
17568
|
});
|
|
@@ -17636,11 +17625,11 @@ const af = Bu, cM = _e({
|
|
|
17636
17625
|
edgesUpdatable: y,
|
|
17637
17626
|
edgesFocusable: v,
|
|
17638
17627
|
hooks: w
|
|
17639
|
-
} = nt(), _ = R(() => d(e.id)), { emit: S, on: C } = tP(_.value, r), E = ct(os), x = yr(), T = pe(!1), I = pe(!1), O = pe(""), M = pe(null), b = pe("source"),
|
|
17628
|
+
} = nt(), _ = R(() => d(e.id)), { emit: S, on: C } = tP(_.value, r), E = ct(os), x = yr(), T = pe(!1), I = pe(!1), O = pe(""), M = pe(null), b = pe("source"), U = pe(null), A = He(
|
|
17640
17629
|
() => typeof _.value.selectable > "u" ? g.value : _.value.selectable
|
|
17641
|
-
),
|
|
17642
|
-
Tt(JO, e.id), Tt(QO,
|
|
17643
|
-
const ue = R(() => _.value.class instanceof Function ? _.value.class(_.value) : _.value.class), de = R(() => _.value.style instanceof Function ? _.value.style(_.value) : _.value.style),
|
|
17630
|
+
), j = He(() => typeof _.value.updatable > "u" ? y.value : _.value.updatable), V = He(() => typeof _.value.focusable > "u" ? v.value : _.value.focusable);
|
|
17631
|
+
Tt(JO, e.id), Tt(QO, U);
|
|
17632
|
+
const ue = R(() => _.value.class instanceof Function ? _.value.class(_.value) : _.value.class), de = R(() => _.value.style instanceof Function ? _.value.style(_.value) : _.value.style), q = R(() => {
|
|
17644
17633
|
const $ = _.value.type || "default", L = E == null ? void 0 : E[`edge-${$}`];
|
|
17645
17634
|
if (L)
|
|
17646
17635
|
return L;
|
|
@@ -17650,7 +17639,7 @@ const af = Bu, cM = _e({
|
|
|
17650
17639
|
le && le.includes($) && (B = Ae($, !1));
|
|
17651
17640
|
}
|
|
17652
17641
|
return B && typeof B != "string" ? B : (r.error(new It(xt.EDGE_TYPE_MISSING, B)), !1);
|
|
17653
|
-
}), { handlePointerDown:
|
|
17642
|
+
}), { handlePointerDown: z } = Qg({
|
|
17654
17643
|
nodeId: O,
|
|
17655
17644
|
handleId: M,
|
|
17656
17645
|
type: b,
|
|
@@ -17678,12 +17667,12 @@ const af = Bu, cM = _e({
|
|
|
17678
17667
|
return _.value.sourceX = Z, _.value.sourceY = ie, _.value.targetX = ye, _.value.targetY = Te, rt(
|
|
17679
17668
|
"g",
|
|
17680
17669
|
{
|
|
17681
|
-
ref:
|
|
17670
|
+
ref: U,
|
|
17682
17671
|
key: e.id,
|
|
17683
17672
|
"data-id": e.id,
|
|
17684
17673
|
class: [
|
|
17685
17674
|
"vue-flow__edge",
|
|
17686
|
-
`vue-flow__edge-${
|
|
17675
|
+
`vue-flow__edge-${q.value === !1 ? "default" : _.value.type || "default"}`,
|
|
17687
17676
|
s.value,
|
|
17688
17677
|
ue.value,
|
|
17689
17678
|
{
|
|
@@ -17708,14 +17697,14 @@ const af = Bu, cM = _e({
|
|
|
17708
17697
|
onKeyDown: V.value ? D : void 0
|
|
17709
17698
|
},
|
|
17710
17699
|
[
|
|
17711
|
-
I.value ? null : rt(
|
|
17700
|
+
I.value ? null : rt(q.value === !1 ? l.value.default : q.value, {
|
|
17712
17701
|
id: e.id,
|
|
17713
17702
|
sourceNode: $,
|
|
17714
17703
|
targetNode: L,
|
|
17715
17704
|
source: _.value.source,
|
|
17716
17705
|
target: _.value.target,
|
|
17717
17706
|
type: _.value.type,
|
|
17718
|
-
updatable:
|
|
17707
|
+
updatable: j.value,
|
|
17719
17708
|
selected: _.value.selected,
|
|
17720
17709
|
animated: _.value.animated,
|
|
17721
17710
|
label: _.value.label,
|
|
@@ -17741,7 +17730,7 @@ const af = Bu, cM = _e({
|
|
|
17741
17730
|
...B
|
|
17742
17731
|
}),
|
|
17743
17732
|
[
|
|
17744
|
-
|
|
17733
|
+
j.value === "source" || j.value === !0 ? [
|
|
17745
17734
|
rt(
|
|
17746
17735
|
"g",
|
|
17747
17736
|
{
|
|
@@ -17759,11 +17748,11 @@ const af = Bu, cM = _e({
|
|
|
17759
17748
|
})
|
|
17760
17749
|
)
|
|
17761
17750
|
] : null,
|
|
17762
|
-
|
|
17751
|
+
j.value === "target" || j.value === !0 ? [
|
|
17763
17752
|
rt(
|
|
17764
17753
|
"g",
|
|
17765
17754
|
{
|
|
17766
|
-
onMousedown:
|
|
17755
|
+
onMousedown: he,
|
|
17767
17756
|
onMouseenter: P,
|
|
17768
17757
|
onMouseout: K
|
|
17769
17758
|
},
|
|
@@ -17794,12 +17783,12 @@ const af = Bu, cM = _e({
|
|
|
17794
17783
|
S.updateEnd({ event: $, edge: _.value }), I.value = !1;
|
|
17795
17784
|
}
|
|
17796
17785
|
function ne($, L) {
|
|
17797
|
-
$.button === 0 && (I.value = !0, O.value = L ? _.value.target : _.value.source, M.value = (L ? _.value.targetHandle : _.value.sourceHandle) ?? null, b.value = L ? "target" : "source", S.updateStart({ event: $, edge: _.value }),
|
|
17786
|
+
$.button === 0 && (I.value = !0, O.value = L ? _.value.target : _.value.source, M.value = (L ? _.value.targetHandle : _.value.sourceHandle) ?? null, b.value = L ? "target" : "source", S.updateStart({ event: $, edge: _.value }), z($));
|
|
17798
17787
|
}
|
|
17799
17788
|
function Y($) {
|
|
17800
17789
|
var L;
|
|
17801
17790
|
const B = { event: $, edge: _.value };
|
|
17802
|
-
A.value && (a.value = !1, _.value.selected && m.value ? (u([_.value]), (L =
|
|
17791
|
+
A.value && (a.value = !1, _.value.selected && m.value ? (u([_.value]), (L = U.value) == null || L.blur()) : n([_.value])), S.click(B);
|
|
17803
17792
|
}
|
|
17804
17793
|
function ge($) {
|
|
17805
17794
|
S.contextMenu({ event: $, edge: _.value });
|
|
@@ -17819,12 +17808,12 @@ const af = Bu, cM = _e({
|
|
|
17819
17808
|
function fe($) {
|
|
17820
17809
|
ne($, !0);
|
|
17821
17810
|
}
|
|
17822
|
-
function
|
|
17811
|
+
function he($) {
|
|
17823
17812
|
ne($, !1);
|
|
17824
17813
|
}
|
|
17825
17814
|
function D($) {
|
|
17826
17815
|
var L;
|
|
17827
|
-
!h.value && Dg.includes($.key) && A.value && ($.key === "Escape" ? ((L =
|
|
17816
|
+
!h.value && Dg.includes($.key) && A.value && ($.key === "Escape" ? ((L = U.value) == null || L.blur(), u([d(e.id)])) : n([d(e.id)]));
|
|
17828
17817
|
}
|
|
17829
17818
|
}
|
|
17830
17819
|
}), dM = cM, fM = _e({
|
|
@@ -17871,22 +17860,22 @@ const af = Bu, cM = _e({
|
|
|
17871
17860
|
if (!T)
|
|
17872
17861
|
return null;
|
|
17873
17862
|
const I = (C ? T.find((de) => de.id === C) : T[0]) ?? null, O = (I == null ? void 0 : I.position) ?? Fe.Top, { x: M, y: b } = bi(m.value, I, O);
|
|
17874
|
-
let
|
|
17875
|
-
h.value && (n.value === io.Strict ?
|
|
17863
|
+
let U = null;
|
|
17864
|
+
h.value && (n.value === io.Strict ? U = ((w = h.value.handleBounds[E === "source" ? "target" : "source"]) == null ? void 0 : w.find(
|
|
17876
17865
|
(de) => {
|
|
17877
|
-
var
|
|
17878
|
-
return de.id === ((
|
|
17866
|
+
var q;
|
|
17867
|
+
return de.id === ((q = i.value) == null ? void 0 : q.id);
|
|
17879
17868
|
}
|
|
17880
|
-
)) || null :
|
|
17869
|
+
)) || null : U = ((_ = [...h.value.handleBounds.source ?? [], ...h.value.handleBounds.target ?? []]) == null ? void 0 : _.find(
|
|
17881
17870
|
(de) => {
|
|
17882
|
-
var
|
|
17883
|
-
return de.id === ((
|
|
17871
|
+
var q;
|
|
17872
|
+
return de.id === ((q = i.value) == null ? void 0 : q.id);
|
|
17884
17873
|
}
|
|
17885
17874
|
)) || null);
|
|
17886
17875
|
const A = ((S = i.value) == null ? void 0 : S.position) ?? (O ? Nl[O] : null);
|
|
17887
17876
|
if (!O || !A)
|
|
17888
17877
|
return null;
|
|
17889
|
-
const
|
|
17878
|
+
const j = a.value ?? l.value.type ?? vo.Bezier;
|
|
17890
17879
|
let V = "";
|
|
17891
17880
|
const ue = {
|
|
17892
17881
|
sourceX: M,
|
|
@@ -17896,10 +17885,10 @@ const af = Bu, cM = _e({
|
|
|
17896
17885
|
targetY: g.value.y,
|
|
17897
17886
|
targetPosition: A
|
|
17898
17887
|
};
|
|
17899
|
-
return
|
|
17888
|
+
return j === vo.Bezier ? [V] = rh(ue) : j === vo.Step ? [V] = Ol({
|
|
17900
17889
|
...ue,
|
|
17901
17890
|
borderRadius: 0
|
|
17902
|
-
}) :
|
|
17891
|
+
}) : j === vo.SmoothStep ? [V] = Ol(ue) : j === vo.SimpleBezier ? [V] = ah(ue) : V = `M${M},${b} ${g.value.x},${g.value.y}`, rt(
|
|
17903
17892
|
"svg",
|
|
17904
17893
|
{ class: "vue-flow__edges vue-flow__connectionline vue-flow__container" },
|
|
17905
17894
|
rt(
|
|
@@ -17915,7 +17904,7 @@ const af = Bu, cM = _e({
|
|
|
17915
17904
|
sourceNode: m.value,
|
|
17916
17905
|
sourceHandle: I,
|
|
17917
17906
|
targetNode: h.value,
|
|
17918
|
-
targetHandle:
|
|
17907
|
+
targetHandle: U,
|
|
17919
17908
|
markerEnd: v.value,
|
|
17920
17909
|
markerStart: y.value,
|
|
17921
17910
|
connectionStatus: u.value
|
|
@@ -18075,7 +18064,7 @@ const af = Bu, cM = _e({
|
|
|
18075
18064
|
hooks: x
|
|
18076
18065
|
} = nt(), T = pe(null);
|
|
18077
18066
|
Tt(Zg, T), Tt(Xg, e.id);
|
|
18078
|
-
const I = ct(os), O = yr(), M = th(), { node: b, parentNode:
|
|
18067
|
+
const I = ct(os), O = yr(), M = th(), { node: b, parentNode: U } = eh(e.id), { emit: A, on: j } = rP(b, a), V = He(() => typeof b.draggable > "u" ? _.value : b.draggable), ue = He(() => typeof b.selectable > "u" ? S.value : b.selectable), de = He(() => typeof b.connectable > "u" ? C.value : b.connectable), q = He(() => typeof b.focusable > "u" ? E.value : b.focusable), z = R(
|
|
18079
18068
|
() => ue.value || V.value || x.value.nodeClick.hasListeners() || x.value.nodeDoubleClick.hasListeners() || x.value.nodeMouseEnter.hasListeners() || x.value.nodeMouseMove.hasListeners() || x.value.nodeMouseLeave.hasListeners()
|
|
18080
18069
|
), P = He(() => !!b.dimensions.width && !!b.dimensions.height), K = R(() => {
|
|
18081
18070
|
const L = b.type || "default", B = I == null ? void 0 : I[`node-${L}`];
|
|
@@ -18131,15 +18120,15 @@ const af = Bu, cM = _e({
|
|
|
18131
18120
|
() => b.position.y,
|
|
18132
18121
|
() => {
|
|
18133
18122
|
var L;
|
|
18134
|
-
return (L =
|
|
18123
|
+
return (L = U.value) == null ? void 0 : L.computedPosition.x;
|
|
18135
18124
|
},
|
|
18136
18125
|
() => {
|
|
18137
18126
|
var L;
|
|
18138
|
-
return (L =
|
|
18127
|
+
return (L = U.value) == null ? void 0 : L.computedPosition.y;
|
|
18139
18128
|
},
|
|
18140
18129
|
() => {
|
|
18141
18130
|
var L;
|
|
18142
|
-
return (L =
|
|
18131
|
+
return (L = U.value) == null ? void 0 : L.computedPosition.z;
|
|
18143
18132
|
},
|
|
18144
18133
|
Y,
|
|
18145
18134
|
() => b.selected,
|
|
@@ -18147,11 +18136,11 @@ const af = Bu, cM = _e({
|
|
|
18147
18136
|
() => b.dimensions.width,
|
|
18148
18137
|
() => {
|
|
18149
18138
|
var L;
|
|
18150
|
-
return (L =
|
|
18139
|
+
return (L = U.value) == null ? void 0 : L.dimensions.height;
|
|
18151
18140
|
},
|
|
18152
18141
|
() => {
|
|
18153
18142
|
var L;
|
|
18154
|
-
return (L =
|
|
18143
|
+
return (L = U.value) == null ? void 0 : L.dimensions.width;
|
|
18155
18144
|
}
|
|
18156
18145
|
],
|
|
18157
18146
|
([L, B, le, oe, te, G]) => {
|
|
@@ -18187,11 +18176,11 @@ const af = Bu, cM = _e({
|
|
|
18187
18176
|
visibility: P.value ? "visible" : "hidden",
|
|
18188
18177
|
zIndex: b.computedPosition.z ?? Y.value,
|
|
18189
18178
|
transform: `translate(${b.computedPosition.x}px,${b.computedPosition.y}px)`,
|
|
18190
|
-
pointerEvents:
|
|
18179
|
+
pointerEvents: z.value ? "all" : "none",
|
|
18191
18180
|
...ne.value
|
|
18192
18181
|
},
|
|
18193
|
-
tabIndex:
|
|
18194
|
-
role:
|
|
18182
|
+
tabIndex: q.value ? 0 : void 0,
|
|
18183
|
+
role: q.value ? "group" : void 0,
|
|
18195
18184
|
"aria-describedby": h.value ? void 0 : `${Mg}-${t}`,
|
|
18196
18185
|
"aria-label": b.ariaLabel,
|
|
18197
18186
|
"aria-roledescription": "node",
|
|
@@ -18201,7 +18190,7 @@ const af = Bu, cM = _e({
|
|
|
18201
18190
|
onMouseleave: X,
|
|
18202
18191
|
onContextmenu: fe,
|
|
18203
18192
|
onClick: D,
|
|
18204
|
-
onDblclick:
|
|
18193
|
+
onDblclick: he,
|
|
18205
18194
|
onKeydown: $
|
|
18206
18195
|
},
|
|
18207
18196
|
[
|
|
@@ -18209,7 +18198,7 @@ const af = Bu, cM = _e({
|
|
|
18209
18198
|
id: b.id,
|
|
18210
18199
|
type: b.type,
|
|
18211
18200
|
data: b.data,
|
|
18212
|
-
events: { ...b.events, ...
|
|
18201
|
+
events: { ...b.events, ...j },
|
|
18213
18202
|
selected: b.selected,
|
|
18214
18203
|
resizing: b.resizing,
|
|
18215
18204
|
dragging: ee.value,
|
|
@@ -18235,7 +18224,7 @@ const af = Bu, cM = _e({
|
|
|
18235
18224
|
y.value ? ts(L, v.value) : L,
|
|
18236
18225
|
a.error,
|
|
18237
18226
|
f.value,
|
|
18238
|
-
|
|
18227
|
+
U.value
|
|
18239
18228
|
);
|
|
18240
18229
|
(b.computedPosition.x !== B.x || b.computedPosition.y !== B.y) && (b.computedPosition = { ...b.computedPosition, ...B }), (b.position.x !== le.x || b.position.y !== le.y) && (b.position = le);
|
|
18241
18230
|
}
|
|
@@ -18254,7 +18243,7 @@ const af = Bu, cM = _e({
|
|
|
18254
18243
|
function fe(L) {
|
|
18255
18244
|
return A.contextMenu({ event: L, node: b });
|
|
18256
18245
|
}
|
|
18257
|
-
function
|
|
18246
|
+
function he(L) {
|
|
18258
18247
|
return A.doubleClick({ event: L, node: b });
|
|
18259
18248
|
}
|
|
18260
18249
|
function D(L) {
|
|
@@ -21045,16 +21034,16 @@ function DL(e) {
|
|
|
21045
21034
|
ranks: T = Jn.gaps.ranks
|
|
21046
21035
|
} = C;
|
|
21047
21036
|
async function I(b = !0) {
|
|
21048
|
-
const
|
|
21037
|
+
const U = new Map(
|
|
21049
21038
|
i.value.map((ne) => [ne.id, ne.data])
|
|
21050
|
-
), A = /* @__PURE__ */ new Map(),
|
|
21039
|
+
), A = /* @__PURE__ */ new Map(), j = /* @__PURE__ */ new Map(), V = (ne) => {
|
|
21051
21040
|
if (!ne) return;
|
|
21052
|
-
let Y =
|
|
21053
|
-
return Y || (Y = a(ne), Y &&
|
|
21041
|
+
let Y = j.get(ne);
|
|
21042
|
+
return Y || (Y = a(ne), Y && j.set(ne, Y), Y);
|
|
21054
21043
|
}, ue = /* @__PURE__ */ new Map(), de = (ne) => {
|
|
21055
21044
|
let Y = ue.get(ne);
|
|
21056
21045
|
return Y !== void 0 || (Y = f(ne), ue.set(ne, Y)), Y;
|
|
21057
|
-
},
|
|
21046
|
+
}, q = (ne) => {
|
|
21058
21047
|
if (!Ni(ne.data))
|
|
21059
21048
|
return ne.parentNode;
|
|
21060
21049
|
const Y = V(ne.data.ownerId);
|
|
@@ -21072,29 +21061,29 @@ function DL(e) {
|
|
|
21072
21061
|
if (!Se)
|
|
21073
21062
|
throw new Error(`Cannot find target node '${ge}' for edge '${ne.id}' via findNode`);
|
|
21074
21063
|
} else throw new Error(`Cannot find source node '${Y}' for edge '${ne.id}' via findNode`);
|
|
21075
|
-
if (
|
|
21064
|
+
if (q(we) === q(Se))
|
|
21076
21065
|
continue;
|
|
21077
|
-
let ce = we, X = Se, fe = de(ce.id),
|
|
21078
|
-
for (; fe !==
|
|
21079
|
-
if (fe >
|
|
21080
|
-
const D =
|
|
21066
|
+
let ce = we, X = Se, fe = de(ce.id), he = de(X.id);
|
|
21067
|
+
for (; fe !== he; )
|
|
21068
|
+
if (fe > he) {
|
|
21069
|
+
const D = q(ce);
|
|
21081
21070
|
if (!D)
|
|
21082
21071
|
throw new Error(`Expected node '${ce.id}' to have parent, but it does not`);
|
|
21083
21072
|
const $ = V(D);
|
|
21084
21073
|
if (!$)
|
|
21085
21074
|
throw new Error(`Cannot find parent node '${D}' for node '${ce.id}' via findNode`);
|
|
21086
21075
|
ce = $, fe--;
|
|
21087
|
-
} else if (
|
|
21088
|
-
const D =
|
|
21076
|
+
} else if (he > fe) {
|
|
21077
|
+
const D = q(X);
|
|
21089
21078
|
if (!D)
|
|
21090
21079
|
throw new Error(`Expected node '${X.id}' to have parent, but it does not`);
|
|
21091
21080
|
const $ = V(D);
|
|
21092
21081
|
if (!$)
|
|
21093
21082
|
throw new Error(`Cannot find parent node '${D}' for node '${X.id}' via findNode`);
|
|
21094
|
-
X = $,
|
|
21083
|
+
X = $, he--;
|
|
21095
21084
|
}
|
|
21096
21085
|
for (; fe >= 0; ) {
|
|
21097
|
-
const D =
|
|
21086
|
+
const D = q(ce), $ = q(X);
|
|
21098
21087
|
if (D === $) {
|
|
21099
21088
|
A.has(fe) || A.set(fe, []), A.get(fe).push({
|
|
21100
21089
|
v: ce.id,
|
|
@@ -21116,11 +21105,11 @@ function DL(e) {
|
|
|
21116
21105
|
if (!B)
|
|
21117
21106
|
throw new Error(`Cannot find parent node '${$}' for node '${X.id}' via findNode`);
|
|
21118
21107
|
} else throw new Error(`Cannot find parent node '${D}' for node '${ce.id}' via findNode`);
|
|
21119
|
-
ce = L, X = B, fe--,
|
|
21108
|
+
ce = L, X = B, fe--, he--;
|
|
21120
21109
|
}
|
|
21121
21110
|
}
|
|
21122
|
-
const
|
|
21123
|
-
for (const ne of
|
|
21111
|
+
const z = s.value.groups.toSorted((ne, Y) => de(Y.ownerId) - de(ne.ownerId));
|
|
21112
|
+
for (const ne of z)
|
|
21124
21113
|
O(
|
|
21125
21114
|
ne.memberIds.reduce((Y, ge) => {
|
|
21126
21115
|
const we = u(ge);
|
|
@@ -21131,14 +21120,14 @@ function DL(e) {
|
|
|
21131
21120
|
const Se = h.value.get(we.id);
|
|
21132
21121
|
Se && Y.push(...Se);
|
|
21133
21122
|
}
|
|
21134
|
-
return
|
|
21123
|
+
return U.delete(we.id), Y.push(we), Y;
|
|
21135
21124
|
}, []),
|
|
21136
21125
|
{
|
|
21137
21126
|
virtualEdges: A.get(de(ne.ownerId)),
|
|
21138
21127
|
cachedFindNode: V
|
|
21139
21128
|
}
|
|
21140
21129
|
), await mt(), y(ne.id, !1), await w();
|
|
21141
|
-
const P =
|
|
21130
|
+
const P = U.values().toArray();
|
|
21142
21131
|
for (const ne of P) {
|
|
21143
21132
|
if (Ni(ne) || ne.type !== "branch") continue;
|
|
21144
21133
|
const Y = h.value.get(ne.id);
|
|
@@ -21152,12 +21141,12 @@ function DL(e) {
|
|
|
21152
21141
|
cachedFindNode: V
|
|
21153
21142
|
}), b && c();
|
|
21154
21143
|
}
|
|
21155
|
-
function O(b,
|
|
21156
|
-
var ce, X, fe,
|
|
21157
|
-
const { leftNode: A, rightNode:
|
|
21158
|
-
let
|
|
21144
|
+
function O(b, U) {
|
|
21145
|
+
var ce, X, fe, he, D;
|
|
21146
|
+
const { leftNode: A, rightNode: j, virtualEdges: V, cachedFindNode: ue } = U || {}, de = A ? (ue ?? a)(A.id) : void 0, q = j ? (ue ?? a)(j.id) : void 0;
|
|
21147
|
+
let z;
|
|
21159
21148
|
if (b.length > 0) {
|
|
21160
|
-
|
|
21149
|
+
z = new Af.graphlib.Graph({ multigraph: !0 }), z.setGraph({
|
|
21161
21150
|
rankdir: n === "request" ? "LR" : "RL",
|
|
21162
21151
|
nodesep: E,
|
|
21163
21152
|
edgesep: x,
|
|
@@ -21170,11 +21159,11 @@ function DL(e) {
|
|
|
21170
21159
|
console.warn(`Cannot find graph node '${L.id}' in ${n} phase`);
|
|
21171
21160
|
continue;
|
|
21172
21161
|
}
|
|
21173
|
-
$.add(L.id), Ni(L) ?
|
|
21162
|
+
$.add(L.id), Ni(L) ? z.setNode(L.id, L.dimensions ?? B.dimensions) : z.setNode(L.id, B.dimensions);
|
|
21174
21163
|
}
|
|
21175
21164
|
for (const L of r.value)
|
|
21176
|
-
!$.has(L.source) || !$.has(L.target) ||
|
|
21177
|
-
V == null || V.forEach((L) =>
|
|
21165
|
+
!$.has(L.source) || !$.has(L.target) || z.setEdge(L.source, L.target, { points: [] });
|
|
21166
|
+
V == null || V.forEach((L) => z.setEdge(L, { points: [] })), Af.layout(z);
|
|
21178
21167
|
}
|
|
21179
21168
|
const P = [], K = ($) => ({
|
|
21180
21169
|
x: $.x - $.width / 2,
|
|
@@ -21183,10 +21172,10 @@ function DL(e) {
|
|
|
21183
21172
|
height: $.height
|
|
21184
21173
|
});
|
|
21185
21174
|
if (b.length > 0) {
|
|
21186
|
-
if (!
|
|
21175
|
+
if (!z)
|
|
21187
21176
|
throw new Error("Expected dagreGraph to be initialized");
|
|
21188
21177
|
for (const $ of b) {
|
|
21189
|
-
const L =
|
|
21178
|
+
const L = z.node($.id), B = K(L);
|
|
21190
21179
|
P.push(B), Ni($) ? v(
|
|
21191
21180
|
$.id,
|
|
21192
21181
|
B,
|
|
@@ -21197,31 +21186,31 @@ function DL(e) {
|
|
|
21197
21186
|
}
|
|
21198
21187
|
const ee = P.length > 0 ? vh(P) : { x: 0, y: 0, width: 0, height: 0 }, ae = ee.width, ne = ee.height, Y = ee.x, ge = ee.x + ee.width, we = Math.max(
|
|
21199
21188
|
0,
|
|
21200
|
-
Math.min(De(_ == null ? void 0 : _.width) ?? Number.POSITIVE_INFINITY, I2) - ae - 2 * E - (((ce = de == null ? void 0 : de.dimensions) == null ? void 0 : ce.width) ?? 0) - (((X =
|
|
21189
|
+
Math.min(De(_ == null ? void 0 : _.width) ?? Number.POSITIVE_INFINITY, I2) - ae - 2 * E - (((ce = de == null ? void 0 : de.dimensions) == null ? void 0 : ce.width) ?? 0) - (((X = q == null ? void 0 : q.dimensions) == null ? void 0 : X.width) ?? 0) - 2 * S
|
|
21201
21190
|
), Se = ee.y + ne / 2;
|
|
21202
21191
|
A && d(A.id, {
|
|
21203
21192
|
x: Y - E - we / 2 - (((fe = de == null ? void 0 : de.dimensions) == null ? void 0 : fe.width) ?? 0),
|
|
21204
|
-
y: Se - (((
|
|
21205
|
-
}, !1),
|
|
21193
|
+
y: Se - (((he = de == null ? void 0 : de.dimensions) == null ? void 0 : he.height) ?? 0) / 2
|
|
21194
|
+
}, !1), j && d(j.id, {
|
|
21206
21195
|
x: ge + E + we / 2,
|
|
21207
|
-
y: Se - (((D =
|
|
21196
|
+
y: Se - (((D = q == null ? void 0 : q.dimensions) == null ? void 0 : D.height) ?? 0) / 2
|
|
21208
21197
|
}, !1);
|
|
21209
21198
|
}
|
|
21210
21199
|
function M(b) {
|
|
21211
|
-
let
|
|
21212
|
-
const
|
|
21200
|
+
let U, A;
|
|
21201
|
+
const j = [];
|
|
21213
21202
|
for (const V of b) {
|
|
21214
21203
|
if (Ni(V)) {
|
|
21215
|
-
|
|
21204
|
+
j.push(V);
|
|
21216
21205
|
continue;
|
|
21217
21206
|
}
|
|
21218
21207
|
switch (V.name) {
|
|
21219
21208
|
case "request": {
|
|
21220
21209
|
if (n !== "request")
|
|
21221
21210
|
throw new Error(`Unexpected request node in ${n} phase`);
|
|
21222
|
-
if (
|
|
21211
|
+
if (U)
|
|
21223
21212
|
throw new Error("Duplicated request node in request phase");
|
|
21224
|
-
|
|
21213
|
+
U = V;
|
|
21225
21214
|
break;
|
|
21226
21215
|
}
|
|
21227
21216
|
case "service_request": {
|
|
@@ -21243,18 +21232,18 @@ function DL(e) {
|
|
|
21243
21232
|
case "response": {
|
|
21244
21233
|
if (n !== "response")
|
|
21245
21234
|
throw new Error(`Unexpected response node in ${n} phase`);
|
|
21246
|
-
if (
|
|
21235
|
+
if (U)
|
|
21247
21236
|
throw new Error("Duplicated response node in response phase");
|
|
21248
|
-
|
|
21237
|
+
U = V;
|
|
21249
21238
|
break;
|
|
21250
21239
|
}
|
|
21251
21240
|
default: {
|
|
21252
|
-
|
|
21241
|
+
j.push(V);
|
|
21253
21242
|
break;
|
|
21254
21243
|
}
|
|
21255
21244
|
}
|
|
21256
21245
|
}
|
|
21257
|
-
return { autoNodes:
|
|
21246
|
+
return { autoNodes: j, leftNode: U, rightNode: A };
|
|
21258
21247
|
}
|
|
21259
21248
|
return { autoLayout: I };
|
|
21260
21249
|
}
|
|
@@ -21309,44 +21298,44 @@ function LL({ phase: e, readonly: t, flowId: n }) {
|
|
|
21309
21298
|
groupsByOwner: h,
|
|
21310
21299
|
getNodeDepth: g,
|
|
21311
21300
|
getGroupDepth: y
|
|
21312
|
-
} = f, v = pe(), w = (
|
|
21313
|
-
function _(
|
|
21314
|
-
const
|
|
21315
|
-
for (const P of
|
|
21301
|
+
} = f, v = pe(), w = (q) => !!q && q.startsWith("branch:");
|
|
21302
|
+
function _(q) {
|
|
21303
|
+
const z = [];
|
|
21304
|
+
for (const P of q.memberIds) {
|
|
21316
21305
|
const K = s(P);
|
|
21317
|
-
K &&
|
|
21306
|
+
K && z.push(K);
|
|
21318
21307
|
}
|
|
21319
|
-
return
|
|
21308
|
+
return z;
|
|
21320
21309
|
}
|
|
21321
21310
|
const S = R(() => {
|
|
21322
|
-
const
|
|
21323
|
-
return m.value.forEach((
|
|
21324
|
-
if (
|
|
21311
|
+
const q = /* @__PURE__ */ new Map();
|
|
21312
|
+
return m.value.forEach((z, P) => {
|
|
21313
|
+
if (z.phase !== e || !z.position) return;
|
|
21325
21314
|
const K = s(P);
|
|
21326
|
-
K && (K.phase !== e || K.hidden ||
|
|
21327
|
-
}),
|
|
21315
|
+
K && (K.phase !== e || K.hidden || q.set(P, z));
|
|
21316
|
+
}), q;
|
|
21328
21317
|
}), C = R(() => {
|
|
21329
|
-
const
|
|
21330
|
-
return h.value.forEach((
|
|
21331
|
-
const K =
|
|
21332
|
-
K.length > 0 &&
|
|
21333
|
-
}),
|
|
21318
|
+
const q = /* @__PURE__ */ new Map();
|
|
21319
|
+
return h.value.forEach((z, P) => {
|
|
21320
|
+
const K = z.filter((ee) => ee.phase === e);
|
|
21321
|
+
K.length > 0 && q.set(P, K);
|
|
21322
|
+
}), q;
|
|
21334
21323
|
}), E = R(() => {
|
|
21335
|
-
const
|
|
21336
|
-
for (const
|
|
21337
|
-
const P = s(
|
|
21324
|
+
const q = [];
|
|
21325
|
+
for (const z of r.value.groups) {
|
|
21326
|
+
const P = s(z.ownerId);
|
|
21338
21327
|
if (!P || P.phase !== e) continue;
|
|
21339
|
-
const K =
|
|
21328
|
+
const K = z.position, ee = z.dimensions;
|
|
21340
21329
|
if (!K || !ee) continue;
|
|
21341
|
-
const ae = _(
|
|
21342
|
-
|
|
21343
|
-
id:
|
|
21330
|
+
const ae = _(z).filter((Y) => Y.phase === e && !Y.hidden), ne = y(z.id);
|
|
21331
|
+
q.push({
|
|
21332
|
+
id: z.id,
|
|
21344
21333
|
type: "group",
|
|
21345
21334
|
position: K,
|
|
21346
21335
|
width: ee.width,
|
|
21347
21336
|
height: ee.height,
|
|
21348
21337
|
data: {
|
|
21349
|
-
...
|
|
21338
|
+
...z,
|
|
21350
21339
|
memberIds: ae.map((Y) => Y.id)
|
|
21351
21340
|
},
|
|
21352
21341
|
draggable: !t,
|
|
@@ -21354,26 +21343,26 @@ function LL({ phase: e, readonly: t, flowId: n }) {
|
|
|
21354
21343
|
zIndex: ne * Ea + C2
|
|
21355
21344
|
});
|
|
21356
21345
|
}
|
|
21357
|
-
return
|
|
21346
|
+
return q;
|
|
21358
21347
|
}), x = R(() => {
|
|
21359
|
-
let
|
|
21360
|
-
for (const
|
|
21361
|
-
if (
|
|
21362
|
-
const P = y(
|
|
21363
|
-
P >
|
|
21348
|
+
let q = 0;
|
|
21349
|
+
for (const z of r.value.groups) {
|
|
21350
|
+
if (z.phase !== e) continue;
|
|
21351
|
+
const P = y(z.id);
|
|
21352
|
+
P > q && (q = P);
|
|
21364
21353
|
}
|
|
21365
|
-
return
|
|
21354
|
+
return q;
|
|
21366
21355
|
}), T = R(() => {
|
|
21367
|
-
const
|
|
21368
|
-
for (const
|
|
21369
|
-
if (
|
|
21370
|
-
const P = s(
|
|
21371
|
-
if (!P || P.phase !== e || P.hidden || !_(
|
|
21372
|
-
const ee = Math.max(g(P.id), y(
|
|
21373
|
-
id: `branch:${
|
|
21356
|
+
const q = [];
|
|
21357
|
+
for (const z of r.value.groups) {
|
|
21358
|
+
if (z.phase !== e || !z.position || !z.dimensions) continue;
|
|
21359
|
+
const P = s(z.ownerId);
|
|
21360
|
+
if (!P || P.phase !== e || P.hidden || !_(z).filter((ne) => ne.phase === e && !ne.hidden).length) continue;
|
|
21361
|
+
const ee = Math.max(g(P.id), y(z.id)) + x.value + 1, ae = {
|
|
21362
|
+
id: `branch:${z.id}`,
|
|
21374
21363
|
source: P.id,
|
|
21375
|
-
target:
|
|
21376
|
-
sourceHandle: `branch@${
|
|
21364
|
+
target: z.id,
|
|
21365
|
+
sourceHandle: `branch@${z.branch}`,
|
|
21377
21366
|
targetHandle: "input",
|
|
21378
21367
|
markerEnd: fr.ArrowClosed,
|
|
21379
21368
|
selectable: !1,
|
|
@@ -21382,19 +21371,19 @@ function LL({ phase: e, readonly: t, flowId: n }) {
|
|
|
21382
21371
|
data: {
|
|
21383
21372
|
type: "branch",
|
|
21384
21373
|
ownerId: P.id,
|
|
21385
|
-
branch:
|
|
21386
|
-
groupId:
|
|
21374
|
+
branch: z.branch,
|
|
21375
|
+
groupId: z.id
|
|
21387
21376
|
},
|
|
21388
21377
|
zIndex: ee * Ea + S2
|
|
21389
21378
|
};
|
|
21390
|
-
|
|
21379
|
+
q.push(ae);
|
|
21391
21380
|
}
|
|
21392
|
-
return
|
|
21381
|
+
return q;
|
|
21393
21382
|
}), I = /* @__PURE__ */ new Map(), O = /* @__PURE__ */ new Map();
|
|
21394
21383
|
let M;
|
|
21395
|
-
function b(
|
|
21396
|
-
if (
|
|
21397
|
-
const P = _(
|
|
21384
|
+
function b(q, z = !0) {
|
|
21385
|
+
if (q.phase !== e) return;
|
|
21386
|
+
const P = _(q).filter((Y) => Y.phase === e && !Y.hidden);
|
|
21398
21387
|
if (!P.length) return;
|
|
21399
21388
|
const K = [];
|
|
21400
21389
|
for (const Y of P) {
|
|
@@ -21409,7 +21398,7 @@ function LL({ phase: e, readonly: t, flowId: n }) {
|
|
|
21409
21398
|
const X = h.value.get(Y.id) ?? [];
|
|
21410
21399
|
for (const fe of X) {
|
|
21411
21400
|
if (fe.phase !== e) continue;
|
|
21412
|
-
const
|
|
21401
|
+
const he = I.get(fe.id), D = (he == null ? void 0 : he.position) ?? fe.position, $ = (he == null ? void 0 : he.dimensions) ?? fe.dimensions;
|
|
21413
21402
|
!D || !$ || K.push({
|
|
21414
21403
|
x: D.x,
|
|
21415
21404
|
y: D.y,
|
|
@@ -21428,21 +21417,21 @@ function LL({ phase: e, readonly: t, flowId: n }) {
|
|
|
21428
21417
|
width: Math.round(ae),
|
|
21429
21418
|
height: Math.round(ne)
|
|
21430
21419
|
},
|
|
21431
|
-
commit:
|
|
21420
|
+
commit: z
|
|
21432
21421
|
};
|
|
21433
21422
|
}
|
|
21434
|
-
function
|
|
21423
|
+
function U() {
|
|
21435
21424
|
if (I.size === 0) {
|
|
21436
21425
|
M = void 0;
|
|
21437
21426
|
return;
|
|
21438
21427
|
}
|
|
21439
|
-
const
|
|
21440
|
-
let
|
|
21428
|
+
const q = [];
|
|
21429
|
+
let z = !1;
|
|
21441
21430
|
I.forEach((P, K) => {
|
|
21442
21431
|
const ee = d(K, P, !1);
|
|
21443
|
-
|
|
21432
|
+
q.push({ id: K, changed: ee, commit: P.commit }), P.commit && ee && !z && (z = !0);
|
|
21444
21433
|
}), I.clear(), M = void 0;
|
|
21445
|
-
for (const { id: P, changed: K, commit: ee } of
|
|
21434
|
+
for (const { id: P, changed: K, commit: ee } of q) {
|
|
21446
21435
|
if (!K) continue;
|
|
21447
21436
|
const ae = a.value.get(P);
|
|
21448
21437
|
if (!ae) continue;
|
|
@@ -21453,32 +21442,32 @@ function LL({ phase: e, readonly: t, flowId: n }) {
|
|
|
21453
21442
|
const P = Array.from(O);
|
|
21454
21443
|
O.clear();
|
|
21455
21444
|
for (const [K, { commit: ee }] of P)
|
|
21456
|
-
|
|
21445
|
+
j(K, ee);
|
|
21457
21446
|
}
|
|
21458
|
-
|
|
21447
|
+
z && c("*");
|
|
21459
21448
|
}
|
|
21460
21449
|
function A() {
|
|
21461
|
-
I.size !== 0 && (M || (M = mt().then(
|
|
21450
|
+
I.size !== 0 && (M || (M = mt().then(U)));
|
|
21462
21451
|
}
|
|
21463
|
-
function q
|
|
21464
|
-
const P = a.value.get(
|
|
21452
|
+
function j(q, z = !0) {
|
|
21453
|
+
const P = a.value.get(q);
|
|
21465
21454
|
if (!P) return;
|
|
21466
|
-
const K = b(P,
|
|
21467
|
-
K && (I.set(
|
|
21455
|
+
const K = b(P, z);
|
|
21456
|
+
K && (I.set(q, K), A());
|
|
21468
21457
|
}
|
|
21469
|
-
function V(
|
|
21470
|
-
const ee = a.value.get(
|
|
21458
|
+
function V(q, z, P, K) {
|
|
21459
|
+
const ee = a.value.get(q);
|
|
21471
21460
|
if (!ee) return;
|
|
21472
21461
|
if (!ee.position) {
|
|
21473
|
-
u(
|
|
21462
|
+
u(q, z, !1), j(q);
|
|
21474
21463
|
return;
|
|
21475
21464
|
}
|
|
21476
21465
|
if (P === 0 && K === 0) {
|
|
21477
|
-
u(
|
|
21466
|
+
u(q, z, !1);
|
|
21478
21467
|
return;
|
|
21479
21468
|
}
|
|
21480
|
-
u(
|
|
21481
|
-
const ae = [
|
|
21469
|
+
u(q, z, !1);
|
|
21470
|
+
const ae = [q], ne = /* @__PURE__ */ new Set([q]), Y = /* @__PURE__ */ new Set();
|
|
21482
21471
|
for (; ae.length; ) {
|
|
21483
21472
|
const ge = ae.shift(), we = a.value.get(ge);
|
|
21484
21473
|
if (!we) continue;
|
|
@@ -21491,20 +21480,20 @@ function LL({ phase: e, readonly: t, flowId: n }) {
|
|
|
21491
21480
|
const X = C.value.get(ce.id) ?? [];
|
|
21492
21481
|
for (const fe of X) {
|
|
21493
21482
|
if (ne.has(fe.id)) continue;
|
|
21494
|
-
const
|
|
21495
|
-
|
|
21496
|
-
x:
|
|
21497
|
-
y:
|
|
21483
|
+
const he = a.value.get(fe.id);
|
|
21484
|
+
he != null && he.position && u(fe.id, {
|
|
21485
|
+
x: he.position.x + P,
|
|
21486
|
+
y: he.position.y + K
|
|
21498
21487
|
}, !1), ne.add(fe.id), ae.push(fe.id);
|
|
21499
21488
|
}
|
|
21500
21489
|
}
|
|
21501
21490
|
}
|
|
21502
21491
|
}
|
|
21503
|
-
function ue(
|
|
21492
|
+
function ue(q, z) {
|
|
21504
21493
|
const P = v.value;
|
|
21505
21494
|
if (!P) return !1;
|
|
21506
|
-
if (P ===
|
|
21507
|
-
for (const K of
|
|
21495
|
+
if (P === q || z.some((K) => P === K)) return !0;
|
|
21496
|
+
for (const K of z) {
|
|
21508
21497
|
const ee = C.value.get(K) ?? [];
|
|
21509
21498
|
if (ee != null && ee.some((ae) => ae.id === P))
|
|
21510
21499
|
return !0;
|
|
@@ -21513,24 +21502,24 @@ function LL({ phase: e, readonly: t, flowId: n }) {
|
|
|
21513
21502
|
}
|
|
21514
21503
|
const de = /* @__PURE__ */ new Map();
|
|
21515
21504
|
return Le(
|
|
21516
|
-
() => r.value.groups.filter((
|
|
21517
|
-
const P =
|
|
21505
|
+
() => r.value.groups.filter((z) => z.phase === e).map((z) => {
|
|
21506
|
+
const P = z.memberIds.map((K) => {
|
|
21518
21507
|
var Y, ge;
|
|
21519
21508
|
const ee = o(K), ae = Math.round(((Y = ee == null ? void 0 : ee.dimensions) == null ? void 0 : Y.width) ?? 0), ne = Math.round(((ge = ee == null ? void 0 : ee.dimensions) == null ? void 0 : ge.height) ?? 0);
|
|
21520
21509
|
return `${K}:${ae}x${ne}`;
|
|
21521
21510
|
});
|
|
21522
21511
|
return {
|
|
21523
|
-
id:
|
|
21524
|
-
memberIds:
|
|
21512
|
+
id: z.id,
|
|
21513
|
+
memberIds: z.memberIds,
|
|
21525
21514
|
signature: P.join(",")
|
|
21526
21515
|
};
|
|
21527
21516
|
}),
|
|
21528
|
-
(
|
|
21529
|
-
const
|
|
21517
|
+
(q) => {
|
|
21518
|
+
const z = new Set(q.map((P) => P.id));
|
|
21530
21519
|
for (const P of de.keys())
|
|
21531
|
-
|
|
21532
|
-
for (const P of
|
|
21533
|
-
ue(P.id, P.memberIds) || de.get(P.id) === P.signature || (de.set(P.id, P.signature),
|
|
21520
|
+
z.has(P) || de.delete(P);
|
|
21521
|
+
for (const P of q)
|
|
21522
|
+
ue(P.id, P.memberIds) || de.get(P.id) === P.signature || (de.set(P.id, P.signature), j(P.id));
|
|
21534
21523
|
},
|
|
21535
21524
|
{
|
|
21536
21525
|
deep: !0,
|
|
@@ -21542,10 +21531,10 @@ function LL({ phase: e, readonly: t, flowId: n }) {
|
|
|
21542
21531
|
groupNodes: E,
|
|
21543
21532
|
branchEdges: T,
|
|
21544
21533
|
isBranchEdgeId: w,
|
|
21545
|
-
updateGroupLayout:
|
|
21534
|
+
updateGroupLayout: j,
|
|
21546
21535
|
translateGroupTree: V,
|
|
21547
|
-
updateDragging: (
|
|
21548
|
-
v.value =
|
|
21536
|
+
updateDragging: (q) => {
|
|
21537
|
+
v.value = q;
|
|
21549
21538
|
},
|
|
21550
21539
|
getNodeDepth: g,
|
|
21551
21540
|
maxGroupDepth: x,
|
|
@@ -21630,17 +21619,17 @@ const [jL, qL] = ql(
|
|
|
21630
21619
|
setNodes: O,
|
|
21631
21620
|
setEdges: M,
|
|
21632
21621
|
addSelectedNodes: b,
|
|
21633
|
-
screenToFlowCoordinate:
|
|
21622
|
+
screenToFlowCoordinate: U
|
|
21634
21623
|
} = u;
|
|
21635
21624
|
y.value = ["Delete", "Backspace"];
|
|
21636
21625
|
const {
|
|
21637
21626
|
state: A,
|
|
21638
|
-
commit:
|
|
21627
|
+
commit: j,
|
|
21639
21628
|
moveNode: V,
|
|
21640
21629
|
selectNode: ue,
|
|
21641
21630
|
removeNode: de,
|
|
21642
|
-
getNodeById:
|
|
21643
|
-
connectEdge:
|
|
21631
|
+
getNodeById: q,
|
|
21632
|
+
connectEdge: z,
|
|
21644
21633
|
disconnectEdge: P,
|
|
21645
21634
|
getInEdgesByNodeId: K,
|
|
21646
21635
|
branchGroups: ee,
|
|
@@ -21649,7 +21638,7 @@ const [jL, qL] = ql(
|
|
|
21649
21638
|
groupMapById: Y
|
|
21650
21639
|
} = d, { isGroupId: ge } = ee;
|
|
21651
21640
|
function we(ke, ze) {
|
|
21652
|
-
const Oe =
|
|
21641
|
+
const Oe = q(ke.source), $e = q(ke.target);
|
|
21653
21642
|
return !!(Oe && $e && Oe.phase === ze && $e.phase === ze);
|
|
21654
21643
|
}
|
|
21655
21644
|
const Se = LL({
|
|
@@ -21660,7 +21649,7 @@ const [jL, qL] = ql(
|
|
|
21660
21649
|
memberGroupMap: ce,
|
|
21661
21650
|
groupNodes: X,
|
|
21662
21651
|
branchEdges: fe,
|
|
21663
|
-
isBranchEdgeId:
|
|
21652
|
+
isBranchEdgeId: he,
|
|
21664
21653
|
updateGroupLayout: D,
|
|
21665
21654
|
translateGroupTree: $,
|
|
21666
21655
|
updateDragging: L,
|
|
@@ -21693,10 +21682,10 @@ const [jL, qL] = ql(
|
|
|
21693
21682
|
})
|
|
21694
21683
|
), Z = R(
|
|
21695
21684
|
() => A.value.edges.filter((ke) => we(ke, t)).filter((ke) => !ee.isEdgeEnteringGroup(ke.source, ke.target)).filter((ke) => {
|
|
21696
|
-
const ze =
|
|
21685
|
+
const ze = q(ke.source), Oe = q(ke.target);
|
|
21697
21686
|
return !(ze != null && ze.hidden) && !(Oe != null && Oe.hidden);
|
|
21698
21687
|
}).map((ke) => {
|
|
21699
|
-
const ze =
|
|
21688
|
+
const ze = q(ke.source), Oe = q(ke.target);
|
|
21700
21689
|
if (!ze || !Oe) {
|
|
21701
21690
|
const Ne = [];
|
|
21702
21691
|
throw ze || Ne.push(`source node "${ke.source}"`), Oe || Ne.push(`target node "${ke.target}"`), new Error(`Missing ${Ne.join(" and ")} for edge "${ke.id}" in phase "${t}"`);
|
|
@@ -21744,17 +21733,17 @@ const [jL, qL] = ql(
|
|
|
21744
21733
|
let Ke = !1, We = !1;
|
|
21745
21734
|
const Ye = [], ot = [], Xe = (Ve == null ? void 0 : Ve.io) === "input" ? Ge.filter((yt) => !yt.targetField) : Ge.filter((yt) => !!yt.targetField);
|
|
21746
21735
|
Xe.length > 0 && (Ke = !0, Xe.forEach((yt) => {
|
|
21747
|
-
ot.push(Yi(yt,
|
|
21736
|
+
ot.push(Yi(yt, q)), P(yt.id, !1);
|
|
21748
21737
|
}));
|
|
21749
21738
|
const ht = (Ve == null ? void 0 : Ve.io) === "input" ? Ve != null && Ve.field ? Ge.filter((yt) => yt.targetField === Ve.field) : Ge.filter((yt) => !!yt.targetField) : Ge.filter((yt) => !yt.targetField);
|
|
21750
21739
|
if (ht.length > 0) {
|
|
21751
21740
|
if (ht.some((tn) => tn.source === ke && tn.target === Oe && tn.targetField === (Ve == null ? void 0 : Ve.field) && tn.sourceField === (Ne == null ? void 0 : Ne.field)))
|
|
21752
21741
|
return;
|
|
21753
21742
|
We = !0, ht.forEach((tn) => {
|
|
21754
|
-
ot.push(Yi(tn,
|
|
21743
|
+
ot.push(Yi(tn, q)), P(tn.id, !1);
|
|
21755
21744
|
});
|
|
21756
21745
|
}
|
|
21757
|
-
if (!
|
|
21746
|
+
if (!z({
|
|
21758
21747
|
source: ke,
|
|
21759
21748
|
sourceField: Ne == null ? void 0 : Ne.field,
|
|
21760
21749
|
target: Oe,
|
|
@@ -21772,7 +21761,7 @@ const [jL, qL] = ql(
|
|
|
21772
21761
|
Ne == null ? void 0 : Ne.field,
|
|
21773
21762
|
Oe,
|
|
21774
21763
|
Ve == null ? void 0 : Ve.field,
|
|
21775
|
-
|
|
21764
|
+
q
|
|
21776
21765
|
)
|
|
21777
21766
|
), Ke || We) {
|
|
21778
21767
|
if (!c)
|
|
@@ -21830,13 +21819,13 @@ const [jL, qL] = ql(
|
|
|
21830
21819
|
y: Ye.position.y + ke.position.y
|
|
21831
21820
|
});
|
|
21832
21821
|
}
|
|
21833
|
-
if (V(Oe, Ne, !1), !ml(
|
|
21822
|
+
if (V(Oe, Ne, !1), !ml(q(Oe))) {
|
|
21834
21823
|
const Ye = {
|
|
21835
21824
|
x: Ne.x,
|
|
21836
21825
|
y: Ne.y,
|
|
21837
21826
|
width: ((Ge = ke.dimensions) == null ? void 0 : Ge.width) ?? 0,
|
|
21838
21827
|
height: ((Ke = ke.dimensions) == null ? void 0 : Ke.height) ?? 0
|
|
21839
|
-
}, ot = ze && "clientX" in ze ?
|
|
21828
|
+
}, ot = ze && "clientX" in ze ? U({ x: ze.clientX, y: ze.clientY }) : void 0, Xe = {
|
|
21840
21829
|
x: Ye.x + Ye.width / 2,
|
|
21841
21830
|
y: Ye.y + Ye.height / 2
|
|
21842
21831
|
};
|
|
@@ -21848,7 +21837,7 @@ const [jL, qL] = ql(
|
|
|
21848
21837
|
var Ve;
|
|
21849
21838
|
if (!ke) return;
|
|
21850
21839
|
if (L(void 0), ge(ke.id)) {
|
|
21851
|
-
|
|
21840
|
+
j();
|
|
21852
21841
|
return;
|
|
21853
21842
|
}
|
|
21854
21843
|
const ze = ke.id, Oe = ke.parentNode;
|
|
@@ -21862,10 +21851,10 @@ const [jL, qL] = ql(
|
|
|
21862
21851
|
}
|
|
21863
21852
|
V(ze, $e, !1);
|
|
21864
21853
|
const Ne = Oe && ge(Oe) ? Oe : (Ve = ce.value.get(ze)) == null ? void 0 : Ve.id;
|
|
21865
|
-
Ne && D(Ne, !1), Mt(ze), me(),
|
|
21854
|
+
Ne && D(Ne, !1), Mt(ze), me(), j();
|
|
21866
21855
|
}), C((ke) => {
|
|
21867
21856
|
ke.filter(($e) => $e.type === "select").sort(($e, Ne) => $e.selected === Ne.selected ? 0 : $e.selected ? 1 : -1).forEach(($e) => {
|
|
21868
|
-
|
|
21857
|
+
he($e.id) || (Hh = $e.selected ? $e.id : void 0, M((Ne) => Ne.map((Ve) => Ve.id !== $e.id || !Ve.markerEnd ? Ve : Br({
|
|
21869
21858
|
...Ve,
|
|
21870
21859
|
zIndex: $e.selected ? 1 : void 0
|
|
21871
21860
|
}))));
|
|
@@ -21873,16 +21862,16 @@ const [jL, qL] = ql(
|
|
|
21873
21862
|
let Oe = !1;
|
|
21874
21863
|
ke.forEach(($e) => {
|
|
21875
21864
|
if ($e.type === "remove") {
|
|
21876
|
-
if (
|
|
21865
|
+
if (he($e.id)) return;
|
|
21877
21866
|
Oe = !0, P($e.id, !1);
|
|
21878
21867
|
}
|
|
21879
21868
|
}), Oe && !Ie && (Ie = !0, queueMicrotask(Pe));
|
|
21880
21869
|
}), x(({ edge: ke }) => {
|
|
21881
|
-
|
|
21870
|
+
he(ke.id) || (Ll = ke.id, M((ze) => ze.map((Oe) => Oe.id !== ke.id ? Oe : Br(Oe))));
|
|
21882
21871
|
}), T(({ edge: ke }) => {
|
|
21883
|
-
|
|
21872
|
+
he(ke.id) || (Ll = void 0, M((ze) => ze.map((Oe) => Oe.id !== ke.id ? Oe : Br(Oe))));
|
|
21884
21873
|
}), E(({ edge: ke, connection: ze }) => {
|
|
21885
|
-
|
|
21874
|
+
he(ke.id) || (P(ke.id, !1), re(ze));
|
|
21886
21875
|
});
|
|
21887
21876
|
function Ce(ke) {
|
|
21888
21877
|
g({
|
|
@@ -22026,8 +22015,8 @@ const WL = {
|
|
|
22026
22015
|
return (n, o) => (k(), Q("span", {
|
|
22027
22016
|
class: Je(["dk-hotkey-label", { reverse: e.reverse }])
|
|
22028
22017
|
}, [
|
|
22029
|
-
e.label ? (k(), Q("span", WL,
|
|
22030
|
-
J("kbd", XL,
|
|
22018
|
+
e.label ? (k(), Q("span", WL, ve(e.label), 1)) : Ee("", !0),
|
|
22019
|
+
J("kbd", XL, ve(p(t)), 1)
|
|
22031
22020
|
], 2));
|
|
22032
22021
|
}
|
|
22033
22022
|
}), Aa = /* @__PURE__ */ je(ZL, [["__scopeId", "data-v-cc70d56b"]]), JL = ["onClick"], QL = {
|
|
@@ -22111,7 +22100,7 @@ const WL = {
|
|
|
22111
22100
|
color: p(Ha),
|
|
22112
22101
|
size: eK
|
|
22113
22102
|
}, null, 8, ["color"])),
|
|
22114
|
-
v === 0 && m.value > 0 ? (k(), Q("span", QL, " +" +
|
|
22103
|
+
v === 0 && m.value > 0 ? (k(), Q("span", QL, " +" + ve(m.value), 1)) : Ee("", !0)
|
|
22115
22104
|
], 10, JL)
|
|
22116
22105
|
]),
|
|
22117
22106
|
_: 2
|
|
@@ -22168,7 +22157,7 @@ const WL = {
|
|
|
22168
22157
|
size: e.size
|
|
22169
22158
|
}, at({
|
|
22170
22159
|
default: F(() => [
|
|
22171
|
-
Me(" " +
|
|
22160
|
+
Me(" " + ve(n.value), 1)
|
|
22172
22161
|
]),
|
|
22173
22162
|
_: 2
|
|
22174
22163
|
}, [
|
|
@@ -22223,11 +22212,11 @@ const WL = {
|
|
|
22223
22212
|
return Vu(ee);
|
|
22224
22213
|
}
|
|
22225
22214
|
return (K = c.value.io) == null ? void 0 : K.output;
|
|
22226
|
-
}), x = R(() => ml(e.data)), T = R(() => e.data.phase === "response"), I = R(() => e.data.phase === "request" ? Fe.Left : Fe.Right), O = R(() => e.data.phase === "request" ? Fe.Right : Fe.Left), M = R(() => e.data.phase === "request" ? Fe.Right : Fe.Left), b = R(() => x.value ? t(`plugins.free-form.datakit.flow_editor.node_types.${e.data.type}.name`) : e.data.name),
|
|
22215
|
+
}), x = R(() => ml(e.data)), T = R(() => e.data.phase === "response"), I = R(() => e.data.phase === "request" ? Fe.Left : Fe.Right), O = R(() => e.data.phase === "request" ? Fe.Right : Fe.Left), M = R(() => e.data.phase === "request" ? Fe.Right : Fe.Left), b = R(() => x.value ? t(`plugins.free-form.datakit.flow_editor.node_types.${e.data.type}.name`) : e.data.name), U = R(() => x.value ? qA : zA);
|
|
22227
22216
|
function A(P) {
|
|
22228
22217
|
return P === "input" ? T.value : !T.value;
|
|
22229
22218
|
}
|
|
22230
|
-
function
|
|
22219
|
+
function j(P) {
|
|
22231
22220
|
const K = /* @__PURE__ */ new Map(), ee = P === "input" ? o(e.data.id) : i(e.data.id);
|
|
22232
22221
|
for (const ae of ee) {
|
|
22233
22222
|
const ne = r(P === "input" ? ae.source : ae.target);
|
|
@@ -22257,16 +22246,16 @@ const WL = {
|
|
|
22257
22246
|
}
|
|
22258
22247
|
return K;
|
|
22259
22248
|
}
|
|
22260
|
-
const V = R(() =>
|
|
22249
|
+
const V = R(() => j("input")), ue = R(() => j("output"));
|
|
22261
22250
|
function de(P) {
|
|
22262
22251
|
!n || n.readonly || P === "input" && !h.value || P === "output" && !g.value || a(e.data.id, P);
|
|
22263
22252
|
}
|
|
22264
|
-
async function
|
|
22253
|
+
async function q() {
|
|
22265
22254
|
if (!n || n.readonly) return;
|
|
22266
22255
|
const P = s(e.data.id, n.placeToRight(e.data.id));
|
|
22267
22256
|
await n.selectNode(P), n.scrollRightToReveal(P), u.value = !0;
|
|
22268
22257
|
}
|
|
22269
|
-
function
|
|
22258
|
+
function z() {
|
|
22270
22259
|
d.removeMember(e.data.id);
|
|
22271
22260
|
}
|
|
22272
22261
|
return Le(h, (P) => {
|
|
@@ -22300,7 +22289,7 @@ const WL = {
|
|
|
22300
22289
|
]),
|
|
22301
22290
|
_: 1
|
|
22302
22291
|
}, 8, ["text"])),
|
|
22303
|
-
J("div", rK,
|
|
22292
|
+
J("div", rK, ve(b.value), 1),
|
|
22304
22293
|
e.error ? (k(), H(p(Hv), {
|
|
22305
22294
|
key: 1,
|
|
22306
22295
|
class: "error-icon",
|
|
@@ -22321,7 +22310,7 @@ const WL = {
|
|
|
22321
22310
|
}, ["stop"]))
|
|
22322
22311
|
}, {
|
|
22323
22312
|
items: F(() => [
|
|
22324
|
-
N(p(Ur), { onClick:
|
|
22313
|
+
N(p(Ur), { onClick: q }, {
|
|
22325
22314
|
default: F(() => [
|
|
22326
22315
|
N(Aa, {
|
|
22327
22316
|
keys: p(ka).duplicate,
|
|
@@ -22332,10 +22321,10 @@ const WL = {
|
|
|
22332
22321
|
}),
|
|
22333
22322
|
S.value ? (k(), H(p(Ur), {
|
|
22334
22323
|
key: 0,
|
|
22335
|
-
onClick:
|
|
22324
|
+
onClick: z
|
|
22336
22325
|
}, {
|
|
22337
22326
|
default: F(() => [
|
|
22338
|
-
Me(
|
|
22327
|
+
Me(ve(p(t)("plugins.free-form.datakit.flow_editor.actions.remove_from_branch")), 1)
|
|
22339
22328
|
]),
|
|
22340
22329
|
_: 1
|
|
22341
22330
|
})) : Ee("", !0),
|
|
@@ -22409,7 +22398,7 @@ const WL = {
|
|
|
22409
22398
|
], 2),
|
|
22410
22399
|
f.value && y.value ? (k(), H(jr, {
|
|
22411
22400
|
key: 0,
|
|
22412
|
-
color:
|
|
22401
|
+
color: U.value,
|
|
22413
22402
|
position: I.value,
|
|
22414
22403
|
type: "bar"
|
|
22415
22404
|
}, null, 8, ["color", "position"])) : Ee("", !0)
|
|
@@ -22431,9 +22420,9 @@ const WL = {
|
|
|
22431
22420
|
targets: V.value.get(ee.id)
|
|
22432
22421
|
}, null, 8, ["reversed", "targets"])) : Ee("", !0),
|
|
22433
22422
|
J("div", lK, [
|
|
22434
|
-
J("div", uK,
|
|
22423
|
+
J("div", uK, ve(ee.name), 1),
|
|
22435
22424
|
N(jr, {
|
|
22436
|
-
color:
|
|
22425
|
+
color: U.value,
|
|
22437
22426
|
position: I.value,
|
|
22438
22427
|
type: ae < e.data.fields.input.length - 1 ? "trident" : "corner"
|
|
22439
22428
|
}, null, 8, ["color", "position", "type"])
|
|
@@ -22467,7 +22456,7 @@ const WL = {
|
|
|
22467
22456
|
], 2),
|
|
22468
22457
|
m.value && v.value ? (k(), H(jr, {
|
|
22469
22458
|
key: 0,
|
|
22470
|
-
color:
|
|
22459
|
+
color: U.value,
|
|
22471
22460
|
position: O.value,
|
|
22472
22461
|
type: "bar"
|
|
22473
22462
|
}, null, 8, ["color", "position"])) : Ee("", !0)
|
|
@@ -22489,9 +22478,9 @@ const WL = {
|
|
|
22489
22478
|
class: "handle indented"
|
|
22490
22479
|
}, [
|
|
22491
22480
|
J("div", fK, [
|
|
22492
|
-
J("div", pK,
|
|
22481
|
+
J("div", pK, ve(ee.name), 1),
|
|
22493
22482
|
N(jr, {
|
|
22494
|
-
color:
|
|
22483
|
+
color: U.value,
|
|
22495
22484
|
position: O.value,
|
|
22496
22485
|
type: ae < e.data.fields.output.length - 1 ? "trident" : "corner"
|
|
22497
22486
|
}, null, 8, ["color", "position", "type"])
|
|
@@ -22515,7 +22504,7 @@ const WL = {
|
|
|
22515
22504
|
class: "handle"
|
|
22516
22505
|
}, [
|
|
22517
22506
|
J("div", gK, [
|
|
22518
|
-
J("div", hK,
|
|
22507
|
+
J("div", hK, ve(ee), 1)
|
|
22519
22508
|
]),
|
|
22520
22509
|
N(p(kn), {
|
|
22521
22510
|
id: `branch@${ee}`,
|
|
@@ -22580,19 +22569,19 @@ const WL = {
|
|
|
22580
22569
|
},
|
|
22581
22570
|
readonly: e.mode !== "edit"
|
|
22582
22571
|
}), { addNode: y, propertiesPanelOpen: v, invalidConfigNodeIds: w, selectedNode: _, duplicateNode: S, commit: C, selectPortalEdge: E } = l, { screenToFlowCoordinate: x, zoomIn: T, zoomOut: I, viewport: O, maxZoom: M, minZoom: b } = s, {
|
|
22583
|
-
activeGroupId:
|
|
22572
|
+
activeGroupId: U,
|
|
22584
22573
|
startPanelDrag: A,
|
|
22585
|
-
endPanelDrag:
|
|
22574
|
+
endPanelDrag: j,
|
|
22586
22575
|
updateActiveGroup: V,
|
|
22587
22576
|
attachNodeToActiveGroup: ue
|
|
22588
22577
|
} = g, de = pe(!1);
|
|
22589
|
-
function
|
|
22578
|
+
function q(Y) {
|
|
22590
22579
|
var we;
|
|
22591
22580
|
const ge = (we = Y.dataTransfer) == null ? void 0 : we.types.find((Se) => Se.startsWith(`${Gi}/`));
|
|
22592
22581
|
if (ge)
|
|
22593
22582
|
return ge.replace(`${Gi}/`, "");
|
|
22594
22583
|
}
|
|
22595
|
-
function
|
|
22584
|
+
function z(Y) {
|
|
22596
22585
|
var ge;
|
|
22597
22586
|
if (e.mode === "edit") {
|
|
22598
22587
|
if (((ge = Y == null ? void 0 : Y.node) == null ? void 0 : ge.type) === "group") {
|
|
@@ -22620,12 +22609,12 @@ const WL = {
|
|
|
22620
22609
|
x: Se.x - X.offsetX,
|
|
22621
22610
|
y: Se.y - X.offsetY
|
|
22622
22611
|
}
|
|
22623
|
-
},
|
|
22624
|
-
if (!
|
|
22625
|
-
|
|
22612
|
+
}, he = y(fe, !1);
|
|
22613
|
+
if (!he) {
|
|
22614
|
+
j();
|
|
22626
22615
|
return;
|
|
22627
22616
|
}
|
|
22628
|
-
ue(
|
|
22617
|
+
ue(he), C(), f(he), v.value = !0, j();
|
|
22629
22618
|
}
|
|
22630
22619
|
async function ee() {
|
|
22631
22620
|
await u(), setTimeout(() => c(), 0);
|
|
@@ -22641,7 +22630,7 @@ const WL = {
|
|
|
22641
22630
|
});
|
|
22642
22631
|
if (e.phase === "response" && e.mode === "edit") {
|
|
22643
22632
|
Zn("dragstart", (ge) => {
|
|
22644
|
-
|
|
22633
|
+
q(ge) === "call" && (de.value = !0);
|
|
22645
22634
|
});
|
|
22646
22635
|
const { start: Y } = Fv(() => {
|
|
22647
22636
|
de.value = !1;
|
|
@@ -22653,9 +22642,9 @@ const WL = {
|
|
|
22653
22642
|
});
|
|
22654
22643
|
}
|
|
22655
22644
|
e.mode === "edit" && (Zn("dragstart", (Y) => {
|
|
22656
|
-
|
|
22645
|
+
q(Y) && A();
|
|
22657
22646
|
}), Zn("dragend", () => {
|
|
22658
|
-
|
|
22647
|
+
j();
|
|
22659
22648
|
}));
|
|
22660
22649
|
async function ne() {
|
|
22661
22650
|
const Y = _.value;
|
|
@@ -22688,7 +22677,7 @@ const WL = {
|
|
|
22688
22677
|
"zoom-on-scroll": e.mode !== "edit" ? !1 : void 0,
|
|
22689
22678
|
onDragover: P,
|
|
22690
22679
|
onDrop: K,
|
|
22691
|
-
onNodeClick:
|
|
22680
|
+
onNodeClick: z,
|
|
22692
22681
|
onNodesChange: ge[0] || (ge[0] = (we) => o("nodes-change")),
|
|
22693
22682
|
onNodesInitialized: ge[1] || (ge[1] = (we) => o("initialized"))
|
|
22694
22683
|
}, {
|
|
@@ -22701,7 +22690,7 @@ const WL = {
|
|
|
22701
22690
|
]),
|
|
22702
22691
|
"node-group": F(({ data: we }) => [
|
|
22703
22692
|
N(_K, {
|
|
22704
|
-
active: p(
|
|
22693
|
+
active: p(U) === we.id,
|
|
22705
22694
|
data: we
|
|
22706
22695
|
}, null, 8, ["active", "data"])
|
|
22707
22696
|
]),
|
|
@@ -22739,7 +22728,7 @@ const WL = {
|
|
|
22739
22728
|
]),
|
|
22740
22729
|
_: 1
|
|
22741
22730
|
}, 8, ["id", "class", "elements-selectable", "max-zoom", "min-zoom", "nodes-connectable", "nodes-draggable", "pan-on-drag", "pan-on-scroll", "zoom-on-double-click", "zoom-on-pinch", "zoom-on-scroll"]),
|
|
22742
|
-
de.value ? (k(), Q("div", bK,
|
|
22731
|
+
de.value ? (k(), Q("div", bK, ve(p(a)("plugins.free-form.datakit.flow_editor.phase_mask_help")), 1)) : Ee("", !0)
|
|
22743
22732
|
], 512));
|
|
22744
22733
|
}
|
|
22745
22734
|
}), Nf = /* @__PURE__ */ je(wK, [["__scopeId", "data-v-c1890d6b"]]), EK = { class: "label-content" }, kK = { class: "count" }, CK = { class: "label-content" }, xK = { class: "count" }, $f = 0.5, js = 0.03, SK = 30, AK = /* @__PURE__ */ _e({
|
|
@@ -22752,7 +22741,7 @@ const WL = {
|
|
|
22752
22741
|
setup(e) {
|
|
22753
22742
|
const { t } = Nt("en-us", $t), n = pe(!1), o = pe(!1), { responsePanelCollapsed: i } = Ya(), { state: r, configNodeCounts: a, clearPendingLayout: s, setPendingFitView: l, commit: u, clear: d, portalSelection: c } = vt(), f = Hf(), m = `${f}-request`, h = `${f}-response`, g = nt(m), y = nt(h);
|
|
22754
22743
|
function v(X, fe) {
|
|
22755
|
-
const { onPaneClick:
|
|
22744
|
+
const { onPaneClick: he, onNodesChange: D, onEdgesChange: $, getSelectedNodes: L, getSelectedEdges: B } = X, { removeSelectedElements: le } = fe;
|
|
22756
22745
|
function oe(te) {
|
|
22757
22746
|
if (!te) {
|
|
22758
22747
|
le();
|
|
@@ -22760,20 +22749,20 @@ const WL = {
|
|
|
22760
22749
|
}
|
|
22761
22750
|
te.some((G) => G.type === "select") && L.value.length + B.value.length > 0 && le();
|
|
22762
22751
|
}
|
|
22763
|
-
D(oe), $(oe),
|
|
22752
|
+
D(oe), $(oe), he(() => oe());
|
|
22764
22753
|
}
|
|
22765
22754
|
v(g, y), v(y, g), Le(c, (X) => {
|
|
22766
22755
|
X && (g.removeSelectedElements(), y.removeSelectedElements());
|
|
22767
22756
|
});
|
|
22768
|
-
const w = pt("flowPanels"), _ = pt("requestLabel"), S = pt("requestCanvasContainer"), C = pt("requestFlow"), E = pt("resizeHandle"), x = pt("responseLabel"), T = pt("responseCanvasContainer"), I = pt("responseFlow"), O = go(w), M = go(_), b = go(S),
|
|
22769
|
-
() => O.height.value - M.height.value -
|
|
22757
|
+
const w = pt("flowPanels"), _ = pt("requestLabel"), S = pt("requestCanvasContainer"), C = pt("requestFlow"), E = pt("resizeHandle"), x = pt("responseLabel"), T = pt("responseCanvasContainer"), I = pt("responseFlow"), O = go(w), M = go(_), b = go(S), U = go(E), A = go(x), j = go(T), V = R(() => Math.max(SK, O.height.value * js)), ue = R(
|
|
22758
|
+
() => O.height.value - M.height.value - U.height.value - A.height.value
|
|
22770
22759
|
), de = R(() => {
|
|
22771
22760
|
const X = ue.value;
|
|
22772
22761
|
return X ? Math.max(js, V.value / X) : js;
|
|
22773
|
-
}),
|
|
22762
|
+
}), q = pe($f), z = R(() => `${q.value * 100}%`), P = R(() => `${(1 - q.value) * 100}%`), K = R(() => q.value <= de.value), ee = R(() => 1 - q.value <= de.value);
|
|
22774
22763
|
function ae(X, { persist: fe = !0 } = {}) {
|
|
22775
|
-
const
|
|
22776
|
-
|
|
22764
|
+
const he = Math.min(1, Math.max(0, X));
|
|
22765
|
+
q.value = he, fe && e.mode === "edit" && (i.value = ee.value);
|
|
22777
22766
|
}
|
|
22778
22767
|
function ne(X, fe = !0) {
|
|
22779
22768
|
ae(X ? 1 : $f, { persist: fe });
|
|
@@ -22795,17 +22784,17 @@ const WL = {
|
|
|
22795
22784
|
}, { isDragging: Se } = Lv(E, {
|
|
22796
22785
|
onMove(X) {
|
|
22797
22786
|
if (!e.resizable) return;
|
|
22798
|
-
const fe = Math.max(0, X.y - b.top.value),
|
|
22787
|
+
const fe = Math.max(0, X.y - b.top.value), he = Math.min(
|
|
22799
22788
|
1,
|
|
22800
22789
|
Math.max(
|
|
22801
22790
|
0,
|
|
22802
22791
|
fe / ue.value
|
|
22803
22792
|
)
|
|
22804
22793
|
);
|
|
22805
|
-
ae(
|
|
22794
|
+
ae(he, { persist: !1 });
|
|
22806
22795
|
},
|
|
22807
22796
|
onEnd() {
|
|
22808
|
-
e.resizable && (b.height.value < V.value ? Y() :
|
|
22797
|
+
e.resizable && (b.height.value < V.value ? Y() : j.height.value < V.value ? ne(!0) : ae(q.value));
|
|
22809
22798
|
}
|
|
22810
22799
|
});
|
|
22811
22800
|
function ce() {
|
|
@@ -22816,10 +22805,10 @@ const WL = {
|
|
|
22816
22805
|
}
|
|
22817
22806
|
return Le(
|
|
22818
22807
|
[n, o, () => r.value.pendingLayout, () => r.value.pendingFitView],
|
|
22819
|
-
([X, fe,
|
|
22820
|
-
e.inactive || !X || !fe || !
|
|
22808
|
+
([X, fe, he, D]) => {
|
|
22809
|
+
e.inactive || !X || !fe || !he && !D || (he && s(), D && l(!1), setTimeout(async () => {
|
|
22821
22810
|
var $, L;
|
|
22822
|
-
|
|
22811
|
+
he && (await (($ = C.value) == null ? void 0 : $.autoLayout(!1)), await ((L = I.value) == null ? void 0 : L.autoLayout(!1)), u("*"), he === "clearHistory" && d()), D && setTimeout(() => ce(), 0);
|
|
22823
22812
|
}, 0));
|
|
22824
22813
|
}
|
|
22825
22814
|
), (X, fe) => (k(), Q("div", {
|
|
@@ -22838,12 +22827,12 @@ const WL = {
|
|
|
22838
22827
|
class: Je(["icon", { collapsed: K.value }])
|
|
22839
22828
|
}, null, 8, ["class"])) : Ee("", !0),
|
|
22840
22829
|
J("div", EK, [
|
|
22841
|
-
Me(
|
|
22830
|
+
Me(ve(p(t)("plugins.free-form.datakit.flow_editor.canvas_panel.request")) + " ", 1),
|
|
22842
22831
|
J("span", kK, [
|
|
22843
22832
|
p(a).request === 1 ? (k(), Q(Be, { key: 0 }, [
|
|
22844
|
-
Me(" (" +
|
|
22833
|
+
Me(" (" + ve(p(t)("plugins.free-form.datakit.flow_editor.canvas_panel.node_count_singular")) + ") ", 1)
|
|
22845
22834
|
], 64)) : (k(), Q(Be, { key: 1 }, [
|
|
22846
|
-
Me(" (" +
|
|
22835
|
+
Me(" (" + ve(p(t)("plugins.free-form.datakit.flow_editor.canvas_panel.node_count_plural", { count: p(a).request })) + ") ", 1)
|
|
22847
22836
|
], 64))
|
|
22848
22837
|
])
|
|
22849
22838
|
])
|
|
@@ -22852,7 +22841,7 @@ const WL = {
|
|
|
22852
22841
|
ref_key: "requestCanvasContainer",
|
|
22853
22842
|
ref: S,
|
|
22854
22843
|
class: Je(["canvas", { dragging: p(Se) }]),
|
|
22855
|
-
style: Kt({ flexBasis:
|
|
22844
|
+
style: Kt({ flexBasis: z.value })
|
|
22856
22845
|
}, [
|
|
22857
22846
|
N(Nf, {
|
|
22858
22847
|
ref_key: "requestFlow",
|
|
@@ -22860,8 +22849,8 @@ const WL = {
|
|
|
22860
22849
|
"flow-id": m,
|
|
22861
22850
|
mode: e.mode,
|
|
22862
22851
|
phase: "request",
|
|
22863
|
-
onInitialized: fe[0] || (fe[0] = (
|
|
22864
|
-
onNodesChange: fe[1] || (fe[1] = (
|
|
22852
|
+
onInitialized: fe[0] || (fe[0] = (he) => n.value = !0),
|
|
22853
|
+
onNodesChange: fe[1] || (fe[1] = (he) => n.value = !1)
|
|
22865
22854
|
}, null, 8, ["mode"])
|
|
22866
22855
|
], 6),
|
|
22867
22856
|
J("div", {
|
|
@@ -22880,12 +22869,12 @@ const WL = {
|
|
|
22880
22869
|
class: Je(["icon", { collapsed: ee.value }])
|
|
22881
22870
|
}, null, 8, ["class"])) : Ee("", !0),
|
|
22882
22871
|
J("div", CK, [
|
|
22883
|
-
Me(
|
|
22872
|
+
Me(ve(p(t)("plugins.free-form.datakit.flow_editor.canvas_panel.response")) + " ", 1),
|
|
22884
22873
|
J("span", xK, [
|
|
22885
22874
|
p(a).response === 1 ? (k(), Q(Be, { key: 0 }, [
|
|
22886
|
-
Me(" (" +
|
|
22875
|
+
Me(" (" + ve(p(t)("plugins.free-form.datakit.flow_editor.canvas_panel.node_count_singular")) + ") ", 1)
|
|
22887
22876
|
], 64)) : (k(), Q(Be, { key: 1 }, [
|
|
22888
|
-
Me(" (" +
|
|
22877
|
+
Me(" (" + ve(p(t)("plugins.free-form.datakit.flow_editor.canvas_panel.node_count_plural", { count: p(a).response })) + ") ", 1)
|
|
22889
22878
|
], 64))
|
|
22890
22879
|
])
|
|
22891
22880
|
])
|
|
@@ -22902,8 +22891,8 @@ const WL = {
|
|
|
22902
22891
|
"flow-id": h,
|
|
22903
22892
|
mode: e.mode,
|
|
22904
22893
|
phase: "response",
|
|
22905
|
-
onInitialized: fe[2] || (fe[2] = (
|
|
22906
|
-
onNodesChange: fe[3] || (fe[3] = (
|
|
22894
|
+
onInitialized: fe[2] || (fe[2] = (he) => o.value = !0),
|
|
22895
|
+
onNodesChange: fe[3] || (fe[3] = (he) => o.value = !1)
|
|
22907
22896
|
}, null, 8, ["mode"])
|
|
22908
22897
|
], 6)
|
|
22909
22898
|
], 512));
|
|
@@ -22947,22 +22936,22 @@ const WL = {
|
|
|
22947
22936
|
}, {
|
|
22948
22937
|
default: F(() => [
|
|
22949
22938
|
J("div", IK, [
|
|
22950
|
-
J("p", null,
|
|
22951
|
-
J("p", null,
|
|
22939
|
+
J("p", null, ve(a.value), 1),
|
|
22940
|
+
J("p", null, ve(p(o)("plugins.free-form.datakit.flow_editor.confirm.message.confirm")), 1),
|
|
22952
22941
|
J("div", TK, [
|
|
22953
22942
|
(k(!0), Q(Be, null, Ze(s.value ?? [], ([y, v]) => (k(), Q("div", {
|
|
22954
22943
|
key: `${y}-${v}`,
|
|
22955
22944
|
class: "connection"
|
|
22956
22945
|
}, [
|
|
22957
22946
|
N(p(un), { color: p(UA) }, null, 8, ["color"]),
|
|
22958
|
-
Me(" " +
|
|
22947
|
+
Me(" " + ve(y) + " → " + ve(v), 1)
|
|
22959
22948
|
]))), 128)),
|
|
22960
22949
|
(k(!0), Q(Be, null, Ze(l.value ?? [], ([y, v]) => (k(), Q("div", {
|
|
22961
22950
|
key: `${y}-${v}`,
|
|
22962
22951
|
class: "connection"
|
|
22963
22952
|
}, [
|
|
22964
22953
|
N(p(zl), { color: p(xu) }, null, 8, ["color"]),
|
|
22965
|
-
Me(" " +
|
|
22954
|
+
Me(" " + ve(y) + " → " + ve(v), 1)
|
|
22966
22955
|
]))), 128))
|
|
22967
22956
|
])
|
|
22968
22957
|
])
|
|
@@ -23164,7 +23153,7 @@ const WL = {
|
|
|
23164
23153
|
onClick: (w) => c(v)
|
|
23165
23154
|
}, {
|
|
23166
23155
|
default: F(() => [
|
|
23167
|
-
Me(
|
|
23156
|
+
Me(ve(p(t)(`plugins.free-form.datakit.examples.${v}`)), 1)
|
|
23168
23157
|
]),
|
|
23169
23158
|
_: 2
|
|
23170
23159
|
}, 1032, ["onClick"]))), 128))
|
|
@@ -23177,14 +23166,14 @@ const WL = {
|
|
|
23177
23166
|
to: "https://developer.konghq.com/plugins/datakit/"
|
|
23178
23167
|
}, {
|
|
23179
23168
|
default: F(() => [
|
|
23180
|
-
Me(
|
|
23169
|
+
Me(ve(p(t)("plugins.free-form.datakit.flow_editor.actions.view_docs")) + " ", 1),
|
|
23181
23170
|
N(p(ey))
|
|
23182
23171
|
]),
|
|
23183
23172
|
_: 1
|
|
23184
23173
|
}),
|
|
23185
23174
|
N(p(Cn), { onClick: f }, {
|
|
23186
23175
|
default: F(() => [
|
|
23187
|
-
Me(
|
|
23176
|
+
Me(ve(p(t)("plugins.free-form.datakit.flow_editor.actions.done")), 1)
|
|
23188
23177
|
]),
|
|
23189
23178
|
_: 1
|
|
23190
23179
|
})
|
|
@@ -23230,8 +23219,8 @@ const WL = {
|
|
|
23230
23219
|
N(p(i), { size: 16 })
|
|
23231
23220
|
]),
|
|
23232
23221
|
J("div", HK, [
|
|
23233
|
-
J("div", GK,
|
|
23234
|
-
J("div", YK,
|
|
23222
|
+
J("div", GK, ve(e.type), 1),
|
|
23223
|
+
J("div", YK, ve(p(o)), 1)
|
|
23235
23224
|
])
|
|
23236
23225
|
], 42, zK));
|
|
23237
23226
|
}
|
|
@@ -23293,7 +23282,7 @@ const WL = {
|
|
|
23293
23282
|
info: p(t)("plugins.free-form.datakit.flow_editor.node_panel.description")
|
|
23294
23283
|
}, {
|
|
23295
23284
|
default: F(() => [
|
|
23296
|
-
Me(
|
|
23285
|
+
Me(ve(p(t)("plugins.free-form.datakit.flow_editor.node_panel.title")), 1)
|
|
23297
23286
|
]),
|
|
23298
23287
|
_: 1
|
|
23299
23288
|
}, 8, ["info"])
|
|
@@ -23492,7 +23481,7 @@ const oB = /* @__PURE__ */ _e({
|
|
|
23492
23481
|
var E, x;
|
|
23493
23482
|
const _ = Ae("KButton"), S = Ae("KDropdownItem"), C = Ae("KDropdown");
|
|
23494
23483
|
return k(), Q("div", iB, [
|
|
23495
|
-
J("h3", rB,
|
|
23484
|
+
J("h3", rB, ve(p(u)("plugins.free-form.datakit.flow_editor.panel_segments.resources.vault.title")), 1),
|
|
23496
23485
|
N(_, {
|
|
23497
23486
|
appearance: "tertiary",
|
|
23498
23487
|
class: "add-button",
|
|
@@ -23501,7 +23490,7 @@ const oB = /* @__PURE__ */ _e({
|
|
|
23501
23490
|
}, {
|
|
23502
23491
|
default: F(() => [
|
|
23503
23492
|
N(p(un)),
|
|
23504
|
-
Me(" " +
|
|
23493
|
+
Me(" " + ve(p(u)("plugins.free-form.datakit.flow_editor.panel_segments.resources.vault.add_button")), 1)
|
|
23505
23494
|
]),
|
|
23506
23495
|
_: 1
|
|
23507
23496
|
}),
|
|
@@ -23515,7 +23504,7 @@ const oB = /* @__PURE__ */ _e({
|
|
|
23515
23504
|
color: p(Ha),
|
|
23516
23505
|
size: 16
|
|
23517
23506
|
}, null, 8, ["color"]),
|
|
23518
|
-
J("div", uB,
|
|
23507
|
+
J("div", uB, ve(T.key), 1)
|
|
23519
23508
|
]),
|
|
23520
23509
|
N(C, null, {
|
|
23521
23510
|
items: F(() => [
|
|
@@ -23523,7 +23512,7 @@ const oB = /* @__PURE__ */ _e({
|
|
|
23523
23512
|
onClick: (I) => h(T)
|
|
23524
23513
|
}, {
|
|
23525
23514
|
default: F(() => [
|
|
23526
|
-
Me(
|
|
23515
|
+
Me(ve(p(u)("plugins.free-form.datakit.flow_editor.panel_segments.resources.vault.edit")), 1)
|
|
23527
23516
|
]),
|
|
23528
23517
|
_: 1
|
|
23529
23518
|
}, 8, ["onClick"]),
|
|
@@ -23532,7 +23521,7 @@ const oB = /* @__PURE__ */ _e({
|
|
|
23532
23521
|
onClick: (I) => g(T)
|
|
23533
23522
|
}, {
|
|
23534
23523
|
default: F(() => [
|
|
23535
|
-
Me(
|
|
23524
|
+
Me(ve(p(u)("plugins.free-form.datakit.flow_editor.panel_segments.resources.vault.delete")), 1)
|
|
23536
23525
|
]),
|
|
23537
23526
|
_: 1
|
|
23538
23527
|
}, 8, ["onClick"])
|
|
@@ -23647,20 +23636,20 @@ const pB = { class: "dk-cache-panel" }, mB = { class: "title" }, gB = {
|
|
|
23647
23636
|
return (S, C) => {
|
|
23648
23637
|
const E = Ae("KButton"), x = Ae("KDropdownItem"), T = Ae("KDropdown"), I = Ae("KLabel"), O = Ae("KCodeBlock"), M = Ae("KModal");
|
|
23649
23638
|
return k(), Q("div", pB, [
|
|
23650
|
-
J("h3", mB,
|
|
23639
|
+
J("h3", mB, ve(p(s)("plugins.free-form.datakit.flow_editor.panel_segments.resources.cache.title")), 1),
|
|
23651
23640
|
e.strategy ? (k(), Q("div", gB, [
|
|
23652
23641
|
J("div", hB, [
|
|
23653
23642
|
N(p(Jf), {
|
|
23654
23643
|
color: p(Ha),
|
|
23655
23644
|
size: p(Wm)
|
|
23656
23645
|
}, null, 8, ["color", "size"]),
|
|
23657
|
-
J("div", vB,
|
|
23646
|
+
J("div", vB, ve(e.strategy), 1)
|
|
23658
23647
|
]),
|
|
23659
23648
|
N(T, null, {
|
|
23660
23649
|
items: F(() => [
|
|
23661
23650
|
N(x, { onClick: c }, {
|
|
23662
23651
|
default: F(() => [
|
|
23663
|
-
Me(
|
|
23652
|
+
Me(ve(p(s)("plugins.free-form.datakit.flow_editor.panel_segments.resources.vault.edit")), 1)
|
|
23664
23653
|
]),
|
|
23665
23654
|
_: 1
|
|
23666
23655
|
}),
|
|
@@ -23669,7 +23658,7 @@ const pB = { class: "dk-cache-panel" }, mB = { class: "title" }, gB = {
|
|
|
23669
23658
|
onClick: m
|
|
23670
23659
|
}, {
|
|
23671
23660
|
default: F(() => [
|
|
23672
|
-
Me(
|
|
23661
|
+
Me(ve(p(s)("plugins.free-form.datakit.flow_editor.panel_segments.resources.vault.delete")), 1)
|
|
23673
23662
|
]),
|
|
23674
23663
|
_: 1
|
|
23675
23664
|
})
|
|
@@ -23696,7 +23685,7 @@ const pB = { class: "dk-cache-panel" }, mB = { class: "title" }, gB = {
|
|
|
23696
23685
|
}, {
|
|
23697
23686
|
default: F(() => [
|
|
23698
23687
|
N(p(un)),
|
|
23699
|
-
Me(" " +
|
|
23688
|
+
Me(" " + ve(p(s)("plugins.free-form.datakit.flow_editor.panel_segments.resources.cache.add_button")), 1)
|
|
23700
23689
|
]),
|
|
23701
23690
|
_: 1
|
|
23702
23691
|
})),
|
|
@@ -23710,7 +23699,7 @@ const pB = { class: "dk-cache-panel" }, mB = { class: "title" }, gB = {
|
|
|
23710
23699
|
onProceed: g
|
|
23711
23700
|
}, {
|
|
23712
23701
|
default: F(() => {
|
|
23713
|
-
var b,
|
|
23702
|
+
var b, U;
|
|
23714
23703
|
return [
|
|
23715
23704
|
J("div", yB, [
|
|
23716
23705
|
N(tm, {
|
|
@@ -23728,7 +23717,7 @@ const pB = { class: "dk-cache-panel" }, mB = { class: "title" }, gB = {
|
|
|
23728
23717
|
u.value === "redis" ? (k(), Q("div", _B, [
|
|
23729
23718
|
N(I, null, {
|
|
23730
23719
|
default: F(() => [
|
|
23731
|
-
Me(
|
|
23720
|
+
Me(ve(p(s)("plugins.free-form.datakit.flow_editor.panel_segments.resources.cache.select_redis_configuration")), 1)
|
|
23732
23721
|
]),
|
|
23733
23722
|
_: 1
|
|
23734
23723
|
}),
|
|
@@ -23738,8 +23727,8 @@ const pB = { class: "dk-cache-panel" }, mB = { class: "title" }, gB = {
|
|
|
23738
23727
|
"onUpdate:modelValue": C[0] || (C[0] = (A) => p(i).cache.partial_id = A)
|
|
23739
23728
|
}, null, 8, ["model-value"])
|
|
23740
23729
|
])) : Ee("", !0),
|
|
23741
|
-
u.value === "redis" && !((
|
|
23742
|
-
J("div", null,
|
|
23730
|
+
u.value === "redis" && !((U = p(i).cache) != null && U.partial_id) && d.value ? (k(), Q("div", bB, [
|
|
23731
|
+
J("div", null, ve(p(s)("plugins.free-form.datakit.flow_editor.panel_segments.resources.cache.inline_config_preview")), 1),
|
|
23743
23732
|
N(O, {
|
|
23744
23733
|
id: "dk-cache-redis-configuration",
|
|
23745
23734
|
code: d.value,
|
|
@@ -23834,7 +23823,7 @@ const pB = { class: "dk-cache-panel" }, mB = { class: "title" }, gB = {
|
|
|
23834
23823
|
class: Je(["side-panel", { expanded: p(n), inited: l.value }])
|
|
23835
23824
|
}, [
|
|
23836
23825
|
J("header", SB, [
|
|
23837
|
-
J("h2", AB,
|
|
23826
|
+
J("h2", AB, ve(p(t)("plugins.free-form.datakit.flow_editor.name")), 1)
|
|
23838
23827
|
]),
|
|
23839
23828
|
J("div", IB, [
|
|
23840
23829
|
J("div", TB, [
|
|
@@ -23992,29 +23981,29 @@ const pB = { class: "dk-cache-panel" }, mB = { class: "title" }, gB = {
|
|
|
23992
23981
|
ref: u,
|
|
23993
23982
|
class: "dk-inputs-map-field"
|
|
23994
23983
|
}, [
|
|
23995
|
-
(k(!0), Q(Be, null, Ze(p(i), (b,
|
|
23984
|
+
(k(!0), Q(Be, null, Ze(p(i), (b, U) => (k(), Q("div", {
|
|
23996
23985
|
key: b.id,
|
|
23997
23986
|
class: "dk-inputs-map-field-entry",
|
|
23998
|
-
"data-testid": `ff-kv-container-${p(s).path.value}.${
|
|
23987
|
+
"data-testid": `ff-kv-container-${p(s).path.value}.${U}`
|
|
23999
23988
|
}, [
|
|
24000
23989
|
N(T, {
|
|
24001
|
-
for: `ff-kv-entry-key-${p(s).path.value}.${
|
|
23990
|
+
for: `ff-kv-entry-key-${p(s).path.value}.${U}`
|
|
24002
23991
|
}, {
|
|
24003
23992
|
default: F(() => [
|
|
24004
|
-
Me(
|
|
23993
|
+
Me(ve(p(l)("plugins.free-form.datakit.flow_editor.node_properties.input_name.label")), 1)
|
|
24005
23994
|
]),
|
|
24006
23995
|
_: 1
|
|
24007
23996
|
}, 8, ["for"]),
|
|
24008
23997
|
J("div", RB, [
|
|
24009
23998
|
J("div", DB, [
|
|
24010
23999
|
N(I, {
|
|
24011
|
-
id: `ff-kv-entry-key-${p(s).path.value}.${
|
|
24000
|
+
id: `ff-kv-entry-key-${p(s).path.value}.${U}`,
|
|
24012
24001
|
modelValue: b.key,
|
|
24013
24002
|
"onUpdate:modelValue": [(A) => b.key = A, (A) => w(b)],
|
|
24014
24003
|
modelModifiers: { trim: !0 },
|
|
24015
24004
|
class: "ff-kv-field-entry-key",
|
|
24016
|
-
"data-key-input":
|
|
24017
|
-
"data-testid": `ff-key-${p(s).path.value}.${
|
|
24005
|
+
"data-key-input": U,
|
|
24006
|
+
"data-testid": `ff-key-${p(s).path.value}.${U}`,
|
|
24018
24007
|
error: !!c.value[b.id],
|
|
24019
24008
|
"error-message": c.value[b.id],
|
|
24020
24009
|
placeholder: p(l)("plugins.free-form.datakit.flow_editor.node_properties.input_name.placeholder"),
|
|
@@ -24027,7 +24016,7 @@ const pB = { class: "dk-cache-panel" }, mB = { class: "title" }, gB = {
|
|
|
24027
24016
|
"onUpdate:modelValue": (A) => b.value = A,
|
|
24028
24017
|
class: "ff-kv-field-entry-value",
|
|
24029
24018
|
clearable: "",
|
|
24030
|
-
"data-testid": `ff-value-${p(s).path.value}.${
|
|
24019
|
+
"data-testid": `ff-value-${p(s).path.value}.${U}`,
|
|
24031
24020
|
"enable-filtering": "",
|
|
24032
24021
|
items: e.items,
|
|
24033
24022
|
label: p(l)("plugins.free-form.datakit.flow_editor.node_properties.input.source"),
|
|
@@ -24046,7 +24035,7 @@ const pB = { class: "dk-cache-panel" }, mB = { class: "title" }, gB = {
|
|
|
24046
24035
|
N(M, {
|
|
24047
24036
|
appearance: "tertiary",
|
|
24048
24037
|
class: "dk-inputs-map-field-remove-btn",
|
|
24049
|
-
"data-testid": `ff-kv-remove-btn-${p(s).path.value}.${
|
|
24038
|
+
"data-testid": `ff-kv-remove-btn-${p(s).path.value}.${U}`,
|
|
24050
24039
|
icon: "",
|
|
24051
24040
|
onClick: (A) => g(b)
|
|
24052
24041
|
}, {
|
|
@@ -24065,7 +24054,7 @@ const pB = { class: "dk-cache-panel" }, mB = { class: "title" }, gB = {
|
|
|
24065
24054
|
}, {
|
|
24066
24055
|
default: F(() => [
|
|
24067
24056
|
N(p(un)),
|
|
24068
|
-
Me(" " +
|
|
24057
|
+
Me(" " + ve(p(l)("plugins.free-form.datakit.flow_editor.node_properties.input.add_button")), 1)
|
|
24069
24058
|
]),
|
|
24070
24059
|
_: 1
|
|
24071
24060
|
}, 8, ["data-testid", "disabled"])
|
|
@@ -24083,7 +24072,7 @@ const pB = { class: "dk-cache-panel" }, mB = { class: "title" }, gB = {
|
|
|
24083
24072
|
color: p(Ha),
|
|
24084
24073
|
size: p(Hr)
|
|
24085
24074
|
}, null, 8, ["color", "size"])),
|
|
24086
|
-
Me(" " +
|
|
24075
|
+
Me(" " + ve(e.item.label), 1)
|
|
24087
24076
|
]));
|
|
24088
24077
|
}
|
|
24089
24078
|
}), Ia = /* @__PURE__ */ je(BB, [["__scopeId", "data-v-78ea8dff"]]), VB = {
|
|
@@ -24120,7 +24109,7 @@ const pB = { class: "dk-cache-panel" }, mB = { class: "title" }, gB = {
|
|
|
24120
24109
|
info: p(i)("plugins.free-form.datakit.flow_editor.node_properties.input.tooltip")
|
|
24121
24110
|
}, {
|
|
24122
24111
|
default: F(() => [
|
|
24123
|
-
Me(
|
|
24112
|
+
Me(ve(p(i)("plugins.free-form.datakit.flow_editor.node_properties.input.label")), 1)
|
|
24124
24113
|
]),
|
|
24125
24114
|
_: 1
|
|
24126
24115
|
}, 8, ["info"]),
|
|
@@ -24146,14 +24135,14 @@ const pB = { class: "dk-cache-panel" }, mB = { class: "title" }, gB = {
|
|
|
24146
24135
|
_: 3
|
|
24147
24136
|
}, 8, ["items", "label", "placeholder"])) : Ee("", !0),
|
|
24148
24137
|
a.value ? (k(), Q("div", VB, [
|
|
24149
|
-
J("span", null,
|
|
24138
|
+
J("span", null, ve(p(i)("plugins.free-form.datakit.flow_editor.node_properties.input.or")), 1)
|
|
24150
24139
|
])) : Ee("", !0),
|
|
24151
24140
|
a.value ? (k(), H(p(Xi), {
|
|
24152
24141
|
key: 2,
|
|
24153
24142
|
class: "dk-inputs-field-h2 dk-margin-0"
|
|
24154
24143
|
}, {
|
|
24155
24144
|
default: F(() => [
|
|
24156
|
-
Me(
|
|
24145
|
+
Me(ve(p(i)("plugins.free-form.datakit.flow_editor.node_properties.input.fields")), 1)
|
|
24157
24146
|
]),
|
|
24158
24147
|
_: 1
|
|
24159
24148
|
})) : Ee("", !0),
|
|
@@ -24554,44 +24543,44 @@ function Hn(e, t) {
|
|
|
24554
24543
|
commit: m,
|
|
24555
24544
|
revert: h
|
|
24556
24545
|
} = vt(), { i18n: { t: g } } = et(), y = Uh(), v = R(() => {
|
|
24557
|
-
const
|
|
24558
|
-
if (!
|
|
24559
|
-
return
|
|
24546
|
+
const q = r(e);
|
|
24547
|
+
if (!q) throw new Error("Node not existed");
|
|
24548
|
+
return q;
|
|
24560
24549
|
}), w = R(() => {
|
|
24561
|
-
const
|
|
24550
|
+
const z = o.value.edges.filter((P) => P.target === e).reduce((P, K) => {
|
|
24562
24551
|
var ge, we;
|
|
24563
24552
|
const ee = r(K.source), ae = (ge = eo(ee, "output", K.sourceField)) == null ? void 0 : ge.id, ne = (we = eo(v.value, "input", K.targetField)) == null ? void 0 : we.name, Y = ee.id + (ae ? `.${ae}` : "");
|
|
24564
24553
|
return ne ? P.inputs = { ...P.inputs, [ne]: Y } : P.input = Y, P;
|
|
24565
24554
|
}, {});
|
|
24566
24555
|
return v.value.fields.input.forEach((P) => {
|
|
24567
|
-
|
|
24556
|
+
z.inputs || (z.inputs = {}), z.inputs[P.name] || (z.inputs[P.name] = null);
|
|
24568
24557
|
}), {
|
|
24569
24558
|
...v.value.config,
|
|
24570
|
-
...
|
|
24559
|
+
...z,
|
|
24571
24560
|
name: v.value.name
|
|
24572
24561
|
};
|
|
24573
|
-
}), _ = (
|
|
24574
|
-
i(e,
|
|
24575
|
-
}, S = (
|
|
24562
|
+
}), _ = (q) => {
|
|
24563
|
+
i(e, q ?? "", !0, `${e}:rename`);
|
|
24564
|
+
}, S = (q, z = !0) => {
|
|
24576
24565
|
if (!t) throw new Error("getFormInnerData is not defined");
|
|
24577
|
-
const P = Fn(t(), ["name", "input", "inputs"]), K =
|
|
24578
|
-
u(e, P,
|
|
24579
|
-
}, C = (
|
|
24580
|
-
const P = oo(v.value,
|
|
24566
|
+
const P = Fn(t(), ["name", "input", "inputs"]), K = q ? `update:${e}:${q}` : void 0;
|
|
24567
|
+
u(e, P, z, K);
|
|
24568
|
+
}, C = (q, z) => {
|
|
24569
|
+
const P = oo(v.value, q, z);
|
|
24581
24570
|
if (!P)
|
|
24582
|
-
throw new Error(`Field with name "${
|
|
24571
|
+
throw new Error(`Field with name "${z}" not found in node "${v.value.name}"`);
|
|
24583
24572
|
return P;
|
|
24584
|
-
}, E = (
|
|
24573
|
+
}, E = (q, z, P) => {
|
|
24585
24574
|
const K = !!P;
|
|
24586
|
-
a(e,
|
|
24587
|
-
}, x = (
|
|
24588
|
-
const K = C(
|
|
24575
|
+
a(e, q, z, !K), K && M(z, P);
|
|
24576
|
+
}, x = (q, z, P) => {
|
|
24577
|
+
const K = C(q, z).id;
|
|
24589
24578
|
s(e, K, P);
|
|
24590
|
-
}, T = (
|
|
24591
|
-
const P = C(
|
|
24579
|
+
}, T = (q, z) => {
|
|
24580
|
+
const P = C(q, z).id;
|
|
24592
24581
|
l(e, P);
|
|
24593
|
-
}, I = R(() => o.value.edges.filter((
|
|
24594
|
-
const P =
|
|
24582
|
+
}, I = R(() => o.value.edges.filter((q) => q.target === e && !q.targetField)[0]), O = R(() => o.value.edges.filter((q) => q.target === e && q.targetField)), M = async (q, z) => {
|
|
24583
|
+
const P = z == null, K = C("input", q).id;
|
|
24595
24584
|
if (P) {
|
|
24596
24585
|
const X = O.value.find((fe) => fe.targetField === K);
|
|
24597
24586
|
X && d(X.id);
|
|
@@ -24600,7 +24589,7 @@ function Hn(e, t) {
|
|
|
24600
24589
|
const {
|
|
24601
24590
|
nodeId: ee,
|
|
24602
24591
|
fieldId: ae
|
|
24603
|
-
} = pd(
|
|
24592
|
+
} = pd(z), ne = C("input", q).id, Y = [];
|
|
24604
24593
|
I.value && (Y.push(Yi(I.value, r)), d(I.value.id, !1));
|
|
24605
24594
|
const ge = O.value.find((X) => X.targetField === K);
|
|
24606
24595
|
ge && (Y.push(Yi(ge, r)), d(ge.id, !1)), c({
|
|
@@ -24623,8 +24612,8 @@ function Hn(e, t) {
|
|
|
24623
24612
|
[we],
|
|
24624
24613
|
Y
|
|
24625
24614
|
) || h();
|
|
24626
|
-
}, b = async (
|
|
24627
|
-
if (
|
|
24615
|
+
}, b = async (q) => {
|
|
24616
|
+
if (q == null) {
|
|
24628
24617
|
I.value && d(I.value.id);
|
|
24629
24618
|
return;
|
|
24630
24619
|
}
|
|
@@ -24632,7 +24621,7 @@ function Hn(e, t) {
|
|
|
24632
24621
|
for (const Y of O.value)
|
|
24633
24622
|
P.push(Yi(Y, r)), d(Y.id, !1);
|
|
24634
24623
|
I.value && d(I.value.id, !1);
|
|
24635
|
-
const { nodeId: K, fieldId: ee } = pd(
|
|
24624
|
+
const { nodeId: K, fieldId: ee } = pd(q);
|
|
24636
24625
|
c({
|
|
24637
24626
|
source: K,
|
|
24638
24627
|
sourceField: ee,
|
|
@@ -24654,36 +24643,36 @@ function Hn(e, t) {
|
|
|
24654
24643
|
[ae],
|
|
24655
24644
|
P
|
|
24656
24645
|
) || h();
|
|
24657
|
-
},
|
|
24658
|
-
const
|
|
24646
|
+
}, U = (q) => {
|
|
24647
|
+
const z = [
|
|
24659
24648
|
...o.value.edges,
|
|
24660
|
-
{ source:
|
|
24649
|
+
{ source: q, target: e }
|
|
24661
24650
|
];
|
|
24662
|
-
return vl(da(
|
|
24651
|
+
return vl(da(z));
|
|
24663
24652
|
}, A = R(() => {
|
|
24664
|
-
var
|
|
24665
|
-
const
|
|
24653
|
+
var z, P;
|
|
24654
|
+
const q = [];
|
|
24666
24655
|
for (const K of o.value.nodes)
|
|
24667
|
-
if (!(!n && K.type === "vault" || !((
|
|
24668
|
-
|
|
24656
|
+
if (!(!n && K.type === "vault" || !((z = Ai(K.type).io) != null && z.output)) && K.fields.output && K.id !== e && !(K.type === "property" && !Vu((P = K.config) == null ? void 0 : P.property)) && !U(K.id) && !(v.value.phase === "request" && K.phase === "response") && !(K.type === "vault" && K.fields.output.length === 0)) {
|
|
24657
|
+
q.push({ value: K.id, label: K.name, type: K.type });
|
|
24669
24658
|
for (const ae of K.fields.output)
|
|
24670
|
-
|
|
24659
|
+
q.push({
|
|
24671
24660
|
value: `${K.id}.${ae.id}`,
|
|
24672
24661
|
label: `${K.name}.${ae.name}`,
|
|
24673
24662
|
type: K.type
|
|
24674
24663
|
});
|
|
24675
24664
|
}
|
|
24676
|
-
return
|
|
24677
|
-
}),
|
|
24678
|
-
function V(
|
|
24679
|
-
f.value.delete(e),
|
|
24665
|
+
return q;
|
|
24666
|
+
}), j = R(() => v.value.fields.input.map((q) => q.name) || []);
|
|
24667
|
+
function V(q) {
|
|
24668
|
+
f.value.delete(e), q || f.value.add(e);
|
|
24680
24669
|
}
|
|
24681
24670
|
const ue = XB(e);
|
|
24682
|
-
function de(
|
|
24671
|
+
function de(q, z, P) {
|
|
24683
24672
|
const K = r(e);
|
|
24684
24673
|
if (!K) throw new Error("Node not found when validating field name");
|
|
24685
|
-
const ee = oo(K,
|
|
24686
|
-
return ue(
|
|
24674
|
+
const ee = oo(K, q, z);
|
|
24675
|
+
return ue(q, P, ee == null ? void 0 : ee.id);
|
|
24687
24676
|
}
|
|
24688
24677
|
return {
|
|
24689
24678
|
// states
|
|
@@ -24691,7 +24680,7 @@ function Hn(e, t) {
|
|
|
24691
24680
|
inputOptions: A,
|
|
24692
24681
|
inputEdge: I,
|
|
24693
24682
|
inputsEdges: O,
|
|
24694
|
-
inputsFieldNames:
|
|
24683
|
+
inputsFieldNames: j,
|
|
24695
24684
|
currentNode: v,
|
|
24696
24685
|
// form ops
|
|
24697
24686
|
setName: _,
|
|
@@ -24818,7 +24807,7 @@ const zo = /* @__PURE__ */ _e({
|
|
|
24818
24807
|
}, null, 8, ["name", "validate", "onUpdate"]),
|
|
24819
24808
|
N(_, { class: "dk-node-configuration-label" }, {
|
|
24820
24809
|
default: F(() => [
|
|
24821
|
-
Me(
|
|
24810
|
+
Me(ve(p(t)("plugins.free-form.datakit.flow_editor.node_properties.configuration")), 1)
|
|
24822
24811
|
]),
|
|
24823
24812
|
_: 1
|
|
24824
24813
|
}),
|
|
@@ -24979,7 +24968,7 @@ const zo = /* @__PURE__ */ _e({
|
|
|
24979
24968
|
}, null, 8, ["name", "validate", "onUpdate"]),
|
|
24980
24969
|
N(O, { class: "dk-node-configuration-label" }, {
|
|
24981
24970
|
default: F(() => [
|
|
24982
|
-
Me(
|
|
24971
|
+
Me(ve(p(t)("plugins.free-form.datakit.flow_editor.node_properties.configuration")), 1)
|
|
24983
24972
|
]),
|
|
24984
24973
|
_: 1
|
|
24985
24974
|
}),
|
|
@@ -25003,7 +24992,7 @@ const zo = /* @__PURE__ */ _e({
|
|
|
25003
24992
|
href: p(Pf).jqlang
|
|
25004
24993
|
}, {
|
|
25005
24994
|
default: F(() => [
|
|
25006
|
-
Me(
|
|
24995
|
+
Me(ve(p(Pf).jqlang), 1)
|
|
25007
24996
|
]),
|
|
25008
24997
|
_: 1
|
|
25009
24998
|
}, 8, ["href"])
|
|
@@ -25115,19 +25104,19 @@ const zo = /* @__PURE__ */ _e({
|
|
|
25115
25104
|
}, [
|
|
25116
25105
|
N(T, { class: "dk-node-configuration-label" }, {
|
|
25117
25106
|
default: F(() => [
|
|
25118
|
-
Me(
|
|
25107
|
+
Me(ve(p(u).t("plugins.free-form.datakit.flow_editor.node_properties.output_value.label")), 1)
|
|
25119
25108
|
]),
|
|
25120
25109
|
_: 1
|
|
25121
25110
|
}),
|
|
25122
|
-
(k(!0), Q(Be, null, Ze(p(r), (b,
|
|
25111
|
+
(k(!0), Q(Be, null, Ze(p(r), (b, U) => (k(), H(M, {
|
|
25123
25112
|
key: b.id,
|
|
25124
25113
|
class: "dk-output-value-field-entry",
|
|
25125
|
-
"data-testid": `ff-kv-container-${p(l).path.value}.${
|
|
25114
|
+
"data-testid": `ff-kv-container-${p(l).path.value}.${U}`
|
|
25126
25115
|
}, {
|
|
25127
25116
|
actions: F(() => [
|
|
25128
25117
|
N(I, {
|
|
25129
25118
|
appearance: "none",
|
|
25130
|
-
"data-testid": `ff-kv-remove-btn-${p(l).path.value}.${
|
|
25119
|
+
"data-testid": `ff-kv-remove-btn-${p(l).path.value}.${U}`,
|
|
25131
25120
|
icon: "",
|
|
25132
25121
|
onClick: (A) => g(b)
|
|
25133
25122
|
}, {
|
|
@@ -25139,13 +25128,13 @@ const zo = /* @__PURE__ */ _e({
|
|
|
25139
25128
|
]),
|
|
25140
25129
|
default: F(() => [
|
|
25141
25130
|
N(O, {
|
|
25142
|
-
id: `ff-kv-entry-key-${p(l).path.value}.${
|
|
25131
|
+
id: `ff-kv-entry-key-${p(l).path.value}.${U}`,
|
|
25143
25132
|
modelValue: b.key,
|
|
25144
25133
|
"onUpdate:modelValue": [(A) => b.key = A, (A) => _(b)],
|
|
25145
25134
|
modelModifiers: { trim: !0 },
|
|
25146
25135
|
class: "ff-kv-field-entry-key",
|
|
25147
|
-
"data-key-input":
|
|
25148
|
-
"data-testid": `ff-key-${p(l).path.value}.${
|
|
25136
|
+
"data-key-input": U,
|
|
25137
|
+
"data-testid": `ff-key-${p(l).path.value}.${U}`,
|
|
25149
25138
|
error: !!i.value[b.id],
|
|
25150
25139
|
"error-message": i.value[b.id],
|
|
25151
25140
|
label: p(u).t("plugins.free-form.datakit.flow_editor.node_properties.output_value.value_name"),
|
|
@@ -25159,7 +25148,7 @@ const zo = /* @__PURE__ */ _e({
|
|
|
25159
25148
|
"onUpdate:modelValue": (A) => b.value = A,
|
|
25160
25149
|
modelModifiers: { trim: !0 },
|
|
25161
25150
|
class: "ff-kv-field-entry-value",
|
|
25162
|
-
"data-testid": `ff-value-${p(l).path.value}.${
|
|
25151
|
+
"data-testid": `ff-value-${p(l).path.value}.${U}`,
|
|
25163
25152
|
label: p(u).t("plugins.free-form.datakit.flow_editor.node_properties.output_value.value"),
|
|
25164
25153
|
onChange: (A) => w(A, b)
|
|
25165
25154
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "label", "onChange"])
|
|
@@ -25174,7 +25163,7 @@ const zo = /* @__PURE__ */ _e({
|
|
|
25174
25163
|
}, {
|
|
25175
25164
|
default: F(() => [
|
|
25176
25165
|
N(p(un)),
|
|
25177
|
-
Me(" " +
|
|
25166
|
+
Me(" " + ve(p(u).t("plugins.free-form.datakit.flow_editor.node_properties.output_value.add_button")), 1)
|
|
25178
25167
|
]),
|
|
25179
25168
|
_: 1
|
|
25180
25169
|
}, 8, ["data-testid", "disabled"])
|
|
@@ -25364,8 +25353,8 @@ const aV = /* @__PURE__ */ _e({
|
|
|
25364
25353
|
"item-template": F(({ item: w }) => [
|
|
25365
25354
|
J("div", sV, [
|
|
25366
25355
|
J("div", null, [
|
|
25367
|
-
J("div", null,
|
|
25368
|
-
J("div", lV,
|
|
25356
|
+
J("div", null, ve(w.label), 1),
|
|
25357
|
+
J("div", lV, ve(p(bo)[w.value].dataType), 1)
|
|
25369
25358
|
]),
|
|
25370
25359
|
J("div", uV, [
|
|
25371
25360
|
p(bo)[w.value].readable ? (k(), H(g, {
|
|
@@ -25373,7 +25362,7 @@ const aV = /* @__PURE__ */ _e({
|
|
|
25373
25362
|
appearance: "info"
|
|
25374
25363
|
}, {
|
|
25375
25364
|
default: F(() => [
|
|
25376
|
-
Me(
|
|
25365
|
+
Me(ve(p(n)("plugins.free-form.datakit.flow_editor.node_properties.property.get")), 1)
|
|
25377
25366
|
]),
|
|
25378
25367
|
_: 1
|
|
25379
25368
|
})) : Ee("", !0),
|
|
@@ -25382,7 +25371,7 @@ const aV = /* @__PURE__ */ _e({
|
|
|
25382
25371
|
appearance: "warning"
|
|
25383
25372
|
}, {
|
|
25384
25373
|
default: F(() => [
|
|
25385
|
-
Me(
|
|
25374
|
+
Me(ve(p(n)("plugins.free-form.datakit.flow_editor.node_properties.property.set")), 1)
|
|
25386
25375
|
]),
|
|
25387
25376
|
_: 1
|
|
25388
25377
|
})) : Ee("", !0)
|
|
@@ -25659,7 +25648,7 @@ const gV = /* @__PURE__ */ _e({
|
|
|
25659
25648
|
}, null, 8, ["name", "validate", "onUpdate"]),
|
|
25660
25649
|
N(p(Xi), { class: "dk-node-configuration-label" }, {
|
|
25661
25650
|
default: F(() => [
|
|
25662
|
-
Me(
|
|
25651
|
+
Me(ve(p(t)("plugins.free-form.datakit.flow_editor.node_properties.configuration")), 1)
|
|
25663
25652
|
]),
|
|
25664
25653
|
_: 1
|
|
25665
25654
|
}),
|
|
@@ -25742,7 +25731,7 @@ const gV = /* @__PURE__ */ _e({
|
|
|
25742
25731
|
}, null, 8, ["name", "validate", "onUpdate"]),
|
|
25743
25732
|
N(p(Xi), { class: "dk-node-configuration-label" }, {
|
|
25744
25733
|
default: F(() => [
|
|
25745
|
-
Me(
|
|
25734
|
+
Me(ve(p(o)("plugins.free-form.datakit.flow_editor.node_properties.configuration")), 1)
|
|
25746
25735
|
]),
|
|
25747
25736
|
_: 1
|
|
25748
25737
|
}),
|
|
@@ -25945,7 +25934,7 @@ const gV = /* @__PURE__ */ _e({
|
|
|
25945
25934
|
onClick: u[0] || (u[0] = (c) => a.value = !0)
|
|
25946
25935
|
}, {
|
|
25947
25936
|
default: F(() => [
|
|
25948
|
-
Me(
|
|
25937
|
+
Me(ve(p(n)("plugins.free-form.datakit.flow_editor.cta")) + " ", 1),
|
|
25949
25938
|
N(p(ty))
|
|
25950
25939
|
]),
|
|
25951
25940
|
_: 1
|
|
@@ -26476,7 +26465,7 @@ const Df = Wu.options, Kl = se.string().min(1).refine((e) => !e.includes("."), "
|
|
|
26476
26465
|
default: F(() => [
|
|
26477
26466
|
J("div", v8, [
|
|
26478
26467
|
(k(), H(gt(u[E.value]))),
|
|
26479
|
-
Me(" " +
|
|
26468
|
+
Me(" " + ve(E.label), 1)
|
|
26480
26469
|
])
|
|
26481
26470
|
]),
|
|
26482
26471
|
_: 2
|
|
@@ -26498,7 +26487,7 @@ const Df = Wu.options, Kl = se.string().min(1).refine((e) => !e.includes("."), "
|
|
|
26498
26487
|
}, null, 8, ["editing"])
|
|
26499
26488
|
]),
|
|
26500
26489
|
"plugin-config-title": F(() => [
|
|
26501
|
-
Me(
|
|
26490
|
+
Me(ve(m.value), 1)
|
|
26502
26491
|
]),
|
|
26503
26492
|
"plugin-config-description": F(() => [
|
|
26504
26493
|
J("span", { innerHTML: f.value }, null, 8, _8)
|
|
@@ -26534,7 +26523,7 @@ const Df = Wu.options, Kl = se.string().min(1).refine((e) => !e.includes("."), "
|
|
|
26534
26523
|
default: F(() => [
|
|
26535
26524
|
J("div", y8, [
|
|
26536
26525
|
(k(), H(gt(u[E.value]))),
|
|
26537
|
-
Me(" " +
|
|
26526
|
+
Me(" " + ve(E.label), 1)
|
|
26538
26527
|
])
|
|
26539
26528
|
]),
|
|
26540
26529
|
_: 2
|
|
@@ -26886,26 +26875,26 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
26886
26875
|
};
|
|
26887
26876
|
Tt(Pv, {
|
|
26888
26877
|
getOne: (ce, X, fe) => {
|
|
26889
|
-
const
|
|
26890
|
-
return a.get(
|
|
26878
|
+
const he = v(ce, X);
|
|
26879
|
+
return a.get(he, fe);
|
|
26891
26880
|
},
|
|
26892
26881
|
getAll: (ce, X) => {
|
|
26893
26882
|
const fe = w(ce);
|
|
26894
|
-
return r.config.app === "konnect" ? a.get(fe).then((
|
|
26895
|
-
const { data: { data: D } } =
|
|
26883
|
+
return r.config.app === "konnect" ? a.get(fe).then((he) => {
|
|
26884
|
+
const { data: { data: D } } = he;
|
|
26896
26885
|
if (delete X.size, delete X.offset, D.length && Object.keys(X).length === 1) {
|
|
26897
26886
|
const $ = Object.keys(X)[0], L = D.filter((B) => B[$] ? !!B[$].toLowerCase().includes(X[$].toLowerCase()) : !1);
|
|
26898
|
-
|
|
26887
|
+
he.data.data = L;
|
|
26899
26888
|
}
|
|
26900
|
-
return
|
|
26889
|
+
return he;
|
|
26901
26890
|
}) : a.get(fe, { params: X });
|
|
26902
26891
|
},
|
|
26903
26892
|
getAllV2: (ce, X, fe) => {
|
|
26904
|
-
const
|
|
26893
|
+
const he = w(ce);
|
|
26905
26894
|
if (r.config.app === "konnect") {
|
|
26906
26895
|
const { size: D, offset: $, ...L } = X;
|
|
26907
26896
|
if (ce === "consumer_groups")
|
|
26908
|
-
return a.get(
|
|
26897
|
+
return a.get(he, {
|
|
26909
26898
|
params: {
|
|
26910
26899
|
size: 1e3
|
|
26911
26900
|
},
|
|
@@ -26928,12 +26917,12 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
26928
26917
|
contains: L[le]
|
|
26929
26918
|
}
|
|
26930
26919
|
};
|
|
26931
|
-
return a.get(
|
|
26920
|
+
return a.get(he, {
|
|
26932
26921
|
params: B,
|
|
26933
26922
|
signal: fe
|
|
26934
26923
|
});
|
|
26935
26924
|
}
|
|
26936
|
-
return a.get(
|
|
26925
|
+
return a.get(he, { params: X, signal: fe });
|
|
26937
26926
|
},
|
|
26938
26927
|
peek: (ce, X = 50) => {
|
|
26939
26928
|
const fe = w(ce);
|
|
@@ -26944,20 +26933,20 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
26944
26933
|
});
|
|
26945
26934
|
}
|
|
26946
26935
|
}), Tt(Pa, r.config);
|
|
26947
|
-
const x = pe(""), T = pe(""), I = pe(null), O = pe({}), M = wo({}), b = wo({}),
|
|
26936
|
+
const x = pe(""), T = pe(""), I = pe(null), O = pe({}), M = wo({}), b = wo({}), U = R(() => {
|
|
26948
26937
|
var ce;
|
|
26949
26938
|
return (ce = I.value) == null ? void 0 : ce.options;
|
|
26950
26939
|
}), A = R(() => A8(
|
|
26951
26940
|
b.name,
|
|
26952
26941
|
r.rawSchema
|
|
26953
|
-
)),
|
|
26954
|
-
|
|
26942
|
+
)), j = pe(!1), V = pe(), ue = (ce, X) => {
|
|
26943
|
+
j.value = ce ?? "", V.value = X;
|
|
26955
26944
|
}, de = (ce) => {
|
|
26956
26945
|
var X;
|
|
26957
|
-
(X = V.value) == null || X.call(V, ce),
|
|
26958
|
-
},
|
|
26946
|
+
(X = V.value) == null || X.call(V, ce), j.value = !1;
|
|
26947
|
+
}, q = () => {
|
|
26959
26948
|
var L, B;
|
|
26960
|
-
const ce = { ...r.schema }, X = b, fe = M,
|
|
26949
|
+
const ce = { ...r.schema }, X = b, fe = M, he = Object.keys(X), D = {};
|
|
26961
26950
|
if (!c(O.value))
|
|
26962
26951
|
for (let le = 0; le < ((B = (L = O.value) == null ? void 0 : L.fields) == null ? void 0 : B.length); le++)
|
|
26963
26952
|
ce[O.value.fields[le].model] = O.value.fields[le];
|
|
@@ -26967,7 +26956,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
26967
26956
|
ce[te.model] = te;
|
|
26968
26957
|
}), oe.model && (ce[oe.model] = oe);
|
|
26969
26958
|
}), delete ce[le]);
|
|
26970
|
-
}),
|
|
26959
|
+
}), he.forEach((le) => {
|
|
26971
26960
|
var Te;
|
|
26972
26961
|
if (!ce[le]) {
|
|
26973
26962
|
le === "partials" && (D[le] = X[le]);
|
|
@@ -27034,52 +27023,52 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
27034
27023
|
});
|
|
27035
27024
|
const $ = u(D);
|
|
27036
27025
|
return T.value && Object.assign($, ae.value), $;
|
|
27037
|
-
},
|
|
27026
|
+
}, z = (ce, X = {}) => {
|
|
27038
27027
|
d(b, X, ce, r.editing), i("model-updated", {
|
|
27039
27028
|
model: b,
|
|
27040
27029
|
originalModel: M,
|
|
27041
|
-
data:
|
|
27030
|
+
data: q()
|
|
27042
27031
|
});
|
|
27043
27032
|
}, P = (ce, X) => {
|
|
27044
27033
|
var D;
|
|
27045
27034
|
const fe = { [X]: ce };
|
|
27046
27035
|
typeof ((D = r.schema[X]) == null ? void 0 : D.modelTransformer) == "function" && (fe[X] = r.schema[X].modelTransformer(ce));
|
|
27047
|
-
const
|
|
27048
|
-
Object.assign(b,
|
|
27036
|
+
const he = Object.assign({}, b, fe);
|
|
27037
|
+
Object.assign(b, he), i("model-updated", {
|
|
27049
27038
|
model: b,
|
|
27050
27039
|
originalModel: M,
|
|
27051
|
-
data:
|
|
27040
|
+
data: q()
|
|
27052
27041
|
});
|
|
27053
27042
|
}, K = (ce) => {
|
|
27054
27043
|
i("validity-change", ce);
|
|
27055
27044
|
}, ee = (ce, X) => {
|
|
27056
27045
|
Object.keys(ce).forEach((fe) => {
|
|
27057
27046
|
var B, le;
|
|
27058
|
-
let
|
|
27047
|
+
let he = X ? `${X}-${fe}` : fe, D = r.schema[he];
|
|
27059
27048
|
if (!D) {
|
|
27060
27049
|
const oe = X ? `${X}-${fe.replace(/-/g, "_")}` : fe.replace(/-/g, "_");
|
|
27061
|
-
(B = r.schema[oe]) != null && B.fieldNameHasDashes && (
|
|
27050
|
+
(B = r.schema[oe]) != null && B.fieldNameHasDashes && (he = oe, D = r.schema[he]), X && ((le = r.schema[X]) == null ? void 0 : le.keyFromObject) === fe && (he = X, D = r.schema[he]);
|
|
27062
27051
|
}
|
|
27063
27052
|
const $ = ce[fe], L = typeof $;
|
|
27064
27053
|
if (D && D.type === "object-advanced" && !$) {
|
|
27065
|
-
b[
|
|
27054
|
+
b[he] = {}, M[he] = {};
|
|
27066
27055
|
return;
|
|
27067
27056
|
}
|
|
27068
27057
|
if (Array.isArray($)) {
|
|
27069
|
-
b[
|
|
27058
|
+
b[he] = JSON.parse(JSON.stringify($)), M[he] = JSON.parse(JSON.stringify($));
|
|
27070
27059
|
return;
|
|
27071
27060
|
}
|
|
27072
27061
|
if (L === "object" && $ && !$.length)
|
|
27073
|
-
return ee($,
|
|
27062
|
+
return ee($, he);
|
|
27074
27063
|
if (L === "object" && $ && $.length && D.type === "input") {
|
|
27075
|
-
b[
|
|
27064
|
+
b[he] = $.join(", "), M[he] = $.join(", ");
|
|
27076
27065
|
return;
|
|
27077
27066
|
}
|
|
27078
|
-
b[
|
|
27067
|
+
b[he] = $, M[he] = $;
|
|
27079
27068
|
}), i("model-updated", {
|
|
27080
27069
|
model: b,
|
|
27081
27070
|
originalModel: M,
|
|
27082
|
-
data:
|
|
27071
|
+
data: q()
|
|
27083
27072
|
});
|
|
27084
27073
|
}, ae = an(r.record), ne = (ce) => {
|
|
27085
27074
|
ae.value = ce, i("model-updated", {
|
|
@@ -27087,7 +27076,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
27087
27076
|
// otherwise the submit button will be disabled
|
|
27088
27077
|
model: { ...b, ...ce },
|
|
27089
27078
|
originalModel: M,
|
|
27090
|
-
data:
|
|
27079
|
+
data: q()
|
|
27091
27080
|
});
|
|
27092
27081
|
}, Y = pe(!0), ge = () => {
|
|
27093
27082
|
var ce;
|
|
@@ -27103,11 +27092,11 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
27103
27092
|
route_id: r.record.route_id || r.record.route,
|
|
27104
27093
|
consumer_id: r.record.consumer_id || r.record.consumer,
|
|
27105
27094
|
consumer_group_id: r.record.consumer_group_id || r.record.consumer_group
|
|
27106
|
-
}), r.record.partials &&
|
|
27095
|
+
}), r.record.partials && z("redis", { partials: r.record.partials }), T.value ? ne(r.record) : ee(r.record.config, "config"))), Object.keys(r.entityMap).length && !r.entityMap.global && r.schema) {
|
|
27107
27096
|
const X = {};
|
|
27108
27097
|
for (const fe in r.entityMap) {
|
|
27109
|
-
const
|
|
27110
|
-
Object.prototype.hasOwnProperty.call(b, $) && (X[$] =
|
|
27098
|
+
const he = r.entityMap[fe].id, D = r.entityMap[fe].idField, $ = D === "consumer_group_id" ? "consumer_group-id" : JSON.parse(JSON.stringify(D).replace("_", "-"));
|
|
27099
|
+
Object.prototype.hasOwnProperty.call(b, $) && (X[$] = he);
|
|
27111
27100
|
}
|
|
27112
27101
|
ee(X);
|
|
27113
27102
|
}
|
|
@@ -27120,18 +27109,18 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
27120
27109
|
return Le(Y, (ce) => {
|
|
27121
27110
|
i("loading", ce);
|
|
27122
27111
|
}), Le(() => r.schema, (ce, X) => {
|
|
27123
|
-
var
|
|
27112
|
+
var he, D;
|
|
27124
27113
|
if (h(ce || {}, X || {}))
|
|
27125
27114
|
return;
|
|
27126
27115
|
const fe = s(ce, void 0, void 0, r.engine);
|
|
27127
27116
|
Object.assign(b, fe.model), O.value = {
|
|
27128
|
-
fields: (D = (
|
|
27117
|
+
fields: (D = (he = O.value) == null ? void 0 : he.fields) == null ? void 0 : D.map(($) => ({ ...$, disabled: $.disabled || !1 }))
|
|
27129
27118
|
}, Object.assign(M, JSON.parse(JSON.stringify(fe.model))), T.value = r.engine ? r.engine === "vfg" ? void 0 : al(fe.model.name, m) || "CommonForm" : al(fe.model.name, m), x.value = Wf(fe.model.name), ge();
|
|
27130
27119
|
}, { immediate: !0, deep: !0 }), ao(() => {
|
|
27131
27120
|
var ce, X;
|
|
27132
27121
|
I.value = s(r.schema, void 0, void 0, r.engine), Object.assign(b, ((ce = I.value) == null ? void 0 : ce.model) || {}), O.value = ((X = I.value) == null ? void 0 : X.schema) || {}, ge();
|
|
27133
27122
|
}), (ce, X) => {
|
|
27134
|
-
var
|
|
27123
|
+
var he, D;
|
|
27135
27124
|
const fe = Ae("KSkeleton");
|
|
27136
27125
|
return k(), Q(Be, null, [
|
|
27137
27126
|
J("div", T8, [
|
|
@@ -27142,7 +27131,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
27142
27131
|
T.value ? (k(), H(gt(Kf[T.value]), {
|
|
27143
27132
|
key: 0,
|
|
27144
27133
|
"form-model": b,
|
|
27145
|
-
"form-options":
|
|
27134
|
+
"form-options": U.value,
|
|
27146
27135
|
"form-schema": O.value,
|
|
27147
27136
|
"is-editing": e.editing,
|
|
27148
27137
|
model: e.record,
|
|
@@ -27150,7 +27139,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
27150
27139
|
"on-model-updated": P,
|
|
27151
27140
|
"on-validity-change": K,
|
|
27152
27141
|
"plugin-name": b.name,
|
|
27153
|
-
"render-rules": (
|
|
27142
|
+
"render-rules": (he = p(on)[b.name]) == null ? void 0 : he.freeformRenderRules,
|
|
27154
27143
|
schema: A.value,
|
|
27155
27144
|
onGlobalAction: X[0] || (X[0] = ($, L) => ce.$emit("globalAction", $, L))
|
|
27156
27145
|
}, at({ _: 2 }, [
|
|
@@ -27165,11 +27154,11 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
27165
27154
|
key: 1,
|
|
27166
27155
|
"enable-redis-partial": e.enableRedisPartial,
|
|
27167
27156
|
"form-model": b,
|
|
27168
|
-
"form-options":
|
|
27157
|
+
"form-options": U.value,
|
|
27169
27158
|
"form-schema": O.value,
|
|
27170
27159
|
"is-editing": e.editing,
|
|
27171
27160
|
"on-model-updated": P,
|
|
27172
|
-
"on-partial-toggled":
|
|
27161
|
+
"on-partial-toggled": z,
|
|
27173
27162
|
"show-new-partial-modal": ($) => ce.$emit("showNewPartialModal", $)
|
|
27174
27163
|
}, at({ _: 2 }, [
|
|
27175
27164
|
e.enableVaultSecretPicker ? {
|
|
@@ -27184,15 +27173,15 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
27184
27173
|
"enable-redis-partial": e.enableRedisPartial,
|
|
27185
27174
|
"is-editing": e.editing,
|
|
27186
27175
|
model: b,
|
|
27187
|
-
options:
|
|
27176
|
+
options: U.value,
|
|
27188
27177
|
schema: O.value,
|
|
27189
27178
|
onModelUpdated: P,
|
|
27190
|
-
onPartialToggled:
|
|
27191
|
-
onRefreshModel:
|
|
27179
|
+
onPartialToggled: z,
|
|
27180
|
+
onRefreshModel: q,
|
|
27192
27181
|
onShowNewPartialModal: X[1] || (X[1] = ($) => ce.$emit("showNewPartialModal", $))
|
|
27193
27182
|
}, at({
|
|
27194
27183
|
"plugin-config-empty-state": F(() => [
|
|
27195
|
-
J("div", $8,
|
|
27184
|
+
J("div", $8, ve(p(g)("plugins.form.grouping.plugin_configuration.empty")), 1)
|
|
27196
27185
|
]),
|
|
27197
27186
|
_: 2
|
|
27198
27187
|
}, [
|
|
@@ -27217,8 +27206,8 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
27217
27206
|
]),
|
|
27218
27207
|
N(p(Xf), {
|
|
27219
27208
|
config: r.config,
|
|
27220
|
-
setup:
|
|
27221
|
-
onCancel: X[2] || (X[2] = () =>
|
|
27209
|
+
setup: j.value,
|
|
27210
|
+
onCancel: X[2] || (X[2] = () => j.value = !1),
|
|
27222
27211
|
onProceed: de
|
|
27223
27212
|
}, null, 8, ["config", "setup"])
|
|
27224
27213
|
], 64);
|
|
@@ -27390,7 +27379,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
27390
27379
|
}
|
|
27391
27380
|
let G;
|
|
27392
27381
|
return o.config.entityType && o.config.entityId ? G = Et.form[o.config.app].edit.forEntity.replace(/{entityType}/gi, o.config.entityType).replace(/{entityId}/gi, o.config.entityId) : G = Et.form[o.config.app].edit.all, o.config.app === "konnect" && ((me = on[o.pluginType]) != null && me.useUIData) ? `${G}?__ui_data=true` : G;
|
|
27393
|
-
}),
|
|
27382
|
+
}), U = () => {
|
|
27394
27383
|
m.value = !m.value;
|
|
27395
27384
|
}, A = R(() => {
|
|
27396
27385
|
var ye, Te, re, Ie, Pe, Ce, xe, ft;
|
|
@@ -27429,7 +27418,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
27429
27418
|
id: o.config.entityId,
|
|
27430
27419
|
idField: Zo[o.config.entityType.substring(0, o.config.entityType.length - 1).toUpperCase()]
|
|
27431
27420
|
}), ie;
|
|
27432
|
-
}),
|
|
27421
|
+
}), j = wo({
|
|
27433
27422
|
// this is a required field that the user cannot set, it's always the name of the plugin
|
|
27434
27423
|
// ex. 'acl'
|
|
27435
27424
|
name: {
|
|
@@ -27659,7 +27648,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
27659
27648
|
let ft = "string";
|
|
27660
27649
|
Ce.enum ? ft = ue(Ce.enum) : Ce.type === "boolean" ? ft = "boolean" : Ce.type === "number" || Ce.type === "integer" ? (ft = "number", W[xe].inputType = "number") : Ce.type === "array" ? (ft = "array", W[xe].default = Ce.default, Ce.len_min > 0 && (W[xe].submitWhenNull = !0)) : Ce.type === "foreign" ? ft = "object" : Ce.default && Array.isArray(Ce.default) ? (ft = "array", W[xe].valueArrayType = ue(Ce.default)) : Ce.default && (ft = typeof Ce.default), W[xe].valueType = ft, Ce.fieldNameHasDashes && (W[xe].fieldNameHasDashes = !0);
|
|
27661
27650
|
}), W;
|
|
27662
|
-
},
|
|
27651
|
+
}, q = () => {
|
|
27663
27652
|
var xe, ft, Ot, Mt, Tn, ke, ze, Oe, $e, Ne, Ve, Ge;
|
|
27664
27653
|
const G = ((xe = on[o.pluginType]) == null ? void 0 : xe.scope.includes(bt.SERVICE)) ?? !0, me = ((ft = on[o.pluginType]) == null ? void 0 : ft.scope.includes(bt.ROUTE)) ?? !0, W = ((Ot = on[o.pluginType]) == null ? void 0 : Ot.scope.includes(bt.CONSUMER)) ?? !0, Z = o.config.disableConsumerGroupScope ? !1 : ((Mt = on[o.pluginType]) == null ? void 0 : Mt.scope.includes(bt.CONSUMER_GROUP)) ?? !0, ie = o.config.entityType === "consumers" && !!o.config.entityId || !!((ke = (Tn = _.value) == null ? void 0 : Tn.consumer) != null && ke.id), ye = o.config.entityType === "consumer_groups" && !!o.config.entityId || !!((Oe = (ze = _.value) == null ? void 0 : ze.consumer_group) != null && Oe.id), Te = o.config.entityType === "services" && !!o.config.entityId || !!((Ne = ($e = _.value) == null ? void 0 : $e.service) != null && Ne.id), re = o.config.entityType === "routes" && !!o.config.entityId || !!((Ge = (Ve = _.value) == null ? void 0 : Ve.route) != null && Ge.id), Ie = [], Pe = (Ke, We, Ye) => Ke ? r("plugins.form.disable_source_scope_change", { scope: Ye }) : We ? r("plugins.form.disable_data_retrieving", { scope: Ye }) : "", Ce = (Ke) => {
|
|
27665
27654
|
var We, Ye;
|
|
@@ -27756,14 +27745,14 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
27756
27745
|
Ye
|
|
27757
27746
|
].join(", ")
|
|
27758
27747
|
].join(" ");
|
|
27759
|
-
|
|
27748
|
+
j.selectionGroup.fields.push({
|
|
27760
27749
|
label: r("plugins.form.scoping.label"),
|
|
27761
27750
|
description: ot,
|
|
27762
27751
|
fields: []
|
|
27763
|
-
}),
|
|
27752
|
+
}), j.selectionGroup.fields[1].fields = Ie;
|
|
27764
27753
|
}
|
|
27765
|
-
a[o.pluginType] && a[o.pluginType].overwriteDefault && Object.hasOwnProperty.call(a[o.pluginType], "formSchema") && Object.assign(
|
|
27766
|
-
},
|
|
27754
|
+
a[o.pluginType] && a[o.pluginType].overwriteDefault && Object.hasOwnProperty.call(a[o.pluginType], "formSchema") && Object.assign(j, a[o.pluginType].formSchema);
|
|
27755
|
+
}, z = R(() => !c(I.fields, T, !0)), P = R(() => !le.value && !x.value && (g.value === co.Create || z.value)), K = pe(!1), ee = pe(), ae = (G) => {
|
|
27767
27756
|
o.credential && G.password && (G.password = ""), I.fields.id = (G == null ? void 0 : G.id) || void 0, ee.value = G == null ? void 0 : G.ordering, Object.assign(T, I.fields), _.value = G, K.value = !0;
|
|
27768
27757
|
}, ne = pe({}), Y = (G) => {
|
|
27769
27758
|
var me;
|
|
@@ -27778,7 +27767,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
27778
27767
|
Le([A, K], (G, me) => {
|
|
27779
27768
|
const W = G[0] !== me[0], Z = G[1], ie = me[1];
|
|
27780
27769
|
if (!w.value && g.value === co.Edit && (W || Z && Z !== ie)) {
|
|
27781
|
-
const ye = de("config", S.value,
|
|
27770
|
+
const ye = de("config", S.value, j);
|
|
27782
27771
|
fe.value && (ye._isCustomPlugin = !0), C.value && (ye._supported_redis_partial_type = C.value), v.value = ye;
|
|
27783
27772
|
}
|
|
27784
27773
|
}, { deep: !0 });
|
|
@@ -27788,7 +27777,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
27788
27777
|
const G = o.config.entityType && o.config.entityId && !o.developer, me = w.value ? Et.form[o.config.app].credential[g.value] : Et.form[o.config.app][g.value][G ? "forEntity" : "all"];
|
|
27789
27778
|
let W = `${o.config.apiBaseUrl}${me}`;
|
|
27790
27779
|
return o.config.app === "konnect" ? W = W.replace(/{controlPlaneId}/gi, o.config.controlPlaneId || "") : o.config.app === "kongManager" && (W = W.replace(/\/{workspace}/gi, o.config.workspace ? `/${o.config.workspace}` : "")), W = W.replace(/{resourceEndpoint}/gi, V.value), W = W.replace(/{id}/gi, o.pluginId), W = W.replace(/{entityType}/gi, o.config.entityType || ""), W = W.replace(/{entityId}/gi, o.config.entityId || ""), W;
|
|
27791
|
-
}), fe = R(() => !Object.keys(on).includes(o.pluginType)),
|
|
27780
|
+
}), fe = R(() => !Object.keys(on).includes(o.pluginType)), he = R(() => {
|
|
27792
27781
|
const G = ne.value;
|
|
27793
27782
|
if (w.value) {
|
|
27794
27783
|
for (const me in bt) {
|
|
@@ -27799,14 +27788,14 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
27799
27788
|
}
|
|
27800
27789
|
return ne.value.partials && E.value && jc(G, E.value), G;
|
|
27801
27790
|
}), D = R(() => {
|
|
27802
|
-
const { __ui_data: G, ...me } = { ...
|
|
27791
|
+
const { __ui_data: G, ...me } = { ...he.value };
|
|
27803
27792
|
return me;
|
|
27804
27793
|
}), $ = async () => {
|
|
27805
27794
|
if (!I.clientErrorMessage && !o.isWizardStep)
|
|
27806
27795
|
try {
|
|
27807
27796
|
I.isReadonly = !0;
|
|
27808
27797
|
let G;
|
|
27809
|
-
const me = JSON.parse(JSON.stringify(
|
|
27798
|
+
const me = JSON.parse(JSON.stringify(he.value)), W = a[o.pluginType];
|
|
27810
27799
|
typeof (W == null ? void 0 : W.shamefullyTransformPayload) == "function" && W.shamefullyTransformPayload({
|
|
27811
27800
|
originalModel: T,
|
|
27812
27801
|
model: I.fields,
|
|
@@ -27838,16 +27827,16 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
27838
27827
|
v.value = de("", ie, {}), le.value = !1;
|
|
27839
27828
|
else {
|
|
27840
27829
|
const ye = ie.fields.find((re) => re.config);
|
|
27841
|
-
S.value = ye ? ye.config : ie, ie.supported_partials && (C.value = Object.keys(ie.supported_partials).find((re) => [Zs.REDIS_CE, Zs.REDIS_EE].includes(re)), E.value = (me = ie.supported_partials[C.value]) == null ? void 0 : me[0]),
|
|
27830
|
+
S.value = ye ? ye.config : ie, ie.supported_partials && (C.value = Object.keys(ie.supported_partials).find((re) => [Zs.REDIS_CE, Zs.REDIS_EE].includes(re)), E.value = (me = ie.supported_partials[C.value]) == null ? void 0 : me[0]), q();
|
|
27842
27831
|
const Te = (W = ie.fields.find((re) => re.protocols)) == null ? void 0 : W.protocols;
|
|
27843
27832
|
if (Te) {
|
|
27844
27833
|
const { default: re = [], elements: Ie = {} } = Te;
|
|
27845
|
-
|
|
27834
|
+
j.protocols.default = re, j.protocols.placeholder = o.config.app === "konnect" ? r("plugins.form.fields.protocols.placeholderWithDefaultValues", {
|
|
27846
27835
|
protocols: re.join(", ")
|
|
27847
|
-
}) : r("plugins.form.fields.protocols.placeholder"), (Z = Ie.one_of) != null && Z.length && (
|
|
27836
|
+
}) : r("plugins.form.fields.protocols.placeholder"), (Z = Ie.one_of) != null && Z.length && (j.protocols.values = Ie.one_of.map((Pe) => ({ label: Pe, value: Pe })));
|
|
27848
27837
|
}
|
|
27849
27838
|
if (K.value || g.value === co.Create) {
|
|
27850
|
-
const re = de("config", S.value,
|
|
27839
|
+
const re = de("config", S.value, j);
|
|
27851
27840
|
C.value && (re._supported_redis_partial_type = C.value), fe.value && (re._isCustomPlugin = !0), v.value = re;
|
|
27852
27841
|
}
|
|
27853
27842
|
}
|
|
@@ -27870,7 +27859,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
27870
27859
|
"icon-variant": "error"
|
|
27871
27860
|
}, {
|
|
27872
27861
|
default: F(() => [
|
|
27873
|
-
J("h3", null,
|
|
27862
|
+
J("h3", null, ve(p(r)("errors.load_schema")), 1)
|
|
27874
27863
|
]),
|
|
27875
27864
|
_: 1
|
|
27876
27865
|
})) : (k(), H(p(mv), {
|
|
@@ -27881,7 +27870,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
27881
27870
|
"entity-type": p(Gs).Plugin,
|
|
27882
27871
|
"error-message": we.value,
|
|
27883
27872
|
"fetch-url": b.value,
|
|
27884
|
-
"form-fields":
|
|
27873
|
+
"form-fields": he.value,
|
|
27885
27874
|
"is-readonly": I.isReadonly,
|
|
27886
27875
|
"no-validate": "",
|
|
27887
27876
|
"wrapper-component": e.noCardWrapper ? "div" : void 0,
|
|
@@ -27901,10 +27890,10 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
27901
27890
|
key: 0,
|
|
27902
27891
|
appearance: "tertiary",
|
|
27903
27892
|
"data-testid": `plugin-${h.value ? "edit" : "create"}-form-view-configuration`,
|
|
27904
|
-
onClick: me[3] || (me[3] = (re) =>
|
|
27893
|
+
onClick: me[3] || (me[3] = (re) => U())
|
|
27905
27894
|
}, {
|
|
27906
27895
|
default: F(() => [
|
|
27907
|
-
Me(
|
|
27896
|
+
Me(ve(p(r)("actions.view_configuration")), 1)
|
|
27908
27897
|
]),
|
|
27909
27898
|
_: 1
|
|
27910
27899
|
}, 8, ["data-testid"])),
|
|
@@ -27916,7 +27905,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
27916
27905
|
onClick: ce
|
|
27917
27906
|
}, {
|
|
27918
27907
|
default: F(() => [
|
|
27919
|
-
Me(
|
|
27908
|
+
Me(ve(p(r)("actions.cancel")), 1)
|
|
27920
27909
|
]),
|
|
27921
27910
|
_: 1
|
|
27922
27911
|
}, 8, ["data-testid", "disabled"]),
|
|
@@ -27928,7 +27917,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
27928
27917
|
onClick: $
|
|
27929
27918
|
}, {
|
|
27930
27919
|
default: F(() => [
|
|
27931
|
-
Me(
|
|
27920
|
+
Me(ve(p(r)("actions.save")), 1)
|
|
27932
27921
|
]),
|
|
27933
27922
|
_: 1
|
|
27934
27923
|
}, 8, ["data-testid", "disabled"])
|
|
@@ -27969,10 +27958,10 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
27969
27958
|
"offset-top": 60,
|
|
27970
27959
|
title: p(r)("view_configuration.title"),
|
|
27971
27960
|
visible: m.value,
|
|
27972
|
-
onClose:
|
|
27961
|
+
onClose: U
|
|
27973
27962
|
}, {
|
|
27974
27963
|
default: F(() => [
|
|
27975
|
-
J("div", null,
|
|
27964
|
+
J("div", null, ve(p(r)("view_configuration.message")), 1),
|
|
27976
27965
|
N(ye, {
|
|
27977
27966
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
27978
27967
|
tabs: O.value
|
|
@@ -28137,7 +28126,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
28137
28126
|
}, b = async (oe, te) => {
|
|
28138
28127
|
var G;
|
|
28139
28128
|
return oe === null ? !1 : await ((G = i.canRetrieveScopedEntity) == null ? void 0 : G.call(i, oe, te.id));
|
|
28140
|
-
},
|
|
28129
|
+
}, U = (oe, te) => {
|
|
28141
28130
|
var me, W, Z, ie, ye;
|
|
28142
28131
|
let G = null;
|
|
28143
28132
|
switch (oe) {
|
|
@@ -28155,38 +28144,38 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
28155
28144
|
break;
|
|
28156
28145
|
}
|
|
28157
28146
|
G && ((ye = i.config) != null && ye.getScopedEntityViewRoute) && a.push(i.config.getScopedEntityViewRoute(oe, G));
|
|
28158
|
-
}, A = pe(!1),
|
|
28147
|
+
}, A = pe(!1), j = pe(null), V = R(() => {
|
|
28159
28148
|
const oe = {
|
|
28160
28149
|
action: "disable",
|
|
28161
28150
|
id: "",
|
|
28162
28151
|
name: ""
|
|
28163
28152
|
};
|
|
28164
|
-
if (
|
|
28165
|
-
const { enabled: te, id: G, name: me } =
|
|
28153
|
+
if (j.value) {
|
|
28154
|
+
const { enabled: te, id: G, name: me } = j.value;
|
|
28166
28155
|
oe.action = te ? "disable" : "enable", oe.id = G, oe.name = n.getDisplayName(me) || G;
|
|
28167
28156
|
}
|
|
28168
28157
|
return oe;
|
|
28169
28158
|
}), ue = (oe) => {
|
|
28170
|
-
A.value = !0,
|
|
28159
|
+
A.value = !0, j.value = oe;
|
|
28171
28160
|
}, de = () => {
|
|
28172
|
-
A.value = !1,
|
|
28173
|
-
},
|
|
28161
|
+
A.value = !1, j.value = null;
|
|
28162
|
+
}, q = async () => {
|
|
28174
28163
|
var me, W, Z, ie, ye, Te, re, Ie;
|
|
28175
|
-
if (!await ((me = i.canEdit) == null ? void 0 : me.call(i,
|
|
28164
|
+
if (!await ((me = i.canEdit) == null ? void 0 : me.call(i, j.value)) || !j.value)
|
|
28176
28165
|
return;
|
|
28177
|
-
let te = `${i.config.apiBaseUrl}${(ye = Et.item[i.config.app]) == null ? void 0 : ye[(W = i.config) != null && W.entityType ? "forEntity" : "all"].replace(/{entityType}/gi, ((Z = i.config) == null ? void 0 : Z.entityType) || "").replace(/{entityId}/gi, ((ie = i.config) == null ? void 0 : ie.entityId) || "")}`.replace(/{id}/gi,
|
|
28166
|
+
let te = `${i.config.apiBaseUrl}${(ye = Et.item[i.config.app]) == null ? void 0 : ye[(W = i.config) != null && W.entityType ? "forEntity" : "all"].replace(/{entityType}/gi, ((Z = i.config) == null ? void 0 : Z.entityType) || "").replace(/{entityId}/gi, ((ie = i.config) == null ? void 0 : ie.entityId) || "")}`.replace(/{id}/gi, j.value.id || "");
|
|
28178
28167
|
i.config.app === "konnect" ? te = te.replace(/{controlPlaneId}/gi, ((Te = i.config) == null ? void 0 : Te.controlPlaneId) || "") : i.config.app === "kongManager" && (te = te.replace(/\/{workspace}/gi, (re = i.config) != null && re.workspace ? `/${i.config.workspace}` : ""));
|
|
28179
|
-
const G = !
|
|
28168
|
+
const G = !j.value.enabled;
|
|
28180
28169
|
try {
|
|
28181
28170
|
const Pe = (Ie = i.config) == null ? void 0 : Ie.app;
|
|
28182
28171
|
let Ce;
|
|
28183
28172
|
_.value && Pe === "konnect" && (Ce = await s.get(te));
|
|
28184
|
-
const { data: xe } = Pe === "konnect" ? await s.put(te, { ...(Ce == null ? void 0 : Ce.data) ||
|
|
28185
|
-
o("toggle-enabled", G, xe),
|
|
28173
|
+
const { data: xe } = Pe === "konnect" ? await s.put(te, { ...(Ce == null ? void 0 : Ce.data) || j.value, enabled: G }, { timeout: 12e4 }) : await s.patch(te, { ...j.value, enabled: G }, { timeout: 12e4 });
|
|
28174
|
+
o("toggle-enabled", G, xe), j.value.enabled = G;
|
|
28186
28175
|
} catch (Pe) {
|
|
28187
28176
|
o("error", Pe);
|
|
28188
28177
|
}
|
|
28189
|
-
},
|
|
28178
|
+
}, z = async (oe, te) => {
|
|
28190
28179
|
const G = oe.id;
|
|
28191
28180
|
if (!await te(G)) {
|
|
28192
28181
|
o("copy:error", {
|
|
@@ -28230,7 +28219,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
28230
28219
|
Y.value = oe, ge.value = !0;
|
|
28231
28220
|
}, fe = () => {
|
|
28232
28221
|
ge.value = !1;
|
|
28233
|
-
},
|
|
28222
|
+
}, he = async () => {
|
|
28234
28223
|
var oe, te, G;
|
|
28235
28224
|
if ((oe = Y.value) != null && oe.id) {
|
|
28236
28225
|
we.value = !0;
|
|
@@ -28323,7 +28312,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
28323
28312
|
}, {
|
|
28324
28313
|
default: F(() => [
|
|
28325
28314
|
N(p(un)),
|
|
28326
|
-
Me(" " +
|
|
28315
|
+
Me(" " + ve(p(r)("plugins.list.toolbar_actions.new_plugin")), 1)
|
|
28327
28316
|
]),
|
|
28328
28317
|
_: 1
|
|
28329
28318
|
}, 8, ["size", "to"])
|
|
@@ -28341,8 +28330,8 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
28341
28330
|
size: 24
|
|
28342
28331
|
}, null, 8, ["name"]),
|
|
28343
28332
|
J("div", q8, [
|
|
28344
|
-
re.instance_name ? (k(), Q("span", z8,
|
|
28345
|
-
re.instance_name ? (k(), Q("span", H8,
|
|
28333
|
+
re.instance_name ? (k(), Q("span", z8, ve(re.instance_name), 1)) : (k(), Q("span", U8, ve(p(n).getDisplayName(re.name)), 1)),
|
|
28334
|
+
re.instance_name ? (k(), Q("span", H8, ve(p(n).getDisplayName(re.name)), 1)) : Ee("", !0)
|
|
28346
28335
|
])
|
|
28347
28336
|
])
|
|
28348
28337
|
]),
|
|
@@ -28357,10 +28346,10 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
28357
28346
|
default: F(({ isAllowed: Pe }) => [
|
|
28358
28347
|
N(W, {
|
|
28359
28348
|
class: Je(Pe || "disabled"),
|
|
28360
|
-
onClick: Pt((Ce) => Pe && Ie.type &&
|
|
28349
|
+
onClick: Pt((Ce) => Pe && Ie.type && U(Ie.type, re), ["stop"])
|
|
28361
28350
|
}, {
|
|
28362
28351
|
default: F(() => [
|
|
28363
|
-
Me(
|
|
28352
|
+
Me(ve(Ie.badgeText), 1)
|
|
28364
28353
|
]),
|
|
28365
28354
|
_: 2
|
|
28366
28355
|
}, 1032, ["class", "onClick"])
|
|
@@ -28400,7 +28389,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
28400
28389
|
appearance: p(Vc)(re) ? "info" : "warning"
|
|
28401
28390
|
}, {
|
|
28402
28391
|
default: F(() => [
|
|
28403
|
-
Me(
|
|
28392
|
+
Me(ve(p(Vc)(re) ? p(r)("plugins.list.table_headers.ordering_badge.static") : p(r)("plugins.list.table_headers.ordering_badge.dynamic")), 1)
|
|
28404
28393
|
]),
|
|
28405
28394
|
_: 2
|
|
28406
28395
|
}, 1032, ["appearance"])
|
|
@@ -28413,10 +28402,10 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
28413
28402
|
default: F(({ copyToClipboard: Ie }) => [
|
|
28414
28403
|
N(ye, {
|
|
28415
28404
|
"data-testid": "action-entity-copy-id",
|
|
28416
|
-
onClick: (Pe) =>
|
|
28405
|
+
onClick: (Pe) => z(re, Ie)
|
|
28417
28406
|
}, {
|
|
28418
28407
|
default: F(() => [
|
|
28419
|
-
Me(
|
|
28408
|
+
Me(ve(p(r)("actions.copy_id")), 1)
|
|
28420
28409
|
]),
|
|
28421
28410
|
_: 1
|
|
28422
28411
|
}, 8, ["onClick"])
|
|
@@ -28430,7 +28419,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
28430
28419
|
onClick: (Pe) => P(re, Ie)
|
|
28431
28420
|
}, {
|
|
28432
28421
|
default: F(() => [
|
|
28433
|
-
Me(
|
|
28422
|
+
Me(ve(p(r)("actions.copy_json")), 1)
|
|
28434
28423
|
]),
|
|
28435
28424
|
_: 1
|
|
28436
28425
|
}, 8, ["onClick"])
|
|
@@ -28484,7 +28473,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
28484
28473
|
onClick: (Ie) => X(re)
|
|
28485
28474
|
}, {
|
|
28486
28475
|
default: F(() => [
|
|
28487
|
-
Me(
|
|
28476
|
+
Me(ve(p(r)("actions.delete")), 1)
|
|
28488
28477
|
]),
|
|
28489
28478
|
_: 1
|
|
28490
28479
|
}, 8, ["onClick"])
|
|
@@ -28516,7 +28505,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
28516
28505
|
}, {
|
|
28517
28506
|
default: F(() => [
|
|
28518
28507
|
N(p(un), { decorative: "" }),
|
|
28519
|
-
Me(" " +
|
|
28508
|
+
Me(" " + ve(p(r)("plugins.list.empty_state_v2.create_cta")), 1)
|
|
28520
28509
|
]),
|
|
28521
28510
|
_: 1
|
|
28522
28511
|
})) : Ee("", !0),
|
|
@@ -28527,7 +28516,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
28527
28516
|
}, {
|
|
28528
28517
|
default: F(() => [
|
|
28529
28518
|
N(p(tc), { decorative: "" }),
|
|
28530
|
-
Me(" " +
|
|
28519
|
+
Me(" " + ve(p(r)("plugins.list.empty_state_v2.learn_more")), 1)
|
|
28531
28520
|
]),
|
|
28532
28521
|
_: 1
|
|
28533
28522
|
})
|
|
@@ -28537,7 +28526,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
28537
28526
|
(re = e.config) != null && re.isControlPlaneGroup ? {
|
|
28538
28527
|
name: "default",
|
|
28539
28528
|
fn: F(() => [
|
|
28540
|
-
Me(
|
|
28529
|
+
Me(ve(p(r)("plugins.list.empty_state_v2.group")), 1)
|
|
28541
28530
|
]),
|
|
28542
28531
|
key: "0"
|
|
28543
28532
|
} : void 0
|
|
@@ -28552,7 +28541,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
28552
28541
|
"entity-id": V.value.id,
|
|
28553
28542
|
"entity-name": V.value.name,
|
|
28554
28543
|
"entity-type": p(r)("glossary.plugin"),
|
|
28555
|
-
"on-confirm":
|
|
28544
|
+
"on-confirm": q,
|
|
28556
28545
|
visible: A.value,
|
|
28557
28546
|
onCancel: de,
|
|
28558
28547
|
onProceed: de
|
|
@@ -28566,7 +28555,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
28566
28555
|
title: p(r)("delete.title"),
|
|
28567
28556
|
visible: ge.value,
|
|
28568
28557
|
onCancel: fe,
|
|
28569
|
-
onProceed:
|
|
28558
|
+
onProceed: he
|
|
28570
28559
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
28571
28560
|
]);
|
|
28572
28561
|
};
|
|
@@ -28645,7 +28634,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
28645
28634
|
J("div", J8, [
|
|
28646
28635
|
J("span", {
|
|
28647
28636
|
class: Je({ "non-custom-title": !m.value })
|
|
28648
|
-
},
|
|
28637
|
+
}, ve(e.plugin.name), 3)
|
|
28649
28638
|
]),
|
|
28650
28639
|
l.value ? (k(), Q("div", Q8, [
|
|
28651
28640
|
N(C, {
|
|
@@ -28674,7 +28663,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
28674
28663
|
onClick: w[0] || (w[0] = Pt((x) => g(e.plugin.name, e.plugin.customPluginType), ["stop"]))
|
|
28675
28664
|
}, {
|
|
28676
28665
|
default: F(() => [
|
|
28677
|
-
Me(
|
|
28666
|
+
Me(ve(p(r)("actions.edit")), 1)
|
|
28678
28667
|
]),
|
|
28679
28668
|
_: 1
|
|
28680
28669
|
})) : Ee("", !0),
|
|
@@ -28686,7 +28675,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
28686
28675
|
onClick: Pt(h, ["stop"])
|
|
28687
28676
|
}, {
|
|
28688
28677
|
default: F(() => [
|
|
28689
|
-
Me(
|
|
28678
|
+
Me(ve(p(r)("actions.delete")), 1)
|
|
28690
28679
|
]),
|
|
28691
28680
|
_: 1
|
|
28692
28681
|
})) : Ee("", !0)
|
|
@@ -28708,18 +28697,18 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
28708
28697
|
size: 55
|
|
28709
28698
|
}, null, 8, ["alt", "name"]),
|
|
28710
28699
|
e.plugin.description || m.value && !f.value ? (k(), Q("div", tj, [
|
|
28711
|
-
m.value && !f.value ? (k(), Q("p", nj,
|
|
28700
|
+
m.value && !f.value ? (k(), Q("p", nj, ve(p(r)("plugins.select.custom_badge_text")), 1)) : Ee("", !0),
|
|
28712
28701
|
e.plugin.description ? (k(), Q("p", {
|
|
28713
28702
|
key: 1,
|
|
28714
28703
|
class: "plugin-card-text",
|
|
28715
28704
|
title: e.plugin.description
|
|
28716
|
-
},
|
|
28705
|
+
}, ve(e.plugin.description), 9, oj)) : Ee("", !0)
|
|
28717
28706
|
])) : Ee("", !0)
|
|
28718
28707
|
], 10, ej),
|
|
28719
28708
|
J("div", {
|
|
28720
28709
|
class: "plugin-card-footer",
|
|
28721
28710
|
onClick: y
|
|
28722
|
-
},
|
|
28711
|
+
}, ve(f.value ? p(r)("actions.create_custom") : e.plugin.exists ? p(r)("actions.enabled") : p(r)("actions.enable")), 1)
|
|
28723
28712
|
], 10, X8)
|
|
28724
28713
|
]),
|
|
28725
28714
|
_: 1
|
|
@@ -28798,7 +28787,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
28798
28787
|
tag: "p"
|
|
28799
28788
|
}, {
|
|
28800
28789
|
name: F(() => [
|
|
28801
|
-
J("strong", null,
|
|
28790
|
+
J("strong", null, ve(e.plugin.name), 1)
|
|
28802
28791
|
]),
|
|
28803
28792
|
_: 1
|
|
28804
28793
|
})
|
|
@@ -28813,7 +28802,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
28813
28802
|
onClick: y[1] || (y[1] = (_) => g.$emit("closed"))
|
|
28814
28803
|
}, {
|
|
28815
28804
|
default: F(() => [
|
|
28816
|
-
Me(
|
|
28805
|
+
Me(ve(p(r)("actions.cancel")), 1)
|
|
28817
28806
|
]),
|
|
28818
28807
|
_: 1
|
|
28819
28808
|
})
|
|
@@ -28956,10 +28945,10 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
28956
28945
|
"icon-variant": "kong"
|
|
28957
28946
|
}, {
|
|
28958
28947
|
title: F(() => [
|
|
28959
|
-
J("span", lj,
|
|
28948
|
+
J("span", lj, ve(p(i)("plugins.select.tabs.custom.empty_title")), 1)
|
|
28960
28949
|
]),
|
|
28961
28950
|
default: F(() => [
|
|
28962
|
-
J("span", uj,
|
|
28951
|
+
J("span", uj, ve(p(i)("plugins.select.tabs.custom.empty_description")), 1)
|
|
28963
28952
|
]),
|
|
28964
28953
|
_: 1
|
|
28965
28954
|
})),
|
|
@@ -29129,10 +29118,10 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
29129
29118
|
"icon-variant": "kong"
|
|
29130
29119
|
}, {
|
|
29131
29120
|
title: F(() => [
|
|
29132
|
-
J("span", mj,
|
|
29121
|
+
J("span", mj, ve(p(i)("plugins.select.tabs.kong.empty_title")), 1)
|
|
29133
29122
|
]),
|
|
29134
29123
|
default: F(() => [
|
|
29135
|
-
J("span", gj,
|
|
29124
|
+
J("span", gj, ve(p(i)("plugins.select.tabs.kong.empty_description")), 1)
|
|
29136
29125
|
]),
|
|
29137
29126
|
_: 1
|
|
29138
29127
|
})),
|
|
@@ -29249,8 +29238,8 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
29249
29238
|
},
|
|
29250
29239
|
emits: ["loading", "plugin-clicked", "delete-custom:success"],
|
|
29251
29240
|
setup(e, { emit: t }) {
|
|
29252
|
-
var
|
|
29253
|
-
const n = e, o = t, i = Nv(), r = Oa(), { i18n: { t: a } } = st.useI18n(), { pluginMetaData: s } = st.usePluginMetaData(), { getMessageFromError: l } = ki(), { sortAlpha: u, objectsAreEqual: d } = $a(), c = pe(""), f = pe(!0), m = pe(!1), h = pe(""), g = pe([]), y = pe([]), v = pe({}), w = pe([]), { axiosInstance: _ } = so((
|
|
29241
|
+
var z;
|
|
29242
|
+
const n = e, o = t, i = Nv(), r = Oa(), { i18n: { t: a } } = st.useI18n(), { pluginMetaData: s } = st.usePluginMetaData(), { getMessageFromError: l } = ki(), { sortAlpha: u, objectsAreEqual: d } = $a(), c = pe(""), f = pe(!0), m = pe(!1), h = pe(""), g = pe([]), y = pe([]), v = pe({}), w = pe([]), { axiosInstance: _ } = so((z = n.config) == null ? void 0 : z.axiosRequestConfig), S = R(() => v.value ? Object.entries(v.value).filter(([P]) => P !== it.CUSTOM_PLUGINS).reduce((P, [, K]) => {
|
|
29254
29243
|
for (const ee of K)
|
|
29255
29244
|
P[ee.id] = ee;
|
|
29256
29245
|
return P;
|
|
@@ -29304,7 +29293,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
29304
29293
|
var K;
|
|
29305
29294
|
let P = `${n.config.apiBaseUrl}${Et.select[n.config.app].availablePlugins}`;
|
|
29306
29295
|
return n.config.app === "konnect" ? P = P.replace(/{controlPlaneId}/gi, n.config.controlPlaneId || "") : n.config.app === "kongManager" && (P = ((K = n.config.gatewayInfo) == null ? void 0 : K.edition) === "community" ? `${n.config.apiBaseUrl}${Et.select[n.config.app].availablePluginsForOss}` : P.replace(/\/{workspace}/gi, n.config.workspace ? `/${n.config.workspace}` : "")), P;
|
|
29307
|
-
}),
|
|
29296
|
+
}), U = R(() => {
|
|
29308
29297
|
if (n.config.app === "konnect" && n.customPluginSupport === "streaming") {
|
|
29309
29298
|
let P = `${n.config.apiBaseUrl}${Et.select[n.config.app].streamingCustomPlugins}`;
|
|
29310
29299
|
return P = P.replace(/{controlPlaneId}/gi, n.config.controlPlaneId || ""), P;
|
|
@@ -29316,7 +29305,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
29316
29305
|
return n.config.app === "konnect" ? P = P.replace(/{controlPlaneId}/gi, n.config.controlPlaneId || "") : n.config.app === "kongManager" && (P = P.replace(/\/{workspace}/gi, n.config.workspace ? `/${n.config.workspace}` : "")), P.replace(/{entityType}/gi, n.config.entityType || "").replace(/{entityId}/gi, n.config.entityId || "");
|
|
29317
29306
|
}
|
|
29318
29307
|
return "";
|
|
29319
|
-
}),
|
|
29308
|
+
}), j = (P) => {
|
|
29320
29309
|
r.replace({ hash: P, query: i.query });
|
|
29321
29310
|
};
|
|
29322
29311
|
Le(() => n.disabledPlugins, (P, K) => {
|
|
@@ -29330,16 +29319,16 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
29330
29319
|
ao(async () => {
|
|
29331
29320
|
V.value = await n.canCreateCustomPlugin(), ue.value = await n.canEditCustomPlugin(), de.value = await n.canDeleteCustomPlugin();
|
|
29332
29321
|
});
|
|
29333
|
-
const
|
|
29322
|
+
const q = pt("filter-input");
|
|
29334
29323
|
return Bt(async () => {
|
|
29335
29324
|
var P, K;
|
|
29336
|
-
(K = (P =
|
|
29325
|
+
(K = (P = q.value) == null ? void 0 : P.input) == null || K.focus();
|
|
29337
29326
|
try {
|
|
29338
29327
|
const { data: ee } = await _.get(b.value);
|
|
29339
29328
|
if (n.config.app === "konnect") {
|
|
29340
29329
|
const { names: ae } = ee;
|
|
29341
|
-
if (g.value = ae || [],
|
|
29342
|
-
const { data: ne } = await _.get(
|
|
29330
|
+
if (g.value = ae || [], U.value) {
|
|
29331
|
+
const { data: ne } = await _.get(U.value);
|
|
29343
29332
|
y.value = ne.data || [];
|
|
29344
29333
|
}
|
|
29345
29334
|
} else if (n.config.app === "kongManager") {
|
|
@@ -29391,7 +29380,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
29391
29380
|
"icon-variant": "error"
|
|
29392
29381
|
}, {
|
|
29393
29382
|
default: F(() => [
|
|
29394
|
-
J("h3", null,
|
|
29383
|
+
J("h3", null, ve(h.value), 1)
|
|
29395
29384
|
]),
|
|
29396
29385
|
_: 1
|
|
29397
29386
|
})) : T.value && c.value ? (k(), H(Y, {
|
|
@@ -29401,7 +29390,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
29401
29390
|
"icon-variant": "search"
|
|
29402
29391
|
}, {
|
|
29403
29392
|
default: F(() => [
|
|
29404
|
-
J("h5", null,
|
|
29393
|
+
J("h5", null, ve(p(a)("search.no_results", { filter: c.value })), 1)
|
|
29405
29394
|
]),
|
|
29406
29395
|
_: 1
|
|
29407
29396
|
})) : (k(), Q("section", _j, [
|
|
@@ -29411,11 +29400,11 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
29411
29400
|
"onUpdate:modelValue": K[5] || (K[5] = (Se) => O.value = Se),
|
|
29412
29401
|
"data-testid": "plugins-tabs",
|
|
29413
29402
|
tabs: I.value,
|
|
29414
|
-
onChange:
|
|
29403
|
+
onChange: j
|
|
29415
29404
|
}, at({
|
|
29416
29405
|
kong: F(() => [
|
|
29417
29406
|
J("div", bj, [
|
|
29418
|
-
J("p", wj,
|
|
29407
|
+
J("p", wj, ve(p(a)("plugins.select.tabs.kong.description")), 1),
|
|
29419
29408
|
N(Vf, {
|
|
29420
29409
|
config: e.config,
|
|
29421
29410
|
"hide-highlighted-plugins": c.value.length > 0,
|
|
@@ -29430,7 +29419,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
29430
29419
|
custom: F(() => [
|
|
29431
29420
|
J("div", Ej, [
|
|
29432
29421
|
qe(P.$slots, "before-custom-tab-content", {}, void 0, !0),
|
|
29433
|
-
J("p", kj,
|
|
29422
|
+
J("p", kj, ve(p(a)("plugins.select.tabs.custom.description")), 1),
|
|
29434
29423
|
N(dj, {
|
|
29435
29424
|
"can-create-custom-plugin": V.value,
|
|
29436
29425
|
"can-delete-custom-plugin": de.value,
|
|
@@ -29454,7 +29443,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
29454
29443
|
text: p(a)("plugins.select.tabs.custom.disabled_tooltip")
|
|
29455
29444
|
}, {
|
|
29456
29445
|
default: F(() => [
|
|
29457
|
-
J("div", null,
|
|
29446
|
+
J("div", null, ve(p(a)("plugins.select.tabs.custom.title")), 1)
|
|
29458
29447
|
]),
|
|
29459
29448
|
_: 1
|
|
29460
29449
|
}, 8, ["text"])
|
|
@@ -29571,8 +29560,8 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
29571
29560
|
var I, O;
|
|
29572
29561
|
const x = {}, T = ((I = _.value) == null ? void 0 : I.fields) || [];
|
|
29573
29562
|
for (let M = 0; M < T.length; M++) {
|
|
29574
|
-
const b = _.value.fields[M],
|
|
29575
|
-
a(x,
|
|
29563
|
+
const b = _.value.fields[M], U = (O = Object.keys(b)) == null ? void 0 : O[0];
|
|
29564
|
+
a(x, U, b[U]);
|
|
29576
29565
|
}
|
|
29577
29566
|
return {
|
|
29578
29567
|
...x,
|
|
@@ -29611,8 +29600,8 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
29611
29600
|
if (!((T = _.value) != null && T.fields))
|
|
29612
29601
|
return [];
|
|
29613
29602
|
const x = (I = _.value.fields) == null ? void 0 : I.find((M) => {
|
|
29614
|
-
var
|
|
29615
|
-
return ((
|
|
29603
|
+
var U;
|
|
29604
|
+
return ((U = Object.keys(M)) == null ? void 0 : U[0]) === Us;
|
|
29616
29605
|
});
|
|
29617
29606
|
return ((O = x == null ? void 0 : x[Us]) == null ? void 0 : O.fields) || [];
|
|
29618
29607
|
}), m = R(() => {
|
|
@@ -29621,10 +29610,10 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
29621
29610
|
if (!f.value)
|
|
29622
29611
|
return x;
|
|
29623
29612
|
for (let O = 0; O < ((T = f.value) == null ? void 0 : T.length); O++) {
|
|
29624
|
-
const M = f.value[O], b = (I = Object.keys(M)) == null ? void 0 : I[0],
|
|
29625
|
-
|
|
29613
|
+
const M = f.value[O], b = (I = Object.keys(M)) == null ? void 0 : I[0], U = M[b];
|
|
29614
|
+
U.required && (x[b] = {
|
|
29626
29615
|
order: 1
|
|
29627
|
-
}), a(x, b,
|
|
29616
|
+
}), a(x, b, U);
|
|
29628
29617
|
}
|
|
29629
29618
|
return x;
|
|
29630
29619
|
}), h = (x) => {
|
|
@@ -29662,7 +29651,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
29662
29651
|
"icon-variant": "error"
|
|
29663
29652
|
}, {
|
|
29664
29653
|
default: F(() => [
|
|
29665
|
-
J("h3", null,
|
|
29654
|
+
J("h3", null, ve(C.value), 1)
|
|
29666
29655
|
]),
|
|
29667
29656
|
_: 1
|
|
29668
29657
|
})) : (k(), H(p(Iv), {
|
|
@@ -29688,7 +29677,7 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
29688
29677
|
name: p(s)("rowValue", b),
|
|
29689
29678
|
size: 24
|
|
29690
29679
|
}, null, 8, ["name"]),
|
|
29691
|
-
J("span", Pj,
|
|
29680
|
+
J("span", Pj, ve(p(r).getDisplayName(p(s)("rowValue", b))), 1)
|
|
29692
29681
|
])
|
|
29693
29682
|
]),
|
|
29694
29683
|
consumer: F((b) => [
|
|
@@ -29756,13 +29745,13 @@ const T8 = { class: "kong-ui-entities-plugin-form" }, N8 = {
|
|
|
29756
29745
|
}, null, 8, ["copy-tooltip", "text"])) : (k(), Q("span", Fj, "–"))
|
|
29757
29746
|
]),
|
|
29758
29747
|
partials: F((b) => {
|
|
29759
|
-
var
|
|
29748
|
+
var U, A, j, V, ue, de, q, z, P;
|
|
29760
29749
|
return [
|
|
29761
29750
|
p(s)("rowValue", b) ? e.showIdAsLink ? (k(), H(p(Ii), {
|
|
29762
29751
|
key: 1,
|
|
29763
29752
|
item: {
|
|
29764
|
-
key: (A = (
|
|
29765
|
-
value: ((V = (
|
|
29753
|
+
key: (A = (U = p(s)("rowValue", b)) == null ? void 0 : U[0]) == null ? void 0 : A.id,
|
|
29754
|
+
value: ((V = (j = p(s)("rowValue", b)) == null ? void 0 : j[0]) == null ? void 0 : V.id) + ((de = (ue = p(s)("rowValue", b)) == null ? void 0 : ue[0]) != null && de.name ? "/" + ((z = (q = p(s)("rowValue", b)) == null ? void 0 : q[0]) == null ? void 0 : z.name) : ""),
|
|
29766
29755
|
type: p(Vt).LinkInternal
|
|
29767
29756
|
},
|
|
29768
29757
|
onNavigationClick: () => {
|