@kong-ui-public/entities-key-sets 3.8.1 → 3.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { BookIcon as
|
|
3
|
-
import { useRouter as
|
|
4
|
-
import { createI18n as
|
|
5
|
-
import { useAxios as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as H, ref as C, computed as h, watch as Se, onBeforeMount as be, resolveComponent as B, createElementBlock as W, openBlock as O, createVNode as i, unref as n, createSlots as ee, withCtx as f, createTextVNode as T, toDisplayString as $, createElementVNode as L, createBlock as te, Teleport as Ce, createCommentVNode as Ie, reactive as ae } from "vue";
|
|
2
|
+
import { BookIcon as we, AddIcon as _e, KeyIcon as Ee } from "@kong/icons";
|
|
3
|
+
import { useRouter as oe } from "vue-router";
|
|
4
|
+
import { createI18n as Ke, i18nTComponent as $e } from "@kong-ui-public/i18n";
|
|
5
|
+
import { useAxios as se, useTableState as Me, useFetcher as De, useDeleteUrlBuilder as Re, FetcherStatus as Fe, EntityBaseTable as Te, PermissionsWrapper as q, TableTags as Be, EntityFilter as Oe, EntityEmptyState as Ve, EntityDeleteModal as xe, EntityTypes as Ue, useErrors as qe, EntityBaseFormType as ne, EntityBaseForm as Ae, SupportedEntityType as ie, EntityFormSection as Ne, EntityBaseConfigCard as Pe } from "@kong-ui-public/entities-shared";
|
|
6
|
+
const je = {
|
|
7
7
|
title: "Key Sets",
|
|
8
8
|
list: {
|
|
9
9
|
toolbar_actions: {
|
|
@@ -71,34 +71,34 @@ const Le = {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
}, Je = {
|
|
74
|
-
keySets:
|
|
74
|
+
keySets: je
|
|
75
75
|
};
|
|
76
|
-
function
|
|
77
|
-
const e =
|
|
76
|
+
function Le() {
|
|
77
|
+
const e = Ke("en-us", Je);
|
|
78
78
|
return {
|
|
79
79
|
i18n: e,
|
|
80
|
-
i18nT:
|
|
80
|
+
i18nT: $e(e)
|
|
81
81
|
// Translation component <i18n-t>
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
|
-
const
|
|
85
|
-
useI18n:
|
|
86
|
-
},
|
|
84
|
+
const Q = {
|
|
85
|
+
useI18n: Le
|
|
86
|
+
}, z = "/v2/control-planes/{controlPlaneId}/core-entities", G = "/{workspace}", A = {
|
|
87
87
|
list: {
|
|
88
|
-
konnect: `${
|
|
88
|
+
konnect: `${z}/key-sets`,
|
|
89
89
|
kongManager: `${G}/key-sets`
|
|
90
90
|
},
|
|
91
91
|
form: {
|
|
92
92
|
konnect: {
|
|
93
|
-
create: `${
|
|
94
|
-
edit: `${
|
|
93
|
+
create: `${z}/key-sets`,
|
|
94
|
+
edit: `${z}/key-sets/{id}`
|
|
95
95
|
},
|
|
96
96
|
kongManager: {
|
|
97
97
|
create: `${G}/key-sets`,
|
|
98
98
|
edit: `${G}/key-sets/{id}`
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
},
|
|
101
|
+
}, ze = "#00abd2", Ge = "24px", He = { class: "kong-ui-entities-key-sets-list" }, We = { class: "button-row" }, Qe = { class: "empty-state-icon-gateway" }, Xe = /* @__PURE__ */ H({
|
|
102
102
|
__name: "KeySetList",
|
|
103
103
|
props: {
|
|
104
104
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -140,57 +140,49 @@ const X = {
|
|
|
140
140
|
useActionOutside: {
|
|
141
141
|
type: Boolean,
|
|
142
142
|
default: !1
|
|
143
|
-
},
|
|
144
|
-
/**
|
|
145
|
-
* Enables the new empty state design, this prop can be removed when
|
|
146
|
-
* the khcp-14756-empty-states-m2 FF is removed.
|
|
147
|
-
*/
|
|
148
|
-
enableV2EmptyStates: {
|
|
149
|
-
type: Boolean,
|
|
150
|
-
default: !1
|
|
151
143
|
}
|
|
152
144
|
},
|
|
153
145
|
emits: ["error", "click:learn-more", "copy:success", "copy:error", "delete:success"],
|
|
154
146
|
setup(e, { emit: I }) {
|
|
155
|
-
var
|
|
156
|
-
const m = I, t = e, { i18n: { t: o } } =
|
|
147
|
+
var Z;
|
|
148
|
+
const m = I, t = e, { i18n: { t: o } } = Q.useI18n(), g = oe(), { axiosInstance: v } = se((Z = t.config) == null ? void 0 : Z.axiosRequestConfig), { hasRecords: k, handleStateChange: N } = Me(() => S.value), M = h(() => k.value && t.config.app === "konnect"), c = h(() => t.config.app !== "kongManager" || !!t.config.disableSorting), _ = {
|
|
157
149
|
// the Name column is non-hidable
|
|
158
150
|
name: { label: o("keySets.list.table_headers.name"), searchable: !0, sortable: !0, hidable: !1 },
|
|
159
151
|
tags: { label: o("keySets.list.table_headers.tags") },
|
|
160
152
|
id: { label: o("keySets.list.table_headers.id"), sortable: !0 }
|
|
161
|
-
}, P =
|
|
153
|
+
}, P = _, V = h(() => {
|
|
162
154
|
var s, p;
|
|
163
|
-
let a = `${t.config.apiBaseUrl}${
|
|
155
|
+
let a = `${t.config.apiBaseUrl}${A.list[t.config.app]}`;
|
|
164
156
|
return t.config.app === "konnect" ? a = a.replace(/{controlPlaneId}/gi, ((s = t.config) == null ? void 0 : s.controlPlaneId) || "") : t.config.app === "kongManager" && (a = a.replace(/\/{workspace}/gi, (p = t.config) != null && p.workspace ? `/${t.config.workspace}` : "")), a;
|
|
165
|
-
}),
|
|
157
|
+
}), S = C(""), D = h(() => {
|
|
166
158
|
const a = t.config.app === "konnect" || t.config.isExactMatch;
|
|
167
159
|
if (a)
|
|
168
160
|
return {
|
|
169
161
|
isExactMatch: a,
|
|
170
162
|
placeholder: o("keySets.search.placeholder")
|
|
171
163
|
};
|
|
172
|
-
const s = { name:
|
|
164
|
+
const s = { name: _.name };
|
|
173
165
|
return {
|
|
174
166
|
isExactMatch: a,
|
|
175
167
|
fields: s,
|
|
176
168
|
schema: t.config.filterSchema
|
|
177
169
|
};
|
|
178
170
|
}), {
|
|
179
|
-
fetcher:
|
|
180
|
-
fetcherState:
|
|
181
|
-
fetcherCacheKey:
|
|
182
|
-
} =
|
|
183
|
-
|
|
184
|
-
},
|
|
185
|
-
|
|
186
|
-
},
|
|
171
|
+
fetcher: E,
|
|
172
|
+
fetcherState: j,
|
|
173
|
+
fetcherCacheKey: K
|
|
174
|
+
} = De(h(() => ({ ...t.config, cacheIdentifier: t.cacheIdentifier })), V), r = () => {
|
|
175
|
+
S.value = "";
|
|
176
|
+
}, d = () => {
|
|
177
|
+
K.value++;
|
|
178
|
+
}, l = C(null), y = async (a, s) => {
|
|
187
179
|
const p = a.id;
|
|
188
180
|
if (!await s(p)) {
|
|
189
|
-
|
|
181
|
+
de(a, "id");
|
|
190
182
|
return;
|
|
191
183
|
}
|
|
192
|
-
|
|
193
|
-
},
|
|
184
|
+
ce(a, "id");
|
|
185
|
+
}, le = async (a, s) => {
|
|
194
186
|
const p = JSON.stringify(a);
|
|
195
187
|
if (!await s(p)) {
|
|
196
188
|
m("copy:error", {
|
|
@@ -203,98 +195,98 @@ const X = {
|
|
|
203
195
|
entity: a,
|
|
204
196
|
message: o("keySets.copy.success_brief")
|
|
205
197
|
});
|
|
206
|
-
},
|
|
198
|
+
}, ce = (a, s) => {
|
|
207
199
|
m("copy:success", {
|
|
208
200
|
entity: a,
|
|
209
201
|
field: s,
|
|
210
202
|
message: o("keySets.copy.success", { val: a[s] })
|
|
211
203
|
});
|
|
212
|
-
},
|
|
204
|
+
}, de = (a, s) => {
|
|
213
205
|
m("copy:error", {
|
|
214
206
|
entity: a,
|
|
215
207
|
field: s,
|
|
216
208
|
message: o("keySets.errors.copy")
|
|
217
209
|
});
|
|
218
|
-
},
|
|
210
|
+
}, ue = async (a) => {
|
|
219
211
|
var p;
|
|
220
212
|
await ((p = t.canRetrieve) == null ? void 0 : p.call(t, a)) && g.push(t.config.getViewRoute(a.id));
|
|
221
|
-
},
|
|
213
|
+
}, fe = (a) => ({
|
|
222
214
|
label: o("keySets.actions.view"),
|
|
223
215
|
to: t.config.getViewRoute(a)
|
|
224
|
-
}),
|
|
216
|
+
}), ye = (a) => ({
|
|
225
217
|
label: o("keySets.actions.edit"),
|
|
226
218
|
to: t.config.getEditRoute(a)
|
|
227
|
-
}), w = C(void 0), x = C(!1),
|
|
219
|
+
}), w = C(void 0), x = C(!1), U = C(!1), X = C(""), pe = Re(t.config, V.value), me = (a) => {
|
|
228
220
|
w.value = a, x.value = !0;
|
|
229
|
-
},
|
|
221
|
+
}, ge = () => {
|
|
230
222
|
x.value = !1;
|
|
231
|
-
},
|
|
223
|
+
}, ke = async () => {
|
|
232
224
|
var a, s, p;
|
|
233
225
|
if ((a = w.value) != null && a.id) {
|
|
234
|
-
|
|
226
|
+
U.value = !0;
|
|
235
227
|
try {
|
|
236
|
-
await
|
|
237
|
-
} catch (
|
|
238
|
-
|
|
228
|
+
await v.delete(pe(w.value.id)), U.value = !1, x.value = !1, K.value++, m("delete:success", w.value);
|
|
229
|
+
} catch (b) {
|
|
230
|
+
X.value = ((p = (s = b.response) == null ? void 0 : s.data) == null ? void 0 : p.message) || b.message || o("keySets.errors.delete"), m("error", b);
|
|
239
231
|
} finally {
|
|
240
|
-
|
|
232
|
+
U.value = !1;
|
|
241
233
|
}
|
|
242
234
|
}
|
|
243
|
-
},
|
|
235
|
+
}, he = () => {
|
|
244
236
|
g.push(t.config.createRoute);
|
|
245
237
|
};
|
|
246
|
-
|
|
247
|
-
var s, p,
|
|
248
|
-
if (a.status ===
|
|
249
|
-
|
|
238
|
+
Se(j, (a) => {
|
|
239
|
+
var s, p, b;
|
|
240
|
+
if (a.status === Fe.Error) {
|
|
241
|
+
l.value = {
|
|
250
242
|
title: o("keySets.errors.general")
|
|
251
|
-
}, (
|
|
243
|
+
}, (b = (p = (s = a.error) == null ? void 0 : s.response) == null ? void 0 : p.data) != null && b.message && (l.value.message = a.error.response.data.message), m("error", a.error);
|
|
252
244
|
return;
|
|
253
245
|
}
|
|
254
|
-
|
|
246
|
+
l.value = null;
|
|
255
247
|
});
|
|
256
|
-
const
|
|
248
|
+
const J = C({
|
|
257
249
|
ctaPath: t.config.createRoute,
|
|
258
250
|
ctaText: void 0,
|
|
259
251
|
message: `${o("keySets.list.empty_state.description")}${t.config.additionMessageForEmptyState ? ` ${t.config.additionMessageForEmptyState}` : ""}`,
|
|
260
252
|
title: o("keySets.title")
|
|
261
253
|
});
|
|
262
|
-
return
|
|
263
|
-
await t.canCreate() && (
|
|
254
|
+
return be(async () => {
|
|
255
|
+
await t.canCreate() && (J.value.title = o("keySets.list.empty_state.title"), J.value.ctaText = o("keySets.actions.create"));
|
|
264
256
|
}), (a, s) => {
|
|
265
|
-
const p =
|
|
266
|
-
return
|
|
267
|
-
i(n(
|
|
257
|
+
const p = B("KButton"), b = B("KCopy"), R = B("KDropdownItem"), Y = B("KClipboardProvider");
|
|
258
|
+
return O(), W("div", He, [
|
|
259
|
+
i(n(Te), {
|
|
268
260
|
"cache-identifier": e.cacheIdentifier,
|
|
269
|
-
"disable-sorting":
|
|
270
|
-
"empty-state-options":
|
|
261
|
+
"disable-sorting": c.value,
|
|
262
|
+
"empty-state-options": J.value,
|
|
271
263
|
"enable-entity-actions": "",
|
|
272
|
-
"error-message":
|
|
273
|
-
fetcher: n(
|
|
274
|
-
"fetcher-cache-key": n(
|
|
264
|
+
"error-message": l.value,
|
|
265
|
+
fetcher: n(E),
|
|
266
|
+
"fetcher-cache-key": n(K),
|
|
275
267
|
"pagination-type": "offset",
|
|
276
268
|
"preferences-storage-key": "kong-ui-entities-key-sets-list",
|
|
277
|
-
query:
|
|
269
|
+
query: S.value,
|
|
278
270
|
"table-headers": n(P),
|
|
279
|
-
onClearSearchInput:
|
|
280
|
-
"onClick:row": s[
|
|
281
|
-
onSort:
|
|
271
|
+
onClearSearchInput: r,
|
|
272
|
+
"onClick:row": s[3] || (s[3] = (u) => ue(u)),
|
|
273
|
+
onSort: d,
|
|
282
274
|
onState: n(N)
|
|
283
|
-
},
|
|
284
|
-
"toolbar-filter":
|
|
275
|
+
}, ee({
|
|
276
|
+
"toolbar-filter": f(() => [
|
|
285
277
|
i(n(Oe), {
|
|
286
|
-
modelValue:
|
|
287
|
-
"onUpdate:modelValue": s[0] || (s[0] = (u) =>
|
|
288
|
-
config:
|
|
278
|
+
modelValue: S.value,
|
|
279
|
+
"onUpdate:modelValue": s[0] || (s[0] = (u) => S.value = u),
|
|
280
|
+
config: D.value
|
|
289
281
|
}, null, 8, ["modelValue", "config"])
|
|
290
282
|
]),
|
|
291
|
-
"toolbar-button":
|
|
292
|
-
(
|
|
283
|
+
"toolbar-button": f(() => [
|
|
284
|
+
(O(), te(Ce, {
|
|
293
285
|
disabled: !e.useActionOutside,
|
|
294
286
|
to: "#kong-ui-app-page-header-action-button"
|
|
295
287
|
}, [
|
|
296
|
-
|
|
297
|
-
|
|
288
|
+
L("div", We, [
|
|
289
|
+
M.value ? (O(), te(p, {
|
|
298
290
|
key: 0,
|
|
299
291
|
appearance: "secondary",
|
|
300
292
|
class: "open-learning-hub",
|
|
@@ -302,24 +294,24 @@ const X = {
|
|
|
302
294
|
icon: "",
|
|
303
295
|
onClick: s[1] || (s[1] = (u) => a.$emit("click:learn-more"))
|
|
304
296
|
}, {
|
|
305
|
-
default:
|
|
306
|
-
i(n(
|
|
297
|
+
default: f(() => [
|
|
298
|
+
i(n(we), { decorative: "" })
|
|
307
299
|
]),
|
|
308
300
|
_: 1
|
|
309
|
-
})) :
|
|
310
|
-
i(n(
|
|
301
|
+
})) : Ie("", !0),
|
|
302
|
+
i(n(q), {
|
|
311
303
|
"auth-function": () => e.canCreate()
|
|
312
304
|
}, {
|
|
313
|
-
default:
|
|
305
|
+
default: f(() => [
|
|
314
306
|
i(p, {
|
|
315
307
|
appearance: "primary",
|
|
316
308
|
"data-testid": "toolbar-add-key-set",
|
|
317
309
|
size: e.useActionOutside ? "medium" : "large",
|
|
318
310
|
to: e.config.createRoute
|
|
319
311
|
}, {
|
|
320
|
-
default:
|
|
321
|
-
i(n(
|
|
322
|
-
|
|
312
|
+
default: f(() => [
|
|
313
|
+
i(n(_e)),
|
|
314
|
+
T(" " + $(n(o)("keySets.list.toolbar_actions.new_key_set")), 1)
|
|
323
315
|
]),
|
|
324
316
|
_: 1
|
|
325
317
|
}, 8, ["size", "to"])
|
|
@@ -329,82 +321,82 @@ const X = {
|
|
|
329
321
|
])
|
|
330
322
|
], 8, ["disabled"]))
|
|
331
323
|
]),
|
|
332
|
-
name:
|
|
333
|
-
|
|
324
|
+
name: f(({ rowValue: u }) => [
|
|
325
|
+
L("b", null, $(u ?? "-"), 1)
|
|
334
326
|
]),
|
|
335
|
-
tags:
|
|
336
|
-
i(n(
|
|
327
|
+
tags: f(({ rowValue: u }) => [
|
|
328
|
+
i(n(Be), { tags: u }, null, 8, ["tags"])
|
|
337
329
|
]),
|
|
338
|
-
id:
|
|
339
|
-
i(
|
|
330
|
+
id: f(({ rowValue: u }) => [
|
|
331
|
+
i(b, {
|
|
340
332
|
text: u,
|
|
341
333
|
truncate: ""
|
|
342
334
|
}, null, 8, ["text"])
|
|
343
335
|
]),
|
|
344
|
-
actions:
|
|
345
|
-
i(
|
|
346
|
-
default:
|
|
347
|
-
i(
|
|
336
|
+
actions: f(({ row: u }) => [
|
|
337
|
+
i(Y, null, {
|
|
338
|
+
default: f(({ copyToClipboard: F }) => [
|
|
339
|
+
i(R, {
|
|
348
340
|
"data-testid": "action-entity-copy-id",
|
|
349
|
-
onClick: (
|
|
341
|
+
onClick: (ve) => y(u, F)
|
|
350
342
|
}, {
|
|
351
|
-
default:
|
|
352
|
-
|
|
343
|
+
default: f(() => [
|
|
344
|
+
T($(n(o)("keySets.actions.copy_id")), 1)
|
|
353
345
|
]),
|
|
354
346
|
_: 2
|
|
355
347
|
}, 1032, ["onClick"])
|
|
356
348
|
]),
|
|
357
349
|
_: 2
|
|
358
350
|
}, 1024),
|
|
359
|
-
i(
|
|
360
|
-
default:
|
|
361
|
-
i(
|
|
351
|
+
i(Y, null, {
|
|
352
|
+
default: f(({ copyToClipboard: F }) => [
|
|
353
|
+
i(R, {
|
|
362
354
|
"data-testid": "action-entity-copy-json",
|
|
363
|
-
onClick: (
|
|
355
|
+
onClick: (ve) => le(u, F)
|
|
364
356
|
}, {
|
|
365
|
-
default:
|
|
366
|
-
|
|
357
|
+
default: f(() => [
|
|
358
|
+
T($(n(o)("keySets.actions.copy_json")), 1)
|
|
367
359
|
]),
|
|
368
360
|
_: 2
|
|
369
361
|
}, 1032, ["onClick"])
|
|
370
362
|
]),
|
|
371
363
|
_: 2
|
|
372
364
|
}, 1024),
|
|
373
|
-
i(n(
|
|
365
|
+
i(n(q), {
|
|
374
366
|
"auth-function": () => e.canRetrieve(u)
|
|
375
367
|
}, {
|
|
376
|
-
default:
|
|
377
|
-
i(
|
|
368
|
+
default: f(() => [
|
|
369
|
+
i(R, {
|
|
378
370
|
"data-testid": "action-entity-view",
|
|
379
371
|
"has-divider": "",
|
|
380
|
-
item:
|
|
372
|
+
item: fe(u.id)
|
|
381
373
|
}, null, 8, ["item"])
|
|
382
374
|
]),
|
|
383
375
|
_: 2
|
|
384
376
|
}, 1032, ["auth-function"]),
|
|
385
|
-
i(n(
|
|
377
|
+
i(n(q), {
|
|
386
378
|
"auth-function": () => e.canEdit(u)
|
|
387
379
|
}, {
|
|
388
|
-
default:
|
|
389
|
-
i(
|
|
380
|
+
default: f(() => [
|
|
381
|
+
i(R, {
|
|
390
382
|
"data-testid": "action-entity-edit",
|
|
391
|
-
item:
|
|
383
|
+
item: ye(u.id)
|
|
392
384
|
}, null, 8, ["item"])
|
|
393
385
|
]),
|
|
394
386
|
_: 2
|
|
395
387
|
}, 1032, ["auth-function"]),
|
|
396
|
-
i(n(
|
|
388
|
+
i(n(q), {
|
|
397
389
|
"auth-function": () => e.canDelete(u)
|
|
398
390
|
}, {
|
|
399
|
-
default:
|
|
400
|
-
i(
|
|
391
|
+
default: f(() => [
|
|
392
|
+
i(R, {
|
|
401
393
|
danger: "",
|
|
402
394
|
"data-testid": "action-entity-delete",
|
|
403
395
|
"has-divider": "",
|
|
404
|
-
onClick: (
|
|
396
|
+
onClick: (F) => me(u)
|
|
405
397
|
}, {
|
|
406
|
-
default:
|
|
407
|
-
|
|
398
|
+
default: f(() => [
|
|
399
|
+
T($(n(o)("keySets.actions.delete")), 1)
|
|
408
400
|
]),
|
|
409
401
|
_: 2
|
|
410
402
|
}, 1032, ["onClick"])
|
|
@@ -414,35 +406,12 @@ const X = {
|
|
|
414
406
|
]),
|
|
415
407
|
_: 2
|
|
416
408
|
}, [
|
|
417
|
-
!
|
|
418
|
-
name: "outside-actions",
|
|
419
|
-
fn: l(() => [
|
|
420
|
-
(K(), z(ae, {
|
|
421
|
-
disabled: !e.useActionOutside,
|
|
422
|
-
to: "#kong-ui-app-page-header-action-button"
|
|
423
|
-
}, [
|
|
424
|
-
i(p, {
|
|
425
|
-
appearance: "secondary",
|
|
426
|
-
class: "open-learning-hub",
|
|
427
|
-
"data-testid": "keys-set-learn-more-button",
|
|
428
|
-
icon: "",
|
|
429
|
-
onClick: s[2] || (s[2] = (u) => a.$emit("click:learn-more"))
|
|
430
|
-
}, {
|
|
431
|
-
default: l(() => [
|
|
432
|
-
i(n(oe), { decorative: "" })
|
|
433
|
-
]),
|
|
434
|
-
_: 1
|
|
435
|
-
})
|
|
436
|
-
], 8, ["disabled"]))
|
|
437
|
-
]),
|
|
438
|
-
key: "0"
|
|
439
|
-
} : void 0,
|
|
440
|
-
!b.value && e.enableV2EmptyStates && e.config.app === "konnect" ? {
|
|
409
|
+
!S.value && e.config.app === "konnect" ? {
|
|
441
410
|
name: "empty-state",
|
|
442
|
-
fn:
|
|
411
|
+
fn: f(() => {
|
|
443
412
|
var u;
|
|
444
413
|
return [
|
|
445
|
-
i(n(
|
|
414
|
+
i(n(Ve), {
|
|
446
415
|
"action-button-text": n(o)("keySets.list.empty_state_v2.create_cta"),
|
|
447
416
|
appearance: "secondary",
|
|
448
417
|
"can-create": () => e.canCreate(),
|
|
@@ -450,13 +419,13 @@ const X = {
|
|
|
450
419
|
description: n(o)("keySets.list.empty_state_v2.description"),
|
|
451
420
|
"learn-more": e.config.app === "konnect",
|
|
452
421
|
title: n(o)("keySets.list.empty_state_v2.title"),
|
|
453
|
-
"onClick:create":
|
|
454
|
-
"onClick:learnMore": s[
|
|
455
|
-
},
|
|
456
|
-
image:
|
|
457
|
-
|
|
458
|
-
i(n(
|
|
459
|
-
color: n(
|
|
422
|
+
"onClick:create": he,
|
|
423
|
+
"onClick:learnMore": s[2] || (s[2] = (F) => a.$emit("click:learn-more"))
|
|
424
|
+
}, ee({
|
|
425
|
+
image: f(() => [
|
|
426
|
+
L("div", Qe, [
|
|
427
|
+
i(n(Ee), {
|
|
428
|
+
color: n(ze),
|
|
460
429
|
size: n(Ge)
|
|
461
430
|
}, null, 8, ["color", "size"])
|
|
462
431
|
])
|
|
@@ -465,37 +434,37 @@ const X = {
|
|
|
465
434
|
}, [
|
|
466
435
|
(u = e.config) != null && u.isControlPlaneGroup ? {
|
|
467
436
|
name: "message",
|
|
468
|
-
fn:
|
|
469
|
-
|
|
437
|
+
fn: f(() => [
|
|
438
|
+
T($(n(o)("keySets.list.empty_state_v2.group")), 1)
|
|
470
439
|
]),
|
|
471
440
|
key: "0"
|
|
472
441
|
} : void 0
|
|
473
442
|
]), 1032, ["action-button-text", "can-create", "description", "learn-more", "title"])
|
|
474
443
|
];
|
|
475
444
|
}),
|
|
476
|
-
key: "
|
|
445
|
+
key: "0"
|
|
477
446
|
} : void 0
|
|
478
447
|
]), 1032, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "onState"]),
|
|
479
|
-
i(n(
|
|
480
|
-
"action-pending":
|
|
448
|
+
i(n(xe), {
|
|
449
|
+
"action-pending": U.value,
|
|
481
450
|
description: n(o)("keySets.delete.description"),
|
|
482
451
|
"entity-name": w.value && (w.value.name || w.value.id),
|
|
483
452
|
"entity-type": n(Ue).KeySet,
|
|
484
|
-
error:
|
|
453
|
+
error: X.value,
|
|
485
454
|
title: n(o)("keySets.delete.title"),
|
|
486
455
|
visible: x.value,
|
|
487
|
-
onCancel:
|
|
488
|
-
onProceed:
|
|
456
|
+
onCancel: ge,
|
|
457
|
+
onProceed: ke
|
|
489
458
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
490
459
|
]);
|
|
491
460
|
};
|
|
492
461
|
}
|
|
493
|
-
}),
|
|
462
|
+
}), re = (e, I) => {
|
|
494
463
|
const m = e.__vccOpts || e;
|
|
495
464
|
for (const [t, o] of I)
|
|
496
465
|
m[t] = o;
|
|
497
466
|
return m;
|
|
498
|
-
},
|
|
467
|
+
}, it = /* @__PURE__ */ re(Xe, [["__scopeId", "data-v-aeb4b6e1"]]), Ze = { class: "kong-ui-entities-key-sets-form" }, Ye = /* @__PURE__ */ H({
|
|
499
468
|
__name: "KeySetForm",
|
|
500
469
|
props: {
|
|
501
470
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -513,75 +482,75 @@ const X = {
|
|
|
513
482
|
},
|
|
514
483
|
emits: ["update", "error", "loading"],
|
|
515
484
|
setup(e, { emit: I }) {
|
|
516
|
-
var
|
|
517
|
-
const m = I, t = e, o =
|
|
485
|
+
var K;
|
|
486
|
+
const m = I, t = e, o = oe(), { i18n: { t: g } } = Q.useI18n(), { getMessageFromError: v } = qe(), { axiosInstance: k } = se((K = t.config) == null ? void 0 : K.axiosRequestConfig), N = h(() => A.form[t.config.app].edit), M = h(() => t.keySetId ? ne.Edit : ne.Create), c = ae({
|
|
518
487
|
fields: {
|
|
519
488
|
name: "",
|
|
520
489
|
tags: ""
|
|
521
490
|
},
|
|
522
491
|
isReadonly: !1,
|
|
523
492
|
errorMessage: ""
|
|
524
|
-
}),
|
|
493
|
+
}), _ = ae({
|
|
525
494
|
name: "",
|
|
526
495
|
tags: ""
|
|
527
|
-
}),
|
|
528
|
-
var
|
|
529
|
-
c.fields.name = (r == null ? void 0 : r.name) || "", c.fields.tags = ((
|
|
530
|
-
},
|
|
496
|
+
}), P = h(() => JSON.stringify(c.fields) !== JSON.stringify(_) && !!c.fields.name), V = (r) => {
|
|
497
|
+
var d;
|
|
498
|
+
c.fields.name = (r == null ? void 0 : r.name) || "", c.fields.tags = ((d = r == null ? void 0 : r.tags) == null ? void 0 : d.join(", ")) || "", Object.assign(_, c.fields);
|
|
499
|
+
}, S = () => {
|
|
531
500
|
o.push(t.config.cancelRoute);
|
|
532
|
-
},
|
|
533
|
-
var
|
|
534
|
-
let r = `${t.config.apiBaseUrl}${
|
|
535
|
-
return t.config.app === "konnect" ? r = r.replace(/{controlPlaneId}/gi, ((
|
|
536
|
-
}), E =
|
|
537
|
-
var r,
|
|
501
|
+
}, D = h(() => {
|
|
502
|
+
var d, l;
|
|
503
|
+
let r = `${t.config.apiBaseUrl}${A.form[t.config.app][M.value]}`;
|
|
504
|
+
return t.config.app === "konnect" ? r = r.replace(/{controlPlaneId}/gi, ((d = t.config) == null ? void 0 : d.controlPlaneId) || "") : t.config.app === "kongManager" && (r = r.replace(/\/{workspace}/gi, (l = t.config) != null && l.workspace ? `/${t.config.workspace}` : "")), r = r.replace(/{id}/gi, t.keySetId), r;
|
|
505
|
+
}), E = h(() => {
|
|
506
|
+
var r, d, l;
|
|
538
507
|
return {
|
|
539
508
|
name: c.fields.name,
|
|
540
|
-
tags: ((
|
|
509
|
+
tags: ((l = (d = (r = c.fields.tags) == null ? void 0 : r.split(",")) == null ? void 0 : d.map((y) => String(y || "").trim())) == null ? void 0 : l.filter((y) => y !== "")) || ""
|
|
541
510
|
};
|
|
542
511
|
}), j = async () => {
|
|
543
|
-
var r,
|
|
512
|
+
var r, d;
|
|
544
513
|
try {
|
|
545
514
|
c.isReadonly = !0;
|
|
546
|
-
let
|
|
547
|
-
if (
|
|
548
|
-
const { data:
|
|
549
|
-
c.fields.name = (
|
|
515
|
+
let l;
|
|
516
|
+
if (M.value === "create" ? l = await k.post(D.value, E.value) : M.value === "edit" && (l = ((r = t.config) == null ? void 0 : r.app) === "konnect" ? await k.put(D.value, E.value) : await k.patch(D.value, E.value)), l) {
|
|
517
|
+
const { data: y } = l;
|
|
518
|
+
c.fields.name = (y == null ? void 0 : y.name) || "", c.fields.tags = ((d = y == null ? void 0 : y.tags) == null ? void 0 : d.join(", ")) || "", Object.assign(_, c.fields), m("update", l == null ? void 0 : l.data);
|
|
550
519
|
}
|
|
551
|
-
} catch (
|
|
552
|
-
c.errorMessage =
|
|
520
|
+
} catch (l) {
|
|
521
|
+
c.errorMessage = v(l), m("error", l);
|
|
553
522
|
} finally {
|
|
554
523
|
c.isReadonly = !1;
|
|
555
524
|
}
|
|
556
525
|
};
|
|
557
|
-
return (r,
|
|
558
|
-
const
|
|
559
|
-
return
|
|
560
|
-
i(n(
|
|
561
|
-
"can-submit":
|
|
526
|
+
return (r, d) => {
|
|
527
|
+
const l = B("KInput");
|
|
528
|
+
return O(), W("div", Ze, [
|
|
529
|
+
i(n(Ae), {
|
|
530
|
+
"can-submit": P.value,
|
|
562
531
|
config: e.config,
|
|
563
532
|
"edit-id": e.keySetId,
|
|
564
|
-
"entity-type": n(
|
|
533
|
+
"entity-type": n(ie).KeySet,
|
|
565
534
|
"error-message": c.errorMessage,
|
|
566
535
|
"fetch-url": N.value,
|
|
567
536
|
"form-fields": E.value,
|
|
568
537
|
"is-readonly": c.isReadonly,
|
|
569
|
-
onCancel:
|
|
570
|
-
"onFetch:error":
|
|
571
|
-
"onFetch:success":
|
|
572
|
-
onLoading:
|
|
538
|
+
onCancel: S,
|
|
539
|
+
"onFetch:error": d[2] || (d[2] = (y) => r.$emit("error", y)),
|
|
540
|
+
"onFetch:success": V,
|
|
541
|
+
onLoading: d[3] || (d[3] = (y) => r.$emit("loading", y)),
|
|
573
542
|
onSubmit: j
|
|
574
543
|
}, {
|
|
575
|
-
default:
|
|
576
|
-
i(n(
|
|
544
|
+
default: f(() => [
|
|
545
|
+
i(n(Ne), {
|
|
577
546
|
description: n(g)("keySets.form.sections.general.description"),
|
|
578
547
|
"has-divider": "",
|
|
579
548
|
title: n(g)("keySets.form.sections.general.title")
|
|
580
549
|
}, {
|
|
581
|
-
default:
|
|
582
|
-
i(
|
|
550
|
+
default: f(() => [
|
|
551
|
+
i(l, {
|
|
583
552
|
modelValue: c.fields.name,
|
|
584
|
-
"onUpdate:modelValue":
|
|
553
|
+
"onUpdate:modelValue": d[0] || (d[0] = (y) => c.fields.name = y),
|
|
585
554
|
modelModifiers: { trim: !0 },
|
|
586
555
|
autocomplete: "off",
|
|
587
556
|
"data-testid": "key-set-form-name",
|
|
@@ -590,9 +559,9 @@ const X = {
|
|
|
590
559
|
readonly: c.isReadonly,
|
|
591
560
|
type: "text"
|
|
592
561
|
}, null, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
593
|
-
i(
|
|
562
|
+
i(l, {
|
|
594
563
|
modelValue: c.fields.tags,
|
|
595
|
-
"onUpdate:modelValue":
|
|
564
|
+
"onUpdate:modelValue": d[1] || (d[1] = (y) => c.fields.tags = y),
|
|
596
565
|
modelModifiers: { trim: !0 },
|
|
597
566
|
autocomplete: "off",
|
|
598
567
|
"data-testid": "key-set-form-tags",
|
|
@@ -615,7 +584,7 @@ const X = {
|
|
|
615
584
|
]);
|
|
616
585
|
};
|
|
617
586
|
}
|
|
618
|
-
}),
|
|
587
|
+
}), rt = /* @__PURE__ */ re(Ye, [["__scopeId", "data-v-a4b01cc5"]]), et = { class: "kong-ui-entities-keys-entity-config-card" }, lt = /* @__PURE__ */ H({
|
|
619
588
|
__name: "KeySetConfigCard",
|
|
620
589
|
props: {
|
|
621
590
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -642,7 +611,7 @@ const X = {
|
|
|
642
611
|
},
|
|
643
612
|
emits: ["loading", "fetch:error", "fetch:success"],
|
|
644
613
|
setup(e) {
|
|
645
|
-
const I = e, { i18n: { t: m } } =
|
|
614
|
+
const I = e, { i18n: { t: m } } = Q.useI18n(), t = h(() => A.form[I.config.app].edit), o = C({
|
|
646
615
|
id: {},
|
|
647
616
|
name: {},
|
|
648
617
|
last_updated: {},
|
|
@@ -651,23 +620,23 @@ const X = {
|
|
|
651
620
|
tooltip: m("keySets.form.fields.tags.tooltip")
|
|
652
621
|
}
|
|
653
622
|
});
|
|
654
|
-
return (g,
|
|
655
|
-
i(n(
|
|
623
|
+
return (g, v) => (O(), W("div", et, [
|
|
624
|
+
i(n(Pe), {
|
|
656
625
|
config: e.config,
|
|
657
626
|
"config-card-doc": e.configCardDoc,
|
|
658
627
|
"config-schema": o.value,
|
|
659
|
-
"entity-type": n(
|
|
628
|
+
"entity-type": n(ie).KeySet,
|
|
660
629
|
"fetch-url": t.value,
|
|
661
630
|
"hide-title": e.hideTitle,
|
|
662
|
-
"onFetch:error":
|
|
663
|
-
"onFetch:success":
|
|
664
|
-
onLoading:
|
|
631
|
+
"onFetch:error": v[0] || (v[0] = (k) => g.$emit("fetch:error", k)),
|
|
632
|
+
"onFetch:success": v[1] || (v[1] = (k) => g.$emit("fetch:success", k)),
|
|
633
|
+
onLoading: v[2] || (v[2] = (k) => g.$emit("loading", k))
|
|
665
634
|
}, null, 8, ["config", "config-card-doc", "config-schema", "entity-type", "fetch-url", "hide-title"])
|
|
666
635
|
]));
|
|
667
636
|
}
|
|
668
637
|
});
|
|
669
638
|
export {
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
639
|
+
lt as KeySetConfigCard,
|
|
640
|
+
rt as KeySetForm,
|
|
641
|
+
it as KeySetList
|
|
673
642
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(g,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@kong/icons"),require("vue-router"),require("@kong-ui-public/i18n"),require("@kong-ui-public/entities-shared")):typeof define=="function"&&define.amd?define(["exports","vue","@kong/icons","vue-router","@kong-ui-public/i18n","@kong-ui-public/entities-shared"],e):(g=typeof globalThis<"u"?globalThis:g||self,e(g["kong-ui-public-entities-key-sets"]={},g.Vue,g.KongIcons,g.VueRouter,g["kong-ui-public-i18n"],g["kong-ui-public-entities-shared"]))})(this,function(g,e,T,j,L,r){"use strict";const G={keySets:{title:"Key Sets",list:{toolbar_actions:{new_key_set:"New key set"},table_headers:{name:"Name",id:"ID",tags:"Tags"},empty_state:{title:"Configure a New Key Set",description:"A Key Set object holds a collection of asymmetric key objects. This entity allows to logically group keys by their purpose."},empty_state_v2:{title:"Configure your first key set",group:"Key sets created in gateways within this group will automatically appear here.",description:"Key sets centrally manage asymmetric keys for plugins like OpenID Connect and JWT, simplifying configuration and security across services.",create_cta:"New key set"}},actions:{create:"New Key Set",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",clear:"Clear",view:"View Details"},search:{placeholder:"Filter by exact name or ID"},delete:{title:"Delete a Key Set",description:"Deleting this key set will also delete keys associated. This action cannot be reversed so make sure to check the key set usage before deleting."},errors:{general:"Key sets could not be retrieved",delete:"The key set could not be deleted at this time.",copy:"Failed to copy to clipboard"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},form:{sections:{general:{title:"General Information",description:"General information will help identify and manage this key set."}},fields:{name:{label:"Name",placeholder:"Enter a unique name for this key set"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings for grouping and filtering, separated by commas."}}}}};function Q(){const t=L.createI18n("en-us",G);return{i18n:t,i18nT:L.i18nTComponent(t)}}const F={useI18n:Q},R="/v2/control-planes/{controlPlaneId}/core-entities",O="/{workspace}",B={list:{konnect:`${R}/key-sets`,kongManager:`${O}/key-sets`},form:{konnect:{create:`${R}/key-sets`,edit:`${R}/key-sets/{id}`},kongManager:{create:`${O}/key-sets`,edit:`${O}/key-sets/{id}`}}},X="#00abd2",Z="24px",Y={class:"kong-ui-entities-key-sets-list"},v={class:"button-row"},ee={class:"empty-state-icon-gateway"},te=e.defineComponent({__name:"KeySetList",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||!t.createRoute||!t.getViewRoute||!t.getEditRoute||t.app==="kongManager"&&!t.isExactMatch&&!t.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1},enableV2EmptyStates:{type:Boolean,default:!1}},emits:["error","click:learn-more","copy:success","copy:error","delete:success"],setup(t,{emit:S}){var z;const u=S,n=t,{i18n:{t:a}}=F.useI18n(),m=j.useRouter(),{axiosInstance:h}=r.useAxios((z=n.config)==null?void 0:z.axiosRequestConfig),{hasRecords:k,handleStateChange:q}=r.useTableState(()=>b.value),I=e.computed(()=>k.value&&n.config.app==="konnect"),l=e.computed(()=>!n.enableV2EmptyStates&&n.config.app==="konnect"),N=e.computed(()=>n.config.app!=="kongManager"||!!n.config.disableSorting),K={name:{label:a("keySets.list.table_headers.name"),searchable:!0,sortable:!0,hidable:!1},tags:{label:a("keySets.list.table_headers.tags")},id:{label:a("keySets.list.table_headers.id"),sortable:!0}},P=K,$=e.computed(()=>{var s,y;let o=`${n.config.apiBaseUrl}${B.list[n.config.app]}`;return n.config.app==="konnect"?o=o.replace(/{controlPlaneId}/gi,((s=n.config)==null?void 0:s.controlPlaneId)||""):n.config.app==="kongManager"&&(o=o.replace(/\/{workspace}/gi,(y=n.config)!=null&&y.workspace?`/${n.config.workspace}`:"")),o}),b=e.ref(""),V=e.computed(()=>{const o=n.config.app==="konnect"||n.config.isExactMatch;if(o)return{isExactMatch:o,placeholder:a("keySets.search.placeholder")};const s={name:K.name};return{isExactMatch:o,fields:s,schema:n.config.filterSchema}}),{fetcher:A,fetcherState:_,fetcherCacheKey:i}=r.useFetcher(e.computed(()=>({...n.config,cacheIdentifier:n.cacheIdentifier})),$),f=()=>{b.value=""},p=()=>{i.value++},c=e.ref(null),re=async(o,s)=>{const y=o.id;if(!await s(y)){de(o,"id");return}ce(o,"id")},le=async(o,s)=>{const y=JSON.stringify(o);if(!await s(y)){u("copy:error",{entity:o,message:a("keySets.errors.copy")});return}u("copy:success",{entity:o,message:a("keySets.copy.success_brief")})},ce=(o,s)=>{u("copy:success",{entity:o,field:s,message:a("keySets.copy.success",{val:o[s]})})},de=(o,s)=>{u("copy:error",{entity:o,field:s,message:a("keySets.errors.copy")})},fe=async o=>{var y;await((y=n.canRetrieve)==null?void 0:y.call(n,o))&&m.push(n.config.getViewRoute(o.id))},pe=o=>({label:a("keySets.actions.view"),to:n.config.getViewRoute(o)}),ye=o=>({label:a("keySets.actions.edit"),to:n.config.getEditRoute(o)}),w=e.ref(void 0),D=e.ref(!1),M=e.ref(!1),W=e.ref(""),ue=r.useDeleteUrlBuilder(n.config,$.value),me=o=>{w.value=o,D.value=!0},ge=()=>{D.value=!1},ke=async()=>{var o,s,y;if((o=w.value)!=null&&o.id){M.value=!0;try{await h.delete(ue(w.value.id)),M.value=!1,D.value=!1,i.value++,u("delete:success",w.value)}catch(C){W.value=((y=(s=C.response)==null?void 0:s.data)==null?void 0:y.message)||C.message||a("keySets.errors.delete"),u("error",C)}finally{M.value=!1}}},he=()=>{m.push(n.config.createRoute)};e.watch(_,o=>{var s,y,C;if(o.status===r.FetcherStatus.Error){c.value={title:a("keySets.errors.general")},(C=(y=(s=o.error)==null?void 0:s.response)==null?void 0:y.data)!=null&&C.message&&(c.value.message=o.error.response.data.message),u("error",o.error);return}c.value=null});const U=e.ref({ctaPath:n.config.createRoute,ctaText:void 0,message:`${a("keySets.list.empty_state.description")}${n.config.additionMessageForEmptyState?` ${n.config.additionMessageForEmptyState}`:""}`,title:a("keySets.title")});return e.onBeforeMount(async()=>{await n.canCreate()&&(U.value.title=a("keySets.list.empty_state.title"),U.value.ctaText=a("keySets.actions.create"))}),(o,s)=>{const y=e.resolveComponent("KButton"),C=e.resolveComponent("KCopy"),x=e.resolveComponent("KDropdownItem"),H=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",Y,[e.createVNode(e.unref(r.EntityBaseTable),{"cache-identifier":t.cacheIdentifier,"disable-sorting":N.value,"empty-state-options":U.value,"enable-entity-actions":"","error-message":c.value,fetcher:e.unref(A),"fetcher-cache-key":e.unref(i),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-key-sets-list",query:b.value,"table-headers":e.unref(P),onClearSearchInput:f,"onClick:row":s[4]||(s[4]=d=>fe(d)),onSort:p,onState:e.unref(q)},e.createSlots({"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(r.EntityFilter),{modelValue:b.value,"onUpdate:modelValue":s[0]||(s[0]=d=>b.value=d),config:V.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!t.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createElementVNode("div",v,[I.value?(e.openBlock(),e.createBlock(y,{key:0,appearance:"secondary",class:"open-learning-hub","data-testid":"keys-set-learn-more-button",icon:"",onClick:s[1]||(s[1]=d=>o.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(T.BookIcon),{decorative:""})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(r.PermissionsWrapper),{"auth-function":()=>t.canCreate()},{default:e.withCtx(()=>[e.createVNode(y,{appearance:"primary","data-testid":"toolbar-add-key-set",size:t.useActionOutside?"medium":"large",to:t.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(T.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(a)("keySets.list.toolbar_actions.new_key_set")),1)]),_:1},8,["size","to"])]),_:1},8,["auth-function"])])],8,["disabled"]))]),name:e.withCtx(({rowValue:d})=>[e.createElementVNode("b",null,e.toDisplayString(d??"-"),1)]),tags:e.withCtx(({rowValue:d})=>[e.createVNode(e.unref(r.TableTags),{tags:d},null,8,["tags"])]),id:e.withCtx(({rowValue:d})=>[e.createVNode(C,{text:d,truncate:""},null,8,["text"])]),actions:e.withCtx(({row:d})=>[e.createVNode(H,null,{default:e.withCtx(({copyToClipboard:E})=>[e.createVNode(x,{"data-testid":"action-entity-copy-id",onClick:be=>re(d,E)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("keySets.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(H,null,{default:e.withCtx(({copyToClipboard:E})=>[e.createVNode(x,{"data-testid":"action-entity-copy-json",onClick:be=>le(d,E)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("keySets.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(r.PermissionsWrapper),{"auth-function":()=>t.canRetrieve(d)},{default:e.withCtx(()=>[e.createVNode(x,{"data-testid":"action-entity-view","has-divider":"",item:pe(d.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(r.PermissionsWrapper),{"auth-function":()=>t.canEdit(d)},{default:e.withCtx(()=>[e.createVNode(x,{"data-testid":"action-entity-edit",item:ye(d.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(r.PermissionsWrapper),{"auth-function":()=>t.canDelete(d)},{default:e.withCtx(()=>[e.createVNode(x,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:E=>me(d)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("keySets.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[!e.unref(k)&&l.value?{name:"outside-actions",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!t.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(y,{appearance:"secondary",class:"open-learning-hub","data-testid":"keys-set-learn-more-button",icon:"",onClick:s[2]||(s[2]=d=>o.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(T.BookIcon),{decorative:""})]),_:1})],8,["disabled"]))]),key:"0"}:void 0,!b.value&&t.enableV2EmptyStates&&t.config.app==="konnect"?{name:"empty-state",fn:e.withCtx(()=>{var d;return[e.createVNode(e.unref(r.EntityEmptyState),{"action-button-text":e.unref(a)("keySets.list.empty_state_v2.create_cta"),appearance:"secondary","can-create":()=>t.canCreate(),"data-testid":"key-sets-entity-empty-state",description:e.unref(a)("keySets.list.empty_state_v2.description"),"learn-more":t.config.app==="konnect",title:e.unref(a)("keySets.list.empty_state_v2.title"),"onClick:create":he,"onClick:learnMore":s[3]||(s[3]=E=>o.$emit("click:learn-more"))},e.createSlots({image:e.withCtx(()=>[e.createElementVNode("div",ee,[e.createVNode(e.unref(T.KeyIcon),{color:e.unref(X),size:e.unref(Z)},null,8,["color","size"])])]),_:2},[(d=t.config)!=null&&d.isControlPlaneGroup?{name:"message",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("keySets.list.empty_state_v2.group")),1)]),key:"0"}:void 0]),1032,["action-button-text","can-create","description","learn-more","title"])]}),key:"1"}:void 0]),1032,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers","onState"]),e.createVNode(e.unref(r.EntityDeleteModal),{"action-pending":M.value,description:e.unref(a)("keySets.delete.description"),"entity-name":w.value&&(w.value.name||w.value.id),"entity-type":e.unref(r.EntityTypes).KeySet,error:W.value,title:e.unref(a)("keySets.delete.title"),visible:D.value,onCancel:ge,onProceed:ke},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),J=(t,S)=>{const u=t.__vccOpts||t;for(const[n,a]of S)u[n]=a;return u},ne=J(te,[["__scopeId","data-v-33db902d"]]),oe={class:"kong-ui-entities-key-sets-form"},ae=J(e.defineComponent({__name:"KeySetForm",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string"||!t.cancelRoute)},keySetId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(t,{emit:S}){var _;const u=S,n=t,a=j.useRouter(),{i18n:{t:m}}=F.useI18n(),{getMessageFromError:h}=r.useErrors(),{axiosInstance:k}=r.useAxios((_=n.config)==null?void 0:_.axiosRequestConfig),q=e.computed(()=>B.form[n.config.app].edit),I=e.computed(()=>n.keySetId?r.EntityBaseFormType.Edit:r.EntityBaseFormType.Create),l=e.reactive({fields:{name:"",tags:""},isReadonly:!1,errorMessage:""}),N=e.reactive({name:"",tags:""}),K=e.computed(()=>JSON.stringify(l.fields)!==JSON.stringify(N)&&!!l.fields.name),P=i=>{var f;l.fields.name=(i==null?void 0:i.name)||"",l.fields.tags=((f=i==null?void 0:i.tags)==null?void 0:f.join(", "))||"",Object.assign(N,l.fields)},$=()=>{a.push(n.config.cancelRoute)},b=e.computed(()=>{var f,p;let i=`${n.config.apiBaseUrl}${B.form[n.config.app][I.value]}`;return n.config.app==="konnect"?i=i.replace(/{controlPlaneId}/gi,((f=n.config)==null?void 0:f.controlPlaneId)||""):n.config.app==="kongManager"&&(i=i.replace(/\/{workspace}/gi,(p=n.config)!=null&&p.workspace?`/${n.config.workspace}`:"")),i=i.replace(/{id}/gi,n.keySetId),i}),V=e.computed(()=>{var i,f,p;return{name:l.fields.name,tags:((p=(f=(i=l.fields.tags)==null?void 0:i.split(","))==null?void 0:f.map(c=>String(c||"").trim()))==null?void 0:p.filter(c=>c!==""))||""}}),A=async()=>{var i,f;try{l.isReadonly=!0;let p;if(I.value==="create"?p=await k.post(b.value,V.value):I.value==="edit"&&(p=((i=n.config)==null?void 0:i.app)==="konnect"?await k.put(b.value,V.value):await k.patch(b.value,V.value)),p){const{data:c}=p;l.fields.name=(c==null?void 0:c.name)||"",l.fields.tags=((f=c==null?void 0:c.tags)==null?void 0:f.join(", "))||"",Object.assign(N,l.fields),u("update",p==null?void 0:p.data)}}catch(p){l.errorMessage=h(p),u("error",p)}finally{l.isReadonly=!1}};return(i,f)=>{const p=e.resolveComponent("KInput");return e.openBlock(),e.createElementBlock("div",oe,[e.createVNode(e.unref(r.EntityBaseForm),{"can-submit":K.value,config:t.config,"edit-id":t.keySetId,"entity-type":e.unref(r.SupportedEntityType).KeySet,"error-message":l.errorMessage,"fetch-url":q.value,"form-fields":V.value,"is-readonly":l.isReadonly,onCancel:$,"onFetch:error":f[2]||(f[2]=c=>i.$emit("error",c)),"onFetch:success":P,onLoading:f[3]||(f[3]=c=>i.$emit("loading",c)),onSubmit:A},{default:e.withCtx(()=>[e.createVNode(e.unref(r.EntityFormSection),{description:e.unref(m)("keySets.form.sections.general.description"),"has-divider":"",title:e.unref(m)("keySets.form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:l.fields.name,"onUpdate:modelValue":f[0]||(f[0]=c=>l.fields.name=c),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"key-set-form-name",label:e.unref(m)("keySets.form.fields.name.label"),placeholder:e.unref(m)("keySets.form.fields.name.placeholder"),readonly:l.isReadonly,type:"text"},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode(p,{modelValue:l.fields.tags,"onUpdate:modelValue":f[1]||(f[1]=c=>l.fields.tags=c),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"key-set-form-tags",help:e.unref(m)("keySets.form.fields.tags.help"),label:e.unref(m)("keySets.form.fields.tags.label"),"label-attributes":{info:e.unref(m)("keySets.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(m)("keySets.form.fields.tags.placeholder"),readonly:l.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"])]),_:1},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-a4b01cc5"]]),se={class:"kong-ui-entities-keys-entity-config-card"},ie=e.defineComponent({__name:"KeySetConfigCard",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string"||!t.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(t){const S=t,{i18n:{t:u}}=F.useI18n(),n=e.computed(()=>B.form[S.config.app].edit),a=e.ref({id:{},name:{},last_updated:{},created:{},tags:{tooltip:u("keySets.form.fields.tags.tooltip")}});return(m,h)=>(e.openBlock(),e.createElementBlock("div",se,[e.createVNode(e.unref(r.EntityBaseConfigCard),{config:t.config,"config-card-doc":t.configCardDoc,"config-schema":a.value,"entity-type":e.unref(r.SupportedEntityType).KeySet,"fetch-url":n.value,"hide-title":t.hideTitle,"onFetch:error":h[0]||(h[0]=k=>m.$emit("fetch:error",k)),"onFetch:success":h[1]||(h[1]=k=>m.$emit("fetch:success",k)),onLoading:h[2]||(h[2]=k=>m.$emit("loading",k))},null,8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}});g.KeySetConfigCard=ie,g.KeySetForm=ae,g.KeySetList=ne,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(g,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@kong/icons"),require("vue-router"),require("@kong-ui-public/i18n"),require("@kong-ui-public/entities-shared")):typeof define=="function"&&define.amd?define(["exports","vue","@kong/icons","vue-router","@kong-ui-public/i18n","@kong-ui-public/entities-shared"],e):(g=typeof globalThis<"u"?globalThis:g||self,e(g["kong-ui-public-entities-key-sets"]={},g.Vue,g.KongIcons,g.VueRouter,g["kong-ui-public-i18n"],g["kong-ui-public-entities-shared"]))})(this,function(g,e,B,j,L,i){"use strict";const H={keySets:{title:"Key Sets",list:{toolbar_actions:{new_key_set:"New key set"},table_headers:{name:"Name",id:"ID",tags:"Tags"},empty_state:{title:"Configure a New Key Set",description:"A Key Set object holds a collection of asymmetric key objects. This entity allows to logically group keys by their purpose."},empty_state_v2:{title:"Configure your first key set",group:"Key sets created in gateways within this group will automatically appear here.",description:"Key sets centrally manage asymmetric keys for plugins like OpenID Connect and JWT, simplifying configuration and security across services.",create_cta:"New key set"}},actions:{create:"New Key Set",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",clear:"Clear",view:"View Details"},search:{placeholder:"Filter by exact name or ID"},delete:{title:"Delete a Key Set",description:"Deleting this key set will also delete keys associated. This action cannot be reversed so make sure to check the key set usage before deleting."},errors:{general:"Key sets could not be retrieved",delete:"The key set could not be deleted at this time.",copy:"Failed to copy to clipboard"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},form:{sections:{general:{title:"General Information",description:"General information will help identify and manage this key set."}},fields:{name:{label:"Name",placeholder:"Enter a unique name for this key set"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings for grouping and filtering, separated by commas."}}}}};function Q(){const t=L.createI18n("en-us",H);return{i18n:t,i18nT:L.i18nTComponent(t)}}const F={useI18n:Q},R="/v2/control-planes/{controlPlaneId}/core-entities",O="/{workspace}",T={list:{konnect:`${R}/key-sets`,kongManager:`${O}/key-sets`},form:{konnect:{create:`${R}/key-sets`,edit:`${R}/key-sets/{id}`},kongManager:{create:`${O}/key-sets`,edit:`${O}/key-sets/{id}`}}},X="#00abd2",Z="24px",Y={class:"kong-ui-entities-key-sets-list"},v={class:"button-row"},ee={class:"empty-state-icon-gateway"},te=e.defineComponent({__name:"KeySetList",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||!t.createRoute||!t.getViewRoute||!t.getEditRoute||t.app==="kongManager"&&!t.isExactMatch&&!t.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1}},emits:["error","click:learn-more","copy:success","copy:error","delete:success"],setup(t,{emit:S}){var z;const u=S,n=t,{i18n:{t:a}}=F.useI18n(),m=j.useRouter(),{axiosInstance:h}=i.useAxios((z=n.config)==null?void 0:z.axiosRequestConfig),{hasRecords:k,handleStateChange:q}=i.useTableState(()=>b.value),x=e.computed(()=>k.value&&n.config.app==="konnect"),c=e.computed(()=>n.config.app!=="kongManager"||!!n.config.disableSorting),V={name:{label:a("keySets.list.table_headers.name"),searchable:!0,sortable:!0,hidable:!1},tags:{label:a("keySets.list.table_headers.tags")},id:{label:a("keySets.list.table_headers.id"),sortable:!0}},P=V,$=e.computed(()=>{var s,y;let o=`${n.config.apiBaseUrl}${T.list[n.config.app]}`;return n.config.app==="konnect"?o=o.replace(/{controlPlaneId}/gi,((s=n.config)==null?void 0:s.controlPlaneId)||""):n.config.app==="kongManager"&&(o=o.replace(/\/{workspace}/gi,(y=n.config)!=null&&y.workspace?`/${n.config.workspace}`:"")),o}),b=e.ref(""),E=e.computed(()=>{const o=n.config.app==="konnect"||n.config.isExactMatch;if(o)return{isExactMatch:o,placeholder:a("keySets.search.placeholder")};const s={name:V.name};return{isExactMatch:o,fields:s,schema:n.config.filterSchema}}),{fetcher:I,fetcherState:A,fetcherCacheKey:N}=i.useFetcher(e.computed(()=>({...n.config,cacheIdentifier:n.cacheIdentifier})),$),r=()=>{b.value=""},d=()=>{N.value++},l=e.ref(null),p=async(o,s)=>{const y=o.id;if(!await s(y)){ce(o,"id");return}le(o,"id")},ie=async(o,s)=>{const y=JSON.stringify(o);if(!await s(y)){u("copy:error",{entity:o,message:a("keySets.errors.copy")});return}u("copy:success",{entity:o,message:a("keySets.copy.success_brief")})},le=(o,s)=>{u("copy:success",{entity:o,field:s,message:a("keySets.copy.success",{val:o[s]})})},ce=(o,s)=>{u("copy:error",{entity:o,field:s,message:a("keySets.errors.copy")})},de=async o=>{var y;await((y=n.canRetrieve)==null?void 0:y.call(n,o))&&m.push(n.config.getViewRoute(o.id))},fe=o=>({label:a("keySets.actions.view"),to:n.config.getViewRoute(o)}),pe=o=>({label:a("keySets.actions.edit"),to:n.config.getEditRoute(o)}),w=e.ref(void 0),D=e.ref(!1),M=e.ref(!1),W=e.ref(""),ye=i.useDeleteUrlBuilder(n.config,$.value),ue=o=>{w.value=o,D.value=!0},me=()=>{D.value=!1},ge=async()=>{var o,s,y;if((o=w.value)!=null&&o.id){M.value=!0;try{await h.delete(ye(w.value.id)),M.value=!1,D.value=!1,N.value++,u("delete:success",w.value)}catch(C){W.value=((y=(s=C.response)==null?void 0:s.data)==null?void 0:y.message)||C.message||a("keySets.errors.delete"),u("error",C)}finally{M.value=!1}}},ke=()=>{m.push(n.config.createRoute)};e.watch(A,o=>{var s,y,C;if(o.status===i.FetcherStatus.Error){l.value={title:a("keySets.errors.general")},(C=(y=(s=o.error)==null?void 0:s.response)==null?void 0:y.data)!=null&&C.message&&(l.value.message=o.error.response.data.message),u("error",o.error);return}l.value=null});const U=e.ref({ctaPath:n.config.createRoute,ctaText:void 0,message:`${a("keySets.list.empty_state.description")}${n.config.additionMessageForEmptyState?` ${n.config.additionMessageForEmptyState}`:""}`,title:a("keySets.title")});return e.onBeforeMount(async()=>{await n.canCreate()&&(U.value.title=a("keySets.list.empty_state.title"),U.value.ctaText=a("keySets.actions.create"))}),(o,s)=>{const y=e.resolveComponent("KButton"),C=e.resolveComponent("KCopy"),_=e.resolveComponent("KDropdownItem"),G=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",Y,[e.createVNode(e.unref(i.EntityBaseTable),{"cache-identifier":t.cacheIdentifier,"disable-sorting":c.value,"empty-state-options":U.value,"enable-entity-actions":"","error-message":l.value,fetcher:e.unref(I),"fetcher-cache-key":e.unref(N),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-key-sets-list",query:b.value,"table-headers":e.unref(P),onClearSearchInput:r,"onClick:row":s[3]||(s[3]=f=>de(f)),onSort:d,onState:e.unref(q)},e.createSlots({"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(i.EntityFilter),{modelValue:b.value,"onUpdate:modelValue":s[0]||(s[0]=f=>b.value=f),config:E.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!t.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createElementVNode("div",v,[x.value?(e.openBlock(),e.createBlock(y,{key:0,appearance:"secondary",class:"open-learning-hub","data-testid":"keys-set-learn-more-button",icon:"",onClick:s[1]||(s[1]=f=>o.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(B.BookIcon),{decorative:""})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(i.PermissionsWrapper),{"auth-function":()=>t.canCreate()},{default:e.withCtx(()=>[e.createVNode(y,{appearance:"primary","data-testid":"toolbar-add-key-set",size:t.useActionOutside?"medium":"large",to:t.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(B.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(a)("keySets.list.toolbar_actions.new_key_set")),1)]),_:1},8,["size","to"])]),_:1},8,["auth-function"])])],8,["disabled"]))]),name:e.withCtx(({rowValue:f})=>[e.createElementVNode("b",null,e.toDisplayString(f??"-"),1)]),tags:e.withCtx(({rowValue:f})=>[e.createVNode(e.unref(i.TableTags),{tags:f},null,8,["tags"])]),id:e.withCtx(({rowValue:f})=>[e.createVNode(C,{text:f,truncate:""},null,8,["text"])]),actions:e.withCtx(({row:f})=>[e.createVNode(G,null,{default:e.withCtx(({copyToClipboard:K})=>[e.createVNode(_,{"data-testid":"action-entity-copy-id",onClick:he=>p(f,K)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("keySets.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(G,null,{default:e.withCtx(({copyToClipboard:K})=>[e.createVNode(_,{"data-testid":"action-entity-copy-json",onClick:he=>ie(f,K)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("keySets.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(i.PermissionsWrapper),{"auth-function":()=>t.canRetrieve(f)},{default:e.withCtx(()=>[e.createVNode(_,{"data-testid":"action-entity-view","has-divider":"",item:fe(f.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(i.PermissionsWrapper),{"auth-function":()=>t.canEdit(f)},{default:e.withCtx(()=>[e.createVNode(_,{"data-testid":"action-entity-edit",item:pe(f.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(i.PermissionsWrapper),{"auth-function":()=>t.canDelete(f)},{default:e.withCtx(()=>[e.createVNode(_,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:K=>ue(f)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("keySets.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[!b.value&&t.config.app==="konnect"?{name:"empty-state",fn:e.withCtx(()=>{var f;return[e.createVNode(e.unref(i.EntityEmptyState),{"action-button-text":e.unref(a)("keySets.list.empty_state_v2.create_cta"),appearance:"secondary","can-create":()=>t.canCreate(),"data-testid":"key-sets-entity-empty-state",description:e.unref(a)("keySets.list.empty_state_v2.description"),"learn-more":t.config.app==="konnect",title:e.unref(a)("keySets.list.empty_state_v2.title"),"onClick:create":ke,"onClick:learnMore":s[2]||(s[2]=K=>o.$emit("click:learn-more"))},e.createSlots({image:e.withCtx(()=>[e.createElementVNode("div",ee,[e.createVNode(e.unref(B.KeyIcon),{color:e.unref(X),size:e.unref(Z)},null,8,["color","size"])])]),_:2},[(f=t.config)!=null&&f.isControlPlaneGroup?{name:"message",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("keySets.list.empty_state_v2.group")),1)]),key:"0"}:void 0]),1032,["action-button-text","can-create","description","learn-more","title"])]}),key:"0"}:void 0]),1032,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers","onState"]),e.createVNode(e.unref(i.EntityDeleteModal),{"action-pending":M.value,description:e.unref(a)("keySets.delete.description"),"entity-name":w.value&&(w.value.name||w.value.id),"entity-type":e.unref(i.EntityTypes).KeySet,error:W.value,title:e.unref(a)("keySets.delete.title"),visible:D.value,onCancel:me,onProceed:ge},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),J=(t,S)=>{const u=t.__vccOpts||t;for(const[n,a]of S)u[n]=a;return u},ne=J(te,[["__scopeId","data-v-aeb4b6e1"]]),oe={class:"kong-ui-entities-key-sets-form"},ae=J(e.defineComponent({__name:"KeySetForm",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string"||!t.cancelRoute)},keySetId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(t,{emit:S}){var N;const u=S,n=t,a=j.useRouter(),{i18n:{t:m}}=F.useI18n(),{getMessageFromError:h}=i.useErrors(),{axiosInstance:k}=i.useAxios((N=n.config)==null?void 0:N.axiosRequestConfig),q=e.computed(()=>T.form[n.config.app].edit),x=e.computed(()=>n.keySetId?i.EntityBaseFormType.Edit:i.EntityBaseFormType.Create),c=e.reactive({fields:{name:"",tags:""},isReadonly:!1,errorMessage:""}),V=e.reactive({name:"",tags:""}),P=e.computed(()=>JSON.stringify(c.fields)!==JSON.stringify(V)&&!!c.fields.name),$=r=>{var d;c.fields.name=(r==null?void 0:r.name)||"",c.fields.tags=((d=r==null?void 0:r.tags)==null?void 0:d.join(", "))||"",Object.assign(V,c.fields)},b=()=>{a.push(n.config.cancelRoute)},E=e.computed(()=>{var d,l;let r=`${n.config.apiBaseUrl}${T.form[n.config.app][x.value]}`;return n.config.app==="konnect"?r=r.replace(/{controlPlaneId}/gi,((d=n.config)==null?void 0:d.controlPlaneId)||""):n.config.app==="kongManager"&&(r=r.replace(/\/{workspace}/gi,(l=n.config)!=null&&l.workspace?`/${n.config.workspace}`:"")),r=r.replace(/{id}/gi,n.keySetId),r}),I=e.computed(()=>{var r,d,l;return{name:c.fields.name,tags:((l=(d=(r=c.fields.tags)==null?void 0:r.split(","))==null?void 0:d.map(p=>String(p||"").trim()))==null?void 0:l.filter(p=>p!==""))||""}}),A=async()=>{var r,d;try{c.isReadonly=!0;let l;if(x.value==="create"?l=await k.post(E.value,I.value):x.value==="edit"&&(l=((r=n.config)==null?void 0:r.app)==="konnect"?await k.put(E.value,I.value):await k.patch(E.value,I.value)),l){const{data:p}=l;c.fields.name=(p==null?void 0:p.name)||"",c.fields.tags=((d=p==null?void 0:p.tags)==null?void 0:d.join(", "))||"",Object.assign(V,c.fields),u("update",l==null?void 0:l.data)}}catch(l){c.errorMessage=h(l),u("error",l)}finally{c.isReadonly=!1}};return(r,d)=>{const l=e.resolveComponent("KInput");return e.openBlock(),e.createElementBlock("div",oe,[e.createVNode(e.unref(i.EntityBaseForm),{"can-submit":P.value,config:t.config,"edit-id":t.keySetId,"entity-type":e.unref(i.SupportedEntityType).KeySet,"error-message":c.errorMessage,"fetch-url":q.value,"form-fields":I.value,"is-readonly":c.isReadonly,onCancel:b,"onFetch:error":d[2]||(d[2]=p=>r.$emit("error",p)),"onFetch:success":$,onLoading:d[3]||(d[3]=p=>r.$emit("loading",p)),onSubmit:A},{default:e.withCtx(()=>[e.createVNode(e.unref(i.EntityFormSection),{description:e.unref(m)("keySets.form.sections.general.description"),"has-divider":"",title:e.unref(m)("keySets.form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(l,{modelValue:c.fields.name,"onUpdate:modelValue":d[0]||(d[0]=p=>c.fields.name=p),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"key-set-form-name",label:e.unref(m)("keySets.form.fields.name.label"),placeholder:e.unref(m)("keySets.form.fields.name.placeholder"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode(l,{modelValue:c.fields.tags,"onUpdate:modelValue":d[1]||(d[1]=p=>c.fields.tags=p),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"key-set-form-tags",help:e.unref(m)("keySets.form.fields.tags.help"),label:e.unref(m)("keySets.form.fields.tags.label"),"label-attributes":{info:e.unref(m)("keySets.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(m)("keySets.form.fields.tags.placeholder"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"])]),_:1},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-a4b01cc5"]]),se={class:"kong-ui-entities-keys-entity-config-card"},re=e.defineComponent({__name:"KeySetConfigCard",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string"||!t.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(t){const S=t,{i18n:{t:u}}=F.useI18n(),n=e.computed(()=>T.form[S.config.app].edit),a=e.ref({id:{},name:{},last_updated:{},created:{},tags:{tooltip:u("keySets.form.fields.tags.tooltip")}});return(m,h)=>(e.openBlock(),e.createElementBlock("div",se,[e.createVNode(e.unref(i.EntityBaseConfigCard),{config:t.config,"config-card-doc":t.configCardDoc,"config-schema":a.value,"entity-type":e.unref(i.SupportedEntityType).KeySet,"fetch-url":n.value,"hide-title":t.hideTitle,"onFetch:error":h[0]||(h[0]=k=>m.$emit("fetch:error",k)),"onFetch:success":h[1]||(h[1]=k=>m.$emit("fetch:success",k)),onLoading:h[2]||(h[2]=k=>m.$emit("loading",k))},null,8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}});g.KeySetConfigCard=re,g.KeySetForm=ae,g.KeySetList=ne,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.config-card-fieldset[data-v-f7096c33]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-f7096c33]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-2feb8c2e] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-5f9aa0e8]{align-items:center;border-bottom:var(--2f90d7f7);box-sizing:border-box;display:var(--668a792a);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-5f9aa0e8]{box-sizing:border-box;padding-right:16px;width:var(--5bc9ad14)}.config-card-details-row .config-card-details-label label[data-v-5f9aa0e8]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-5f9aa0e8]{line-height:initial;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-label label .k-popover[data-v-5f9aa0e8]{min-width:0}.config-card-details-row .config-card-details-value[data-v-5f9aa0e8]{box-sizing:border-box;width:var(--5bc5215e)}.config-card-details-row .config-card-details-value .truncated[data-v-5f9aa0e8]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-5f9aa0e8]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-5f9aa0e8] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-5f9aa0e8]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-5f9aa0e8]{margin-right:4px}.config-card-details-row[data-v-5f9aa0e8] .k-label{margin-bottom:0}.config-card-details-row[data-v-5f9aa0e8] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-5f9aa0e8] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 8px 12px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0;padding-top:0}.json-endpoint .k-code-block .code-block-secondary-actions{margin-top:0!important}.json-endpoint code{direction:rtl;max-width:var(--eca0976a);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d67757a9]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-9b9ea6f9]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-9b9ea6f9]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-9b9ea6f9]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-9b9ea6f9] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-9b9ea6f9]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-612b1eac]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form[data-v-612b1eac] .k-slideout-title{color:#000933!important;font-size:24px!important;font-weight:700!important;line-height:32px!important;margin-bottom:16px!important}.kong-ui-entity-base-form[data-v-612b1eac] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-612b1eac] .tab-item>div.tab-link.has-panels{color:#6c7489!important;font-size:14px!important;font-weight:700!important;line-height:24px!important}.kong-ui-entity-base-form[data-v-612b1eac] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.form-actions[data-v-612b1eac]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.form-actions[data-v-612b1eac] .k-button:last-of-type,.form-actions[data-v-612b1eac] .k-button:nth-last-of-type(2){margin-left:16px}.form-actions-reverted[data-v-612b1eac]{direction:rtl}.content-wrapper[data-v-a3a65cac] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-d86d3e31]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-d86d3e31]{margin-left:auto}.kong-ui-entity-base-table .hidden[data-v-d86d3e31]{display:none}.kong-ui-entity-base-table[data-v-d86d3e31] .empty-state-icon-gateway{background-color:#ecfcff;border-radius:4px;padding:8px}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-084f7978]{width:100%}.kong-ui-entity-filter-clear[data-v-084f7978]{cursor:pointer}.kong-ui-entity-filter[data-v-084f7978]{display:flex;position:relative}.kong-ui-entity-filter[data-v-084f7978] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-084f7978] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-084f7978]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-084f7978]{background-color:#fff;border:1px solid #afb7c5;border-radius:4px;box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;padding:8px 0 12px;position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-084f7978]{border-bottom:1px solid #e0e4ea;color:#6c7489;font-size:12px;font-weight:400;line-height:16px;list-style:none;margin:0 20px;padding:16px 0;position:relative;white-space:nowrap}.menu-item-title[data-v-084f7978]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-084f7978]{color:#232633}.menu-item-expand-icon[data-v-084f7978]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-084f7978]{transform:rotate(180deg)}.menu-item-indicator[data-v-084f7978]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-084f7978]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-084f7978] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-084f7978] .k-input{width:100%}.menu-item-body[data-v-084f7978] .k-select-input .input{font-size:12px}.menu-item-body[data-v-084f7978] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-084f7978]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-084f7978]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-084f7978]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.ff-form-section .header[data-v-cb6d2e95]{align-items:flex-start;display:flex;gap:8px}.ff-form-section .step[data-v-cb6d2e95]{align-items:center;background:#fff;border:1px solid #afb7c5;border-radius:100px;display:flex;flex:0 0 auto;height:32px;justify-content:center;padding:4px;width:32px}.ff-form-section .header-content[data-v-cb6d2e95]{align-items:flex-start;display:flex;flex:1 1 auto;flex-direction:column;gap:8px;padding-top:4px}.ff-form-section .header-title[data-v-cb6d2e95]{color:#000933;font-size:18px;font-weight:700;line-height:24px;margin:0}.ff-form-section .header-description[data-v-cb6d2e95]{color:#52596e;font-size:14px;line-height:20px;margin:0}.ff-form-section .header-extra[data-v-cb6d2e95]{align-items:center;display:flex;flex:0 0 auto;gap:8px;justify-content:flex-end}.ff-form-section .content[data-v-cb6d2e95]{background:#f9fafb;border:1px solid #e0e4ea;border-radius:6px;display:flex;flex-direction:column;gap:20px;margin-left:16px;margin-top:20px;padding:20px 24px}.kong-ui-public-entity-link[data-v-96efdfa5]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-96efdfa5]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-96efdfa5]{display:flex;flex:1}.kong-ui-public-entity-link .entity-link[data-v-96efdfa5] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-96efdfa5]{display:inline-block;font-weight:400;max-width:90%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-96efdfa5]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-96efdfa5]{margin-left:2px}.kong-ui-public-entity-empty-state[data-v-b6376b66]{align-items:center;background-color:#fff;box-sizing:border-box;display:flex;flex-direction:column;font-family:Inter,Roboto,Helvetica,sans-serif;gap:24px;padding:64px 0;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state[data-v-b6376b66]{padding:64px 96px}}.kong-ui-public-entity-empty-state .empty-state-image[data-v-b6376b66]{margin-bottom:8px}.kong-ui-public-entity-empty-state .entity-empty-state-content[data-v-b6376b66]{align-items:center;display:flex;flex-direction:column;gap:8px;text-align:center;width:100%}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1[data-v-b6376b66]{align-items:center;color:#000933;display:flex;font-size:24px;font-weight:700;gap:8px;line-height:32px;margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1.secondary[data-v-b6376b66]{font-size:18px}.kong-ui-public-entity-empty-state .entity-empty-state-description[data-v-b6376b66],.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-b6376b66]{color:#52596e;font-size:14px;font-weight:400;line-height:20px;max-width:640px}.kong-ui-public-entity-empty-state .entity-empty-state-description p[data-v-b6376b66],.kong-ui-public-entity-empty-state .entity-empty-state-pricing p[data-v-b6376b66]{margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-b6376b66]{margin-top:16px}.kong-ui-public-entity-empty-state .entity-empty-state-message[data-v-b6376b66]{color:#52596e}.kong-ui-public-entity-empty-state .entity-empty-state-action[data-v-b6376b66]{align-items:center;display:flex;gap:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-b6376b66]{display:flex;flex-wrap:wrap;gap:16px;justify-content:space-around;margin-top:8px;width:312px}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-b6376b66]{width:640px}}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-b6376b66]{background-color:#f9fafb;border:1px solid #e0e4ea;border-radius:6px;color:#afb7c5;gap:8px;height:160px;padding:20px;width:312px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-b6376b66]{color:#3a3f51;display:flex;margin-bottom:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-b6376b66] .kui-icon{height:20px!important;width:20px!important}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-b6376b66] .card-title{font-size:14px;font-weight:600}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-b6376b66] .card-content{-webkit-box-orient:vertical;color:#6c7489;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;overflow:hidden}.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-b6376b66]{border-top:1px solid #e0e4ea;display:flex;flex-direction:column;gap:16px;padding-top:48px;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-b6376b66]{width:640px}}.button-row[data-v-33db902d]{align-items:center;display:flex;gap:12px}.kong-ui-entities-key-sets-list[data-v-33db902d]{width:100%}.kong-ui-entities-key-sets-list .kong-ui-entity-filter-input[data-v-33db902d]{margin-right:12px}.kong-ui-entities-key-sets-form[data-v-a4b01cc5]{width:100%}
|
|
1
|
+
.config-card-fieldset[data-v-f7096c33]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-f7096c33]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-2feb8c2e] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-5f9aa0e8]{align-items:center;border-bottom:var(--2f90d7f7);box-sizing:border-box;display:var(--668a792a);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-5f9aa0e8]{box-sizing:border-box;padding-right:16px;width:var(--5bc9ad14)}.config-card-details-row .config-card-details-label label[data-v-5f9aa0e8]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-5f9aa0e8]{line-height:initial;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-label label .k-popover[data-v-5f9aa0e8]{min-width:0}.config-card-details-row .config-card-details-value[data-v-5f9aa0e8]{box-sizing:border-box;width:var(--5bc5215e)}.config-card-details-row .config-card-details-value .truncated[data-v-5f9aa0e8]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-5f9aa0e8]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-5f9aa0e8] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-5f9aa0e8]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-5f9aa0e8]{margin-right:4px}.config-card-details-row[data-v-5f9aa0e8] .k-label{margin-bottom:0}.config-card-details-row[data-v-5f9aa0e8] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-5f9aa0e8] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 8px 12px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0;padding-top:0}.json-endpoint .k-code-block .code-block-secondary-actions{margin-top:0!important}.json-endpoint code{direction:rtl;max-width:var(--eca0976a);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d67757a9]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-9b9ea6f9]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-9b9ea6f9]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-9b9ea6f9]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-9b9ea6f9] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-9b9ea6f9]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-612b1eac]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form[data-v-612b1eac] .k-slideout-title{color:#000933!important;font-size:24px!important;font-weight:700!important;line-height:32px!important;margin-bottom:16px!important}.kong-ui-entity-base-form[data-v-612b1eac] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-612b1eac] .tab-item>div.tab-link.has-panels{color:#6c7489!important;font-size:14px!important;font-weight:700!important;line-height:24px!important}.kong-ui-entity-base-form[data-v-612b1eac] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.form-actions[data-v-612b1eac]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.form-actions[data-v-612b1eac] .k-button:last-of-type,.form-actions[data-v-612b1eac] .k-button:nth-last-of-type(2){margin-left:16px}.form-actions-reverted[data-v-612b1eac]{direction:rtl}.content-wrapper[data-v-a3a65cac] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-d86d3e31]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-d86d3e31]{margin-left:auto}.kong-ui-entity-base-table .hidden[data-v-d86d3e31]{display:none}.kong-ui-entity-base-table[data-v-d86d3e31] .empty-state-icon-gateway{background-color:#ecfcff;border-radius:4px;padding:8px}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-084f7978]{width:100%}.kong-ui-entity-filter-clear[data-v-084f7978]{cursor:pointer}.kong-ui-entity-filter[data-v-084f7978]{display:flex;position:relative}.kong-ui-entity-filter[data-v-084f7978] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-084f7978] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-084f7978]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-084f7978]{background-color:#fff;border:1px solid #afb7c5;border-radius:4px;box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;padding:8px 0 12px;position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-084f7978]{border-bottom:1px solid #e0e4ea;color:#6c7489;font-size:12px;font-weight:400;line-height:16px;list-style:none;margin:0 20px;padding:16px 0;position:relative;white-space:nowrap}.menu-item-title[data-v-084f7978]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-084f7978]{color:#232633}.menu-item-expand-icon[data-v-084f7978]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-084f7978]{transform:rotate(180deg)}.menu-item-indicator[data-v-084f7978]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-084f7978]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-084f7978] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-084f7978] .k-input{width:100%}.menu-item-body[data-v-084f7978] .k-select-input .input{font-size:12px}.menu-item-body[data-v-084f7978] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-084f7978]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-084f7978]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-084f7978]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.ff-form-section .header[data-v-cb6d2e95]{align-items:flex-start;display:flex;gap:8px}.ff-form-section .step[data-v-cb6d2e95]{align-items:center;background:#fff;border:1px solid #afb7c5;border-radius:100px;display:flex;flex:0 0 auto;height:32px;justify-content:center;padding:4px;width:32px}.ff-form-section .header-content[data-v-cb6d2e95]{align-items:flex-start;display:flex;flex:1 1 auto;flex-direction:column;gap:8px;padding-top:4px}.ff-form-section .header-title[data-v-cb6d2e95]{color:#000933;font-size:18px;font-weight:700;line-height:24px;margin:0}.ff-form-section .header-description[data-v-cb6d2e95]{color:#52596e;font-size:14px;line-height:20px;margin:0}.ff-form-section .header-extra[data-v-cb6d2e95]{align-items:center;display:flex;flex:0 0 auto;gap:8px;justify-content:flex-end}.ff-form-section .content[data-v-cb6d2e95]{background:#f9fafb;border:1px solid #e0e4ea;border-radius:6px;display:flex;flex-direction:column;gap:20px;margin-left:16px;margin-top:20px;padding:20px 24px}.kong-ui-public-entity-link[data-v-96efdfa5]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-96efdfa5]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-96efdfa5]{display:flex;flex:1}.kong-ui-public-entity-link .entity-link[data-v-96efdfa5] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-96efdfa5]{display:inline-block;font-weight:400;max-width:90%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-96efdfa5]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-96efdfa5]{margin-left:2px}.kong-ui-public-entity-empty-state[data-v-b6376b66]{align-items:center;background-color:#fff;box-sizing:border-box;display:flex;flex-direction:column;font-family:Inter,Roboto,Helvetica,sans-serif;gap:24px;padding:64px 0;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state[data-v-b6376b66]{padding:64px 96px}}.kong-ui-public-entity-empty-state .empty-state-image[data-v-b6376b66]{margin-bottom:8px}.kong-ui-public-entity-empty-state .entity-empty-state-content[data-v-b6376b66]{align-items:center;display:flex;flex-direction:column;gap:8px;text-align:center;width:100%}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1[data-v-b6376b66]{align-items:center;color:#000933;display:flex;font-size:24px;font-weight:700;gap:8px;line-height:32px;margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1.secondary[data-v-b6376b66]{font-size:18px}.kong-ui-public-entity-empty-state .entity-empty-state-description[data-v-b6376b66],.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-b6376b66]{color:#52596e;font-size:14px;font-weight:400;line-height:20px;max-width:640px}.kong-ui-public-entity-empty-state .entity-empty-state-description p[data-v-b6376b66],.kong-ui-public-entity-empty-state .entity-empty-state-pricing p[data-v-b6376b66]{margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-b6376b66]{margin-top:16px}.kong-ui-public-entity-empty-state .entity-empty-state-message[data-v-b6376b66]{color:#52596e}.kong-ui-public-entity-empty-state .entity-empty-state-action[data-v-b6376b66]{align-items:center;display:flex;gap:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-b6376b66]{display:flex;flex-wrap:wrap;gap:16px;justify-content:space-around;margin-top:8px;width:312px}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-b6376b66]{width:640px}}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-b6376b66]{background-color:#f9fafb;border:1px solid #e0e4ea;border-radius:6px;color:#afb7c5;gap:8px;height:160px;padding:20px;width:312px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-b6376b66]{color:#3a3f51;display:flex;margin-bottom:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-b6376b66] .kui-icon{height:20px!important;width:20px!important}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-b6376b66] .card-title{font-size:14px;font-weight:600}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-b6376b66] .card-content{-webkit-box-orient:vertical;color:#6c7489;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;overflow:hidden}.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-b6376b66]{border-top:1px solid #e0e4ea;display:flex;flex-direction:column;gap:16px;padding-top:48px;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-b6376b66]{width:640px}}.button-row[data-v-aeb4b6e1]{align-items:center;display:flex;gap:12px}.kong-ui-entities-key-sets-list[data-v-aeb4b6e1]{width:100%}.kong-ui-entities-key-sets-list .kong-ui-entity-filter-input[data-v-aeb4b6e1]{margin-right:12px}.kong-ui-entities-key-sets-form[data-v-a4b01cc5]{width:100%}
|
|
@@ -42,14 +42,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
42
42
|
type: BooleanConstructor;
|
|
43
43
|
default: boolean;
|
|
44
44
|
};
|
|
45
|
-
/**
|
|
46
|
-
* Enables the new empty state design, this prop can be removed when
|
|
47
|
-
* the khcp-14756-empty-states-m2 FF is removed.
|
|
48
|
-
*/
|
|
49
|
-
enableV2EmptyStates: {
|
|
50
|
-
type: BooleanConstructor;
|
|
51
|
-
default: boolean;
|
|
52
|
-
};
|
|
53
45
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
54
46
|
error: (error: AxiosError<unknown, any>) => any;
|
|
55
47
|
"click:learn-more": () => any;
|
|
@@ -96,14 +88,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
96
88
|
type: BooleanConstructor;
|
|
97
89
|
default: boolean;
|
|
98
90
|
};
|
|
99
|
-
/**
|
|
100
|
-
* Enables the new empty state design, this prop can be removed when
|
|
101
|
-
* the khcp-14756-empty-states-m2 FF is removed.
|
|
102
|
-
*/
|
|
103
|
-
enableV2EmptyStates: {
|
|
104
|
-
type: BooleanConstructor;
|
|
105
|
-
default: boolean;
|
|
106
|
-
};
|
|
107
91
|
}>> & Readonly<{
|
|
108
92
|
onError?: ((error: AxiosError<unknown, any>) => any) | undefined;
|
|
109
93
|
"onClick:learn-more"?: (() => any) | undefined;
|
|
@@ -117,7 +101,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
117
101
|
canEdit: (row: EntityRow) => boolean | Promise<boolean>;
|
|
118
102
|
canRetrieve: (row: EntityRow) => boolean | Promise<boolean>;
|
|
119
103
|
useActionOutside: boolean;
|
|
120
|
-
enableV2EmptyStates: boolean;
|
|
121
104
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
122
105
|
export default _default;
|
|
123
106
|
//# sourceMappingURL=KeySetList.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeySetList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/KeySetList.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"KeySetList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/KeySetList.vue"],"names":[],"mappings":"AAuhBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAEnC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAoBvC,OAAO,KAAK,EACV,2BAA2B,EAC3B,uBAAuB,EACvB,SAAS,EACT,gBAAgB,EACjB,MAAM,UAAU,CAAA;AASjB,OAAO,gDAAgD,CAAA;;IA85BrD,oHAAoH;;cAElG,QAAQ,CAAC,uBAAuB,GAAG,2BAA2B,CAAC;;4BAE3D,uBAAuB,GAAG,2BAA2B,KAAG,OAAO;;;;;;IAYrF,yHAAyH;;cAErG,QAAQ,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI9D,2HAA2H;;cAEvG,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,yHAAyH;;cAErG,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,4IAA4I;;cAExH,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,iHAAiH;;;;;;;;;;;;IAxCjH,oHAAoH;;cAElG,QAAQ,CAAC,uBAAuB,GAAG,2BAA2B,CAAC;;4BAE3D,uBAAuB,GAAG,2BAA2B,KAAG,OAAO;;;;;;IAYrF,yHAAyH;;cAErG,QAAQ,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI9D,2HAA2H;;cAEvG,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,yHAAyH;;cAErG,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,4IAA4I;;cAExH,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,iHAAiH;;;;;;;;;;;;;qBAtB9E,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;qBAM1B,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;mBAMxC,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;uBAMxC,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;;;AAjD7E,wBA2DG"}
|