@kong-ui-public/entities-plugins 9.92.5 → 9.92.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities-plugins.es.js +169 -170
- package/dist/entities-plugins.umd.js +4 -4
- package/dist/style.css +1 -1
- package/package.json +4 -4
|
@@ -841,7 +841,7 @@ const hv = {
|
|
|
841
841
|
},
|
|
842
842
|
proceed: "Yes, update"
|
|
843
843
|
},
|
|
844
|
-
phase_mask_help: "You can't add call
|
|
844
|
+
phase_mask_help: "You can't add call nodes in the response phase."
|
|
845
845
|
},
|
|
846
846
|
code_editor: {
|
|
847
847
|
mode: "Code editor"
|
|
@@ -4525,7 +4525,7 @@ const Z1 = (e, t) => {
|
|
|
4525
4525
|
}
|
|
4526
4526
|
$.fields.sort((U, B) => (U.order = U.order || 0, B.order = B.order || 0, U.order - B.order));
|
|
4527
4527
|
} else {
|
|
4528
|
-
const U = [], B = [], j = [],
|
|
4528
|
+
const U = [], B = [], j = [], ue = [], ne = {};
|
|
4529
4529
|
if (oe != null && oe.fieldRules) {
|
|
4530
4530
|
const Ee = [
|
|
4531
4531
|
...oe.fieldRules.atLeastOneOf ?? [],
|
|
@@ -4541,7 +4541,7 @@ const Z1 = (e, t) => {
|
|
|
4541
4541
|
}
|
|
4542
4542
|
for (const Ee of $.fields) {
|
|
4543
4543
|
if (e != null && e.enableRedisPartial && S._supported_redis_partial_type && H(Ee)) {
|
|
4544
|
-
|
|
4544
|
+
ue.push(Ee);
|
|
4545
4545
|
continue;
|
|
4546
4546
|
}
|
|
4547
4547
|
if (Ee.pinned) {
|
|
@@ -4554,9 +4554,9 @@ const Z1 = (e, t) => {
|
|
|
4554
4554
|
}
|
|
4555
4555
|
j.push(Ee);
|
|
4556
4556
|
}
|
|
4557
|
-
|
|
4557
|
+
ue.length && j.push({
|
|
4558
4558
|
id: "_redis",
|
|
4559
|
-
fields:
|
|
4559
|
+
fields: ue,
|
|
4560
4560
|
model: "__redis_partial",
|
|
4561
4561
|
pluginType: S._isCustomPlugin ? "custom" : "bundled",
|
|
4562
4562
|
redisType: S._supported_redis_partial_type,
|
|
@@ -7366,8 +7366,8 @@ const ME = ["data-testid"], RE = ["data-testid"], FE = ["innerHTML"], DE = ["dat
|
|
|
7366
7366
|
q(H), f.value = !0;
|
|
7367
7367
|
} else b != null && b.value && (v.value = b.value);
|
|
7368
7368
|
}), (te, H) => {
|
|
7369
|
-
const U = Ce("KBadge"), B = Ce("KRadio"), j = Ce("KSelect"),
|
|
7370
|
-
return u.value ? (E(), G(
|
|
7369
|
+
const U = Ce("KBadge"), B = Ce("KRadio"), j = Ce("KSelect"), ue = Ce("KCard");
|
|
7370
|
+
return u.value ? (E(), G(ue, {
|
|
7371
7371
|
key: 0,
|
|
7372
7372
|
class: "redis-config-card",
|
|
7373
7373
|
"data-testid": "redis-config-card",
|
|
@@ -9891,7 +9891,7 @@ const [nA, oA] = df(
|
|
|
9891
9891
|
const R = O(k);
|
|
9892
9892
|
R && (R.config = Hn(x), w && l.commit(C));
|
|
9893
9893
|
}
|
|
9894
|
-
function
|
|
9894
|
+
function ue(k, x, w, C = !0) {
|
|
9895
9895
|
const R = O(k);
|
|
9896
9896
|
if (!R) return;
|
|
9897
9897
|
const L = R.fields[x];
|
|
@@ -9983,8 +9983,8 @@ const [nA, oA] = df(
|
|
|
9983
9983
|
const Ae = O(ae.source);
|
|
9984
9984
|
if (!Ae)
|
|
9985
9985
|
continue;
|
|
9986
|
-
const Pe = (x = Pn(Ae, "output", ae.sourceField)) == null ? void 0 : x.name, me = Pe ? `${Ae.name}.${Pe}` : Ae.name,
|
|
9987
|
-
|
|
9986
|
+
const Pe = (x = Pn(Ae, "output", ae.sourceField)) == null ? void 0 : x.name, me = Pe ? `${Ae.name}.${Pe}` : Ae.name, le = (w = Pn(W, "input", ae.targetField)) == null ? void 0 : w.name;
|
|
9987
|
+
le ? Z[le] = me : M === void 0 && (M = me);
|
|
9988
9988
|
}
|
|
9989
9989
|
for (const ae of i.value.edges.filter((Ae) => Ae.source === W.id)) {
|
|
9990
9990
|
const Ae = O(ae.target);
|
|
@@ -9993,8 +9993,8 @@ const [nA, oA] = df(
|
|
|
9993
9993
|
const Pe = Ae.type;
|
|
9994
9994
|
if (!an(Pe) || !((C = wa[Pe].io) != null && C.input))
|
|
9995
9995
|
continue;
|
|
9996
|
-
const me = (R = Pn(Ae, "input", ae.targetField)) == null ? void 0 : R.name,
|
|
9997
|
-
Xe ? _e[Xe] =
|
|
9996
|
+
const me = (R = Pn(Ae, "input", ae.targetField)) == null ? void 0 : R.name, le = me ? `${Ae.name}.${me}` : Ae.name, Xe = (L = Pn(W, "output", ae.sourceField)) == null ? void 0 : L.name;
|
|
9997
|
+
Xe ? _e[Xe] = le : K === void 0 && (K = le);
|
|
9998
9998
|
}
|
|
9999
9999
|
const ve = {
|
|
10000
10000
|
...Hn(W.config),
|
|
@@ -10053,7 +10053,7 @@ const [nA, oA] = df(
|
|
|
10053
10053
|
toggleExpanded: B,
|
|
10054
10054
|
replaceConfig: j,
|
|
10055
10055
|
// field ops
|
|
10056
|
-
addField:
|
|
10056
|
+
addField: ue,
|
|
10057
10057
|
renameField: ne,
|
|
10058
10058
|
removeField: ce,
|
|
10059
10059
|
// edge ops
|
|
@@ -12447,12 +12447,12 @@ function X$() {
|
|
|
12447
12447
|
}).on("interrupt.zoom end.zoom", function() {
|
|
12448
12448
|
S(this, arguments).event(oe).end();
|
|
12449
12449
|
}).tween("zoom", function() {
|
|
12450
|
-
var te = this, H = arguments, U = S(te, H).event(oe), B = t.apply(te, H), j = q == null ? T(B) : typeof q == "function" ? q.apply(te, H) : q,
|
|
12450
|
+
var te = this, H = arguments, U = S(te, H).event(oe), B = t.apply(te, H), j = q == null ? T(B) : typeof q == "function" ? q.apply(te, H) : q, ue = Math.max(B[1][0] - B[0][0], B[1][1] - B[0][1]), ne = te.__zoom, ce = typeof z == "function" ? z.apply(te, H) : z, pe = l(ne.invert(j).concat(ue / ne.k), ce.invert(j).concat(ue / ce.k));
|
|
12451
12451
|
return function(Ee) {
|
|
12452
12452
|
if (Ee === 1)
|
|
12453
12453
|
Ee = ce;
|
|
12454
12454
|
else {
|
|
12455
|
-
var xe = pe(Ee), ie =
|
|
12455
|
+
var xe = pe(Ee), ie = ue / xe[2];
|
|
12456
12456
|
Ee = new bn(ie, j[0] - xe[0] * ie, j[1] - xe[1] * ie);
|
|
12457
12457
|
}
|
|
12458
12458
|
U.zoom(null, Ee);
|
|
@@ -12512,7 +12512,7 @@ function X$() {
|
|
|
12512
12512
|
function V($, ...z) {
|
|
12513
12513
|
if (f || !e.apply(this, arguments))
|
|
12514
12514
|
return;
|
|
12515
|
-
var q = $.currentTarget, oe = S(this, z, !0).event($), te = qt($.view).on("mousemove.zoom", j, !0).on("mouseup.zoom",
|
|
12515
|
+
var q = $.currentTarget, oe = S(this, z, !0).event($), te = qt($.view).on("mousemove.zoom", j, !0).on("mouseup.zoom", ue, !0), H = Qt($, q), U = $.clientX, B = $.clientY;
|
|
12516
12516
|
km($.view), es($), oe.mouse = [H, this.__zoom.invert(H)], xr(this), oe.start();
|
|
12517
12517
|
function j(ne) {
|
|
12518
12518
|
if (ci(ne), !oe.moved) {
|
|
@@ -12521,7 +12521,7 @@ function X$() {
|
|
|
12521
12521
|
}
|
|
12522
12522
|
oe.event(ne).zoom("mouse", n(_(oe.that.__zoom, oe.mouse[0] = Qt(ne, q), oe.mouse[1]), oe.extent, a));
|
|
12523
12523
|
}
|
|
12524
|
-
function
|
|
12524
|
+
function ue(ne) {
|
|
12525
12525
|
te.on("mousemove.zoom mouseup.zoom", null), Cm(ne.view, oe.moved), ci(ne), oe.event(ne).end();
|
|
12526
12526
|
}
|
|
12527
12527
|
}
|
|
@@ -12547,8 +12547,8 @@ function X$() {
|
|
|
12547
12547
|
for (ci($), H = 0; H < te; ++H)
|
|
12548
12548
|
U = oe[H], B = Qt(U, this), q.touch0 && q.touch0[2] === U.identifier ? q.touch0[0] = B : q.touch1 && q.touch1[2] === U.identifier && (q.touch1[0] = B);
|
|
12549
12549
|
if (U = q.that.__zoom, q.touch1) {
|
|
12550
|
-
var
|
|
12551
|
-
U = b(U, Math.sqrt(Ee / xe)), B = [(
|
|
12550
|
+
var ue = q.touch0[0], ne = q.touch0[1], ce = q.touch1[0], pe = q.touch1[1], Ee = (Ee = ce[0] - ue[0]) * Ee + (Ee = ce[1] - ue[1]) * Ee, xe = (xe = pe[0] - ne[0]) * xe + (xe = pe[1] - ne[1]) * xe;
|
|
12551
|
+
U = b(U, Math.sqrt(Ee / xe)), B = [(ue[0] + ce[0]) / 2, (ue[1] + ce[1]) / 2], j = [(ne[0] + pe[0]) / 2, (ne[1] + pe[1]) / 2];
|
|
12552
12552
|
} else if (q.touch0)
|
|
12553
12553
|
B = q.touch0[0], j = q.touch0[1];
|
|
12554
12554
|
else
|
|
@@ -13564,7 +13564,7 @@ function og(e) {
|
|
|
13564
13564
|
updateNodePositions: _,
|
|
13565
13565
|
emits: T
|
|
13566
13566
|
} = Ze(), { onStart: A, onDrag: S, onStop: O, onClick: P, el: V, disabled: J, id: X, selectable: I, dragHandle: ee } = e, $ = no(!1);
|
|
13567
|
-
let z = [], q, oe = null, te = { x: void 0, y: void 0 }, H = { x: 0, y: 0 }, U = null, B = !1, j = 0,
|
|
13567
|
+
let z = [], q, oe = null, te = { x: void 0, y: void 0 }, H = { x: 0, y: 0 }, U = null, B = !1, j = 0, ue = !1;
|
|
13568
13568
|
const ne = PN(), ce = ({ x: fe, y: be }) => {
|
|
13569
13569
|
te = { x: fe, y: be };
|
|
13570
13570
|
let ye = !1;
|
|
@@ -13623,7 +13623,7 @@ function og(e) {
|
|
|
13623
13623
|
fe.sourceEvent.type === "touchmove" && fe.sourceEvent.touches.length > 1 || (s.value === 0 && Ee(fe, be), te = ne(fe.sourceEvent), oe = ((ye = t.value) == null ? void 0 : ye.getBoundingClientRect()) || null, H = sn(fe.sourceEvent, oe));
|
|
13624
13624
|
}, ie = (fe, be) => {
|
|
13625
13625
|
const ye = ne(fe.sourceEvent);
|
|
13626
|
-
if (!
|
|
13626
|
+
if (!ue && B && u.value && (ue = !0, pe()), !B) {
|
|
13627
13627
|
const k = ye.xSnapped - (te.x ?? 0), x = ye.ySnapped - (te.y ?? 0);
|
|
13628
13628
|
Math.sqrt(k * k + x * x) > s.value && Ee(fe, be);
|
|
13629
13629
|
}
|
|
@@ -13643,7 +13643,7 @@ function og(e) {
|
|
|
13643
13643
|
});
|
|
13644
13644
|
O({ event: fe.sourceEvent, node: ye, nodes: k });
|
|
13645
13645
|
}
|
|
13646
|
-
z = [], $.value = !1,
|
|
13646
|
+
z = [], $.value = !1, ue = !1, B = !1, te = { x: void 0, y: void 0 }, cancelAnimationFrame(j);
|
|
13647
13647
|
};
|
|
13648
13648
|
return Ne([() => Oe(J), V], ([fe, be], ye, k) => {
|
|
13649
13649
|
if (be) {
|
|
@@ -13808,9 +13808,9 @@ function ig({
|
|
|
13808
13808
|
}, j = function(Z) {
|
|
13809
13809
|
(ce || ee) && X && I && (r ? r(Z, X) : A.connect(X)), A.connectEnd(Z), i && (a == null || a(Z)), os(ye), cancelAnimationFrame(pe), T(Z), x = !1, I = !1, X = null, ee = null, U.removeEventListener("mousemove", B), U.removeEventListener("mouseup", j), U.removeEventListener("touchmove", B), U.removeEventListener("touchend", j);
|
|
13810
13810
|
};
|
|
13811
|
-
const
|
|
13811
|
+
const ue = g(Oe(t));
|
|
13812
13812
|
let ne = Oe(o) || V.value || pr;
|
|
13813
|
-
!ne &&
|
|
13813
|
+
!ne && ue && (ne = (te ? ue.isValidSourcePos : ue.isValidTargetPos) || pr);
|
|
13814
13814
|
let ce, pe = 0;
|
|
13815
13815
|
const { x: Ee, y: xe } = sn(q), ie = U == null ? void 0 : U.elementFromPoint(Ee, xe), se = Qm(Oe(i), ie), fe = (oe = l.value) == null ? void 0 : oe.getBoundingClientRect();
|
|
13816
13816
|
if (!fe || !se)
|
|
@@ -13881,7 +13881,7 @@ function ig({
|
|
|
13881
13881
|
const B = g(Oe(t));
|
|
13882
13882
|
if (!U && B && (U = (H ? B.isValidSourcePos : B.isValidTargetPos) || pr), B && (typeof B.connectable > "u" ? m.value : B.connectable) === !1)
|
|
13883
13883
|
return;
|
|
13884
|
-
const j = ed(q.target),
|
|
13884
|
+
const j = ed(q.target), ue = cd(
|
|
13885
13885
|
q,
|
|
13886
13886
|
{
|
|
13887
13887
|
handle: {
|
|
@@ -13904,8 +13904,8 @@ function ig({
|
|
|
13904
13904
|
O.value,
|
|
13905
13905
|
P.value,
|
|
13906
13906
|
g
|
|
13907
|
-
), ne = ((oe =
|
|
13908
|
-
|
|
13907
|
+
), ne = ((oe = ue.connection) == null ? void 0 : oe.source) === ((te = ue.connection) == null ? void 0 : te.target);
|
|
13908
|
+
ue.isValid && ue.connection && !ne && A.connect(ue.connection), A.clickConnectEnd(q), T(q, !0);
|
|
13909
13909
|
}
|
|
13910
13910
|
return {
|
|
13911
13911
|
handlePointerDown: $,
|
|
@@ -14728,7 +14728,7 @@ function zN(e, t, n) {
|
|
|
14728
14728
|
return;
|
|
14729
14729
|
const R = typeof x == "function" ? x(C) : x;
|
|
14730
14730
|
C.data = w.replace ? R : { ...C.data, ...R };
|
|
14731
|
-
},
|
|
14731
|
+
}, ue = (k, x, w = !1) => {
|
|
14732
14732
|
w ? e.connectionClickStartHandle = k : e.connectionStartHandle = k, e.connectionEndHandle = null, e.connectionStatus = null, x && (e.connectionPosition = x);
|
|
14733
14733
|
}, ne = (k, x = null, w = null) => {
|
|
14734
14734
|
e.connectionStartHandle && (e.connectionPosition = k, e.connectionEndHandle = x, e.connectionStatus = w);
|
|
@@ -14815,7 +14815,7 @@ function zN(e, t, n) {
|
|
|
14815
14815
|
removeSelectedElements: _,
|
|
14816
14816
|
removeSelectedNodes: y,
|
|
14817
14817
|
removeSelectedEdges: b,
|
|
14818
|
-
startConnection:
|
|
14818
|
+
startConnection: ue,
|
|
14819
14819
|
updateConnection: ne,
|
|
14820
14820
|
endConnection: ce,
|
|
14821
14821
|
setInteractive: V,
|
|
@@ -15991,7 +15991,7 @@ const AO = {
|
|
|
15991
15991
|
}
|
|
15992
15992
|
s.value = se, r.value = !0, u.value = !1;
|
|
15993
15993
|
}
|
|
15994
|
-
function
|
|
15994
|
+
function ue(ne) {
|
|
15995
15995
|
var ce;
|
|
15996
15996
|
ne.button !== 0 || !$ || ((ce = ne.target) == null || ce.releasePointerCapture(ne.pointerId), !r.value && s.value && ne.target === O.value && te(ne), r.value = !1, s.value = null, u.value = P.value.size > 0, i.selectionEnd(ne), e.selectionKeyPressed && (ee = !1), $ = !1);
|
|
15997
15997
|
}
|
|
@@ -16005,7 +16005,7 @@ const AO = {
|
|
|
16005
16005
|
onPointerenter: ce[3] || (ce[3] = (pe) => X.value ? void 0 : p(i).paneMouseEnter(pe)),
|
|
16006
16006
|
onPointerdown: ce[4] || (ce[4] = (pe) => X.value ? B(pe) : p(i).paneMouseMove(pe)),
|
|
16007
16007
|
onPointermove: ce[5] || (ce[5] = (pe) => X.value ? j(pe) : p(i).paneMouseMove(pe)),
|
|
16008
|
-
onPointerup: ce[6] || (ce[6] = (pe) => X.value ?
|
|
16008
|
+
onPointerup: ce[6] || (ce[6] = (pe) => X.value ? ue(pe) : void 0),
|
|
16009
16009
|
onPointerleave: ce[7] || (ce[7] = (pe) => p(i).paneMouseLeave(pe))
|
|
16010
16010
|
}, [
|
|
16011
16011
|
Fe(ne.$slots, "default"),
|
|
@@ -16074,7 +16074,7 @@ const AO = {
|
|
|
16074
16074
|
};
|
|
16075
16075
|
const te = Ii(s), H = Ii(a), U = Ii(r), B = Ke(
|
|
16076
16076
|
() => (!H.value || H.value && a.value === !0) && (te.value || d.value)
|
|
16077
|
-
), j = Ke(() => te.value || l.value),
|
|
16077
|
+
), j = Ke(() => te.value || l.value), ue = Ke(() => H.value || a.value === !0 && B.value !== !0);
|
|
16078
16078
|
Tt(() => {
|
|
16079
16079
|
if (!J.value) {
|
|
16080
16080
|
Ta("Viewport element is missing");
|
|
@@ -16192,7 +16192,7 @@ const AO = {
|
|
|
16192
16192
|
class: "vue-flow__viewport vue-flow__container"
|
|
16193
16193
|
}, [
|
|
16194
16194
|
N(IO, {
|
|
16195
|
-
"is-selecting":
|
|
16195
|
+
"is-selecting": ue.value,
|
|
16196
16196
|
"selection-key-pressed": p(H),
|
|
16197
16197
|
class: Ve({
|
|
16198
16198
|
connecting: !!p(_),
|
|
@@ -16317,7 +16317,7 @@ const bd = iu, jO = he({
|
|
|
16317
16317
|
type: I,
|
|
16318
16318
|
isValidConnection: f,
|
|
16319
16319
|
edgeUpdaterType: I,
|
|
16320
|
-
onEdgeUpdate:
|
|
16320
|
+
onEdgeUpdate: ue,
|
|
16321
16321
|
onEdgeUpdateEnd: ne
|
|
16322
16322
|
});
|
|
16323
16323
|
return () => {
|
|
@@ -16448,7 +16448,7 @@ const bd = iu, jO = he({
|
|
|
16448
16448
|
function j() {
|
|
16449
16449
|
P.value = !1;
|
|
16450
16450
|
}
|
|
16451
|
-
function
|
|
16451
|
+
function ue(x, w) {
|
|
16452
16452
|
T.update({ event: x, edge: _.value, connection: w });
|
|
16453
16453
|
}
|
|
16454
16454
|
function ne(x) {
|
|
@@ -16748,7 +16748,7 @@ const bd = iu, jO = he({
|
|
|
16748
16748
|
L && L.includes(w) && (R = Ce(w, !1));
|
|
16749
16749
|
}
|
|
16750
16750
|
return R && typeof R != "string" ? R : (a.error(new vt(mt.NODE_TYPE_MISSING, R)), !1);
|
|
16751
|
-
}),
|
|
16751
|
+
}), ue = og({
|
|
16752
16752
|
id: e.id,
|
|
16753
16753
|
el: P,
|
|
16754
16754
|
disabled: () => !q.value,
|
|
@@ -16836,7 +16836,7 @@ const bd = iu, jO = he({
|
|
|
16836
16836
|
`vue-flow__node-${j.value === !1 ? "default" : I.type || "default"}`,
|
|
16837
16837
|
{
|
|
16838
16838
|
[n.value]: q.value,
|
|
16839
|
-
dragging:
|
|
16839
|
+
dragging: ue == null ? void 0 : ue.value,
|
|
16840
16840
|
draggable: q.value,
|
|
16841
16841
|
selected: I.selected,
|
|
16842
16842
|
selectable: oe.value,
|
|
@@ -16873,7 +16873,7 @@ const bd = iu, jO = he({
|
|
|
16873
16873
|
events: { ...I.events, ...z },
|
|
16874
16874
|
selected: I.selected,
|
|
16875
16875
|
resizing: I.resizing,
|
|
16876
|
-
dragging:
|
|
16876
|
+
dragging: ue.value,
|
|
16877
16877
|
connectable: te.value,
|
|
16878
16878
|
position: I.computedPosition,
|
|
16879
16879
|
dimensions: I.dimensions,
|
|
@@ -16904,13 +16904,13 @@ const bd = iu, jO = he({
|
|
|
16904
16904
|
P.value && u([{ id: e.id, nodeElement: P.value, forceUpdate: !0 }]);
|
|
16905
16905
|
}
|
|
16906
16906
|
function ie(w) {
|
|
16907
|
-
|
|
16907
|
+
ue != null && ue.value || $.mouseEnter({ event: w, node: I });
|
|
16908
16908
|
}
|
|
16909
16909
|
function se(w) {
|
|
16910
|
-
|
|
16910
|
+
ue != null && ue.value || $.mouseMove({ event: w, node: I });
|
|
16911
16911
|
}
|
|
16912
16912
|
function fe(w) {
|
|
16913
|
-
|
|
16913
|
+
ue != null && ue.value || $.mouseLeave({ event: w, node: I });
|
|
16914
16914
|
}
|
|
16915
16915
|
function be(w) {
|
|
16916
16916
|
return $.contextMenu({ event: w, node: I });
|
|
@@ -19683,7 +19683,7 @@ const [sD, lD] = df(
|
|
|
19683
19683
|
getNodeById: U,
|
|
19684
19684
|
connectEdge: B,
|
|
19685
19685
|
disconnectEdge: j,
|
|
19686
|
-
getInEdgesByNodeId:
|
|
19686
|
+
getInEdgesByNodeId: ue,
|
|
19687
19687
|
commit: ne,
|
|
19688
19688
|
reset: ce
|
|
19689
19689
|
} = f;
|
|
@@ -19732,7 +19732,7 @@ const [sD, lD] = df(
|
|
|
19732
19732
|
const W = Vd(C), M = Vd(L);
|
|
19733
19733
|
if ((W == null ? void 0 : W.io) === "input" || (M == null ? void 0 : M.io) === "output" || C === "output" && L === "output")
|
|
19734
19734
|
return;
|
|
19735
|
-
const Z =
|
|
19735
|
+
const Z = ue(R);
|
|
19736
19736
|
let K = !1, _e = !1;
|
|
19737
19737
|
const ve = [], Te = [], Se = (M == null ? void 0 : M.io) === "input" ? Z.filter((Pe) => !Pe.targetField) : Z.filter((Pe) => !!Pe.targetField);
|
|
19738
19738
|
Se.length > 0 && (K = !0, Se.forEach((Pe) => {
|
|
@@ -19806,53 +19806,53 @@ const [sD, lD] = df(
|
|
|
19806
19806
|
});
|
|
19807
19807
|
function fe(w = !0) {
|
|
19808
19808
|
let C, R;
|
|
19809
|
-
const L = [], W = (
|
|
19810
|
-
switch (
|
|
19809
|
+
const L = [], W = (le) => {
|
|
19810
|
+
switch (le.data.name) {
|
|
19811
19811
|
case "request": {
|
|
19812
19812
|
if (t !== "request")
|
|
19813
19813
|
throw new Error(`Unexpected request node in ${t} phase`);
|
|
19814
19814
|
if (C)
|
|
19815
19815
|
throw new Error("Duplicated request node in request phase");
|
|
19816
|
-
return C =
|
|
19816
|
+
return C = le, !0;
|
|
19817
19817
|
}
|
|
19818
19818
|
case "service_request": {
|
|
19819
19819
|
if (t !== "request")
|
|
19820
19820
|
throw new Error(`Unexpected service_request node in ${t} phase`);
|
|
19821
19821
|
if (R)
|
|
19822
19822
|
throw new Error("Duplicated service_request node in request phase");
|
|
19823
|
-
return R =
|
|
19823
|
+
return R = le, !0;
|
|
19824
19824
|
}
|
|
19825
19825
|
case "service_response": {
|
|
19826
19826
|
if (t !== "response")
|
|
19827
19827
|
throw new Error(`Unexpected service_response node in ${t} phase`);
|
|
19828
19828
|
if (R)
|
|
19829
19829
|
throw new Error("Duplicated service_response node in response phase");
|
|
19830
|
-
return R =
|
|
19830
|
+
return R = le, !0;
|
|
19831
19831
|
}
|
|
19832
19832
|
case "response": {
|
|
19833
19833
|
if (t !== "response")
|
|
19834
19834
|
throw new Error(`Unexpected response node in ${t} phase`);
|
|
19835
19835
|
if (C)
|
|
19836
19836
|
throw new Error("Duplicated response node in response phase");
|
|
19837
|
-
return C =
|
|
19837
|
+
return C = le, !0;
|
|
19838
19838
|
}
|
|
19839
19839
|
default:
|
|
19840
|
-
return L.push(
|
|
19840
|
+
return L.push(le), !1;
|
|
19841
19841
|
}
|
|
19842
19842
|
};
|
|
19843
19843
|
let M;
|
|
19844
|
-
for (const
|
|
19845
|
-
if (!W(
|
|
19844
|
+
for (const le of Ee.value)
|
|
19845
|
+
if (!W(le) && L.length > 0) {
|
|
19846
19846
|
M || (M = new jd.graphlib.Graph({ multigraph: !0 }), M.setGraph({
|
|
19847
19847
|
rankdir: t === "request" ? "LR" : "RL",
|
|
19848
19848
|
nodesep: l,
|
|
19849
19849
|
edgesep: u,
|
|
19850
19850
|
ranksep: c
|
|
19851
19851
|
}));
|
|
19852
|
-
const Xe = g(
|
|
19852
|
+
const Xe = g(le.id);
|
|
19853
19853
|
if (!Xe)
|
|
19854
|
-
throw new Error(`Node ${
|
|
19855
|
-
M.setNode(
|
|
19854
|
+
throw new Error(`Node ${le.id} is missing from the graph in ${t} phase`);
|
|
19855
|
+
M.setNode(le.id, {
|
|
19856
19856
|
width: Xe.dimensions.width,
|
|
19857
19857
|
height: Xe.dimensions.height
|
|
19858
19858
|
});
|
|
@@ -19865,23 +19865,23 @@ const [sD, lD] = df(
|
|
|
19865
19865
|
if (L.length > 0) {
|
|
19866
19866
|
if (!M)
|
|
19867
19867
|
throw new Error("dagreGraph should be defined here if reachable");
|
|
19868
|
-
const
|
|
19868
|
+
const le = /* @__PURE__ */ new Set([C.id, R.id]);
|
|
19869
19869
|
for (const Xe of xe.value)
|
|
19870
|
-
!
|
|
19870
|
+
!le.has(Xe.source) && !le.has(Xe.target) && M.setEdge(Xe.source, Xe.target, { points: [] });
|
|
19871
19871
|
jd.layout(M);
|
|
19872
19872
|
}
|
|
19873
|
-
const [_e, ve] = rD(), Te = (
|
|
19874
|
-
x:
|
|
19875
|
-
y:
|
|
19876
|
-
width:
|
|
19877
|
-
height:
|
|
19873
|
+
const [_e, ve] = rD(), Te = (le) => ({
|
|
19874
|
+
x: le.x - le.width / 2,
|
|
19875
|
+
y: le.y - le.height / 2,
|
|
19876
|
+
width: le.width,
|
|
19877
|
+
height: le.height
|
|
19878
19878
|
});
|
|
19879
19879
|
if (L.length > 0) {
|
|
19880
19880
|
if (!M)
|
|
19881
19881
|
throw new Error("dagreGraph should be defined here if reachable");
|
|
19882
|
-
for (const
|
|
19883
|
-
const Xe = M.node(
|
|
19884
|
-
_e(gn), oe(
|
|
19882
|
+
for (const le of L) {
|
|
19883
|
+
const Xe = M.node(le.id), gn = Te(Xe);
|
|
19884
|
+
_e(gn), oe(le.data.id, { x: gn.x, y: gn.y }, !1);
|
|
19885
19885
|
}
|
|
19886
19886
|
}
|
|
19887
19887
|
const Se = ve(), ae = Se.x2 - Se.x1, Ae = Se.y2 - Se.y1, Pe = Math.max(
|
|
@@ -20482,9 +20482,9 @@ const DD = /* @__PURE__ */ Re(MD, [["render", FD]]), LD = {
|
|
|
20482
20482
|
U.preventDefault();
|
|
20483
20483
|
const j = JSON.parse(B);
|
|
20484
20484
|
if (j.action !== "create-node") return;
|
|
20485
|
-
const { top:
|
|
20485
|
+
const { top: ue = 0, left: ne = 0 } = ((fe = O.value) == null ? void 0 : fe.getBoundingClientRect()) || {}, ce = S({
|
|
20486
20486
|
x: U.clientX - ne,
|
|
20487
|
-
y: U.clientY -
|
|
20487
|
+
y: U.clientY - ue
|
|
20488
20488
|
}), { type: pe, anchor: Ee } = j.data, xe = {
|
|
20489
20489
|
type: pe,
|
|
20490
20490
|
phase: e.phase,
|
|
@@ -20509,8 +20509,7 @@ const DD = /* @__PURE__ */ Re(MD, [["render", FD]]), LD = {
|
|
|
20509
20509
|
var ne;
|
|
20510
20510
|
const j = (ne = B.dataTransfer) == null ? void 0 : ne.types.find((ce) => ce.startsWith(`${Si}/`));
|
|
20511
20511
|
if (!j) return;
|
|
20512
|
-
|
|
20513
|
-
(le === "call" || le === "exit") && (ee.value = !0);
|
|
20512
|
+
j.replace(`${Si}/`, "") === "call" && (ee.value = !0);
|
|
20514
20513
|
});
|
|
20515
20514
|
const { start: U } = pv(() => {
|
|
20516
20515
|
ee.value = !1;
|
|
@@ -20602,7 +20601,7 @@ const DD = /* @__PURE__ */ Re(MD, [["render", FD]]), LD = {
|
|
|
20602
20601
|
ee.value ? (E(), Q("div", LD, ge(p(a)("plugins.free-form.datakit.flow_editor.phase_mask_help")), 1)) : ke("", !0)
|
|
20603
20602
|
], 512));
|
|
20604
20603
|
}
|
|
20605
|
-
}), qd = /* @__PURE__ */ Re(KD, [["__scopeId", "data-v-
|
|
20604
|
+
}), qd = /* @__PURE__ */ Re(KD, [["__scopeId", "data-v-791d73d4"]]), BD = /* @__PURE__ */ he({
|
|
20606
20605
|
__name: "FlowPanels",
|
|
20607
20606
|
props: {
|
|
20608
20607
|
readonly: { type: Boolean },
|
|
@@ -20610,8 +20609,8 @@ const DD = /* @__PURE__ */ Re(MD, [["render", FD]]), LD = {
|
|
|
20610
20609
|
},
|
|
20611
20610
|
setup(e, { expose: t }) {
|
|
20612
20611
|
const n = re([!1, !1]), { state: o, markAsLayoutCompleted: i, commit: r, clear: a } = Rt(), s = tf(), l = `${s}-request`, u = `${s}-response`, c = Ze(l), d = Ze(u);
|
|
20613
|
-
function f(j,
|
|
20614
|
-
const { onPaneClick: ne, onNodesChange: ce, onEdgesChange: pe, getSelectedNodes: Ee, getSelectedEdges: xe } = j, { removeSelectedElements: ie } =
|
|
20612
|
+
function f(j, ue) {
|
|
20613
|
+
const { onPaneClick: ne, onNodesChange: ce, onEdgesChange: pe, getSelectedNodes: Ee, getSelectedEdges: xe } = j, { removeSelectedElements: ie } = ue;
|
|
20615
20614
|
function se(fe) {
|
|
20616
20615
|
if (!fe) {
|
|
20617
20616
|
ie();
|
|
@@ -20631,11 +20630,11 @@ const DD = /* @__PURE__ */ Re(MD, [["render", FD]]), LD = {
|
|
|
20631
20630
|
), { isDragging: H } = mv(y, {
|
|
20632
20631
|
onMove(j) {
|
|
20633
20632
|
if (!e.resizable) return;
|
|
20634
|
-
const
|
|
20633
|
+
const ue = Math.max(0, j.y - O.top.value), ne = Math.min(
|
|
20635
20634
|
1,
|
|
20636
20635
|
Math.max(
|
|
20637
20636
|
0,
|
|
20638
|
-
|
|
20637
|
+
ue / te.value
|
|
20639
20638
|
)
|
|
20640
20639
|
);
|
|
20641
20640
|
$.value = `${ne * 100}%`, z.value = `${(1 - ne) * 100}%`;
|
|
@@ -20645,14 +20644,14 @@ const DD = /* @__PURE__ */ Re(MD, [["render", FD]]), LD = {
|
|
|
20645
20644
|
}
|
|
20646
20645
|
}), U = () => {
|
|
20647
20646
|
rt(() => {
|
|
20648
|
-
var j,
|
|
20649
|
-
(j = g.value) == null || j.fitView(), (
|
|
20647
|
+
var j, ue;
|
|
20648
|
+
(j = g.value) == null || j.fitView(), (ue = T.value) == null || ue.fitView();
|
|
20650
20649
|
});
|
|
20651
|
-
}, B = Ne(n, ([j,
|
|
20650
|
+
}, B = Ne(n, ([j, ue]) => {
|
|
20652
20651
|
var ne, ce;
|
|
20653
|
-
j &&
|
|
20652
|
+
j && ue && (o.value.needLayout && ((ne = g.value) == null || ne.autoLayout(!1), (ce = T.value) == null || ce.autoLayout(!1), i(), r(), a()), U(), B.stop());
|
|
20654
20653
|
}, { deep: !0 });
|
|
20655
|
-
return t({ fitView: U }), (j,
|
|
20654
|
+
return t({ fitView: U }), (j, ue) => (E(), Q("div", {
|
|
20656
20655
|
ref_key: "flowPanels",
|
|
20657
20656
|
ref: m,
|
|
20658
20657
|
class: "flow-panels"
|
|
@@ -20667,7 +20666,7 @@ const DD = /* @__PURE__ */ Re(MD, [["render", FD]]), LD = {
|
|
|
20667
20666
|
key: 0,
|
|
20668
20667
|
class: Ve(["icon", { collapsed: I.value }])
|
|
20669
20668
|
}, null, 8, ["class"])) : ke("", !0),
|
|
20670
|
-
|
|
20669
|
+
ue[2] || (ue[2] = Y("div", { class: "label-content" }, " Request ", -1))
|
|
20671
20670
|
], 2),
|
|
20672
20671
|
Y("div", {
|
|
20673
20672
|
ref_key: "requestCanvasContainer",
|
|
@@ -20681,7 +20680,7 @@ const DD = /* @__PURE__ */ Re(MD, [["render", FD]]), LD = {
|
|
|
20681
20680
|
"flow-id": l,
|
|
20682
20681
|
phase: "request",
|
|
20683
20682
|
readonly: j.readonly,
|
|
20684
|
-
onInitialized:
|
|
20683
|
+
onInitialized: ue[0] || (ue[0] = (ne) => n.value[0] = !0)
|
|
20685
20684
|
}, null, 8, ["readonly"])
|
|
20686
20685
|
], 6),
|
|
20687
20686
|
Y("div", {
|
|
@@ -20699,7 +20698,7 @@ const DD = /* @__PURE__ */ Re(MD, [["render", FD]]), LD = {
|
|
|
20699
20698
|
key: 0,
|
|
20700
20699
|
class: Ve(["icon", { collapsed: ee.value }])
|
|
20701
20700
|
}, null, 8, ["class"])) : ke("", !0),
|
|
20702
|
-
|
|
20701
|
+
ue[3] || (ue[3] = Y("div", { class: "label-content" }, " Response ", -1))
|
|
20703
20702
|
], 2),
|
|
20704
20703
|
Y("div", {
|
|
20705
20704
|
ref_key: "responseCanvasContainer",
|
|
@@ -20713,7 +20712,7 @@ const DD = /* @__PURE__ */ Re(MD, [["render", FD]]), LD = {
|
|
|
20713
20712
|
"flow-id": u,
|
|
20714
20713
|
phase: "response",
|
|
20715
20714
|
readonly: j.readonly,
|
|
20716
|
-
onInitialized:
|
|
20715
|
+
onInitialized: ue[1] || (ue[1] = (ne) => n.value[1] = !0)
|
|
20717
20716
|
}, null, 8, ["readonly"])
|
|
20718
20717
|
], 6)
|
|
20719
20718
|
], 512));
|
|
@@ -21694,7 +21693,7 @@ function ho(e, t) {
|
|
|
21694
21693
|
}), b = D(() => {
|
|
21695
21694
|
const U = n.value.edges.filter((B) => B.target === e).reduce((B, j) => {
|
|
21696
21695
|
var Ee, xe;
|
|
21697
|
-
const
|
|
21696
|
+
const ue = i(j.source), ne = (Ee = Pn(ue, "output", j.sourceField)) == null ? void 0 : Ee.id, ce = (xe = Pn(y.value, "input", j.targetField)) == null ? void 0 : xe.name, pe = ue.id + (ne ? `.${ne}` : "");
|
|
21698
21697
|
return ce ? B.inputs = { ...B.inputs, [ce]: pe } : B.input = pe, B;
|
|
21699
21698
|
}, {});
|
|
21700
21699
|
return y.value.fields.input.forEach((B) => {
|
|
@@ -21735,19 +21734,19 @@ function ho(e, t) {
|
|
|
21735
21734
|
return;
|
|
21736
21735
|
}
|
|
21737
21736
|
const {
|
|
21738
|
-
nodeId:
|
|
21737
|
+
nodeId: ue,
|
|
21739
21738
|
fieldId: ne
|
|
21740
21739
|
} = Ic(U), ce = A("input", H).id, pe = [];
|
|
21741
21740
|
V.value && (pe.push(Ti(V.value, i)), u(V.value.id, !1));
|
|
21742
21741
|
const Ee = J.value.find((se) => se.targetField === j);
|
|
21743
21742
|
Ee && (pe.push(Ti(Ee, i)), u(Ee.id, !1)), c({
|
|
21744
|
-
source:
|
|
21743
|
+
source: ue,
|
|
21745
21744
|
sourceField: ne,
|
|
21746
21745
|
target: e,
|
|
21747
21746
|
targetField: ce
|
|
21748
21747
|
}, !1);
|
|
21749
21748
|
const xe = sl(
|
|
21750
|
-
|
|
21749
|
+
ue,
|
|
21751
21750
|
ne,
|
|
21752
21751
|
e,
|
|
21753
21752
|
ce,
|
|
@@ -21767,17 +21766,17 @@ function ho(e, t) {
|
|
|
21767
21766
|
const B = [];
|
|
21768
21767
|
for (const ce of J.value.concat(V.value ? [V.value] : []))
|
|
21769
21768
|
B.push(Ti(ce, i)), u(ce.id, !1);
|
|
21770
|
-
const { nodeId: j, fieldId:
|
|
21769
|
+
const { nodeId: j, fieldId: ue } = Ic(H);
|
|
21771
21770
|
c({
|
|
21772
21771
|
source: j,
|
|
21773
|
-
sourceField:
|
|
21772
|
+
sourceField: ue,
|
|
21774
21773
|
target: e,
|
|
21775
21774
|
targetField: void 0
|
|
21776
21775
|
// input does not have a field
|
|
21777
21776
|
}, !1);
|
|
21778
21777
|
const ne = sl(
|
|
21779
21778
|
j,
|
|
21780
|
-
|
|
21779
|
+
ue,
|
|
21781
21780
|
e,
|
|
21782
21781
|
void 0,
|
|
21783
21782
|
i
|
|
@@ -21814,8 +21813,8 @@ function ho(e, t) {
|
|
|
21814
21813
|
function te(H, U, B) {
|
|
21815
21814
|
const j = i(e);
|
|
21816
21815
|
if (!j) throw new Error("Node not found when validating field name");
|
|
21817
|
-
const
|
|
21818
|
-
return oe(H, B,
|
|
21816
|
+
const ue = Vo(j, H, U);
|
|
21817
|
+
return oe(H, B, ue == null ? void 0 : ue.id);
|
|
21819
21818
|
}
|
|
21820
21819
|
return {
|
|
21821
21820
|
// states
|
|
@@ -23667,7 +23666,7 @@ const Hd = cu.options, TK = we.string().min(1).refine((e) => !e.includes("."), "
|
|
|
23667
23666
|
W !== void 0 && L === "" && L !== W ? ye[ve] = Z === "object" ? {} : null : R.type === "checklist" && L === "" ? ye[ve] = [] : L !== "" && (ye[ve] = L), ye[ve] = _e ? _e(L) : ye[ve], f(ve, ye);
|
|
23668
23667
|
});
|
|
23669
23668
|
const k = u(ye);
|
|
23670
|
-
return P.value && Object.assign(k,
|
|
23669
|
+
return P.value && Object.assign(k, ue.value), k;
|
|
23671
23670
|
}, H = (ie, se = {}) => {
|
|
23672
23671
|
c(I, se, ie, r.editing), i("model-updated", {
|
|
23673
23672
|
model: I,
|
|
@@ -23715,8 +23714,8 @@ const Hd = cu.options, TK = we.string().min(1).refine((e) => !e.includes("."), "
|
|
|
23715
23714
|
originalModel: X,
|
|
23716
23715
|
data: te()
|
|
23717
23716
|
});
|
|
23718
|
-
},
|
|
23719
|
-
|
|
23717
|
+
}, ue = no(r.record), ne = (ie) => {
|
|
23718
|
+
ue.value = ie, i("model-updated", {
|
|
23720
23719
|
// config change should also update the form model
|
|
23721
23720
|
// otherwise the submit button will be disabled
|
|
23722
23721
|
model: { ...I, ...ie },
|
|
@@ -24025,8 +24024,8 @@ const Hd = cu.options, TK = we.string().min(1).refine((e) => !e.includes("."), "
|
|
|
24025
24024
|
}), ee = () => {
|
|
24026
24025
|
m.value = !m.value;
|
|
24027
24026
|
}, $ = D(() => {
|
|
24028
|
-
var Te, Se, ae, Ae, Pe, me,
|
|
24029
|
-
const M = o.config.entityType === "consumers" && o.config.entityId || ((Se = (Te = _.value) == null ? void 0 : Te.consumer) == null ? void 0 : Se.id), Z = o.config.entityType === "consumer_groups" && o.config.entityId || ((Ae = (ae = _.value) == null ? void 0 : ae.consumer_group) == null ? void 0 : Ae.id), K = o.config.entityType === "services" && o.config.entityId || ((me = (Pe = _.value) == null ? void 0 : Pe.service) == null ? void 0 : me.id), _e = o.config.entityType === "routes" && o.config.entityId || ((Xe = (
|
|
24027
|
+
var Te, Se, ae, Ae, Pe, me, le, Xe;
|
|
24028
|
+
const M = o.config.entityType === "consumers" && o.config.entityId || ((Se = (Te = _.value) == null ? void 0 : Te.consumer) == null ? void 0 : Se.id), Z = o.config.entityType === "consumer_groups" && o.config.entityId || ((Ae = (ae = _.value) == null ? void 0 : ae.consumer_group) == null ? void 0 : Ae.id), K = o.config.entityType === "services" && o.config.entityId || ((me = (Pe = _.value) == null ? void 0 : Pe.service) == null ? void 0 : me.id), _e = o.config.entityType === "routes" && o.config.entityId || ((Xe = (le = _.value) == null ? void 0 : le.route) == null ? void 0 : Xe.id);
|
|
24030
24029
|
if (!(M || Z || K || _e))
|
|
24031
24030
|
return {
|
|
24032
24031
|
global: {
|
|
@@ -24137,49 +24136,49 @@ const Hd = cu.options, TK = we.string().min(1).refine((e) => !e.includes("."), "
|
|
|
24137
24136
|
let ve = Z && Z.fields || [];
|
|
24138
24137
|
const Te = a[o.pluginType], Se = (Ae = (ae = Co[o.pluginType]) == null ? void 0 : ae.schema) == null ? void 0 : Ae.fields;
|
|
24139
24138
|
return Array.isArray(ve) && (ve = ve.reduce((Pe, me) => {
|
|
24140
|
-
const
|
|
24141
|
-
return
|
|
24142
|
-
...me[
|
|
24139
|
+
const le = Object.keys(me)[0];
|
|
24140
|
+
return le.match(/-/g) ? Pe[le.replace(/-/g, "_")] = {
|
|
24141
|
+
...me[le],
|
|
24143
24142
|
// A flag to indicate the field name has dashes originally and they are replaced with underscores.
|
|
24144
24143
|
// When submitting the form, the underscores should be replaced with dashes again
|
|
24145
24144
|
fieldNameHasDashes: !0
|
|
24146
|
-
} : Pe[
|
|
24145
|
+
} : Pe[le] = me[le], Pe;
|
|
24147
24146
|
}, {})), Object.keys(ve).sort().forEach((Pe) => {
|
|
24148
24147
|
var gn, ei, ti, ni, oi, ii, ri;
|
|
24149
24148
|
const me = ve[Pe];
|
|
24150
24149
|
me.type === "set" && (me.type = "array");
|
|
24151
|
-
const
|
|
24152
|
-
if ((gn = Te == null ? void 0 : Te.fieldsToDelete) != null && gn.includes(
|
|
24153
|
-
nc(K,
|
|
24150
|
+
const le = M ? `${M}-${Pe}` : `${Pe}`;
|
|
24151
|
+
if ((gn = Te == null ? void 0 : Te.fieldsToDelete) != null && gn.includes(le)) {
|
|
24152
|
+
nc(K, le);
|
|
24154
24153
|
return;
|
|
24155
24154
|
}
|
|
24156
24155
|
if (Object.prototype.hasOwnProperty.call(me, "overwrite") || me.hidden)
|
|
24157
24156
|
return;
|
|
24158
24157
|
if (me.type === "table")
|
|
24159
|
-
return te(
|
|
24158
|
+
return te(le, me.schema, K);
|
|
24160
24159
|
if (me.fields)
|
|
24161
|
-
return _e && me.type === "record" ? (K[
|
|
24160
|
+
return _e && me.type === "record" ? (K[le] = {
|
|
24162
24161
|
type: "object",
|
|
24163
24162
|
model: Pe,
|
|
24164
24163
|
schema: {
|
|
24165
|
-
fields: Object.values(te(
|
|
24164
|
+
fields: Object.values(te(le, me, {}, !0))
|
|
24166
24165
|
}
|
|
24167
|
-
}, K) : te(
|
|
24168
|
-
if (K[
|
|
24169
|
-
if (!_e && me.type === "array" && (X.value =
|
|
24170
|
-
const je =
|
|
24171
|
-
K[
|
|
24166
|
+
}, K) : te(le, me, K);
|
|
24167
|
+
if (K[le] = { id: le, model: Pe }, K[le].type = me.type === "boolean" ? "checkbox" : "input", K[le].required = me.required, K[le].referenceable = me.referenceable, le.startsWith("config-"))
|
|
24168
|
+
if (!_e && me.type === "array" && (X.value = le), _e && X.value && le.startsWith(X.value)) {
|
|
24169
|
+
const je = le.slice(X.value.length + 1);
|
|
24170
|
+
K[le].label = je.split("-").map(l).join(".");
|
|
24172
24171
|
} else
|
|
24173
|
-
K[
|
|
24174
|
-
if ((M === "config" || M.startsWith("config-")) && (ei = ve[Pe]) != null && ei.description && (K[
|
|
24175
|
-
if (K[
|
|
24172
|
+
K[le].label = l(le);
|
|
24173
|
+
if ((M === "config" || M.startsWith("config-")) && (ei = ve[Pe]) != null && ei.description && (K[le].help = _r.parse(ve[Pe].description, { mangle: !1, headerIds: !1 })), me.type === "map") {
|
|
24174
|
+
if (K[le].type = "object-advanced", K[le].values = me.values, me.values.type === "array") {
|
|
24176
24175
|
const { type: je } = me.values.elements || {};
|
|
24177
|
-
K[
|
|
24176
|
+
K[le].schema = {
|
|
24178
24177
|
fields: [{
|
|
24179
24178
|
schema: {
|
|
24180
24179
|
fields: [{
|
|
24181
24180
|
...Ge,
|
|
24182
|
-
model:
|
|
24181
|
+
model: le,
|
|
24183
24182
|
valueArrayType: je === "integer" ? "number" : je || "string",
|
|
24184
24183
|
inputAttributes: {
|
|
24185
24184
|
...Ge.inputAttributes,
|
|
@@ -24190,7 +24189,7 @@ const Hd = cu.options, TK = we.string().min(1).refine((e) => !e.includes("."), "
|
|
|
24190
24189
|
}
|
|
24191
24190
|
}]
|
|
24192
24191
|
};
|
|
24193
|
-
} else me.values.fields && (K[
|
|
24192
|
+
} else me.values.fields && (K[le].schema = {
|
|
24194
24193
|
fields: [
|
|
24195
24194
|
{
|
|
24196
24195
|
type: "object",
|
|
@@ -24212,36 +24211,36 @@ const Hd = cu.options, TK = we.string().min(1).refine((e) => !e.includes("."), "
|
|
|
24212
24211
|
});
|
|
24213
24212
|
return K;
|
|
24214
24213
|
}
|
|
24215
|
-
if (me.enum && me.type === "array" && (K[
|
|
24214
|
+
if (me.enum && me.type === "array" && (K[le].type = "checklist", K[le].values = me.enum, K[le].multi = !0, K[le].multiSelect = !0), me.one_of && me.type !== "array" && (K[le].type = "select", K[le].values = me.one_of, K[le].selectOptions = {
|
|
24216
24215
|
noneSelectedText: r("plugins.form.no_selection")
|
|
24217
24216
|
}), me.elements && me.type === "array") {
|
|
24218
24217
|
const je = me.elements;
|
|
24219
|
-
if (K[
|
|
24220
|
-
const { id: $t, help: lt, label: De, hint: ze, values: Je, referenceable: hn, model: Ft } = K[
|
|
24221
|
-
tr.type = je.type === "string" ? "text" : "number", K[
|
|
24218
|
+
if (K[le].referenceable = je.referenceable, K[le].elements = je, ["string", "integer", "number"].includes(je.type) && !je.one_of) {
|
|
24219
|
+
const { id: $t, help: lt, label: De, hint: ze, values: Je, referenceable: hn, model: Ft } = K[le], { inputAttributes: tr, ...sh } = JSON.parse(JSON.stringify(Ge));
|
|
24220
|
+
tr.type = je.type === "string" ? "text" : "number", K[le] = { id: $t, help: lt, label: De, hint: ze, values: Je, referenceable: hn, model: Ft, inputAttributes: tr, ...sh };
|
|
24222
24221
|
}
|
|
24223
24222
|
}
|
|
24224
|
-
if (me.hint && (K[
|
|
24225
|
-
if (je ===
|
|
24226
|
-
const { help: $t, label: lt, hint: De, values: ze, referenceable: Je, elements: hn } = K[
|
|
24227
|
-
K[
|
|
24223
|
+
if (me.hint && (K[le].hint = me.hint), Te && !Te.overwriteDefault && Object.keys(Te).forEach((je) => {
|
|
24224
|
+
if (je === le) {
|
|
24225
|
+
const { help: $t, label: lt, hint: De, values: ze, referenceable: Je, elements: hn } = K[le], { help: Ft, ...tr } = Te[je];
|
|
24226
|
+
K[le] = { help: $t, label: lt, hint: De, values: ze, referenceable: Je, elements: hn, ...tr }, typeof Ft == "string" && (K[le].help = _r.parse(Ft, { mangle: !1, headerIds: !1 }));
|
|
24228
24227
|
}
|
|
24229
24228
|
}), me.type === "array" && ((ti = me.elements) == null ? void 0 : ti.type) === "record" && Array.isArray(me.elements.fields)) {
|
|
24230
24229
|
let je = {};
|
|
24231
24230
|
for (const lt of me.elements.fields)
|
|
24232
24231
|
je = { ...je, ...lt };
|
|
24233
|
-
const $t = (ii = (oi = (ni = K[
|
|
24232
|
+
const $t = (ii = (oi = (ni = K[le]) == null ? void 0 : ni.items) == null ? void 0 : oi.schema) == null ? void 0 : ii.fields;
|
|
24234
24233
|
if (Array.isArray($t))
|
|
24235
|
-
for (const lt of K[
|
|
24234
|
+
for (const lt of K[le].items.schema.fields) {
|
|
24236
24235
|
const De = (ri = je[lt.model]) == null ? void 0 : ri.description;
|
|
24237
24236
|
lt.help === void 0 && typeof De == "string" && (lt.help = _r.parse(De, { mangle: !1, headerIds: !1 }));
|
|
24238
24237
|
}
|
|
24239
|
-
if ($t || (K[
|
|
24238
|
+
if ($t || (K[le].type = "array", K[le].newElementButtonLabelClasses = "kong-form-new-element-button-label", K[le].fieldClasses = "array-card-container-wrapper", K[le].itemContainerComponent = "FieldArrayCardContainer", K[le].items = {
|
|
24240
24239
|
type: "object",
|
|
24241
24240
|
schema: {
|
|
24242
|
-
fields: Object.values(te(
|
|
24241
|
+
fields: Object.values(te(le, me.elements, {}, !0))
|
|
24243
24242
|
}
|
|
24244
|
-
}, K[
|
|
24243
|
+
}, K[le].items.schema.fields.forEach(
|
|
24245
24244
|
(lt) => {
|
|
24246
24245
|
var De, ze;
|
|
24247
24246
|
for (const Je of me.elements.fields) {
|
|
@@ -24252,8 +24251,8 @@ const Hd = cu.options, TK = we.string().min(1).refine((e) => !e.includes("."), "
|
|
|
24252
24251
|
}
|
|
24253
24252
|
}
|
|
24254
24253
|
}
|
|
24255
|
-
), me.elements.type === "record" && (K[
|
|
24256
|
-
K[
|
|
24254
|
+
), me.elements.type === "record" && (K[le].nestedFields = !0)), !K[le].nestedFields)
|
|
24255
|
+
K[le].items.default = () => me.elements.fields.reduce((lt, De) => {
|
|
24257
24256
|
const ze = Object.keys(De)[0];
|
|
24258
24257
|
return lt[ze] = De[ze].default, lt;
|
|
24259
24258
|
}, {});
|
|
@@ -24265,35 +24264,35 @@ const Hd = cu.options, TK = we.string().min(1).refine((e) => !e.includes("."), "
|
|
|
24265
24264
|
lt(Je, De.model ? ze[De.model] : ze);
|
|
24266
24265
|
} else De.model && (ze[De.model] = De.default);
|
|
24267
24266
|
};
|
|
24268
|
-
K[
|
|
24267
|
+
K[le].items.default = () => {
|
|
24269
24268
|
const De = {};
|
|
24270
|
-
return lt(K[
|
|
24269
|
+
return lt(K[le].items, De), De;
|
|
24271
24270
|
};
|
|
24272
24271
|
}
|
|
24273
24272
|
}
|
|
24274
24273
|
if (b.value && Se) {
|
|
24275
24274
|
for (let je = 0; je < Se.length; je++)
|
|
24276
|
-
if (Se[je][
|
|
24277
|
-
K[
|
|
24278
|
-
...K[
|
|
24279
|
-
...Se[je][
|
|
24275
|
+
if (Se[je][le]) {
|
|
24276
|
+
K[le] = {
|
|
24277
|
+
...K[le],
|
|
24278
|
+
...Se[je][le]
|
|
24280
24279
|
};
|
|
24281
24280
|
break;
|
|
24282
24281
|
}
|
|
24283
24282
|
}
|
|
24284
|
-
if (me.required && me.type !== "boolean" && (K[
|
|
24283
|
+
if (me.required && me.type !== "boolean" && (K[le].required = !0, K[le].selectOptions = {
|
|
24285
24284
|
hideNoneSelectedText: !0
|
|
24286
|
-
}), me.required && me.type === "boolean" && (K[
|
|
24287
|
-
["string", "number"].includes(typeof K[
|
|
24285
|
+
}), me.required && me.type === "boolean" && (K[le].default = me.default ?? !1), me.default != null && typeof me.default != "object" && me.default !== "function" && (K[le].default = me.default), K[le].type === "input") {
|
|
24286
|
+
["string", "number"].includes(typeof K[le].default) && o.config.app === "konnect" && (K[le].placeholder = `Default: ${K[le].default === "" ? "<empty string>" : K[le].default}`);
|
|
24288
24287
|
const { type: je } = me.elements || {};
|
|
24289
|
-
je && (K[
|
|
24288
|
+
je && (K[le].valueArrayType = je === "integer" ? "number" : je), K[le].inputType = me.type === "array" || me.type === "string" ? me.encrypted ? "password" : "text" : me.type;
|
|
24290
24289
|
}
|
|
24291
24290
|
let Xe = "string";
|
|
24292
|
-
me.enum ? Xe = oe(me.enum) : me.type === "boolean" ? Xe = "boolean" : me.type === "number" || me.type === "integer" ? (Xe = "number", K[
|
|
24291
|
+
me.enum ? Xe = oe(me.enum) : me.type === "boolean" ? Xe = "boolean" : me.type === "number" || me.type === "integer" ? (Xe = "number", K[le].inputType = "number") : me.type === "array" ? (Xe = "array", K[le].default = me.default, me.len_min > 0 && (K[le].submitWhenNull = !0)) : me.type === "foreign" ? Xe = "object" : me.default && Array.isArray(me.default) ? (Xe = "array", K[le].valueArrayType = oe(me.default)) : me.default && (Xe = typeof me.default), K[le].valueType = Xe, me.fieldNameHasDashes && (K[le].fieldNameHasDashes = !0);
|
|
24293
24292
|
}), K;
|
|
24294
24293
|
}, H = () => {
|
|
24295
|
-
var
|
|
24296
|
-
const M = ((
|
|
24294
|
+
var le, Xe, gn, ei, ti, ni, oi, ii, ri, je, $t, lt;
|
|
24295
|
+
const M = ((le = en[o.pluginType]) == null ? void 0 : le.scope.includes(kt.SERVICE)) ?? !0, Z = ((Xe = en[o.pluginType]) == null ? void 0 : Xe.scope.includes(kt.ROUTE)) ?? !0, K = ((gn = en[o.pluginType]) == null ? void 0 : gn.scope.includes(kt.CONSUMER)) ?? !0, _e = o.config.disableConsumerGroupScope ? !1 : ((ei = en[o.pluginType]) == null ? void 0 : ei.scope.includes(kt.CONSUMER_GROUP)) ?? !0, ve = o.config.entityType === "consumers" && !!o.config.entityId || !!((ni = (ti = _.value) == null ? void 0 : ti.consumer) != null && ni.id), Te = o.config.entityType === "consumer_groups" && !!o.config.entityId || !!((ii = (oi = _.value) == null ? void 0 : oi.consumer_group) != null && ii.id), Se = o.config.entityType === "services" && !!o.config.entityId || !!((je = (ri = _.value) == null ? void 0 : ri.service) != null && je.id), ae = o.config.entityType === "routes" && !!o.config.entityId || !!((lt = ($t = _.value) == null ? void 0 : $t.route) != null && lt.id), Ae = [], Pe = (De, ze, Je) => De ? r("plugins.form.disable_source_scope_change", { scope: Je }) : ze ? r("plugins.form.disable_data_retrieving", { scope: Je }) : "", me = (De) => {
|
|
24297
24296
|
var ze, Je;
|
|
24298
24297
|
return ((Je = (ze = o.scopedEntitiesPermissions) == null ? void 0 : ze[De]) == null ? void 0 : Je.canRetrieve) === !1;
|
|
24299
24298
|
};
|
|
@@ -24395,8 +24394,8 @@ const Hd = cu.options, TK = we.string().min(1).refine((e) => !e.includes("."), "
|
|
|
24395
24394
|
}), z.selectionGroup.fields[1].fields = Ae;
|
|
24396
24395
|
}
|
|
24397
24396
|
a[o.pluginType] && a[o.pluginType].overwriteDefault && Object.hasOwnProperty.call(a[o.pluginType], "formSchema") && Object.assign(z, a[o.pluginType].formSchema);
|
|
24398
|
-
}, U = D(() => !d(V.fields, P, !0)), B = D(() => !R.value && !O.value && (v.value === jn.Create || U.value)), j = re(!1),
|
|
24399
|
-
o.credential && M.password && (M.password = ""), V.fields.id = (M == null ? void 0 : M.id) || void 0,
|
|
24397
|
+
}, U = D(() => !d(V.fields, P, !0)), B = D(() => !R.value && !O.value && (v.value === jn.Create || U.value)), j = re(!1), ue = re(), ne = (M) => {
|
|
24398
|
+
o.credential && M.password && (M.password = ""), V.fields.id = (M == null ? void 0 : M.id) || void 0, ue.value = M == null ? void 0 : M.ordering, Object.assign(P, V.fields), _.value = M, j.value = !0;
|
|
24400
24399
|
}, ce = re({}), pe = (M) => {
|
|
24401
24400
|
var Z;
|
|
24402
24401
|
V.fields = M.model, V.fields.id = ((Z = _.value) == null ? void 0 : Z.id) || void 0, Object.assign(P, M.originalModel), ce.value = M.data, o.isWizardStep && n("model-updated", {
|
|
@@ -24444,7 +24443,7 @@ const Hd = cu.options, TK = we.string().min(1).refine((e) => !e.includes("."), "
|
|
|
24444
24443
|
model: V.fields,
|
|
24445
24444
|
payload: Z,
|
|
24446
24445
|
schema: y.value
|
|
24447
|
-
}), !b.value && !ye.value && await f.post(fe.value, Z), v.value === "create" ? M = await f.post(be.value, Z) : v.value === "edit" && (M = o.config.app === "konnect" || A.value && Z.partials ? await f.put(be.value, Object.assign({ ordering:
|
|
24446
|
+
}), !b.value && !ye.value && await f.post(fe.value, Z), v.value === "create" ? M = await f.post(be.value, Z) : v.value === "edit" && (M = o.config.app === "konnect" || A.value && Z.partials ? await f.put(be.value, Object.assign({ ordering: ue.value }, Z)) : await f.patch(be.value, Z)), Object.assign(P, V.fields), n("update", M == null ? void 0 : M.data);
|
|
24448
24447
|
} catch (M) {
|
|
24449
24448
|
V.serverErrorMessage = u(M), n("error", M);
|
|
24450
24449
|
} finally {
|
|
@@ -24846,7 +24845,7 @@ const Hd = cu.options, TK = we.string().min(1).refine((e) => !e.includes("."), "
|
|
|
24846
24845
|
}, j = async (L) => {
|
|
24847
24846
|
var M;
|
|
24848
24847
|
await ((M = i.canRetrieve) == null ? void 0 : M.call(i, L)) && a.push(i.config.getViewRoute(L));
|
|
24849
|
-
},
|
|
24848
|
+
}, ue = (L) => ({
|
|
24850
24849
|
label: r("actions.view"),
|
|
24851
24850
|
to: i.config.getViewRoute(L)
|
|
24852
24851
|
}), ne = (L) => ({
|
|
@@ -25016,7 +25015,7 @@ const Hd = cu.options, TK = we.string().min(1).refine((e) => !e.includes("."), "
|
|
|
25016
25015
|
disabled: !Ae,
|
|
25017
25016
|
"disabled-tooltip-text": !Ae && ((me = (Pe = e.config).getToggleDisabledTooltip) == null ? void 0 : me.call(Pe, ae)) || void 0,
|
|
25018
25017
|
"model-value": ae.enabled,
|
|
25019
|
-
onClick: Mt((
|
|
25018
|
+
onClick: Mt((le) => Ae && oe(ae), ["stop", "prevent"])
|
|
25020
25019
|
}, null, 8, ["disabled", "disabled-tooltip-text", "model-value", "onClick"])
|
|
25021
25020
|
])
|
|
25022
25021
|
];
|
|
@@ -25073,7 +25072,7 @@ const Hd = cu.options, TK = we.string().min(1).refine((e) => !e.includes("."), "
|
|
|
25073
25072
|
N(Te, {
|
|
25074
25073
|
"data-testid": "action-entity-view",
|
|
25075
25074
|
"has-divider": "",
|
|
25076
|
-
item:
|
|
25075
|
+
item: ue(ae)
|
|
25077
25076
|
}, null, 8, ["item"])
|
|
25078
25077
|
]),
|
|
25079
25078
|
_: 2
|
|
@@ -25880,22 +25879,22 @@ const Hd = cu.options, TK = we.string().min(1).refine((e) => !e.includes("."), "
|
|
|
25880
25879
|
setup(e, { emit: t }) {
|
|
25881
25880
|
var U;
|
|
25882
25881
|
const n = e, o = t, i = Oh(), r = aa(), { i18n: { t: a } } = nt.useI18n(), { pluginMetaData: s } = nt.usePluginMetaData(), { getMessageFromError: l } = Xo(), { sortAlpha: u, objectsAreEqual: c } = ra(), d = re(""), f = re(!0), m = re(!1), h = re(""), v = re([]), g = re([]), y = re({}), b = re([]), { axiosInstance: _ } = Bn((U = n.config) == null ? void 0 : U.axiosRequestConfig), T = D(() => y.value ? Object.entries(y.value).filter(([B]) => B !== Ye.CUSTOM_PLUGINS).reduce((B, [, j]) => {
|
|
25883
|
-
for (const
|
|
25884
|
-
B[
|
|
25882
|
+
for (const ue of j)
|
|
25883
|
+
B[ue.id] = ue;
|
|
25885
25884
|
return B;
|
|
25886
25885
|
}, {}) : {}), A = D(() => {
|
|
25887
|
-
var
|
|
25886
|
+
var ue;
|
|
25888
25887
|
if (!y.value)
|
|
25889
25888
|
return {};
|
|
25890
25889
|
const B = d.value.toLowerCase(), j = JSON.parse(JSON.stringify(y.value));
|
|
25891
25890
|
for (const ne in y.value) {
|
|
25892
|
-
const ce = ((
|
|
25891
|
+
const ce = ((ue = y.value[ne]) == null ? void 0 : ue.filter((pe) => pe.name.toLowerCase().includes(B) || pe.id.toLowerCase().includes(B) || pe.group.toLowerCase().includes(B))) || [];
|
|
25893
25892
|
ce.length ? j[ne] = ce : delete j[ne];
|
|
25894
25893
|
}
|
|
25895
25894
|
return j;
|
|
25896
25895
|
}), S = D(() => n.highlightedPluginIds.reduce((B, j) => {
|
|
25897
|
-
const
|
|
25898
|
-
return
|
|
25896
|
+
const ue = T.value[j];
|
|
25897
|
+
return ue && B.push(ue), B;
|
|
25899
25898
|
}, [])), O = D(() => Object.keys(A.value).length > 0), P = D(() => Object.keys(y.value).length > 0 && !O.value), V = D(() => n.config.app === "konnect" ? [
|
|
25900
25899
|
{
|
|
25901
25900
|
hash: "#kong",
|
|
@@ -25917,10 +25916,10 @@ const Hd = cu.options, TK = we.string().min(1).refine((e) => !e.includes("."), "
|
|
|
25917
25916
|
]
|
|
25918
25917
|
)].filter((B) => !n.ignoredPlugins.includes(B)).filter((B) => n.config.entityType && (n.config.entityType === "services" && s[B] && !s[B].scope.includes(kt.SERVICE) || n.config.entityType === "routes" && s[B] && !s[B].scope.includes(kt.ROUTE) || n.config.entityType === "consumer_groups" && s[B] && !s[B].scope.includes(kt.CONSUMER_GROUP) || n.config.entityType === "consumers" && s[B] && !s[B].scope.includes(kt.CONSUMER)) ? !1 : B).reduce((B, j) => {
|
|
25919
25918
|
var Ee;
|
|
25920
|
-
const
|
|
25919
|
+
const ue = s[j] && s[j].name || j, ne = {
|
|
25921
25920
|
...s[j],
|
|
25922
25921
|
id: j,
|
|
25923
|
-
name:
|
|
25922
|
+
name: ue,
|
|
25924
25923
|
available: v.value.includes(j),
|
|
25925
25924
|
disabledMessage: "",
|
|
25926
25925
|
group: ((Ee = s[j]) == null ? void 0 : Ee.group) || Ye.CUSTOM_PLUGINS
|
|
@@ -25964,35 +25963,35 @@ const Hd = cu.options, TK = we.string().min(1).refine((e) => !e.includes("."), "
|
|
|
25964
25963
|
var B, j;
|
|
25965
25964
|
(j = (B = H.value) == null ? void 0 : B.input) == null || j.focus();
|
|
25966
25965
|
try {
|
|
25967
|
-
const { data:
|
|
25966
|
+
const { data: ue } = await _.get(I.value);
|
|
25968
25967
|
if (n.config.app === "konnect") {
|
|
25969
|
-
const { names: ne } =
|
|
25968
|
+
const { names: ne } = ue;
|
|
25970
25969
|
if (v.value = ne || [], ee.value) {
|
|
25971
25970
|
const { data: ce } = await _.get(ee.value);
|
|
25972
25971
|
g.value = ce.data || [];
|
|
25973
25972
|
}
|
|
25974
25973
|
} else if (n.config.app === "kongManager") {
|
|
25975
|
-
const { plugins: { available_on_server: ne } } =
|
|
25974
|
+
const { plugins: { available_on_server: ne } } = ue;
|
|
25976
25975
|
v.value = ne ? Object.keys(ne) : [];
|
|
25977
25976
|
}
|
|
25978
|
-
} catch (
|
|
25979
|
-
m.value = !0, h.value = l(
|
|
25977
|
+
} catch (ue) {
|
|
25978
|
+
m.value = !0, h.value = l(ue);
|
|
25980
25979
|
}
|
|
25981
25980
|
if ($.value)
|
|
25982
25981
|
try {
|
|
25983
|
-
const { data: { data:
|
|
25984
|
-
if (
|
|
25985
|
-
const ne =
|
|
25982
|
+
const { data: { data: ue } } = await _.get($.value);
|
|
25983
|
+
if (ue != null && ue.length) {
|
|
25984
|
+
const ne = ue.reduce((ce, pe) => (pe.name && ce.push(pe.name), ce), []);
|
|
25986
25985
|
b.value = b.value.concat(ne);
|
|
25987
25986
|
}
|
|
25988
25987
|
} catch {
|
|
25989
25988
|
}
|
|
25990
25989
|
m.value || (y.value = X()), f.value = !1;
|
|
25991
25990
|
}), (B, j) => {
|
|
25992
|
-
const
|
|
25991
|
+
const ue = Ce("KInput"), ne = Ce("KSkeletonBox"), ce = Ce("KSkeleton"), pe = Ce("KEmptyState"), Ee = Ce("KTooltip"), xe = Ce("KTabs");
|
|
25993
25992
|
return E(), Q("div", M3, [
|
|
25994
25993
|
Y("div", R3, [
|
|
25995
|
-
N(
|
|
25994
|
+
N(ue, {
|
|
25996
25995
|
ref: "filter-input",
|
|
25997
25996
|
modelValue: d.value,
|
|
25998
25997
|
"onUpdate:modelValue": j[0] || (j[0] = (ie) => d.value = ie),
|