@kong-ui-public/entities-key-sets 3.5.32 → 3.5.33

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,8 +1,8 @@
1
- import { defineComponent as Q, ref as h, computed as b, watch as ve, onBeforeMount as be, resolveComponent as w, openBlock as C, createElementBlock as q, createVNode as c, unref as o, withCtx as y, createBlock as G, Teleport as Se, withDirectives as Ce, createTextVNode as x, toDisplayString as $, vShow as Ie, createElementVNode as Ke, Fragment as Ee, renderList as Me, withModifiers as we, reactive as ae } from "vue";
2
- import { AddIcon as _e } from "@kong/icons";
1
+ import { defineComponent as Q, ref as h, computed as b, watch as ve, onBeforeMount as be, resolveComponent as M, openBlock as C, createElementBlock as q, createVNode as c, unref as o, withCtx as p, createBlock as G, Teleport as Se, withDirectives as Ce, createTextVNode as x, toDisplayString as R, vShow as Ie, createElementVNode as Ke, Fragment as _e, renderList as Ee, withModifiers as Me, reactive as ae } from "vue";
2
+ import { AddIcon as we } from "@kong/icons";
3
3
  import { useRouter as se } from "vue-router";
4
4
  import { createI18n as De, i18nTComponent as Fe } from "@kong-ui-public/i18n";
