@kong-ui-public/entities-key-sets 3.5.54 → 3.5.55
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 G, ref as
|
|
2
|
-
import { AddIcon as
|
|
3
|
-
import { useRouter as
|
|
4
|
-
import { createI18n as
|
|
5
|
-
import { useAxios as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as G, ref as v, computed as S, watch as pe, onBeforeMount as ye, resolveComponent as R, openBlock as O, createElementBlock as W, createVNode as l, unref as o, withCtx as p, createBlock as me, Teleport as ge, createTextVNode as V, toDisplayString as D, createElementVNode as ke, reactive as Z } from "vue";
|
|
2
|
+
import { AddIcon as he } from "@kong/icons";
|
|
3
|
+
import { useRouter as te } from "vue-router";
|
|
4
|
+
import { createI18n as ve, i18nTComponent as Se } from "@kong-ui-public/i18n";
|
|
5
|
+
import { useAxios as ae, useFetcher as be, useDeleteUrlBuilder as Ce, FetcherStatus as Ie, EntityBaseTable as we, EntityFilter as Ee, PermissionsWrapper as q, TableTags as Me, EntityDeleteModal as Ke, EntityTypes as $e, useErrors as Fe, EntityBaseFormType as ee, EntityBaseForm as _e, SupportedEntityType as oe, EntityFormSection as De, EntityBaseConfigCard as Re } from "@kong-ui-public/entities-shared";
|
|
6
|
+
const Te = {
|
|
7
7
|
title: "Key Sets",
|
|
8
8
|
list: {
|
|
9
9
|
toolbar_actions: {
|
|
@@ -64,20 +64,20 @@ const qe = {
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
},
|
|
68
|
-
keySets:
|
|
67
|
+
}, Be = {
|
|
68
|
+
keySets: Te
|
|
69
69
|
};
|
|
70
|
-
function
|
|
71
|
-
const e =
|
|
70
|
+
function xe() {
|
|
71
|
+
const e = ve("en-us", Be);
|
|
72
72
|
return {
|
|
73
73
|
i18n: e,
|
|
74
|
-
i18nT:
|
|
74
|
+
i18nT: Se(e)
|
|
75
75
|
// Translation component <i18n-t>
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
78
|
const H = {
|
|
79
|
-
useI18n:
|
|
80
|
-
}, L = "/v2/control-planes/{controlPlaneId}/core-entities", z = "/{workspace}",
|
|
79
|
+
useI18n: xe
|
|
80
|
+
}, L = "/v2/control-planes/{controlPlaneId}/core-entities", z = "/{workspace}", P = {
|
|
81
81
|
list: {
|
|
82
82
|
konnect: `${L}/key-sets`,
|
|
83
83
|
kongManager: `${z}/key-sets`
|
|
@@ -92,7 +92,7 @@ const H = {
|
|
|
92
92
|
edit: `${z}/key-sets/{id}`
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
},
|
|
95
|
+
}, Ve = { class: "kong-ui-entities-key-sets-list" }, qe = /* @__PURE__ */ G({
|
|
96
96
|
__name: "KeySetList",
|
|
97
97
|
props: {
|
|
98
98
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -137,139 +137,138 @@ const H = {
|
|
|
137
137
|
}
|
|
138
138
|
},
|
|
139
139
|
emits: ["error", "copy:success", "copy:error", "delete:success"],
|
|
140
|
-
setup(e, { emit:
|
|
141
|
-
var
|
|
142
|
-
const m =
|
|
140
|
+
setup(e, { emit: C }) {
|
|
141
|
+
var X;
|
|
142
|
+
const m = C, t = e, { i18n: { t: s } } = H.useI18n(), g = te(), { axiosInstance: h } = ae((X = t.config) == null ? void 0 : X.axiosRequestConfig), k = v(1), U = S(() => t.config.app !== "kongManager" || !!t.config.disableSorting), E = {
|
|
143
143
|
// the Name column is non-hidable
|
|
144
144
|
name: { label: s("keySets.list.table_headers.name"), searchable: !0, sortable: !0, hidable: !1 },
|
|
145
145
|
tags: { label: s("keySets.list.table_headers.tags") },
|
|
146
146
|
id: { label: s("keySets.list.table_headers.id"), sortable: !0 }
|
|
147
|
-
}, r =
|
|
147
|
+
}, r = E, M = S(() => {
|
|
148
148
|
var i, y;
|
|
149
|
-
let
|
|
150
|
-
return
|
|
151
|
-
}),
|
|
152
|
-
const
|
|
153
|
-
if (
|
|
149
|
+
let a = `${t.config.apiBaseUrl}${P.list[t.config.app]}`;
|
|
150
|
+
return t.config.app === "konnect" ? a = a.replace(/{controlPlaneId}/gi, ((i = t.config) == null ? void 0 : i.controlPlaneId) || "") : t.config.app === "kongManager" && (a = a.replace(/\/{workspace}/gi, (y = t.config) != null && y.workspace ? `/${t.config.workspace}` : "")), a;
|
|
151
|
+
}), K = v(""), j = S(() => {
|
|
152
|
+
const a = t.config.app === "konnect" || t.config.isExactMatch;
|
|
153
|
+
if (a)
|
|
154
154
|
return {
|
|
155
|
-
isExactMatch:
|
|
155
|
+
isExactMatch: a,
|
|
156
156
|
placeholder: s("keySets.search.placeholder")
|
|
157
157
|
};
|
|
158
|
-
const i = { name:
|
|
158
|
+
const i = { name: E.name };
|
|
159
159
|
return {
|
|
160
|
-
isExactMatch:
|
|
160
|
+
isExactMatch: a,
|
|
161
161
|
fields: i,
|
|
162
|
-
schema:
|
|
162
|
+
schema: t.config.filterSchema
|
|
163
163
|
};
|
|
164
|
-
}), { fetcher:
|
|
165
|
-
|
|
166
|
-
},
|
|
164
|
+
}), { fetcher: A, fetcherState: F } = be(t.config, M.value), $ = () => {
|
|
165
|
+
K.value = "";
|
|
166
|
+
}, N = () => {
|
|
167
167
|
k.value++;
|
|
168
|
-
},
|
|
169
|
-
const y =
|
|
168
|
+
}, I = v(null), n = (a, i) => {
|
|
169
|
+
const y = a.id;
|
|
170
170
|
if (!i(y)) {
|
|
171
|
-
|
|
171
|
+
u(a, "id");
|
|
172
172
|
return;
|
|
173
173
|
}
|
|
174
|
-
|
|
175
|
-
},
|
|
176
|
-
const y = JSON.stringify(
|
|
174
|
+
d(a, "id");
|
|
175
|
+
}, c = (a, i) => {
|
|
176
|
+
const y = JSON.stringify(a);
|
|
177
177
|
if (!i(y)) {
|
|
178
178
|
m("copy:error", {
|
|
179
|
-
entity:
|
|
179
|
+
entity: a,
|
|
180
180
|
message: s("keySets.errors.copy")
|
|
181
181
|
});
|
|
182
182
|
return;
|
|
183
183
|
}
|
|
184
184
|
m("copy:success", {
|
|
185
|
-
entity:
|
|
185
|
+
entity: a,
|
|
186
186
|
message: s("keySets.copy.success_brief")
|
|
187
187
|
});
|
|
188
|
-
},
|
|
188
|
+
}, d = (a, i) => {
|
|
189
189
|
m("copy:success", {
|
|
190
|
-
entity:
|
|
190
|
+
entity: a,
|
|
191
191
|
field: i,
|
|
192
|
-
message: s("keySets.copy.success", { val:
|
|
192
|
+
message: s("keySets.copy.success", { val: a[i] })
|
|
193
193
|
});
|
|
194
|
-
},
|
|
194
|
+
}, u = (a, i) => {
|
|
195
195
|
m("copy:error", {
|
|
196
|
-
entity:
|
|
196
|
+
entity: a,
|
|
197
197
|
field: i,
|
|
198
198
|
message: s("keySets.errors.copy")
|
|
199
199
|
});
|
|
200
|
-
},
|
|
200
|
+
}, ne = async (a) => {
|
|
201
201
|
var y;
|
|
202
|
-
await ((y =
|
|
203
|
-
},
|
|
202
|
+
await ((y = t.canRetrieve) == null ? void 0 : y.call(t, a)) && g.push(t.config.getViewRoute(a.id));
|
|
203
|
+
}, ie = (a) => ({
|
|
204
204
|
label: s("keySets.actions.view"),
|
|
205
|
-
to:
|
|
206
|
-
}),
|
|
205
|
+
to: t.config.getViewRoute(a)
|
|
206
|
+
}), re = (a) => ({
|
|
207
207
|
label: s("keySets.actions.edit"),
|
|
208
|
-
to:
|
|
209
|
-
}),
|
|
210
|
-
|
|
211
|
-
},
|
|
208
|
+
to: t.config.getEditRoute(a)
|
|
209
|
+
}), w = v(void 0), T = v(!1), B = v(!1), Q = v(""), le = Ce(t.config, M.value), ce = (a) => {
|
|
210
|
+
w.value = a, T.value = !0;
|
|
211
|
+
}, de = () => {
|
|
212
212
|
T.value = !1;
|
|
213
|
-
},
|
|
214
|
-
var
|
|
215
|
-
if ((
|
|
213
|
+
}, ue = async () => {
|
|
214
|
+
var a, i, y;
|
|
215
|
+
if ((a = w.value) != null && a.id) {
|
|
216
216
|
B.value = !0;
|
|
217
217
|
try {
|
|
218
|
-
await
|
|
219
|
-
} catch (
|
|
220
|
-
Q.value = ((y = (i =
|
|
218
|
+
await h.delete(le(w.value.id)), B.value = !1, T.value = !1, k.value++, m("delete:success", w.value);
|
|
219
|
+
} catch (b) {
|
|
220
|
+
Q.value = ((y = (i = b.response) == null ? void 0 : i.data) == null ? void 0 : y.message) || b.message || s("keySets.errors.delete"), m("error", b);
|
|
221
221
|
} finally {
|
|
222
222
|
B.value = !1;
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
var i, y,
|
|
228
|
-
if (
|
|
229
|
-
|
|
225
|
+
};
|
|
226
|
+
pe(F, (a) => {
|
|
227
|
+
var i, y, b;
|
|
228
|
+
if (a.status === Ie.Error) {
|
|
229
|
+
I.value = {
|
|
230
230
|
title: s("keySets.errors.general")
|
|
231
|
-
}, (
|
|
231
|
+
}, (b = (y = (i = a.error) == null ? void 0 : i.response) == null ? void 0 : y.data) != null && b.message && (I.value.message = a.error.response.data.message), m("error", a.error);
|
|
232
232
|
return;
|
|
233
233
|
}
|
|
234
|
-
|
|
234
|
+
I.value = null;
|
|
235
235
|
});
|
|
236
|
-
const J =
|
|
237
|
-
ctaPath:
|
|
236
|
+
const J = v({
|
|
237
|
+
ctaPath: t.config.createRoute,
|
|
238
238
|
ctaText: void 0,
|
|
239
|
-
message: `${s("keySets.list.empty_state.description")}${
|
|
239
|
+
message: `${s("keySets.list.empty_state.description")}${t.config.additionMessageForEmptyState ? ` ${t.config.additionMessageForEmptyState}` : ""}`,
|
|
240
240
|
title: s("keySets.title")
|
|
241
241
|
});
|
|
242
|
-
return
|
|
243
|
-
await
|
|
244
|
-
}), (
|
|
245
|
-
const y = R("KButton"),
|
|
246
|
-
return O(), W("div",
|
|
247
|
-
l(o(
|
|
242
|
+
return ye(async () => {
|
|
243
|
+
await t.canCreate() && (J.value.title = s("keySets.list.empty_state.title"), J.value.ctaText = s("keySets.actions.create"));
|
|
244
|
+
}), (a, i) => {
|
|
245
|
+
const y = R("KButton"), b = R("KCopy"), _ = R("KDropdownItem"), Y = R("KClipboardProvider");
|
|
246
|
+
return O(), W("div", Ve, [
|
|
247
|
+
l(o(we), {
|
|
248
248
|
"cache-identifier": e.cacheIdentifier,
|
|
249
|
-
"disable-sorting":
|
|
249
|
+
"disable-sorting": U.value,
|
|
250
250
|
"empty-state-options": J.value,
|
|
251
251
|
"enable-entity-actions": "",
|
|
252
|
-
"error-message":
|
|
253
|
-
fetcher: o(
|
|
252
|
+
"error-message": I.value,
|
|
253
|
+
fetcher: o(A),
|
|
254
254
|
"fetcher-cache-key": k.value,
|
|
255
|
-
"hide-toollbar": n.value,
|
|
256
255
|
"pagination-type": "offset",
|
|
257
256
|
"preferences-storage-key": "kong-ui-entities-key-sets-list",
|
|
258
|
-
query:
|
|
257
|
+
query: K.value,
|
|
259
258
|
"table-headers": o(r),
|
|
260
259
|
onClearSearchInput: $,
|
|
261
|
-
"onClick:row": i[1] || (i[1] = (f) =>
|
|
262
|
-
onSort:
|
|
260
|
+
"onClick:row": i[1] || (i[1] = (f) => ne(f)),
|
|
261
|
+
onSort: N
|
|
263
262
|
}, {
|
|
264
263
|
"toolbar-filter": p(() => [
|
|
265
|
-
l(o(
|
|
266
|
-
modelValue:
|
|
267
|
-
"onUpdate:modelValue": i[0] || (i[0] = (f) =>
|
|
268
|
-
config:
|
|
264
|
+
l(o(Ee), {
|
|
265
|
+
modelValue: K.value,
|
|
266
|
+
"onUpdate:modelValue": i[0] || (i[0] = (f) => K.value = f),
|
|
267
|
+
config: j.value
|
|
269
268
|
}, null, 8, ["modelValue", "config"])
|
|
270
269
|
]),
|
|
271
270
|
"toolbar-button": p(() => [
|
|
272
|
-
(O(),
|
|
271
|
+
(O(), me(ge, {
|
|
273
272
|
disabled: !e.useActionOutside,
|
|
274
273
|
to: "#kong-ui-app-page-header-action-button"
|
|
275
274
|
}, [
|
|
@@ -277,60 +276,58 @@ const H = {
|
|
|
277
276
|
"auth-function": () => e.canCreate()
|
|
278
277
|
}, {
|
|
279
278
|
default: p(() => [
|
|
280
|
-
|
|
279
|
+
l(y, {
|
|
281
280
|
appearance: "primary",
|
|
282
281
|
"data-testid": "toolbar-add-key-set",
|
|
283
282
|
size: e.useActionOutside ? "medium" : "large",
|
|
284
283
|
to: e.config.createRoute
|
|
285
284
|
}, {
|
|
286
285
|
default: p(() => [
|
|
287
|
-
l(o(
|
|
288
|
-
V(" " +
|
|
286
|
+
l(o(he)),
|
|
287
|
+
V(" " + D(o(s)("keySets.list.toolbar_actions.new_key_set")), 1)
|
|
289
288
|
]),
|
|
290
289
|
_: 1
|
|
291
|
-
}, 8, ["size", "to"])
|
|
292
|
-
[Se, X.value]
|
|
293
|
-
])
|
|
290
|
+
}, 8, ["size", "to"])
|
|
294
291
|
]),
|
|
295
292
|
_: 1
|
|
296
293
|
}, 8, ["auth-function"])
|
|
297
294
|
], 8, ["disabled"]))
|
|
298
295
|
]),
|
|
299
296
|
name: p(({ rowValue: f }) => [
|
|
300
|
-
|
|
297
|
+
ke("b", null, D(f ?? "-"), 1)
|
|
301
298
|
]),
|
|
302
299
|
tags: p(({ rowValue: f }) => [
|
|
303
|
-
l(o(
|
|
300
|
+
l(o(Me), { tags: f }, null, 8, ["tags"])
|
|
304
301
|
]),
|
|
305
302
|
id: p(({ rowValue: f }) => [
|
|
306
|
-
l(
|
|
303
|
+
l(b, {
|
|
307
304
|
text: f,
|
|
308
305
|
truncate: ""
|
|
309
306
|
}, null, 8, ["text"])
|
|
310
307
|
]),
|
|
311
308
|
actions: p(({ row: f }) => [
|
|
312
|
-
l(
|
|
309
|
+
l(Y, null, {
|
|
313
310
|
default: p(({ copyToClipboard: x }) => [
|
|
314
|
-
l(
|
|
311
|
+
l(_, {
|
|
315
312
|
"data-testid": "action-entity-copy-id",
|
|
316
|
-
onClick: (
|
|
313
|
+
onClick: (fe) => n(f, x)
|
|
317
314
|
}, {
|
|
318
315
|
default: p(() => [
|
|
319
|
-
V(
|
|
316
|
+
V(D(o(s)("keySets.actions.copy_id")), 1)
|
|
320
317
|
]),
|
|
321
318
|
_: 2
|
|
322
319
|
}, 1032, ["onClick"])
|
|
323
320
|
]),
|
|
324
321
|
_: 2
|
|
325
322
|
}, 1024),
|
|
326
|
-
l(
|
|
323
|
+
l(Y, null, {
|
|
327
324
|
default: p(({ copyToClipboard: x }) => [
|
|
328
|
-
l(
|
|
325
|
+
l(_, {
|
|
329
326
|
"data-testid": "action-entity-copy-json",
|
|
330
|
-
onClick: (
|
|
327
|
+
onClick: (fe) => c(f, x)
|
|
331
328
|
}, {
|
|
332
329
|
default: p(() => [
|
|
333
|
-
V(
|
|
330
|
+
V(D(o(s)("keySets.actions.copy_json")), 1)
|
|
334
331
|
]),
|
|
335
332
|
_: 2
|
|
336
333
|
}, 1032, ["onClick"])
|
|
@@ -341,10 +338,10 @@ const H = {
|
|
|
341
338
|
"auth-function": () => e.canRetrieve(f)
|
|
342
339
|
}, {
|
|
343
340
|
default: p(() => [
|
|
344
|
-
l(
|
|
341
|
+
l(_, {
|
|
345
342
|
"data-testid": "action-entity-view",
|
|
346
343
|
"has-divider": "",
|
|
347
|
-
item:
|
|
344
|
+
item: ie(f.id)
|
|
348
345
|
}, null, 8, ["item"])
|
|
349
346
|
]),
|
|
350
347
|
_: 2
|
|
@@ -353,9 +350,9 @@ const H = {
|
|
|
353
350
|
"auth-function": () => e.canEdit(f)
|
|
354
351
|
}, {
|
|
355
352
|
default: p(() => [
|
|
356
|
-
l(
|
|
353
|
+
l(_, {
|
|
357
354
|
"data-testid": "action-entity-edit",
|
|
358
|
-
item:
|
|
355
|
+
item: re(f.id)
|
|
359
356
|
}, null, 8, ["item"])
|
|
360
357
|
]),
|
|
361
358
|
_: 2
|
|
@@ -364,14 +361,14 @@ const H = {
|
|
|
364
361
|
"auth-function": () => e.canDelete(f)
|
|
365
362
|
}, {
|
|
366
363
|
default: p(() => [
|
|
367
|
-
l(
|
|
364
|
+
l(_, {
|
|
368
365
|
danger: "",
|
|
369
366
|
"data-testid": "action-entity-delete",
|
|
370
367
|
"has-divider": "",
|
|
371
|
-
onClick: (x) =>
|
|
368
|
+
onClick: (x) => ce(f)
|
|
372
369
|
}, {
|
|
373
370
|
default: p(() => [
|
|
374
|
-
V(
|
|
371
|
+
V(D(o(s)("keySets.actions.delete")), 1)
|
|
375
372
|
]),
|
|
376
373
|
_: 2
|
|
377
374
|
}, 1032, ["onClick"])
|
|
@@ -380,27 +377,27 @@ const H = {
|
|
|
380
377
|
}, 1032, ["auth-function"])
|
|
381
378
|
]),
|
|
382
379
|
_: 1
|
|
383
|
-
}, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "
|
|
384
|
-
l(o(
|
|
380
|
+
}, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers"]),
|
|
381
|
+
l(o(Ke), {
|
|
385
382
|
"action-pending": B.value,
|
|
386
383
|
description: o(s)("keySets.delete.description"),
|
|
387
|
-
"entity-name":
|
|
388
|
-
"entity-type": o(
|
|
384
|
+
"entity-name": w.value && (w.value.name || w.value.id),
|
|
385
|
+
"entity-type": o($e).KeySet,
|
|
389
386
|
error: Q.value,
|
|
390
387
|
title: o(s)("keySets.delete.title"),
|
|
391
388
|
visible: T.value,
|
|
392
|
-
onCancel:
|
|
393
|
-
onProceed:
|
|
389
|
+
onCancel: de,
|
|
390
|
+
onProceed: ue
|
|
394
391
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
395
392
|
]);
|
|
396
393
|
};
|
|
397
394
|
}
|
|
398
|
-
}),
|
|
395
|
+
}), se = (e, C) => {
|
|
399
396
|
const m = e.__vccOpts || e;
|
|
400
|
-
for (const [
|
|
401
|
-
m[
|
|
397
|
+
for (const [t, s] of C)
|
|
398
|
+
m[t] = s;
|
|
402
399
|
return m;
|
|
403
|
-
},
|
|
400
|
+
}, ze = /* @__PURE__ */ se(qe, [["__scopeId", "data-v-e8613139"]]), Oe = { class: "kong-ui-entities-key-sets-form" }, Pe = /* @__PURE__ */ G({
|
|
404
401
|
__name: "KeySetForm",
|
|
405
402
|
props: {
|
|
406
403
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -417,68 +414,68 @@ const H = {
|
|
|
417
414
|
}
|
|
418
415
|
},
|
|
419
416
|
emits: ["update", "error", "loading"],
|
|
420
|
-
setup(e, { emit:
|
|
421
|
-
var
|
|
422
|
-
const m =
|
|
417
|
+
setup(e, { emit: C }) {
|
|
418
|
+
var I;
|
|
419
|
+
const m = C, t = e, s = te(), { i18n: { t: g } } = H.useI18n(), { getMessageFromError: h } = Fe(), { axiosInstance: k } = ae((I = t.config) == null ? void 0 : I.axiosRequestConfig), U = S(() => P.form[t.config.app].edit), E = S(() => t.keySetId ? ee.Edit : ee.Create), r = Z({
|
|
423
420
|
fields: {
|
|
424
421
|
name: "",
|
|
425
422
|
tags: ""
|
|
426
423
|
},
|
|
427
424
|
isReadonly: !1,
|
|
428
425
|
errorMessage: ""
|
|
429
|
-
}),
|
|
426
|
+
}), M = Z({
|
|
430
427
|
name: "",
|
|
431
428
|
tags: ""
|
|
432
|
-
}),
|
|
429
|
+
}), K = S(() => JSON.stringify(r.fields) !== JSON.stringify(M) && !!r.fields.name), j = (n) => {
|
|
433
430
|
var c;
|
|
434
|
-
r.fields.name = (n == null ? void 0 : n.name) || "", r.fields.tags = ((c = n == null ? void 0 : n.tags) == null ? void 0 : c.join(", ")) || "", Object.assign(
|
|
435
|
-
},
|
|
436
|
-
s.push(
|
|
437
|
-
}, F =
|
|
431
|
+
r.fields.name = (n == null ? void 0 : n.name) || "", r.fields.tags = ((c = n == null ? void 0 : n.tags) == null ? void 0 : c.join(", ")) || "", Object.assign(M, r.fields);
|
|
432
|
+
}, A = () => {
|
|
433
|
+
s.push(t.config.cancelRoute);
|
|
434
|
+
}, F = S(() => {
|
|
438
435
|
var c, d;
|
|
439
|
-
let n = `${
|
|
440
|
-
return
|
|
441
|
-
}), $ =
|
|
436
|
+
let n = `${t.config.apiBaseUrl}${P.form[t.config.app][E.value]}`;
|
|
437
|
+
return t.config.app === "konnect" ? n = n.replace(/{controlPlaneId}/gi, ((c = t.config) == null ? void 0 : c.controlPlaneId) || "") : t.config.app === "kongManager" && (n = n.replace(/\/{workspace}/gi, (d = t.config) != null && d.workspace ? `/${t.config.workspace}` : "")), n = n.replace(/{id}/gi, t.keySetId), n;
|
|
438
|
+
}), $ = S(() => {
|
|
442
439
|
var n, c, d;
|
|
443
440
|
return {
|
|
444
441
|
name: r.fields.name,
|
|
445
442
|
tags: ((d = (c = (n = r.fields.tags) == null ? void 0 : n.split(",")) == null ? void 0 : c.map((u) => String(u || "").trim())) == null ? void 0 : d.filter((u) => u !== "")) || ""
|
|
446
443
|
};
|
|
447
|
-
}),
|
|
444
|
+
}), N = async () => {
|
|
448
445
|
var n, c;
|
|
449
446
|
try {
|
|
450
447
|
r.isReadonly = !0;
|
|
451
448
|
let d;
|
|
452
|
-
if (
|
|
449
|
+
if (E.value === "create" ? d = await k.post(F.value, $.value) : E.value === "edit" && (d = ((n = t.config) == null ? void 0 : n.app) === "konnect" ? await k.put(F.value, $.value) : await k.patch(F.value, $.value)), d) {
|
|
453
450
|
const { data: u } = d;
|
|
454
|
-
r.fields.name = (u == null ? void 0 : u.name) || "", r.fields.tags = ((c = u == null ? void 0 : u.tags) == null ? void 0 : c.join(", ")) || "", Object.assign(
|
|
451
|
+
r.fields.name = (u == null ? void 0 : u.name) || "", r.fields.tags = ((c = u == null ? void 0 : u.tags) == null ? void 0 : c.join(", ")) || "", Object.assign(M, r.fields), m("update", d == null ? void 0 : d.data);
|
|
455
452
|
}
|
|
456
453
|
} catch (d) {
|
|
457
|
-
r.errorMessage =
|
|
454
|
+
r.errorMessage = h(d), m("error", d);
|
|
458
455
|
} finally {
|
|
459
456
|
r.isReadonly = !1;
|
|
460
457
|
}
|
|
461
458
|
};
|
|
462
459
|
return (n, c) => {
|
|
463
460
|
const d = R("KInput");
|
|
464
|
-
return O(), W("div",
|
|
465
|
-
l(o(
|
|
466
|
-
"can-submit":
|
|
461
|
+
return O(), W("div", Oe, [
|
|
462
|
+
l(o(_e), {
|
|
463
|
+
"can-submit": K.value,
|
|
467
464
|
config: e.config,
|
|
468
465
|
"edit-id": e.keySetId,
|
|
469
|
-
"entity-type": o(
|
|
466
|
+
"entity-type": o(oe).KeySet,
|
|
470
467
|
"error-message": r.errorMessage,
|
|
471
|
-
"fetch-url":
|
|
468
|
+
"fetch-url": U.value,
|
|
472
469
|
"form-fields": $.value,
|
|
473
470
|
"is-readonly": r.isReadonly,
|
|
474
|
-
onCancel:
|
|
471
|
+
onCancel: A,
|
|
475
472
|
"onFetch:error": c[2] || (c[2] = (u) => n.$emit("error", u)),
|
|
476
|
-
"onFetch:success":
|
|
473
|
+
"onFetch:success": j,
|
|
477
474
|
onLoading: c[3] || (c[3] = (u) => n.$emit("loading", u)),
|
|
478
|
-
onSubmit:
|
|
475
|
+
onSubmit: N
|
|
479
476
|
}, {
|
|
480
477
|
default: p(() => [
|
|
481
|
-
l(o(
|
|
478
|
+
l(o(De), {
|
|
482
479
|
description: o(g)("keySets.form.sections.general.description"),
|
|
483
480
|
"has-divider": "",
|
|
484
481
|
title: o(g)("keySets.form.sections.general.title")
|
|
@@ -520,7 +517,7 @@ const H = {
|
|
|
520
517
|
]);
|
|
521
518
|
};
|
|
522
519
|
}
|
|
523
|
-
}),
|
|
520
|
+
}), Ge = /* @__PURE__ */ se(Pe, [["__scopeId", "data-v-d1b94475"]]), Ue = { class: "kong-ui-entities-keys-entity-config-card" }, We = /* @__PURE__ */ G({
|
|
524
521
|
__name: "KeySetConfigCard",
|
|
525
522
|
props: {
|
|
526
523
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -547,7 +544,7 @@ const H = {
|
|
|
547
544
|
},
|
|
548
545
|
emits: ["loading", "fetch:error", "fetch:success"],
|
|
549
546
|
setup(e) {
|
|
550
|
-
const
|
|
547
|
+
const C = e, { i18n: { t: m } } = H.useI18n(), t = S(() => P.form[C.config.app].edit), s = v({
|
|
551
548
|
id: {},
|
|
552
549
|
name: {},
|
|
553
550
|
last_updated: {},
|
|
@@ -556,23 +553,23 @@ const H = {
|
|
|
556
553
|
tooltip: m("keySets.form.fields.tags.tooltip")
|
|
557
554
|
}
|
|
558
555
|
});
|
|
559
|
-
return (g,
|
|
560
|
-
l(o(
|
|
556
|
+
return (g, h) => (O(), W("div", Ue, [
|
|
557
|
+
l(o(Re), {
|
|
561
558
|
config: e.config,
|
|
562
559
|
"config-card-doc": e.configCardDoc,
|
|
563
560
|
"config-schema": s.value,
|
|
564
|
-
"entity-type": o(
|
|
565
|
-
"fetch-url":
|
|
561
|
+
"entity-type": o(oe).KeySet,
|
|
562
|
+
"fetch-url": t.value,
|
|
566
563
|
"hide-title": e.hideTitle,
|
|
567
|
-
"onFetch:error":
|
|
568
|
-
"onFetch:success":
|
|
569
|
-
onLoading:
|
|
564
|
+
"onFetch:error": h[0] || (h[0] = (k) => g.$emit("fetch:error", k)),
|
|
565
|
+
"onFetch:success": h[1] || (h[1] = (k) => g.$emit("fetch:success", k)),
|
|
566
|
+
onLoading: h[2] || (h[2] = (k) => g.$emit("loading", k))
|
|
570
567
|
}, null, 8, ["config", "config-card-doc", "config-schema", "entity-type", "fetch-url", "hide-title"])
|
|
571
568
|
]));
|
|
572
569
|
}
|
|
573
570
|
});
|
|
574
571
|
export {
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
572
|
+
We as KeySetConfigCard,
|
|
573
|
+
Ge as KeySetForm,
|
|
574
|
+
ze as KeySetList
|
|
578
575
|
};
|
|
@@ -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,H,j,U,i){"use strict";const Q={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."}},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 X(){const t=U.createI18n("en-us",Q);return{i18n:t,i18nT:U.i18nTComponent(t)}}const $={useI18n:X},_="/v2/control-planes/{controlPlaneId}/core-entities",B="/{workspace}",K={list:{konnect:`${_}/key-sets`,kongManager:`${B}/key-sets`},form:{konnect:{create:`${_}/key-sets`,edit:`${_}/key-sets/{id}`},kongManager:{create:`${B}/key-sets`,edit:`${B}/key-sets/{id}`}}},Y={class:"kong-ui-entities-key-sets-list"},Z=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","copy:success","copy:error","delete:success"],setup(t,{emit:S}){var z;const y=S,n=t,{i18n:{t:a}}=$.useI18n(),m=j.useRouter(),{axiosInstance:h}=i.useAxios((z=n.config)==null?void 0:z.axiosRequestConfig),k=e.ref(1),R=e.computed(()=>n.config.app!=="kongManager"||!!n.config.disableSorting),x={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}},l=x,N=e.computed(()=>{var r,u;let o=`${n.config.apiBaseUrl}${K.list[n.config.app]}`;return n.config.app==="konnect"?o=o.replace(/{controlPlaneId}/gi,((r=n.config)==null?void 0:r.controlPlaneId)||""):n.config.app==="kongManager"&&(o=o.replace(/\/{workspace}/gi,(u=n.config)!=null&&u.workspace?`/${n.config.workspace}`:"")),o}),I=e.ref(""),q=e.computed(()=>{const o=n.config.app==="konnect"||n.config.isExactMatch;if(o)return{isExactMatch:o,placeholder:a("keySets.search.placeholder")};const r={name:x.name};return{isExactMatch:o,fields:r,schema:n.config.filterSchema}}),{fetcher:P,fetcherState:D}=i.useFetcher(n.config,N.value),E=()=>{I.value=""},O=()=>{k.value++},w=e.ref(null),s=e.ref(!1),c=(o,r)=>{const u=o.id;if(!r(u)){ae(o,"id");return}f(o,"id")},d=(o,r)=>{const u=JSON.stringify(o);if(!r(u)){y("copy:error",{entity:o,message:a("keySets.errors.copy")});return}y("copy:success",{entity:o,message:a("keySets.copy.success_brief")})},f=(o,r)=>{y("copy:success",{entity:o,field:r,message:a("keySets.copy.success",{val:o[r]})})},ae=(o,r)=>{y("copy:error",{entity:o,field:r,message:a("keySets.errors.copy")})},se=async o=>{var u;await((u=n.canRetrieve)==null?void 0:u.call(n,o))&&m.push(n.config.getViewRoute(o.id))},re=o=>({label:a("keySets.actions.view"),to:n.config.getViewRoute(o)}),ie=o=>({label:a("keySets.actions.edit"),to:n.config.getEditRoute(o)}),V=e.ref(void 0),T=e.ref(!1),M=e.ref(!1),L=e.ref(""),le=i.useDeleteUrlBuilder(n.config,N.value),ce=o=>{V.value=o,T.value=!0},de=()=>{T.value=!1},fe=async()=>{var o,r,u;if((o=V.value)!=null&&o.id){M.value=!0;try{await h.delete(le(V.value.id)),M.value=!1,T.value=!1,k.value++,y("delete:success",V.value)}catch(b){L.value=((u=(r=b.response)==null?void 0:r.data)==null?void 0:u.message)||b.message||a("keySets.errors.delete"),y("error",b)}finally{M.value=!1}}},W=e.ref(!1);e.watch(D,o=>{var r,u,b,C;if(Array.isArray((r=o==null?void 0:o.response)==null?void 0:r.data)&&(W.value=o.response.data.length>0),o.status===i.FetcherStatus.NoRecords?s.value=!0:s.value=!1,o.status===i.FetcherStatus.Error){w.value={title:a("keySets.errors.general")},(C=(b=(u=o.error)==null?void 0:u.response)==null?void 0:b.data)!=null&&C.message&&(w.value.message=o.error.response.data.message),y("error",o.error);return}w.value=null});const A=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()&&(A.value.title=a("keySets.list.empty_state.title"),A.value.ctaText=a("keySets.actions.create"))}),(o,r)=>{const u=e.resolveComponent("KButton"),b=e.resolveComponent("KCopy"),C=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":R.value,"empty-state-options":A.value,"enable-entity-actions":"","error-message":w.value,fetcher:e.unref(P),"fetcher-cache-key":k.value,"hide-toollbar":s.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-key-sets-list",query:I.value,"table-headers":e.unref(l),onClearSearchInput:E,"onClick:row":r[1]||(r[1]=p=>se(p)),onSort:O},{"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(i.EntityFilter),{modelValue:I.value,"onUpdate:modelValue":r[0]||(r[0]=p=>I.value=p),config:q.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.createVNode(e.unref(i.PermissionsWrapper),{"auth-function":()=>t.canCreate()},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(u,{appearance:"primary","data-testid":"toolbar-add-key-set",size:t.useActionOutside?"medium":"large",to:t.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(H.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(a)("keySets.list.toolbar_actions.new_key_set")),1)]),_:1},8,["size","to"]),[[e.vShow,W.value]])]),_:1},8,["auth-function"])],8,["disabled"]))]),name:e.withCtx(({rowValue:p})=>[e.createElementVNode("b",null,e.toDisplayString(p??"-"),1)]),tags:e.withCtx(({rowValue:p})=>[e.createVNode(e.unref(i.TableTags),{tags:p},null,8,["tags"])]),id:e.withCtx(({rowValue:p})=>[e.createVNode(b,{text:p,truncate:""},null,8,["text"])]),actions:e.withCtx(({row:p})=>[e.createVNode(G,null,{default:e.withCtx(({copyToClipboard:F})=>[e.createVNode(C,{"data-testid":"action-entity-copy-id",onClick:pe=>c(p,F)},{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:F})=>[e.createVNode(C,{"data-testid":"action-entity-copy-json",onClick:pe=>d(p,F)},{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(p)},{default:e.withCtx(()=>[e.createVNode(C,{"data-testid":"action-entity-view","has-divider":"",item:re(p.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(i.PermissionsWrapper),{"auth-function":()=>t.canEdit(p)},{default:e.withCtx(()=>[e.createVNode(C,{"data-testid":"action-entity-edit",item:ie(p.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(i.PermissionsWrapper),{"auth-function":()=>t.canDelete(p)},{default:e.withCtx(()=>[e.createVNode(C,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:F=>ce(p)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("keySets.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","hide-toollbar","query","table-headers"]),e.createVNode(e.unref(i.EntityDeleteModal),{"action-pending":M.value,description:e.unref(a)("keySets.delete.description"),"entity-name":V.value&&(V.value.name||V.value.id),"entity-type":e.unref(i.EntityTypes).KeySet,error:L.value,title:e.unref(a)("keySets.delete.title"),visible:T.value,onCancel:de,onProceed:fe},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),J=(t,S)=>{const y=t.__vccOpts||t;for(const[n,a]of S)y[n]=a;return y},v=J(Z,[["__scopeId","data-v-4d6fc369"]]),ee={class:"kong-ui-entities-key-sets-form"},te=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 w;const y=S,n=t,a=j.useRouter(),{i18n:{t:m}}=$.useI18n(),{getMessageFromError:h}=i.useErrors(),{axiosInstance:k}=i.useAxios((w=n.config)==null?void 0:w.axiosRequestConfig),R=e.computed(()=>K.form[n.config.app].edit),x=e.computed(()=>n.keySetId?i.EntityBaseFormType.Edit:i.EntityBaseFormType.Create),l=e.reactive({fields:{name:"",tags:""},isReadonly:!1,errorMessage:""}),N=e.reactive({name:"",tags:""}),I=e.computed(()=>JSON.stringify(l.fields)!==JSON.stringify(N)&&!!l.fields.name),q=s=>{var c;l.fields.name=(s==null?void 0:s.name)||"",l.fields.tags=((c=s==null?void 0:s.tags)==null?void 0:c.join(", "))||"",Object.assign(N,l.fields)},P=()=>{a.push(n.config.cancelRoute)},D=e.computed(()=>{var c,d;let s=`${n.config.apiBaseUrl}${K.form[n.config.app][x.value]}`;return n.config.app==="konnect"?s=s.replace(/{controlPlaneId}/gi,((c=n.config)==null?void 0:c.controlPlaneId)||""):n.config.app==="kongManager"&&(s=s.replace(/\/{workspace}/gi,(d=n.config)!=null&&d.workspace?`/${n.config.workspace}`:"")),s=s.replace(/{id}/gi,n.keySetId),s}),E=e.computed(()=>{var s,c,d;return{name:l.fields.name,tags:((d=(c=(s=l.fields.tags)==null?void 0:s.split(","))==null?void 0:c.map(f=>String(f||"").trim()))==null?void 0:d.filter(f=>f!==""))||""}}),O=async()=>{var s,c;try{l.isReadonly=!0;let d;if(x.value==="create"?d=await k.post(D.value,E.value):x.value==="edit"&&(d=((s=n.config)==null?void 0:s.app)==="konnect"?await k.put(D.value,E.value):await k.patch(D.value,E.value)),d){const{data:f}=d;l.fields.name=(f==null?void 0:f.name)||"",l.fields.tags=((c=f==null?void 0:f.tags)==null?void 0:c.join(", "))||"",Object.assign(N,l.fields),y("update",d==null?void 0:d.data)}}catch(d){l.errorMessage=h(d),y("error",d)}finally{l.isReadonly=!1}};return(s,c)=>{const d=e.resolveComponent("KInput");return e.openBlock(),e.createElementBlock("div",ee,[e.createVNode(e.unref(i.EntityBaseForm),{"can-submit":I.value,config:t.config,"edit-id":t.keySetId,"entity-type":e.unref(i.SupportedEntityType).KeySet,"error-message":l.errorMessage,"fetch-url":R.value,"form-fields":E.value,"is-readonly":l.isReadonly,onCancel:P,"onFetch:error":c[2]||(c[2]=f=>s.$emit("error",f)),"onFetch:success":q,onLoading:c[3]||(c[3]=f=>s.$emit("loading",f)),onSubmit:O},{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(d,{modelValue:l.fields.name,"onUpdate:modelValue":c[0]||(c[0]=f=>l.fields.name=f),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(d,{modelValue:l.fields.tags,"onUpdate:modelValue":c[1]||(c[1]=f=>l.fields.tags=f),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-d1b94475"]]),oe={class:"kong-ui-entities-keys-entity-config-card"},ne=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:y}}=$.useI18n(),n=e.computed(()=>K.form[S.config.app].edit),a=e.ref({id:{},name:{},last_updated:{},created:{},tags:{tooltip:y("keySets.form.fields.tags.tooltip")}});return(m,h)=>(e.openBlock(),e.createElementBlock("div",oe,[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=ne,g.KeySetForm=te,g.KeySetList=v,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,G,A,U,l){"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."}},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=U.createI18n("en-us",H);return{i18n:t,i18nT:U.i18nTComponent(t)}}const F={useI18n:Q},_="/v2/control-planes/{controlPlaneId}/core-entities",B="/{workspace}",M={list:{konnect:`${_}/key-sets`,kongManager:`${B}/key-sets`},form:{konnect:{create:`${_}/key-sets`,edit:`${_}/key-sets/{id}`},kongManager:{create:`${B}/key-sets`,edit:`${B}/key-sets/{id}`}}},X={class:"kong-ui-entities-key-sets-list"},Y=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","copy:success","copy:error","delete:success"],setup(t,{emit:C}){var W;const y=C,o=t,{i18n:{t:a}}=F.useI18n(),m=A.useRouter(),{axiosInstance:h}=l.useAxios((W=o.config)==null?void 0:W.axiosRequestConfig),k=e.ref(1),R=e.computed(()=>o.config.app!=="kongManager"||!!o.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}},i=V,x=e.computed(()=>{var r,u;let n=`${o.config.apiBaseUrl}${M.list[o.config.app]}`;return o.config.app==="konnect"?n=n.replace(/{controlPlaneId}/gi,((r=o.config)==null?void 0:r.controlPlaneId)||""):o.config.app==="kongManager"&&(n=n.replace(/\/{workspace}/gi,(u=o.config)!=null&&u.workspace?`/${o.config.workspace}`:"")),n}),I=e.ref(""),q=e.computed(()=>{const n=o.config.app==="konnect"||o.config.isExactMatch;if(n)return{isExactMatch:n,placeholder:a("keySets.search.placeholder")};const r={name:V.name};return{isExactMatch:n,fields:r,schema:o.config.filterSchema}}),{fetcher:P,fetcherState:E}=l.useFetcher(o.config,x.value),N=()=>{I.value=""},O=()=>{k.value++},S=e.ref(null),s=(n,r)=>{const u=n.id;if(!r(u)){f(n,"id");return}d(n,"id")},c=(n,r)=>{const u=JSON.stringify(n);if(!r(u)){y("copy:error",{entity:n,message:a("keySets.errors.copy")});return}y("copy:success",{entity:n,message:a("keySets.copy.success_brief")})},d=(n,r)=>{y("copy:success",{entity:n,field:r,message:a("keySets.copy.success",{val:n[r]})})},f=(n,r)=>{y("copy:error",{entity:n,field:r,message:a("keySets.errors.copy")})},ne=async n=>{var u;await((u=o.canRetrieve)==null?void 0:u.call(o,n))&&m.push(o.config.getViewRoute(n.id))},ae=n=>({label:a("keySets.actions.view"),to:o.config.getViewRoute(n)}),se=n=>({label:a("keySets.actions.edit"),to:o.config.getEditRoute(n)}),w=e.ref(void 0),D=e.ref(!1),T=e.ref(!1),L=e.ref(""),re=l.useDeleteUrlBuilder(o.config,x.value),ie=n=>{w.value=n,D.value=!0},le=()=>{D.value=!1},ce=async()=>{var n,r,u;if((n=w.value)!=null&&n.id){T.value=!0;try{await h.delete(re(w.value.id)),T.value=!1,D.value=!1,k.value++,y("delete:success",w.value)}catch(b){L.value=((u=(r=b.response)==null?void 0:r.data)==null?void 0:u.message)||b.message||a("keySets.errors.delete"),y("error",b)}finally{T.value=!1}}};e.watch(E,n=>{var r,u,b;if(n.status===l.FetcherStatus.Error){S.value={title:a("keySets.errors.general")},(b=(u=(r=n.error)==null?void 0:r.response)==null?void 0:u.data)!=null&&b.message&&(S.value.message=n.error.response.data.message),y("error",n.error);return}S.value=null});const j=e.ref({ctaPath:o.config.createRoute,ctaText:void 0,message:`${a("keySets.list.empty_state.description")}${o.config.additionMessageForEmptyState?` ${o.config.additionMessageForEmptyState}`:""}`,title:a("keySets.title")});return e.onBeforeMount(async()=>{await o.canCreate()&&(j.value.title=a("keySets.list.empty_state.title"),j.value.ctaText=a("keySets.actions.create"))}),(n,r)=>{const u=e.resolveComponent("KButton"),b=e.resolveComponent("KCopy"),K=e.resolveComponent("KDropdownItem"),z=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",X,[e.createVNode(e.unref(l.EntityBaseTable),{"cache-identifier":t.cacheIdentifier,"disable-sorting":R.value,"empty-state-options":j.value,"enable-entity-actions":"","error-message":S.value,fetcher:e.unref(P),"fetcher-cache-key":k.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-key-sets-list",query:I.value,"table-headers":e.unref(i),onClearSearchInput:N,"onClick:row":r[1]||(r[1]=p=>ne(p)),onSort:O},{"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(l.EntityFilter),{modelValue:I.value,"onUpdate:modelValue":r[0]||(r[0]=p=>I.value=p),config:q.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.createVNode(e.unref(l.PermissionsWrapper),{"auth-function":()=>t.canCreate()},{default:e.withCtx(()=>[e.createVNode(u,{appearance:"primary","data-testid":"toolbar-add-key-set",size:t.useActionOutside?"medium":"large",to:t.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(G.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:p})=>[e.createElementVNode("b",null,e.toDisplayString(p??"-"),1)]),tags:e.withCtx(({rowValue:p})=>[e.createVNode(e.unref(l.TableTags),{tags:p},null,8,["tags"])]),id:e.withCtx(({rowValue:p})=>[e.createVNode(b,{text:p,truncate:""},null,8,["text"])]),actions:e.withCtx(({row:p})=>[e.createVNode(z,null,{default:e.withCtx(({copyToClipboard:$})=>[e.createVNode(K,{"data-testid":"action-entity-copy-id",onClick:de=>s(p,$)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("keySets.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(z,null,{default:e.withCtx(({copyToClipboard:$})=>[e.createVNode(K,{"data-testid":"action-entity-copy-json",onClick:de=>c(p,$)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("keySets.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(l.PermissionsWrapper),{"auth-function":()=>t.canRetrieve(p)},{default:e.withCtx(()=>[e.createVNode(K,{"data-testid":"action-entity-view","has-divider":"",item:ae(p.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(l.PermissionsWrapper),{"auth-function":()=>t.canEdit(p)},{default:e.withCtx(()=>[e.createVNode(K,{"data-testid":"action-entity-edit",item:se(p.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(l.PermissionsWrapper),{"auth-function":()=>t.canDelete(p)},{default:e.withCtx(()=>[e.createVNode(K,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:$=>ie(p)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("keySets.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers"]),e.createVNode(e.unref(l.EntityDeleteModal),{"action-pending":T.value,description:e.unref(a)("keySets.delete.description"),"entity-name":w.value&&(w.value.name||w.value.id),"entity-type":e.unref(l.EntityTypes).KeySet,error:L.value,title:e.unref(a)("keySets.delete.title"),visible:D.value,onCancel:le,onProceed:ce},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),J=(t,C)=>{const y=t.__vccOpts||t;for(const[o,a]of C)y[o]=a;return y},Z=J(Y,[["__scopeId","data-v-e8613139"]]),v={class:"kong-ui-entities-key-sets-form"},ee=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:C}){var S;const y=C,o=t,a=A.useRouter(),{i18n:{t:m}}=F.useI18n(),{getMessageFromError:h}=l.useErrors(),{axiosInstance:k}=l.useAxios((S=o.config)==null?void 0:S.axiosRequestConfig),R=e.computed(()=>M.form[o.config.app].edit),V=e.computed(()=>o.keySetId?l.EntityBaseFormType.Edit:l.EntityBaseFormType.Create),i=e.reactive({fields:{name:"",tags:""},isReadonly:!1,errorMessage:""}),x=e.reactive({name:"",tags:""}),I=e.computed(()=>JSON.stringify(i.fields)!==JSON.stringify(x)&&!!i.fields.name),q=s=>{var c;i.fields.name=(s==null?void 0:s.name)||"",i.fields.tags=((c=s==null?void 0:s.tags)==null?void 0:c.join(", "))||"",Object.assign(x,i.fields)},P=()=>{a.push(o.config.cancelRoute)},E=e.computed(()=>{var c,d;let s=`${o.config.apiBaseUrl}${M.form[o.config.app][V.value]}`;return o.config.app==="konnect"?s=s.replace(/{controlPlaneId}/gi,((c=o.config)==null?void 0:c.controlPlaneId)||""):o.config.app==="kongManager"&&(s=s.replace(/\/{workspace}/gi,(d=o.config)!=null&&d.workspace?`/${o.config.workspace}`:"")),s=s.replace(/{id}/gi,o.keySetId),s}),N=e.computed(()=>{var s,c,d;return{name:i.fields.name,tags:((d=(c=(s=i.fields.tags)==null?void 0:s.split(","))==null?void 0:c.map(f=>String(f||"").trim()))==null?void 0:d.filter(f=>f!==""))||""}}),O=async()=>{var s,c;try{i.isReadonly=!0;let d;if(V.value==="create"?d=await k.post(E.value,N.value):V.value==="edit"&&(d=((s=o.config)==null?void 0:s.app)==="konnect"?await k.put(E.value,N.value):await k.patch(E.value,N.value)),d){const{data:f}=d;i.fields.name=(f==null?void 0:f.name)||"",i.fields.tags=((c=f==null?void 0:f.tags)==null?void 0:c.join(", "))||"",Object.assign(x,i.fields),y("update",d==null?void 0:d.data)}}catch(d){i.errorMessage=h(d),y("error",d)}finally{i.isReadonly=!1}};return(s,c)=>{const d=e.resolveComponent("KInput");return e.openBlock(),e.createElementBlock("div",v,[e.createVNode(e.unref(l.EntityBaseForm),{"can-submit":I.value,config:t.config,"edit-id":t.keySetId,"entity-type":e.unref(l.SupportedEntityType).KeySet,"error-message":i.errorMessage,"fetch-url":R.value,"form-fields":N.value,"is-readonly":i.isReadonly,onCancel:P,"onFetch:error":c[2]||(c[2]=f=>s.$emit("error",f)),"onFetch:success":q,onLoading:c[3]||(c[3]=f=>s.$emit("loading",f)),onSubmit:O},{default:e.withCtx(()=>[e.createVNode(e.unref(l.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(d,{modelValue:i.fields.name,"onUpdate:modelValue":c[0]||(c[0]=f=>i.fields.name=f),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:i.isReadonly,type:"text"},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode(d,{modelValue:i.fields.tags,"onUpdate:modelValue":c[1]||(c[1]=f=>i.fields.tags=f),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:i.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-d1b94475"]]),te={class:"kong-ui-entities-keys-entity-config-card"},oe=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 C=t,{i18n:{t:y}}=F.useI18n(),o=e.computed(()=>M.form[C.config.app].edit),a=e.ref({id:{},name:{},last_updated:{},created:{},tags:{tooltip:y("keySets.form.fields.tags.tooltip")}});return(m,h)=>(e.openBlock(),e.createElementBlock("div",te,[e.createVNode(e.unref(l.EntityBaseConfigCard),{config:t.config,"config-card-doc":t.configCardDoc,"config-schema":a.value,"entity-type":e.unref(l.SupportedEntityType).KeySet,"fetch-url":o.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=oe,g.KeySetForm=ee,g.KeySetList=Z,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.config-card-fieldset[data-v-68ca83ec]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-68ca83ec]{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-c96811e5] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-761f7e64]{align-items:center;border-bottom:var(--3ccdd5d2);box-sizing:border-box;display:var(--4b1da305);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-761f7e64]{box-sizing:border-box;padding-right:16px;width:var(--cd20788a)}.config-card-details-row .config-card-details-label label[data-v-761f7e64]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-761f7e64]{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-761f7e64]{min-width:0}.config-card-details-row .config-card-details-value[data-v-761f7e64]{box-sizing:border-box;width:var(--cd1becd4)}.config-card-details-row .config-card-details-value .truncated[data-v-761f7e64]{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-761f7e64]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-761f7e64] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-761f7e64]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-761f7e64]{margin-right:4px}.config-card-details-row[data-v-761f7e64] .k-label{margin-bottom:0}.config-card-details-row[data-v-761f7e64] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-761f7e64] .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(--454fa8c4);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d15be7fe]{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-7ef5c755]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-7ef5c755]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-7ef5c755]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-7ef5c755] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-7ef5c755]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-6210a67a]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form .form-actions[data-v-6210a67a]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.kong-ui-entity-base-form .form-actions[data-v-6210a67a] .k-button:last-of-type,.kong-ui-entity-base-form .form-actions[data-v-6210a67a] .k-button:nth-last-of-type(2){margin-left:16px}.kong-ui-entity-base-form[data-v-6210a67a] .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-6210a67a] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-6210a67a] .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-6210a67a] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.content-wrapper[data-v-b252463e] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-765e475b]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-765e475b]{margin-left:auto}.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-10fa27a5]{width:100%}.kong-ui-entity-filter-clear[data-v-10fa27a5]{cursor:pointer}.kong-ui-entity-filter[data-v-10fa27a5]{display:flex;position:relative}.kong-ui-entity-filter[data-v-10fa27a5] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-10fa27a5] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-10fa27a5]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-10fa27a5]{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-10fa27a5]{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-10fa27a5]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-10fa27a5]{color:#232633}.menu-item-expand-icon[data-v-10fa27a5]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-10fa27a5]{transform:rotate(180deg)}.menu-item-indicator[data-v-10fa27a5]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-10fa27a5]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-10fa27a5] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-10fa27a5] .k-input{width:100%}.menu-item-body[data-v-10fa27a5] .k-select-input .input{font-size:12px}.menu-item-body[data-v-10fa27a5] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-10fa27a5]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-10fa27a5]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-10fa27a5]{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}.kong-ui-public-entity-link[data-v-60e3ef7c]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-60e3ef7c]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-60e3ef7c]{display:flex}.kong-ui-public-entity-link .entity-link[data-v-60e3ef7c] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-60e3ef7c]{display:inline-block;font-weight:400;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-60e3ef7c]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-60e3ef7c]{margin-left:2px}.kong-ui-entities-key-sets-list[data-v-4d6fc369]{width:100%}.kong-ui-entities-key-sets-list .kong-ui-entity-filter-input[data-v-4d6fc369]{margin-right:12px}.kong-ui-entities-key-sets-form[data-v-d1b94475]{width:100%}
|
|
1
|
+
.config-card-fieldset[data-v-68ca83ec]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-68ca83ec]{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-c96811e5] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-761f7e64]{align-items:center;border-bottom:var(--3ccdd5d2);box-sizing:border-box;display:var(--4b1da305);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-761f7e64]{box-sizing:border-box;padding-right:16px;width:var(--cd20788a)}.config-card-details-row .config-card-details-label label[data-v-761f7e64]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-761f7e64]{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-761f7e64]{min-width:0}.config-card-details-row .config-card-details-value[data-v-761f7e64]{box-sizing:border-box;width:var(--cd1becd4)}.config-card-details-row .config-card-details-value .truncated[data-v-761f7e64]{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-761f7e64]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-761f7e64] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-761f7e64]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-761f7e64]{margin-right:4px}.config-card-details-row[data-v-761f7e64] .k-label{margin-bottom:0}.config-card-details-row[data-v-761f7e64] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-761f7e64] .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(--454fa8c4);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d15be7fe]{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-7ef5c755]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-7ef5c755]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-7ef5c755]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-7ef5c755] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-7ef5c755]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-6210a67a]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form .form-actions[data-v-6210a67a]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.kong-ui-entity-base-form .form-actions[data-v-6210a67a] .k-button:last-of-type,.kong-ui-entity-base-form .form-actions[data-v-6210a67a] .k-button:nth-last-of-type(2){margin-left:16px}.kong-ui-entity-base-form[data-v-6210a67a] .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-6210a67a] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-6210a67a] .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-6210a67a] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.content-wrapper[data-v-b252463e] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-499e74da]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-499e74da]{margin-left:auto}.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-10fa27a5]{width:100%}.kong-ui-entity-filter-clear[data-v-10fa27a5]{cursor:pointer}.kong-ui-entity-filter[data-v-10fa27a5]{display:flex;position:relative}.kong-ui-entity-filter[data-v-10fa27a5] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-10fa27a5] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-10fa27a5]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-10fa27a5]{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-10fa27a5]{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-10fa27a5]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-10fa27a5]{color:#232633}.menu-item-expand-icon[data-v-10fa27a5]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-10fa27a5]{transform:rotate(180deg)}.menu-item-indicator[data-v-10fa27a5]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-10fa27a5]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-10fa27a5] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-10fa27a5] .k-input{width:100%}.menu-item-body[data-v-10fa27a5] .k-select-input .input{font-size:12px}.menu-item-body[data-v-10fa27a5] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-10fa27a5]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-10fa27a5]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-10fa27a5]{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}.kong-ui-public-entity-link[data-v-60e3ef7c]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-60e3ef7c]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-60e3ef7c]{display:flex}.kong-ui-public-entity-link .entity-link[data-v-60e3ef7c] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-60e3ef7c]{display:inline-block;font-weight:400;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-60e3ef7c]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-60e3ef7c]{margin-left:2px}.kong-ui-entities-key-sets-list[data-v-e8613139]{width:100%}.kong-ui-entities-key-sets-list .kong-ui-entity-filter-input[data-v-e8613139]{margin-right:12px}.kong-ui-entities-key-sets-form[data-v-d1b94475]{width:100%}
|
|
@@ -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":"AAgdA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAEnC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAiBvC,OAAO,KAAK,EACV,2BAA2B,EAC3B,uBAAuB,EACvB,SAAS,EACT,gBAAgB,EACjB,MAAM,UAAU,CAAA;AASjB,OAAO,gDAAgD,CAAA;;IAmxBrD,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;;;AAhD7E,wBA0DG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/entities-key-sets",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.55",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/entities-key-sets.umd.js",
|
|
6
6
|
"module": "./dist/entities-key-sets.es.js",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"axios": "^1.7.7",
|
|
27
27
|
"vue": ">= 3.3.13 < 4",
|
|
28
28
|
"vue-router": "^4.4.5",
|
|
29
|
-
"@kong-ui-public/
|
|
30
|
-
"@kong-ui-public/
|
|
29
|
+
"@kong-ui-public/i18n": "^2.2.9",
|
|
30
|
+
"@kong-ui-public/entities-shared": "^3.10.14"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@kong/icons": "^1.20.0",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"axios": "^1.7.7",
|
|
36
36
|
"vue": "^3.5.12",
|
|
37
37
|
"vue-router": "^4.4.5",
|
|
38
|
-
"@kong-ui-public/entities-shared": "^3.10.
|
|
38
|
+
"@kong-ui-public/entities-shared": "^3.10.14",
|
|
39
39
|
"@kong-ui-public/i18n": "^2.2.9"
|
|
40
40
|
},
|
|
41
41
|
"repository": {
|