@kong-ui-public/entities-plugins 8.13.2 → 8.13.4
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.
|
@@ -5765,7 +5765,7 @@ const Qt = {
|
|
|
5765
5765
|
]);
|
|
5766
5766
|
};
|
|
5767
5767
|
}
|
|
5768
|
-
}), _s = /* @__PURE__ */ ke(dm, [["__scopeId", "data-v-
|
|
5768
|
+
}), _s = /* @__PURE__ */ ke(dm, [["__scopeId", "data-v-3358be49"]]), pm = {
|
|
5769
5769
|
name: "FieldMetric",
|
|
5770
5770
|
components: { AddIcon: bi, TrashIcon: Mn },
|
|
5771
5771
|
mixins: [ut],
|
|
@@ -10781,8 +10781,8 @@ will extend the wait time by about 12 minutes, continuously adjusting as new req
|
|
|
10781
10781
|
}), T = () => {
|
|
10782
10782
|
R.value = !R.value;
|
|
10783
10783
|
}, D = J(() => {
|
|
10784
|
-
var Ee, Te, ne, me, Ae,
|
|
10785
|
-
const w = i.config.entityType === "consumers" && i.config.entityId || ((Te = (Ee = K.value) == null ? void 0 : Ee.consumer) == null ? void 0 : Te.id), F = i.config.entityType === "consumer_groups" && i.config.entityId || ((me = (ne = K.value) == null ? void 0 : ne.consumer_group) == null ? void 0 : me.id), C = i.config.entityType === "services" && i.config.entityId || ((
|
|
10784
|
+
var Ee, Te, ne, me, Ae, Q, q, Qe;
|
|
10785
|
+
const w = i.config.entityType === "consumers" && i.config.entityId || ((Te = (Ee = K.value) == null ? void 0 : Ee.consumer) == null ? void 0 : Te.id), F = i.config.entityType === "consumer_groups" && i.config.entityId || ((me = (ne = K.value) == null ? void 0 : ne.consumer_group) == null ? void 0 : me.id), C = i.config.entityType === "services" && i.config.entityId || ((Q = (Ae = K.value) == null ? void 0 : Ae.service) == null ? void 0 : Q.id), re = i.config.entityType === "routes" && i.config.entityId || ((Qe = (q = K.value) == null ? void 0 : q.route) == null ? void 0 : Qe.id);
|
|
10786
10786
|
if (!(w || F || C || re))
|
|
10787
10787
|
return {
|
|
10788
10788
|
global: {
|
|
@@ -10895,44 +10895,44 @@ will extend the wait time by about 12 minutes, continuously adjusting as new req
|
|
|
10895
10895
|
var ne, me;
|
|
10896
10896
|
let ce = F && F.fields || [];
|
|
10897
10897
|
const Ee = l[i.pluginType], Te = (me = (ne = $t[i.pluginType]) == null ? void 0 : ne.schema) == null ? void 0 : me.fields;
|
|
10898
|
-
return Array.isArray(ce) && (ce = ce.reduce((Ae,
|
|
10899
|
-
const
|
|
10900
|
-
return
|
|
10901
|
-
...q
|
|
10898
|
+
return Array.isArray(ce) && (ce = ce.reduce((Ae, Q) => {
|
|
10899
|
+
const q = Object.keys(Q)[0];
|
|
10900
|
+
return q.match(/-/g) ? Ae[q.replace(/-/g, "_")] = {
|
|
10901
|
+
...Q[q],
|
|
10902
10902
|
// A flag to indicate the field name has dashes originally and they are replaced with underscores.
|
|
10903
10903
|
// When submitting the form, the underscores should be replaced with dashes again
|
|
10904
10904
|
fieldNameHasDashes: !0
|
|
10905
|
-
} : Ae[
|
|
10905
|
+
} : Ae[q] = Q[q], Ae;
|
|
10906
10906
|
}, {})), Object.keys(ce).sort().forEach((Ae) => {
|
|
10907
10907
|
var vt, Di, Yi, ji, Hi, Vi;
|
|
10908
|
-
const
|
|
10909
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
10908
|
+
const Q = ce[Ae], q = w ? `${w}-${Ae}` : `${Ae}`;
|
|
10909
|
+
if (Object.prototype.hasOwnProperty.call(Q, "overwrite") || Q.hidden)
|
|
10910
10910
|
return;
|
|
10911
|
-
if (
|
|
10912
|
-
return oe(
|
|
10913
|
-
if (
|
|
10914
|
-
return re &&
|
|
10911
|
+
if (Q.type === "table")
|
|
10912
|
+
return oe(q, Q.schema, C);
|
|
10913
|
+
if (Q.fields)
|
|
10914
|
+
return re && Q.type === "record" ? (C[q] = {
|
|
10915
10915
|
type: "object",
|
|
10916
10916
|
model: Ae,
|
|
10917
10917
|
schema: {
|
|
10918
|
-
fields: Object.values(oe(
|
|
10918
|
+
fields: Object.values(oe(q, Q, {}, !0))
|
|
10919
10919
|
}
|
|
10920
|
-
}, C) : oe(
|
|
10921
|
-
if (C[
|
|
10922
|
-
if (!re &&
|
|
10923
|
-
const fe =
|
|
10924
|
-
C[
|
|
10920
|
+
}, C) : oe(q, Q, C);
|
|
10921
|
+
if (C[q] = { id: q, model: Ae }, C[q].type = Q.type === "boolean" ? "checkbox" : "input", C[q].required = Q.required, C[q].referenceable = Q.referenceable, q.startsWith("config-"))
|
|
10922
|
+
if (!re && Q.type === "array" && (M.value = q), re && M.value && q.startsWith(M.value)) {
|
|
10923
|
+
const fe = q.slice(M.value.length + 1);
|
|
10924
|
+
C[q].label = fe.split("-").map(c).join(".");
|
|
10925
10925
|
} else
|
|
10926
|
-
C[
|
|
10927
|
-
if ((w === "config" || w.startsWith("config-")) && (vt = ce[Ae]) != null && vt.description && (C[
|
|
10928
|
-
if (C[
|
|
10929
|
-
const { type: fe } =
|
|
10930
|
-
C[
|
|
10926
|
+
C[q].label = c(q);
|
|
10927
|
+
if ((w === "config" || w.startsWith("config-")) && (vt = ce[Ae]) != null && vt.description && (C[q].help = he.parse(ce[Ae].description, { mangle: !1, headerIds: !1 })), Q.type === "map") {
|
|
10928
|
+
if (C[q].type = "object-advanced", C[q].values = Q.values, Q.values.type === "array") {
|
|
10929
|
+
const { type: fe } = Q.values.elements || {};
|
|
10930
|
+
C[q].schema = {
|
|
10931
10931
|
fields: [{
|
|
10932
10932
|
schema: {
|
|
10933
10933
|
fields: [{
|
|
10934
10934
|
...vn,
|
|
10935
|
-
model:
|
|
10935
|
+
model: q,
|
|
10936
10936
|
valueArrayType: fe === "integer" ? "number" : fe || "string",
|
|
10937
10937
|
inputAttributes: {
|
|
10938
10938
|
...vn.inputAttributes,
|
|
@@ -10943,13 +10943,13 @@ will extend the wait time by about 12 minutes, continuously adjusting as new req
|
|
|
10943
10943
|
}
|
|
10944
10944
|
}]
|
|
10945
10945
|
};
|
|
10946
|
-
} else
|
|
10946
|
+
} else Q.values.fields && (C[q].schema = {
|
|
10947
10947
|
fields: [
|
|
10948
10948
|
{
|
|
10949
10949
|
type: "object",
|
|
10950
10950
|
model: "object",
|
|
10951
10951
|
schema: {
|
|
10952
|
-
fields:
|
|
10952
|
+
fields: Q.values.fields.map((fe) => {
|
|
10953
10953
|
const st = Object.keys(fe)[0];
|
|
10954
10954
|
return {
|
|
10955
10955
|
model: st,
|
|
@@ -10965,39 +10965,39 @@ will extend the wait time by about 12 minutes, continuously adjusting as new req
|
|
|
10965
10965
|
});
|
|
10966
10966
|
return C;
|
|
10967
10967
|
}
|
|
10968
|
-
if (
|
|
10968
|
+
if (Q.enum && Q.type === "array" && (C[q].type = "checklist", C[q].values = Q.enum, C[q].multi = !0, C[q].multiSelect = !0), Q.one_of && Q.type !== "array" && (C[q].type = "select", C[q].values = Q.one_of, C[q].selectOptions = {
|
|
10969
10969
|
noneSelectedText: a("plugins.form.no_selection")
|
|
10970
|
-
}),
|
|
10971
|
-
const fe =
|
|
10972
|
-
if (C[
|
|
10973
|
-
const { id: st, help: Pe, label: Ce, hint: ze, values: St, referenceable: yt } = C[
|
|
10974
|
-
Tt.type = fe.type === "integer" ? "number" : "text", C[
|
|
10970
|
+
}), Q.elements && Q.type === "array") {
|
|
10971
|
+
const fe = Q.elements;
|
|
10972
|
+
if (C[q].referenceable = fe.referenceable, (fe.type === "string" || fe.type === "integer") && !fe.one_of) {
|
|
10973
|
+
const { id: st, help: Pe, label: Ce, hint: ze, values: St, referenceable: yt } = C[q], { inputAttributes: Tt, ...cl } = JSON.parse(JSON.stringify(vn));
|
|
10974
|
+
Tt.type = fe.type === "integer" ? "number" : "text", C[q] = { id: st, help: Pe, label: Ce, hint: ze, values: St, referenceable: yt, inputAttributes: Tt, ...cl };
|
|
10975
10975
|
}
|
|
10976
10976
|
}
|
|
10977
|
-
if (
|
|
10978
|
-
if (fe ===
|
|
10979
|
-
const { help: st, label: Pe, hint: Ce, values: ze, referenceable: St } = C[
|
|
10980
|
-
C[
|
|
10977
|
+
if (Q.hint && (C[q].hint = Q.hint), Ee && !Ee.overwriteDefault && Object.keys(Ee).forEach((fe) => {
|
|
10978
|
+
if (fe === q) {
|
|
10979
|
+
const { help: st, label: Pe, hint: Ce, values: ze, referenceable: St } = C[q], { help: yt, ...Tt } = Ee[fe];
|
|
10980
|
+
C[q] = { help: st, label: Pe, hint: Ce, values: ze, referenceable: St, ...Tt }, typeof yt == "string" && (C[q].help = he.parse(yt, { mangle: !1, headerIds: !1 }));
|
|
10981
10981
|
}
|
|
10982
|
-
}),
|
|
10982
|
+
}), Q.type === "array" && ((Di = Q.elements) == null ? void 0 : Di.type) === "record" && Array.isArray(Q.elements.fields)) {
|
|
10983
10983
|
let fe = {};
|
|
10984
|
-
for (const Pe of
|
|
10984
|
+
for (const Pe of Q.elements.fields)
|
|
10985
10985
|
fe = { ...fe, ...Pe };
|
|
10986
|
-
const st = (Hi = (ji = (Yi = C[
|
|
10986
|
+
const st = (Hi = (ji = (Yi = C[q]) == null ? void 0 : Yi.items) == null ? void 0 : ji.schema) == null ? void 0 : Hi.fields;
|
|
10987
10987
|
if (Array.isArray(st))
|
|
10988
|
-
for (const Pe of C[
|
|
10988
|
+
for (const Pe of C[q].items.schema.fields) {
|
|
10989
10989
|
const Ce = (Vi = fe[Pe.model]) == null ? void 0 : Vi.description;
|
|
10990
10990
|
Pe.help === void 0 && typeof Ce == "string" && (Pe.help = he.parse(Ce, { mangle: !1, headerIds: !1 }));
|
|
10991
10991
|
}
|
|
10992
|
-
if (st || (C[
|
|
10992
|
+
if (st || (C[q].type = "array", C[q].newElementButtonLabelClasses = "kong-form-new-element-button-label", C[q].fieldClasses = "array-card-container-wrapper", C[q].itemContainerComponent = "FieldArrayCardContainer", C[q].items = {
|
|
10993
10993
|
type: "object",
|
|
10994
10994
|
schema: {
|
|
10995
|
-
fields: Object.values(oe(
|
|
10995
|
+
fields: Object.values(oe(q, Q.elements, {}, !0))
|
|
10996
10996
|
}
|
|
10997
|
-
}, C[
|
|
10997
|
+
}, C[q].items.schema.fields.forEach(
|
|
10998
10998
|
(Pe) => {
|
|
10999
10999
|
var Ce, ze;
|
|
11000
|
-
for (const St of
|
|
11000
|
+
for (const St of Q.elements.fields) {
|
|
11001
11001
|
const yt = Object.keys(St)[0], Tt = ((ze = (Ce = Pe.id) == null ? void 0 : Ce.split) == null ? void 0 : ze.call(Ce, "-")) ?? [];
|
|
11002
11002
|
if (Tt[Tt.length - 1] === yt) {
|
|
11003
11003
|
Pe.model = yt, Pe.label = c(yt);
|
|
@@ -11005,8 +11005,8 @@ will extend the wait time by about 12 minutes, continuously adjusting as new req
|
|
|
11005
11005
|
}
|
|
11006
11006
|
}
|
|
11007
11007
|
}
|
|
11008
|
-
),
|
|
11009
|
-
C[
|
|
11008
|
+
), Q.elements.type === "record" && (C[q].nestedFields = !0)), !C[q].nestedFields)
|
|
11009
|
+
C[q].items.default = () => Q.elements.fields.reduce((Pe, Ce) => {
|
|
11010
11010
|
const ze = Object.keys(Ce)[0];
|
|
11011
11011
|
return Pe[ze] = Ce[ze].default, Pe;
|
|
11012
11012
|
}, {});
|
|
@@ -11018,31 +11018,31 @@ will extend the wait time by about 12 minutes, continuously adjusting as new req
|
|
|
11018
11018
|
Pe(St, Ce.model ? ze[Ce.model] : ze);
|
|
11019
11019
|
} else Ce.model && (ze[Ce.model] = Ce.default);
|
|
11020
11020
|
};
|
|
11021
|
-
C[
|
|
11021
|
+
C[q].items.default = () => {
|
|
11022
11022
|
const Ce = {};
|
|
11023
|
-
return Pe(C[
|
|
11023
|
+
return Pe(C[q].items, Ce), Ce;
|
|
11024
11024
|
};
|
|
11025
11025
|
}
|
|
11026
11026
|
}
|
|
11027
11027
|
if (L.value && Te) {
|
|
11028
11028
|
for (let fe = 0; fe < Te.length; fe++)
|
|
11029
|
-
if (Te[fe][
|
|
11030
|
-
C[
|
|
11031
|
-
...C[
|
|
11032
|
-
...Te[fe][
|
|
11029
|
+
if (Te[fe][q]) {
|
|
11030
|
+
C[q] = {
|
|
11031
|
+
...C[q],
|
|
11032
|
+
...Te[fe][q]
|
|
11033
11033
|
};
|
|
11034
11034
|
break;
|
|
11035
11035
|
}
|
|
11036
11036
|
}
|
|
11037
|
-
if (
|
|
11037
|
+
if (Q.required && Q.type !== "boolean" && (C[q].required = !0, C[q].selectOptions = {
|
|
11038
11038
|
hideNoneSelectedText: !0
|
|
11039
|
-
}),
|
|
11040
|
-
["string", "number"].includes(typeof C[
|
|
11041
|
-
const { type: fe } =
|
|
11042
|
-
fe && (C[
|
|
11039
|
+
}), Q.required && Q.type === "boolean" && (C[q].default = Q.default ?? !1), Q.default != null && typeof Q.default != "object" && Q.default !== "function" && (C[q].default = Q.default), C[q].type === "input") {
|
|
11040
|
+
["string", "number"].includes(typeof C[q].default) && (C[q].placeholder = `Default: ${C[q].default === "" ? "<empty string>" : C[q].default}`);
|
|
11041
|
+
const { type: fe } = Q.elements || {};
|
|
11042
|
+
fe && (C[q].valueArrayType = fe === "integer" ? "number" : fe), C[q].inputType = Q.type === "array" || Q.type === "string" ? Q.encrypted ? "password" : "text" : Q.type;
|
|
11043
11043
|
}
|
|
11044
11044
|
let Qe = "string";
|
|
11045
|
-
|
|
11045
|
+
Q.enum ? Qe = ue(Q.enum) : Q.type === "boolean" ? Qe = "boolean" : Q.type === "number" || Q.type === "integer" ? (Qe = "number", C[q].inputType = "number") : Q.type === "array" || Q.type === "set" ? (Qe = "array", C[q].default = Q.default, Q.len_min > 0 && (C[q].submitWhenNull = !0)) : Q.type === "foreign" ? Qe = "object" : Q.default && Array.isArray(Q.default) ? (Qe = "array", C[q].valueArrayType = ue(Q.default)) : Q.default && (Qe = typeof Q.default), C[q].valueType = Qe, Q.fieldNameHasDashes && (C[q].fieldNameHasDashes = !0);
|
|
11046
11046
|
}), C;
|
|
11047
11047
|
}, te = () => {
|
|
11048
11048
|
var Ee, Te, ne, me;
|
|
@@ -11099,13 +11099,13 @@ will extend the wait time by about 12 minutes, continuously adjusting as new req
|
|
|
11099
11099
|
...F ? ["route"] : [],
|
|
11100
11100
|
...C ? ["consumer"] : [],
|
|
11101
11101
|
...re ? ["consumer_group"] : []
|
|
11102
|
-
],
|
|
11102
|
+
], q = Ae.splice(Ae.length - 2, 2).map((vt) => a(vt === "service" ? "plugins.form.scoping.gateway_service.plural" : `plugins.form.scoping.${vt}.plural`)).join(`${Ae.length > 0 ? "," : ""} and/or `), Qe = [
|
|
11103
11103
|
"Specific",
|
|
11104
11104
|
[
|
|
11105
11105
|
...Ae.length > 0 ? [Ae.map(
|
|
11106
11106
|
(vt) => a(vt === "service" ? "plugins.form.scoping.gateway_service.plural" : `plugins.form.scoping.${vt}.plural`)
|
|
11107
11107
|
).join(", ")] : [],
|
|
11108
|
-
|
|
11108
|
+
q
|
|
11109
11109
|
].join(", ")
|
|
11110
11110
|
].join(" ");
|
|
11111
11111
|
Z.selectionGroup.fields.push({
|
|
@@ -11334,7 +11334,7 @@ will extend the wait time by about 12 minutes, continuously adjusting as new req
|
|
|
11334
11334
|
]);
|
|
11335
11335
|
};
|
|
11336
11336
|
}
|
|
11337
|
-
}), Ab = /* @__PURE__ */ it(dy, [["__scopeId", "data-v-
|
|
11337
|
+
}), Ab = /* @__PURE__ */ it(dy, [["__scopeId", "data-v-a5623879"]]), py = ["alt", "src", "width"], Pi = /* @__PURE__ */ ve({
|
|
11338
11338
|
__name: "PluginIcon",
|
|
11339
11339
|
props: {
|
|
11340
11340
|
name: {
|
|
@@ -11536,10 +11536,10 @@ will extend the wait time by about 12 minutes, continuously adjusting as new req
|
|
|
11536
11536
|
s.config.app === "konnect" ? w = w.replace(/{controlPlaneId}/gi, ((ne = s.config) == null ? void 0 : ne.controlPlaneId) || "") : s.config.app === "kongManager" && (w = w.replace(/\/{workspace}/gi, (me = s.config) != null && me.workspace ? `/${s.config.workspace}` : ""));
|
|
11537
11537
|
const F = !D.value.enabled;
|
|
11538
11538
|
try {
|
|
11539
|
-
const { data:
|
|
11540
|
-
i("toggle-enabled", F,
|
|
11541
|
-
} catch (
|
|
11542
|
-
i("error",
|
|
11539
|
+
const { data: Q } = ((Ae = s.config) == null ? void 0 : Ae.app) === "konnect" ? await o.put(w, { ...D.value, enabled: F }, { timeout: 12e4 }) : await o.patch(w, { ...D.value, enabled: F }, { timeout: 12e4 });
|
|
11540
|
+
i("toggle-enabled", F, Q);
|
|
11541
|
+
} catch (Q) {
|
|
11542
|
+
i("error", Q);
|
|
11543
11543
|
}
|
|
11544
11544
|
D.value.enabled = F;
|
|
11545
11545
|
}, te = (N, w) => {
|
|
@@ -11699,7 +11699,7 @@ will extend the wait time by about 12 minutes, continuously adjusting as new req
|
|
|
11699
11699
|
default: E(({ isAllowed: Ae }) => [
|
|
11700
11700
|
x(C, {
|
|
11701
11701
|
class: Me(Ae || "disabled"),
|
|
11702
|
-
onClick: _t((
|
|
11702
|
+
onClick: _t((Q) => Ae && me.type && _(me.type, ne), ["stop"])
|
|
11703
11703
|
}, {
|
|
11704
11704
|
default: E(() => [
|
|
11705
11705
|
ge(X(me.badgeText), 1)
|
|
@@ -11719,7 +11719,7 @@ will extend the wait time by about 12 minutes, continuously adjusting as new req
|
|
|
11719
11719
|
"force-show": ""
|
|
11720
11720
|
}, {
|
|
11721
11721
|
default: E(({ isAllowed: me }) => {
|
|
11722
|
-
var Ae,
|
|
11722
|
+
var Ae, Q;
|
|
11723
11723
|
return [
|
|
11724
11724
|
v("div", {
|
|
11725
11725
|
onClick: w[1] || (w[1] = _t(() => {
|
|
@@ -11727,9 +11727,9 @@ will extend the wait time by about 12 minutes, continuously adjusting as new req
|
|
|
11727
11727
|
}, [
|
|
11728
11728
|
x(ce, {
|
|
11729
11729
|
disabled: !me,
|
|
11730
|
-
"disabled-tooltip-text": !me && ((
|
|
11730
|
+
"disabled-tooltip-text": !me && ((Q = (Ae = e.config).getToggleDisabledTooltip) == null ? void 0 : Q.call(Ae, ne)) || void 0,
|
|
11731
11731
|
"model-value": ne.enabled,
|
|
11732
|
-
onClick: _t((
|
|
11732
|
+
onClick: _t((q) => me && ee(ne), ["stop", "prevent"])
|
|
11733
11733
|
}, null, 8, ["disabled", "disabled-tooltip-text", "model-value", "onClick"])
|
|
11734
11734
|
])
|
|
11735
11735
|
];
|