@kong-ui-public/entities-snis 3.5.42 → 3.5.44

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 fe, ref as v, computed as g, watch as se, onBeforeMount as ue, resolveComponent as C, openBlock as h, createElementBlock as N, createVNode as p, unref as s, withCtx as f, createBlock as w, Teleport as ve, withDirectives as he, createTextVNode as A, toDisplayString as k, vShow as be, createElementVNode as re, Fragment as _e, renderList as ke, withModifiers as Ie, reactive as le, createCommentVNode as Ce } from "vue";
2
- import { createI18n as Se, i18nTComponent as Ee } from "@kong-ui-public/i18n";
3
- import { useAxios as pe, useFetcher as Me, useDeleteUrlBuilder as $e, FetcherStatus as ce, EntityBaseTable as xe, EntityFilter as De, PermissionsWrapper as ne, EntityDeleteModal as Fe, EntityTypes as Ne, useErrors as we, EntityBaseFormType as oe, useDebouncedFilter as Re, EntityBaseForm as Be, SupportedEntityType as Ke, EntityFormSection as de } from "@kong-ui-public/entities-shared";
4
- import { AddIcon as Te } from "@kong/icons";
5
- import { useRouter as qe } from "vue-router";
6
- const Pe = {
1
+ import { defineComponent as de, ref as v, computed as g, watch as ne, onBeforeMount as fe, resolveComponent as D, openBlock as I, createElementBlock as Q, createVNode as u, unref as n, withCtx as p, createBlock as W, Teleport as ge, withDirectives as ye, createTextVNode as J, toDisplayString as _, vShow as ve, createElementVNode as se, reactive as re, createCommentVNode as he } from "vue";
2
+ import { createI18n as be, i18nTComponent as ke } from "@kong-ui-public/i18n";
3
+ import { useAxios as ue, useFetcher as _e, useDeleteUrlBuilder as Ie, FetcherStatus as le, EntityBaseTable as Ce, EntityFilter as Se, PermissionsWrapper as ae, TableTags as Ee, EntityDeleteModal as Me, EntityTypes as $e, useErrors as xe, EntityBaseFormType as oe, useDebouncedFilter as we, EntityBaseForm as De, SupportedEntityType as Ne, EntityFormSection as ce } from "@kong-ui-public/entities-shared";
4
+ import { AddIcon as Fe } from "@kong/icons";
5
+ import { useRouter as Re } from "vue-router";
6
+ const Te = {
7
7
  create: "New SNI",
8
8
  copy_id: "Copy ID",
9
9
  copy_json: "Copy JSON",
@@ -11,10 +11,10 @@ const Pe = {
11
11
  delete: "Delete",
12
12
  clear: "Clear",
13
13
  loading: "Loading..."
14
- }, Ue = {
14
+ }, Be = {
15
15
  placeholder: "Filter by exact name or ID",
16
16
  no_results: "No results found"
17
- }, Oe = {
17
+ }, Ve = {
18
18
  title: "SNIs",
19
19
  list: {
20
20
  toolbar_actions: {
@@ -31,7 +31,7 @@ const Pe = {
31
31
  description: "SNIs are used to map hostnames to a certificate."
32
32
  }
33
33
  }
34
- }, Ae = {
34
+ }, Ke = {
35
35
  sections: {
36
36
  general: {
37
37
  title: "General Information",
@@ -59,7 +59,7 @@ const Pe = {
59
59
  footer: "Search by exact ID to find certificates not included in the list"
60
60
  }
61
61
  }
62
- }, Ve = {
62
+ }, qe = {
63
63
  delete: "The SNI could not be deleted at this time.",
64
64
  general: "SNIs could not be retrieved",
65
65
  certificates: {
@@ -67,62 +67,62 @@ const Pe = {
67
67
  invalid: "Please select a valid certificate ID"
68
68
  },
69
69
  copy: "Failed to copy to clipboard"
70
- }, je = {
70
+ }, Pe = {
71
71
  success: "Copied {val} to clipboard",
72
72
  success_brief: "Successfully copied to clipboard"
73
- }, Le = {
74
- actions: Pe,
75
- search: Ue,
76
- snis: Oe,
77
- form: Ae,
73
+ }, Ue = {
74
+ actions: Te,
75
+ search: Be,
76
+ snis: Ve,
77
+ form: Ke,
78
78
  delete: {
79
79
  title: "Delete an SNI",
80
80
  description: "This action cannot be reversed so make sure to check the SNI usage before deleting."
81
81
  },
82
- errors: Ve,
83
- copy: je
82
+ errors: qe,
83
+ copy: Pe
84
84
  };
85
- function Je() {
86
- const n = Se("en-us", Le);
85
+ function Oe() {
86
+ const o = be("en-us", Ue);
87
87
  return {
88
- i18n: n,
89
- i18nT: Ee(n)
88
+ i18n: o,
89
+ i18nT: ke(o)
90
90
  // Translation component <i18n-t>
91
91
  };
92
92
  }
93
- const me = {
94
- useI18n: Je
95
- }, V = "/v2/control-planes/{controlPlaneId}/core-entities", j = "/{workspace}", L = {
93
+ const pe = {
94
+ useI18n: Oe
95
+ }, q = "/v2/control-planes/{controlPlaneId}/core-entities", P = "/{workspace}", U = {
96
96
  list: {
97
97
  konnect: {
98
- all: `${V}/snis`
98
+ all: `${q}/snis`
99
99
  },
100
100
  kongManager: {
101
- all: `${j}/snis`
101
+ all: `${P}/snis`
102
102
  }
103
103
  },
104
104
  form: {
105
105
  konnect: {
106
- create: `${V}/snis`,
107
- edit: `${V}/snis/{id}`,
108
- validate: `${V}/v1/schemas/json/sni/validate`,
109
- certificates: `${V}/certificates`
106
+ create: `${q}/snis`,
107
+ edit: `${q}/snis/{id}`,
108
+ validate: `${q}/v1/schemas/json/sni/validate`,
109
+ certificates: `${q}/certificates`
110
110
  },
111
111
  kongManager: {
112
- create: `${j}/snis`,
113
- edit: `${j}/snis/{id}`,
114
- validate: `${j}/schemas/snis/validate`,
115
- certificates: `${j}/certificates`
112
+ create: `${P}/snis`,
113
+ edit: `${P}/snis/{id}`,
114
+ validate: `${P}/schemas/snis/validate`,
115
+ certificates: `${P}/certificates`
116
116
  }
117
117
  }
118
- }, Qe = { class: "kong-ui-entities-snis-list" }, We = { key: 1 }, ze = { key: 1 }, Ge = /* @__PURE__ */ fe({
118
+ }, Ae = { class: "kong-ui-entities-snis-list" }, je = { key: 1 }, Le = /* @__PURE__ */ de({
119
119
  __name: "SniList",
120
120
  props: {
121
121
  /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
122
122
  config: {
123
123
  type: Object,
124
124
  required: !0,
125
- validator: (n) => !(!n || !["konnect", "kongManager"].includes(n == null ? void 0 : n.app) || !n.createRoute || !n.getViewRoute || !n.getEditRoute || n.app === "kongManager" && !n.isExactMatch && !n.filterSchema)
125
+ validator: (o) => !(!o || !["konnect", "kongManager"].includes(o == null ? void 0 : o.app) || !o.createRoute || !o.getViewRoute || !o.getEditRoute || o.app === "kongManager" && !o.isExactMatch && !o.filterSchema)
126
126
  },
127
127
  // used to override the default identifier for the cache entry
128
128
  cacheIdentifier: {
@@ -160,239 +160,225 @@ const me = {
160
160
  }
161
161
  },
162
162
  emits: ["error", "copy:success", "copy:error", "delete:success"],
163
- setup(n, { emit: R }) {
164
- var U;
165
- const y = R, t = n, { i18n: { t: l } } = me.useI18n(), { axiosInstance: u } = pe((U = t.config) == null ? void 0 : U.axiosRequestConfig), B = v(1), E = g(() => t.config.app !== "kongManager" || !!t.config.disableSorting), J = {
163
+ setup(o, { emit: N }) {
164
+ var K;
165
+ const y = N, t = o, { i18n: { t: c } } = pe.useI18n(), { axiosInstance: d } = ue((K = t.config) == null ? void 0 : K.axiosRequestConfig), F = v(1), E = g(() => t.config.app !== "kongManager" || !!t.config.disableSorting), O = {
166
166
  // the Name column is non-hidable
167
- name: { label: l("snis.list.table_headers.name"), searchable: !0, sortable: !0, hidable: !1 },
168
- certificate: { label: l("snis.list.table_headers.certificate_id"), sortable: !1 },
169
- tags: { label: l("snis.list.table_headers.tags"), sortable: !1 }
170
- }, M = J, $ = (i) => ({
167
+ name: { label: c("snis.list.table_headers.name"), searchable: !0, sortable: !0, hidable: !1 },
168
+ certificate: { label: c("snis.list.table_headers.certificate_id"), sortable: !1 },
169
+ tags: { label: c("snis.list.table_headers.tags"), sortable: !1 }
170
+ }, M = O, $ = (i) => ({
171
171
  style: {
172
172
  maxWidth: i.headerKey === "name" ? "250px" : i.headerKey === "certificate" ? "350px" : null
173
173
  }
174
- }), r = g(() => {
175
- var d, e;
176
- let i = `${t.config.apiBaseUrl}${L.list[t.config.app].all}`;
177
- return t.config.app === "konnect" ? i = i.replace(/{controlPlaneId}/gi, ((d = t.config) == null ? void 0 : d.controlPlaneId) || "") : t.config.app === "kongManager" && (i = i.replace(/\/{workspace}/gi, (e = t.config) != null && e.workspace ? `/${t.config.workspace}` : "")), i;
178
- }), I = v(""), G = g(() => {
174
+ }), s = g(() => {
175
+ var f, e;
176
+ let i = `${t.config.apiBaseUrl}${U.list[t.config.app].all}`;
177
+ return t.config.app === "konnect" ? i = i.replace(/{controlPlaneId}/gi, ((f = t.config) == null ? void 0 : f.controlPlaneId) || "") : t.config.app === "kongManager" && (i = i.replace(/\/{workspace}/gi, (e = t.config) != null && e.workspace ? `/${t.config.workspace}` : "")), i;
178
+ }), k = v(""), z = g(() => {
179
179
  const i = t.config.app === "konnect" || t.config.isExactMatch;
180
180
  if (i)
181
181
  return {
182
182
  isExactMatch: i,
183
- placeholder: l("search.placeholder")
183
+ placeholder: c("search.placeholder")
184
184
  };
185
- const { name: d } = J;
185
+ const { name: f } = O;
186
186
  return {
187
187
  isExactMatch: i,
188
- fields: { name: d },
188
+ fields: { name: f },
189
189
  schema: t.config.filterSchema
190
190
  };
191
- }), { fetcher: H, fetcherState: X } = Me(t.config, r.value), Y = () => {
192
- I.value = "";
193
- }, K = () => {
194
- B.value++;
195
- }, b = v(null), T = v(!1), q = v({
191
+ }), { fetcher: G, fetcherState: H } = _e(t.config, s.value), X = () => {
192
+ k.value = "";
193
+ }, R = () => {
194
+ F.value++;
195
+ }, h = v(null), T = v(!1), B = v({
196
196
  ctaPath: t.config.createRoute,
197
197
  ctaText: void 0,
198
- message: `${l("snis.list.empty_state.description")}${t.config.additionMessageForEmptyState ? ` ${t.config.additionMessageForEmptyState}` : ""}`,
199
- title: l("snis.title")
200
- }), Z = (i, d) => {
198
+ message: `${c("snis.list.empty_state.description")}${t.config.additionMessageForEmptyState ? ` ${t.config.additionMessageForEmptyState}` : ""}`,
199
+ title: c("snis.title")
200
+ }), Y = (i, f) => {
201
201
  const e = i.id;
202
- if (!d(e)) {
202
+ if (!f(e)) {
203
203
  y("copy:error", {
204
204
  entity: i,
205
205
  field: "id",
206
- message: l("errors.copy")
206
+ message: c("errors.copy")
207
207
  });
208
208
  return;
209
209
  }
210
210
  y("copy:success", {
211
211
  entity: i,
212
212
  field: "id",
213
- message: l("copy.success", { val: e })
213
+ message: c("copy.success", { val: e })
214
214
  });
215
- }, ee = (i, d) => {
215
+ }, Z = (i, f) => {
216
216
  const e = JSON.stringify(i);
217
- if (!d(e)) {
217
+ if (!f(e)) {
218
218
  y("copy:error", {
219
219
  entity: i,
220
- message: l("errors.copy")
220
+ message: c("errors.copy")
221
221
  });
222
222
  return;
223
223
  }
224
224
  y("copy:success", {
225
225
  entity: i,
226
- message: l("copy.success_brief")
226
+ message: c("copy.success_brief")
227
227
  });
228
- }, te = (i) => ({
229
- label: l("actions.edit"),
228
+ }, ee = (i) => ({
229
+ label: c("actions.edit"),
230
230
  to: t.config.getEditRoute(i)
231
- }), _ = v(void 0), P = v(!1), x = v(!1), Q = v(""), ie = $e(t.config, r.value), W = (i) => {
232
- _.value = i, P.value = !0;
233
- }, z = () => {
234
- P.value = !1, _.value = void 0;
235
- }, ae = async () => {
236
- var i, d, e;
237
- if ((i = _.value) != null && i.id) {
231
+ }), b = v(void 0), V = v(!1), x = v(!1), A = v(""), te = Ie(t.config, s.value), j = (i) => {
232
+ b.value = i, V.value = !0;
233
+ }, L = () => {
234
+ V.value = !1, b.value = void 0;
235
+ }, ie = async () => {
236
+ var i, f, e;
237
+ if ((i = b.value) != null && i.id) {
238
238
  x.value = !0;
239
239
  try {
240
- await u.delete(ie(_.value.id)), y("delete:success", _.value), x.value = !1, z(), B.value++;
240
+ await d.delete(te(b.value.id)), y("delete:success", b.value), x.value = !1, L(), F.value++;
241
241
  } catch (a) {
242
- Q.value = ((e = (d = a.response) == null ? void 0 : d.data) == null ? void 0 : e.message) || a.message || l("errors.delete"), y("error", a);
242
+ A.value = ((e = (f = a.response) == null ? void 0 : f.data) == null ? void 0 : e.message) || a.message || c("errors.delete"), y("error", a);
243
243
  } finally {
244
244
  x.value = !1;
245
245
  }
246
246
  }
247
- }, D = v(!1);
248
- return se(X, (i) => {
249
- var d, e, a, c;
250
- if (Array.isArray((d = i == null ? void 0 : i.response) == null ? void 0 : d.data) && (D.value = i.response.data.length > 0), i.status === ce.NoRecords ? T.value = !0 : T.value = !1, i.status === ce.Error) {
251
- b.value = {
252
- title: l("errors.general")
253
- }, (c = (a = (e = i.error) == null ? void 0 : e.response) == null ? void 0 : a.data) != null && c.message && (b.value.message = i.error.response.data.message), y("error", i.error);
247
+ }, w = v(!1);
248
+ return ne(H, (i) => {
249
+ var f, e, a, l;
250
+ if (Array.isArray((f = i == null ? void 0 : i.response) == null ? void 0 : f.data) && (w.value = i.response.data.length > 0), i.status === le.NoRecords ? T.value = !0 : T.value = !1, i.status === le.Error) {
251
+ h.value = {
252
+ title: c("errors.general")
253
+ }, (l = (a = (e = i.error) == null ? void 0 : e.response) == null ? void 0 : a.data) != null && l.message && (h.value.message = i.error.response.data.message), y("error", i.error);
254
254
  return;
255
255
  }
256
- b.value = null;
257
- }), ue(async () => {
258
- await t.canCreate() && (q.value.title = l("snis.list.empty_state.title"), q.value.ctaText = l("actions.create"));
259
- }), (i, d) => {
260
- const e = C("KButton"), a = C("KCopy"), c = C("KBadge"), F = C("KTruncate"), m = C("KDropdownItem"), O = C("KClipboardProvider");
261
- return h(), N("div", Qe, [
262
- p(s(xe), {
263
- "cache-identifier": n.cacheIdentifier,
256
+ h.value = null;
257
+ }), fe(async () => {
258
+ await t.canCreate() && (B.value.title = c("snis.list.empty_state.title"), B.value.ctaText = c("actions.create"));
259
+ }), (i, f) => {
260
+ const e = D("KButton"), a = D("KCopy"), l = D("KDropdownItem"), C = D("KClipboardProvider");
261
+ return I(), Q("div", Ae, [
262
+ u(n(Ce), {
263
+ "cache-identifier": o.cacheIdentifier,
264
264
  "cell-attributes": $,
265
265
  "disable-row-click": !0,
266
266
  "disable-sorting": E.value,
267
- "empty-state-options": q.value,
267
+ "empty-state-options": B.value,
268
268
  "enable-entity-actions": "",
269
- "error-message": b.value,
270
- fetcher: s(H),
271
- "fetcher-cache-key": B.value,
269
+ "error-message": h.value,
270
+ fetcher: n(G),
271
+ "fetcher-cache-key": F.value,
272
272
  "hide-toolbar": T.value,
273
273
  "pagination-type": "offset",
274
274
  "preferences-storage-key": "kong-ui-entities-snis-list",
275
- query: I.value,
276
- "table-headers": s(M),
277
- onClearSearchInput: Y,
278
- onSort: K
275
+ query: k.value,
276
+ "table-headers": n(M),
277
+ onClearSearchInput: X,
278
+ onSort: R
279
279
  }, {
280
- "toolbar-filter": f(() => [
281
- p(s(De), {
282
- modelValue: I.value,
283
- "onUpdate:modelValue": d[0] || (d[0] = (o) => I.value = o),
284
- config: G.value
280
+ "toolbar-filter": p(() => [
281
+ u(n(Se), {
282
+ modelValue: k.value,
283
+ "onUpdate:modelValue": f[0] || (f[0] = (r) => k.value = r),
284
+ config: z.value
285
285
  }, null, 8, ["modelValue", "config"])
286
286
  ]),
287
- "toolbar-button": f(() => [
288
- (h(), w(ve, {
289
- disabled: !n.useActionOutside,
287
+ "toolbar-button": p(() => [
288
+ (I(), W(ge, {
289
+ disabled: !o.useActionOutside,
290
290
  to: "#kong-ui-app-page-header-action-button"
291
291
  }, [
292
- p(s(ne), {
293
- "auth-function": () => n.canCreate()
292
+ u(n(ae), {
293
+ "auth-function": () => o.canCreate()
294
294
  }, {
295
- default: f(() => [
296
- he(p(e, {
295
+ default: p(() => [
296
+ ye(u(e, {
297
297
  appearance: "primary",
298
298
  "data-testid": "toolbar-add-sni",
299
- size: n.useActionOutside ? "medium" : "large",
300
- to: n.config.createRoute
299
+ size: o.useActionOutside ? "medium" : "large",
300
+ to: o.config.createRoute
301
301
  }, {
302
- default: f(() => [
303
- p(s(Te)),
304
- A(" " + k(s(l)("snis.list.toolbar_actions.new")), 1)
302
+ default: p(() => [
303
+ u(n(Fe)),
304
+ J(" " + _(n(c)("snis.list.toolbar_actions.new")), 1)
305
305
  ]),
306
306
  _: 1
307
307
  }, 8, ["size", "to"]), [
308
- [be, D.value]
308
+ [ve, w.value]
309
309
  ])
310
310
  ]),
311
311
  _: 1
312
312
  }, 8, ["auth-function"])
313
313
  ], 8, ["disabled"]))
314
314
  ]),
315
- name: f(({ rowValue: o }) => [
316
- re("b", null, k(o ?? "-"), 1)
315
+ name: p(({ rowValue: r }) => [
316
+ se("b", null, _(r ?? "-"), 1)
317
317
  ]),
318
- certificate: f(({ row: o }) => [
319
- o.certificate && o.certificate.id ? (h(), w(a, {
318
+ certificate: p(({ row: r }) => [
319
+ r.certificate && r.certificate.id ? (I(), W(a, {
320
320
  key: 0,
321
321
  class: "copy-certificate-uuid",
322
322
  "data-testid": "copy-certificate-uuid",
323
- text: o.certificate.id,
323
+ text: r.certificate.id,
324
324
  truncate: ""
325
- }, null, 8, ["text"])) : (h(), N("span", We, "-"))
325
+ }, null, 8, ["text"])) : (I(), Q("span", je, "-"))
326
326
  ]),
327
- tags: f(({ rowValue: o }) => [
328
- o != null && o.length ? (h(), w(F, { key: 0 }, {
329
- default: f(() => [
330
- (h(!0), N(_e, null, ke(o, (S) => (h(), w(c, {
331
- key: S,
332
- onClick: d[1] || (d[1] = Ie(() => {
333
- }, ["stop"]))
334
- }, {
335
- default: f(() => [
336
- A(k(S), 1)
337
- ]),
338
- _: 2
339
- }, 1024))), 128))
340
- ]),
341
- _: 2
342
- }, 1024)) : (h(), N("span", ze, "-"))
327
+ tags: p(({ rowValue: r }) => [
328
+ u(n(Ee), { tags: r }, null, 8, ["tags"])
343
329
  ]),
344
- actions: f(({ row: o }) => [
345
- p(O, null, {
346
- default: f(({ copyToClipboard: S }) => [
347
- p(m, {
330
+ actions: p(({ row: r }) => [
331
+ u(C, null, {
332
+ default: p(({ copyToClipboard: S }) => [
333
+ u(l, {
348
334
  "data-testid": "action-entity-copy-id",
349
- onClick: (ye) => Z(o, S)
335
+ onClick: (m) => Y(r, S)
350
336
  }, {
351
- default: f(() => [
352
- A(k(s(l)("actions.copy_id")), 1)
337
+ default: p(() => [
338
+ J(_(n(c)("actions.copy_id")), 1)
353
339
  ]),
354
340
  _: 2
355
341
  }, 1032, ["onClick"])
356
342
  ]),
357
343
  _: 2
358
344
  }, 1024),
359
- p(O, null, {
360
- default: f(({ copyToClipboard: S }) => [
361
- p(m, {
345
+ u(C, null, {
346
+ default: p(({ copyToClipboard: S }) => [
347
+ u(l, {
362
348
  "data-testid": "action-entity-copy-json",
363
- onClick: (ye) => ee(o, S)
349
+ onClick: (m) => Z(r, S)
364
350
  }, {
365
- default: f(() => [
366
- A(k(s(l)("actions.copy_json")), 1)
351
+ default: p(() => [
352
+ J(_(n(c)("actions.copy_json")), 1)
367
353
  ]),
368
354
  _: 2
369
355
  }, 1032, ["onClick"])
370
356
  ]),
371
357
  _: 2
372
358
  }, 1024),
373
- p(s(ne), {
374
- "auth-function": () => n.canEdit(o)
359
+ u(n(ae), {
360
+ "auth-function": () => o.canEdit(r)
375
361
  }, {
376
- default: f(() => [
377
- p(m, {
362
+ default: p(() => [
363
+ u(l, {
378
364
  "data-testid": "action-entity-edit",
379
- item: te(o.id)
365
+ item: ee(r.id)
380
366
  }, null, 8, ["item"])
381
367
  ]),
382
368
  _: 2
383
369
  }, 1032, ["auth-function"]),
384
- p(s(ne), {
385
- "auth-function": () => n.canDelete(o)
370
+ u(n(ae), {
371
+ "auth-function": () => o.canDelete(r)
386
372
  }, {
387
- default: f(() => [
388
- p(m, {
373
+ default: p(() => [
374
+ u(l, {
389
375
  danger: "",
390
376
  "data-testid": "action-entity-delete",
391
377
  "has-divider": "",
392
- onClick: (S) => W(o)
378
+ onClick: (S) => j(r)
393
379
  }, {
394
- default: f(() => [
395
- A(k(s(l)("actions.delete")), 1)
380
+ default: p(() => [
381
+ J(_(n(c)("actions.delete")), 1)
396
382
  ]),
397
383
  _: 2
398
384
  }, 1032, ["onClick"])
@@ -402,38 +388,38 @@ const me = {
402
388
  ]),
403
389
  _: 1
404
390
  }, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "hide-toolbar", "query", "table-headers"]),
405
- p(s(Fe), {
391
+ u(n(Me), {
406
392
  "action-pending": x.value,
407
- description: s(l)("delete.description"),
408
- "entity-name": _.value && (_.value.name || _.value.id),
409
- "entity-type": s(Ne).SNI,
410
- error: Q.value,
393
+ description: n(c)("delete.description"),
394
+ "entity-name": b.value && (b.value.name || b.value.id),
395
+ "entity-type": n($e).SNI,
396
+ error: A.value,
411
397
  "need-confirm": !1,
412
- title: s(l)("delete.title"),
413
- visible: P.value,
414
- onCancel: z,
415
- onProceed: ae
398
+ title: n(c)("delete.title"),
399
+ visible: V.value,
400
+ onCancel: L,
401
+ onProceed: ie
416
402
  }, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
417
403
  ]);
418
404
  };
419
405
  }
420
- }), ge = (n, R) => {
421
- const y = n.__vccOpts || n;
422
- for (const [t, l] of R)
423
- y[t] = l;
406
+ }), me = (o, N) => {
407
+ const y = o.__vccOpts || o;
408
+ for (const [t, c] of N)
409
+ y[t] = c;
424
410
  return y;
425
- }, ot = /* @__PURE__ */ ge(Ge, [["__scopeId", "data-v-ae9b8532"]]), He = { class: "kong-ui-entities-snis-form" }, Xe = { "data-testid": "no-search-results" }, Ye = {
411
+ }, et = /* @__PURE__ */ me(Le, [["__scopeId", "data-v-5945458b"]]), Je = { class: "kong-ui-entities-snis-form" }, Qe = { "data-testid": "no-search-results" }, We = {
426
412
  key: 2,
427
413
  class: "invalid-certificate-message",
428
414
  "data-testid": "invalid-certificate-message"
429
- }, Ze = /* @__PURE__ */ fe({
415
+ }, ze = /* @__PURE__ */ de({
430
416
  __name: "SniForm",
431
417
  props: {
432
418
  /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
433
419
  config: {
434
420
  type: Object,
435
421
  required: !0,
436
- validator: (n) => !(!n || !["konnect", "kongManager"].includes(n == null ? void 0 : n.app) || n.app === "konnect" && !n.controlPlaneId || n.app === "kongManager" && typeof n.workspace != "string" || !n.cancelRoute)
422
+ validator: (o) => !(!o || !["konnect", "kongManager"].includes(o == null ? void 0 : o.app) || o.app === "konnect" && !o.controlPlaneId || o.app === "kongManager" && typeof o.workspace != "string" || !o.cancelRoute)
437
423
  },
438
424
  /** If a valid SNI ID is provided, it will put the form in Edit mode instead of Create */
439
425
  sniId: {
@@ -443,9 +429,9 @@ const me = {
443
429
  }
444
430
  },
445
431
  emits: ["update", "error", "loading"],
446
- setup(n, { emit: R }) {
447
- var d;
448
- const y = R, t = n, l = qe(), { i18n: { t: u } } = me.useI18n(), { getMessageFromError: B } = we(), { axiosInstance: E } = pe((d = t.config) == null ? void 0 : d.axiosRequestConfig), J = g(() => L.form[t.config.app].edit), M = g(() => t.sniId ? oe.Edit : oe.Create), $ = g(() => t.config.certificateId && M.value === oe.Create ? t.config.certificateId : ""), r = le({
432
+ setup(o, { emit: N }) {
433
+ var f;
434
+ const y = N, t = o, c = Re(), { i18n: { t: d } } = pe.useI18n(), { getMessageFromError: F } = xe(), { axiosInstance: E } = ue((f = t.config) == null ? void 0 : f.axiosRequestConfig), O = g(() => U.form[t.config.app].edit), M = g(() => t.sniId ? oe.Edit : oe.Create), $ = g(() => t.config.certificateId && M.value === oe.Create ? t.config.certificateId : ""), s = re({
449
435
  fields: {
450
436
  name: "",
451
437
  tags: "",
@@ -453,163 +439,163 @@ const me = {
453
439
  },
454
440
  isReadonly: !1,
455
441
  errorMessage: ""
456
- }), I = le({
442
+ }), k = re({
457
443
  name: "",
458
444
  tags: "",
459
445
  certificate_id: ""
460
- }), G = g(() => JSON.stringify(r.fields) !== JSON.stringify(I) && !!r.fields.name && !!(r.fields.certificate_id || $.value)), H = (e) => {
461
- var a, c;
462
- r.fields.name = (e == null ? void 0 : e.name) || "", r.fields.tags = ((a = e == null ? void 0 : e.tags) == null ? void 0 : a.join(", ")) || "", r.fields.certificate_id = ((c = e == null ? void 0 : e.certificate) == null ? void 0 : c.id) || "", Object.assign(I, r.fields);
463
- }, X = () => {
464
- l.push(t.config.cancelRoute);
465
- }, Y = g(() => {
466
- var a, c;
467
- let e = `${t.config.apiBaseUrl}${L.form[t.config.app].validate}`;
468
- return t.config.app === "konnect" ? e = e.replace(/{controlPlaneId}/gi, ((a = t.config) == null ? void 0 : a.controlPlaneId) || "") : t.config.app === "kongManager" && (e = e.replace(/\/{workspace}/gi, (c = t.config) != null && c.workspace ? `/${t.config.workspace}` : "")), e = e.replace(/{id}/gi, t.sniId), e;
469
- }), K = g(() => {
470
- var a, c;
471
- let e = `${t.config.apiBaseUrl}${L.form[t.config.app][M.value]}`;
472
- return t.config.app === "konnect" ? e = e.replace(/{controlPlaneId}/gi, ((a = t.config) == null ? void 0 : a.controlPlaneId) || "") : t.config.app === "kongManager" && (e = e.replace(/\/{workspace}/gi, (c = t.config) != null && c.workspace ? `/${t.config.workspace}` : "")), e = e.replace(/{id}/gi, t.sniId), e;
473
- }), b = g(() => {
446
+ }), z = g(() => JSON.stringify(s.fields) !== JSON.stringify(k) && !!s.fields.name && !!(s.fields.certificate_id || $.value)), G = (e) => {
447
+ var a, l;
448
+ s.fields.name = (e == null ? void 0 : e.name) || "", s.fields.tags = ((a = e == null ? void 0 : e.tags) == null ? void 0 : a.join(", ")) || "", s.fields.certificate_id = ((l = e == null ? void 0 : e.certificate) == null ? void 0 : l.id) || "", Object.assign(k, s.fields);
449
+ }, H = () => {
450
+ c.push(t.config.cancelRoute);
451
+ }, X = g(() => {
452
+ var a, l;
453
+ let e = `${t.config.apiBaseUrl}${U.form[t.config.app].validate}`;
454
+ return t.config.app === "konnect" ? e = e.replace(/{controlPlaneId}/gi, ((a = t.config) == null ? void 0 : a.controlPlaneId) || "") : t.config.app === "kongManager" && (e = e.replace(/\/{workspace}/gi, (l = t.config) != null && l.workspace ? `/${t.config.workspace}` : "")), e = e.replace(/{id}/gi, t.sniId), e;
455
+ }), R = g(() => {
456
+ var a, l;
457
+ let e = `${t.config.apiBaseUrl}${U.form[t.config.app][M.value]}`;
458
+ return t.config.app === "konnect" ? e = e.replace(/{controlPlaneId}/gi, ((a = t.config) == null ? void 0 : a.controlPlaneId) || "") : t.config.app === "kongManager" && (e = e.replace(/\/{workspace}/gi, (l = t.config) != null && l.workspace ? `/${t.config.workspace}` : "")), e = e.replace(/{id}/gi, t.sniId), e;
459
+ }), h = g(() => {
474
460
  var e, a;
475
461
  return {
476
- name: r.fields.name,
477
- tags: (a = (e = r.fields.tags.split(",")) == null ? void 0 : e.map((c) => String(c || "").trim())) == null ? void 0 : a.filter((c) => c !== ""),
478
- certificate: { id: $.value || r.fields.certificate_id }
462
+ name: s.fields.name,
463
+ tags: (a = (e = s.fields.tags.split(",")) == null ? void 0 : e.map((l) => String(l || "").trim())) == null ? void 0 : a.filter((l) => l !== ""),
464
+ certificate: { id: $.value || s.fields.certificate_id }
479
465
  };
480
466
  }), T = async () => {
481
- var e, a, c, F, m, O;
467
+ var e, a, l, C, r, S;
482
468
  try {
483
- r.isReadonly = !0;
484
- let o;
485
- await E.post(Y.value, b.value), M.value === "create" ? o = await E.post(K.value, b.value) : M.value === "edit" && (o = ((e = t.config) == null ? void 0 : e.app) === "konnect" ? await E.put(K.value, b.value) : await E.patch(K.value, b.value)), r.fields.name = ((a = o == null ? void 0 : o.data) == null ? void 0 : a.name) || "", r.fields.tags = ((F = (c = o == null ? void 0 : o.data) == null ? void 0 : c.tags) == null ? void 0 : F.join(", ")) || "", r.fields.certificate_id = ((O = (m = o == null ? void 0 : o.data) == null ? void 0 : m.certificate) == null ? void 0 : O.id) || "", Object.assign(I, r.fields), y("update", o == null ? void 0 : o.data);
486
- } catch (o) {
487
- r.errorMessage = B(o), y("error", o);
469
+ s.isReadonly = !0;
470
+ let m;
471
+ await E.post(X.value, h.value), M.value === "create" ? m = await E.post(R.value, h.value) : M.value === "edit" && (m = ((e = t.config) == null ? void 0 : e.app) === "konnect" ? await E.put(R.value, h.value) : await E.patch(R.value, h.value)), s.fields.name = ((a = m == null ? void 0 : m.data) == null ? void 0 : a.name) || "", s.fields.tags = ((C = (l = m == null ? void 0 : m.data) == null ? void 0 : l.tags) == null ? void 0 : C.join(", ")) || "", s.fields.certificate_id = ((S = (r = m == null ? void 0 : m.data) == null ? void 0 : r.certificate) == null ? void 0 : S.id) || "", Object.assign(k, s.fields), y("update", m == null ? void 0 : m.data);
472
+ } catch (m) {
473
+ s.errorMessage = F(m), y("error", m);
488
474
  } finally {
489
- r.isReadonly = !1;
475
+ s.isReadonly = !1;
490
476
  }
491
477
  }, {
492
- debouncedQueryChange: q,
493
- loading: Z,
494
- allRecords: ee,
495
- error: te,
496
- validationError: _,
497
- loadItems: P,
478
+ debouncedQueryChange: B,
479
+ loading: Y,
480
+ allRecords: Z,
481
+ error: ee,
482
+ validationError: b,
483
+ loadItems: V,
498
484
  results: x
499
- } = Re(t.config, L.form[t.config.app].certificates), Q = (e) => {
500
- q(e);
501
- }, ie = g(() => te.value ? u("errors.certificates.fetch") : ""), W = g(() => _.value ? u("errors.certificates.invalid") : ""), z = v(0), ae = g(() => ee.value === void 0), D = v(/* @__PURE__ */ new Set()), U = g(() => Array.from(D.value).map((a) => ({
485
+ } = we(t.config, U.form[t.config.app].certificates), A = (e) => {
486
+ B(e);
487
+ }, te = g(() => ee.value ? d("errors.certificates.fetch") : ""), j = g(() => b.value ? d("errors.certificates.invalid") : ""), L = v(0), ie = g(() => Z.value === void 0), w = v(/* @__PURE__ */ new Set()), K = g(() => Array.from(w.value).map((a) => ({
502
488
  label: a,
503
489
  value: a,
504
- selected: r.fields.certificate_id === a
490
+ selected: s.fields.certificate_id === a
505
491
  }))), i = (e) => {
506
- D.value.clear();
492
+ w.value.clear();
507
493
  let a;
508
494
  for (a of e)
509
- D.value.add(a.id);
495
+ w.value.add(a.id);
510
496
  };
511
- return se(x, (e) => {
497
+ return ne(x, (e) => {
512
498
  i(e);
513
- }, { immediate: !0, deep: !0 }), se(U, () => {
514
- z.value++;
515
- }, { immediate: !0, deep: !0 }), ue(async () => {
516
- await P();
499
+ }, { immediate: !0, deep: !0 }), ne(K, () => {
500
+ L.value++;
501
+ }, { immediate: !0, deep: !0 }), fe(async () => {
502
+ await V();
517
503
  }), (e, a) => {
518
- const c = C("KInput"), F = C("KSelect");
519
- return h(), N("div", He, [
520
- p(s(Be), {
521
- "can-submit": G.value,
522
- config: n.config,
523
- "edit-id": n.sniId,
524
- "entity-type": s(Ke).SNI,
525
- "error-message": r.errorMessage || ie.value,
526
- "fetch-url": J.value,
527
- "form-fields": b.value,
528
- "is-readonly": r.isReadonly,
529
- onCancel: X,
530
- "onFetch:error": a[3] || (a[3] = (m) => e.$emit("error", m)),
531
- "onFetch:success": H,
532
- onLoading: a[4] || (a[4] = (m) => e.$emit("loading", m)),
504
+ const l = D("KInput"), C = D("KSelect");
505
+ return I(), Q("div", Je, [
506
+ u(n(De), {
507
+ "can-submit": z.value,
508
+ config: o.config,
509
+ "edit-id": o.sniId,
510
+ "entity-type": n(Ne).SNI,
511
+ "error-message": s.errorMessage || te.value,
512
+ "fetch-url": O.value,
513
+ "form-fields": h.value,
514
+ "is-readonly": s.isReadonly,
515
+ onCancel: H,
516
+ "onFetch:error": a[3] || (a[3] = (r) => e.$emit("error", r)),
517
+ "onFetch:success": G,
518
+ onLoading: a[4] || (a[4] = (r) => e.$emit("loading", r)),
533
519
  onSubmit: T
534
520
  }, {
535
- default: f(() => [
536
- p(s(de), {
537
- description: s(u)("form.sections.general.description"),
538
- title: s(u)("form.sections.general.title")
521
+ default: p(() => [
522
+ u(n(ce), {
523
+ description: n(d)("form.sections.general.description"),
524
+ title: n(d)("form.sections.general.title")
539
525
  }, {
540
- default: f(() => [
541
- p(c, {
542
- modelValue: r.fields.name,
543
- "onUpdate:modelValue": a[0] || (a[0] = (m) => r.fields.name = m),
526
+ default: p(() => [
527
+ u(l, {
528
+ modelValue: s.fields.name,
529
+ "onUpdate:modelValue": a[0] || (a[0] = (r) => s.fields.name = r),
544
530
  modelModifiers: { trim: !0 },
545
531
  autocomplete: "off",
546
532
  "data-testid": "sni-form-name",
547
- label: s(u)("form.fields.name.label"),
548
- placeholder: s(u)("form.fields.name.placeholder"),
549
- readonly: r.isReadonly,
533
+ label: n(d)("form.fields.name.label"),
534
+ placeholder: n(d)("form.fields.name.placeholder"),
535
+ readonly: s.isReadonly,
550
536
  required: "",
551
537
  type: "text"
552
538
  }, null, 8, ["modelValue", "label", "placeholder", "readonly"]),
553
- p(c, {
554
- modelValue: r.fields.tags,
555
- "onUpdate:modelValue": a[1] || (a[1] = (m) => r.fields.tags = m),
539
+ u(l, {
540
+ modelValue: s.fields.tags,
541
+ "onUpdate:modelValue": a[1] || (a[1] = (r) => s.fields.tags = r),
556
542
  modelModifiers: { trim: !0 },
557
543
  autocomplete: "off",
558
544
  "data-testid": "sni-form-tags",
559
- help: s(u)("form.fields.tags.help"),
560
- label: s(u)("form.fields.tags.label"),
545
+ help: n(d)("form.fields.tags.help"),
546
+ label: n(d)("form.fields.tags.label"),
561
547
  "label-attributes": {
562
- info: s(u)("form.fields.tags.tooltip"),
548
+ info: n(d)("form.fields.tags.tooltip"),
563
549
  tooltipAttributes: { maxWidth: "400" }
564
550
  },
565
- placeholder: s(u)("form.fields.tags.placeholder"),
566
- readonly: r.isReadonly,
551
+ placeholder: n(d)("form.fields.tags.placeholder"),
552
+ readonly: s.isReadonly,
567
553
  type: "text"
568
554
  }, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"])
569
555
  ]),
570
556
  _: 1
571
557
  }, 8, ["description", "title"]),
572
- p(s(de), {
573
- description: s(u)("form.sections.certificate.description"),
558
+ u(n(ce), {
559
+ description: n(d)("form.sections.certificate.description"),
574
560
  "has-divider": "",
575
- title: s(u)("form.sections.certificate.title")
561
+ title: n(d)("form.sections.certificate.title")
576
562
  }, {
577
- default: f(() => [
578
- $.value ? (h(), w(c, {
563
+ default: p(() => [
564
+ $.value ? (I(), W(l, {
579
565
  key: 0,
580
566
  "data-testid": "sni-form-certificate-id",
581
- label: s(u)("form.fields.certificate_id.label"),
567
+ label: n(d)("form.fields.certificate_id.label"),
582
568
  "model-value": $.value,
583
569
  readonly: "",
584
570
  required: "",
585
571
  width: "100%"
586
- }, null, 8, ["label", "model-value"])) : (h(), w(F, {
572
+ }, null, 8, ["label", "model-value"])) : (I(), W(C, {
587
573
  key: 1,
588
- modelValue: r.fields.certificate_id,
589
- "onUpdate:modelValue": a[2] || (a[2] = (m) => r.fields.certificate_id = m),
574
+ modelValue: s.fields.certificate_id,
575
+ "onUpdate:modelValue": a[2] || (a[2] = (r) => s.fields.certificate_id = r),
590
576
  clearable: "",
591
577
  "data-testid": "sni-form-certificate-id",
592
- "dropdown-footer-text": ae.value ? s(u)("form.fields.certificate_id.footer") : void 0,
578
+ "dropdown-footer-text": ie.value ? n(d)("form.fields.certificate_id.footer") : void 0,
593
579
  "enable-filtering": "",
594
580
  "filter-function": () => !0,
595
- items: U.value,
596
- label: s(u)("form.fields.certificate_id.label"),
597
- loading: s(Z),
598
- placeholder: s(u)("form.fields.certificate_id.placeholder"),
599
- readonly: r.isReadonly,
581
+ items: K.value,
582
+ label: n(d)("form.fields.certificate_id.label"),
583
+ loading: n(Y),
584
+ placeholder: n(d)("form.fields.certificate_id.placeholder"),
585
+ readonly: s.isReadonly,
600
586
  required: "",
601
587
  width: "100%",
602
- onQueryChange: Q
588
+ onQueryChange: A
603
589
  }, {
604
- loading: f(() => [
605
- re("div", null, k(s(u)("actions.loading")), 1)
590
+ loading: p(() => [
591
+ se("div", null, _(n(d)("actions.loading")), 1)
606
592
  ]),
607
- empty: f(() => [
608
- re("div", Xe, k(s(u)("search.no_results")), 1)
593
+ empty: p(() => [
594
+ se("div", Qe, _(n(d)("search.no_results")), 1)
609
595
  ]),
610
596
  _: 1
611
597
  }, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly"])),
612
- W.value ? (h(), N("p", Ye, k(W.value), 1)) : Ce("", !0)
598
+ j.value ? (I(), Q("p", We, _(j.value), 1)) : he("", !0)
613
599
  ]),
614
600
  _: 1
615
601
  }, 8, ["description", "title"])
@@ -619,8 +605,8 @@ const me = {
619
605
  ]);
620
606
  };
621
607
  }
622
- }), st = /* @__PURE__ */ ge(Ze, [["__scopeId", "data-v-414e41d7"]]);
608
+ }), tt = /* @__PURE__ */ me(ze, [["__scopeId", "data-v-414e41d7"]]);
623
609
  export {
624
- st as SniForm,
625
- ot as SniList
610
+ tt as SniForm,
611
+ et as SniList
626
612
  };
@@ -1 +1 @@
1
- (function(g,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@kong-ui-public/i18n"),require("@kong-ui-public/entities-shared"),require("@kong/icons"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/i18n","@kong-ui-public/entities-shared","@kong/icons","vue-router"],e):(g=typeof globalThis<"u"?globalThis:g||self,e(g["kong-ui-public-entities-snis"]={},g.Vue,g["kong-ui-public-i18n"],g["kong-ui-public-entities-shared"],g.KongIcons,g.VueRouter))})(this,function(g,e,X,d,v,ee){"use strict";const te={actions:{create:"New SNI",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",clear:"Clear",loading:"Loading..."},search:{placeholder:"Filter by exact name or ID",no_results:"No results found"},snis:{title:"SNIs",list:{toolbar_actions:{new:"New SNI"},table_headers:{name:"Name",id:"ID",certificate_id:"SSL Certificate ID",tags:"Tags"},empty_state:{title:"Configure a New SNI",description:"SNIs are used to map hostnames to a certificate."}}},form:{sections:{general:{title:"General Information",description:"General information will help identify and manage this SNI."},certificate:{title:"Certificate",description:"Map an existing Certificate object to hostnames"}},fields:{name:{label:"Name",placeholder:"Enter a unique name for this SNI"},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."},certificate_id:{label:"SSL Certificate ID",placeholder:"Enter or select a Certificate ID",footer:"Search by exact ID to find certificates not included in the list"}}},delete:{title:"Delete an SNI",description:"This action cannot be reversed so make sure to check the SNI usage before deleting."},errors:{delete:"The SNI could not be deleted at this time.",general:"SNIs could not be retrieved",certificates:{fetch:"Could not fetch available certificates",invalid:"Please select a valid certificate ID"},copy:"Failed to copy to clipboard"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"}};function ie(){const n=X.createI18n("en-us",te);return{i18n:n,i18nT:X.i18nTComponent(n)}}const Y={useI18n:ie},B="/v2/control-planes/{controlPlaneId}/core-entities",S="/{workspace}",E={list:{konnect:{all:`${B}/snis`},kongManager:{all:`${S}/snis`}},form:{konnect:{create:`${B}/snis`,edit:`${B}/snis/{id}`,validate:`${B}/v1/schemas/json/sni/validate`,certificates:`${B}/certificates`},kongManager:{create:`${S}/snis`,edit:`${S}/snis/{id}`,validate:`${S}/schemas/snis/validate`,certificates:`${S}/certificates`}}},ae={class:"kong-ui-entities-snis-list"},oe={key:1},ne={key:1},re=e.defineComponent({__name:"SniList",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||!n.createRoute||!n.getViewRoute||!n.getEditRoute||n.app==="kongManager"&&!n.isExactMatch&&!n.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(n,{emit:V}){var R;const m=V,i=n,{i18n:{t:l}}=Y.useI18n(),{axiosInstance:p}=d.useAxios((R=i.config)==null?void 0:R.axiosRequestConfig),D=e.ref(1),C=e.computed(()=>i.config.app!=="kongManager"||!!i.config.disableSorting),q={name:{label:l("snis.list.table_headers.name"),searchable:!0,sortable:!0,hidable:!1},certificate:{label:l("snis.list.table_headers.certificate_id"),sortable:!1},tags:{label:l("snis.list.table_headers.tags"),sortable:!1}},_=q,I=a=>({style:{maxWidth:a.headerKey==="name"?"250px":a.headerKey==="certificate"?"350px":null}}),s=e.computed(()=>{var f,t;let a=`${i.config.apiBaseUrl}${E.list[i.config.app].all}`;return i.config.app==="konnect"?a=a.replace(/{controlPlaneId}/gi,((f=i.config)==null?void 0:f.controlPlaneId)||""):i.config.app==="kongManager"&&(a=a.replace(/\/{workspace}/gi,(t=i.config)!=null&&t.workspace?`/${i.config.workspace}`:"")),a}),b=e.ref(""),A=e.computed(()=>{const a=i.config.app==="konnect"||i.config.isExactMatch;if(a)return{isExactMatch:a,placeholder:l("search.placeholder")};const{name:f}=q;return{isExactMatch:a,fields:{name:f},schema:i.config.filterSchema}}),{fetcher:j,fetcherState:L}=d.useFetcher(i.config,s.value),J=()=>{b.value=""},M=()=>{D.value++},y=e.ref(null),F=e.ref(!1),$=e.ref({ctaPath:i.config.createRoute,ctaText:void 0,message:`${l("snis.list.empty_state.description")}${i.config.additionMessageForEmptyState?` ${i.config.additionMessageForEmptyState}`:""}`,title:l("snis.title")}),W=(a,f)=>{const t=a.id;if(!f(t)){m("copy:error",{entity:a,field:"id",message:l("errors.copy")});return}m("copy:success",{entity:a,field:"id",message:l("copy.success",{val:t})})},Q=(a,f)=>{const t=JSON.stringify(a);if(!f(t)){m("copy:error",{entity:a,message:l("errors.copy")});return}m("copy:success",{entity:a,message:l("copy.success_brief")})},z=a=>({label:l("actions.edit"),to:i.config.getEditRoute(a)}),h=e.ref(void 0),T=e.ref(!1),x=e.ref(!1),P=e.ref(""),G=d.useDeleteUrlBuilder(i.config,s.value),O=a=>{h.value=a,T.value=!0},U=()=>{T.value=!1,h.value=void 0},H=async()=>{var a,f,t;if((a=h.value)!=null&&a.id){x.value=!0;try{await p.delete(G(h.value.id)),m("delete:success",h.value),x.value=!1,U(),D.value++}catch(o){P.value=((t=(f=o.response)==null?void 0:f.data)==null?void 0:t.message)||o.message||l("errors.delete"),m("error",o)}finally{x.value=!1}}},N=e.ref(!1);return e.watch(L,a=>{var f,t,o,c;if(Array.isArray((f=a==null?void 0:a.response)==null?void 0:f.data)&&(N.value=a.response.data.length>0),a.status===d.FetcherStatus.NoRecords?F.value=!0:F.value=!1,a.status===d.FetcherStatus.Error){y.value={title:l("errors.general")},(c=(o=(t=a.error)==null?void 0:t.response)==null?void 0:o.data)!=null&&c.message&&(y.value.message=a.error.response.data.message),m("error",a.error);return}y.value=null}),e.onBeforeMount(async()=>{await i.canCreate()&&($.value.title=l("snis.list.empty_state.title"),$.value.ctaText=l("actions.create"))}),(a,f)=>{const t=e.resolveComponent("KButton"),o=e.resolveComponent("KCopy"),c=e.resolveComponent("KBadge"),w=e.resolveComponent("KTruncate"),u=e.resolveComponent("KDropdownItem"),K=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",ae,[e.createVNode(e.unref(d.EntityBaseTable),{"cache-identifier":n.cacheIdentifier,"cell-attributes":I,"disable-row-click":!0,"disable-sorting":C.value,"empty-state-options":$.value,"enable-entity-actions":"","error-message":y.value,fetcher:e.unref(j),"fetcher-cache-key":D.value,"hide-toolbar":F.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-snis-list",query:b.value,"table-headers":e.unref(_),onClearSearchInput:J,onSort:M},{"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(d.EntityFilter),{modelValue:b.value,"onUpdate:modelValue":f[0]||(f[0]=r=>b.value=r),config:A.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!n.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(e.unref(d.PermissionsWrapper),{"auth-function":()=>n.canCreate()},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(t,{appearance:"primary","data-testid":"toolbar-add-sni",size:n.useActionOutside?"medium":"large",to:n.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(v.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(l)("snis.list.toolbar_actions.new")),1)]),_:1},8,["size","to"]),[[e.vShow,N.value]])]),_:1},8,["auth-function"])],8,["disabled"]))]),name:e.withCtx(({rowValue:r})=>[e.createElementVNode("b",null,e.toDisplayString(r??"-"),1)]),certificate:e.withCtx(({row:r})=>[r.certificate&&r.certificate.id?(e.openBlock(),e.createBlock(o,{key:0,class:"copy-certificate-uuid","data-testid":"copy-certificate-uuid",text:r.certificate.id,truncate:""},null,8,["text"])):(e.openBlock(),e.createElementBlock("span",oe,"-"))]),tags:e.withCtx(({rowValue:r})=>[r!=null&&r.length?(e.openBlock(),e.createBlock(w,{key:0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,k=>(e.openBlock(),e.createBlock(c,{key:k,onClick:f[1]||(f[1]=e.withModifiers(()=>{},["stop"]))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k),1)]),_:2},1024))),128))]),_:2},1024)):(e.openBlock(),e.createElementBlock("span",ne,"-"))]),actions:e.withCtx(({row:r})=>[e.createVNode(K,null,{default:e.withCtx(({copyToClipboard:k})=>[e.createVNode(u,{"data-testid":"action-entity-copy-id",onClick:pe=>W(r,k)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(K,null,{default:e.withCtx(({copyToClipboard:k})=>[e.createVNode(u,{"data-testid":"action-entity-copy-json",onClick:pe=>Q(r,k)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(d.PermissionsWrapper),{"auth-function":()=>n.canEdit(r)},{default:e.withCtx(()=>[e.createVNode(u,{"data-testid":"action-entity-edit",item:z(r.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(d.PermissionsWrapper),{"auth-function":()=>n.canDelete(r)},{default:e.withCtx(()=>[e.createVNode(u,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:k=>O(r)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("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-toolbar","query","table-headers"]),e.createVNode(e.unref(d.EntityDeleteModal),{"action-pending":x.value,description:e.unref(l)("delete.description"),"entity-name":h.value&&(h.value.name||h.value.id),"entity-type":e.unref(d.EntityTypes).SNI,error:P.value,"need-confirm":!1,title:e.unref(l)("delete.title"),visible:T.value,onCancel:U,onProceed:H},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),Z=(n,V)=>{const m=n.__vccOpts||n;for(const[i,l]of V)m[i]=l;return m},se=Z(re,[["__scopeId","data-v-ae9b8532"]]),le={class:"kong-ui-entities-snis-form"},ce={"data-testid":"no-search-results"},de={key:2,class:"invalid-certificate-message","data-testid":"invalid-certificate-message"},fe=Z(e.defineComponent({__name:"SniForm",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||n.app==="konnect"&&!n.controlPlaneId||n.app==="kongManager"&&typeof n.workspace!="string"||!n.cancelRoute)},sniId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(n,{emit:V}){var f;const m=V,i=n,l=ee.useRouter(),{i18n:{t:p}}=Y.useI18n(),{getMessageFromError:D}=d.useErrors(),{axiosInstance:C}=d.useAxios((f=i.config)==null?void 0:f.axiosRequestConfig),q=e.computed(()=>E.form[i.config.app].edit),_=e.computed(()=>i.sniId?d.EntityBaseFormType.Edit:d.EntityBaseFormType.Create),I=e.computed(()=>i.config.certificateId&&_.value===d.EntityBaseFormType.Create?i.config.certificateId:""),s=e.reactive({fields:{name:"",tags:"",certificate_id:""},isReadonly:!1,errorMessage:""}),b=e.reactive({name:"",tags:"",certificate_id:""}),A=e.computed(()=>JSON.stringify(s.fields)!==JSON.stringify(b)&&!!s.fields.name&&!!(s.fields.certificate_id||I.value)),j=t=>{var o,c;s.fields.name=(t==null?void 0:t.name)||"",s.fields.tags=((o=t==null?void 0:t.tags)==null?void 0:o.join(", "))||"",s.fields.certificate_id=((c=t==null?void 0:t.certificate)==null?void 0:c.id)||"",Object.assign(b,s.fields)},L=()=>{l.push(i.config.cancelRoute)},J=e.computed(()=>{var o,c;let t=`${i.config.apiBaseUrl}${E.form[i.config.app].validate}`;return i.config.app==="konnect"?t=t.replace(/{controlPlaneId}/gi,((o=i.config)==null?void 0:o.controlPlaneId)||""):i.config.app==="kongManager"&&(t=t.replace(/\/{workspace}/gi,(c=i.config)!=null&&c.workspace?`/${i.config.workspace}`:"")),t=t.replace(/{id}/gi,i.sniId),t}),M=e.computed(()=>{var o,c;let t=`${i.config.apiBaseUrl}${E.form[i.config.app][_.value]}`;return i.config.app==="konnect"?t=t.replace(/{controlPlaneId}/gi,((o=i.config)==null?void 0:o.controlPlaneId)||""):i.config.app==="kongManager"&&(t=t.replace(/\/{workspace}/gi,(c=i.config)!=null&&c.workspace?`/${i.config.workspace}`:"")),t=t.replace(/{id}/gi,i.sniId),t}),y=e.computed(()=>{var t,o;return{name:s.fields.name,tags:(o=(t=s.fields.tags.split(","))==null?void 0:t.map(c=>String(c||"").trim()))==null?void 0:o.filter(c=>c!==""),certificate:{id:I.value||s.fields.certificate_id}}}),F=async()=>{var t,o,c,w,u,K;try{s.isReadonly=!0;let r;await C.post(J.value,y.value),_.value==="create"?r=await C.post(M.value,y.value):_.value==="edit"&&(r=((t=i.config)==null?void 0:t.app)==="konnect"?await C.put(M.value,y.value):await C.patch(M.value,y.value)),s.fields.name=((o=r==null?void 0:r.data)==null?void 0:o.name)||"",s.fields.tags=((w=(c=r==null?void 0:r.data)==null?void 0:c.tags)==null?void 0:w.join(", "))||"",s.fields.certificate_id=((K=(u=r==null?void 0:r.data)==null?void 0:u.certificate)==null?void 0:K.id)||"",Object.assign(b,s.fields),m("update",r==null?void 0:r.data)}catch(r){s.errorMessage=D(r),m("error",r)}finally{s.isReadonly=!1}},{debouncedQueryChange:$,loading:W,allRecords:Q,error:z,validationError:h,loadItems:T,results:x}=d.useDebouncedFilter(i.config,E.form[i.config.app].certificates),P=t=>{$(t)},G=e.computed(()=>z.value?p("errors.certificates.fetch"):""),O=e.computed(()=>h.value?p("errors.certificates.invalid"):""),U=e.ref(0),H=e.computed(()=>Q.value===void 0),N=e.ref(new Set),R=e.computed(()=>Array.from(N.value).map(o=>({label:o,value:o,selected:s.fields.certificate_id===o}))),a=t=>{N.value.clear();let o;for(o of t)N.value.add(o.id)};return e.watch(x,t=>{a(t)},{immediate:!0,deep:!0}),e.watch(R,()=>{U.value++},{immediate:!0,deep:!0}),e.onBeforeMount(async()=>{await T()}),(t,o)=>{const c=e.resolveComponent("KInput"),w=e.resolveComponent("KSelect");return e.openBlock(),e.createElementBlock("div",le,[e.createVNode(e.unref(d.EntityBaseForm),{"can-submit":A.value,config:n.config,"edit-id":n.sniId,"entity-type":e.unref(d.SupportedEntityType).SNI,"error-message":s.errorMessage||G.value,"fetch-url":q.value,"form-fields":y.value,"is-readonly":s.isReadonly,onCancel:L,"onFetch:error":o[3]||(o[3]=u=>t.$emit("error",u)),"onFetch:success":j,onLoading:o[4]||(o[4]=u=>t.$emit("loading",u)),onSubmit:F},{default:e.withCtx(()=>[e.createVNode(e.unref(d.EntityFormSection),{description:e.unref(p)("form.sections.general.description"),title:e.unref(p)("form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:s.fields.name,"onUpdate:modelValue":o[0]||(o[0]=u=>s.fields.name=u),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"sni-form-name",label:e.unref(p)("form.fields.name.label"),placeholder:e.unref(p)("form.fields.name.placeholder"),readonly:s.isReadonly,required:"",type:"text"},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode(c,{modelValue:s.fields.tags,"onUpdate:modelValue":o[1]||(o[1]=u=>s.fields.tags=u),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"sni-form-tags",help:e.unref(p)("form.fields.tags.help"),label:e.unref(p)("form.fields.tags.label"),"label-attributes":{info:e.unref(p)("form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(p)("form.fields.tags.placeholder"),readonly:s.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"]),e.createVNode(e.unref(d.EntityFormSection),{description:e.unref(p)("form.sections.certificate.description"),"has-divider":"",title:e.unref(p)("form.sections.certificate.title")},{default:e.withCtx(()=>[I.value?(e.openBlock(),e.createBlock(c,{key:0,"data-testid":"sni-form-certificate-id",label:e.unref(p)("form.fields.certificate_id.label"),"model-value":I.value,readonly:"",required:"",width:"100%"},null,8,["label","model-value"])):(e.openBlock(),e.createBlock(w,{key:1,modelValue:s.fields.certificate_id,"onUpdate:modelValue":o[2]||(o[2]=u=>s.fields.certificate_id=u),clearable:"","data-testid":"sni-form-certificate-id","dropdown-footer-text":H.value?e.unref(p)("form.fields.certificate_id.footer"):void 0,"enable-filtering":"","filter-function":()=>!0,items:R.value,label:e.unref(p)("form.fields.certificate_id.label"),loading:e.unref(W),placeholder:e.unref(p)("form.fields.certificate_id.placeholder"),readonly:s.isReadonly,required:"",width:"100%",onQueryChange:P},{loading:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(e.unref(p)("actions.loading")),1)]),empty:e.withCtx(()=>[e.createElementVNode("div",ce,e.toDisplayString(e.unref(p)("search.no_results")),1)]),_:1},8,["modelValue","dropdown-footer-text","items","label","loading","placeholder","readonly"])),O.value?(e.openBlock(),e.createElementBlock("p",de,e.toDisplayString(O.value),1)):e.createCommentVNode("",!0)]),_:1},8,["description","title"])]),_:1},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-414e41d7"]]);g.SniForm=fe,g.SniList=se,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
1
+ (function(g,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@kong-ui-public/i18n"),require("@kong-ui-public/entities-shared"),require("@kong/icons"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/i18n","@kong-ui-public/entities-shared","@kong/icons","vue-router"],e):(g=typeof globalThis<"u"?globalThis:g||self,e(g["kong-ui-public-entities-snis"]={},g.Vue,g["kong-ui-public-i18n"],g["kong-ui-public-entities-shared"],g.KongIcons,g.VueRouter))})(this,function(g,e,H,d,Z,v){"use strict";const ee={actions:{create:"New SNI",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",clear:"Clear",loading:"Loading..."},search:{placeholder:"Filter by exact name or ID",no_results:"No results found"},snis:{title:"SNIs",list:{toolbar_actions:{new:"New SNI"},table_headers:{name:"Name",id:"ID",certificate_id:"SSL Certificate ID",tags:"Tags"},empty_state:{title:"Configure a New SNI",description:"SNIs are used to map hostnames to a certificate."}}},form:{sections:{general:{title:"General Information",description:"General information will help identify and manage this SNI."},certificate:{title:"Certificate",description:"Map an existing Certificate object to hostnames"}},fields:{name:{label:"Name",placeholder:"Enter a unique name for this SNI"},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."},certificate_id:{label:"SSL Certificate ID",placeholder:"Enter or select a Certificate ID",footer:"Search by exact ID to find certificates not included in the list"}}},delete:{title:"Delete an SNI",description:"This action cannot be reversed so make sure to check the SNI usage before deleting."},errors:{delete:"The SNI could not be deleted at this time.",general:"SNIs could not be retrieved",certificates:{fetch:"Could not fetch available certificates",invalid:"Please select a valid certificate ID"},copy:"Failed to copy to clipboard"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"}};function te(){const n=H.createI18n("en-us",ee);return{i18n:n,i18nT:H.i18nTComponent(n)}}const X={useI18n:te},V="/v2/control-planes/{controlPlaneId}/core-entities",S="/{workspace}",E={list:{konnect:{all:`${V}/snis`},kongManager:{all:`${S}/snis`}},form:{konnect:{create:`${V}/snis`,edit:`${V}/snis/{id}`,validate:`${V}/v1/schemas/json/sni/validate`,certificates:`${V}/certificates`},kongManager:{create:`${S}/snis`,edit:`${S}/snis/{id}`,validate:`${S}/schemas/snis/validate`,certificates:`${S}/certificates`}}},ie={class:"kong-ui-entities-snis-list"},ae={key:1},oe=e.defineComponent({__name:"SniList",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||!n.createRoute||!n.getViewRoute||!n.getEditRoute||n.app==="kongManager"&&!n.isExactMatch&&!n.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(n,{emit:B}){var R;const m=B,i=n,{i18n:{t:c}}=X.useI18n(),{axiosInstance:f}=d.useAxios((R=i.config)==null?void 0:R.axiosRequestConfig),D=e.ref(1),_=e.computed(()=>i.config.app!=="kongManager"||!!i.config.disableSorting),q={name:{label:c("snis.list.table_headers.name"),searchable:!0,sortable:!0,hidable:!1},certificate:{label:c("snis.list.table_headers.certificate_id"),sortable:!1},tags:{label:c("snis.list.table_headers.tags"),sortable:!1}},I=q,x=a=>({style:{maxWidth:a.headerKey==="name"?"250px":a.headerKey==="certificate"?"350px":null}}),r=e.computed(()=>{var p,t;let a=`${i.config.apiBaseUrl}${E.list[i.config.app].all}`;return i.config.app==="konnect"?a=a.replace(/{controlPlaneId}/gi,((p=i.config)==null?void 0:p.controlPlaneId)||""):i.config.app==="kongManager"&&(a=a.replace(/\/{workspace}/gi,(t=i.config)!=null&&t.workspace?`/${i.config.workspace}`:"")),a}),b=e.ref(""),U=e.computed(()=>{const a=i.config.app==="konnect"||i.config.isExactMatch;if(a)return{isExactMatch:a,placeholder:c("search.placeholder")};const{name:p}=q;return{isExactMatch:a,fields:{name:p},schema:i.config.filterSchema}}),{fetcher:A,fetcherState:j}=d.useFetcher(i.config,r.value),L=()=>{b.value=""},M=()=>{D.value++},y=e.ref(null),F=e.ref(!1),$=e.ref({ctaPath:i.config.createRoute,ctaText:void 0,message:`${c("snis.list.empty_state.description")}${i.config.additionMessageForEmptyState?` ${i.config.additionMessageForEmptyState}`:""}`,title:c("snis.title")}),J=(a,p)=>{const t=a.id;if(!p(t)){m("copy:error",{entity:a,field:"id",message:c("errors.copy")});return}m("copy:success",{entity:a,field:"id",message:c("copy.success",{val:t})})},W=(a,p)=>{const t=JSON.stringify(a);if(!p(t)){m("copy:error",{entity:a,message:c("errors.copy")});return}m("copy:success",{entity:a,message:c("copy.success_brief")})},Q=a=>({label:c("actions.edit"),to:i.config.getEditRoute(a)}),h=e.ref(void 0),T=e.ref(!1),N=e.ref(!1),P=e.ref(""),z=d.useDeleteUrlBuilder(i.config,r.value),K=a=>{h.value=a,T.value=!0},O=()=>{T.value=!1,h.value=void 0},G=async()=>{var a,p,t;if((a=h.value)!=null&&a.id){N.value=!0;try{await f.delete(z(h.value.id)),m("delete:success",h.value),N.value=!1,O(),D.value++}catch(o){P.value=((t=(p=o.response)==null?void 0:p.data)==null?void 0:t.message)||o.message||c("errors.delete"),m("error",o)}finally{N.value=!1}}},w=e.ref(!1);return e.watch(j,a=>{var p,t,o,l;if(Array.isArray((p=a==null?void 0:a.response)==null?void 0:p.data)&&(w.value=a.response.data.length>0),a.status===d.FetcherStatus.NoRecords?F.value=!0:F.value=!1,a.status===d.FetcherStatus.Error){y.value={title:c("errors.general")},(l=(o=(t=a.error)==null?void 0:t.response)==null?void 0:o.data)!=null&&l.message&&(y.value.message=a.error.response.data.message),m("error",a.error);return}y.value=null}),e.onBeforeMount(async()=>{await i.canCreate()&&($.value.title=c("snis.list.empty_state.title"),$.value.ctaText=c("actions.create"))}),(a,p)=>{const t=e.resolveComponent("KButton"),o=e.resolveComponent("KCopy"),l=e.resolveComponent("KDropdownItem"),k=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",ie,[e.createVNode(e.unref(d.EntityBaseTable),{"cache-identifier":n.cacheIdentifier,"cell-attributes":x,"disable-row-click":!0,"disable-sorting":_.value,"empty-state-options":$.value,"enable-entity-actions":"","error-message":y.value,fetcher:e.unref(A),"fetcher-cache-key":D.value,"hide-toolbar":F.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-snis-list",query:b.value,"table-headers":e.unref(I),onClearSearchInput:L,onSort:M},{"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(d.EntityFilter),{modelValue:b.value,"onUpdate:modelValue":p[0]||(p[0]=s=>b.value=s),config:U.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!n.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(e.unref(d.PermissionsWrapper),{"auth-function":()=>n.canCreate()},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(t,{appearance:"primary","data-testid":"toolbar-add-sni",size:n.useActionOutside?"medium":"large",to:n.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(c)("snis.list.toolbar_actions.new")),1)]),_:1},8,["size","to"]),[[e.vShow,w.value]])]),_:1},8,["auth-function"])],8,["disabled"]))]),name:e.withCtx(({rowValue:s})=>[e.createElementVNode("b",null,e.toDisplayString(s??"-"),1)]),certificate:e.withCtx(({row:s})=>[s.certificate&&s.certificate.id?(e.openBlock(),e.createBlock(o,{key:0,class:"copy-certificate-uuid","data-testid":"copy-certificate-uuid",text:s.certificate.id,truncate:""},null,8,["text"])):(e.openBlock(),e.createElementBlock("span",ae,"-"))]),tags:e.withCtx(({rowValue:s})=>[e.createVNode(e.unref(d.TableTags),{tags:s},null,8,["tags"])]),actions:e.withCtx(({row:s})=>[e.createVNode(k,null,{default:e.withCtx(({copyToClipboard:C})=>[e.createVNode(l,{"data-testid":"action-entity-copy-id",onClick:u=>J(s,C)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)("actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(k,null,{default:e.withCtx(({copyToClipboard:C})=>[e.createVNode(l,{"data-testid":"action-entity-copy-json",onClick:u=>W(s,C)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)("actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(d.PermissionsWrapper),{"auth-function":()=>n.canEdit(s)},{default:e.withCtx(()=>[e.createVNode(l,{"data-testid":"action-entity-edit",item:Q(s.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(d.PermissionsWrapper),{"auth-function":()=>n.canDelete(s)},{default:e.withCtx(()=>[e.createVNode(l,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:C=>K(s)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)("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-toolbar","query","table-headers"]),e.createVNode(e.unref(d.EntityDeleteModal),{"action-pending":N.value,description:e.unref(c)("delete.description"),"entity-name":h.value&&(h.value.name||h.value.id),"entity-type":e.unref(d.EntityTypes).SNI,error:P.value,"need-confirm":!1,title:e.unref(c)("delete.title"),visible:T.value,onCancel:O,onProceed:G},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),Y=(n,B)=>{const m=n.__vccOpts||n;for(const[i,c]of B)m[i]=c;return m},ne=Y(oe,[["__scopeId","data-v-5945458b"]]),re={class:"kong-ui-entities-snis-form"},se={"data-testid":"no-search-results"},le={key:2,class:"invalid-certificate-message","data-testid":"invalid-certificate-message"},ce=Y(e.defineComponent({__name:"SniForm",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||n.app==="konnect"&&!n.controlPlaneId||n.app==="kongManager"&&typeof n.workspace!="string"||!n.cancelRoute)},sniId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(n,{emit:B}){var p;const m=B,i=n,c=v.useRouter(),{i18n:{t:f}}=X.useI18n(),{getMessageFromError:D}=d.useErrors(),{axiosInstance:_}=d.useAxios((p=i.config)==null?void 0:p.axiosRequestConfig),q=e.computed(()=>E.form[i.config.app].edit),I=e.computed(()=>i.sniId?d.EntityBaseFormType.Edit:d.EntityBaseFormType.Create),x=e.computed(()=>i.config.certificateId&&I.value===d.EntityBaseFormType.Create?i.config.certificateId:""),r=e.reactive({fields:{name:"",tags:"",certificate_id:""},isReadonly:!1,errorMessage:""}),b=e.reactive({name:"",tags:"",certificate_id:""}),U=e.computed(()=>JSON.stringify(r.fields)!==JSON.stringify(b)&&!!r.fields.name&&!!(r.fields.certificate_id||x.value)),A=t=>{var o,l;r.fields.name=(t==null?void 0:t.name)||"",r.fields.tags=((o=t==null?void 0:t.tags)==null?void 0:o.join(", "))||"",r.fields.certificate_id=((l=t==null?void 0:t.certificate)==null?void 0:l.id)||"",Object.assign(b,r.fields)},j=()=>{c.push(i.config.cancelRoute)},L=e.computed(()=>{var o,l;let t=`${i.config.apiBaseUrl}${E.form[i.config.app].validate}`;return i.config.app==="konnect"?t=t.replace(/{controlPlaneId}/gi,((o=i.config)==null?void 0:o.controlPlaneId)||""):i.config.app==="kongManager"&&(t=t.replace(/\/{workspace}/gi,(l=i.config)!=null&&l.workspace?`/${i.config.workspace}`:"")),t=t.replace(/{id}/gi,i.sniId),t}),M=e.computed(()=>{var o,l;let t=`${i.config.apiBaseUrl}${E.form[i.config.app][I.value]}`;return i.config.app==="konnect"?t=t.replace(/{controlPlaneId}/gi,((o=i.config)==null?void 0:o.controlPlaneId)||""):i.config.app==="kongManager"&&(t=t.replace(/\/{workspace}/gi,(l=i.config)!=null&&l.workspace?`/${i.config.workspace}`:"")),t=t.replace(/{id}/gi,i.sniId),t}),y=e.computed(()=>{var t,o;return{name:r.fields.name,tags:(o=(t=r.fields.tags.split(","))==null?void 0:t.map(l=>String(l||"").trim()))==null?void 0:o.filter(l=>l!==""),certificate:{id:x.value||r.fields.certificate_id}}}),F=async()=>{var t,o,l,k,s,C;try{r.isReadonly=!0;let u;await _.post(L.value,y.value),I.value==="create"?u=await _.post(M.value,y.value):I.value==="edit"&&(u=((t=i.config)==null?void 0:t.app)==="konnect"?await _.put(M.value,y.value):await _.patch(M.value,y.value)),r.fields.name=((o=u==null?void 0:u.data)==null?void 0:o.name)||"",r.fields.tags=((k=(l=u==null?void 0:u.data)==null?void 0:l.tags)==null?void 0:k.join(", "))||"",r.fields.certificate_id=((C=(s=u==null?void 0:u.data)==null?void 0:s.certificate)==null?void 0:C.id)||"",Object.assign(b,r.fields),m("update",u==null?void 0:u.data)}catch(u){r.errorMessage=D(u),m("error",u)}finally{r.isReadonly=!1}},{debouncedQueryChange:$,loading:J,allRecords:W,error:Q,validationError:h,loadItems:T,results:N}=d.useDebouncedFilter(i.config,E.form[i.config.app].certificates),P=t=>{$(t)},z=e.computed(()=>Q.value?f("errors.certificates.fetch"):""),K=e.computed(()=>h.value?f("errors.certificates.invalid"):""),O=e.ref(0),G=e.computed(()=>W.value===void 0),w=e.ref(new Set),R=e.computed(()=>Array.from(w.value).map(o=>({label:o,value:o,selected:r.fields.certificate_id===o}))),a=t=>{w.value.clear();let o;for(o of t)w.value.add(o.id)};return e.watch(N,t=>{a(t)},{immediate:!0,deep:!0}),e.watch(R,()=>{O.value++},{immediate:!0,deep:!0}),e.onBeforeMount(async()=>{await T()}),(t,o)=>{const l=e.resolveComponent("KInput"),k=e.resolveComponent("KSelect");return e.openBlock(),e.createElementBlock("div",re,[e.createVNode(e.unref(d.EntityBaseForm),{"can-submit":U.value,config:n.config,"edit-id":n.sniId,"entity-type":e.unref(d.SupportedEntityType).SNI,"error-message":r.errorMessage||z.value,"fetch-url":q.value,"form-fields":y.value,"is-readonly":r.isReadonly,onCancel:j,"onFetch:error":o[3]||(o[3]=s=>t.$emit("error",s)),"onFetch:success":A,onLoading:o[4]||(o[4]=s=>t.$emit("loading",s)),onSubmit:F},{default:e.withCtx(()=>[e.createVNode(e.unref(d.EntityFormSection),{description:e.unref(f)("form.sections.general.description"),title:e.unref(f)("form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(l,{modelValue:r.fields.name,"onUpdate:modelValue":o[0]||(o[0]=s=>r.fields.name=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"sni-form-name",label:e.unref(f)("form.fields.name.label"),placeholder:e.unref(f)("form.fields.name.placeholder"),readonly:r.isReadonly,required:"",type:"text"},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode(l,{modelValue:r.fields.tags,"onUpdate:modelValue":o[1]||(o[1]=s=>r.fields.tags=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"sni-form-tags",help:e.unref(f)("form.fields.tags.help"),label:e.unref(f)("form.fields.tags.label"),"label-attributes":{info:e.unref(f)("form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(f)("form.fields.tags.placeholder"),readonly:r.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"]),e.createVNode(e.unref(d.EntityFormSection),{description:e.unref(f)("form.sections.certificate.description"),"has-divider":"",title:e.unref(f)("form.sections.certificate.title")},{default:e.withCtx(()=>[x.value?(e.openBlock(),e.createBlock(l,{key:0,"data-testid":"sni-form-certificate-id",label:e.unref(f)("form.fields.certificate_id.label"),"model-value":x.value,readonly:"",required:"",width:"100%"},null,8,["label","model-value"])):(e.openBlock(),e.createBlock(k,{key:1,modelValue:r.fields.certificate_id,"onUpdate:modelValue":o[2]||(o[2]=s=>r.fields.certificate_id=s),clearable:"","data-testid":"sni-form-certificate-id","dropdown-footer-text":G.value?e.unref(f)("form.fields.certificate_id.footer"):void 0,"enable-filtering":"","filter-function":()=>!0,items:R.value,label:e.unref(f)("form.fields.certificate_id.label"),loading:e.unref(J),placeholder:e.unref(f)("form.fields.certificate_id.placeholder"),readonly:r.isReadonly,required:"",width:"100%",onQueryChange:P},{loading:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(e.unref(f)("actions.loading")),1)]),empty:e.withCtx(()=>[e.createElementVNode("div",se,e.toDisplayString(e.unref(f)("search.no_results")),1)]),_:1},8,["modelValue","dropdown-footer-text","items","label","loading","placeholder","readonly"])),K.value?(e.openBlock(),e.createElementBlock("p",le,e.toDisplayString(K.value),1)):e.createCommentVNode("",!0)]),_:1},8,["description","title"])]),_:1},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-414e41d7"]]);g.SniForm=ce,g.SniList=ne,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-2fde1e51]{align-items:center;border-bottom:var(--445df5cd);display:var(--36146f00);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-2fde1e51]{width:var(--41377040)}.config-card-details-row .config-card-details-label label[data-v-2fde1e51]{color:#3a3f51}.config-card-details-row .config-card-details-value[data-v-2fde1e51]{width:var(--4132e48a)}.config-card-details-row .config-card-details-value .truncated[data-v-2fde1e51]{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-2fde1e51]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-2fde1e51] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-2fde1e51]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-2fde1e51]{margin-right:4px}.config-card-details-row[data-v-2fde1e51] .k-label{margin-bottom:0}.config-card-details-row[data-v-2fde1e51] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-2fde1e51] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 8px 12px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0;padding-top:0}.json-endpoint .k-code-block .code-block-secondary-actions{margin-top:0!important}.json-endpoint code{direction:rtl;max-width:var(--454fa8c4);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d15be7fe]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-7ef5c755]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-7ef5c755]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-7ef5c755]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-7ef5c755] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-7ef5c755]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-6210a67a]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form .form-actions[data-v-6210a67a]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.kong-ui-entity-base-form .form-actions[data-v-6210a67a] .k-button:last-of-type,.kong-ui-entity-base-form .form-actions[data-v-6210a67a] .k-button:nth-last-of-type(2){margin-left:16px}.kong-ui-entity-base-form[data-v-6210a67a] .k-slideout-title{color:#000933!important;font-size:24px!important;font-weight:700!important;line-height:32px!important;margin-bottom:16px!important}.kong-ui-entity-base-form[data-v-6210a67a] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-6210a67a] .tab-item>div.tab-link.has-panels{color:#6c7489!important;font-size:14px!important;font-weight:700!important;line-height:24px!important}.kong-ui-entity-base-form[data-v-6210a67a] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.content-wrapper[data-v-b252463e] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-765e475b]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-765e475b]{margin-left:auto}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-10fa27a5]{width:100%}.kong-ui-entity-filter-clear[data-v-10fa27a5]{cursor:pointer}.kong-ui-entity-filter[data-v-10fa27a5]{display:flex;position:relative}.kong-ui-entity-filter[data-v-10fa27a5] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-10fa27a5] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-10fa27a5]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-10fa27a5]{background-color:#fff;border:1px solid #afb7c5;border-radius:4px;box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;padding:8px 0 12px;position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-10fa27a5]{border-bottom:1px solid #e0e4ea;color:#6c7489;font-size:12px;font-weight:400;line-height:16px;list-style:none;margin:0 20px;padding:16px 0;position:relative;white-space:nowrap}.menu-item-title[data-v-10fa27a5]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-10fa27a5]{color:#232633}.menu-item-expand-icon[data-v-10fa27a5]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-10fa27a5]{transform:rotate(180deg)}.menu-item-indicator[data-v-10fa27a5]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-10fa27a5]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-10fa27a5] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-10fa27a5] .k-input{width:100%}.menu-item-body[data-v-10fa27a5] .k-select-input .input{font-size:12px}.menu-item-body[data-v-10fa27a5] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-10fa27a5]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-10fa27a5]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-10fa27a5]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.kong-ui-public-entity-link[data-v-60e3ef7c]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-60e3ef7c]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-60e3ef7c]{display:flex}.kong-ui-public-entity-link .entity-link[data-v-60e3ef7c] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-60e3ef7c]{display:inline-block;font-weight:400;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-60e3ef7c]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-60e3ef7c]{margin-left:2px}.kong-ui-entities-snis-list[data-v-ae9b8532]{width:100%}.kong-ui-entities-snis-list .kong-ui-entity-filter-input[data-v-ae9b8532]{margin-right:12px}.kong-ui-entities-snis-form[data-v-414e41d7]{width:100%}.kong-ui-entities-snis-form .invalid-certificate-message[data-v-414e41d7]{color:#d60027;font-size:11px;font-weight:500;margin-top:3px!important}
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-2fde1e51]{align-items:center;border-bottom:var(--445df5cd);display:var(--36146f00);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-2fde1e51]{width:var(--41377040)}.config-card-details-row .config-card-details-label label[data-v-2fde1e51]{color:#3a3f51}.config-card-details-row .config-card-details-value[data-v-2fde1e51]{width:var(--4132e48a)}.config-card-details-row .config-card-details-value .truncated[data-v-2fde1e51]{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-2fde1e51]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-2fde1e51] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-2fde1e51]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-2fde1e51]{margin-right:4px}.config-card-details-row[data-v-2fde1e51] .k-label{margin-bottom:0}.config-card-details-row[data-v-2fde1e51] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-2fde1e51] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 8px 12px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0;padding-top:0}.json-endpoint .k-code-block .code-block-secondary-actions{margin-top:0!important}.json-endpoint code{direction:rtl;max-width:var(--454fa8c4);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d15be7fe]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-7ef5c755]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-7ef5c755]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-7ef5c755]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-7ef5c755] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-7ef5c755]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-6210a67a]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form .form-actions[data-v-6210a67a]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.kong-ui-entity-base-form .form-actions[data-v-6210a67a] .k-button:last-of-type,.kong-ui-entity-base-form .form-actions[data-v-6210a67a] .k-button:nth-last-of-type(2){margin-left:16px}.kong-ui-entity-base-form[data-v-6210a67a] .k-slideout-title{color:#000933!important;font-size:24px!important;font-weight:700!important;line-height:32px!important;margin-bottom:16px!important}.kong-ui-entity-base-form[data-v-6210a67a] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-6210a67a] .tab-item>div.tab-link.has-panels{color:#6c7489!important;font-size:14px!important;font-weight:700!important;line-height:24px!important}.kong-ui-entity-base-form[data-v-6210a67a] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.content-wrapper[data-v-b252463e] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-765e475b]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-765e475b]{margin-left:auto}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-10fa27a5]{width:100%}.kong-ui-entity-filter-clear[data-v-10fa27a5]{cursor:pointer}.kong-ui-entity-filter[data-v-10fa27a5]{display:flex;position:relative}.kong-ui-entity-filter[data-v-10fa27a5] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-10fa27a5] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-10fa27a5]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-10fa27a5]{background-color:#fff;border:1px solid #afb7c5;border-radius:4px;box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;padding:8px 0 12px;position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-10fa27a5]{border-bottom:1px solid #e0e4ea;color:#6c7489;font-size:12px;font-weight:400;line-height:16px;list-style:none;margin:0 20px;padding:16px 0;position:relative;white-space:nowrap}.menu-item-title[data-v-10fa27a5]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-10fa27a5]{color:#232633}.menu-item-expand-icon[data-v-10fa27a5]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-10fa27a5]{transform:rotate(180deg)}.menu-item-indicator[data-v-10fa27a5]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-10fa27a5]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-10fa27a5] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-10fa27a5] .k-input{width:100%}.menu-item-body[data-v-10fa27a5] .k-select-input .input{font-size:12px}.menu-item-body[data-v-10fa27a5] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-10fa27a5]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-10fa27a5]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-10fa27a5]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.kong-ui-public-entity-link[data-v-60e3ef7c]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-60e3ef7c]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-60e3ef7c]{display:flex}.kong-ui-public-entity-link .entity-link[data-v-60e3ef7c] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-60e3ef7c]{display:inline-block;font-weight:400;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-60e3ef7c]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-60e3ef7c]{margin-left:2px}.kong-ui-entities-snis-list[data-v-5945458b]{width:100%}.kong-ui-entities-snis-list .kong-ui-entity-filter-input[data-v-5945458b]{margin-right:12px}.kong-ui-entities-snis-form[data-v-414e41d7]{width:100%}.kong-ui-entities-snis-form .invalid-certificate-message[data-v-414e41d7]{color:#d60027;font-size:11px;font-weight:500;margin-top:3px!important}
@@ -1 +1 @@
1
- {"version":3,"file":"SniList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SniList.vue"],"names":[],"mappings":"AA6dA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAEnC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAcvC,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EACpB,SAAS,EACT,gBAAgB,EACjB,MAAM,UAAU,CAAA;AASjB,OAAO,gDAAgD,CAAA;;IAyyBrD,oHAAoH;;cAElG,QAAQ,CAAC,oBAAoB,GAAG,wBAAwB,CAAC;;4BAErD,oBAAoB,GAAG,wBAAwB,KAAG,OAAO;;;;;;IAY/E,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,oBAAoB,GAAG,wBAAwB,CAAC;;4BAErD,oBAAoB,GAAG,wBAAwB,KAAG,OAAO;;;;;;IAY/E,yHAAyH;;cAErG,QAAQ,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI9D,2HAA2H;;cAEvG,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,yHAAyH;;cAErG,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,4IAA4I;;cAExH,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,iHAAiH;;;;;;;;;;;;qBAtB9E,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;qBAM1B,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;mBAMxC,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;uBAMxC,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;;;AAhD7E,wBA0DG"}
1
+ {"version":3,"file":"SniList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SniList.vue"],"names":[],"mappings":"AAqdA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAEnC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAevC,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EACpB,SAAS,EACT,gBAAgB,EACjB,MAAM,UAAU,CAAA;AASjB,OAAO,gDAAgD,CAAA;;IA0wBrD,oHAAoH;;cAElG,QAAQ,CAAC,oBAAoB,GAAG,wBAAwB,CAAC;;4BAErD,oBAAoB,GAAG,wBAAwB,KAAG,OAAO;;;;;;IAY/E,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,oBAAoB,GAAG,wBAAwB,CAAC;;4BAErD,oBAAoB,GAAG,wBAAwB,KAAG,OAAO;;;;;;IAY/E,yHAAyH;;cAErG,QAAQ,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI9D,2HAA2H;;cAEvG,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,yHAAyH;;cAErG,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,4IAA4I;;cAExH,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,iHAAiH;;;;;;;;;;;;qBAtB9E,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;qBAM1B,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;mBAMxC,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;uBAMxC,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;;;AAhD7E,wBA0DG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/entities-snis",
3
- "version": "3.5.42",
3
+ "version": "3.5.44",
4
4
  "type": "module",
5
5
  "main": "./dist/entities-snis.umd.js",
6
6
  "module": "./dist/entities-snis.es.js",
@@ -21,22 +21,22 @@
21
21
  "access": "public"
22
22
  },
23
23
  "peerDependencies": {
24
- "@kong/icons": "^1.18.1",
25
- "@kong/kongponents": "^9.14.0",
24
+ "@kong/icons": "^1.18.2",
25
+ "@kong/kongponents": "^9.14.8",
26
26
  "axios": "^1.7.7",
27
27
  "vue": ">= 3.3.13 < 4",
28
28
  "vue-router": "^4.4.5",
29
- "@kong-ui-public/entities-shared": "^3.10.1",
29
+ "@kong-ui-public/entities-shared": "^3.10.3",
30
30
  "@kong-ui-public/i18n": "^2.2.7"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@kong/design-tokens": "1.17.2",
34
- "@kong/icons": "^1.18.1",
35
- "@kong/kongponents": "9.14.0",
34
+ "@kong/icons": "^1.18.2",
35
+ "@kong/kongponents": "9.14.8",
36
36
  "axios": "^1.7.7",
37
37
  "vue": "^3.5.12",
38
38
  "vue-router": "^4.4.5",
39
- "@kong-ui-public/entities-shared": "^3.10.1",
39
+ "@kong-ui-public/entities-shared": "^3.10.3",
40
40
  "@kong-ui-public/i18n": "^2.2.7"
41
41
  },
42
42
  "repository": {