5
- import { useAxios as ie, useFetcher as Te, useDeleteUrlBuilder as $e, FetcherStatus as oe, EntityBaseTable as Be, EntityFilter as Re, PermissionsWrapper as N, EntityDeleteModal as xe, EntityTypes as qe, useErrors as Oe, EntityBaseFormType as ne, EntityBaseForm as Ae, SupportedEntityType as re, EntityFormSection as Pe, EntityBaseConfigCard as Ne } from "@kong-ui-public/entities-shared";
5
+ import { useAxios as ie, useFetcher as $e, useDeleteUrlBuilder as Re, FetcherStatus as oe, EntityBaseTable as Te, EntityFilter as Be, PermissionsWrapper as N, EntityDeleteModal as xe, EntityTypes as qe, useErrors as Oe, EntityBaseFormType as ne, EntityBaseForm as Ae, SupportedEntityType as re, EntityFormSection as Pe, EntityBaseConfigCard as Ne } from "@kong-ui-public/entities-shared";
6
6
  const Ue = {
7
7
  title: "Key Sets",
8
8
  list: {
@@ -139,15 +139,15 @@ const X = {
139
139
  emits: ["error", "copy:success", "copy:error", "delete:success"],
140
140
  setup(e, { emit: I }) {
141
141
  var ee;
142
- const m = I, a = e, { i18n: { t: n } } = X.useI18n(), g = se(), { axiosInstance: v } = ie((ee = a.config) == null ? void 0 : ee.axiosRequestConfig), k = h(1), V = b(() => a.config.app !== "kongManager" || !!a.config.disableSorting), _ = {
142
+ const m = I, a = e, { i18n: { t: n } } = X.useI18n(), g = se(), { axiosInstance: v } = ie((ee = a.config) == null ? void 0 : ee.axiosRequestConfig), k = h(1), V = b(() => a.config.app !== "kongManager" || !!a.config.disableSorting), w = {
143
143
  // the Name column is non-hidable
144
144
  name: { label: n("keySets.list.table_headers.name"), searchable: !0, sortable: !0, hidable: !1 },
145
145
  tags: { label: n("keySets.list.table_headers.tags") },
146
146
  id: { label: n("keySets.list.table_headers.id"), sortable: !0 }
147
- }, r = _, D = b(() => {
148
- var i, p;
147
+ }, r = w, D = b(() => {
148
+ var i, y;
149
149
  let t = `${a.config.apiBaseUrl}${U.list[a.config.app]}`;
150
- return a.config.app === "konnect" ? t = t.replace(/{controlPlaneId}/gi, ((i = a.config) == null ? void 0 : i.controlPlaneId) || "") : a.config.app === "kongManager" && (t = t.replace(/\/{workspace}/gi, (p = a.config) != null && p.workspace ? `/${a.config.workspace}` : "")), t;
150
+ return a.config.app === "konnect" ? t = t.replace(/{controlPlaneId}/gi, ((i = a.config) == null ? void 0 : i.controlPlaneId) || "") : a.config.app === "kongManager" && (t = t.replace(/\/{workspace}/gi, (y = a.config) != null && y.workspace ? `/${a.config.workspace}` : "")), t;
151
151
  }), F = h(""), j = b(() => {
152
152
  const t = a.config.app === "konnect" || a.config.isExactMatch;
153
153
  if (t)
@@ -155,26 +155,26 @@ const X = {
155
155
  isExactMatch: t,
156
156
  placeholder: n("keySets.search.placeholder")
157
157
  };
158
- const i = { name: _.name };
158
+ const i = { name: w.name };
159
159
  return {
160
160
  isExactMatch: t,
161
161
  fields: i,
162
162
  schema: a.config.filterSchema
163
163
  };
164
- }), { fetcher: J, fetcherState: B } = Te(a.config, D.value), T = () => {
164
+ }), { fetcher: J, fetcherState: T } = $e(a.config, D.value), $ = () => {
165
165
  F.value = "";
166
166
  }, L = () => {
167
167
  k.value++;
168
168
  }, K = h(null), s = h(!1), l = (t, i) => {
169
- const p = t.id;
170
- if (!i(p)) {
169
+ const y = t.id;
170
+ if (!i(y)) {
171
171
  ce(t, "id");
172
172
  return;
173
173
  }
174
174
  f(t, "id");
175
175
  }, d = (t, i) => {
176
- const p = JSON.stringify(t);
177
- if (!i(p)) {
176
+ const y = JSON.stringify(t);
177
+ if (!i(y)) {
178
178
  m("copy:error", {
179
179
  entity: t,
180
180
  message: n("keySets.errors.copy")
@@ -198,37 +198,37 @@ const X = {
198
198
  message: n("keySets.errors.copy")
199
199
  });
200
200
  }, de = async (t) => {
201
- var p;
202
- await ((p = a.canRetrieve) == null ? void 0 : p.call(a, t)) && g.push(a.config.getViewRoute(t.id));
201
+ var y;
202
+ await ((y = a.canRetrieve) == null ? void 0 : y.call(a, t)) && g.push(a.config.getViewRoute(t.id));
203
203
  }, ue = (t) => ({
204
204
  label: n("keySets.actions.view"),
205
205
  to: a.config.getViewRoute(t)
206
206
  }), fe = (t) => ({
207
207
  label: n("keySets.actions.edit"),
208
208
  to: a.config.getEditRoute(t)
209
- }), E = h(void 0), O = h(!1), A = h(!1), Y = h(""), ye = $e(a.config, D.value), pe = (t) => {
210
- E.value = t, O.value = !0;
209
+ }), _ = h(void 0), O = h(!1), A = h(!1), Y = h(""), pe = Re(a.config, D.value), ye = (t) => {
210
+ _.value = t, O.value = !0;
211
211
  }, me = () => {
212
212
  O.value = !1;
213
213
  }, ge = async () => {
214
- var t, i, p;
215
- if ((t = E.value) != null && t.id) {
214
+ var t, i, y;
215
+ if ((t = _.value) != null && t.id) {
216
216
  A.value = !0;
217
217
  try {
218
- await v.delete(ye(E.value.id)), A.value = !1, O.value = !1, k.value++, m("delete:success", E.value);
218
+ await v.delete(pe(_.value.id)), A.value = !1, O.value = !1, k.value++, m("delete:success", _.value);
219
219
  } catch (S) {
220
- Y.value = ((p = (i = S.response) == null ? void 0 : i.data) == null ? void 0 : p.message) || S.message || n("keySets.errors.delete"), m("error", S);
220
+ Y.value = ((y = (i = S.response) == null ? void 0 : i.data) == null ? void 0 : y.message) || S.message || n("keySets.errors.delete"), m("error", S);
221
221
  } finally {
222
222
  A.value = !1;
223
223
  }
224
224
  }
225
225
  }, Z = h(!1);
226
- ve(B, (t) => {
227
- var i, p, S, P;
226
+ ve(T, (t) => {
227
+ var i, y, S, P;
228
228
  if (Array.isArray((i = t == null ? void 0 : t.response) == null ? void 0 : i.data) && (Z.value = t.response.data.length > 0), t.status === oe.NoRecords ? s.value = !0 : s.value = !1, t.status === oe.Error) {
229
229
  K.value = {
230
230
  title: n("keySets.errors.general")
231
- }, (P = (S = (p = t.error) == null ? void 0 : p.response) == null ? void 0 : S.data) != null && P.message && (K.value.message = t.error.response.data.message), m("error", t.error);
231
+ }, (P = (S = (y = t.error) == null ? void 0 : y.response) == null ? void 0 : S.data) != null && P.message && (K.value.message = t.error.response.data.message), m("error", t.error);
232
232
  return;
233
233
  }
234
234
  K.value = null;
@@ -242,9 +242,9 @@ const X = {
242
242
  return be(async () => {
243
243
  await a.canCreate() && (z.value.title = n("keySets.list.empty_state.title"), z.value.ctaText = n("keySets.actions.create"));
244
244
  }), (t, i) => {
245
- const p = w("KButton"), S = w("KBadge"), P = w("KTruncate"), ke = w("KCopy"), R = w("KDropdownItem"), te = w("KClipboardProvider");
245
+ const y = M("KButton"), S = M("KBadge"), P = M("KTruncate"), ke = M("KCopy"), B = M("KDropdownItem"), te = M("KClipboardProvider");
246
246
  return C(), q("div", Je, [
247
- c(o(Be), {
247
+ c(o(Te), {
248
248
  "cache-identifier": e.cacheIdentifier,
249
249
  "disable-sorting": V.value,
250
250
  "empty-state-options": z.value,
@@ -257,18 +257,18 @@ const X = {
257
257
  "preferences-storage-key": "kong-ui-entities-key-sets-list",
258
258
  query: F.value,
259
259
  "table-headers": o(r),
260
- onClearSearchInput: T,
260
+ onClearSearchInput: $,
261
261
  "onClick:row": i[2] || (i[2] = (u) => de(u)),
262
262
  onSort: L
263
263
  }, {
264
- "toolbar-filter": y(() => [
265
- c(o(Re), {
264
+ "toolbar-filter": p(() => [
265
+ c(o(Be), {
266
266
  modelValue: F.value,
267
267
  "onUpdate:modelValue": i[0] || (i[0] = (u) => F.value = u),
268
268
  config: j.value
269
269
  }, null, 8, ["modelValue", "config"])
270
270
  ]),
271
- "toolbar-button": y(() => [
271
+ "toolbar-button": p(() => [
272
272
  (C(), G(Se, {
273
273
  disabled: !e.useActionOutside,
274
274
  to: "#kong-ui-app-page-header-action-button"
@@ -276,16 +276,16 @@ const X = {
276
276
  c(o(N), {
277
277
  "auth-function": () => e.canCreate()
278
278
  }, {
279
- default: y(() => [
280
- Ce(c(p, {
279
+ default: p(() => [
280
+ Ce(c(y, {
281
281
  appearance: "primary",
282
282
  "data-testid": "toolbar-add-key-set",
283
283
  size: e.useActionOutside ? "medium" : "large",
284
284
  to: e.config.createRoute
285
285
  }, {
286
- default: y(() => [
287
- c(o(_e)),
288
- x(" " + $(o(n)("keySets.list.toolbar_actions.new_key_set")), 1)
286
+ default: p(() => [
287
+ c(o(we)),
288
+ x(" " + R(o(n)("keySets.list.toolbar_actions.new_key_set")), 1)
289
289
  ]),
290
290
  _: 1
291
291
  }, 8, ["size", "to"]), [
@@ -296,19 +296,19 @@ const X = {
296
296
  }, 8, ["auth-function"])
297
297
  ], 8, ["disabled"]))
298
298
  ]),
299
- name: y(({ rowValue: u }) => [
300
- Ke("b", null, $(u ?? "-"), 1)
299
+ name: p(({ rowValue: u }) => [
300
+ Ke("b", null, R(u ?? "-"), 1)
301
301
  ]),
302
- tags: y(({ rowValue: u }) => [
302
+ tags: p(({ rowValue: u }) => [
303
303
  (u == null ? void 0 : u.length) > 0 ? (C(), G(P, { key: 0 }, {
304
- default: y(() => [
305
- (C(!0), q(Ee, null, Me(u, (M) => (C(), G(S, {
306
- key: M,
307
- onClick: i[1] || (i[1] = we(() => {
304
+ default: p(() => [
305
+ (C(!0), q(_e, null, Ee(u, (E) => (C(), G(S, {
306
+ key: E,
307
+ onClick: i[1] || (i[1] = Me(() => {
308
308
  }, ["stop"]))
309
309
  }, {
310
- default: y(() => [
311
- x($(M), 1)
310
+ default: p(() => [
311
+ x(R(E), 1)
312
312
  ]),
313
313
  _: 2
314
314
  }, 1024))), 128))
@@ -316,21 +316,21 @@ const X = {
316
316
  _: 2
317
317
  }, 1024)) : (C(), q("span", Le, "-"))
318
318
  ]),
319
- id: y(({ rowValue: u }) => [
319
+ id: p(({ rowValue: u }) => [
320
320
  c(ke, {
321
321
  text: u,
322
322
  truncate: ""
323
323
  }, null, 8, ["text"])
324
324
  ]),
325
- actions: y(({ row: u }) => [
325
+ actions: p(({ row: u }) => [
326
326
  c(te, null, {
327
- default: y(({ copyToClipboard: M }) => [
328
- c(R, {
327
+ default: p(({ copyToClipboard: E }) => [
328
+ c(B, {
329
329
  "data-testid": "action-entity-copy-id",
330
- onClick: (he) => l(u, M)
330
+ onClick: (he) => l(u, E)
331
331
  }, {
332
- default: y(() => [
333
- x($(o(n)("keySets.actions.copy_id")), 1)
332
+ default: p(() => [
333
+ x(R(o(n)("keySets.actions.copy_id")), 1)
334
334
  ]),
335
335
  _: 2
336
336
  }, 1032, ["onClick"])
@@ -338,13 +338,13 @@ const X = {
338
338
  _: 2
339
339
  }, 1024),
340
340
  c(te, null, {
341
- default: y(({ copyToClipboard: M }) => [
342
- c(R, {
341
+ default: p(({ copyToClipboard: E }) => [
342
+ c(B, {
343
343
  "data-testid": "action-entity-copy-json",
344
- onClick: (he) => d(u, M)
344
+ onClick: (he) => d(u, E)
345
345
  }, {
346
- default: y(() => [
347
- x($(o(n)("keySets.actions.copy_json")), 1)
346
+ default: p(() => [
347
+ x(R(o(n)("keySets.actions.copy_json")), 1)
348
348
  ]),
349
349
  _: 2
350
350
  }, 1032, ["onClick"])
@@ -354,8 +354,8 @@ const X = {
354
354
  c(o(N), {
355
355
  "auth-function": () => e.canRetrieve(u)
356
356
  }, {
357
- default: y(() => [
358
- c(R, {
357
+ default: p(() => [
358
+ c(B, {
359
359
  "data-testid": "action-entity-view",
360
360
  "has-divider": "",
361
361
  item: ue(u.id)
@@ -366,8 +366,8 @@ const X = {
366
366
  c(o(N), {
367
367
  "auth-function": () => e.canEdit(u)
368
368
  }, {
369
- default: y(() => [
370
- c(R, {
369
+ default: p(() => [
370
+ c(B, {
371
371
  "data-testid": "action-entity-edit",
372
372
  item: fe(u.id)
373
373
  }, null, 8, ["item"])
@@ -377,15 +377,15 @@ const X = {
377
377
  c(o(N), {
378
378
  "auth-function": () => e.canDelete(u)
379
379
  }, {
380
- default: y(() => [
381
- c(R, {
380
+ default: p(() => [
381
+ c(B, {
382
382
  danger: "",
383
383
  "data-testid": "action-entity-delete",
384
384
  "has-divider": "",
385
- onClick: (M) => pe(u)
385
+ onClick: (E) => ye(u)
386
386
  }, {
387
- default: y(() => [
388
- x($(o(n)("keySets.actions.delete")), 1)
387
+ default: p(() => [
388
+ x(R(o(n)("keySets.actions.delete")), 1)
389
389
  ]),
390
390
  _: 2
391
391
  }, 1032, ["onClick"])
@@ -398,7 +398,7 @@ const X = {
398
398
  c(o(xe), {
399
399
  "action-pending": A.value,
400
400
  description: o(n)("keySets.delete.description"),
401
- "entity-name": E.value && (E.value.name || E.value.id),
401
+ "entity-name": _.value && (_.value.name || _.value.id),
402
402
  "entity-type": o(qe).KeySet,
403
403
  error: Y.value,
404
404
  title: o(n)("keySets.delete.title"),
@@ -428,20 +428,12 @@ const X = {
428
428
  type: String,
429
429
  required: !1,
430
430
  default: ""
431
- },
432
- /**
433
- * Enable display of Terraform code
434
- * Guarded by FF: khcp-12445-terraform-config-details
435
- */
436
- enableTerraform: {
437
- type: Boolean,
438
- default: !1
439
431
  }
440
432
  },
441
433
  emits: ["update", "error", "loading"],
442
434
  setup(e, { emit: I }) {
443
435
  var K;
444
- const m = I, a = e, n = se(), { i18n: { t: g } } = X.useI18n(), { getMessageFromError: v } = Oe(), { axiosInstance: k } = ie((K = a.config) == null ? void 0 : K.axiosRequestConfig), V = b(() => U.form[a.config.app].edit), _ = b(() => a.keySetId ? ne.Edit : ne.Create), r = ae({
436
+ const m = I, a = e, n = se(), { i18n: { t: g } } = X.useI18n(), { getMessageFromError: v } = Oe(), { axiosInstance: k } = ie((K = a.config) == null ? void 0 : K.axiosRequestConfig), V = b(() => U.form[a.config.app].edit), w = b(() => a.keySetId ? ne.Edit : ne.Create), r = ae({
445
437
  fields: {
446
438
  name: "",
447
439
  tags: ""
@@ -456,11 +448,11 @@ const X = {
456
448
  r.fields.name = (s == null ? void 0 : s.name) || "", r.fields.tags = ((l = s == null ? void 0 : s.tags) == null ? void 0 : l.join(", ")) || "", Object.assign(D, r.fields);
457
449
  }, J = () => {
458
450
  n.push(a.config.cancelRoute);
459
- }, B = b(() => {
451
+ }, T = b(() => {
460
452
  var l, d;
461
- let s = `${a.config.apiBaseUrl}${U.form[a.config.app][_.value]}`;
453
+ let s = `${a.config.apiBaseUrl}${U.form[a.config.app][w.value]}`;
462
454
  return a.config.app === "konnect" ? s = s.replace(/{controlPlaneId}/gi, ((l = a.config) == null ? void 0 : l.controlPlaneId) || "") : a.config.app === "kongManager" && (s = s.replace(/\/{workspace}/gi, (d = a.config) != null && d.workspace ? `/${a.config.workspace}` : "")), s = s.replace(/{id}/gi, a.keySetId), s;
463
- }), T = b(() => {
455
+ }), $ = b(() => {
464
456
  var s, l, d;
465
457
  return {
466
458
  name: r.fields.name,
@@ -471,7 +463,7 @@ const X = {
471
463
  try {
472
464
  r.isReadonly = !0;
473
465
  let d;
474
- if (_.value === "create" ? d = await k.post(B.value, T.value) : _.value === "edit" && (d = ((s = a.config) == null ? void 0 : s.app) === "konnect" ? await k.put(B.value, T.value) : await k.patch(B.value, T.value)), d) {
466
+ if (w.value === "create" ? d = await k.post(T.value, $.value) : w.value === "edit" && (d = ((s = a.config) == null ? void 0 : s.app) === "konnect" ? await k.put(T.value, $.value) : await k.patch(T.value, $.value)), d) {
475
467
  const { data: f } = d;
476
468
  r.fields.name = (f == null ? void 0 : f.name) || "", r.fields.tags = ((l = f == null ? void 0 : f.tags) == null ? void 0 : l.join(", ")) || "", Object.assign(D, r.fields), m("update", d == null ? void 0 : d.data);
477
469
  }
@@ -482,17 +474,16 @@ const X = {
482
474
  }
483
475
  };
484
476
  return (s, l) => {
485
- const d = w("KInput");
477
+ const d = M("KInput");
486
478
  return C(), q("div", Ge, [
487
479
  c(o(Ae), {
488
480
  "can-submit": F.value,
489
481
  config: e.config,
490
482
  "edit-id": e.keySetId,
491
- "enable-terraform": e.enableTerraform,
492
483
  "entity-type": o(re).KeySet,
493
484
  "error-message": r.errorMessage,
494
485
  "fetch-url": V.value,
495
- "form-fields": T.value,
486
+ "form-fields": $.value,
496
487
  "is-readonly": r.isReadonly,
497
488
  onCancel: J,
498
489
  "onFetch:error": l[2] || (l[2] = (f) => s.$emit("error", f)),
@@ -500,13 +491,13 @@ const X = {
500
491
  onLoading: l[3] || (l[3] = (f) => s.$emit("loading", f)),
501
492
  onSubmit: L
502
493
  }, {
503
- default: y(() => [
494
+ default: p(() => [
504
495
  c(o(Pe), {
505
496
  description: o(g)("keySets.form.sections.general.description"),
506
497
  "has-divider": "",
507
498
  title: o(g)("keySets.form.sections.general.title")
508
499
  }, {
509
- default: y(() => [
500
+ default: p(() => [
510
501
  c(d, {
511
502
  modelValue: r.fields.name,
512
503
  "onUpdate:modelValue": l[0] || (l[0] = (f) => r.fields.name = f),
@@ -539,11 +530,11 @@ const X = {
539
530
  }, 8, ["description", "title"])
540
531
  ]),
541
532
  _: 1
542
- }, 8, ["can-submit", "config", "edit-id", "enable-terraform", "entity-type", "error-message", "fetch-url", "form-fields", "is-readonly"])
533
+ }, 8, ["can-submit", "config", "edit-id", "entity-type", "error-message", "fetch-url", "form-fields", "is-readonly"])
543
534
  ]);
544
535
  };
545
536
  }
546
- }), at = /* @__PURE__ */ le(We, [["__scopeId", "data-v-58150834"]]), He = { class: "kong-ui-entities-keys-entity-config-card" }, ot = /* @__PURE__ */ Q({
537
+ }), at = /* @__PURE__ */ le(We, [["__scopeId", "data-v-d1b94475"]]), He = { class: "kong-ui-entities-keys-entity-config-card" }, ot = /* @__PURE__ */ Q({
547
538
  __name: "KeySetConfigCard",
548
539
  props: {
549
540
  /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
@@ -566,14 +557,6 @@ const X = {
566
557
  hideTitle: {
567
558
  type: Boolean,
568
559
  default: !1
569
- },
570
- /**
571
- * Enable display of Terraform code
572
- * Guarded by FF: khcp-12445-terraform-config-details
573
- */
574
- enableTerraform: {
575
- type: Boolean,
576
- default: !1
577
560
  }
578
561
  },
579
562
  emits: ["loading", "fetch:error", "fetch:success"],
@@ -592,14 +575,13 @@ const X = {
592
575
  config: e.config,
593
576
  "config-card-doc": e.configCardDoc,
594
577
  "config-schema": n.value,
595
- "enable-terraform": e.enableTerraform,
596
578
  "entity-type": o(re).KeySet,
597
579
  "fetch-url": a.value,
598
580
  "hide-title": e.hideTitle,
599
581
  "onFetch:error": v[0] || (v[0] = (k) => g.$emit("fetch:error", k)),
600
582
  "onFetch:success": v[1] || (v[1] = (k) => g.$emit("fetch:success", k)),
601
583
  onLoading: v[2] || (v[2] = (k) => g.$emit("loading", k))
602
- }, null, 8, ["config", "config-card-doc", "config-schema", "enable-terraform", "entity-type", "fetch-url", "hide-title"])
584
+ }, null, 8, ["config", "config-card-doc", "config-schema", "entity-type", "fetch-url", "hide-title"])
603
585
  ]));
604
586
  }
605
587
  });
@@ -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,Q,U,L,l){"use strict";const X={keySets:{title:"Key Sets",list:{toolbar_actions:{new_key_set:"New Key Set"},table_headers:{name:"Name",id:"ID",tags:"Tags"},empty_state:{title:"Configure a New Key Set",description:"A Key Set object holds a collection of asymmetric key objects. This entity allows to logically group keys by their purpose."}},actions:{create:"New Key Set",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",clear:"Clear",view:"View Details"},search:{placeholder:"Filter by exact name or ID"},delete:{title:"Delete a Key Set",description:"Deleting this key set will also delete keys associated. This action cannot be reversed so make sure to check the key set usage before deleting."},errors:{general:"Key sets could not be retrieved",delete:"The key set could not be deleted at this time.",copy:"Failed to copy to clipboard"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},form:{sections:{general:{title:"General Information",description:"General information will help identify and manage this key set."}},fields:{name:{label:"Name",placeholder:"Enter a unique name for this key set"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings for grouping and filtering, separated by commas."}}}}};function Y(){const t=L.createI18n("en-us",X);return{i18n:t,i18nT:L.i18nTComponent(t)}}const _={useI18n:Y},$="/v2/control-planes/{controlPlaneId}/core-entities",R="/{workspace}",K={list:{konnect:`${$}/key-sets`,kongManager:`${R}/key-sets`},form:{konnect:{create:`${$}/key-sets`,edit:`${$}/key-sets/{id}`},kongManager:{create:`${R}/key-sets`,edit:`${R}/key-sets/{id}`}}},Z={class:"kong-ui-entities-key-sets-list"},v={key:1},ee=e.defineComponent({__name:"KeySetList",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||!t.createRoute||!t.getViewRoute||!t.getEditRoute||t.app==="kongManager"&&!t.isExactMatch&&!t.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1}},emits:["error","copy:success","copy:error","delete:success"],setup(t,{emit:C}){var G;const y=C,n=t,{i18n:{t:a}}=_.useI18n(),m=U.useRouter(),{axiosInstance:h}=l.useAxios((G=n.config)==null?void 0:G.axiosRequestConfig),k=e.ref(1),q=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}},i=V,B=e.computed(()=>{var s,u;let o=`${n.config.apiBaseUrl}${K.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,(u=n.config)!=null&&u.workspace?`/${n.config.workspace}`:"")),o}),N=e.ref(""),P=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:O,fetcherState:E}=l.useFetcher(n.config,B.value),I=()=>{N.value=""},A=()=>{k.value++},S=e.ref(null),r=e.ref(!1),c=(o,s)=>{const u=o.id;if(!s(u)){se(o,"id");return}p(o,"id")},d=(o,s)=>{const u=JSON.stringify(o);if(!s(u)){y("copy:error",{entity:o,message:a("keySets.errors.copy")});return}y("copy:success",{entity:o,message:a("keySets.copy.success_brief")})},p=(o,s)=>{y("copy:success",{entity:o,field:s,message:a("keySets.copy.success",{val:o[s]})})},se=(o,s)=>{y("copy:error",{entity:o,field:s,message:a("keySets.errors.copy")})},ie=async o=>{var u;await((u=n.canRetrieve)==null?void 0:u.call(n,o))&&m.push(n.config.getViewRoute(o.id))},le=o=>({label:a("keySets.actions.view"),to:n.config.getViewRoute(o)}),ce=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(""),de=l.useDeleteUrlBuilder(n.config,B.value),fe=o=>{w.value=o,D.value=!0},pe=()=>{D.value=!1},ue=async()=>{var o,s,u;if((o=w.value)!=null&&o.id){M.value=!0;try{await h.delete(de(w.value.id)),M.value=!1,D.value=!1,k.value++,y("delete:success",w.value)}catch(b){W.value=((u=(s=b.response)==null?void 0:s.data)==null?void 0:u.message)||b.message||a("keySets.errors.delete"),y("error",b)}finally{M.value=!1}}},z=e.ref(!1);e.watch(E,o=>{var s,u,b,F;if(Array.isArray((s=o==null?void 0:o.response)==null?void 0:s.data)&&(z.value=o.response.data.length>0),o.status===l.FetcherStatus.NoRecords?r.value=!0:r.value=!1,o.status===l.FetcherStatus.Error){S.value={title:a("keySets.errors.general")},(F=(b=(u=o.error)==null?void 0:u.response)==null?void 0:b.data)!=null&&F.message&&(S.value.message=o.error.response.data.message),y("error",o.error);return}S.value=null});const j=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()&&(j.value.title=a("keySets.list.empty_state.title"),j.value.ctaText=a("keySets.actions.create"))}),(o,s)=>{const u=e.resolveComponent("KButton"),b=e.resolveComponent("KBadge"),F=e.resolveComponent("KTruncate"),ye=e.resolveComponent("KCopy"),T=e.resolveComponent("KDropdownItem"),H=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",Z,[e.createVNode(e.unref(l.EntityBaseTable),{"cache-identifier":t.cacheIdentifier,"disable-sorting":q.value,"empty-state-options":j.value,"enable-entity-actions":"","error-message":S.value,fetcher:e.unref(O),"fetcher-cache-key":k.value,"hide-toollbar":r.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-key-sets-list",query:N.value,"table-headers":e.unref(i),onClearSearchInput:I,"onClick:row":s[2]||(s[2]=f=>ie(f)),onSort:A},{"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(l.EntityFilter),{modelValue:N.value,"onUpdate:modelValue":s[0]||(s[0]=f=>N.value=f),config:P.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!t.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(e.unref(l.PermissionsWrapper),{"auth-function":()=>t.canCreate()},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(u,{appearance:"primary","data-testid":"toolbar-add-key-set",size:t.useActionOutside?"medium":"large",to:t.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(Q.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(a)("keySets.list.toolbar_actions.new_key_set")),1)]),_:1},8,["size","to"]),[[e.vShow,z.value]])]),_:1},8,["auth-function"])],8,["disabled"]))]),name:e.withCtx(({rowValue:f})=>[e.createElementVNode("b",null,e.toDisplayString(f??"-"),1)]),tags:e.withCtx(({rowValue:f})=>[(f==null?void 0:f.length)>0?(e.openBlock(),e.createBlock(F,{key:0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f,x=>(e.openBlock(),e.createBlock(b,{key:x,onClick:s[1]||(s[1]=e.withModifiers(()=>{},["stop"]))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x),1)]),_:2},1024))),128))]),_:2},1024)):(e.openBlock(),e.createElementBlock("span",v,"-"))]),id:e.withCtx(({rowValue:f})=>[e.createVNode(ye,{text:f,truncate:""},null,8,["text"])]),actions:e.withCtx(({row:f})=>[e.createVNode(H,null,{default:e.withCtx(({copyToClipboard:x})=>[e.createVNode(T,{"data-testid":"action-entity-copy-id",onClick:me=>c(f,x)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("keySets.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(H,null,{default:e.withCtx(({copyToClipboard:x})=>[e.createVNode(T,{"data-testid":"action-entity-copy-json",onClick:me=>d(f,x)},{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(T,{"data-testid":"action-entity-view","has-divider":"",item:le(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(T,{"data-testid":"action-entity-edit",item:ce(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(T,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:x=>fe(f)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("keySets.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","hide-toollbar","query","table-headers"]),e.createVNode(e.unref(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:W.value,title:e.unref(a)("keySets.delete.title"),visible:D.value,onCancel:pe,onProceed:ue},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),J=(t,C)=>{const y=t.__vccOpts||t;for(const[n,a]of C)y[n]=a;return y},te=J(ee,[["__scopeId","data-v-b145c250"]]),oe={class:"kong-ui-entities-key-sets-form"},ne=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:""},enableTerraform:{type:Boolean,default:!1}},emits:["update","error","loading"],setup(t,{emit:C}){var S;const y=C,n=t,a=U.useRouter(),{i18n:{t:m}}=_.useI18n(),{getMessageFromError:h}=l.useErrors(),{axiosInstance:k}=l.useAxios((S=n.config)==null?void 0:S.axiosRequestConfig),q=e.computed(()=>K.form[n.config.app].edit),V=e.computed(()=>n.keySetId?l.EntityBaseFormType.Edit:l.EntityBaseFormType.Create),i=e.reactive({fields:{name:"",tags:""},isReadonly:!1,errorMessage:""}),B=e.reactive({name:"",tags:""}),N=e.computed(()=>JSON.stringify(i.fields)!==JSON.stringify(B)&&!!i.fields.name),P=r=>{var c;i.fields.name=(r==null?void 0:r.name)||"",i.fields.tags=((c=r==null?void 0:r.tags)==null?void 0:c.join(", "))||"",Object.assign(B,i.fields)},O=()=>{a.push(n.config.cancelRoute)},E=e.computed(()=>{var c,d;let r=`${n.config.apiBaseUrl}${K.form[n.config.app][V.value]}`;return n.config.app==="konnect"?r=r.replace(/{controlPlaneId}/gi,((c=n.config)==null?void 0:c.controlPlaneId)||""):n.config.app==="kongManager"&&(r=r.replace(/\/{workspace}/gi,(d=n.config)!=null&&d.workspace?`/${n.config.workspace}`:"")),r=r.replace(/{id}/gi,n.keySetId),r}),I=e.computed(()=>{var r,c,d;return{name:i.fields.name,tags:((d=(c=(r=i.fields.tags)==null?void 0:r.split(","))==null?void 0:c.map(p=>String(p||"").trim()))==null?void 0:d.filter(p=>p!==""))||""}}),A=async()=>{var r,c;try{i.isReadonly=!0;let d;if(V.value==="create"?d=await k.post(E.value,I.value):V.value==="edit"&&(d=((r=n.config)==null?void 0:r.app)==="konnect"?await k.put(E.value,I.value):await k.patch(E.value,I.value)),d){const{data:p}=d;i.fields.name=(p==null?void 0:p.name)||"",i.fields.tags=((c=p==null?void 0:p.tags)==null?void 0:c.join(", "))||"",Object.assign(B,i.fields),y("update",d==null?void 0:d.data)}}catch(d){i.errorMessage=h(d),y("error",d)}finally{i.isReadonly=!1}};return(r,c)=>{const d=e.resolveComponent("KInput");return e.openBlock(),e.createElementBlock("div",oe,[e.createVNode(e.unref(l.EntityBaseForm),{"can-submit":N.value,config:t.config,"edit-id":t.keySetId,"enable-terraform":t.enableTerraform,"entity-type":e.unref(l.SupportedEntityType).KeySet,"error-message":i.errorMessage,"fetch-url":q.value,"form-fields":I.value,"is-readonly":i.isReadonly,onCancel:O,"onFetch:error":c[2]||(c[2]=p=>r.$emit("error",p)),"onFetch:success":P,onLoading:c[3]||(c[3]=p=>r.$emit("loading",p)),onSubmit:A},{default:e.withCtx(()=>[e.createVNode(e.unref(l.EntityFormSection),{description:e.unref(m)("keySets.form.sections.general.description"),"has-divider":"",title:e.unref(m)("keySets.form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:i.fields.name,"onUpdate:modelValue":c[0]||(c[0]=p=>i.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:i.isReadonly,type:"text"},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode(d,{modelValue:i.fields.tags,"onUpdate:modelValue":c[1]||(c[1]=p=>i.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:i.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"])]),_:1},8,["can-submit","config","edit-id","enable-terraform","entity-type","error-message","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-58150834"]]),ae={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},enableTerraform:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(t){const C=t,{i18n:{t:y}}=_.useI18n(),n=e.computed(()=>K.form[C.config.app].edit),a=e.ref({id:{},name:{},last_updated:{},created:{},tags:{tooltip:y("keySets.form.fields.tags.tooltip")}});return(m,h)=>(e.openBlock(),e.createElementBlock("div",ae,[e.createVNode(e.unref(l.EntityBaseConfigCard),{config:t.config,"config-card-doc":t.configCardDoc,"config-schema":a.value,"enable-terraform":t.enableTerraform,"entity-type":e.unref(l.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","enable-terraform","entity-type","fetch-url","hide-title"])]))}});g.KeySetConfigCard=re,g.KeySetForm=ne,g.KeySetList=te,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,Q,U,L,l){"use strict";const X={keySets:{title:"Key Sets",list:{toolbar_actions:{new_key_set:"New Key Set"},table_headers:{name:"Name",id:"ID",tags:"Tags"},empty_state:{title:"Configure a New Key Set",description:"A Key Set object holds a collection of asymmetric key objects. This entity allows to logically group keys by their purpose."}},actions:{create:"New Key Set",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",clear:"Clear",view:"View Details"},search:{placeholder:"Filter by exact name or ID"},delete:{title:"Delete a Key Set",description:"Deleting this key set will also delete keys associated. This action cannot be reversed so make sure to check the key set usage before deleting."},errors:{general:"Key sets could not be retrieved",delete:"The key set could not be deleted at this time.",copy:"Failed to copy to clipboard"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},form:{sections:{general:{title:"General Information",description:"General information will help identify and manage this key set."}},fields:{name:{label:"Name",placeholder:"Enter a unique name for this key set"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings for grouping and filtering, separated by commas."}}}}};function Y(){const t=L.createI18n("en-us",X);return{i18n:t,i18nT:L.i18nTComponent(t)}}const F={useI18n:Y},$="/v2/control-planes/{controlPlaneId}/core-entities",R="/{workspace}",_={list:{konnect:`${$}/key-sets`,kongManager:`${R}/key-sets`},form:{konnect:{create:`${$}/key-sets`,edit:`${$}/key-sets/{id}`},kongManager:{create:`${R}/key-sets`,edit:`${R}/key-sets/{id}`}}},Z={class:"kong-ui-entities-key-sets-list"},v={key:1},ee=e.defineComponent({__name:"KeySetList",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||!t.createRoute||!t.getViewRoute||!t.getEditRoute||t.app==="kongManager"&&!t.isExactMatch&&!t.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1}},emits:["error","copy:success","copy:error","delete:success"],setup(t,{emit:C}){var G;const y=C,n=t,{i18n:{t:a}}=F.useI18n(),m=U.useRouter(),{axiosInstance:h}=l.useAxios((G=n.config)==null?void 0:G.axiosRequestConfig),k=e.ref(1),q=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}},i=V,N=e.computed(()=>{var r,u;let o=`${n.config.apiBaseUrl}${_.list[n.config.app]}`;return n.config.app==="konnect"?o=o.replace(/{controlPlaneId}/gi,((r=n.config)==null?void 0:r.controlPlaneId)||""):n.config.app==="kongManager"&&(o=o.replace(/\/{workspace}/gi,(u=n.config)!=null&&u.workspace?`/${n.config.workspace}`:"")),o}),I=e.ref(""),P=e.computed(()=>{const o=n.config.app==="konnect"||n.config.isExactMatch;if(o)return{isExactMatch:o,placeholder:a("keySets.search.placeholder")};const r={name:V.name};return{isExactMatch:o,fields:r,schema:n.config.filterSchema}}),{fetcher:O,fetcherState:E}=l.useFetcher(n.config,N.value),B=()=>{I.value=""},A=()=>{k.value++},S=e.ref(null),s=e.ref(!1),c=(o,r)=>{const u=o.id;if(!r(u)){re(o,"id");return}p(o,"id")},d=(o,r)=>{const u=JSON.stringify(o);if(!r(u)){y("copy:error",{entity:o,message:a("keySets.errors.copy")});return}y("copy:success",{entity:o,message:a("keySets.copy.success_brief")})},p=(o,r)=>{y("copy:success",{entity:o,field:r,message:a("keySets.copy.success",{val:o[r]})})},re=(o,r)=>{y("copy:error",{entity:o,field:r,message:a("keySets.errors.copy")})},ie=async o=>{var u;await((u=n.canRetrieve)==null?void 0:u.call(n,o))&&m.push(n.config.getViewRoute(o.id))},le=o=>({label:a("keySets.actions.view"),to:n.config.getViewRoute(o)}),ce=o=>({label:a("keySets.actions.edit"),to:n.config.getEditRoute(o)}),w=e.ref(void 0),D=e.ref(!1),T=e.ref(!1),W=e.ref(""),de=l.useDeleteUrlBuilder(n.config,N.value),fe=o=>{w.value=o,D.value=!0},pe=()=>{D.value=!1},ue=async()=>{var o,r,u;if((o=w.value)!=null&&o.id){T.value=!0;try{await h.delete(de(w.value.id)),T.value=!1,D.value=!1,k.value++,y("delete:success",w.value)}catch(b){W.value=((u=(r=b.response)==null?void 0:r.data)==null?void 0:u.message)||b.message||a("keySets.errors.delete"),y("error",b)}finally{T.value=!1}}},z=e.ref(!1);e.watch(E,o=>{var r,u,b,M;if(Array.isArray((r=o==null?void 0:o.response)==null?void 0:r.data)&&(z.value=o.response.data.length>0),o.status===l.FetcherStatus.NoRecords?s.value=!0:s.value=!1,o.status===l.FetcherStatus.Error){S.value={title:a("keySets.errors.general")},(M=(b=(u=o.error)==null?void 0:u.response)==null?void 0:b.data)!=null&&M.message&&(S.value.message=o.error.response.data.message),y("error",o.error);return}S.value=null});const j=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()&&(j.value.title=a("keySets.list.empty_state.title"),j.value.ctaText=a("keySets.actions.create"))}),(o,r)=>{const u=e.resolveComponent("KButton"),b=e.resolveComponent("KBadge"),M=e.resolveComponent("KTruncate"),ye=e.resolveComponent("KCopy"),K=e.resolveComponent("KDropdownItem"),H=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",Z,[e.createVNode(e.unref(l.EntityBaseTable),{"cache-identifier":t.cacheIdentifier,"disable-sorting":q.value,"empty-state-options":j.value,"enable-entity-actions":"","error-message":S.value,fetcher:e.unref(O),"fetcher-cache-key":k.value,"hide-toollbar":s.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-key-sets-list",query:I.value,"table-headers":e.unref(i),onClearSearchInput:B,"onClick:row":r[2]||(r[2]=f=>ie(f)),onSort:A},{"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(l.EntityFilter),{modelValue:I.value,"onUpdate:modelValue":r[0]||(r[0]=f=>I.value=f),config:P.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!t.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(e.unref(l.PermissionsWrapper),{"auth-function":()=>t.canCreate()},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(u,{appearance:"primary","data-testid":"toolbar-add-key-set",size:t.useActionOutside?"medium":"large",to:t.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(Q.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(a)("keySets.list.toolbar_actions.new_key_set")),1)]),_:1},8,["size","to"]),[[e.vShow,z.value]])]),_:1},8,["auth-function"])],8,["disabled"]))]),name:e.withCtx(({rowValue:f})=>[e.createElementVNode("b",null,e.toDisplayString(f??"-"),1)]),tags:e.withCtx(({rowValue:f})=>[(f==null?void 0:f.length)>0?(e.openBlock(),e.createBlock(M,{key:0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f,x=>(e.openBlock(),e.createBlock(b,{key:x,onClick:r[1]||(r[1]=e.withModifiers(()=>{},["stop"]))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x),1)]),_:2},1024))),128))]),_:2},1024)):(e.openBlock(),e.createElementBlock("span",v,"-"))]),id:e.withCtx(({rowValue:f})=>[e.createVNode(ye,{text:f,truncate:""},null,8,["text"])]),actions:e.withCtx(({row:f})=>[e.createVNode(H,null,{default:e.withCtx(({copyToClipboard:x})=>[e.createVNode(K,{"data-testid":"action-entity-copy-id",onClick:me=>c(f,x)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("keySets.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(H,null,{default:e.withCtx(({copyToClipboard:x})=>[e.createVNode(K,{"data-testid":"action-entity-copy-json",onClick:me=>d(f,x)},{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:le(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:ce(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:x=>fe(f)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("keySets.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","hide-toollbar","query","table-headers"]),e.createVNode(e.unref(l.EntityDeleteModal),{"action-pending":T.value,description:e.unref(a)("keySets.delete.description"),"entity-name":w.value&&(w.value.name||w.value.id),"entity-type":e.unref(l.EntityTypes).KeySet,error:W.value,title:e.unref(a)("keySets.delete.title"),visible:D.value,onCancel:pe,onProceed:ue},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),J=(t,C)=>{const y=t.__vccOpts||t;for(const[n,a]of C)y[n]=a;return y},te=J(ee,[["__scopeId","data-v-b145c250"]]),oe={class:"kong-ui-entities-key-sets-form"},ne=J(e.defineComponent({__name:"KeySetForm",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string"||!t.cancelRoute)},keySetId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(t,{emit:C}){var S;const y=C,n=t,a=U.useRouter(),{i18n:{t:m}}=F.useI18n(),{getMessageFromError:h}=l.useErrors(),{axiosInstance:k}=l.useAxios((S=n.config)==null?void 0:S.axiosRequestConfig),q=e.computed(()=>_.form[n.config.app].edit),V=e.computed(()=>n.keySetId?l.EntityBaseFormType.Edit:l.EntityBaseFormType.Create),i=e.reactive({fields:{name:"",tags:""},isReadonly:!1,errorMessage:""}),N=e.reactive({name:"",tags:""}),I=e.computed(()=>JSON.stringify(i.fields)!==JSON.stringify(N)&&!!i.fields.name),P=s=>{var c;i.fields.name=(s==null?void 0:s.name)||"",i.fields.tags=((c=s==null?void 0:s.tags)==null?void 0:c.join(", "))||"",Object.assign(N,i.fields)},O=()=>{a.push(n.config.cancelRoute)},E=e.computed(()=>{var c,d;let s=`${n.config.apiBaseUrl}${_.form[n.config.app][V.value]}`;return n.config.app==="konnect"?s=s.replace(/{controlPlaneId}/gi,((c=n.config)==null?void 0:c.controlPlaneId)||""):n.config.app==="kongManager"&&(s=s.replace(/\/{workspace}/gi,(d=n.config)!=null&&d.workspace?`/${n.config.workspace}`:"")),s=s.replace(/{id}/gi,n.keySetId),s}),B=e.computed(()=>{var s,c,d;return{name:i.fields.name,tags:((d=(c=(s=i.fields.tags)==null?void 0:s.split(","))==null?void 0:c.map(p=>String(p||"").trim()))==null?void 0:d.filter(p=>p!==""))||""}}),A=async()=>{var s,c;try{i.isReadonly=!0;let d;if(V.value==="create"?d=await k.post(E.value,B.value):V.value==="edit"&&(d=((s=n.config)==null?void 0:s.app)==="konnect"?await k.put(E.value,B.value):await k.patch(E.value,B.value)),d){const{data:p}=d;i.fields.name=(p==null?void 0:p.name)||"",i.fields.tags=((c=p==null?void 0:p.tags)==null?void 0:c.join(", "))||"",Object.assign(N,i.fields),y("update",d==null?void 0:d.data)}}catch(d){i.errorMessage=h(d),y("error",d)}finally{i.isReadonly=!1}};return(s,c)=>{const d=e.resolveComponent("KInput");return e.openBlock(),e.createElementBlock("div",oe,[e.createVNode(e.unref(l.EntityBaseForm),{"can-submit":I.value,config:t.config,"edit-id":t.keySetId,"entity-type":e.unref(l.SupportedEntityType).KeySet,"error-message":i.errorMessage,"fetch-url":q.value,"form-fields":B.value,"is-readonly":i.isReadonly,onCancel:O,"onFetch:error":c[2]||(c[2]=p=>s.$emit("error",p)),"onFetch:success":P,onLoading:c[3]||(c[3]=p=>s.$emit("loading",p)),onSubmit:A},{default:e.withCtx(()=>[e.createVNode(e.unref(l.EntityFormSection),{description:e.unref(m)("keySets.form.sections.general.description"),"has-divider":"",title:e.unref(m)("keySets.form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:i.fields.name,"onUpdate:modelValue":c[0]||(c[0]=p=>i.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:i.isReadonly,type:"text"},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode(d,{modelValue:i.fields.tags,"onUpdate:modelValue":c[1]||(c[1]=p=>i.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:i.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"])]),_:1},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-d1b94475"]]),ae={class:"kong-ui-entities-keys-entity-config-card"},se=e.defineComponent({__name:"KeySetConfigCard",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string"||!t.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(t){const C=t,{i18n:{t:y}}=F.useI18n(),n=e.computed(()=>_.form[C.config.app].edit),a=e.ref({id:{},name:{},last_updated:{},created:{},tags:{tooltip:y("keySets.form.fields.tags.tooltip")}});return(m,h)=>(e.openBlock(),e.createElementBlock("div",ae,[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":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=se,g.KeySetForm=ne,g.KeySetList=te,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .config-card-fieldset[data-v-68ca83ec]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-68ca83ec]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-c96811e5] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-711ebcf2]{align-items:center;border-bottom:var(--2f5b0492);display:var(--5d59c22c);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-711ebcf2]{width:var(--aa41a894)}.config-card-details-row .config-card-details-label label[data-v-711ebcf2]{color:#3a3f51}.config-card-details-row .config-card-details-value[data-v-711ebcf2]{width:var(--aa3d1cde)}.config-card-details-row .config-card-details-value .truncated[data-v-711ebcf2]{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-711ebcf2]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-711ebcf2] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-711ebcf2]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-711ebcf2]{margin-right:4px}.config-card-details-row[data-v-711ebcf2] .k-label{margin-bottom:0}.config-card-details-row[data-v-711ebcf2] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-711ebcf2] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 8px 12px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0;padding-top:0}.json-endpoint .k-code-block .code-block-secondary-actions{margin-top:0!important}.json-endpoint code{direction:rtl;max-width:var(--454fa8c4);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d15be7fe]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-85381f68]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-85381f68]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-85381f68]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-85381f68] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-85381f68]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-94d27e50]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form .form-actions[data-v-94d27e50]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.kong-ui-entity-base-form .form-actions[data-v-94d27e50] .k-button:last-of-type,.kong-ui-entity-base-form .form-actions[data-v-94d27e50] .k-button:nth-last-of-type(2){margin-left:16px}.kong-ui-entity-base-form[data-v-94d27e50] .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-94d27e50] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-94d27e50] .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-94d27e50] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.content-wrapper[data-v-b252463e] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-765e475b]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-765e475b]{margin-left:auto}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-10fa27a5]{width:100%}.kong-ui-entity-filter-clear[data-v-10fa27a5]{cursor:pointer}.kong-ui-entity-filter[data-v-10fa27a5]{display:flex;position:relative}.kong-ui-entity-filter[data-v-10fa27a5] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-10fa27a5] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-10fa27a5]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-10fa27a5]{background-color:#fff;border:1px solid #afb7c5;border-radius:4px;box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;padding:8px 0 12px;position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-10fa27a5]{border-bottom:1px solid #e0e4ea;color:#6c7489;font-size:12px;font-weight:400;line-height:16px;list-style:none;margin:0 20px;padding:16px 0;position:relative;white-space:nowrap}.menu-item-title[data-v-10fa27a5]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-10fa27a5]{color:#232633}.menu-item-expand-icon[data-v-10fa27a5]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-10fa27a5]{transform:rotate(180deg)}.menu-item-indicator[data-v-10fa27a5]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-10fa27a5]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-10fa27a5] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-10fa27a5] .k-input{width:100%}.menu-item-body[data-v-10fa27a5] .k-select-input .input{font-size:12px}.menu-item-body[data-v-10fa27a5] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-10fa27a5]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-10fa27a5]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-10fa27a5]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.kong-ui-public-entity-link[data-v-60e3ef7c]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-60e3ef7c]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-60e3ef7c]{display:flex}.kong-ui-public-entity-link .entity-link[data-v-60e3ef7c] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-60e3ef7c]{display:inline-block;font-weight:400;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-60e3ef7c]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-60e3ef7c]{margin-left:2px}.kong-ui-entities-key-sets-list[data-v-b145c250]{width:100%}.kong-ui-entities-key-sets-list .kong-ui-entity-filter-input[data-v-b145c250]{margin-right:12px}.kong-ui-entities-key-sets-form[data-v-58150834]{width:100%}
1
+ .config-card-fieldset[data-v-68ca83ec]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-68ca83ec]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-c96811e5] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-711ebcf2]{align-items:center;border-bottom:var(--2f5b0492);display:var(--5d59c22c);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-711ebcf2]{width:var(--aa41a894)}.config-card-details-row .config-card-details-label label[data-v-711ebcf2]{color:#3a3f51}.config-card-details-row .config-card-details-value[data-v-711ebcf2]{width:var(--aa3d1cde)}.config-card-details-row .config-card-details-value .truncated[data-v-711ebcf2]{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-711ebcf2]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-711ebcf2] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-711ebcf2]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-711ebcf2]{margin-right:4px}.config-card-details-row[data-v-711ebcf2] .k-label{margin-bottom:0}.config-card-details-row[data-v-711ebcf2] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-711ebcf2] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 8px 12px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0;padding-top:0}.json-endpoint .k-code-block .code-block-secondary-actions{margin-top:0!important}.json-endpoint code{direction:rtl;max-width:var(--454fa8c4);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d15be7fe]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-d957ab89]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-d957ab89]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-d957ab89]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-d957ab89] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-d957ab89]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-6210a67a]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form .form-actions[data-v-6210a67a]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.kong-ui-entity-base-form .form-actions[data-v-6210a67a] .k-button:last-of-type,.kong-ui-entity-base-form .form-actions[data-v-6210a67a] .k-button:nth-last-of-type(2){margin-left:16px}.kong-ui-entity-base-form[data-v-6210a67a] .k-slideout-title{color:#000933!important;font-size:24px!important;font-weight:700!important;line-height:32px!important;margin-bottom:16px!important}.kong-ui-entity-base-form[data-v-6210a67a] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-6210a67a] .tab-item>div.tab-link.has-panels{color:#6c7489!important;font-size:14px!important;font-weight:700!important;line-height:24px!important}.kong-ui-entity-base-form[data-v-6210a67a] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.content-wrapper[data-v-b252463e] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-765e475b]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-765e475b]{margin-left:auto}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-10fa27a5]{width:100%}.kong-ui-entity-filter-clear[data-v-10fa27a5]{cursor:pointer}.kong-ui-entity-filter[data-v-10fa27a5]{display:flex;position:relative}.kong-ui-entity-filter[data-v-10fa27a5] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-10fa27a5] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-10fa27a5]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-10fa27a5]{background-color:#fff;border:1px solid #afb7c5;border-radius:4px;box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;padding:8px 0 12px;position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-10fa27a5]{border-bottom:1px solid #e0e4ea;color:#6c7489;font-size:12px;font-weight:400;line-height:16px;list-style:none;margin:0 20px;padding:16px 0;position:relative;white-space:nowrap}.menu-item-title[data-v-10fa27a5]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-10fa27a5]{color:#232633}.menu-item-expand-icon[data-v-10fa27a5]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-10fa27a5]{transform:rotate(180deg)}.menu-item-indicator[data-v-10fa27a5]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-10fa27a5]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-10fa27a5] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-10fa27a5] .k-input{width:100%}.menu-item-body[data-v-10fa27a5] .k-select-input .input{font-size:12px}.menu-item-body[data-v-10fa27a5] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-10fa27a5]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-10fa27a5]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-10fa27a5]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.kong-ui-public-entity-link[data-v-60e3ef7c]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-60e3ef7c]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-60e3ef7c]{display:flex}.kong-ui-public-entity-link .entity-link[data-v-60e3ef7c] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-60e3ef7c]{display:inline-block;font-weight:400;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-60e3ef7c]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-60e3ef7c]{margin-left:2px}.kong-ui-entities-key-sets-list[data-v-b145c250]{width:100%}.kong-ui-entities-key-sets-list .kong-ui-entity-filter-input[data-v-b145c250]{margin-right:12px}.kong-ui-entities-key-sets-form[data-v-d1b94475]{width:100%}
@@ -24,14 +24,6 @@ declare const _default: import("vue").DefineComponent<{
24
24
  type: BooleanConstructor;
25
25
  default: boolean;
26
26
  };
27
- /**
28
- * Enable display of Terraform code
29
- * Guarded by FF: khcp-12445-terraform-config-details
30
- */
31
- enableTerraform: {
32
- type: BooleanConstructor;
33
- default: boolean;
34
- };
35
27
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
36
28
  loading: (isLoading: boolean) => void;
37
29
  "fetch:error": (error: AxiosError<unknown, any>) => void;
@@ -58,20 +50,11 @@ declare const _default: import("vue").DefineComponent<{
58
50
  type: BooleanConstructor;
59
51
  default: boolean;
60
52
  };
61
- /**
62
- * Enable display of Terraform code
63
- * Guarded by FF: khcp-12445-terraform-config-details
64
- */
65
- enableTerraform: {
66
- type: BooleanConstructor;
67
- default: boolean;
68
- };
69
53
  }>> & {
70
54
  onLoading?: ((isLoading: boolean) => any) | undefined;
71
55
  "onFetch:success"?: ((data: Record<string, any>) => any) | undefined;
72
56
  "onFetch:error"?: ((error: AxiosError<unknown, any>) => any) | undefined;
73
57
  }, {
74
- enableTerraform: boolean;
75
58
  configCardDoc: string;
76
59
  hideTitle: boolean;
77
60
  }, {}>;
@@ -1 +1 @@
1
- {"version":3,"file":"KeySetConfigCard.vue.d.ts","sourceRoot":"","sources":["../../../src/components/KeySetConfigCard.vue"],"names":[],"mappings":"AA4FA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAEnC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEvC,OAAO,KAAK,EACV,6BAA6B,EAC7B,yBAAyB,EAE1B,MAAM,UAAU,CAAA;AAIjB,OAAO,gDAAgD,CAAA;;IA+OrD,oHAAoH;;cAElG,QAAQ,CAAC,yBAAyB,GAAG,6BAA6B,CAAC;;4BAE/D,yBAAyB,GAAG,6BAA6B,KAAG,OAAO;;IAQzF;;OAEG;;;;;;IAMH;;OAEG;;;;;IAKH;;;OAGG;;;;;;;;;;IA9BH,oHAAoH;;cAElG,QAAQ,CAAC,yBAAyB,GAAG,6BAA6B,CAAC;;4BAE/D,yBAAyB,GAAG,6BAA6B,KAAG,OAAO;;IAQzF;;OAEG;;;;;;IAMH;;OAEG;;;;;IAKH;;;OAGG;;;;;;;;;;;;;;AArCL,wBA2CG"}
1
+ {"version":3,"file":"KeySetConfigCard.vue.d.ts","sourceRoot":"","sources":["../../../src/components/KeySetConfigCard.vue"],"names":[],"mappings":"AAmFA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAEnC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEvC,OAAO,KAAK,EACV,6BAA6B,EAC7B,yBAAyB,EAE1B,MAAM,UAAU,CAAA;AAIjB,OAAO,gDAAgD,CAAA;;IAuNrD,oHAAoH;;cAElG,QAAQ,CAAC,yBAAyB,GAAG,6BAA6B,CAAC;;4BAE/D,yBAAyB,GAAG,6BAA6B,KAAG,OAAO;;IAQzF;;OAEG;;;;;;IAMH;;OAEG;;;;;;;;;;IAtBH,oHAAoH;;cAElG,QAAQ,CAAC,yBAAyB,GAAG,6BAA6B,CAAC;;4BAE/D,yBAAyB,GAAG,6BAA6B,KAAG,OAAO;;IAQzF;;OAEG;;;;;;IAMH;;OAEG;;;;;;;;;;;;;AA7BL,wBAmCG"}
@@ -15,14 +15,6 @@ declare const _default: import("vue").DefineComponent<{
15
15
  required: false;
16
16
  default: string;
17
17
  };
18
- /**
19
- * Enable display of Terraform code
20
- * Guarded by FF: khcp-12445-terraform-config-details
21
- */
22
- enableTerraform: {
23
- type: BooleanConstructor;
24
- default: boolean;
25
- };
26
18
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
27
19
  update: (data: Record<string, any>) => void;
28
20
  error: (error: AxiosError<unknown, any>) => void;
@@ -40,21 +32,12 @@ declare const _default: import("vue").DefineComponent<{
40
32
  required: false;
41
33
  default: string;
42
34
  };
43
- /**
44
- * Enable display of Terraform code
45
- * Guarded by FF: khcp-12445-terraform-config-details
46
- */
47
- enableTerraform: {
48
- type: BooleanConstructor;
49
- default: boolean;
50
- };
51
35
  }>> & {
52
36
  onError?: ((error: AxiosError<unknown, any>) => any) | undefined;
53
37
  onUpdate?: ((data: Record<string, any>) => any) | undefined;
54
38
  onLoading?: ((isLoading: boolean) => any) | undefined;
55
39
  }, {
56
40
  keySetId: string;
57
- enableTerraform: boolean;
58
41
  }, {}>;
59
42
  export default _default;
60
43
  //# sourceMappingURL=KeySetForm.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"KeySetForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/KeySetForm.vue"],"names":[],"mappings":"AAqOA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAGnC,OAAO,KAAK,EAAE,UAAU,EAAiB,MAAM,OAAO,CAAA;AAUtD,OAAO,KAAK,EACV,uBAAuB,EACvB,2BAA2B,EAG5B,MAAM,UAAU,CAAA;AAIjB,OAAO,gDAAgD,CAAA;;IA6WrD,oHAAoH;;cAElG,QAAQ,CAAC,uBAAuB,GAAG,2BAA2B,CAAC;;4BAE3D,uBAAuB,GAAG,2BAA2B,KAAG,OAAO;;IAQrF,6FAA6F;;;;;;IAM7F;;;OAGG;;;;;;;;;;IArBH,oHAAoH;;cAElG,QAAQ,CAAC,uBAAuB,GAAG,2BAA2B,CAAC;;4BAE3D,uBAAuB,GAAG,2BAA2B,KAAG,OAAO;;IAQrF,6FAA6F;;;;;;IAM7F;;;OAGG;;;;;;;;;;;;;AA5BL,wBAkCG"}
1
+ {"version":3,"file":"KeySetForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/KeySetForm.vue"],"names":[],"mappings":"AA4NA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAGnC,OAAO,KAAK,EAAE,UAAU,EAAiB,MAAM,OAAO,CAAA;AAUtD,OAAO,KAAK,EACV,uBAAuB,EACvB,2BAA2B,EAG5B,MAAM,UAAU,CAAA;AAIjB,OAAO,gDAAgD,CAAA;;IAqVrD,oHAAoH;;cAElG,QAAQ,CAAC,uBAAuB,GAAG,2BAA2B,CAAC;;4BAE3D,uBAAuB,GAAG,2BAA2B,KAAG,OAAO;;IAQrF,6FAA6F;;;;;;;;;;;IAZ7F,oHAAoH;;cAElG,QAAQ,CAAC,uBAAuB,GAAG,2BAA2B,CAAC;;4BAE3D,uBAAuB,GAAG,2BAA2B,KAAG,OAAO;;IAQrF,6FAA6F;;;;;;;;;;;;;AAnB/F,wBA0BG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/entities-key-sets",
3
- "version": "3.5.32",
3
+ "version": "3.5.33",
4
4
  "type": "module",
5
5
  "main": "./dist/entities-key-sets.umd.js",
6
6
  "module": "./dist/entities-key-sets.es.js",
@@ -26,8 +26,8 @@
26
26
  "axios": "^1.6.8",
27
27
  "vue": ">= 3.3.13 < 4",
28
28
  "vue-router": "^4.3.3",
29
- "@kong-ui-public/entities-shared": "^3.9.18",
30
- "@kong-ui-public/i18n": "^2.2.3"
29
+ "@kong-ui-public/i18n": "^2.2.3",
30
+ "@kong-ui-public/entities-shared": "^3.9.19"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@kong/icons": "^1.18.1",
@@ -35,8 +35,8 @@
35
35
  "axios": "^1.7.7",
36
36
  "vue": "^3.4.38",
37
37
  "vue-router": "^4.4.5",
38
- "@kong-ui-public/entities-shared": "^3.9.18",
39
- "@kong-ui-public/i18n": "^2.2.3"
38
+ "@kong-ui-public/i18n": "^2.2.3",
39
+ "@kong-ui-public/entities-shared": "^3.9.19"
40
40
  },
41
41
  "repository": {
42
42
  "type": "git",