@kong-ui-public/forms 4.29.7-pr.3517.e38e7066d.0 → 4.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/forms.es.js
CHANGED
|
@@ -6444,22 +6444,24 @@ const Jp = /* @__PURE__ */ X(xp, [["render", Xp], ["__scopeId", "data-v-7255b7db
|
|
|
6444
6444
|
// `setDirectory` is true on create/switch into Kong Identity (we adopt the directory
|
|
6445
6445
|
// name returned by the API); on edit-load it stays false so the saved value is kept.
|
|
6446
6446
|
async fetchPrincipalsState({ setDirectory: e = !1 } = {}) {
|
|
6447
|
-
var t, n, o, a, i, r;
|
|
6448
|
-
if (((t = this.formsConfig) == null ? void 0 : t.app) === "konnect") {
|
|
6447
|
+
var t, n, o, a, i, r, l;
|
|
6448
|
+
if (((t = this.formsConfig) == null ? void 0 : t.app) === "konnect" && ((n = this.formsConfig) == null ? void 0 : n.isKongIdentityDirectoriesAvailable) !== !1) {
|
|
6449
6449
|
e && this.cachedDirectory && (this.formModel["config-principals-directory"] = this.cachedDirectory.name, this.onModelUpdated());
|
|
6450
6450
|
try {
|
|
6451
6451
|
this.cachedDirectory || (this.principalsLoading = !0);
|
|
6452
|
-
const { axiosInstance:
|
|
6453
|
-
|
|
6452
|
+
const { axiosInstance: d } = yn((o = this.formsConfig) == null ? void 0 : o.axiosRequestConfig), u = this.formsConfig.apiBaseUrl, y = await d.get(`${u}/v2/directories`, {
|
|
6453
|
+
params: { "page[size]": 1 }
|
|
6454
|
+
}), f = (i = (a = y == null ? void 0 : y.data) == null ? void 0 : a.data) == null ? void 0 : i[0];
|
|
6455
|
+
if (!f) {
|
|
6454
6456
|
this.hasPrincipals = !1;
|
|
6455
6457
|
return;
|
|
6456
6458
|
}
|
|
6457
|
-
this.cachedDirectory =
|
|
6458
|
-
const
|
|
6459
|
-
`${
|
|
6459
|
+
this.cachedDirectory = f, e && (this.formModel["config-principals-directory"] = f.name, this.onModelUpdated());
|
|
6460
|
+
const p = await d.get(
|
|
6461
|
+
`${u}/v2/directories/${f.id}/principals`,
|
|
6460
6462
|
{ params: { "page[size]": 1 } }
|
|
6461
6463
|
);
|
|
6462
|
-
this.hasPrincipals = (((
|
|
6464
|
+
this.hasPrincipals = (((l = (r = p == null ? void 0 : p.data) == null ? void 0 : r.data) == null ? void 0 : l.length) ?? 0) > 0;
|
|
6463
6465
|
} catch {
|
|
6464
6466
|
this.hasPrincipals = !1;
|
|
6465
6467
|
} finally {
|
|
@@ -6468,21 +6470,22 @@ const Jp = /* @__PURE__ */ X(xp, [["render", Xp], ["__scopeId", "data-v-7255b7db
|
|
|
6468
6470
|
}
|
|
6469
6471
|
},
|
|
6470
6472
|
async fetchKongIdentityServers() {
|
|
6471
|
-
var e, t;
|
|
6472
|
-
|
|
6473
|
-
|
|
6474
|
-
|
|
6475
|
-
|
|
6476
|
-
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
|
|
6473
|
+
var e, t, n;
|
|
6474
|
+
if (((e = this.formsConfig) == null ? void 0 : e.isKongIdentityAuthServersAvailable) !== !1)
|
|
6475
|
+
try {
|
|
6476
|
+
this.kongIdentityServersLoading = !0;
|
|
6477
|
+
const { axiosInstance: o } = yn((t = this.formsConfig) == null ? void 0 : t.axiosRequestConfig), a = `${this.formsConfig.apiBaseUrl}${Qp}`, i = await o.get(a);
|
|
6478
|
+
this.kongIdentityServers = ((n = i.data) == null ? void 0 : n.data) ?? [];
|
|
6479
|
+
const r = this.formModel["config-issuer"];
|
|
6480
|
+
if (r && !this.selectedServer) {
|
|
6481
|
+
const l = this.kongIdentityServers.find((d) => d.issuer === r) || null;
|
|
6482
|
+
l && (this.restoringServer = !0, this.selectedServer = l, this.fetchClients(l.id));
|
|
6483
|
+
}
|
|
6484
|
+
} catch {
|
|
6485
|
+
this.kongIdentityServers = [];
|
|
6486
|
+
} finally {
|
|
6487
|
+
this.kongIdentityServersLoading = !1;
|
|
6480
6488
|
}
|
|
6481
|
-
} catch {
|
|
6482
|
-
this.kongIdentityServers = [];
|
|
6483
|
-
} finally {
|
|
6484
|
-
this.kongIdentityServersLoading = !1;
|
|
6485
|
-
}
|
|
6486
6489
|
},
|
|
6487
6490
|
async fetchClients(e) {
|
|
6488
6491
|
var t, n;
|
|
@@ -6885,7 +6888,7 @@ function bg(e, t, n, o, a, i) {
|
|
|
6885
6888
|
}, null, 8, ["visible", "onProceed"])
|
|
6886
6889
|
]);
|
|
6887
6890
|
}
|
|
6888
|
-
const vg = /* @__PURE__ */ X(ig, [["render", bg], ["__scopeId", "data-v-
|
|
6891
|
+
const vg = /* @__PURE__ */ X(ig, [["render", bg], ["__scopeId", "data-v-032ea85b"]]), _g = {
|
|
6889
6892
|
name: "OIDCAuthMethods",
|
|
6890
6893
|
props: {
|
|
6891
6894
|
authMethodItems: {
|
|
@@ -7087,10 +7090,8 @@ const Eg = /* @__PURE__ */ X(_g, [["render", wg], ["__scopeId", "data-v-8c1cdc7c
|
|
|
7087
7090
|
return this.formModel.id && this.isEditing || !this.isEditing;
|
|
7088
7091
|
},
|
|
7089
7092
|
hasPrincipalsFields() {
|
|
7090
|
-
var e;
|
|
7091
|
-
return this.identityPrincipalsUiEnabled && ((e = this.formSchema.fields) == null ? void 0 :
|
|
7092
|
-
(t) => no.has(t.model)
|
|
7093
|
-
));
|
|
7093
|
+
var e, t, n;
|
|
7094
|
+
return this.identityPrincipalsUiEnabled && ((e = this.formsConfig) == null ? void 0 : e.isKongIdentityAuthServersAvailable) !== !1 && ((t = this.formsConfig) == null ? void 0 : t.isKongIdentityDirectoriesAvailable) !== !1 && ((n = this.formSchema.fields) == null ? void 0 : n.some((o) => no.has(o.model)));
|
|
7094
7095
|
},
|
|
7095
7096
|
isKonnect() {
|
|
7096
7097
|
var e;
|
|
@@ -7426,7 +7427,7 @@ function Dg(e, t, n, o, a, i) {
|
|
|
7426
7427
|
}, 8, ["tabs"])
|
|
7427
7428
|
]);
|
|
7428
7429
|
}
|
|
7429
|
-
const Pg = /* @__PURE__ */ X(Cg, [["render", Dg], ["__scopeId", "data-v-
|
|
7430
|
+
const Pg = /* @__PURE__ */ X(Cg, [["render", Dg], ["__scopeId", "data-v-8e9b59d4"]]), Vg = /* @__PURE__ */ ve({
|
|
7430
7431
|
__name: "PostFunction",
|
|
7431
7432
|
props: {
|
|
7432
7433
|
formModel: {
|