@kong-ui-public/entities-gateway-services 3.8.18-pr.1718.d7d1478f1.0 → 3.8.19-pr.1727.9a215c5a1.0

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 Ve, ref as S, computed as w, watch as Ce, onBeforeMount as xe, resolveComponent as M, openBlock as k, createElementBlock as I, createVNode as u, unref as o, withCtx as p, createBlock as re, Teleport as Re, withDirectives as Ae, createTextVNode as U, toDisplayString as b, vShow as Fe, createElementVNode as V, withModifiers as ae, Fragment as $e, renderList as De, reactive as Se, onMounted as Be, renderSlot as Le, createCommentVNode as B } from "vue";
2
- import { useRouter as Pe } from "vue-router";
3
- import { AddIcon as Ge } from "@kong/icons";
4
- import { createI18n as Ke, i18nTComponent as qe } from "@kong-ui-public/i18n";
5
- import { useAxios as Ue, useFetcher as Ne, useDeleteUrlBuilder as We, FetcherStatus as Oe, EntityBaseTable as je, EntityFilter as He, PermissionsWrapper as te, EntityToggleModal as Je, EntityDeleteModal as ze, EntityTypes as Qe, useErrors as Xe, useValidators as Ye, EntityBaseFormType as Ie, useGatewayFeatureSupported as Ze, EntityBaseForm as et, SupportedEntityType as Ee, EntityFormSection as Te, useHelpers as tt, ConfigurationSchemaSection as ne, ConfigurationSchemaType as lt, EntityBaseConfigCard as ot } from "@kong-ui-public/entities-shared";
6
- const it = {
1
+ import { defineComponent as Se, ref as V, computed as h, watch as Ve, onBeforeMount as Ae, resolveComponent as R, openBlock as w, createElementBlock as I, createVNode as u, unref as o, withCtx as p, createBlock as ne, Teleport as Fe, withDirectives as $e, createTextVNode as E, toDisplayString as _, vShow as De, createElementVNode as S, withModifiers as ce, Fragment as Be, renderList as Le, reactive as Ie, onMounted as Ge, renderSlot as Ke, createCommentVNode as L } from "vue";
2
+ import { useRouter as Ee } from "vue-router";
3
+ import { AddIcon as qe } from "@kong/icons";
4
+ import { createI18n as Ne, i18nTComponent as We } from "@kong-ui-public/i18n";
5
+ import { useAxios as Me, useFetcher as Oe, useDeleteUrlBuilder as je, FetcherStatus as Te, EntityBaseTable as He, EntityFilter as Je, PermissionsWrapper as oe, EntityToggleModal as ze, EntityDeleteModal as Qe, EntityTypes as Xe, useErrors as Ye, useValidators as Ze, EntityBaseFormType as Pe, useGatewayFeatureSupported as et, EntityBaseForm as tt, SupportedEntityType as Re, EntityFormSection as Ue, useHelpers as lt, ConfigurationSchemaSection as de, ConfigurationSchemaType as ot, EntityBaseConfigCard as it } from "@kong-ui-public/entities-shared";
6
+ const st = {
7
7
  create: "New Gateway Service",
8
8
  serverless_create: "Add a Service",
9
9
  copy_id: "Copy ID",
@@ -16,12 +16,12 @@ const it = {
16
16
  description: "Deleting this Gateway Service will also remove any associated plugins. This action cannot be reversed.",
17
17
  menu_label: "Delete"
18
18
  }
19
- }, st = {
19
+ }, rt = {
20
20
  placeholder: {
21
21
  konnect: "Filter by name",
22
22
  kongManager: "Filter by exact name or ID"
23
23
  }
24
- }, rt = {
24
+ }, at = {
25
25
  title: "Gateway Services",
26
26
  list: {
27
27
  toolbar_actions: {
@@ -164,37 +164,37 @@ const it = {
164
164
  }
165
165
  }
166
166
  }
167
- }, at = {
167
+ }, nt = {
168
168
  general: "Gateway Services could not be retrieved",
169
169
  delete: "The gateway service could not be deleted at this time.",
170
170
  copy: "Failed to copy to clipboard",
171
171
  urlErrorMessage: "Error: invalid URL"
172
- }, nt = {
172
+ }, ct = {
173
173
  success: "Copied {val} to clipboard",
174
174
  success_brief: "Successfully copied to clipboard"
175
- }, ct = {
176
- gateway_services: "gateway services"
177
175
  }, dt = {
178
- actions: it,
179
- search: st,
180
- gateway_services: rt,
181
- errors: at,
182
- copy: nt,
183
- glossary: ct
176
+ gateway_services: "gateway services"
177
+ }, ut = {
178
+ actions: st,
179
+ search: rt,
180
+ gateway_services: at,
181
+ errors: nt,
182
+ copy: ct,
183
+ glossary: dt
184
184
  };
185
- function ut() {
186
- const a = Ke("en-us", dt);
185
+ function ft() {
186
+ const n = Ne("en-us", ut);
187
187
  return {
188
- i18n: a,
189
- i18nT: qe(a)
188
+ i18n: n,
189
+ i18nT: We(n)
190
190
  // Translation component <i18n-t>
191
191
  };
192
192
  }
193
- function ft() {
193
+ function pt() {
194
194
  return {
195
- getPortFromProtocol: ($, v) => {
196
- const c = [80, 443], r = Number(v);
197
- if ((r || r === 0) && !c.includes(r))
195
+ getPortFromProtocol: ($, m) => {
196
+ const d = [80, 443], r = Number(m);
197
+ if ((r || r === 0) && !d.includes(r))
198
198
  return r;
199
199
  switch ($) {
200
200
  case "grpcs":
@@ -212,38 +212,38 @@ function ft() {
212
212
  }
213
213
  };
214
214
  }
215
- const ue = {
216
- useI18n: ut,
217
- usePortFromProtocol: ft
218
- }, ce = "/v2/control-planes/{controlPlaneId}/core-entities", de = "/{workspace}", le = {
215
+ const pe = {
216
+ useI18n: ft,
217
+ usePortFromProtocol: pt
218
+ }, ue = "/v2/control-planes/{controlPlaneId}/core-entities", fe = "/{workspace}", ie = {
219
219
  list: {
220
220
  konnect: {
221
- all: `${ce}/services`
221
+ all: `${ue}/services`
222
222
  },
223
223
  kongManager: {
224
- all: `${de}/services`
224
+ all: `${fe}/services`
225
225
  }
226
226
  },
227
227
  form: {
228
228
  konnect: {
229
- create: `${ce}/services`,
230
- validate: `${ce}/v1/schemas/json/service/validate`,
231
- edit: `${ce}/services/{id}`
229
+ create: `${ue}/services`,
230
+ validate: `${ue}/v1/schemas/json/service/validate`,
231
+ edit: `${ue}/services/{id}`
232
232
  },
233
233
  kongManager: {
234
- create: `${de}/services`,
235
- validate: `${de}/schemas/services/validate`,
236
- edit: `${de}/services/{id}`
234
+ create: `${fe}/services`,
235
+ validate: `${fe}/schemas/services/validate`,
236
+ edit: `${fe}/services/{id}`
237
237
  }
238
238
  }
239
- }, pt = { class: "kong-ui-entities-gateway-services-list" }, mt = { key: 1 }, vt = { key: 1 }, gt = /* @__PURE__ */ Ve({
239
+ }, mt = { class: "kong-ui-entities-gateway-services-list" }, vt = { key: 1 }, yt = { key: 1 }, gt = /* @__PURE__ */ Se({
240
240
  __name: "GatewayServiceList",
241
241
  props: {
242
242
  /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
243
243
  config: {
244
244
  type: Object,
245
245
  required: !0,
246
- validator: (a) => !(!a || !["konnect", "kongManager"].includes(a == null ? void 0 : a.app) || !a.createRoute || !a.getViewRoute || !a.getEditRoute || a.app === "kongManager" && !a.isExactMatch && !a.filterSchema)
246
+ 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)
247
247
  },
248
248
  // used to override the default identifier for the cache entry
249
249
  cacheIdentifier: {
@@ -286,12 +286,12 @@ const ue = {
286
286
  }
287
287
  },
288
288
  emits: ["error", "copy:success", "copy:error", "delete:success", "toggle:success"],
289
- setup(a, { emit: $ }) {
290
- var y;
291
- const v = $, c = a, { i18n: { t: r, formatUnixTimeStamp: x } } = ue.useI18n(), W = Pe(), { axiosInstance: L } = Ue((y = c.config) == null ? void 0 : y.axiosRequestConfig), s = S(1), P = w(() => c.config.app !== "kongManager" || !!c.config.disableSorting), h = {
289
+ setup(n, { emit: $ }) {
290
+ var U;
291
+ const m = $, d = n, { i18n: { t: r, formatUnixTimeStamp: x } } = pe.useI18n(), O = Ee(), { axiosInstance: G } = Me((U = d.config) == null ? void 0 : U.axiosRequestConfig), s = V(1), T = h(() => d.config.app !== "kongManager" || !!d.config.disableSorting), b = {
292
292
  // the Name column is non-hidable
293
293
  name: { label: r("gateway_services.list.table_headers.name"), searchable: !0, sortable: !0, hidable: !1 },
294
- ...c.config.showControlPlaneColumn ? { control_plane: { label: r("gateway_services.list.table_headers.control_plane") } } : {},
294
+ ...d.config.showControlPlaneColumn ? { control_plane: { label: r("gateway_services.list.table_headers.control_plane") } } : {},
295
295
  protocol: { label: r("gateway_services.list.table_headers.protocol"), searchable: !0, sortable: !0 },
296
296
  host: { label: r("gateway_services.list.table_headers.host"), searchable: !0, sortable: !0 },
297
297
  port: { label: r("gateway_services.list.table_headers.port"), searchable: !0, sortable: !0 },
@@ -300,316 +300,316 @@ const ue = {
300
300
  tags: { label: r("gateway_services.list.table_headers.tags"), sortable: !1 },
301
301
  updated_at: { label: r("gateway_services.list.table_headers.updated_at"), sortable: !0 },
302
302
  created_at: { label: r("gateway_services.list.table_headers.created_at"), sortable: !0 }
303
- }, fe = {
303
+ }, me = {
304
304
  columnVisibility: {
305
305
  created_at: !1
306
306
  }
307
- }, pe = h, F = w(() => {
308
- var f, m;
309
- let n = `${c.config.apiBaseUrl}${le.list[c.config.app].all}`;
310
- return c.config.app === "konnect" ? n = n.replace(/{controlPlaneId}/gi, ((f = c.config) == null ? void 0 : f.controlPlaneId) || "") : c.config.app === "kongManager" && (n = n.replace(/\/{workspace}/gi, (m = c.config) != null && m.workspace ? `/${c.config.workspace}` : "")), n;
311
- }), me = w(() => c.config.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${F.value}`) : new URL(F.value)), D = S(""), C = w(() => {
312
- const n = c.config.app === "konnect" || c.config.isExactMatch;
313
- if (n)
307
+ }, ve = b, F = h(() => {
308
+ var f, l;
309
+ let a = `${d.config.apiBaseUrl}${ie.list[d.config.app].all}`;
310
+ return d.config.app === "konnect" ? a = a.replace(/{controlPlaneId}/gi, ((f = d.config) == null ? void 0 : f.controlPlaneId) || "") : d.config.app === "kongManager" && (a = a.replace(/\/{workspace}/gi, (l = d.config) != null && l.workspace ? `/${d.config.workspace}` : "")), a;
311
+ }), ye = h(() => d.config.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${F.value}`) : new URL(F.value)), D = V(""), k = h(() => {
312
+ const a = d.config.app === "konnect" || d.config.isExactMatch;
313
+ if (a)
314
314
  return {
315
- isExactMatch: n,
316
- placeholder: r(`search.placeholder.${c.config.app}`)
315
+ isExactMatch: a,
316
+ placeholder: r(`search.placeholder.${d.config.app}`)
317
317
  };
318
- const { name: f, enabled: m, protocol: l, host: A, port: d, path: N } = h;
318
+ const { name: f, enabled: l, protocol: C, host: c, port: N, path: W } = b;
319
319
  return {
320
- isExactMatch: n,
321
- fields: { name: f, enabled: m, protocol: l, host: A, port: d, path: N },
322
- schema: c.config.filterSchema
320
+ isExactMatch: a,
321
+ fields: { name: f, enabled: l, protocol: C, host: c, port: N, path: W },
322
+ schema: d.config.filterSchema
323
323
  };
324
- }), { fetcher: H, fetcherState: J } = Ne(c.config, F.value), ve = () => {
324
+ }), { fetcher: H, fetcherState: J } = Oe(d.config, F.value), ge = () => {
325
325
  D.value = "";
326
326
  }, e = () => {
327
327
  s.value++;
328
- }, _ = S(null), ge = w(() => ({
329
- ctaPath: c.config.createRoute,
330
- ctaText: i.value ? c.isServerless ? r("actions.serverless_create") : r("actions.create") : void 0,
331
- message: `${r("gateway_services.list.empty_state.description")}${c.config.additionMessageForEmptyState ? ` ${c.config.additionMessageForEmptyState}` : ""}`,
332
- title: i.value ? c.isServerless ? r("gateway_services.list.empty_state.serverless_title") : r("gateway_services.list.empty_state.title") : r("gateway_services.title")
333
- })), z = S(!1), T = S(null), Q = w(() => {
334
- const n = {
328
+ }, g = V(null), z = V(!1), _e = h(() => ({
329
+ ctaPath: d.config.createRoute,
330
+ ctaText: y.value ? d.isServerless ? r("actions.serverless_create") : r("actions.create") : void 0,
331
+ message: `${r("gateway_services.list.empty_state.description")}${d.config.additionMessageForEmptyState ? ` ${d.config.additionMessageForEmptyState}` : ""}`,
332
+ title: y.value ? d.isServerless ? r("gateway_services.list.empty_state.serverless_title") : r("gateway_services.list.empty_state.title") : r("gateway_services.title")
333
+ })), j = V(!1), P = V(null), B = h(() => {
334
+ const a = {
335
335
  action: "disable",
336
336
  id: "",
337
337
  name: ""
338
338
  };
339
- if (T.value) {
340
- const { enabled: f, id: m, name: l } = T.value;
341
- n.action = f ? "disable" : "enable", n.id = m, n.name = l || m;
339
+ if (P.value) {
340
+ const { enabled: f, id: l, name: C } = P.value;
341
+ a.action = f ? "disable" : "enable", a.id = l, a.name = C || l;
342
342
  }
343
- return n;
344
- }), G = (n) => {
345
- z.value = !0, T.value = n;
346
- }, X = () => {
347
- z.value = !1, T.value = null;
348
- }, oe = async () => {
349
- var l, A;
350
- if (!await ((l = c.canEdit) == null ? void 0 : l.call(c, T.value)) || !T.value)
343
+ return a;
344
+ }), se = (a) => {
345
+ j.value = !0, P.value = a;
346
+ }, Q = () => {
347
+ j.value = !1, P.value = null;
348
+ }, re = async () => {
349
+ var C, c;
350
+ if (!await ((C = d.canEdit) == null ? void 0 : C.call(d, P.value)) || !P.value)
351
351
  return;
352
- const f = `${me.value.href}/${T.value.id}`, m = !T.value.enabled;
352
+ const f = `${ye.value.href}/${P.value.id}`, l = !P.value.enabled;
353
353
  try {
354
- const { data: d } = ((A = c.config) == null ? void 0 : A.app) === "konnect" ? await L.put(f, { ...T.value, enabled: m }) : await L.patch(f, { ...T.value, enabled: m });
355
- v("toggle:success", d);
356
- } catch (d) {
357
- v("error", d);
354
+ const { data: N } = ((c = d.config) == null ? void 0 : c.app) === "konnect" ? await G.put(f, { ...P.value, enabled: l }) : await G.patch(f, { ...P.value, enabled: l });
355
+ m("toggle:success", N);
356
+ } catch (N) {
357
+ m("error", N);
358
358
  }
359
- T.value.enabled = m;
360
- }, ie = (n) => {
361
- c.config.getControlPlaneRoute && W.push(c.config.getControlPlaneRoute(n));
362
- }, ye = (n, f) => {
363
- const m = n.id;
364
- if (!f(m)) {
365
- v("copy:error", {
366
- entity: n,
359
+ P.value.enabled = l;
360
+ }, be = (a) => {
361
+ d.config.getControlPlaneRoute && O.push(d.config.getControlPlaneRoute(a));
362
+ }, he = (a, f) => {
363
+ const l = a.id;
364
+ if (!f(l)) {
365
+ m("copy:error", {
366
+ entity: a,
367
367
  field: "id",
368
368
  message: r("errors.copy")
369
369
  });
370
370
  return;
371
371
  }
372
- v("copy:success", {
373
- entity: n,
372
+ m("copy:success", {
373
+ entity: a,
374
374
  field: "id",
375
- message: r("copy.success", { val: m })
375
+ message: r("copy.success", { val: l })
376
376
  });
377
- }, _e = (n, f) => {
378
- const m = JSON.stringify(n);
379
- if (!f(m)) {
380
- v("copy:error", {
381
- entity: n,
377
+ }, we = (a, f) => {
378
+ const l = JSON.stringify(a);
379
+ if (!f(l)) {
380
+ m("copy:error", {
381
+ entity: a,
382
382
  message: r("errors.copy")
383
383
  });
384
384
  return;
385
385
  }
386
- v("copy:success", {
387
- entity: n,
386
+ m("copy:success", {
387
+ entity: a,
388
388
  message: r("copy.success_brief")
389
389
  });
390
- }, be = async (n) => {
391
- var m;
392
- await ((m = c.canRetrieve) == null ? void 0 : m.call(c, n)) && W.push(c.config.getViewRoute(n.id));
393
- }, he = (n) => ({
390
+ }, ke = async (a) => {
391
+ var l;
392
+ await ((l = d.canRetrieve) == null ? void 0 : l.call(d, a)) && O.push(d.config.getViewRoute(a.id));
393
+ }, X = (a) => ({
394
394
  label: r("actions.view"),
395
- to: c.config.getViewRoute(n)
396
- }), Y = (n) => ({
395
+ to: d.config.getViewRoute(a)
396
+ }), ae = (a) => ({
397
397
  label: r("actions.edit"),
398
- to: c.config.getEditRoute(n)
399
- }), R = S(void 0), O = S(!1), Z = S(!1), K = S(""), we = We(c.config, F.value), q = (n) => {
400
- R.value = n, O.value = !0, K.value = "";
401
- }, j = () => {
402
- O.value = !1, R.value = void 0;
403
- }, se = async () => {
404
- var n, f, m;
405
- if ((n = R.value) != null && n.id) {
406
- Z.value = !0;
398
+ to: d.config.getEditRoute(a)
399
+ }), A = V(void 0), Y = V(!1), K = V(!1), Z = V(""), q = je(d.config, F.value), ee = (a) => {
400
+ A.value = a, Y.value = !0, Z.value = "";
401
+ }, te = () => {
402
+ Y.value = !1, A.value = void 0;
403
+ }, t = async () => {
404
+ var a, f, l;
405
+ if ((a = A.value) != null && a.id) {
406
+ K.value = !0;
407
407
  try {
408
- await L.delete(we(R.value.id)), v("delete:success", R.value), j(), s.value++;
409
- } catch (l) {
410
- K.value = ((m = (f = l.response) == null ? void 0 : f.data) == null ? void 0 : m.message) || l.message || r("errors.delete"), v("error", l);
408
+ await G.delete(q(A.value.id)), m("delete:success", A.value), te(), s.value++;
409
+ } catch (C) {
410
+ Z.value = ((l = (f = C.response) == null ? void 0 : f.data) == null ? void 0 : l.message) || C.message || r("errors.delete"), m("error", C);
411
411
  } finally {
412
- Z.value = !1;
412
+ K.value = !1;
413
413
  }
414
414
  }
415
- }, t = S(!1);
416
- Ce(J, (n) => {
417
- var f, m, l, A;
418
- if (Array.isArray((f = n == null ? void 0 : n.response) == null ? void 0 : f.data) && (t.value = n.response.data.length > 0), n.status === Oe.Error) {
419
- _.value = {
415
+ }, i = V(!1);
416
+ Ve(J, (a) => {
417
+ var f, l, C, c;
418
+ if (Array.isArray((f = a == null ? void 0 : a.response) == null ? void 0 : f.data) && (i.value = a.response.data.length > 0), a.status === Te.NoRecords ? z.value = !0 : z.value = !1, a.status === Te.Error) {
419
+ g.value = {
420
420
  title: r("errors.general")
421
- }, (A = (l = (m = n.error) == null ? void 0 : m.response) == null ? void 0 : l.data) != null && A.message && (_.value.message = n.error.response.data.message), v("error", n.error);
421
+ }, (c = (C = (l = a.error) == null ? void 0 : l.response) == null ? void 0 : C.data) != null && c.message && (g.value.message = a.error.response.data.message), m("error", a.error);
422
422
  return;
423
423
  }
424
- _.value = null;
424
+ g.value = null;
425
425
  });
426
- const i = S(!1);
427
- return xe(async () => {
428
- i.value = await c.canCreate();
429
- }), (n, f) => {
430
- const m = M("KButton"), l = M("KBadge"), A = M("KInputSwitch"), d = M("KTruncate"), N = M("KDropdownItem"), ke = M("KClipboardProvider");
431
- return k(), I("div", pt, [
432
- u(o(je), {
433
- "cache-identifier": a.cacheIdentifier,
434
- "default-table-preferences": fe,
435
- "disable-pagination-page-jump": "",
436
- "disable-sorting": P.value,
437
- "empty-state-options": ge.value,
426
+ const y = V(!1);
427
+ return Ae(async () => {
428
+ y.value = await d.canCreate();
429
+ }), (a, f) => {
430
+ const l = R("KButton"), C = R("KBadge"), c = R("KInputSwitch"), N = R("KTruncate"), W = R("KDropdownItem"), Ce = R("KClipboardProvider");
431
+ return w(), I("div", mt, [
432
+ u(o(He), {
433
+ "cache-identifier": n.cacheIdentifier,
434
+ "default-table-preferences": me,
435
+ "disable-sorting": T.value,
436
+ "empty-state-options": _e.value,
438
437
  "enable-entity-actions": "",
439
- "error-message": _.value,
438
+ "error-message": g.value,
440
439
  fetcher: o(H),
441
440
  "fetcher-cache-key": s.value,
441
+ "hide-toolbar": z.value,
442
442
  "pagination-type": "offset",
443
443
  "preferences-storage-key": "kong-ui-entities-gateway-services-list",
444
444
  query: D.value,
445
- "table-headers": o(pe),
446
- onClearSearchInput: ve,
447
- "onClick:row": f[3] || (f[3] = (g) => be(g)),
445
+ "table-headers": o(ve),
446
+ onClearSearchInput: ge,
447
+ "onClick:row": f[3] || (f[3] = (v) => ke(v)),
448
448
  onSort: e
449
449
  }, {
450
450
  "toolbar-filter": p(() => [
451
- u(o(He), {
451
+ u(o(Je), {
452
452
  modelValue: D.value,
453
- "onUpdate:modelValue": f[0] || (f[0] = (g) => D.value = g),
454
- config: C.value
453
+ "onUpdate:modelValue": f[0] || (f[0] = (v) => D.value = v),
454
+ config: k.value
455
455
  }, null, 8, ["modelValue", "config"])
456
456
  ]),
457
457
  "toolbar-button": p(() => [
458
- (k(), re(Re, {
459
- disabled: !a.useActionOutside,
458
+ (w(), ne(Fe, {
459
+ disabled: !n.useActionOutside,
460
460
  to: "#kong-ui-app-page-header-action-button"
461
461
  }, [
462
- u(o(te), {
463
- "auth-function": () => a.canCreate()
462
+ u(o(oe), {
463
+ "auth-function": () => n.canCreate()
464
464
  }, {
465
465
  default: p(() => [
466
- Ae(u(m, {
466
+ $e(u(l, {
467
467
  appearance: "primary",
468
468
  "data-testid": "toolbar-add-gateway-service",
469
- size: a.useActionOutside ? "medium" : "large",
470
- to: a.config.createRoute
469
+ size: n.useActionOutside ? "medium" : "large",
470
+ to: n.config.createRoute
471
471
  }, {
472
472
  default: p(() => [
473
- u(o(Ge)),
474
- U(" " + b(o(r)("gateway_services.list.toolbar_actions.new_gateway_service")), 1)
473
+ u(o(qe)),
474
+ E(" " + _(o(r)("gateway_services.list.toolbar_actions.new_gateway_service")), 1)
475
475
  ]),
476
476
  _: 1
477
477
  }, 8, ["size", "to"]), [
478
- [Fe, t.value]
478
+ [De, i.value]
479
479
  ])
480
480
  ]),
481
481
  _: 1
482
482
  }, 8, ["auth-function"])
483
483
  ], 8, ["disabled"]))
484
484
  ]),
485
- name: p(({ rowValue: g }) => [
486
- V("b", null, b(g ?? "-"), 1)
485
+ name: p(({ rowValue: v }) => [
486
+ S("b", null, _(v ?? "-"), 1)
487
487
  ]),
488
- control_plane: p(({ row: g }) => {
489
- var E;
488
+ control_plane: p(({ row: v }) => {
489
+ var M;
490
490
  return [
491
- (E = g.x_meta) != null && E.cluster_id ? (k(), re(l, {
491
+ (M = v.x_meta) != null && M.cluster_id ? (w(), ne(C, {
492
492
  key: 0,
493
- tooltip: g.x_meta.cluster_id,
493
+ tooltip: v.x_meta.cluster_id,
494
494
  "truncation-tooltip": "",
495
- onClick: ae((ee) => ie(g.x_meta.cluster_id), ["stop"])
495
+ onClick: ce((le) => be(v.x_meta.cluster_id), ["stop"])
496
496
  }, {
497
497
  default: p(() => [
498
- U(b(g.x_meta.cluster_id), 1)
498
+ E(_(v.x_meta.cluster_id), 1)
499
499
  ]),
500
500
  _: 2
501
- }, 1032, ["tooltip", "onClick"])) : (k(), I("b", mt, "-"))
501
+ }, 1032, ["tooltip", "onClick"])) : (w(), I("b", vt, "-"))
502
502
  ];
503
503
  }),
504
- enabled: p(({ row: g }) => [
505
- u(o(te), {
506
- "auth-function": () => a.canEdit(g),
504
+ enabled: p(({ row: v }) => [
505
+ u(o(oe), {
506
+ "auth-function": () => n.canEdit(v),
507
507
  "force-show": ""
508
508
  }, {
509
- default: p(({ isAllowed: E }) => [
510
- V("div", {
511
- onClick: f[1] || (f[1] = ae(() => {
509
+ default: p(({ isAllowed: M }) => [
510
+ S("div", {
511
+ onClick: f[1] || (f[1] = ce(() => {
512
512
  }, ["stop"]))
513
513
  }, [
514
- u(A, {
515
- modelValue: g.enabled,
516
- "onUpdate:modelValue": (ee) => g.enabled = ee,
517
- "data-testid": `row-${g.id}-toggle-input`,
518
- disabled: !E,
519
- onClick: ae((ee) => G(g), ["prevent"])
514
+ u(c, {
515
+ modelValue: v.enabled,
516
+ "onUpdate:modelValue": (le) => v.enabled = le,
517
+ "data-testid": `row-${v.id}-toggle-input`,
518
+ disabled: !M,
519
+ onClick: ce((le) => se(v), ["prevent"])
520
520
  }, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "disabled", "onClick"])
521
521
  ])
522
522
  ]),
523
523
  _: 2
524
524
  }, 1032, ["auth-function"])
525
525
  ]),
526
- tags: p(({ rowValue: g }) => [
527
- (g == null ? void 0 : g.length) > 0 ? (k(), re(d, { key: 0 }, {
526
+ tags: p(({ rowValue: v }) => [
527
+ (v == null ? void 0 : v.length) > 0 ? (w(), ne(N, { key: 0 }, {
528
528
  default: p(() => [
529
- (k(!0), I($e, null, De(g, (E) => (k(), re(l, {
530
- key: E,
531
- onClick: f[2] || (f[2] = ae(() => {
529
+ (w(!0), I(Be, null, Le(v, (M) => (w(), ne(C, {
530
+ key: M,
531
+ onClick: f[2] || (f[2] = ce(() => {
532
532
  }, ["stop"]))
533
533
  }, {
534
534
  default: p(() => [
535
- U(b(E), 1)
535
+ E(_(M), 1)
536
536
  ]),
537
537
  _: 2
538
538
  }, 1024))), 128))
539
539
  ]),
540
540
  _: 2
541
- }, 1024)) : (k(), I("span", vt, "-"))
541
+ }, 1024)) : (w(), I("span", yt, "-"))
542
542
  ]),
543
- created_at: p(({ rowValue: g }) => [
544
- U(b(o(x)(g)), 1)
543
+ created_at: p(({ rowValue: v }) => [
544
+ E(_(o(x)(v)), 1)
545
545
  ]),
546
- updated_at: p(({ rowValue: g }) => [
547
- U(b(o(x)(g)), 1)
546
+ updated_at: p(({ rowValue: v }) => [
547
+ E(_(o(x)(v)), 1)
548
548
  ]),
549
- actions: p(({ row: g }) => [
550
- u(ke, null, {
551
- default: p(({ copyToClipboard: E }) => [
552
- u(N, {
549
+ actions: p(({ row: v }) => [
550
+ u(Ce, null, {
551
+ default: p(({ copyToClipboard: M }) => [
552
+ u(W, {
553
553
  "data-testid": "action-entity-copy-id",
554
- onClick: (ee) => ye(g, E)
554
+ onClick: (le) => he(v, M)
555
555
  }, {
556
556
  default: p(() => [
557
- U(b(o(r)("actions.copy_id")), 1)
557
+ E(_(o(r)("actions.copy_id")), 1)
558
558
  ]),
559
559
  _: 2
560
560
  }, 1032, ["onClick"])
561
561
  ]),
562
562
  _: 2
563
563
  }, 1024),
564
- u(ke, null, {
565
- default: p(({ copyToClipboard: E }) => [
566
- u(N, {
564
+ u(Ce, null, {
565
+ default: p(({ copyToClipboard: M }) => [
566
+ u(W, {
567
567
  "data-testid": "action-entity-copy-json",
568
- onClick: (ee) => _e(g, E)
568
+ onClick: (le) => we(v, M)
569
569
  }, {
570
570
  default: p(() => [
571
- U(b(o(r)("actions.copy_json")), 1)
571
+ E(_(o(r)("actions.copy_json")), 1)
572
572
  ]),
573
573
  _: 2
574
574
  }, 1032, ["onClick"])
575
575
  ]),
576
576
  _: 2
577
577
  }, 1024),
578
- u(o(te), {
579
- "auth-function": () => a.canRetrieve(g)
578
+ u(o(oe), {
579
+ "auth-function": () => n.canRetrieve(v)
580
580
  }, {
581
581
  default: p(() => [
582
- u(N, {
582
+ u(W, {
583
583
  "data-testid": "action-entity-view",
584
584
  "has-divider": "",
585
- item: he(g.id)
585
+ item: X(v.id)
586
586
  }, null, 8, ["item"])
587
587
  ]),
588
588
  _: 2
589
589
  }, 1032, ["auth-function"]),
590
- u(o(te), {
591
- "auth-function": () => a.canEdit(g)
590
+ u(o(oe), {
591
+ "auth-function": () => n.canEdit(v)
592
592
  }, {
593
593
  default: p(() => [
594
- u(N, {
594
+ u(W, {
595
595
  "data-testid": "action-entity-edit",
596
- item: Y(g.id)
596
+ item: ae(v.id)
597
597
  }, null, 8, ["item"])
598
598
  ]),
599
599
  _: 2
600
600
  }, 1032, ["auth-function"]),
601
- u(o(te), {
602
- "auth-function": () => a.canDelete(g)
601
+ u(o(oe), {
602
+ "auth-function": () => n.canDelete(v)
603
603
  }, {
604
604
  default: p(() => [
605
- u(N, {
605
+ u(W, {
606
606
  danger: "",
607
607
  "data-testid": "action-entity-delete",
608
608
  "has-divider": "",
609
- onClick: (E) => q(g)
609
+ onClick: (M) => ee(v)
610
610
  }, {
611
611
  default: p(() => [
612
- U(b(o(r)("actions.delete.menu_label")), 1)
612
+ E(_(o(r)("actions.delete.menu_label")), 1)
613
613
  ]),
614
614
  _: 2
615
615
  }, 1032, ["onClick"])
@@ -618,65 +618,65 @@ const ue = {
618
618
  }, 1032, ["auth-function"])
619
619
  ]),
620
620
  _: 1
621
- }, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers"]),
622
- u(o(Je), {
623
- action: Q.value.action,
624
- "entity-id": Q.value.id,
625
- "entity-name": Q.value.name,
621
+ }, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "hide-toolbar", "query", "table-headers"]),
622
+ u(o(ze), {
623
+ action: B.value.action,
624
+ "entity-id": B.value.id,
625
+ "entity-name": B.value.name,
626
626
  "entity-type": o(r)("glossary.gateway_services"),
627
- "on-confirm": oe,
628
- visible: z.value,
629
- onCancel: X,
630
- onProceed: X
627
+ "on-confirm": re,
628
+ visible: j.value,
629
+ onCancel: Q,
630
+ onProceed: Q
631
631
  }, null, 8, ["action", "entity-id", "entity-name", "entity-type", "visible"]),
632
- u(o(ze), {
633
- "action-pending": Z.value,
632
+ u(o(Qe), {
633
+ "action-pending": K.value,
634
634
  description: o(r)("actions.delete.description"),
635
- "entity-name": R.value && (R.value.name || R.value.id),
636
- "entity-type": o(Qe).GatewayService,
637
- error: K.value,
635
+ "entity-name": A.value && (A.value.name || A.value.id),
636
+ "entity-type": o(Xe).GatewayService,
637
+ error: Z.value,
638
638
  title: o(r)("actions.delete.title"),
639
- visible: O.value,
640
- onCancel: j,
641
- onProceed: se
639
+ visible: Y.value,
640
+ onCancel: te,
641
+ onProceed: t
642
642
  }, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
643
643
  ]);
644
644
  };
645
645
  }
646
- }), Me = (a, $) => {
647
- const v = a.__vccOpts || a;
648
- for (const [c, r] of $)
649
- v[c] = r;
650
- return v;
651
- }, Kt = /* @__PURE__ */ Me(gt, [["__scopeId", "data-v-822e59d7"]]), yt = { class: "kong-ui-entities-gateway-service-form" }, _t = { key: 0 }, bt = { class: "gateway-service-form-traffic-label" }, ht = { class: "gateway-service-form-margin-bottom" }, wt = {
646
+ }), xe = (n, $) => {
647
+ const m = n.__vccOpts || n;
648
+ for (const [d, r] of $)
649
+ m[d] = r;
650
+ return m;
651
+ }, qt = /* @__PURE__ */ xe(gt, [["__scopeId", "data-v-26fe95da"]]), _t = { class: "kong-ui-entities-gateway-service-form" }, bt = { key: 0 }, ht = { class: "gateway-service-form-traffic-label" }, wt = { class: "gateway-service-form-margin-bottom" }, kt = {
652
652
  key: 0,
653
653
  class: "gateway-service-form-group-fields"
654
- }, kt = {
654
+ }, Ct = {
655
655
  key: 1,
656
656
  class: "gateway-service-form-group-fields"
657
- }, Ct = { key: 0 }, Vt = { class: "gateway-service-form-margin-top" }, St = { class: "gateway-service-form-margin-bottom" }, It = { class: "gateway-service-form-margin-bottom" }, Tt = { class: "gateway-service-form-margin-bottom" }, Pt = { class: "gateway-service-form-margin-bottom" }, Ut = {
657
+ }, Vt = { key: 0 }, St = { class: "gateway-service-form-margin-top" }, It = { class: "gateway-service-form-margin-bottom" }, Tt = { class: "gateway-service-form-margin-bottom" }, Pt = { class: "gateway-service-form-margin-bottom" }, Ut = { class: "gateway-service-form-margin-bottom" }, Et = {
658
658
  key: 0,
659
659
  class: "gateway-service-form-margin-bottom"
660
- }, Et = {
660
+ }, Mt = {
661
661
  key: 1,
662
662
  class: "gateway-service-form-margin-bottom"
663
- }, Mt = {
663
+ }, Rt = {
664
664
  key: 2,
665
665
  class: "gateway-service-form-margin-bottom"
666
666
  }, xt = {
667
667
  key: 0,
668
668
  class: "checkbox-aligned-radio"
669
- }, Rt = {
669
+ }, At = {
670
670
  key: 1,
671
671
  class: "checkbox-aligned-radio"
672
- }, At = /* @__PURE__ */ Ve({
672
+ }, Ft = /* @__PURE__ */ Se({
673
673
  __name: "GatewayServiceForm",
674
674
  props: {
675
675
  /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
676
676
  config: {
677
677
  type: Object,
678
678
  required: !0,
679
- validator: (a) => !(!a || !["konnect", "kongManager"].includes(a == null ? void 0 : a.app) || a.app === "konnect" && !a.controlPlaneId || a.app === "kongManager" && typeof a.workspace != "string" || !a.cancelRoute)
679
+ 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)
680
680
  },
681
681
  /** If a valid Gateway Service ID is provided, it will put the form in Edit mode instead of Create */
682
682
  gatewayServiceId: {
@@ -692,9 +692,9 @@ const ue = {
692
692
  }
693
693
  },
694
694
  emits: ["update", "error", "url-valid:success", "url-valid:error", "loading", "model-updated"],
695
- setup(a, { expose: $, emit: v }) {
696
- var se;
697
- const c = v, r = a, x = S(!0), W = Pe(), { i18nT: L, i18n: { t: s } } = ue.useI18n(), { getMessageFromError: P } = Xe(), { axiosInstance: h } = Ue((se = r.config) == null ? void 0 : se.axiosRequestConfig), fe = Ye(), pe = w(() => le.form[r.config.app].edit), F = w(() => r.gatewayServiceId ? Ie.Edit : Ie.Create), me = S(!1), D = w(() => !!r.gatewayServiceId), C = S(D.value ? "protocol" : "url"), H = ue.usePortFromProtocol(), J = S(""), ve = w(() => !!J.value), e = Se({
695
+ setup(n, { expose: $, emit: m }) {
696
+ var te;
697
+ const d = m, r = n, x = V(!0), O = Ee(), { i18nT: G, i18n: { t: s } } = pe.useI18n(), { getMessageFromError: T } = Ye(), { axiosInstance: b } = Me((te = r.config) == null ? void 0 : te.axiosRequestConfig), me = Ze(), ve = h(() => ie.form[r.config.app].edit), F = h(() => r.gatewayServiceId ? Pe.Edit : Pe.Create), ye = V(!1), D = h(() => !!r.gatewayServiceId), k = V(D.value ? "protocol" : "url"), H = pe.usePortFromProtocol(), J = V(""), ge = h(() => !!J.value), e = Ie({
698
698
  fields: {
699
699
  name: "",
700
700
  protocol: "http",
@@ -714,7 +714,7 @@ const ue = {
714
714
  },
715
715
  isReadonly: !1,
716
716
  errorMessage: ""
717
- }), _ = Se({
717
+ }), g = Ie({
718
718
  name: "",
719
719
  protocol: "http",
720
720
  host: "",
@@ -730,13 +730,13 @@ const ue = {
730
730
  tls_verify_enabled: !1,
731
731
  tls_verify_value: !1,
732
732
  tags: ""
733
- }), ge = r.config.app === "konnect" || Ze({
733
+ }), z = r.config.app === "konnect" || et({
734
734
  gatewayInfo: r.config.gatewayInfo,
735
735
  // 'ws' and 'wss' are not valid values for the protocol field in Gateway Community Edition or before Gateway Enterprise Edition 3.0
736
736
  supportedRange: {
737
737
  enterprise: ["3.0"]
738
738
  }
739
- }), z = [
739
+ }), _e = [
740
740
  {
741
741
  label: s("gateway_services.form.fields.protocol.options.http"),
742
742
  value: "http",
@@ -772,7 +772,7 @@ const ue = {
772
772
  value: "grpcs",
773
773
  group: "grpc"
774
774
  },
775
- ...ge ? [
775
+ ...z ? [
776
776
  {
777
777
  label: s("gateway_services.form.fields.protocol.options.ws"),
778
778
  value: "ws",
@@ -789,60 +789,60 @@ const ue = {
789
789
  value: "udp",
790
790
  group: "udp"
791
791
  }
792
- ], T = { url: "url", protocol: "protocol" }, Q = (t, i) => {
792
+ ], j = { url: "url", protocol: "protocol" }, P = (t, i) => {
793
793
  i.value;
794
- }, G = (t) => t ? parseFloat(t) : 0, X = () => {
795
- x.value = !0, e.errorMessage = "", e.fields.host = _.host, e.fields.path = _.path, e.fields.port = _.port, e.fields.protocol = _.protocol, e.fields.url = _.url, e.fields.retries = _.retries, e.fields.connect_timeout = _.connect_timeout, e.fields.write_timeout = _.write_timeout, e.fields.read_timeout = _.read_timeout, e.fields.client_certificate = _.client_certificate, e.fields.ca_certificates = _.ca_certificates, e.fields.tls_verify_enabled = _.tls_verify_enabled, e.fields.tls_verify_value = _.tls_verify_value;
796
- }, oe = () => {
797
- if (e.fields.url && C.value === "url")
794
+ }, B = (t) => t ? parseFloat(t) : 0, se = () => {
795
+ x.value = !0, e.errorMessage = "", e.fields.host = g.host, e.fields.path = g.path, e.fields.port = g.port, e.fields.protocol = g.protocol, e.fields.url = g.url, e.fields.retries = g.retries, e.fields.connect_timeout = g.connect_timeout, e.fields.write_timeout = g.write_timeout, e.fields.read_timeout = g.read_timeout, e.fields.client_certificate = g.client_certificate, e.fields.ca_certificates = g.ca_certificates, e.fields.tls_verify_enabled = g.tls_verify_enabled, e.fields.tls_verify_value = g.tls_verify_value;
796
+ }, Q = () => {
797
+ if (e.fields.url && k.value === "url")
798
798
  try {
799
799
  const t = new URL(e.fields.url);
800
800
  e.errorMessage = "", e.fields.protocol = t.protocol.slice(0, -1), e.fields.host = t.hostname, e.fields.path = t.pathname;
801
801
  const i = Number(t.port);
802
- me.value = !!i, e.fields.port = i || H.getPortFromProtocol(e.fields.protocol), e.errorMessage = "", c("url-valid:success");
802
+ ye.value = !!i, e.fields.port = i || H.getPortFromProtocol(e.fields.protocol), e.errorMessage = "", d("url-valid:success");
803
803
  } catch (t) {
804
- e.errorMessage = s("errors.urlErrorMessage"), c("url-valid:error", P(t));
804
+ e.errorMessage = s("errors.urlErrorMessage"), d("url-valid:error", T(t));
805
805
  }
806
806
  else
807
- c("url-valid:success"), e.errorMessage = "";
808
- }, ie = w(() => !["tcp", "tls", "tls_passthrough", "grpc", "grpcs", "udp"].includes(e.fields.protocol)), ye = w(() => {
809
- if (C.value === "url")
807
+ d("url-valid:success"), e.errorMessage = "";
808
+ }, re = h(() => !["tcp", "tls", "tls_passthrough", "grpc", "grpcs", "udp"].includes(e.fields.protocol)), be = h(() => {
809
+ if (k.value === "url")
810
810
  return !0;
811
811
  const t = ["https", "wss", "tls"].includes(e.fields.protocol);
812
- return C.value === "protocol" && t;
813
- }), _e = w(() => {
814
- if (C.value === "url")
812
+ return k.value === "protocol" && t;
813
+ }), he = h(() => {
814
+ if (k.value === "url")
815
815
  return !0;
816
816
  const t = ["https", "tls"].includes(e.fields.protocol);
817
- return C.value === "protocol" && t;
818
- }), be = w(() => {
819
- if (C.value === "url")
817
+ return k.value === "protocol" && t;
818
+ }), we = h(() => {
819
+ if (k.value === "url")
820
820
  return !0;
821
821
  const t = ["https", "wss", "tls"].includes(e.fields.protocol);
822
- return C.value === "protocol" && t;
823
- }), he = (t) => {
824
- J.value = fe.utf8Name(t);
825
- }, Y = w(() => D.value && JSON.stringify(e.fields) !== JSON.stringify(_) || C.value === "url" && !!e.fields.url || C.value === "protocol" && !!e.fields.host), R = (t) => {
826
- var i, y, n;
827
- e.fields.name = (t == null ? void 0 : t.name) || "", e.fields.tags = ((i = t == null ? void 0 : t.tags) == null ? void 0 : i.join(", ")) || "", e.fields.protocol = (t == null ? void 0 : t.protocol) || "http", e.fields.path = (t == null ? void 0 : t.path) || "", e.fields.read_timeout = t != null && t.read_timeout || (t == null ? void 0 : t.read_timeout) === 0 ? t == null ? void 0 : t.read_timeout : 6e4, e.fields.retries = t != null && t.retries || (t == null ? void 0 : t.retries) === 0 ? t == null ? void 0 : t.retries : 5, e.fields.host = (t == null ? void 0 : t.host) || "", e.fields.connect_timeout = t != null && t.connect_timeout || (t == null ? void 0 : t.connect_timeout) === 0 ? t == null ? void 0 : t.connect_timeout : 6e4, e.fields.tls_verify_enabled = (t == null ? void 0 : t.tls_verify) !== "" && (t == null ? void 0 : t.tls_verify) !== null && (t == null ? void 0 : t.tls_verify) !== void 0, e.fields.tls_verify_value = t != null && t.tls_verify ? t == null ? void 0 : t.tls_verify : !1, e.fields.ca_certificates = ((y = t == null ? void 0 : t.ca_certificates) == null ? void 0 : y.join(",")) || "", e.fields.client_certificate = ((n = t == null ? void 0 : t.client_certificate) == null ? void 0 : n.id) || "", e.fields.write_timeout = t != null && t.write_timeout || (t == null ? void 0 : t.write_timeout) === 0 ? t == null ? void 0 : t.write_timeout : 6e4, e.fields.port = t != null && t.port || (t == null ? void 0 : t.port) === 0 ? t == null ? void 0 : t.port : 80, Object.assign(_, e.fields);
828
- }, O = () => {
829
- W.push(r.config.cancelRoute);
830
- }, Z = w(() => {
822
+ return k.value === "protocol" && t;
823
+ }), ke = (t) => {
824
+ J.value = me.utf8Name(t);
825
+ }, X = h(() => D.value && JSON.stringify(e.fields) !== JSON.stringify(g) || k.value === "url" && !!e.fields.url || k.value === "protocol" && !!e.fields.host), ae = (t) => {
826
+ var i, y, U;
827
+ e.fields.name = (t == null ? void 0 : t.name) || "", e.fields.tags = ((i = t == null ? void 0 : t.tags) == null ? void 0 : i.join(", ")) || "", e.fields.protocol = (t == null ? void 0 : t.protocol) || "http", e.fields.path = (t == null ? void 0 : t.path) || "", e.fields.read_timeout = t != null && t.read_timeout || (t == null ? void 0 : t.read_timeout) === 0 ? t == null ? void 0 : t.read_timeout : 6e4, e.fields.retries = t != null && t.retries || (t == null ? void 0 : t.retries) === 0 ? t == null ? void 0 : t.retries : 5, e.fields.host = (t == null ? void 0 : t.host) || "", e.fields.connect_timeout = t != null && t.connect_timeout || (t == null ? void 0 : t.connect_timeout) === 0 ? t == null ? void 0 : t.connect_timeout : 6e4, e.fields.tls_verify_enabled = (t == null ? void 0 : t.tls_verify) !== "" && (t == null ? void 0 : t.tls_verify) !== null && (t == null ? void 0 : t.tls_verify) !== void 0, e.fields.tls_verify_value = t != null && t.tls_verify ? t == null ? void 0 : t.tls_verify : !1, e.fields.ca_certificates = ((y = t == null ? void 0 : t.ca_certificates) == null ? void 0 : y.join(",")) || "", e.fields.client_certificate = ((U = t == null ? void 0 : t.client_certificate) == null ? void 0 : U.id) || "", e.fields.write_timeout = t != null && t.write_timeout || (t == null ? void 0 : t.write_timeout) === 0 ? t == null ? void 0 : t.write_timeout : 6e4, e.fields.port = t != null && t.port || (t == null ? void 0 : t.port) === 0 ? t == null ? void 0 : t.port : 80, Object.assign(g, e.fields);
828
+ }, A = () => {
829
+ O.push(r.config.cancelRoute);
830
+ }, Y = h(() => {
831
831
  var i, y;
832
- let t = `${r.config.apiBaseUrl}${le.form[r.config.app].validate}`;
832
+ let t = `${r.config.apiBaseUrl}${ie.form[r.config.app].validate}`;
833
833
  return r.config.app === "konnect" ? t = t.replace(/{controlPlaneId}/gi, ((i = r.config) == null ? void 0 : i.controlPlaneId) || "") : r.config.app === "kongManager" && (t = t.replace(/\/{workspace}/gi, (y = r.config) != null && y.workspace ? `/${r.config.workspace}` : "")), t = t.replace(/{id}/gi, r.gatewayServiceId), t;
834
- }), K = w(() => {
834
+ }), K = h(() => {
835
835
  var i, y;
836
- let t = `${r.config.apiBaseUrl}${le.form[r.config.app][F.value]}`;
836
+ let t = `${r.config.apiBaseUrl}${ie.form[r.config.app][F.value]}`;
837
837
  return r.config.app === "konnect" ? t = t.replace(/{controlPlaneId}/gi, ((i = r.config) == null ? void 0 : i.controlPlaneId) || "") : r.config.app === "kongManager" && (t = t.replace(/\/{workspace}/gi, (y = r.config) != null && y.workspace ? `/${r.config.workspace}` : "")), t = t.replace(/{id}/gi, r.gatewayServiceId), t;
838
- }), we = (t) => {
838
+ }), Z = (t) => {
839
839
  let i = "";
840
840
  t.url && (i = new URL(t.url).protocol), (["https", "wss", "tls"].includes(t.protocol) || ["https", "wss", "tls"].includes(i)) && (t.tls_verify = t.tls_verify_enabled ? t.tls_verify_value : null), delete t.tls_verify_enabled, delete t.tls_verify_value;
841
- }, q = w(() => {
842
- var i, y, n, f;
841
+ }, q = h(() => {
842
+ var i, y, U, a;
843
843
  const t = {
844
844
  name: e.fields.name || null,
845
- tags: e.fields.tags ? (n = (y = (i = e.fields.tags) == null ? void 0 : i.split(",")) == null ? void 0 : y.map((m) => String(m || "").trim())) == null ? void 0 : n.filter((m) => m !== "") : null,
845
+ tags: e.fields.tags ? (U = (y = (i = e.fields.tags) == null ? void 0 : i.split(",")) == null ? void 0 : y.map((f) => String(f || "").trim())) == null ? void 0 : U.filter((f) => f !== "") : null,
846
846
  protocol: e.fields.protocol,
847
847
  path: e.fields.path || null,
848
848
  read_timeout: e.fields.read_timeout,
@@ -851,82 +851,82 @@ const ue = {
851
851
  connect_timeout: e.fields.connect_timeout,
852
852
  tls_verify_value: e.fields.tls_verify_value,
853
853
  tls_verify_enabled: e.fields.tls_verify_enabled,
854
- ca_certificates: e.fields.ca_certificates ? (f = e.fields.ca_certificates) == null ? void 0 : f.split(",").filter((m) => m !== "") : null,
854
+ ca_certificates: e.fields.ca_certificates ? (a = e.fields.ca_certificates) == null ? void 0 : a.split(",").filter((f) => f !== "") : null,
855
855
  client_certificate: e.fields.client_certificate ? { id: e.fields.client_certificate } : null,
856
856
  write_timeout: e.fields.write_timeout,
857
857
  port: e.fields.port,
858
858
  url: e.fields.url
859
859
  };
860
- return e.fields.client_certificate && ["https", "wss", "tls"].includes(e.fields.protocol) && (t.client_certificate = { id: e.fields.client_certificate }), e.fields.tls_verify_enabled && ["https", "wss", "tls"].includes(e.fields.protocol) && (t.tls_verify = e.fields.tls_verify_value), ie.value || (t.path = null), F.value === "create" ? C.value === "url" ? (delete t.protocol, delete t.host, delete t.path, r.config.app === "konnect" && delete t.port) : delete t.url : F.value === "edit" && delete t.url, t;
861
- }), j = async () => {
862
- var t, i, y, n;
860
+ return e.fields.client_certificate && ["https", "wss", "tls"].includes(e.fields.protocol) && (t.client_certificate = { id: e.fields.client_certificate }), e.fields.tls_verify_enabled && ["https", "wss", "tls"].includes(e.fields.protocol) && (t.tls_verify = e.fields.tls_verify_value), re.value || (t.path = null), F.value === "create" ? k.value === "url" ? (delete t.protocol, delete t.host, delete t.path, r.config.app === "konnect" && delete t.port) : delete t.url : F.value === "edit" && delete t.url, t;
861
+ }), ee = async () => {
862
+ var t, i, y, U;
863
863
  try {
864
- e.isReadonly = !0, oe();
865
- const f = q.value;
866
- we(f);
867
- let m;
868
- if (await h.post(Z.value, f), F.value === "create" ? m = await h.post(K.value, f) : F.value === "edit" && (m = ((t = r.config) == null ? void 0 : t.app) === "konnect" ? await h.put(K.value, f) : await h.patch(K.value, f)), m) {
869
- const { data: l } = m;
870
- e.fields.name = (l == null ? void 0 : l.name) || "", e.fields.port = l.port || H.getPortFromProtocol(l.protocol), e.fields.protocol = (l == null ? void 0 : l.protocol) || "http", e.fields.host = (l == null ? void 0 : l.host) || "", e.fields.path = (l == null ? void 0 : l.path) || "", e.fields.url = (l == null ? void 0 : l.url) || "", e.fields.retries = l != null && l.retries || (l == null ? void 0 : l.retries) === 0 ? l == null ? void 0 : l.retries : 5, e.fields.connect_timeout = l != null && l.connect_timeout || (l == null ? void 0 : l.connect_timeout) === 0 ? l == null ? void 0 : l.connect_timeout : 6e4, e.fields.write_timeout = l != null && l.write_timeout || (l == null ? void 0 : l.write_timeout) === 0 ? l == null ? void 0 : l.write_timeout : 6e4, e.fields.read_timeout = l != null && l.read_timeout || (l == null ? void 0 : l.read_timeout) === 0 ? l == null ? void 0 : l.read_timeout : 6e4, e.fields.client_certificate = ((i = l == null ? void 0 : l.client_certificate) == null ? void 0 : i.id) || "", e.fields.ca_certificates = (y = l == null ? void 0 : l.ca_certificates) != null && y.length ? l == null ? void 0 : l.ca_certificates.join(",") : "", e.fields.tls_verify_enabled = (l == null ? void 0 : l.tls_verify) !== "" && (l == null ? void 0 : l.tls_verify) !== null && (l == null ? void 0 : l.tls_verify) !== void 0, e.fields.tls_verify_value = e.fields.tls_verify_enabled && (l == null ? void 0 : l.tls_verify), e.fields.tags = (n = l == null ? void 0 : l.tags) != null && n.length ? l.tags.join(", ") : "", Object.assign(_, e.fields), c("update", m == null ? void 0 : m.data);
864
+ e.isReadonly = !0, Q();
865
+ const a = q.value;
866
+ Z(a);
867
+ let f;
868
+ if (await b.post(Y.value, a), F.value === "create" ? f = await b.post(K.value, a) : F.value === "edit" && (f = ((t = r.config) == null ? void 0 : t.app) === "konnect" ? await b.put(K.value, a) : await b.patch(K.value, a)), f) {
869
+ const { data: l } = f;
870
+ e.fields.name = (l == null ? void 0 : l.name) || "", e.fields.port = l.port || H.getPortFromProtocol(l.protocol), e.fields.protocol = (l == null ? void 0 : l.protocol) || "http", e.fields.host = (l == null ? void 0 : l.host) || "", e.fields.path = (l == null ? void 0 : l.path) || "", e.fields.url = (l == null ? void 0 : l.url) || "", e.fields.retries = l != null && l.retries || (l == null ? void 0 : l.retries) === 0 ? l == null ? void 0 : l.retries : 5, e.fields.connect_timeout = l != null && l.connect_timeout || (l == null ? void 0 : l.connect_timeout) === 0 ? l == null ? void 0 : l.connect_timeout : 6e4, e.fields.write_timeout = l != null && l.write_timeout || (l == null ? void 0 : l.write_timeout) === 0 ? l == null ? void 0 : l.write_timeout : 6e4, e.fields.read_timeout = l != null && l.read_timeout || (l == null ? void 0 : l.read_timeout) === 0 ? l == null ? void 0 : l.read_timeout : 6e4, e.fields.client_certificate = ((i = l == null ? void 0 : l.client_certificate) == null ? void 0 : i.id) || "", e.fields.ca_certificates = (y = l == null ? void 0 : l.ca_certificates) != null && y.length ? l == null ? void 0 : l.ca_certificates.join(",") : "", e.fields.tls_verify_enabled = (l == null ? void 0 : l.tls_verify) !== "" && (l == null ? void 0 : l.tls_verify) !== null && (l == null ? void 0 : l.tls_verify) !== void 0, e.fields.tls_verify_value = e.fields.tls_verify_enabled && (l == null ? void 0 : l.tls_verify), e.fields.tags = (U = l == null ? void 0 : l.tags) != null && U.length ? l.tags.join(", ") : "", Object.assign(g, e.fields), d("update", f == null ? void 0 : f.data);
871
871
  }
872
- return m;
873
- } catch (f) {
874
- e.errorMessage = P(f), c("error", f);
872
+ return f;
873
+ } catch (a) {
874
+ e.errorMessage = T(a), d("error", a);
875
875
  } finally {
876
876
  e.isReadonly = !1;
877
877
  }
878
878
  };
879
- return Ce(() => r.gatewayServiceId, () => {
880
- Object.assign(e.fields, _);
881
- }), Ce(e.fields, (t) => {
882
- e.fields.port = H.getPortFromProtocol(t.protocol, String(t.port)), c("model-updated", q.value);
883
- }), Be(() => {
884
- c("model-updated", q.value);
879
+ return Ve(() => r.gatewayServiceId, () => {
880
+ Object.assign(e.fields, g);
881
+ }), Ve(e.fields, (t) => {
882
+ e.fields.port = H.getPortFromProtocol(t.protocol, String(t.port)), d("model-updated", q.value);
883
+ }), Ge(() => {
884
+ d("model-updated", q.value);
885
885
  }), $({
886
- validateUrl: oe,
886
+ validateUrl: Q,
887
887
  getPayload: q,
888
- saveFormData: j,
889
- canSubmit: Y,
890
- initForm: R
888
+ saveFormData: ee,
889
+ canSubmit: X,
890
+ initForm: ae
891
891
  }), (t, i) => {
892
- const y = M("KInput"), n = M("KLabel"), f = M("KRadio"), m = M("KSelect"), l = M("KCheckbox"), A = M("KCollapse");
893
- return k(), I("div", yt, [
894
- u(o(et), {
895
- "can-submit": Y.value,
896
- config: a.config,
897
- "edit-id": a.gatewayServiceId,
898
- "entity-type": o(Ee).GatewayService,
892
+ const y = R("KInput"), U = R("KLabel"), a = R("KRadio"), f = R("KSelect"), l = R("KCheckbox"), C = R("KCollapse");
893
+ return w(), I("div", _t, [
894
+ u(o(tt), {
895
+ "can-submit": X.value,
896
+ config: n.config,
897
+ "edit-id": n.gatewayServiceId,
898
+ "entity-type": o(Re).GatewayService,
899
899
  "error-message": e.errorMessage,
900
- "fetch-url": pe.value,
900
+ "fetch-url": ve.value,
901
901
  "form-fields": q.value,
902
902
  "is-readonly": e.isReadonly,
903
- onCancel: O,
904
- "onFetch:error": i[25] || (i[25] = (d) => t.$emit("error", d)),
905
- "onFetch:success": R,
906
- onLoading: i[26] || (i[26] = (d) => t.$emit("loading", d)),
907
- onSubmit: j
903
+ onCancel: A,
904
+ "onFetch:error": i[25] || (i[25] = (c) => t.$emit("error", c)),
905
+ "onFetch:success": ae,
906
+ onLoading: i[26] || (i[26] = (c) => t.$emit("loading", c)),
907
+ onSubmit: ee
908
908
  }, {
909
909
  "form-actions": p(() => [
910
- Le(t.$slots, "form-actions", {
911
- canSubmit: Y.value,
912
- cancel: O,
913
- submit: j
910
+ Ke(t.$slots, "form-actions", {
911
+ canSubmit: X.value,
912
+ cancel: A,
913
+ submit: ee
914
914
  }, void 0, !0)
915
915
  ]),
916
916
  default: p(() => [
917
- u(o(Te), {
917
+ u(o(Ue), {
918
918
  description: o(s)("gateway_services.form.sections.general.description"),
919
- "hide-info-header": a.hideSectionsInfo,
919
+ "hide-info-header": n.hideSectionsInfo,
920
920
  title: o(s)("gateway_services.form.sections.general.title")
921
921
  }, {
922
922
  default: p(() => [
923
923
  u(y, {
924
924
  modelValue: e.fields.name,
925
- "onUpdate:modelValue": i[0] || (i[0] = (d) => e.fields.name = d),
925
+ "onUpdate:modelValue": i[0] || (i[0] = (c) => e.fields.name = c),
926
926
  modelModifiers: { trim: !0 },
927
927
  autocomplete: "off",
928
928
  "data-testid": "gateway-service-name-input",
929
- error: ve.value,
929
+ error: ge.value,
930
930
  "error-message": J.value,
931
931
  label: o(s)("gateway_services.form.fields.name.label"),
932
932
  "label-attributes": {
@@ -937,11 +937,11 @@ const ue = {
937
937
  placeholder: o(s)("gateway_services.form.fields.name.placeholder"),
938
938
  readonly: e.isReadonly,
939
939
  type: "text",
940
- onInput: he
940
+ onInput: ke
941
941
  }, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder", "readonly"]),
942
942
  u(y, {
943
943
  modelValue: e.fields.tags,
944
- "onUpdate:modelValue": i[1] || (i[1] = (d) => e.fields.tags = d),
944
+ "onUpdate:modelValue": i[1] || (i[1] = (c) => e.fields.tags = c),
945
945
  modelModifiers: { trim: !0 },
946
946
  autocomplete: "off",
947
947
  "data-testid": "gateway-service-tags-input",
@@ -959,72 +959,72 @@ const ue = {
959
959
  ]),
960
960
  _: 1
961
961
  }, 8, ["description", "hide-info-header", "title"]),
962
- u(o(Te), {
962
+ u(o(Ue), {
963
963
  description: o(s)("gateway_services.form.sections.keys.description"),
964
- "hide-info-header": a.hideSectionsInfo,
964
+ "hide-info-header": n.hideSectionsInfo,
965
965
  title: o(s)("gateway_services.form.sections.keys.title")
966
966
  }, {
967
967
  default: p(() => [
968
- D.value ? B("", !0) : (k(), I("div", _t, [
969
- V("div", bt, [
970
- u(n, { required: "" }, {
968
+ D.value ? L("", !0) : (w(), I("div", bt, [
969
+ S("div", ht, [
970
+ u(U, { required: "" }, {
971
971
  default: p(() => [
972
- U(b(o(s)("gateway_services.form.sections.keys.checkedGroupLabel")), 1)
972
+ E(_(o(s)("gateway_services.form.sections.keys.checkedGroupLabel")), 1)
973
973
  ]),
974
974
  _: 1
975
975
  })
976
976
  ]),
977
- V("div", ht, [
978
- u(f, {
979
- modelValue: C.value,
980
- "onUpdate:modelValue": i[2] || (i[2] = (d) => C.value = d),
977
+ S("div", wt, [
978
+ u(a, {
979
+ modelValue: k.value,
980
+ "onUpdate:modelValue": i[2] || (i[2] = (c) => k.value = c),
981
981
  "data-testid": "gateway-service-url-radio",
982
- "selected-value": T.url,
983
- onChange: X
982
+ "selected-value": j.url,
983
+ onChange: se
984
984
  }, {
985
985
  default: p(() => [
986
- U(b(o(s)("gateway_services.form.sections.keys.urlLabel")), 1)
986
+ E(_(o(s)("gateway_services.form.sections.keys.urlLabel")), 1)
987
987
  ]),
988
988
  _: 1
989
989
  }, 8, ["modelValue", "selected-value"])
990
990
  ]),
991
- C.value === "url" ? (k(), I("div", wt, [
991
+ k.value === "url" ? (w(), I("div", kt, [
992
992
  u(y, {
993
993
  modelValue: e.fields.url,
994
- "onUpdate:modelValue": i[3] || (i[3] = (d) => e.fields.url = d),
994
+ "onUpdate:modelValue": i[3] || (i[3] = (c) => e.fields.url = c),
995
995
  modelModifiers: { trim: !0 },
996
996
  class: "gateway-service-url-input gateway-service-form-margin-bottom",
997
997
  "data-testid": "gateway-service-url-input",
998
998
  label: o(s)("gateway_services.form.fields.upstream_url.label"),
999
999
  "label-attributes": {
1000
- info: a.config.app === "konnect" ? o(s)("gateway_services.form.fields.upstream_url.tooltip_for_konnect") : o(s)("gateway_services.form.fields.upstream_url.tooltip_for_km"),
1000
+ info: n.config.app === "konnect" ? o(s)("gateway_services.form.fields.upstream_url.tooltip_for_konnect") : o(s)("gateway_services.form.fields.upstream_url.tooltip_for_km"),
1001
1001
  tooltipAttributes: { maxWidth: "400" }
1002
1002
  },
1003
1003
  name: "url",
1004
1004
  placeholder: o(s)("gateway_services.form.fields.upstream_url.placeholder"),
1005
1005
  required: ""
1006
1006
  }, null, 8, ["modelValue", "label", "label-attributes", "placeholder"])
1007
- ])) : B("", !0),
1008
- u(f, {
1009
- modelValue: C.value,
1010
- "onUpdate:modelValue": i[4] || (i[4] = (d) => C.value = d),
1007
+ ])) : L("", !0),
1008
+ u(a, {
1009
+ modelValue: k.value,
1010
+ "onUpdate:modelValue": i[4] || (i[4] = (c) => k.value = c),
1011
1011
  "checked-group": "protocol",
1012
1012
  "data-testid": "gateway-service-protocol-radio",
1013
- "selected-value": T.protocol,
1014
- onChange: X
1013
+ "selected-value": j.protocol,
1014
+ onChange: se
1015
1015
  }, {
1016
1016
  default: p(() => [
1017
- U(b(o(s)("gateway_services.form.sections.keys.checkedGroupAltLabel")), 1)
1017
+ E(_(o(s)("gateway_services.form.sections.keys.checkedGroupAltLabel")), 1)
1018
1018
  ]),
1019
1019
  _: 1
1020
1020
  }, 8, ["modelValue", "selected-value"])
1021
1021
  ])),
1022
- C.value === "protocol" || D.value ? (k(), I("div", kt, [
1023
- u(m, {
1022
+ k.value === "protocol" || D.value ? (w(), I("div", Ct, [
1023
+ u(f, {
1024
1024
  modelValue: e.fields.protocol,
1025
- "onUpdate:modelValue": i[5] || (i[5] = (d) => e.fields.protocol = d),
1025
+ "onUpdate:modelValue": i[5] || (i[5] = (c) => e.fields.protocol = c),
1026
1026
  "data-testid": "gateway-service-protocol-select",
1027
- items: z,
1027
+ items: _e,
1028
1028
  label: o(s)("gateway_services.form.fields.protocol.label"),
1029
1029
  "label-attributes": {
1030
1030
  info: o(s)("gateway_services.form.fields.protocol.tooltip"),
@@ -1033,11 +1033,11 @@ const ue = {
1033
1033
  readonly: e.isReadonly,
1034
1034
  required: "",
1035
1035
  width: "100%",
1036
- onSelected: i[6] || (i[6] = (d) => Q(e.fields.protocol, d))
1036
+ onSelected: i[6] || (i[6] = (c) => P(e.fields.protocol, c))
1037
1037
  }, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
1038
1038
  u(y, {
1039
1039
  modelValue: e.fields.host,
1040
- "onUpdate:modelValue": i[7] || (i[7] = (d) => e.fields.host = d),
1040
+ "onUpdate:modelValue": i[7] || (i[7] = (c) => e.fields.host = c),
1041
1041
  modelModifiers: { trim: !0 },
1042
1042
  class: "gateway-service-form-margin-top",
1043
1043
  "data-testid": "gateway-service-host-input",
@@ -1050,10 +1050,10 @@ const ue = {
1050
1050
  placeholder: o(s)("gateway_services.form.fields.host.placeholder"),
1051
1051
  required: ""
1052
1052
  }, null, 8, ["modelValue", "label", "label-attributes", "placeholder"]),
1053
- ie.value ? (k(), I("div", Ct, [
1053
+ re.value ? (w(), I("div", Vt, [
1054
1054
  u(y, {
1055
1055
  modelValue: e.fields.path,
1056
- "onUpdate:modelValue": i[8] || (i[8] = (d) => e.fields.path = d),
1056
+ "onUpdate:modelValue": i[8] || (i[8] = (c) => e.fields.path = c),
1057
1057
  modelModifiers: { trim: !0 },
1058
1058
  class: "gateway-service-form-margin-top",
1059
1059
  "data-testid": "gateway-service-path-input",
@@ -1065,13 +1065,13 @@ const ue = {
1065
1065
  name: "path",
1066
1066
  placeholder: o(s)("gateway_services.form.fields.path.placeholder")
1067
1067
  }, null, 8, ["modelValue", "label", "label-attributes", "placeholder"])
1068
- ])) : B("", !0),
1068
+ ])) : L("", !0),
1069
1069
  u(y, {
1070
1070
  modelValue: e.fields.port,
1071
1071
  "onUpdate:modelValue": [
1072
- i[9] || (i[9] = (d) => e.fields.port = d),
1072
+ i[9] || (i[9] = (c) => e.fields.port = c),
1073
1073
  i[10] || (i[10] = () => {
1074
- e.fields.port = G(e.fields.port + "");
1074
+ e.fields.port = B(e.fields.port + "");
1075
1075
  })
1076
1076
  ],
1077
1077
  class: "gateway-service-form-margin-top",
@@ -1084,23 +1084,23 @@ const ue = {
1084
1084
  name: "port",
1085
1085
  type: "number"
1086
1086
  }, null, 8, ["modelValue", "label", "label-attributes"])
1087
- ])) : B("", !0),
1088
- u(A, {
1087
+ ])) : L("", !0),
1088
+ u(C, {
1089
1089
  modelValue: x.value,
1090
- "onUpdate:modelValue": i[24] || (i[24] = (d) => x.value = d),
1090
+ "onUpdate:modelValue": i[24] || (i[24] = (c) => x.value = c),
1091
1091
  "data-testid": "advanced-fields-collapse",
1092
1092
  "trigger-alignment": "leading",
1093
1093
  "trigger-label": o(s)("gateway_services.form.sections.keys.viewAdvancedFields")
1094
1094
  }, {
1095
1095
  default: p(() => [
1096
- V("div", Vt, [
1097
- V("div", St, [
1096
+ S("div", St, [
1097
+ S("div", It, [
1098
1098
  u(y, {
1099
1099
  modelValue: e.fields.retries,
1100
1100
  "onUpdate:modelValue": [
1101
- i[11] || (i[11] = (d) => e.fields.retries = d),
1101
+ i[11] || (i[11] = (c) => e.fields.retries = c),
1102
1102
  i[12] || (i[12] = () => {
1103
- e.fields.retries = G(e.fields.retries + "");
1103
+ e.fields.retries = B(e.fields.retries + "");
1104
1104
  })
1105
1105
  ],
1106
1106
  autocomplete: "off",
@@ -1115,13 +1115,13 @@ const ue = {
1115
1115
  type: "number"
1116
1116
  }, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
1117
1117
  ]),
1118
- V("div", It, [
1118
+ S("div", Tt, [
1119
1119
  u(y, {
1120
1120
  modelValue: e.fields.connect_timeout,
1121
1121
  "onUpdate:modelValue": [
1122
- i[13] || (i[13] = (d) => e.fields.connect_timeout = d),
1122
+ i[13] || (i[13] = (c) => e.fields.connect_timeout = c),
1123
1123
  i[14] || (i[14] = () => {
1124
- e.fields.connect_timeout = G(e.fields.connect_timeout + "");
1124
+ e.fields.connect_timeout = B(e.fields.connect_timeout + "");
1125
1125
  })
1126
1126
  ],
1127
1127
  autocomplete: "off",
@@ -1136,13 +1136,13 @@ const ue = {
1136
1136
  type: "number"
1137
1137
  }, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
1138
1138
  ]),
1139
- V("div", Tt, [
1139
+ S("div", Pt, [
1140
1140
  u(y, {
1141
1141
  modelValue: e.fields.write_timeout,
1142
1142
  "onUpdate:modelValue": [
1143
- i[15] || (i[15] = (d) => e.fields.write_timeout = d),
1143
+ i[15] || (i[15] = (c) => e.fields.write_timeout = c),
1144
1144
  i[16] || (i[16] = () => {
1145
- e.fields.write_timeout = G(e.fields.write_timeout + "");
1145
+ e.fields.write_timeout = B(e.fields.write_timeout + "");
1146
1146
  })
1147
1147
  ],
1148
1148
  autocomplete: "off",
@@ -1157,13 +1157,13 @@ const ue = {
1157
1157
  type: "number"
1158
1158
  }, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
1159
1159
  ]),
1160
- V("div", Pt, [
1160
+ S("div", Ut, [
1161
1161
  u(y, {
1162
1162
  modelValue: e.fields.read_timeout,
1163
1163
  "onUpdate:modelValue": [
1164
- i[17] || (i[17] = (d) => e.fields.read_timeout = d),
1164
+ i[17] || (i[17] = (c) => e.fields.read_timeout = c),
1165
1165
  i[18] || (i[18] = () => {
1166
- e.fields.read_timeout = G(e.fields.read_timeout + "");
1166
+ e.fields.read_timeout = B(e.fields.read_timeout + "");
1167
1167
  })
1168
1168
  ],
1169
1169
  autocomplete: "off",
@@ -1178,10 +1178,10 @@ const ue = {
1178
1178
  type: "number"
1179
1179
  }, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
1180
1180
  ]),
1181
- ye.value ? (k(), I("div", Ut, [
1181
+ be.value ? (w(), I("div", Et, [
1182
1182
  u(y, {
1183
1183
  modelValue: e.fields.client_certificate,
1184
- "onUpdate:modelValue": i[19] || (i[19] = (d) => e.fields.client_certificate = d),
1184
+ "onUpdate:modelValue": i[19] || (i[19] = (c) => e.fields.client_certificate = c),
1185
1185
  modelModifiers: { trim: !0 },
1186
1186
  autocomplete: "off",
1187
1187
  "data-testid": "gateway-service-clientCert-input",
@@ -1195,11 +1195,11 @@ const ue = {
1195
1195
  readonly: e.isReadonly,
1196
1196
  type: "text"
1197
1197
  }, null, 8, ["modelValue", "label", "label-attributes", "placeholder", "readonly"])
1198
- ])) : B("", !0),
1199
- _e.value ? (k(), I("div", Et, [
1198
+ ])) : L("", !0),
1199
+ he.value ? (w(), I("div", Mt, [
1200
1200
  u(y, {
1201
1201
  modelValue: e.fields.ca_certificates,
1202
- "onUpdate:modelValue": i[20] || (i[20] = (d) => e.fields.ca_certificates = d),
1202
+ "onUpdate:modelValue": i[20] || (i[20] = (c) => e.fields.ca_certificates = c),
1203
1203
  modelModifiers: { trim: !0 },
1204
1204
  autocomplete: "off",
1205
1205
  "data-testid": "gateway-service-ca-certs-input",
@@ -1210,63 +1210,63 @@ const ue = {
1210
1210
  type: "text"
1211
1211
  }, {
1212
1212
  "label-tooltip": p(() => [
1213
- u(o(L), {
1213
+ u(o(G), {
1214
1214
  keypath: "gateway_services.form.fields.ca_certificates.tooltip",
1215
1215
  scope: "global"
1216
1216
  }, {
1217
1217
  code1: p(() => [
1218
- V("code", null, b(o(s)("gateway_services.form.fields.ca_certificates.code1")), 1)
1218
+ S("code", null, _(o(s)("gateway_services.form.fields.ca_certificates.code1")), 1)
1219
1219
  ]),
1220
1220
  code2: p(() => [
1221
- V("code", null, b(o(s)("gateway_services.form.fields.ca_certificates.code2")), 1)
1221
+ S("code", null, _(o(s)("gateway_services.form.fields.ca_certificates.code2")), 1)
1222
1222
  ]),
1223
1223
  _: 1
1224
1224
  })
1225
1225
  ]),
1226
1226
  _: 1
1227
1227
  }, 8, ["modelValue", "label", "placeholder", "readonly"])
1228
- ])) : B("", !0),
1229
- be.value ? (k(), I("div", Mt, [
1228
+ ])) : L("", !0),
1229
+ we.value ? (w(), I("div", Rt, [
1230
1230
  u(l, {
1231
1231
  modelValue: e.fields.tls_verify_enabled,
1232
- "onUpdate:modelValue": i[21] || (i[21] = (d) => e.fields.tls_verify_enabled = d),
1232
+ "onUpdate:modelValue": i[21] || (i[21] = (c) => e.fields.tls_verify_enabled = c),
1233
1233
  "data-testid": "gateway-service-tls-verify-checkbox",
1234
1234
  description: o(s)("gateway_services.form.fields.tls_verify_enabled.help"),
1235
1235
  label: o(s)("gateway_services.form.fields.tls_verify_enabled.label"),
1236
1236
  "label-attributes": { tooltipAttributes: { maxWidth: "400" } }
1237
1237
  }, {
1238
1238
  tooltip: p(() => [
1239
- u(o(L), {
1239
+ u(o(G), {
1240
1240
  keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
1241
1241
  scope: "global"
1242
1242
  }, {
1243
1243
  code1: p(() => [
1244
- V("code", null, b(o(s)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
1244
+ S("code", null, _(o(s)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
1245
1245
  ]),
1246
1246
  _: 1
1247
1247
  })
1248
1248
  ]),
1249
1249
  _: 1
1250
1250
  }, 8, ["modelValue", "description", "label"]),
1251
- e.fields.tls_verify_enabled ? (k(), I("div", xt, [
1252
- u(f, {
1251
+ e.fields.tls_verify_enabled ? (w(), I("div", xt, [
1252
+ u(a, {
1253
1253
  modelValue: e.fields.tls_verify_value,
1254
- "onUpdate:modelValue": i[22] || (i[22] = (d) => e.fields.tls_verify_value = d),
1254
+ "onUpdate:modelValue": i[22] || (i[22] = (c) => e.fields.tls_verify_value = c),
1255
1255
  "data-testid": "gateway-service-tls-verify-true-option",
1256
1256
  label: o(s)("gateway_services.form.fields.tls_verify_option.true.label"),
1257
1257
  "selected-value": !0
1258
1258
  }, null, 8, ["modelValue", "label"])
1259
- ])) : B("", !0),
1260
- e.fields.tls_verify_enabled ? (k(), I("div", Rt, [
1261
- u(f, {
1259
+ ])) : L("", !0),
1260
+ e.fields.tls_verify_enabled ? (w(), I("div", At, [
1261
+ u(a, {
1262
1262
  modelValue: e.fields.tls_verify_value,
1263
- "onUpdate:modelValue": i[23] || (i[23] = (d) => e.fields.tls_verify_value = d),
1263
+ "onUpdate:modelValue": i[23] || (i[23] = (c) => e.fields.tls_verify_value = c),
1264
1264
  "data-testid": "gateway-service-tls-verify-false-option",
1265
1265
  label: o(s)("gateway_services.form.fields.tls_verify_option.false.label"),
1266
1266
  "selected-value": !1
1267
1267
  }, null, 8, ["modelValue", "label"])
1268
- ])) : B("", !0)
1269
- ])) : B("", !0)
1268
+ ])) : L("", !0)
1269
+ ])) : L("", !0)
1270
1270
  ])
1271
1271
  ]),
1272
1272
  _: 1
@@ -1280,14 +1280,14 @@ const ue = {
1280
1280
  ]);
1281
1281
  };
1282
1282
  }
1283
- }), qt = /* @__PURE__ */ Me(At, [["__scopeId", "data-v-35e0db56"]]), Ft = { class: "kong-ui-gateway-service-entity-config-card" }, Nt = /* @__PURE__ */ Ve({
1283
+ }), Nt = /* @__PURE__ */ xe(Ft, [["__scopeId", "data-v-35e0db56"]]), $t = { class: "kong-ui-gateway-service-entity-config-card" }, Wt = /* @__PURE__ */ Se({
1284
1284
  __name: "GatewayServiceConfigCard",
1285
1285
  props: {
1286
1286
  /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
1287
1287
  config: {
1288
1288
  type: Object,
1289
1289
  required: !0,
1290
- validator: (a) => !(!a || !["konnect", "kongManager"].includes(a == null ? void 0 : a.app) || a.app === "konnect" && !a.controlPlaneId || a.app === "kongManager" && typeof a.workspace != "string" || !a.entityId)
1290
+ 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.entityId)
1291
1291
  },
1292
1292
  /**
1293
1293
  * External link for documentation that determines visibility of Documentation button
@@ -1306,123 +1306,123 @@ const ue = {
1306
1306
  }
1307
1307
  },
1308
1308
  emits: ["loading", "fetch:error", "fetch:success"],
1309
- setup(a) {
1310
- const $ = a, { i18n: { t: v }, i18nT: c } = ue.useI18n(), r = w(() => le.form[$.config.app].edit), { getPropValue: x } = tt(), W = (s, P) => x(s, P) === !0 ? v("gateway_services.form.fields.tls_verify_option.true.display") : v("gateway_services.form.fields.tls_verify_option.false.display"), L = S({
1309
+ setup(n) {
1310
+ const $ = n, { i18n: { t: m }, i18nT: d } = pe.useI18n(), r = h(() => ie.form[$.config.app].edit), { getPropValue: x } = lt(), O = (s, T) => x(s, T) === !0 ? m("gateway_services.form.fields.tls_verify_option.true.display") : m("gateway_services.form.fields.tls_verify_option.false.display"), G = V({
1311
1311
  id: {},
1312
1312
  name: {
1313
- tooltip: v("gateway_services.form.fields.name.tooltip")
1313
+ tooltip: m("gateway_services.form.fields.name.tooltip")
1314
1314
  },
1315
1315
  enabled: {},
1316
1316
  updated_at: {},
1317
1317
  created_at: {},
1318
1318
  protocol: {
1319
- section: ne.Basic,
1320
- tooltip: v("gateway_services.form.fields.protocol.tooltip")
1319
+ section: de.Basic,
1320
+ tooltip: m("gateway_services.form.fields.protocol.tooltip")
1321
1321
  },
1322
1322
  host: {
1323
- section: ne.Basic,
1324
- tooltip: v("gateway_services.form.fields.host.tooltip")
1323
+ section: de.Basic,
1324
+ tooltip: m("gateway_services.form.fields.host.tooltip")
1325
1325
  },
1326
1326
  path: {
1327
- section: ne.Basic,
1328
- tooltip: v("gateway_services.form.fields.path.tooltip")
1327
+ section: de.Basic,
1328
+ tooltip: m("gateway_services.form.fields.path.tooltip")
1329
1329
  },
1330
1330
  port: {
1331
- section: ne.Basic,
1332
- tooltip: v("gateway_services.form.fields.port.tooltip")
1331
+ section: de.Basic,
1332
+ tooltip: m("gateway_services.form.fields.port.tooltip")
1333
1333
  },
1334
1334
  tags: {
1335
- tooltip: v("gateway_services.form.fields.tags.tooltip")
1335
+ tooltip: m("gateway_services.form.fields.tags.tooltip")
1336
1336
  },
1337
1337
  // advanced fields
1338
1338
  retries: {
1339
1339
  order: 1,
1340
- tooltip: v("gateway_services.form.fields.retries.tooltip")
1340
+ tooltip: m("gateway_services.form.fields.retries.tooltip")
1341
1341
  },
1342
1342
  connect_timeout: {
1343
1343
  order: 2,
1344
- tooltip: v("gateway_services.form.fields.connect_timeout.tooltip")
1344
+ tooltip: m("gateway_services.form.fields.connect_timeout.tooltip")
1345
1345
  },
1346
1346
  write_timeout: {
1347
1347
  order: 3,
1348
- tooltip: v("gateway_services.form.fields.write_timeout.tooltip")
1348
+ tooltip: m("gateway_services.form.fields.write_timeout.tooltip")
1349
1349
  },
1350
1350
  read_timeout: {
1351
1351
  order: 4,
1352
- tooltip: v("gateway_services.form.fields.read_timeout.tooltip")
1352
+ tooltip: m("gateway_services.form.fields.read_timeout.tooltip")
1353
1353
  },
1354
1354
  client_certificate: {
1355
1355
  order: 5,
1356
- tooltip: v("gateway_services.form.fields.client_certificate.tooltip")
1356
+ tooltip: m("gateway_services.form.fields.client_certificate.tooltip")
1357
1357
  },
1358
1358
  ca_certificates: {
1359
- type: lt.BadgeTag,
1360
- label: v("gateway_services.form.fields.ca_certificates.label"),
1359
+ type: ot.BadgeTag,
1360
+ label: m("gateway_services.form.fields.ca_certificates.label"),
1361
1361
  order: 6
1362
1362
  },
1363
1363
  tls_verify: {
1364
- label: v("gateway_services.form.fields.tls_verify_enabled.label")
1364
+ label: m("gateway_services.form.fields.tls_verify_enabled.label")
1365
1365
  },
1366
1366
  tls_verify_depth: {
1367
1367
  hidden: !0
1368
1368
  }
1369
1369
  });
1370
- return (s, P) => (k(), I("div", Ft, [
1371
- u(o(ot), {
1372
- config: a.config,
1373
- "config-card-doc": a.configCardDoc,
1374
- "config-schema": L.value,
1375
- "entity-type": o(Ee).GatewayService,
1370
+ return (s, T) => (w(), I("div", $t, [
1371
+ u(o(it), {
1372
+ config: n.config,
1373
+ "config-card-doc": n.configCardDoc,
1374
+ "config-schema": G.value,
1375
+ "entity-type": o(Re).GatewayService,
1376
1376
  "fetch-url": r.value,
1377
- "hide-title": a.hideTitle,
1378
- "onFetch:error": P[0] || (P[0] = (h) => s.$emit("fetch:error", h)),
1379
- "onFetch:success": P[1] || (P[1] = (h) => s.$emit("fetch:success", h)),
1380
- onLoading: P[2] || (P[2] = (h) => s.$emit("loading", h))
1377
+ "hide-title": n.hideTitle,
1378
+ "onFetch:error": T[0] || (T[0] = (b) => s.$emit("fetch:error", b)),
1379
+ "onFetch:success": T[1] || (T[1] = (b) => s.$emit("fetch:success", b)),
1380
+ onLoading: T[2] || (T[2] = (b) => s.$emit("loading", b))
1381
1381
  }, {
1382
1382
  "enabled-label-tooltip": p(() => [
1383
- u(o(c), {
1383
+ u(o(d), {
1384
1384
  keypath: "gateway_services.form.fields.enabled.tooltip",
1385
1385
  scope: "global"
1386
1386
  }, {
1387
1387
  false: p(() => [
1388
- V("code", null, b(o(v)("gateway_services.form.fields.enabled.false")), 1)
1388
+ S("code", null, _(o(m)("gateway_services.form.fields.enabled.false")), 1)
1389
1389
  ]),
1390
1390
  true: p(() => [
1391
- V("code", null, b(o(v)("gateway_services.form.fields.enabled.true")), 1)
1391
+ S("code", null, _(o(m)("gateway_services.form.fields.enabled.true")), 1)
1392
1392
  ]),
1393
1393
  _: 1
1394
1394
  })
1395
1395
  ]),
1396
1396
  "ca_certificates-label-tooltip": p(() => [
1397
- u(o(c), {
1397
+ u(o(d), {
1398
1398
  keypath: "gateway_services.form.fields.ca_certificates.tooltip",
1399
1399
  scope: "global"
1400
1400
  }, {
1401
1401
  code1: p(() => [
1402
- V("code", null, b(o(v)("gateway_services.form.fields.ca_certificates.code1")), 1)
1402
+ S("code", null, _(o(m)("gateway_services.form.fields.ca_certificates.code1")), 1)
1403
1403
  ]),
1404
1404
  code2: p(() => [
1405
- V("code", null, b(o(v)("gateway_services.form.fields.ca_certificates.code2")), 1)
1405
+ S("code", null, _(o(m)("gateway_services.form.fields.ca_certificates.code2")), 1)
1406
1406
  ]),
1407
1407
  _: 1
1408
1408
  })
1409
1409
  ]),
1410
1410
  "tls_verify-label-tooltip": p(() => [
1411
- u(o(c), {
1411
+ u(o(d), {
1412
1412
  keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
1413
1413
  scope: "global"
1414
1414
  }, {
1415
1415
  code1: p(() => [
1416
- V("code", null, b(o(v)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
1416
+ S("code", null, _(o(m)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
1417
1417
  ]),
1418
1418
  _: 1
1419
1419
  })
1420
1420
  ]),
1421
- tls_verify: p((h) => [
1422
- U(b(typeof o(x)("rowValue", h) == "boolean" ? W("rowValue", h) : o(v)("gateway_services.form.fields.tls_verify_option.unset.display")), 1)
1421
+ tls_verify: p((b) => [
1422
+ E(_(typeof o(x)("rowValue", b) == "boolean" ? O("rowValue", b) : o(m)("gateway_services.form.fields.tls_verify_option.unset.display")), 1)
1423
1423
  ]),
1424
- client_certificate: p((h) => [
1425
- U(b(o(x)("rowValue", h) ? o(x)("rowValue", h).id : "–"), 1)
1424
+ client_certificate: p((b) => [
1425
+ E(_(o(x)("rowValue", b) ? o(x)("rowValue", b).id : "–"), 1)
1426
1426
  ]),
1427
1427
  _: 1
1428
1428
  }, 8, ["config", "config-card-doc", "config-schema", "entity-type", "fetch-url", "hide-title"])
@@ -1430,7 +1430,7 @@ const ue = {
1430
1430
  }
1431
1431
  });
1432
1432
  export {
1433
- Nt as GatewayServiceConfigCard,
1434
- qt as GatewayServiceForm,
1435
- Kt as GatewayServiceList
1433
+ Wt as GatewayServiceConfigCard,
1434
+ Nt as GatewayServiceForm,
1435
+ qt as GatewayServiceList
1436
1436
  };