@kong-ui-public/entities-key-sets 3.8.8 → 3.8.10

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 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 = {
1
+ import { defineComponent as z, ref as S, computed as v, watch as we, onBeforeMount as Ee, resolveComponent as D, createElementBlock as Q, openBlock as F, createVNode as i, unref as n, createSlots as te, withCtx as l, createTextVNode as E, toDisplayString as I, createElementVNode as ae, createBlock as G, Teleport as Ke, createCommentVNode as ne, reactive as oe } from "vue";
2
+ import { BookIcon as se, AddIcon as ie, KeyIcon as $e } from "@kong/icons";
3
+ import { useRouter as le } from "vue-router";
4
+ import { createI18n as Me, i18nTComponent as De } from "@kong-ui-public/i18n";
5
+ import { useAxios as ce, useTableState as Fe, useFetcher as Re, useDeleteUrlBuilder as Te, FetcherStatus as Be, EntityBaseTable as Ve, PermissionsWrapper as P, TableTags as xe, EntityFilter as Oe, EntityDeleteModal as qe, EntityTypes as Pe, useErrors as Ne, EntityBaseFormType as re, EntityBaseForm as Ue, SupportedEntityType as de, EntityFormSection as je, EntityBaseConfigCard as Ae } from "@kong-ui-public/entities-shared";
6
+ const Je = {
7
7
  title: "Key Sets",
8
8
  list: {
9
9
  toolbar_actions: {
@@ -22,7 +22,8 @@ const je = {
22
22
  title: "Configure your first key set",
23
23
  group: "Key sets created in gateways within this group will automatically appear here.",
24
24
  description: "Key sets centrally manage asymmetric keys for plugins like OpenID Connect and JWT, simplifying configuration and security across services.",
25
- create_cta: "New key set"
25
+ create_cta: "New key set",
26
+ learn_more: "Learn more"
26
27
  }
27
28
  },
28
29
  actions: {
@@ -70,35 +71,35 @@ const je = {
70
71
  }
71
72
  }
72
73
  }
73
- }, Je = {
74
- keySets: je
74
+ }, Le = {
75
+ keySets: Je
75
76
  };
76
- function Le() {
77
- const e = Ke("en-us", Je);
77
+ function Ge() {
78
+ const e = Me("en-us", Le);
78
79
  return {
79
80
  i18n: e,
80
- i18nT: $e(e)
81
+ i18nT: De(e)
81
82
  // Translation component <i18n-t>
82
83
  };
83
84
  }
84
- const Q = {
85
- useI18n: Le
86
- }, z = "/v2/control-planes/{controlPlaneId}/core-entities", G = "/{workspace}", A = {
85
+ const X = {
86
+ useI18n: Ge
87
+ }, H = "/v2/control-planes/{controlPlaneId}/core-entities", W = "/{workspace}", N = {
87
88
  list: {
88
- konnect: `${z}/key-sets`,
89
- kongManager: `${G}/key-sets`
89
+ konnect: `${H}/key-sets`,
90
+ kongManager: `${W}/key-sets`
90
91
  },
91
92
  form: {
92
93
  konnect: {
93
- create: `${z}/key-sets`,
94
- edit: `${z}/key-sets/{id}`
94
+ create: `${H}/key-sets`,
95
+ edit: `${H}/key-sets/{id}`
95
96
  },
96
97
  kongManager: {
97
- create: `${G}/key-sets`,
98
- edit: `${G}/key-sets/{id}`
98
+ create: `${W}/key-sets`,
99
+ edit: `${W}/key-sets/{id}`
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
+ }, He = { class: "kong-ui-entities-key-sets-list" }, We = { class: "button-row" }, ze = /* @__PURE__ */ z({
102
103
  __name: "KeySetList",
103
104
  props: {
104
105
  /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
@@ -143,46 +144,46 @@ const Q = {
143
144
  }
144
145
  },
145
146
  emits: ["error", "click:learn-more", "copy:success", "copy:error", "delete:success"],
146
- setup(e, { emit: I }) {
147
+ setup(e, { emit: _ }) {
147
148
  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), _ = {
149
+ const m = _, t = e, { i18n: { t: o } } = X.useI18n(), g = le(), { axiosInstance: h } = ce((Z = t.config) == null ? void 0 : Z.axiosRequestConfig), { hasRecords: k, handleStateChange: U } = Fe(() => b.value), R = v(() => k.value && t.config.app === "konnect"), d = v(() => t.config.app !== "kongManager" || !!t.config.disableSorting), K = {
149
150
  // the Name column is non-hidable
150
151
  name: { label: o("keySets.list.table_headers.name"), searchable: !0, sortable: !0, hidable: !1 },
151
152
  tags: { label: o("keySets.list.table_headers.tags") },
152
153
  id: { label: o("keySets.list.table_headers.id"), sortable: !0 }
153
- }, P = _, V = h(() => {
154
+ }, j = K, x = v(() => {
154
155
  var s, p;
155
- let a = `${t.config.apiBaseUrl}${A.list[t.config.app]}`;
156
+ let a = `${t.config.apiBaseUrl}${N.list[t.config.app]}`;
156
157
  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;
157
- }), S = C(""), D = h(() => {
158
+ }), b = S(""), T = v(() => {
158
159
  const a = t.config.app === "konnect" || t.config.isExactMatch;
159
160
  if (a)
160
161
  return {
161
162
  isExactMatch: a,
162
163
  placeholder: o("keySets.search.placeholder")
163
164
  };
164
- const s = { name: _.name };
165
+ const s = { name: K.name };
165
166
  return {
166
167
  isExactMatch: a,
167
168
  fields: s,
168
169
  schema: t.config.filterSchema
169
170
  };
170
171
  }), {
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) => {
172
+ fetcher: $,
173
+ fetcherState: A,
174
+ fetcherCacheKey: M
175
+ } = Re(v(() => ({ ...t.config, cacheIdentifier: t.cacheIdentifier })), x), r = () => {
176
+ b.value = "";
177
+ }, u = () => {
178
+ M.value++;
179
+ }, c = S(null), y = async (a, s) => {
179
180
  const p = a.id;
180
181
  if (!await s(p)) {
181
- de(a, "id");
182
+ pe(a, "id");
182
183
  return;
183
184
  }
184
- ce(a, "id");
185
- }, le = async (a, s) => {
185
+ ye(a, "id");
186
+ }, fe = async (a, s) => {
186
187
  const p = JSON.stringify(a);
187
188
  if (!await s(p)) {
188
189
  m("copy:error", {
@@ -195,123 +196,123 @@ const Q = {
195
196
  entity: a,
196
197
  message: o("keySets.copy.success_brief")
197
198
  });
198
- }, ce = (a, s) => {
199
+ }, ye = (a, s) => {
199
200
  m("copy:success", {
200
201
  entity: a,
201
202
  field: s,
202
203
  message: o("keySets.copy.success", { val: a[s] })
203
204
  });
204
- }, de = (a, s) => {
205
+ }, pe = (a, s) => {
205
206
  m("copy:error", {
206
207
  entity: a,
207
208
  field: s,
208
209
  message: o("keySets.errors.copy")
209
210
  });
210
- }, ue = async (a) => {
211
+ }, me = async (a) => {
211
212
  var p;
212
213
  await ((p = t.canRetrieve) == null ? void 0 : p.call(t, a)) && g.push(t.config.getViewRoute(a.id));
213
- }, fe = (a) => ({
214
+ }, ge = (a) => ({
214
215
  label: o("keySets.actions.view"),
215
216
  to: t.config.getViewRoute(a)
216
- }), ye = (a) => ({
217
+ }), ke = (a) => ({
217
218
  label: o("keySets.actions.edit"),
218
219
  to: t.config.getEditRoute(a)
219
- }), w = C(void 0), x = C(!1), U = C(!1), X = C(""), pe = Re(t.config, V.value), me = (a) => {
220
- w.value = a, x.value = !0;
221
- }, ge = () => {
222
- x.value = !1;
223
- }, ke = async () => {
220
+ }), w = S(void 0), O = S(!1), q = S(!1), Y = S(""), ve = Te(t.config, x.value), he = (a) => {
221
+ w.value = a, O.value = !0;
222
+ }, Se = () => {
223
+ O.value = !1;
224
+ }, be = async () => {
224
225
  var a, s, p;
225
226
  if ((a = w.value) != null && a.id) {
226
- U.value = !0;
227
+ q.value = !0;
227
228
  try {
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);
229
+ await h.delete(ve(w.value.id)), q.value = !1, O.value = !1, M.value++, m("delete:success", w.value);
230
+ } catch (C) {
231
+ Y.value = ((p = (s = C.response) == null ? void 0 : s.data) == null ? void 0 : p.message) || C.message || o("keySets.errors.delete"), m("error", C);
231
232
  } finally {
232
- U.value = !1;
233
+ q.value = !1;
233
234
  }
234
235
  }
235
- }, he = () => {
236
+ }, Ce = () => {
236
237
  g.push(t.config.createRoute);
237
238
  };
238
- Se(j, (a) => {
239
- var s, p, b;
240
- if (a.status === Fe.Error) {
241
- l.value = {
239
+ we(A, (a) => {
240
+ var s, p, C;
241
+ if (a.status === Be.Error) {
242
+ c.value = {
242
243
  title: o("keySets.errors.general")
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);
244
+ }, (C = (p = (s = a.error) == null ? void 0 : s.response) == null ? void 0 : p.data) != null && C.message && (c.value.message = a.error.response.data.message), m("error", a.error);
244
245
  return;
245
246
  }
246
- l.value = null;
247
+ c.value = null;
247
248
  });
248
- const J = C({
249
+ const J = S({
249
250
  ctaPath: t.config.createRoute,
250
251
  ctaText: void 0,
251
252
  message: `${o("keySets.list.empty_state.description")}${t.config.additionMessageForEmptyState ? ` ${t.config.additionMessageForEmptyState}` : ""}`,
252
253
  title: o("keySets.title")
253
- });
254
- return be(async () => {
255
- await t.canCreate() && (J.value.title = o("keySets.list.empty_state.title"), J.value.ctaText = o("keySets.actions.create"));
254
+ }), L = S(!1);
255
+ return Ee(async () => {
256
+ L.value = await t.canCreate(), L.value && (J.value.title = o("keySets.list.empty_state.title"), J.value.ctaText = o("keySets.actions.create"));
256
257
  }), (a, s) => {
257
- const p = B("KButton"), b = B("KCopy"), R = B("KDropdownItem"), Y = B("KClipboardProvider");
258
- return O(), W("div", He, [
259
- i(n(Te), {
258
+ const p = D("KButton"), C = D("KEmptyState"), Ie = D("KCopy"), B = D("KDropdownItem"), ee = D("KClipboardProvider");
259
+ return F(), Q("div", He, [
260
+ i(n(Ve), {
260
261
  "cache-identifier": e.cacheIdentifier,
261
- "disable-sorting": c.value,
262
+ "disable-sorting": d.value,
262
263
  "empty-state-options": J.value,
263
264
  "enable-entity-actions": "",
264
- "error-message": l.value,
265
- fetcher: n(E),
266
- "fetcher-cache-key": n(K),
265
+ "error-message": c.value,
266
+ fetcher: n($),
267
+ "fetcher-cache-key": n(M),
267
268
  "pagination-type": "offset",
268
269
  "preferences-storage-key": "kong-ui-entities-key-sets-list",
269
- query: S.value,
270
- "table-headers": n(P),
270
+ query: b.value,
271
+ "table-headers": n(j),
271
272
  onClearSearchInput: r,
272
- "onClick:row": s[3] || (s[3] = (u) => ue(u)),
273
- onSort: d,
274
- onState: n(N)
275
- }, ee({
276
- "toolbar-filter": f(() => [
273
+ "onClick:row": s[3] || (s[3] = (f) => me(f)),
274
+ onSort: u,
275
+ onState: n(U)
276
+ }, te({
277
+ "toolbar-filter": l(() => [
277
278
  i(n(Oe), {
278
- modelValue: S.value,
279
- "onUpdate:modelValue": s[0] || (s[0] = (u) => S.value = u),
280
- config: D.value
279
+ modelValue: b.value,
280
+ "onUpdate:modelValue": s[0] || (s[0] = (f) => b.value = f),
281
+ config: T.value
281
282
  }, null, 8, ["modelValue", "config"])
282
283
  ]),
283
- "toolbar-button": f(() => [
284
- (O(), te(Ce, {
284
+ "toolbar-button": l(() => [
285
+ (F(), G(Ke, {
285
286
  disabled: !e.useActionOutside,
286
287
  to: "#kong-ui-app-page-header-action-button"
287
288
  }, [
288
- L("div", We, [
289
- M.value ? (O(), te(p, {
289
+ ae("div", We, [
290
+ R.value ? (F(), G(p, {
290
291
  key: 0,
291
292
  appearance: "secondary",
292
293
  class: "open-learning-hub",
293
294
  "data-testid": "keys-set-learn-more-button",
294
295
  icon: "",
295
- onClick: s[1] || (s[1] = (u) => a.$emit("click:learn-more"))
296
+ onClick: s[1] || (s[1] = (f) => a.$emit("click:learn-more"))
296
297
  }, {
297
- default: f(() => [
298
- i(n(we), { decorative: "" })
298
+ default: l(() => [
299
+ i(n(se), { decorative: "" })
299
300
  ]),
300
301
  _: 1
301
- })) : Ie("", !0),
302
- i(n(q), {
302
+ })) : ne("", !0),
303
+ i(n(P), {
303
304
  "auth-function": () => e.canCreate()
304
305
  }, {
305
- default: f(() => [
306
+ default: l(() => [
306
307
  i(p, {
307
308
  appearance: "primary",
308
309
  "data-testid": "toolbar-add-key-set",
309
310
  size: e.useActionOutside ? "medium" : "large",
310
311
  to: e.config.createRoute
311
312
  }, {
312
- default: f(() => [
313
- i(n(_e)),
314
- T(" " + $(n(o)("keySets.list.toolbar_actions.new_key_set")), 1)
313
+ default: l(() => [
314
+ i(n(ie)),
315
+ E(" " + I(n(o)("keySets.list.toolbar_actions.new_key_set")), 1)
315
316
  ]),
316
317
  _: 1
317
318
  }, 8, ["size", "to"])
@@ -321,82 +322,82 @@ const Q = {
321
322
  ])
322
323
  ], 8, ["disabled"]))
323
324
  ]),
324
- name: f(({ rowValue: u }) => [
325
- L("b", null, $(u ?? "-"), 1)
325
+ name: l(({ rowValue: f }) => [
326
+ ae("b", null, I(f ?? "-"), 1)
326
327
  ]),
327
- tags: f(({ rowValue: u }) => [
328
- i(n(Be), { tags: u }, null, 8, ["tags"])
328
+ tags: l(({ rowValue: f }) => [
329
+ i(n(xe), { tags: f }, null, 8, ["tags"])
329
330
  ]),
330
- id: f(({ rowValue: u }) => [
331
- i(b, {
332
- text: u,
331
+ id: l(({ rowValue: f }) => [
332
+ i(Ie, {
333
+ text: f,
333
334
  truncate: ""
334
335
  }, null, 8, ["text"])
335
336
  ]),
336
- actions: f(({ row: u }) => [
337
- i(Y, null, {
338
- default: f(({ copyToClipboard: F }) => [
339
- i(R, {
337
+ actions: l(({ row: f }) => [
338
+ i(ee, null, {
339
+ default: l(({ copyToClipboard: V }) => [
340
+ i(B, {
340
341
  "data-testid": "action-entity-copy-id",
341
- onClick: (ve) => y(u, F)
342
+ onClick: (_e) => y(f, V)
342
343
  }, {
343
- default: f(() => [
344
- T($(n(o)("keySets.actions.copy_id")), 1)
344
+ default: l(() => [
345
+ E(I(n(o)("keySets.actions.copy_id")), 1)
345
346
  ]),
346
347
  _: 2
347
348
  }, 1032, ["onClick"])
348
349
  ]),
349
350
  _: 2
350
351
  }, 1024),
351
- i(Y, null, {
352
- default: f(({ copyToClipboard: F }) => [
353
- i(R, {
352
+ i(ee, null, {
353
+ default: l(({ copyToClipboard: V }) => [
354
+ i(B, {
354
355
  "data-testid": "action-entity-copy-json",
355
- onClick: (ve) => le(u, F)
356
+ onClick: (_e) => fe(f, V)
356
357
  }, {
357
- default: f(() => [
358
- T($(n(o)("keySets.actions.copy_json")), 1)
358
+ default: l(() => [
359
+ E(I(n(o)("keySets.actions.copy_json")), 1)
359
360
  ]),
360
361
  _: 2
361
362
  }, 1032, ["onClick"])
362
363
  ]),
363
364
  _: 2
364
365
  }, 1024),
365
- i(n(q), {
366
- "auth-function": () => e.canRetrieve(u)
366
+ i(n(P), {
367
+ "auth-function": () => e.canRetrieve(f)
367
368
  }, {
368
- default: f(() => [
369
- i(R, {
369
+ default: l(() => [
370
+ i(B, {
370
371
  "data-testid": "action-entity-view",
371
372
  "has-divider": "",
372
- item: fe(u.id)
373
+ item: ge(f.id)
373
374
  }, null, 8, ["item"])
374
375
  ]),
375
376
  _: 2
376
377
  }, 1032, ["auth-function"]),
377
- i(n(q), {
378
- "auth-function": () => e.canEdit(u)
378
+ i(n(P), {
379
+ "auth-function": () => e.canEdit(f)
379
380
  }, {
380
- default: f(() => [
381
- i(R, {
381
+ default: l(() => [
382
+ i(B, {
382
383
  "data-testid": "action-entity-edit",
383
- item: ye(u.id)
384
+ item: ke(f.id)
384
385
  }, null, 8, ["item"])
385
386
  ]),
386
387
  _: 2
387
388
  }, 1032, ["auth-function"]),
388
- i(n(q), {
389
- "auth-function": () => e.canDelete(u)
389
+ i(n(P), {
390
+ "auth-function": () => e.canDelete(f)
390
391
  }, {
391
- default: f(() => [
392
- i(R, {
392
+ default: l(() => [
393
+ i(B, {
393
394
  danger: "",
394
395
  "data-testid": "action-entity-delete",
395
396
  "has-divider": "",
396
- onClick: (F) => me(u)
397
+ onClick: (V) => he(f)
397
398
  }, {
398
- default: f(() => [
399
- T($(n(o)("keySets.actions.delete")), 1)
399
+ default: l(() => [
400
+ E(I(n(o)("keySets.actions.delete")), 1)
400
401
  ]),
401
402
  _: 2
402
403
  }, 1032, ["onClick"])
@@ -406,65 +407,79 @@ const Q = {
406
407
  ]),
407
408
  _: 2
408
409
  }, [
409
- !S.value && e.config.app === "konnect" ? {
410
+ !b.value && e.config.app === "konnect" ? {
410
411
  name: "empty-state",
411
- fn: f(() => {
412
- var u;
412
+ fn: l(() => {
413
+ var f;
413
414
  return [
414
- i(n(Ve), {
415
- "action-button-text": n(o)("keySets.list.empty_state_v2.create_cta"),
416
- appearance: "secondary",
417
- "can-create": () => e.canCreate(),
415
+ i(C, {
418
416
  "data-testid": "key-sets-entity-empty-state",
419
- description: n(o)("keySets.list.empty_state_v2.description"),
420
- "learn-more": e.config.app === "konnect",
421
- title: n(o)("keySets.list.empty_state_v2.title"),
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),
429
- size: n(Ge)
430
- }, null, 8, ["color", "size"])
431
- ])
417
+ "icon-background": "",
418
+ message: n(o)("keySets.list.empty_state_v2.description"),
419
+ title: n(o)("keySets.list.empty_state_v2.title")
420
+ }, te({
421
+ icon: l(() => [
422
+ i(n($e), { decorative: "" })
423
+ ]),
424
+ action: l(() => [
425
+ L.value ? (F(), G(p, {
426
+ key: 0,
427
+ "data-testid": "entity-create-button",
428
+ onClick: Ce
429
+ }, {
430
+ default: l(() => [
431
+ i(n(ie), { decorative: "" }),
432
+ E(" " + I(n(o)("keySets.list.empty_state_v2.create_cta")), 1)
433
+ ]),
434
+ _: 1
435
+ })) : ne("", !0),
436
+ i(p, {
437
+ appearance: "secondary",
438
+ "data-testid": "entity-learn-more-button",
439
+ onClick: s[2] || (s[2] = (V) => a.$emit("click:learn-more"))
440
+ }, {
441
+ default: l(() => [
442
+ i(n(se), { decorative: "" }),
443
+ E(" " + I(n(o)("keySets.list.empty_state_v2.learn_more")), 1)
444
+ ]),
445
+ _: 1
446
+ })
432
447
  ]),
433
448
  _: 2
434
449
  }, [
435
- (u = e.config) != null && u.isControlPlaneGroup ? {
436
- name: "message",
437
- fn: f(() => [
438
- T($(n(o)("keySets.list.empty_state_v2.group")), 1)
450
+ (f = e.config) != null && f.isControlPlaneGroup ? {
451
+ name: "default",
452
+ fn: l(() => [
453
+ E(I(n(o)("keySets.list.empty_state_v2.group")), 1)
439
454
  ]),
440
455
  key: "0"
441
456
  } : void 0
442
- ]), 1032, ["action-button-text", "can-create", "description", "learn-more", "title"])
457
+ ]), 1032, ["message", "title"])
443
458
  ];
444
459
  }),
445
460
  key: "0"
446
461
  } : void 0
447
462
  ]), 1032, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "onState"]),
448
- i(n(xe), {
449
- "action-pending": U.value,
463
+ i(n(qe), {
464
+ "action-pending": q.value,
450
465
  description: n(o)("keySets.delete.description"),
451
466
  "entity-name": w.value && (w.value.name || w.value.id),
452
- "entity-type": n(Ue).KeySet,
453
- error: X.value,
467
+ "entity-type": n(Pe).KeySet,
468
+ error: Y.value,
454
469
  title: n(o)("keySets.delete.title"),
455
- visible: x.value,
456
- onCancel: ge,
457
- onProceed: ke
470
+ visible: O.value,
471
+ onCancel: Se,
472
+ onProceed: be
458
473
  }, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
459
474
  ]);
460
475
  };
461
476
  }
462
- }), re = (e, I) => {
477
+ }), ue = (e, _) => {
463
478
  const m = e.__vccOpts || e;
464
- for (const [t, o] of I)
479
+ for (const [t, o] of _)
465
480
  m[t] = o;
466
481
  return m;
467
- }, it = /* @__PURE__ */ re(Xe, [["__scopeId", "data-v-3da8907e"]]), Ze = { class: "kong-ui-entities-key-sets-form" }, Ye = /* @__PURE__ */ H({
482
+ }, ot = /* @__PURE__ */ ue(ze, [["__scopeId", "data-v-afe99dbd"]]), Qe = { class: "kong-ui-entities-key-sets-form" }, Xe = /* @__PURE__ */ z({
468
483
  __name: "KeySetForm",
469
484
  props: {
470
485
  /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
@@ -481,87 +496,87 @@ const Q = {
481
496
  }
482
497
  },
483
498
  emits: ["update", "error", "loading"],
484
- setup(e, { emit: I }) {
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({
499
+ setup(e, { emit: _ }) {
500
+ var M;
501
+ const m = _, t = e, o = le(), { i18n: { t: g } } = X.useI18n(), { getMessageFromError: h } = Ne(), { axiosInstance: k } = ce((M = t.config) == null ? void 0 : M.axiosRequestConfig), U = v(() => N.form[t.config.app].edit), R = v(() => t.keySetId ? re.Edit : re.Create), d = oe({
487
502
  fields: {
488
503
  name: "",
489
504
  tags: ""
490
505
  },
491
506
  isReadonly: !1,
492
507
  errorMessage: ""
493
- }), _ = ae({
508
+ }), K = oe({
494
509
  name: "",
495
510
  tags: ""
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 = () => {
511
+ }), j = v(() => JSON.stringify(d.fields) !== JSON.stringify(K) && !!d.fields.name), x = (r) => {
512
+ var u;
513
+ d.fields.name = (r == null ? void 0 : r.name) || "", d.fields.tags = ((u = r == null ? void 0 : r.tags) == null ? void 0 : u.join(", ")) || "", Object.assign(K, d.fields);
514
+ }, b = () => {
500
515
  o.push(t.config.cancelRoute);
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;
516
+ }, T = v(() => {
517
+ var u, c;
518
+ let r = `${t.config.apiBaseUrl}${N.form[t.config.app][R.value]}`;
519
+ return t.config.app === "konnect" ? r = r.replace(/{controlPlaneId}/gi, ((u = t.config) == null ? void 0 : u.controlPlaneId) || "") : t.config.app === "kongManager" && (r = r.replace(/\/{workspace}/gi, (c = t.config) != null && c.workspace ? `/${t.config.workspace}` : "")), r = r.replace(/{id}/gi, t.keySetId), r;
520
+ }), $ = v(() => {
521
+ var r, u, c;
507
522
  return {
508
- name: c.fields.name,
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 !== "")) || ""
523
+ name: d.fields.name,
524
+ tags: ((c = (u = (r = d.fields.tags) == null ? void 0 : r.split(",")) == null ? void 0 : u.map((y) => String(y || "").trim())) == null ? void 0 : c.filter((y) => y !== "")) || ""
510
525
  };
511
- }), j = async () => {
512
- var r, d;
526
+ }), A = async () => {
527
+ var r, u;
513
528
  try {
514
- c.isReadonly = !0;
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);
529
+ d.isReadonly = !0;
530
+ let c;
531
+ if (R.value === "create" ? c = await k.post(T.value, $.value) : R.value === "edit" && (c = ((r = t.config) == null ? void 0 : r.app) === "konnect" ? await k.put(T.value, $.value) : await k.patch(T.value, $.value)), c) {
532
+ const { data: y } = c;
533
+ d.fields.name = (y == null ? void 0 : y.name) || "", d.fields.tags = ((u = y == null ? void 0 : y.tags) == null ? void 0 : u.join(", ")) || "", Object.assign(K, d.fields), m("update", c == null ? void 0 : c.data);
519
534
  }
520
- } catch (l) {
521
- c.errorMessage = v(l), m("error", l);
535
+ } catch (c) {
536
+ d.errorMessage = h(c), m("error", c);
522
537
  } finally {
523
- c.isReadonly = !1;
538
+ d.isReadonly = !1;
524
539
  }
525
540
  };
526
- return (r, d) => {
527
- const l = B("KInput");
528
- return O(), W("div", Ze, [
529
- i(n(Ae), {
530
- "can-submit": P.value,
541
+ return (r, u) => {
542
+ const c = D("KInput");
543
+ return F(), Q("div", Qe, [
544
+ i(n(Ue), {
545
+ "can-submit": j.value,
531
546
  config: e.config,
532
547
  "edit-id": e.keySetId,
533
- "entity-type": n(ie).KeySet,
534
- "error-message": c.errorMessage,
535
- "fetch-url": N.value,
536
- "form-fields": E.value,
537
- "is-readonly": c.isReadonly,
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)),
542
- onSubmit: j
548
+ "entity-type": n(de).KeySet,
549
+ "error-message": d.errorMessage,
550
+ "fetch-url": U.value,
551
+ "form-fields": $.value,
552
+ "is-readonly": d.isReadonly,
553
+ onCancel: b,
554
+ "onFetch:error": u[2] || (u[2] = (y) => r.$emit("error", y)),
555
+ "onFetch:success": x,
556
+ onLoading: u[3] || (u[3] = (y) => r.$emit("loading", y)),
557
+ onSubmit: A
543
558
  }, {
544
- default: f(() => [
545
- i(n(Ne), {
559
+ default: l(() => [
560
+ i(n(je), {
546
561
  description: n(g)("keySets.form.sections.general.description"),
547
562
  "has-divider": "",
548
563
  title: n(g)("keySets.form.sections.general.title")
549
564
  }, {
550
- default: f(() => [
551
- i(l, {
552
- modelValue: c.fields.name,
553
- "onUpdate:modelValue": d[0] || (d[0] = (y) => c.fields.name = y),
565
+ default: l(() => [
566
+ i(c, {
567
+ modelValue: d.fields.name,
568
+ "onUpdate:modelValue": u[0] || (u[0] = (y) => d.fields.name = y),
554
569
  modelModifiers: { trim: !0 },
555
570
  autocomplete: "off",
556
571
  "data-testid": "key-set-form-name",
557
572
  label: n(g)("keySets.form.fields.name.label"),
558
573
  placeholder: n(g)("keySets.form.fields.name.placeholder"),
559
- readonly: c.isReadonly,
574
+ readonly: d.isReadonly,
560
575
  type: "text"
561
576
  }, null, 8, ["modelValue", "label", "placeholder", "readonly"]),
562
- i(l, {
563
- modelValue: c.fields.tags,
564
- "onUpdate:modelValue": d[1] || (d[1] = (y) => c.fields.tags = y),
577
+ i(c, {
578
+ modelValue: d.fields.tags,
579
+ "onUpdate:modelValue": u[1] || (u[1] = (y) => d.fields.tags = y),
565
580
  modelModifiers: { trim: !0 },
566
581
  autocomplete: "off",
567
582
  "data-testid": "key-set-form-tags",
@@ -572,7 +587,7 @@ const Q = {
572
587
  tooltipAttributes: { maxWidth: "400" }
573
588
  },
574
589
  placeholder: n(g)("keySets.form.fields.tags.placeholder"),
575
- readonly: c.isReadonly,
590
+ readonly: d.isReadonly,
576
591
  type: "text"
577
592
  }, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"])
578
593
  ]),
@@ -584,7 +599,7 @@ const Q = {
584
599
  ]);
585
600
  };
586
601
  }
587
- }), rt = /* @__PURE__ */ re(Ye, [["__scopeId", "data-v-a4b01cc5"]]), et = { class: "kong-ui-entities-keys-entity-config-card" }, lt = /* @__PURE__ */ H({
602
+ }), st = /* @__PURE__ */ ue(Xe, [["__scopeId", "data-v-a4b01cc5"]]), Ye = { class: "kong-ui-entities-keys-entity-config-card" }, it = /* @__PURE__ */ z({
588
603
  __name: "KeySetConfigCard",
589
604
  props: {
590
605
  /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
@@ -611,7 +626,7 @@ const Q = {
611
626
  },
612
627
  emits: ["loading", "fetch:error", "fetch:success"],
613
628
  setup(e) {
614
- const I = e, { i18n: { t: m } } = Q.useI18n(), t = h(() => A.form[I.config.app].edit), o = C({
629
+ const _ = e, { i18n: { t: m } } = X.useI18n(), t = v(() => N.form[_.config.app].edit), o = S({
615
630
  id: {},
616
631
  name: {},
617
632
  last_updated: {},
@@ -620,23 +635,23 @@ const Q = {
620
635
  tooltip: m("keySets.form.fields.tags.tooltip")
621
636
  }
622
637
  });
623
- return (g, v) => (O(), W("div", et, [
624
- i(n(Pe), {
638
+ return (g, h) => (F(), Q("div", Ye, [
639
+ i(n(Ae), {
625
640
  config: e.config,
626
641
  "config-card-doc": e.configCardDoc,
627
642
  "config-schema": o.value,
628
- "entity-type": n(ie).KeySet,
643
+ "entity-type": n(de).KeySet,
629
644
  "fetch-url": t.value,
630
645
  "hide-title": e.hideTitle,
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))
646
+ "onFetch:error": h[0] || (h[0] = (k) => g.$emit("fetch:error", k)),
647
+ "onFetch:success": h[1] || (h[1] = (k) => g.$emit("fetch:success", k)),
648
+ onLoading: h[2] || (h[2] = (k) => g.$emit("loading", k))
634
649
  }, null, 8, ["config", "config-card-doc", "config-schema", "entity-type", "fetch-url", "hide-title"])
635
650
  ]));
636
651
  }
637
652
  });
638
653
  export {
639
- lt as KeySetConfigCard,
640
- rt as KeySetForm,
641
- it as KeySetList
654
+ it as KeySetConfigCard,
655
+ st as KeySetForm,
656
+ ot as KeySetList
642
657
  };
@@ -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,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-3da8907e"]]),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"})});
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,I,L,J,l){"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."},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",learn_more:"Learn more"}},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=J.createI18n("en-us",Q);return{i18n:t,i18nT:J.i18nTComponent(t)}}const F={useI18n:X},R="/v2/control-planes/{controlPlaneId}/core-entities",q="/{workspace}",B={list:{konnect:`${R}/key-sets`,kongManager:`${q}/key-sets`},form:{konnect:{create:`${R}/key-sets`,edit:`${R}/key-sets/{id}`},kongManager:{create:`${q}/key-sets`,edit:`${q}/key-sets/{id}`}}},Y={class:"kong-ui-entities-key-sets-list"},Z={class:"button-row"},v=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 H;const u=S,o=t,{i18n:{t:a}}=F.useI18n(),m=L.useRouter(),{axiosInstance:h}=l.useAxios((H=o.config)==null?void 0:H.axiosRequestConfig),{hasRecords:k,handleStateChange:P}=l.useTableState(()=>b.value),_=e.computed(()=>k.value&&o.config.app==="konnect"),c=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}},O=V,D=e.computed(()=>{var r,y;let n=`${o.config.apiBaseUrl}${B.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,(y=o.config)!=null&&y.workspace?`/${o.config.workspace}`:"")),n}),b=e.ref(""),E=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:N,fetcherState:j,fetcherCacheKey:x}=l.useFetcher(e.computed(()=>({...o.config,cacheIdentifier:o.cacheIdentifier})),D),s=()=>{b.value=""},d=()=>{x.value++},i=e.ref(null),p=async(n,r)=>{const y=n.id;if(!await r(y)){ie(n,"id");return}se(n,"id")},re=async(n,r)=>{const y=JSON.stringify(n);if(!await r(y)){u("copy:error",{entity:n,message:a("keySets.errors.copy")});return}u("copy:success",{entity:n,message:a("keySets.copy.success_brief")})},se=(n,r)=>{u("copy:success",{entity:n,field:r,message:a("keySets.copy.success",{val:n[r]})})},ie=(n,r)=>{u("copy:error",{entity:n,field:r,message:a("keySets.errors.copy")})},le=async n=>{var y;await((y=o.canRetrieve)==null?void 0:y.call(o,n))&&m.push(o.config.getViewRoute(n.id))},ce=n=>({label:a("keySets.actions.view"),to:o.config.getViewRoute(n)}),de=n=>({label:a("keySets.actions.edit"),to:o.config.getEditRoute(n)}),w=e.ref(void 0),$=e.ref(!1),M=e.ref(!1),G=e.ref(""),fe=l.useDeleteUrlBuilder(o.config,D.value),pe=n=>{w.value=n,$.value=!0},ye=()=>{$.value=!1},ue=async()=>{var n,r,y;if((n=w.value)!=null&&n.id){M.value=!0;try{await h.delete(fe(w.value.id)),M.value=!1,$.value=!1,x.value++,u("delete:success",w.value)}catch(C){G.value=((y=(r=C.response)==null?void 0:r.data)==null?void 0:y.message)||C.message||a("keySets.errors.delete"),u("error",C)}finally{M.value=!1}}},me=()=>{m.push(o.config.createRoute)};e.watch(j,n=>{var r,y,C;if(n.status===l.FetcherStatus.Error){i.value={title:a("keySets.errors.general")},(C=(y=(r=n.error)==null?void 0:r.response)==null?void 0:y.data)!=null&&C.message&&(i.value.message=n.error.response.data.message),u("error",n.error);return}i.value=null});const A=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")}),U=e.ref(!1);return e.onBeforeMount(async()=>{U.value=await o.canCreate(),U.value&&(A.value.title=a("keySets.list.empty_state.title"),A.value.ctaText=a("keySets.actions.create"))}),(n,r)=>{const y=e.resolveComponent("KButton"),C=e.resolveComponent("KEmptyState"),ge=e.resolveComponent("KCopy"),K=e.resolveComponent("KDropdownItem"),z=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",Y,[e.createVNode(e.unref(l.EntityBaseTable),{"cache-identifier":t.cacheIdentifier,"disable-sorting":c.value,"empty-state-options":A.value,"enable-entity-actions":"","error-message":i.value,fetcher:e.unref(N),"fetcher-cache-key":e.unref(x),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-key-sets-list",query:b.value,"table-headers":e.unref(O),onClearSearchInput:s,"onClick:row":r[3]||(r[3]=f=>le(f)),onSort:d,onState:e.unref(P)},e.createSlots({"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(l.EntityFilter),{modelValue:b.value,"onUpdate:modelValue":r[0]||(r[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",Z,[_.value?(e.openBlock(),e.createBlock(y,{key:0,appearance:"secondary",class:"open-learning-hub","data-testid":"keys-set-learn-more-button",icon:"",onClick:r[1]||(r[1]=f=>n.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(I.BookIcon),{decorative:""})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(l.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(I.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(l.TableTags),{tags:f},null,8,["tags"])]),id:e.withCtx(({rowValue:f})=>[e.createVNode(ge,{text:f,truncate:""},null,8,["text"])]),actions:e.withCtx(({row:f})=>[e.createVNode(z,null,{default:e.withCtx(({copyToClipboard:T})=>[e.createVNode(K,{"data-testid":"action-entity-copy-id",onClick:ke=>p(f,T)},{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:T})=>[e.createVNode(K,{"data-testid":"action-entity-copy-json",onClick:ke=>re(f,T)},{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(f)},{default:e.withCtx(()=>[e.createVNode(K,{"data-testid":"action-entity-view","has-divider":"",item:ce(f.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(l.PermissionsWrapper),{"auth-function":()=>t.canEdit(f)},{default:e.withCtx(()=>[e.createVNode(K,{"data-testid":"action-entity-edit",item:de(f.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(l.PermissionsWrapper),{"auth-function":()=>t.canDelete(f)},{default:e.withCtx(()=>[e.createVNode(K,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:T=>pe(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(C,{"data-testid":"key-sets-entity-empty-state","icon-background":"",message:e.unref(a)("keySets.list.empty_state_v2.description"),title:e.unref(a)("keySets.list.empty_state_v2.title")},e.createSlots({icon:e.withCtx(()=>[e.createVNode(e.unref(I.KeyIcon),{decorative:""})]),action:e.withCtx(()=>[U.value?(e.openBlock(),e.createBlock(y,{key:0,"data-testid":"entity-create-button",onClick:me},{default:e.withCtx(()=>[e.createVNode(e.unref(I.AddIcon),{decorative:""}),e.createTextVNode(" "+e.toDisplayString(e.unref(a)("keySets.list.empty_state_v2.create_cta")),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(y,{appearance:"secondary","data-testid":"entity-learn-more-button",onClick:r[2]||(r[2]=T=>n.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(I.BookIcon),{decorative:""}),e.createTextVNode(" "+e.toDisplayString(e.unref(a)("keySets.list.empty_state_v2.learn_more")),1)]),_:1})]),_:2},[(f=t.config)!=null&&f.isControlPlaneGroup?{name:"default",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("keySets.list.empty_state_v2.group")),1)]),key:"0"}:void 0]),1032,["message","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(l.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(l.EntityTypes).KeySet,error:G.value,title:e.unref(a)("keySets.delete.title"),visible:$.value,onCancel:ye,onProceed:ue},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),W=(t,S)=>{const u=t.__vccOpts||t;for(const[o,a]of S)u[o]=a;return u},ee=W(v,[["__scopeId","data-v-afe99dbd"]]),te={class:"kong-ui-entities-key-sets-form"},oe=W(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 x;const u=S,o=t,a=L.useRouter(),{i18n:{t:m}}=F.useI18n(),{getMessageFromError:h}=l.useErrors(),{axiosInstance:k}=l.useAxios((x=o.config)==null?void 0:x.axiosRequestConfig),P=e.computed(()=>B.form[o.config.app].edit),_=e.computed(()=>o.keySetId?l.EntityBaseFormType.Edit:l.EntityBaseFormType.Create),c=e.reactive({fields:{name:"",tags:""},isReadonly:!1,errorMessage:""}),V=e.reactive({name:"",tags:""}),O=e.computed(()=>JSON.stringify(c.fields)!==JSON.stringify(V)&&!!c.fields.name),D=s=>{var d;c.fields.name=(s==null?void 0:s.name)||"",c.fields.tags=((d=s==null?void 0:s.tags)==null?void 0:d.join(", "))||"",Object.assign(V,c.fields)},b=()=>{a.push(o.config.cancelRoute)},E=e.computed(()=>{var d,i;let s=`${o.config.apiBaseUrl}${B.form[o.config.app][_.value]}`;return o.config.app==="konnect"?s=s.replace(/{controlPlaneId}/gi,((d=o.config)==null?void 0:d.controlPlaneId)||""):o.config.app==="kongManager"&&(s=s.replace(/\/{workspace}/gi,(i=o.config)!=null&&i.workspace?`/${o.config.workspace}`:"")),s=s.replace(/{id}/gi,o.keySetId),s}),N=e.computed(()=>{var s,d,i;return{name:c.fields.name,tags:((i=(d=(s=c.fields.tags)==null?void 0:s.split(","))==null?void 0:d.map(p=>String(p||"").trim()))==null?void 0:i.filter(p=>p!==""))||""}}),j=async()=>{var s,d;try{c.isReadonly=!0;let i;if(_.value==="create"?i=await k.post(E.value,N.value):_.value==="edit"&&(i=((s=o.config)==null?void 0:s.app)==="konnect"?await k.put(E.value,N.value):await k.patch(E.value,N.value)),i){const{data:p}=i;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",i==null?void 0:i.data)}}catch(i){c.errorMessage=h(i),u("error",i)}finally{c.isReadonly=!1}};return(s,d)=>{const i=e.resolveComponent("KInput");return e.openBlock(),e.createElementBlock("div",te,[e.createVNode(e.unref(l.EntityBaseForm),{"can-submit":O.value,config:t.config,"edit-id":t.keySetId,"entity-type":e.unref(l.SupportedEntityType).KeySet,"error-message":c.errorMessage,"fetch-url":P.value,"form-fields":N.value,"is-readonly":c.isReadonly,onCancel:b,"onFetch:error":d[2]||(d[2]=p=>s.$emit("error",p)),"onFetch:success":D,onLoading:d[3]||(d[3]=p=>s.$emit("loading",p)),onSubmit:j},{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(i,{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(i,{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"]]),ne={class:"kong-ui-entities-keys-entity-config-card"},ae=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(),o=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",ne,[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=ae,g.KeySetForm=oe,g.KeySetList=ee,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .config-card-fieldset[data-v-dc1e39a1]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-dc1e39a1]{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-3da8907e]{align-items:center;display:flex;gap:12px}.kong-ui-entities-key-sets-list[data-v-3da8907e]{width:100%}.kong-ui-entities-key-sets-list .kong-ui-entity-filter-input[data-v-3da8907e]{margin-right:12px}.kong-ui-entities-key-sets-form[data-v-a4b01cc5]{width:100%}
1
+ .config-card-fieldset[data-v-dc1e39a1]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-dc1e39a1]{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-44153100]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-44153100]{margin-left:auto}.kong-ui-entity-base-table .hidden[data-v-44153100]{display:none}.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-645aae54]{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-645aae54]{padding:64px 96px}}.kong-ui-public-entity-empty-state .empty-state-image[data-v-645aae54]{margin-bottom:8px}.kong-ui-public-entity-empty-state .entity-empty-state-content[data-v-645aae54]{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-645aae54]{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-645aae54]{font-size:18px}.kong-ui-public-entity-empty-state .entity-empty-state-description[data-v-645aae54],.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-645aae54]{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-645aae54],.kong-ui-public-entity-empty-state .entity-empty-state-pricing p[data-v-645aae54]{margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-645aae54]{margin-top:16px}.kong-ui-public-entity-empty-state .entity-empty-state-message[data-v-645aae54]{color:#52596e}.kong-ui-public-entity-empty-state .entity-empty-state-action[data-v-645aae54]{align-items:center;display:flex;gap:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-645aae54]{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-645aae54]{width:640px}}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-645aae54]{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-645aae54]{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-645aae54] .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-645aae54] .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-645aae54] .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-645aae54]{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-645aae54]{width:640px}}.button-row[data-v-afe99dbd]{align-items:center;display:flex;gap:12px}.kong-ui-entities-key-sets-list[data-v-afe99dbd]{width:100%}.kong-ui-entities-key-sets-list .kong-ui-entity-filter-input[data-v-afe99dbd]{margin-right:12px}.kong-ui-entities-key-sets-form[data-v-a4b01cc5]{width:100%}
@@ -1 +1 @@
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;;IAg+BrD,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;;;AAzC7E,wBAmDG"}
1
+ {"version":3,"file":"KeySetList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/KeySetList.vue"],"names":[],"mappings":"AAiiBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAEnC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAkBvC,OAAO,KAAK,EACV,2BAA2B,EAC3B,uBAAuB,EACvB,SAAS,EACT,gBAAgB,EACjB,MAAM,UAAU,CAAA;AASjB,OAAO,gDAAgD,CAAA;;IAuhCrD,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;;;AAzC7E,wBAmDG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/entities-key-sets",
3
- "version": "3.8.8",
3
+ "version": "3.8.10",
4
4
  "type": "module",
5
5
  "main": "./dist/entities-key-sets.umd.js",
6
6
  "module": "./dist/entities-key-sets.es.js",
@@ -21,21 +21,21 @@
21
21
  "access": "public"
22
22
  },
23
23
  "peerDependencies": {
24
- "@kong/icons": "^1.31.0",
25
- "@kong/kongponents": "^9.34.2",
24
+ "@kong/icons": "^1.36.0",
25
+ "@kong/kongponents": "^9.38.8",
26
26
  "axios": "^1.11.0",
27
27
  "vue": ">= 3.3.13 < 4",
28
28
  "vue-router": "^4.4.5",
29
- "@kong-ui-public/entities-shared": "^3.27.7",
29
+ "@kong-ui-public/entities-shared": "^3.27.9",
30
30
  "@kong-ui-public/i18n": "^2.4.4"
31
31
  },
32
32
  "devDependencies": {
33
- "@kong/icons": "^1.33.2",
34
- "@kong/kongponents": "9.38.4",
33
+ "@kong/icons": "^1.36.0",
34
+ "@kong/kongponents": "9.38.8",
35
35
  "axios": "^1.7.7",
36
36
  "vue": "^3.5.13",
37
37
  "vue-router": "^4.4.5",
38
- "@kong-ui-public/entities-shared": "^3.27.7",
38
+ "@kong-ui-public/entities-shared": "^3.27.9",
39
39
  "@kong-ui-public/i18n": "^2.4.4"
40
40
  },
41
41
  "repository": {