@kong-ui-public/entities-gateway-services 3.12.1-pr.2300.8531d6ff9.0 → 3.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
- import { defineComponent as De, ref as R, computed as b, watch as Be, onBeforeMount as Ze, resolveComponent as L, createElementBlock as T, openBlock as V, createVNode as c, unref as o, createSlots as Ce, withCtx as d, createTextVNode as K, toDisplayString as k, createElementVNode as I, withModifiers as xe, createBlock as de, Teleport as Ke, createCommentVNode as D, reactive as Le, onMounted as Je, Transition as Me, Fragment as Qe, renderList as Xe, renderSlot as Ye } from "vue";
2
- import { useRouter as Oe } from "vue-router";
3
- import { BookIcon as qe, AddIcon as et, ServicesIcon as tt } from "@kong/icons";
1
+ import { defineComponent as De, ref as R, computed as b, watch as Be, onBeforeMount as ze, resolveComponent as L, createElementBlock as T, openBlock as E, createVNode as c, unref as o, createSlots as Se, withCtx as d, createTextVNode as K, toDisplayString as V, createElementVNode as S, withModifiers as xe, createBlock as Ee, Teleport as He, createCommentVNode as D, reactive as Ke, onMounted as Ze, Transition as Me, Fragment as Je, renderList as Qe, renderSlot as Xe } from "vue";
2
+ import { useRouter as Ge } from "vue-router";
3
+ import { BookIcon as Ye, AddIcon as et, ServicesIcon as tt } from "@kong/icons";
4
4
  import { createI18n as ot, i18nTComponent as rt } from "@kong-ui-public/i18n";
5
- import { useAxios as We, useTableState as it, useFetcher as lt, useDeleteUrlBuilder as st, FetcherStatus as at, EntityBaseTable as nt, PermissionsWrapper as ce, TableTags as ct, EntityFilter as dt, EntityEmptyState as ut, EntityToggleModal as ft, EntityDeleteModal as pt, EntityTypes as mt, useHelpers as je, ConfigurationSchemaType as vt, ConfigurationSchemaSection as we, EntityBaseConfigCard as gt, SupportedEntityType as ze, useErrors as yt, useValidators as _t, EntityBaseFormType as Ge, useGatewayFeatureSupported as ht, EntityBaseForm as bt, EntityFormSection as Ne } from "@kong-ui-public/entities-shared";
5
+ import { useAxios as Ne, useTableState as it, useFetcher as lt, useDeleteUrlBuilder as st, FetcherStatus as at, EntityBaseTable as nt, PermissionsWrapper as de, TableTags as ct, EntityFilter as dt, EntityEmptyState as ut, EntityToggleModal as ft, EntityDeleteModal as pt, EntityTypes as mt, useHelpers as Oe, ConfigurationSchemaType as vt, ConfigurationSchemaSection as ke, EntityBaseConfigCard as gt, SupportedEntityType as We, useErrors as yt, useValidators as _t, EntityBaseFormType as Le, useGatewayFeatureSupported as ht, EntityBaseForm as bt, EntityFormSection as qe } from "@kong-ui-public/entities-shared";
6
6
  const wt = {
7
7
  create: "New gateway service",
8
8
  serverless_create: "Add a Service",
@@ -252,51 +252,51 @@ function Ft() {
252
252
  };
253
253
  }
254
254
  function At() {
255
- const { i18n: { t: s } } = Y.useI18n();
255
+ const { i18n: { t: s } } = ee.useI18n();
256
256
  return {
257
- validateHost: (g) => {
258
- if (!g || g.trim() === "") return s("gateway_services.form.errors.host.empty");
259
- const $ = /^(?!:\/\/)([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?))*)(\.[a-zA-Z]{1,63})?$/;
260
- return /^((25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])$/.test(g) || $.test(g) ? "" : s("gateway_services.form.errors.host.invalid");
257
+ validateHost: (v) => {
258
+ if (!v || v.trim() === "") return s("gateway_services.form.errors.host.empty");
259
+ const A = /^(?!:\/\/)([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?))*)(\.[a-zA-Z]{1,63})?$/;
260
+ return /^((25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])$/.test(v) || A.test(v) ? "" : s("gateway_services.form.errors.host.invalid");
261
261
  },
262
- validateProtocol: (g, $) => !g || g.trim() === "" ? s("gateway_services.form.errors.protocol.empty") : (g = g.slice(0, -1), $.find((l) => {
263
- if (l.value === g) return l;
262
+ validateProtocol: (v, A) => !v || v.trim() === "" ? s("gateway_services.form.errors.protocol.empty") : (v = v.slice(0, -1), A.find((l) => {
263
+ if (l.value === v) return l;
264
264
  }) === void 0 ? s("gateway_services.form.errors.protocol.invalid") : ""),
265
- validatePath: (g) => !g || g === "" ? "" : g.startsWith("/") ? /[^A-Za-z0-9\-._~:/?#[\]@!$&'()*+,;=%]/.test(g) ? s("gateway_services.form.errors.path.invalid") : "" : s("gateway_services.form.errors.path.prefix"),
266
- validatePort: (g) => {
267
- if (g == null || g === "")
265
+ validatePath: (v) => !v || v === "" ? "" : v.startsWith("/") ? /[^A-Za-z0-9\-._~:/?#[\]@!$&'()*+,;=%]/.test(v) ? s("gateway_services.form.errors.path.invalid") : "" : s("gateway_services.form.errors.path.prefix"),
266
+ validatePort: (v) => {
267
+ if (v == null || v === "")
268
268
  return "";
269
- const $ = typeof g == "string" ? parseInt(g, 10) : g;
270
- return isNaN($) ? s("gateway_services.form.errors.port.type") : $ < 0 || $ > 65535 ? s("gateway_services.form.errors.port.invalid") : "";
269
+ const A = typeof v == "string" ? parseInt(v, 10) : v;
270
+ return isNaN(A) ? s("gateway_services.form.errors.port.type") : A < 0 || A > 65535 ? s("gateway_services.form.errors.port.invalid") : "";
271
271
  }
272
272
  };
273
273
  }
274
- const Y = {
274
+ const ee = {
275
275
  useI18n: Pt,
276
276
  usePortFromProtocol: Ft,
277
277
  useUrlValidators: At
278
- }, ke = "/v2/control-planes/{controlPlaneId}/core-entities", Ve = "/{workspace}", ue = {
278
+ }, Ve = "/v2/control-planes/{controlPlaneId}/core-entities", Ce = "/{workspace}", ue = {
279
279
  list: {
280
280
  konnect: {
281
- all: `${ke}/services`
281
+ all: `${Ve}/services`
282
282
  },
283
283
  kongManager: {
284
- all: `${Ve}/services`
284
+ all: `${Ce}/services`
285
285
  }
286
286
  },
287
287
  form: {
288
288
  konnect: {
289
- create: `${ke}/services`,
290
- validate: `${ke}/v1/schemas/json/service/validate`,
291
- edit: `${ke}/services/{id}`
292
- },
293
- kongManager: {
294
289
  create: `${Ve}/services`,
295
- validate: `${Ve}/schemas/services/validate`,
290
+ validate: `${Ve}/v1/schemas/json/service/validate`,
296
291
  edit: `${Ve}/services/{id}`
292
+ },
293
+ kongManager: {
294
+ create: `${Ce}/services`,
295
+ validate: `${Ce}/schemas/services/validate`,
296
+ edit: `${Ce}/services/{id}`
297
297
  }
298
298
  }
299
- }, $t = "#00abd2", Tt = "24px", Ut = { class: "kong-ui-entities-gateway-services-list" }, Rt = { class: "button-row" }, xt = { class: "empty-state-icon-gateway" }, Mt = { key: 1 }, Bt = /* @__PURE__ */ De({
299
+ }, Tt = "#00abd2", Ut = "24px", $t = { class: "kong-ui-entities-gateway-services-list" }, Rt = { class: "button-row" }, xt = { class: "empty-state-icon-gateway" }, Mt = { key: 1 }, Bt = /* @__PURE__ */ De({
300
300
  __name: "GatewayServiceList",
301
301
  props: {
302
302
  /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
@@ -343,20 +343,12 @@ const Y = {
343
343
  isServerless: {
344
344
  type: Boolean,
345
345
  default: !1
346
- },
347
- /**
348
- * Enables the new empty state design, this prop can be removed when
349
- * the khcp-14756-empty-states-m2 FF is removed.
350
- */
351
- enableV2EmptyStates: {
352
- type: Boolean,
353
- default: !1
354
346
  }
355
347
  },
356
348
  emits: ["error", "click:learn-more", "copy:success", "copy:error", "delete:success", "toggle:success"],
357
349
  setup(s, { emit: G }) {
358
- var oe;
359
- const m = G, n = s, { i18n: { t: a, formatUnixTimeStamp: g } } = Y.useI18n(), $ = Oe(), { axiosInstance: N } = We((oe = n.config) == null ? void 0 : oe.axiosRequestConfig), { hasRecords: l, handleStateChange: M } = it(() => B.value), P = b(() => l.value && n.config.app === "konnect"), Ee = b(() => !n.enableV2EmptyStates && n.config.app === "konnect"), fe = b(() => n.config.app !== "kongManager" || !!n.config.disableSorting), ie = {
350
+ var we;
351
+ const m = G, n = s, { i18n: { t: a, formatUnixTimeStamp: v } } = ee.useI18n(), A = Ge(), { axiosInstance: N } = Ne((we = n.config) == null ? void 0 : we.axiosRequestConfig), { hasRecords: l, handleStateChange: B } = it(() => z.value), I = b(() => l.value && n.config.app === "konnect"), Ie = b(() => n.config.app !== "kongManager" || !!n.config.disableSorting), le = {
360
352
  // the Name column is non-hidable
361
353
  name: { label: a("gateway_services.list.table_headers.name"), searchable: !0, sortable: !0, hidable: !1 },
362
354
  ...n.config.showControlPlaneColumn ? { control_plane: { label: a("gateway_services.list.table_headers.control_plane") } } : {},
@@ -368,71 +360,71 @@ const Y = {
368
360
  tags: { label: a("gateway_services.list.table_headers.tags"), sortable: !1 },
369
361
  updated_at: { label: a("gateway_services.list.table_headers.updated_at"), sortable: !0 },
370
362
  created_at: { label: a("gateway_services.list.table_headers.created_at"), sortable: !0 }
371
- }, pe = {
363
+ }, fe = {
372
364
  columnVisibility: {
373
365
  created_at: !1
374
366
  }
375
- }, Se = ie, ee = b(() => {
376
- var v, y;
367
+ }, pe = le, te = b(() => {
368
+ var g, y;
377
369
  let f = `${n.config.apiBaseUrl}${ue.list[n.config.app].all}`;
378
- return n.config.app === "konnect" ? f = f.replace(/{controlPlaneId}/gi, ((v = n.config) == null ? void 0 : v.controlPlaneId) || "") : n.config.app === "kongManager" && (f = f.replace(/\/{workspace}/gi, (y = n.config) != null && y.workspace ? `/${n.config.workspace}` : "")), f;
379
- }), Ie = b(() => n.config.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${ee.value}`) : new URL(ee.value)), B = R(""), Pe = b(() => {
370
+ return n.config.app === "konnect" ? f = f.replace(/{controlPlaneId}/gi, ((g = n.config) == null ? void 0 : g.controlPlaneId) || "") : n.config.app === "kongManager" && (f = f.replace(/\/{workspace}/gi, (y = n.config) != null && y.workspace ? `/${n.config.workspace}` : "")), f;
371
+ }), Pe = b(() => n.config.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${te.value}`) : new URL(te.value)), z = R(""), Z = b(() => {
380
372
  const f = n.config.app === "konnect" || n.config.isExactMatch;
381
373
  if (f)
382
374
  return {
383
375
  isExactMatch: f,
384
376
  placeholder: a(`search.placeholder.${n.config.app}`)
385
377
  };
386
- const { name: v, enabled: y, protocol: S, host: j, port: F, path: z } = ie;
378
+ const { name: g, enabled: y, protocol: P, host: W, port: M, path: j } = le;
387
379
  return {
388
380
  isExactMatch: f,
389
- fields: { name: v, enabled: y, protocol: S, host: j, port: F, path: z },
381
+ fields: { name: g, enabled: y, protocol: P, host: W, port: M, path: j },
390
382
  schema: n.config.filterSchema
391
383
  };
392
384
  }), {
393
- fetcher: H,
394
- fetcherState: E,
395
- fetcherCacheKey: Z
396
- } = lt(b(() => ({ ...n.config, cacheIdentifier: n.cacheIdentifier })), ee), le = () => {
397
- B.value = "";
398
- }, Fe = () => {
399
- Z.value++;
400
- }, e = R(null), C = b(() => ({
385
+ fetcher: Fe,
386
+ fetcherState: J,
387
+ fetcherCacheKey: C
388
+ } = lt(b(() => ({ ...n.config, cacheIdentifier: n.cacheIdentifier })), te), se = () => {
389
+ z.value = "";
390
+ }, ae = () => {
391
+ C.value++;
392
+ }, oe = R(null), e = b(() => ({
401
393
  ctaPath: n.config.createRoute,
402
- ctaText: ne.value ? n.isServerless ? a("actions.serverless_create") : a("actions.create") : void 0,
394
+ ctaText: ce.value ? n.isServerless ? a("actions.serverless_create") : a("actions.create") : void 0,
403
395
  message: `${a("gateway_services.list.empty_state.description")}${n.config.additionMessageForEmptyState ? ` ${n.config.additionMessageForEmptyState}` : ""}`,
404
- title: ne.value ? n.isServerless ? a("gateway_services.list.empty_state.serverless_title") : a("gateway_services.list.empty_state.title") : a("gateway_services.title")
405
- })), se = R(!1), U = R(null), te = b(() => {
396
+ title: ce.value ? n.isServerless ? a("gateway_services.list.empty_state.serverless_title") : a("gateway_services.list.empty_state.title") : a("gateway_services.title")
397
+ })), w = R(!1), x = R(null), re = b(() => {
406
398
  const f = {
407
399
  action: "disable",
408
400
  id: "",
409
401
  name: ""
410
402
  };
411
- if (U.value) {
412
- const { enabled: v, id: y, name: S } = U.value;
413
- f.action = v ? "disable" : "enable", f.id = y, f.name = S || y;
403
+ if (x.value) {
404
+ const { enabled: g, id: y, name: P } = x.value;
405
+ f.action = g ? "disable" : "enable", f.id = y, f.name = P || y;
414
406
  }
415
407
  return f;
416
- }), Ae = (f) => {
417
- se.value = !0, U.value = f;
418
- }, W = () => {
419
- se.value = !1, U.value = null;
420
- }, me = async () => {
421
- var S, j;
422
- if (!await ((S = n.canEdit) == null ? void 0 : S.call(n, U.value)) || !U.value)
408
+ }), me = (f) => {
409
+ w.value = !0, x.value = f;
410
+ }, ve = () => {
411
+ w.value = !1, x.value = null;
412
+ }, Q = async () => {
413
+ var P, W;
414
+ if (!await ((P = n.canEdit) == null ? void 0 : P.call(n, x.value)) || !x.value)
423
415
  return;
424
- const v = `${Ie.value.href}/${U.value.id}`, y = !U.value.enabled;
416
+ const g = `${Pe.value.href}/${x.value.id}`, y = !x.value.enabled;
425
417
  try {
426
- const { data: F } = ((j = n.config) == null ? void 0 : j.app) === "konnect" ? await N.put(v, { ...U.value, enabled: y }) : await N.patch(v, { ...U.value, enabled: y });
427
- m("toggle:success", F), U.value.enabled = y;
428
- } catch (F) {
429
- m("error", F);
418
+ const { data: M } = ((W = n.config) == null ? void 0 : W.app) === "konnect" ? await N.put(g, { ...x.value, enabled: y }) : await N.patch(g, { ...x.value, enabled: y });
419
+ m("toggle:success", M), x.value.enabled = y;
420
+ } catch (M) {
421
+ m("error", M);
430
422
  }
431
- }, ve = (f) => {
432
- n.config.getControlPlaneRoute && $.push(n.config.getControlPlaneRoute(f));
433
- }, ge = async (f, v) => {
423
+ }, ge = (f) => {
424
+ n.config.getControlPlaneRoute && A.push(n.config.getControlPlaneRoute(f));
425
+ }, ye = async (f, g) => {
434
426
  const y = f.id;
435
- if (!await v(y)) {
427
+ if (!await g(y)) {
436
428
  m("copy:error", {
437
429
  entity: f,
438
430
  field: "id",
@@ -445,9 +437,9 @@ const Y = {
445
437
  field: "id",
446
438
  message: a("copy.success", { val: y })
447
439
  });
448
- }, ye = async (f, v) => {
440
+ }, _e = async (f, g) => {
449
441
  const y = JSON.stringify(f);
450
- if (!await v(y)) {
442
+ if (!await g(y)) {
451
443
  m("copy:error", {
452
444
  entity: f,
453
445
  message: a("errors.copy")
@@ -458,95 +450,95 @@ const Y = {
458
450
  entity: f,
459
451
  message: a("copy.success_brief")
460
452
  });
461
- }, _e = async (f) => {
453
+ }, he = async (f) => {
462
454
  var y;
463
- await ((y = n.canRetrieve) == null ? void 0 : y.call(n, f)) && $.push(n.config.getViewRoute(f.id));
464
- }, $e = (f) => ({
455
+ await ((y = n.canRetrieve) == null ? void 0 : y.call(n, f)) && A.push(n.config.getViewRoute(f.id));
456
+ }, be = (f) => ({
465
457
  label: a("actions.view"),
466
458
  to: n.config.getViewRoute(f)
467
- }), J = (f) => ({
459
+ }), Ae = (f) => ({
468
460
  label: a("actions.edit"),
469
461
  to: n.config.getEditRoute(f)
470
- }), x = R(void 0), O = R(!1), Q = R(!1), ae = R(""), Te = st(n.config, ee.value), he = (f) => {
471
- x.value = f, O.value = !0, ae.value = "";
472
- }, be = () => {
473
- O.value = !1, x.value = void 0;
474
- }, Ue = async () => {
475
- var f, v, y;
476
- if ((f = x.value) != null && f.id) {
477
- Q.value = !0;
462
+ }), $ = R(void 0), H = R(!1), O = R(!1), X = R(""), Te = st(n.config, te.value), Ue = (f) => {
463
+ $.value = f, H.value = !0, X.value = "";
464
+ }, ne = () => {
465
+ H.value = !1, $.value = void 0;
466
+ }, $e = async () => {
467
+ var f, g, y;
468
+ if ((f = $.value) != null && f.id) {
469
+ O.value = !0;
478
470
  try {
479
- await N.delete(Te(x.value.id)), m("delete:success", x.value), be(), Z.value++;
480
- } catch (S) {
481
- ae.value = ((y = (v = S.response) == null ? void 0 : v.data) == null ? void 0 : y.message) || S.message || a("errors.delete"), m("error", S);
471
+ await N.delete(Te($.value.id)), m("delete:success", $.value), ne(), C.value++;
472
+ } catch (P) {
473
+ X.value = ((y = (g = P.response) == null ? void 0 : g.data) == null ? void 0 : y.message) || P.message || a("errors.delete"), m("error", P);
482
474
  } finally {
483
- Q.value = !1;
475
+ O.value = !1;
484
476
  }
485
477
  }
486
478
  }, Re = () => {
487
- $.push(n.config.createRoute);
479
+ A.push(n.config.createRoute);
488
480
  };
489
- Be(E, (f) => {
490
- var v, y, S;
481
+ Be(J, (f) => {
482
+ var g, y, P;
491
483
  if (f.status === at.Error) {
492
- e.value = {
484
+ oe.value = {
493
485
  title: a("errors.general")
494
- }, (S = (y = (v = f.error) == null ? void 0 : v.response) == null ? void 0 : y.data) != null && S.message && (e.value.message = f.error.response.data.message), m("error", f.error);
486
+ }, (P = (y = (g = f.error) == null ? void 0 : g.response) == null ? void 0 : y.data) != null && P.message && (oe.value.message = f.error.response.data.message), m("error", f.error);
495
487
  return;
496
488
  }
497
- e.value = null;
489
+ oe.value = null;
498
490
  });
499
- const ne = R(!1);
500
- return Ze(async () => {
501
- ne.value = await n.canCreate();
502
- }), (f, v) => {
503
- const y = L("KButton"), S = L("KBadge"), j = L("KInputSwitch"), F = L("KDropdownItem"), z = L("KClipboardProvider");
504
- return V(), T("div", Ut, [
491
+ const ce = R(!1);
492
+ return ze(async () => {
493
+ ce.value = await n.canCreate();
494
+ }), (f, g) => {
495
+ const y = L("KButton"), P = L("KBadge"), W = L("KInputSwitch"), M = L("KDropdownItem"), j = L("KClipboardProvider");
496
+ return E(), T("div", $t, [
505
497
  c(o(nt), {
506
498
  "cache-identifier": s.cacheIdentifier,
507
- "default-table-preferences": pe,
508
- "disable-sorting": fe.value,
509
- "empty-state-options": C.value,
499
+ "default-table-preferences": fe,
500
+ "disable-sorting": Ie.value,
501
+ "empty-state-options": e.value,
510
502
  "enable-entity-actions": "",
511
- "error-message": e.value,
512
- fetcher: o(H),
513
- "fetcher-cache-key": o(Z),
503
+ "error-message": oe.value,
504
+ fetcher: o(Fe),
505
+ "fetcher-cache-key": o(C),
514
506
  "pagination-type": "offset",
515
507
  "preferences-storage-key": "kong-ui-entities-gateway-services-list",
516
- query: B.value,
517
- "table-headers": o(Se),
518
- onClearSearchInput: le,
519
- "onClick:row": v[5] || (v[5] = (p) => _e(p)),
520
- onSort: Fe,
521
- onState: o(M)
522
- }, Ce({
508
+ query: z.value,
509
+ "table-headers": o(pe),
510
+ onClearSearchInput: se,
511
+ "onClick:row": g[4] || (g[4] = (p) => he(p)),
512
+ onSort: ae,
513
+ onState: o(B)
514
+ }, Se({
523
515
  "toolbar-filter": d(() => [
524
516
  c(o(dt), {
525
- modelValue: B.value,
526
- "onUpdate:modelValue": v[0] || (v[0] = (p) => B.value = p),
527
- config: Pe.value
517
+ modelValue: z.value,
518
+ "onUpdate:modelValue": g[0] || (g[0] = (p) => z.value = p),
519
+ config: Z.value
528
520
  }, null, 8, ["modelValue", "config"])
529
521
  ]),
530
522
  "toolbar-button": d(() => [
531
- (V(), de(Ke, {
523
+ (E(), Ee(He, {
532
524
  disabled: !s.useActionOutside,
533
525
  to: "#kong-ui-app-page-header-action-button"
534
526
  }, [
535
- I("div", Rt, [
536
- P.value ? (V(), de(y, {
527
+ S("div", Rt, [
528
+ I.value ? (E(), Ee(y, {
537
529
  key: 0,
538
530
  appearance: "secondary",
539
531
  class: "open-learning-hub",
540
532
  "data-testid": "gateway-services-learn-more-button",
541
533
  icon: "",
542
- onClick: v[1] || (v[1] = (p) => f.$emit("click:learn-more"))
534
+ onClick: g[1] || (g[1] = (p) => f.$emit("click:learn-more"))
543
535
  }, {
544
536
  default: d(() => [
545
- c(o(qe), { decorative: "" })
537
+ c(o(Ye), { decorative: "" })
546
538
  ]),
547
539
  _: 1
548
540
  })) : D("", !0),
549
- c(o(ce), {
541
+ c(o(de), {
550
542
  "auth-function": () => s.canCreate()
551
543
  }, {
552
544
  default: d(() => [
@@ -558,7 +550,7 @@ const Y = {
558
550
  }, {
559
551
  default: d(() => [
560
552
  c(o(et)),
561
- K(" " + k(o(a)("gateway_services.list.toolbar_actions.new_gateway_service")), 1)
553
+ K(" " + V(o(a)("gateway_services.list.toolbar_actions.new_gateway_service")), 1)
562
554
  ]),
563
555
  _: 1
564
556
  }, 8, ["size", "to"])
@@ -569,40 +561,40 @@ const Y = {
569
561
  ], 8, ["disabled"]))
570
562
  ]),
571
563
  name: d(({ rowValue: p }) => [
572
- I("b", null, k(p ?? "-"), 1)
564
+ S("b", null, V(p ?? "-"), 1)
573
565
  ]),
574
566
  control_plane: d(({ row: p }) => {
575
- var t;
567
+ var U;
576
568
  return [
577
- (t = p.x_meta) != null && t.cluster_id ? (V(), de(S, {
569
+ (U = p.x_meta) != null && U.cluster_id ? (E(), Ee(P, {
578
570
  key: 0,
579
571
  tooltip: p.x_meta.cluster_id,
580
572
  "truncation-tooltip": "",
581
- onClick: xe((r) => ve(p.x_meta.cluster_id), ["stop"])
573
+ onClick: xe((t) => ge(p.x_meta.cluster_id), ["stop"])
582
574
  }, {
583
575
  default: d(() => [
584
- K(k(p.x_meta.cluster_id), 1)
576
+ K(V(p.x_meta.cluster_id), 1)
585
577
  ]),
586
578
  _: 2
587
- }, 1032, ["tooltip", "onClick"])) : (V(), T("b", Mt, "-"))
579
+ }, 1032, ["tooltip", "onClick"])) : (E(), T("b", Mt, "-"))
588
580
  ];
589
581
  }),
590
582
  enabled: d(({ row: p }) => [
591
- c(o(ce), {
583
+ c(o(de), {
592
584
  "auth-function": () => s.canEdit(p),
593
585
  "force-show": ""
594
586
  }, {
595
- default: d(({ isAllowed: t }) => [
596
- I("div", {
597
- onClick: v[4] || (v[4] = xe(() => {
587
+ default: d(({ isAllowed: U }) => [
588
+ S("div", {
589
+ onClick: g[3] || (g[3] = xe(() => {
598
590
  }, ["stop"]))
599
591
  }, [
600
- c(j, {
592
+ c(W, {
601
593
  modelValue: p.enabled,
602
- "onUpdate:modelValue": (r) => p.enabled = r,
594
+ "onUpdate:modelValue": (t) => p.enabled = t,
603
595
  "data-testid": `row-${p.id}-toggle-input`,
604
- disabled: !t,
605
- onClick: xe((r) => Ae(p), ["prevent"])
596
+ disabled: !U,
597
+ onClick: xe((t) => me(p), ["prevent"])
606
598
  }, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "disabled", "onClick"])
607
599
  ])
608
600
  ]),
@@ -613,75 +605,75 @@ const Y = {
613
605
  c(o(ct), { tags: p }, null, 8, ["tags"])
614
606
  ]),
615
607
  created_at: d(({ rowValue: p }) => [
616
- K(k(o(g)(p)), 1)
608
+ K(V(o(v)(p)), 1)
617
609
  ]),
618
- updated_at: d(({ row: p, rowValue: t }) => [
619
- K(k(o(g)(t ?? p.created_at)), 1)
610
+ updated_at: d(({ row: p, rowValue: U }) => [
611
+ K(V(o(v)(U ?? p.created_at)), 1)
620
612
  ]),
621
613
  actions: d(({ row: p }) => [
622
- c(z, null, {
623
- default: d(({ copyToClipboard: t }) => [
624
- c(F, {
614
+ c(j, null, {
615
+ default: d(({ copyToClipboard: U }) => [
616
+ c(M, {
625
617
  "data-testid": "action-entity-copy-id",
626
- onClick: (r) => ge(p, t)
618
+ onClick: (t) => ye(p, U)
627
619
  }, {
628
620
  default: d(() => [
629
- K(k(o(a)("actions.copy_id")), 1)
621
+ K(V(o(a)("actions.copy_id")), 1)
630
622
  ]),
631
623
  _: 2
632
624
  }, 1032, ["onClick"])
633
625
  ]),
634
626
  _: 2
635
627
  }, 1024),
636
- c(z, null, {
637
- default: d(({ copyToClipboard: t }) => [
638
- c(F, {
628
+ c(j, null, {
629
+ default: d(({ copyToClipboard: U }) => [
630
+ c(M, {
639
631
  "data-testid": "action-entity-copy-json",
640
- onClick: (r) => ye(p, t)
632
+ onClick: (t) => _e(p, U)
641
633
  }, {
642
634
  default: d(() => [
643
- K(k(o(a)("actions.copy_json")), 1)
635
+ K(V(o(a)("actions.copy_json")), 1)
644
636
  ]),
645
637
  _: 2
646
638
  }, 1032, ["onClick"])
647
639
  ]),
648
640
  _: 2
649
641
  }, 1024),
650
- c(o(ce), {
642
+ c(o(de), {
651
643
  "auth-function": () => s.canRetrieve(p)
652
644
  }, {
653
645
  default: d(() => [
654
- c(F, {
646
+ c(M, {
655
647
  "data-testid": "action-entity-view",
656
648
  "has-divider": "",
657
- item: $e(p.id)
649
+ item: be(p.id)
658
650
  }, null, 8, ["item"])
659
651
  ]),
660
652
  _: 2
661
653
  }, 1032, ["auth-function"]),
662
- c(o(ce), {
654
+ c(o(de), {
663
655
  "auth-function": () => s.canEdit(p)
664
656
  }, {
665
657
  default: d(() => [
666
- c(F, {
658
+ c(M, {
667
659
  "data-testid": "action-entity-edit",
668
- item: J(p.id)
660
+ item: Ae(p.id)
669
661
  }, null, 8, ["item"])
670
662
  ]),
671
663
  _: 2
672
664
  }, 1032, ["auth-function"]),
673
- c(o(ce), {
665
+ c(o(de), {
674
666
  "auth-function": () => s.canDelete(p)
675
667
  }, {
676
668
  default: d(() => [
677
- c(F, {
669
+ c(M, {
678
670
  danger: "",
679
671
  "data-testid": "action-entity-delete",
680
672
  "has-divider": "",
681
- onClick: (t) => he(p)
673
+ onClick: (U) => Ue(p)
682
674
  }, {
683
675
  default: d(() => [
684
- K(k(o(a)("actions.delete.menu_label")), 1)
676
+ K(V(o(a)("actions.delete.menu_label")), 1)
685
677
  ]),
686
678
  _: 2
687
679
  }, 1032, ["onClick"])
@@ -691,30 +683,7 @@ const Y = {
691
683
  ]),
692
684
  _: 2
693
685
  }, [
694
- !o(l) && Ee.value ? {
695
- name: "outside-actions",
696
- fn: d(() => [
697
- (V(), de(Ke, {
698
- disabled: !s.useActionOutside,
699
- to: "#kong-ui-app-page-header-action-button"
700
- }, [
701
- c(y, {
702
- appearance: "secondary",
703
- class: "open-learning-hub",
704
- "data-testid": "gateway-services-more-button",
705
- icon: "",
706
- onClick: v[2] || (v[2] = (p) => f.$emit("click:learn-more"))
707
- }, {
708
- default: d(() => [
709
- c(o(qe), { decorative: "" })
710
- ]),
711
- _: 1
712
- })
713
- ], 8, ["disabled"]))
714
- ]),
715
- key: "0"
716
- } : void 0,
717
- !B.value && s.enableV2EmptyStates && s.config.app === "konnect" ? {
686
+ !z.value && s.config.app === "konnect" ? {
718
687
  name: "empty-state",
719
688
  fn: d(() => {
720
689
  var p;
@@ -728,13 +697,13 @@ const Y = {
728
697
  "learn-more": s.config.app === "konnect",
729
698
  title: o(a)("gateway_services.empty_state_v2.title"),
730
699
  "onClick:create": Re,
731
- "onClick:learnMore": v[3] || (v[3] = (t) => f.$emit("click:learn-more"))
732
- }, Ce({
700
+ "onClick:learnMore": g[2] || (g[2] = (U) => f.$emit("click:learn-more"))
701
+ }, Se({
733
702
  image: d(() => [
734
- I("div", xt, [
703
+ S("div", xt, [
735
704
  c(o(tt), {
736
- color: o($t),
737
- size: o(Tt)
705
+ color: o(Tt),
706
+ size: o(Ut)
738
707
  }, null, 8, ["color", "size"])
739
708
  ])
740
709
  ]),
@@ -743,46 +712,46 @@ const Y = {
743
712
  (p = s.config) != null && p.isControlPlaneGroup ? {
744
713
  name: "message",
745
714
  fn: d(() => [
746
- K(k(o(a)("gateway_services.empty_state_v2.group")), 1)
715
+ K(V(o(a)("gateway_services.empty_state_v2.group")), 1)
747
716
  ]),
748
717
  key: "0"
749
718
  } : void 0
750
719
  ]), 1032, ["action-button-text", "can-create", "description", "learn-more", "title"])
751
720
  ];
752
721
  }),
753
- key: "1"
722
+ key: "0"
754
723
  } : void 0
755
724
  ]), 1032, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "onState"]),
756
725
  c(o(ft), {
757
- action: te.value.action,
758
- "entity-id": te.value.id,
759
- "entity-name": te.value.name,
726
+ action: re.value.action,
727
+ "entity-id": re.value.id,
728
+ "entity-name": re.value.name,
760
729
  "entity-type": o(a)("glossary.gateway_services"),
761
- "on-confirm": me,
762
- visible: se.value,
763
- onCancel: W,
764
- onProceed: W
730
+ "on-confirm": Q,
731
+ visible: w.value,
732
+ onCancel: ve,
733
+ onProceed: ve
765
734
  }, null, 8, ["action", "entity-id", "entity-name", "entity-type", "visible"]),
766
735
  c(o(pt), {
767
- "action-pending": Q.value,
736
+ "action-pending": O.value,
768
737
  description: o(a)("actions.delete.description"),
769
- "entity-name": x.value && (x.value.name || x.value.id),
738
+ "entity-name": $.value && ($.value.name || $.value.id),
770
739
  "entity-type": o(mt).GatewayService,
771
- error: ae.value,
740
+ error: X.value,
772
741
  title: o(a)("actions.delete.title"),
773
- visible: O.value,
774
- onCancel: be,
775
- onProceed: Ue
742
+ visible: H.value,
743
+ onCancel: ne,
744
+ onProceed: $e
776
745
  }, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
777
746
  ]);
778
747
  };
779
748
  }
780
- }), He = (s, G) => {
749
+ }), je = (s, G) => {
781
750
  const m = s.__vccOpts || s;
782
751
  for (const [n, a] of G)
783
752
  m[n] = a;
784
753
  return m;
785
- }, mo = /* @__PURE__ */ He(Bt, [["__scopeId", "data-v-210f19c5"]]), Dt = { class: "kong-ui-gateway-service-entity-config-card" }, vo = /* @__PURE__ */ De({
754
+ }, mo = /* @__PURE__ */ je(Bt, [["__scopeId", "data-v-5f172c04"]]), Dt = { class: "kong-ui-gateway-service-entity-config-card" }, vo = /* @__PURE__ */ De({
786
755
  __name: "GatewayServiceConfigCard",
787
756
  props: {
788
757
  /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
@@ -809,7 +778,7 @@ const Y = {
809
778
  },
810
779
  emits: ["loading", "fetch:error", "fetch:success"],
811
780
  setup(s) {
812
- const G = s, { i18n: { t: m }, i18nT: n } = Y.useI18n(), a = b(() => ue.form[G.config.app].edit), { getPropValue: g } = je(), $ = (l, M) => g(l, M) === !0 ? m("gateway_services.form.fields.tls_verify_option.true.display") : m("gateway_services.form.fields.tls_verify_option.false.display"), N = R({
781
+ const G = s, { i18n: { t: m }, i18nT: n } = ee.useI18n(), a = b(() => ue.form[G.config.app].edit), { getPropValue: v } = Oe(), A = (l, B) => v(l, B) === !0 ? m("gateway_services.form.fields.tls_verify_option.true.display") : m("gateway_services.form.fields.tls_verify_option.false.display"), N = R({
813
782
  id: {},
814
783
  name: {
815
784
  tooltip: m("gateway_services.form.fields.name.tooltip")
@@ -818,19 +787,19 @@ const Y = {
818
787
  updated_at: {},
819
788
  created_at: {},
820
789
  protocol: {
821
- section: we.Basic,
790
+ section: ke.Basic,
822
791
  tooltip: m("gateway_services.form.fields.protocol.tooltip")
823
792
  },
824
793
  host: {
825
- section: we.Basic,
794
+ section: ke.Basic,
826
795
  tooltip: m("gateway_services.form.fields.host.tooltip")
827
796
  },
828
797
  path: {
829
- section: we.Basic,
798
+ section: ke.Basic,
830
799
  tooltip: m("gateway_services.form.fields.path.tooltip")
831
800
  },
832
801
  port: {
833
- section: we.Basic,
802
+ section: ke.Basic,
834
803
  tooltip: m("gateway_services.form.fields.port.tooltip")
835
804
  },
836
805
  tags: {
@@ -869,17 +838,17 @@ const Y = {
869
838
  hidden: !0
870
839
  }
871
840
  });
872
- return (l, M) => (V(), T("div", Dt, [
841
+ return (l, B) => (E(), T("div", Dt, [
873
842
  c(o(gt), {
874
843
  config: s.config,
875
844
  "config-card-doc": s.configCardDoc,
876
845
  "config-schema": N.value,
877
- "entity-type": o(ze).GatewayService,
846
+ "entity-type": o(We).GatewayService,
878
847
  "fetch-url": a.value,
879
848
  "hide-title": s.hideTitle,
880
- "onFetch:error": M[0] || (M[0] = (P) => l.$emit("fetch:error", P)),
881
- "onFetch:success": M[1] || (M[1] = (P) => l.$emit("fetch:success", P)),
882
- onLoading: M[2] || (M[2] = (P) => l.$emit("loading", P))
849
+ "onFetch:error": B[0] || (B[0] = (I) => l.$emit("fetch:error", I)),
850
+ "onFetch:success": B[1] || (B[1] = (I) => l.$emit("fetch:success", I)),
851
+ onLoading: B[2] || (B[2] = (I) => l.$emit("loading", I))
883
852
  }, {
884
853
  "enabled-label-tooltip": d(() => [
885
854
  c(o(n), {
@@ -887,10 +856,10 @@ const Y = {
887
856
  scope: "global"
888
857
  }, {
889
858
  false: d(() => [
890
- I("code", null, k(o(m)("gateway_services.form.fields.enabled.false")), 1)
859
+ S("code", null, V(o(m)("gateway_services.form.fields.enabled.false")), 1)
891
860
  ]),
892
861
  true: d(() => [
893
- I("code", null, k(o(m)("gateway_services.form.fields.enabled.true")), 1)
862
+ S("code", null, V(o(m)("gateway_services.form.fields.enabled.true")), 1)
894
863
  ]),
895
864
  _: 1
896
865
  })
@@ -901,10 +870,10 @@ const Y = {
901
870
  scope: "global"
902
871
  }, {
903
872
  code1: d(() => [
904
- I("code", null, k(o(m)("gateway_services.form.fields.ca_certificates.code1")), 1)
873
+ S("code", null, V(o(m)("gateway_services.form.fields.ca_certificates.code1")), 1)
905
874
  ]),
906
875
  code2: d(() => [
907
- I("code", null, k(o(m)("gateway_services.form.fields.ca_certificates.code2")), 1)
876
+ S("code", null, V(o(m)("gateway_services.form.fields.ca_certificates.code2")), 1)
908
877
  ]),
909
878
  _: 1
910
879
  })
@@ -915,16 +884,16 @@ const Y = {
915
884
  scope: "global"
916
885
  }, {
917
886
  code1: d(() => [
918
- I("code", null, k(o(m)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
887
+ S("code", null, V(o(m)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
919
888
  ]),
920
889
  _: 1
921
890
  })
922
891
  ]),
923
- tls_verify: d((P) => [
924
- K(k(typeof o(g)("rowValue", P) == "boolean" ? $("rowValue", P) : o(m)("gateway_services.form.fields.tls_verify_option.unset.display")), 1)
892
+ tls_verify: d((I) => [
893
+ K(V(typeof o(v)("rowValue", I) == "boolean" ? A("rowValue", I) : o(m)("gateway_services.form.fields.tls_verify_option.unset.display")), 1)
925
894
  ]),
926
- client_certificate: d((P) => [
927
- K(k(o(g)("rowValue", P) ? o(g)("rowValue", P).id : "–"), 1)
895
+ client_certificate: d((I) => [
896
+ K(V(o(v)("rowValue", I) ? o(v)("rowValue", I).id : "–"), 1)
928
897
  ]),
929
898
  _: 1
930
899
  }, 8, ["config", "config-card-doc", "config-schema", "entity-type", "fetch-url", "hide-title"])
@@ -993,8 +962,8 @@ const Y = {
993
962
  },
994
963
  emits: ["update", "error", "url-valid:success", "url-valid:error", "loading", "model-updated", "try-sample-api"],
995
964
  setup(s, { expose: G, emit: m }) {
996
- var p;
997
- const n = m, a = s, g = R(!0), $ = Oe(), { i18nT: N, i18n: { t: l } } = Y.useI18n(), { getErrorFieldsFromError: M } = yt(), { axiosInstance: P } = We((p = a.config) == null ? void 0 : p.axiosRequestConfig), Ee = _t(), { validateHost: fe, validatePath: ie, validatePort: pe, validateProtocol: Se } = Y.useUrlValidators(), { objectsAreEqual: ee } = je(), Ie = b(() => ue.form[a.config.app].edit), B = b(() => a.gatewayServiceId ? Ge.Edit : Ge.Create), Pe = R(!1), H = b(() => !!a.gatewayServiceId), E = R(H.value ? "protocol" : "url"), Z = Y.usePortFromProtocol(), le = R(""), Fe = b(() => !!le.value || !!J("name")), e = Le({
965
+ var U;
966
+ const n = m, a = s, v = R(!0), A = Ge(), { i18nT: N, i18n: { t: l } } = ee.useI18n(), { getErrorFieldsFromError: B } = yt(), { axiosInstance: I } = Ne((U = a.config) == null ? void 0 : U.axiosRequestConfig), Ie = _t(), { validateHost: le, validatePath: fe, validatePort: pe, validateProtocol: te } = ee.useUrlValidators(), { objectsAreEqual: Pe } = Oe(), z = b(() => ue.form[a.config.app].edit), Z = b(() => a.gatewayServiceId ? Le.Edit : Le.Create), Fe = R(!1), J = b(() => !!a.gatewayServiceId), C = R(J.value ? "protocol" : "url"), se = ee.usePortFromProtocol(), ae = R(""), oe = b(() => !!ae.value || !!$("name")), e = Ke({
998
967
  fields: {
999
968
  name: "",
1000
969
  protocol: "http",
@@ -1031,7 +1000,7 @@ const Y = {
1031
1000
  tls_verify_enabled: "",
1032
1001
  tls_verify_value: ""
1033
1002
  }
1034
- }), C = Le({
1003
+ }), w = Ke({
1035
1004
  name: "",
1036
1005
  protocol: "http",
1037
1006
  host: "",
@@ -1048,13 +1017,13 @@ const Y = {
1048
1017
  tls_verify_value: !1,
1049
1018
  tags: "",
1050
1019
  enabled: !0
1051
- }), se = a.config.app === "konnect" || ht({
1020
+ }), x = a.config.app === "konnect" || ht({
1052
1021
  gatewayInfo: a.config.gatewayInfo,
1053
1022
  // 'ws' and 'wss' are not valid values for the protocol field in Gateway Community Edition or before Gateway Enterprise Edition 3.0
1054
1023
  supportedRange: {
1055
1024
  enterprise: ["3.0"]
1056
1025
  }
1057
- }), U = [
1026
+ }), re = [
1058
1027
  {
1059
1028
  label: l("gateway_services.form.fields.protocol.options.http"),
1060
1029
  value: "http",
@@ -1090,7 +1059,7 @@ const Y = {
1090
1059
  value: "grpcs",
1091
1060
  group: "grpc"
1092
1061
  },
1093
- ...se ? [
1062
+ ...x ? [
1094
1063
  {
1095
1064
  label: l("gateway_services.form.fields.protocol.options.ws"),
1096
1065
  value: "ws",
@@ -1107,14 +1076,14 @@ const Y = {
1107
1076
  value: "udp",
1108
1077
  group: "udp"
1109
1078
  }
1110
- ], te = { url: "url", protocol: "protocol" }, Ae = (t, r) => {
1079
+ ], me = { url: "url", protocol: "protocol" }, ve = (t, r) => {
1111
1080
  r.value;
1112
- }, W = (t) => t ? parseFloat(t) : 0, me = () => {
1113
- e.fields.host = C.host, e.fields.path = C.path, e.fields.port = C.port, e.fields.protocol = C.protocol, e.fields.url = C.url, e.fields.retries = C.retries, e.fields.connect_timeout = C.connect_timeout, e.fields.write_timeout = C.write_timeout, e.fields.read_timeout = C.read_timeout, e.fields.client_certificate = C.client_certificate, e.fields.ca_certificates = C.ca_certificates, e.fields.tls_verify_enabled = C.tls_verify_enabled, e.fields.tls_verify_value = C.tls_verify_value, e.fields.enabled = C.enabled;
1114
- }, ve = () => {
1115
- g.value = !0, O(), e.errorMessages = [], me();
1116
- }, ge = () => {
1117
- switch (me(), e.fields.name = `${q.name}-${(/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 17)}`, E.value) {
1081
+ }, Q = (t) => t ? parseFloat(t) : 0, ge = () => {
1082
+ e.fields.host = w.host, e.fields.path = w.path, e.fields.port = w.port, e.fields.protocol = w.protocol, e.fields.url = w.url, e.fields.retries = w.retries, e.fields.connect_timeout = w.connect_timeout, e.fields.write_timeout = w.write_timeout, e.fields.read_timeout = w.read_timeout, e.fields.client_certificate = w.client_certificate, e.fields.ca_certificates = w.ca_certificates, e.fields.tls_verify_enabled = w.tls_verify_enabled, e.fields.tls_verify_value = w.tls_verify_value, e.fields.enabled = w.enabled;
1083
+ }, ye = () => {
1084
+ v.value = !0, O(), e.errorMessages = [], ge();
1085
+ }, _e = () => {
1086
+ switch (ge(), e.fields.name = `${q.name}-${(/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 17)}`, C.value) {
1118
1087
  case "url":
1119
1088
  e.fields.url = `${q.protocol}://${q.host}${q.path}`;
1120
1089
  break;
@@ -1124,39 +1093,39 @@ const Y = {
1124
1093
  default:
1125
1094
  e.fields.url = `${q.protocol}://${q.host}${q.path}`;
1126
1095
  }
1127
- }, ye = () => {
1096
+ }, he = () => {
1128
1097
  if (O(), e.fields.url.length)
1129
1098
  try {
1130
- const t = new URL(e.fields.url), r = Se(t.protocol, U);
1099
+ const t = new URL(e.fields.url), r = te(t.protocol, re);
1131
1100
  if (r) throw new Error(r);
1132
1101
  e.fields.protocol = t.protocol.slice(0, -1);
1133
- const _ = fe(t.hostname);
1102
+ const _ = le(t.hostname);
1134
1103
  if (_) throw new Error(_);
1135
1104
  e.fields.host = t.hostname;
1136
- const A = ie(t.pathname);
1137
- if (A) throw new Error(A);
1105
+ const F = fe(t.pathname);
1106
+ if (F) throw new Error(F);
1138
1107
  e.fields.path = t.pathname;
1139
1108
  const h = pe(t.port);
1140
1109
  if (h) throw new Error(h);
1141
- const w = Number(t.port);
1142
- Pe.value = !!w, e.fields.port = w || Z.getPortFromProtocol(e.fields.protocol), n("url-valid:success");
1110
+ const k = Number(t.port);
1111
+ Fe.value = !!k, e.fields.port = k || se.getPortFromProtocol(e.fields.protocol), n("url-valid:success");
1143
1112
  } catch {
1144
1113
  n("url-valid:error", l("gateway_services.form.errors.url.invalid")), e.formFieldErrors.url = l("gateway_services.form.errors.url.invalid");
1145
1114
  }
1146
- }, _e = (t) => {
1115
+ }, be = (t) => {
1147
1116
  O(t);
1148
- }, $e = b(() => !!e.formFieldErrors.url || !!e.formFieldErrors.host || !!e.formFieldErrors.port), J = (t) => {
1117
+ }, Ae = b(() => !!e.formFieldErrors.url || !!e.formFieldErrors.host || !!e.formFieldErrors.port), $ = (t) => {
1149
1118
  if (e.errorMessages.length) return "";
1150
1119
  const r = e.formFieldErrors;
1151
1120
  return r[t] ? r[t] : "";
1152
- }, x = (t) => {
1121
+ }, H = (t) => {
1153
1122
  O(t ?? void 0);
1154
- const r = fe(e.fields.host);
1123
+ const r = le(e.fields.host);
1155
1124
  r && (e.formFieldErrors.host = r);
1156
- const _ = ie(e.fields.path);
1125
+ const _ = fe(e.fields.path);
1157
1126
  _ && (e.formFieldErrors.path = _);
1158
- const A = pe(e.fields.port);
1159
- A && (e.formFieldErrors.port = A), Q.value ? n("url-valid:success") : n("url-valid:error", e.errorMessages.join(",") || l("gateway_services.form.errors.url.invalid"));
1127
+ const F = pe(e.fields.port);
1128
+ F && (e.formFieldErrors.port = F), X.value ? n("url-valid:success") : n("url-valid:error", e.errorMessages.join(",") || l("gateway_services.form.errors.url.invalid"));
1160
1129
  }, O = (t) => {
1161
1130
  if (t)
1162
1131
  e.formFieldErrors[t] = "";
@@ -1164,54 +1133,54 @@ const Y = {
1164
1133
  for (let r in e.formFieldErrors)
1165
1134
  e.formFieldErrors[r] = "";
1166
1135
  e.errorMessages = [];
1167
- }, Q = b(() => {
1136
+ }, X = b(() => {
1168
1137
  for (let t in e.formFieldErrors)
1169
1138
  if (e.formFieldErrors[t].length)
1170
1139
  return !1;
1171
1140
  return !0;
1172
- }), ae = () => {
1173
- e.fields.url && E.value === "url" ? ye() : x();
1174
- }, Te = () => `new-service-${(/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 17)}`, he = b(() => !["tcp", "tls", "tls_passthrough", "grpc", "grpcs", "udp"].includes(e.fields.protocol)), be = b(() => {
1175
- if (E.value === "url")
1141
+ }), Te = () => {
1142
+ e.fields.url && C.value === "url" ? he() : H();
1143
+ }, Ue = () => `new-service-${(/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 17)}`, ne = b(() => !["tcp", "tls", "tls_passthrough", "grpc", "grpcs", "udp"].includes(e.fields.protocol)), $e = b(() => {
1144
+ if (C.value === "url")
1176
1145
  return !0;
1177
1146
  const t = ["https", "wss", "tls"].includes(e.fields.protocol);
1178
- return E.value === "protocol" && t;
1179
- }), Ue = b(() => {
1180
- if (E.value === "url")
1147
+ return C.value === "protocol" && t;
1148
+ }), Re = b(() => {
1149
+ if (C.value === "url")
1181
1150
  return !0;
1182
1151
  const t = ["https", "tls"].includes(e.fields.protocol);
1183
- return E.value === "protocol" && t;
1184
- }), Re = b(() => {
1185
- if (E.value === "url")
1152
+ return C.value === "protocol" && t;
1153
+ }), ce = b(() => {
1154
+ if (C.value === "url")
1186
1155
  return !0;
1187
1156
  const t = ["https", "wss", "tls"].includes(e.fields.protocol);
1188
- return E.value === "protocol" && t;
1189
- }), ne = (t) => {
1190
- O("name"), le.value = Ee.utf8Name(t);
1191
- }, oe = b(() => {
1192
- const t = !H.value || !ee(e.fields, C), r = E.value === "url" && !!e.fields.url && Q.value, _ = E.value === "protocol" && !!e.fields.host && Q.value;
1157
+ return C.value === "protocol" && t;
1158
+ }), we = (t) => {
1159
+ O("name"), ae.value = Ie.utf8Name(t);
1160
+ }, f = b(() => {
1161
+ const t = !J.value || !Pe(e.fields, w), r = C.value === "url" && !!e.fields.url && X.value, _ = C.value === "protocol" && !!e.fields.host && X.value;
1193
1162
  return t && (r || _);
1194
- }), f = (t) => {
1195
- var r, _, A;
1196
- e.fields.name = (t == null ? void 0 : t.name) || "", e.fields.tags = ((r = t == null ? void 0 : t.tags) == null ? void 0 : r.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 = ((_ = t == null ? void 0 : t.ca_certificates) == null ? void 0 : _.join(",")) || "", e.fields.client_certificate = ((A = t == null ? void 0 : t.client_certificate) == null ? void 0 : A.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, e.fields.enabled = (t == null ? void 0 : t.enabled) ?? !0, Object.assign(C, e.fields);
1197
- }, v = () => {
1198
- $.push(a.config.cancelRoute);
1199
- }, y = b(() => {
1163
+ }), g = (t) => {
1164
+ var r, _, F;
1165
+ e.fields.name = (t == null ? void 0 : t.name) || "", e.fields.tags = ((r = t == null ? void 0 : t.tags) == null ? void 0 : r.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 = ((_ = t == null ? void 0 : t.ca_certificates) == null ? void 0 : _.join(",")) || "", e.fields.client_certificate = ((F = t == null ? void 0 : t.client_certificate) == null ? void 0 : F.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, e.fields.enabled = (t == null ? void 0 : t.enabled) ?? !0, Object.assign(w, e.fields);
1166
+ }, y = () => {
1167
+ A.push(a.config.cancelRoute);
1168
+ }, P = b(() => {
1200
1169
  var r, _;
1201
1170
  let t = `${a.config.apiBaseUrl}${ue.form[a.config.app].validate}`;
1202
1171
  return a.config.app === "konnect" ? t = t.replace(/{controlPlaneId}/gi, ((r = a.config) == null ? void 0 : r.controlPlaneId) || "") : a.config.app === "kongManager" && (t = t.replace(/\/{workspace}/gi, (_ = a.config) != null && _.workspace ? `/${a.config.workspace}` : "")), t = t.replace(/{id}/gi, a.gatewayServiceId), t;
1203
- }), S = b(() => {
1172
+ }), W = b(() => {
1204
1173
  var r, _;
1205
- let t = `${a.config.apiBaseUrl}${ue.form[a.config.app][B.value]}`;
1174
+ let t = `${a.config.apiBaseUrl}${ue.form[a.config.app][Z.value]}`;
1206
1175
  return a.config.app === "konnect" ? t = t.replace(/{controlPlaneId}/gi, ((r = a.config) == null ? void 0 : r.controlPlaneId) || "") : a.config.app === "kongManager" && (t = t.replace(/\/{workspace}/gi, (_ = a.config) != null && _.workspace ? `/${a.config.workspace}` : "")), t = t.replace(/{id}/gi, a.gatewayServiceId), t;
1207
- }), j = (t) => {
1176
+ }), M = (t) => {
1208
1177
  let r = "";
1209
1178
  t.url && (r = new URL(t.url).protocol), (["https", "wss", "tls"].includes(t.protocol) || ["https", "wss", "tls"].includes(r)) && (t.tls_verify = t.tls_verify_enabled ? t.tls_verify_value : null), delete t.tls_verify_enabled, delete t.tls_verify_value;
1210
- }, F = b(() => {
1211
- var r, _, A, h;
1179
+ }, j = b(() => {
1180
+ var r, _, F, h;
1212
1181
  const t = {
1213
1182
  name: e.fields.name || null,
1214
- tags: e.fields.tags ? (A = (_ = (r = e.fields.tags) == null ? void 0 : r.split(",")) == null ? void 0 : _.map((w) => String(w || "").trim())) == null ? void 0 : A.filter((w) => w !== "") : null,
1183
+ tags: e.fields.tags ? (F = (_ = (r = e.fields.tags) == null ? void 0 : r.split(",")) == null ? void 0 : _.map((k) => String(k || "").trim())) == null ? void 0 : F.filter((k) => k !== "") : null,
1215
1184
  protocol: e.fields.protocol,
1216
1185
  path: e.fields.path || null,
1217
1186
  read_timeout: e.fields.read_timeout,
@@ -1220,33 +1189,33 @@ const Y = {
1220
1189
  connect_timeout: e.fields.connect_timeout,
1221
1190
  tls_verify_value: e.fields.tls_verify_value,
1222
1191
  tls_verify_enabled: e.fields.tls_verify_enabled,
1223
- ca_certificates: e.fields.ca_certificates ? (h = e.fields.ca_certificates) == null ? void 0 : h.split(",").filter((w) => w !== "") : null,
1192
+ ca_certificates: e.fields.ca_certificates ? (h = e.fields.ca_certificates) == null ? void 0 : h.split(",").filter((k) => k !== "") : null,
1224
1193
  client_certificate: e.fields.client_certificate ? { id: e.fields.client_certificate } : null,
1225
1194
  write_timeout: e.fields.write_timeout,
1226
1195
  port: e.fields.port,
1227
1196
  url: e.fields.url,
1228
1197
  enabled: e.fields.enabled
1229
1198
  };
1230
- 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), he.value || (t.path = null), B.value === "create" ? E.value === "url" ? (delete t.protocol, delete t.host, delete t.path, a.config.app === "konnect" && delete t.port) : delete t.url : B.value === "edit" && delete t.url, t;
1231
- }), z = async () => {
1232
- var t, r, _, A;
1199
+ 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), ne.value || (t.path = null), Z.value === "create" ? C.value === "url" ? (delete t.protocol, delete t.host, delete t.path, a.config.app === "konnect" && delete t.port) : delete t.url : Z.value === "edit" && delete t.url, t;
1200
+ }), p = async () => {
1201
+ var t, r, _, F;
1233
1202
  try {
1234
1203
  e.isReadonly = !0;
1235
- const h = F.value;
1236
- j(h);
1237
- let w;
1238
- if (await P.post(y.value, h), B.value === "create" ? w = await P.post(S.value, h) : B.value === "edit" && (w = ((t = a.config) == null ? void 0 : t.app) === "konnect" ? await P.put(S.value, h) : await P.patch(S.value, h)), w) {
1239
- const { data: i } = w;
1240
- e.fields.name = (i == null ? void 0 : i.name) || "", e.fields.port = i.port || Z.getPortFromProtocol(i.protocol), e.fields.protocol = (i == null ? void 0 : i.protocol) || "http", e.fields.host = (i == null ? void 0 : i.host) || "", e.fields.path = (i == null ? void 0 : i.path) || "", e.fields.url = (i == null ? void 0 : i.url) || "", e.fields.retries = i != null && i.retries || (i == null ? void 0 : i.retries) === 0 ? i == null ? void 0 : i.retries : 5, e.fields.connect_timeout = i != null && i.connect_timeout || (i == null ? void 0 : i.connect_timeout) === 0 ? i == null ? void 0 : i.connect_timeout : 6e4, e.fields.write_timeout = i != null && i.write_timeout || (i == null ? void 0 : i.write_timeout) === 0 ? i == null ? void 0 : i.write_timeout : 6e4, e.fields.read_timeout = i != null && i.read_timeout || (i == null ? void 0 : i.read_timeout) === 0 ? i == null ? void 0 : i.read_timeout : 6e4, e.fields.client_certificate = ((r = i == null ? void 0 : i.client_certificate) == null ? void 0 : r.id) || "", e.fields.ca_certificates = (_ = i == null ? void 0 : i.ca_certificates) != null && _.length ? i == null ? void 0 : i.ca_certificates.join(",") : "", e.fields.tls_verify_enabled = (i == null ? void 0 : i.tls_verify) !== "" && (i == null ? void 0 : i.tls_verify) !== null && (i == null ? void 0 : i.tls_verify) !== void 0, e.fields.tls_verify_value = e.fields.tls_verify_enabled && (i == null ? void 0 : i.tls_verify), e.fields.tags = (A = i == null ? void 0 : i.tags) != null && A.length ? i.tags.join(", ") : "", e.fields.enabled = (i == null ? void 0 : i.enabled) ?? !0, Object.assign(C, e.fields), n("update", w == null ? void 0 : w.data);
1204
+ const h = j.value;
1205
+ M(h);
1206
+ let k;
1207
+ if (await I.post(P.value, h), Z.value === "create" ? k = await I.post(W.value, h) : Z.value === "edit" && (k = ((t = a.config) == null ? void 0 : t.app) === "konnect" ? await I.put(W.value, h) : await I.patch(W.value, h)), k) {
1208
+ const { data: i } = k;
1209
+ e.fields.name = (i == null ? void 0 : i.name) || "", e.fields.port = i.port || se.getPortFromProtocol(i.protocol), e.fields.protocol = (i == null ? void 0 : i.protocol) || "http", e.fields.host = (i == null ? void 0 : i.host) || "", e.fields.path = (i == null ? void 0 : i.path) || "", e.fields.url = (i == null ? void 0 : i.url) || "", e.fields.retries = i != null && i.retries || (i == null ? void 0 : i.retries) === 0 ? i == null ? void 0 : i.retries : 5, e.fields.connect_timeout = i != null && i.connect_timeout || (i == null ? void 0 : i.connect_timeout) === 0 ? i == null ? void 0 : i.connect_timeout : 6e4, e.fields.write_timeout = i != null && i.write_timeout || (i == null ? void 0 : i.write_timeout) === 0 ? i == null ? void 0 : i.write_timeout : 6e4, e.fields.read_timeout = i != null && i.read_timeout || (i == null ? void 0 : i.read_timeout) === 0 ? i == null ? void 0 : i.read_timeout : 6e4, e.fields.client_certificate = ((r = i == null ? void 0 : i.client_certificate) == null ? void 0 : r.id) || "", e.fields.ca_certificates = (_ = i == null ? void 0 : i.ca_certificates) != null && _.length ? i == null ? void 0 : i.ca_certificates.join(",") : "", e.fields.tls_verify_enabled = (i == null ? void 0 : i.tls_verify) !== "" && (i == null ? void 0 : i.tls_verify) !== null && (i == null ? void 0 : i.tls_verify) !== void 0, e.fields.tls_verify_value = e.fields.tls_verify_enabled && (i == null ? void 0 : i.tls_verify), e.fields.tags = (F = i == null ? void 0 : i.tags) != null && F.length ? i.tags.join(", ") : "", e.fields.enabled = (i == null ? void 0 : i.enabled) ?? !0, Object.assign(w, e.fields), n("update", k == null ? void 0 : k.data);
1241
1210
  }
1242
- return w;
1211
+ return k;
1243
1212
  } catch (h) {
1244
- const { fields: w, messages: i } = M(h);
1245
- e.errorMessages = i, w.length && w.forEach((X) => {
1246
- const re = X.field;
1247
- re === "client_certificate.id" ? e.formFieldErrors.client_certificate = X.message : re.startsWith("ca_certificates") ? e.formFieldErrors.ca_certificates = X.message : Object.keys(e.formFieldErrors).includes(re) && (e.formFieldErrors = {
1213
+ const { fields: k, messages: i } = B(h);
1214
+ e.errorMessages = i, k.length && k.forEach((Y) => {
1215
+ const ie = Y.field;
1216
+ ie === "client_certificate.id" ? e.formFieldErrors.client_certificate = Y.message : ie.startsWith("ca_certificates") ? e.formFieldErrors.ca_certificates = Y.message : Object.keys(e.formFieldErrors).includes(ie) && (e.formFieldErrors = {
1248
1217
  ...e.formFieldErrors,
1249
- [re]: X.message
1218
+ [ie]: Y.message
1250
1219
  });
1251
1220
  }), n("error", h);
1252
1221
  } finally {
@@ -1254,85 +1223,85 @@ const Y = {
1254
1223
  }
1255
1224
  };
1256
1225
  return Be(() => a.gatewayServiceId, () => {
1257
- Object.assign(e.fields, C);
1226
+ Object.assign(e.fields, w);
1258
1227
  }), Be(e.fields, (t) => {
1259
- e.fields.port = Z.getPortFromProtocol(t.protocol, String(t.port)), n("model-updated", F.value);
1260
- }), Je(() => {
1261
- n("model-updated", F.value), H.value || (e.fields.name = Te());
1228
+ e.fields.port = se.getPortFromProtocol(t.protocol, String(t.port)), n("model-updated", j.value);
1229
+ }), Ze(() => {
1230
+ n("model-updated", j.value), J.value || (e.fields.name = Ue());
1262
1231
  }), G({
1263
- validateUrl: ae,
1264
- getPayload: F,
1265
- saveFormData: z,
1266
- canSubmit: oe,
1267
- initForm: f
1232
+ validateUrl: Te,
1233
+ getPayload: j,
1234
+ saveFormData: p,
1235
+ canSubmit: f,
1236
+ initForm: g
1268
1237
  }), (t, r) => {
1269
- const _ = L("KRadio"), A = L("KButton"), h = L("KInput"), w = L("KSelect"), i = L("KCheckbox"), X = L("KCollapse"), re = L("KAlert");
1270
- return V(), T("div", Kt, [
1238
+ const _ = L("KRadio"), F = L("KButton"), h = L("KInput"), k = L("KSelect"), i = L("KCheckbox"), Y = L("KCollapse"), ie = L("KAlert");
1239
+ return E(), T("div", Kt, [
1271
1240
  c(o(bt), {
1272
- "can-submit": oe.value,
1241
+ "can-submit": f.value,
1273
1242
  config: s.config,
1274
1243
  "edit-id": s.gatewayServiceId,
1275
- "entity-type": o(ze).GatewayService,
1276
- "fetch-url": Ie.value,
1277
- "form-fields": F.value,
1244
+ "entity-type": o(We).GatewayService,
1245
+ "fetch-url": z.value,
1246
+ "form-fields": j.value,
1278
1247
  "is-readonly": e.isReadonly,
1279
- onCancel: v,
1248
+ onCancel: y,
1280
1249
  "onFetch:error": r[31] || (r[31] = (u) => t.$emit("error", u)),
1281
- "onFetch:success": f,
1250
+ "onFetch:success": g,
1282
1251
  onLoading: r[32] || (r[32] = (u) => t.$emit("loading", u)),
1283
- onSubmit: z
1252
+ onSubmit: p
1284
1253
  }, {
1285
1254
  "form-actions": d(() => [
1286
- Ye(t.$slots, "form-actions", {
1287
- canSubmit: oe.value,
1288
- cancel: v,
1289
- submit: z
1255
+ Xe(t.$slots, "form-actions", {
1256
+ canSubmit: f.value,
1257
+ cancel: y,
1258
+ submit: p
1290
1259
  }, void 0, !0)
1291
1260
  ]),
1292
1261
  default: d(() => [
1293
- c(o(Ne), {
1262
+ c(o(qe), {
1294
1263
  description: o(l)("gateway_services.form.sections.keys.description"),
1295
1264
  "hide-info-header": s.hideSectionsInfo,
1296
1265
  title: o(l)("gateway_services.form.sections.keys.title")
1297
1266
  }, {
1298
1267
  default: d(() => [
1299
- H.value ? D("", !0) : (V(), T("div", Lt, [
1300
- I("div", qt, [
1268
+ J.value ? D("", !0) : (E(), T("div", Lt, [
1269
+ S("div", qt, [
1301
1270
  c(_, {
1302
- modelValue: E.value,
1303
- "onUpdate:modelValue": r[0] || (r[0] = (u) => E.value = u),
1271
+ modelValue: C.value,
1272
+ "onUpdate:modelValue": r[0] || (r[0] = (u) => C.value = u),
1304
1273
  card: "",
1305
1274
  "card-orientation": "horizontal",
1306
1275
  "data-testid": "gateway-service-url-radio",
1307
1276
  description: o(l)("gateway_services.form.sections.keys.url.description"),
1308
1277
  label: o(l)("gateway_services.form.sections.keys.url.label"),
1309
- "selected-value": te.url,
1310
- onChange: ve
1278
+ "selected-value": me.url,
1279
+ onChange: ye
1311
1280
  }, null, 8, ["modelValue", "description", "label", "selected-value"]),
1312
1281
  c(_, {
1313
- modelValue: E.value,
1314
- "onUpdate:modelValue": r[1] || (r[1] = (u) => E.value = u),
1282
+ modelValue: C.value,
1283
+ "onUpdate:modelValue": r[1] || (r[1] = (u) => C.value = u),
1315
1284
  card: "",
1316
1285
  "card-orientation": "horizontal",
1317
1286
  "checked-group": "protocol",
1318
1287
  "data-testid": "gateway-service-protocol-radio",
1319
1288
  description: o(l)("gateway_services.form.sections.keys.protocol.description"),
1320
1289
  label: o(l)("gateway_services.form.sections.keys.protocol.label"),
1321
- "selected-value": te.protocol,
1322
- onChange: ve
1290
+ "selected-value": me.protocol,
1291
+ onChange: ye
1323
1292
  }, null, 8, ["modelValue", "description", "label", "selected-value"])
1324
1293
  ]),
1325
1294
  c(Me, { name: "slide-fade" }, {
1326
1295
  default: d(() => [
1327
- E.value === "url" ? (V(), T("div", Gt, [
1296
+ C.value === "url" ? (E(), T("div", Gt, [
1328
1297
  c(h, {
1329
1298
  modelValue: e.fields.url,
1330
1299
  "onUpdate:modelValue": r[2] || (r[2] = (u) => e.fields.url = u),
1331
1300
  modelModifiers: { trim: !0 },
1332
1301
  class: "gateway-service-url-input gateway-service-form-margin-bottom",
1333
1302
  "data-testid": "gateway-service-url-input",
1334
- error: $e.value,
1335
- "error-message": J("url"),
1303
+ error: Ae.value,
1304
+ "error-message": $("url"),
1336
1305
  label: o(l)("gateway_services.form.fields.upstream_url.label"),
1337
1306
  "label-attributes": {
1338
1307
  info: s.config.app === "konnect" ? o(l)("gateway_services.form.fields.upstream_url.tooltip_for_konnect") : o(l)("gateway_services.form.fields.upstream_url.tooltip_for_km"),
@@ -1341,19 +1310,19 @@ const Y = {
1341
1310
  name: "url",
1342
1311
  placeholder: o(l)("gateway_services.form.fields.upstream_url.placeholder"),
1343
1312
  required: "",
1344
- onInput: ye
1345
- }, Ce({ _: 2 }, [
1313
+ onInput: he
1314
+ }, Se({ _: 2 }, [
1346
1315
  s.hideTrySampleApiButton ? void 0 : {
1347
1316
  name: "after",
1348
1317
  fn: d(() => [
1349
- c(A, {
1318
+ c(F, {
1350
1319
  appearance: "tertiary",
1351
1320
  "data-testid": "try-sample-api",
1352
1321
  size: "small",
1353
- onClick: ge
1322
+ onClick: _e
1354
1323
  }, {
1355
1324
  default: d(() => [
1356
- K(k(o(l)("gateway_services.form.buttons.try_sample")), 1)
1325
+ K(V(o(l)("gateway_services.form.buttons.try_sample")), 1)
1357
1326
  ]),
1358
1327
  _: 1
1359
1328
  })
@@ -1368,12 +1337,12 @@ const Y = {
1368
1337
  ])),
1369
1338
  c(Me, { name: "slide-fade" }, {
1370
1339
  default: d(() => [
1371
- E.value === "protocol" || H.value ? (V(), T("div", Nt, [
1372
- c(w, {
1340
+ C.value === "protocol" || J.value ? (E(), T("div", Nt, [
1341
+ c(k, {
1373
1342
  modelValue: e.fields.protocol,
1374
1343
  "onUpdate:modelValue": r[3] || (r[3] = (u) => e.fields.protocol = u),
1375
1344
  "data-testid": "gateway-service-protocol-select",
1376
- items: U,
1345
+ items: re,
1377
1346
  label: o(l)("gateway_services.form.fields.protocol.label"),
1378
1347
  "label-attributes": {
1379
1348
  info: o(l)("gateway_services.form.fields.protocol.tooltip"),
@@ -1382,7 +1351,7 @@ const Y = {
1382
1351
  readonly: e.isReadonly,
1383
1352
  required: "",
1384
1353
  width: "100%",
1385
- onSelected: r[4] || (r[4] = (u) => Ae(e.fields.protocol, u))
1354
+ onSelected: r[4] || (r[4] = (u) => ve(e.fields.protocol, u))
1386
1355
  }, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
1387
1356
  c(h, {
1388
1357
  modelValue: e.fields.host,
@@ -1391,7 +1360,7 @@ const Y = {
1391
1360
  class: "gateway-service-form-margin-top",
1392
1361
  "data-testid": "gateway-service-host-input",
1393
1362
  error: !!e.formFieldErrors.host,
1394
- "error-message": J("host"),
1363
+ "error-message": $("host"),
1395
1364
  label: o(l)("gateway_services.form.fields.host.label"),
1396
1365
  "label-attributes": {
1397
1366
  info: o(l)("gateway_services.form.fields.host.tooltip"),
@@ -1400,18 +1369,18 @@ const Y = {
1400
1369
  name: "host",
1401
1370
  placeholder: o(l)("gateway_services.form.fields.host.placeholder"),
1402
1371
  required: "",
1403
- onInput: r[6] || (r[6] = (u) => x("host"))
1404
- }, Ce({ _: 2 }, [
1372
+ onInput: r[6] || (r[6] = (u) => H("host"))
1373
+ }, Se({ _: 2 }, [
1405
1374
  s.hideTrySampleApiButton ? void 0 : {
1406
1375
  name: "after",
1407
1376
  fn: d(() => [
1408
- c(A, {
1377
+ c(F, {
1409
1378
  appearance: "tertiary",
1410
1379
  size: "small",
1411
- onClick: ge
1380
+ onClick: _e
1412
1381
  }, {
1413
1382
  default: d(() => [
1414
- K(k(o(l)("gateway_services.form.buttons.try_sample")), 1)
1383
+ K(V(o(l)("gateway_services.form.buttons.try_sample")), 1)
1415
1384
  ]),
1416
1385
  _: 1
1417
1386
  })
@@ -1419,7 +1388,7 @@ const Y = {
1419
1388
  key: "0"
1420
1389
  }
1421
1390
  ]), 1032, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder"]),
1422
- he.value ? (V(), T("div", Ot, [
1391
+ ne.value ? (E(), T("div", Ot, [
1423
1392
  c(h, {
1424
1393
  modelValue: e.fields.path,
1425
1394
  "onUpdate:modelValue": r[7] || (r[7] = (u) => e.fields.path = u),
@@ -1427,7 +1396,7 @@ const Y = {
1427
1396
  class: "gateway-service-form-margin-top",
1428
1397
  "data-testid": "gateway-service-path-input",
1429
1398
  error: !!e.formFieldErrors.path,
1430
- "error-message": J("path"),
1399
+ "error-message": $("path"),
1431
1400
  label: o(l)("gateway_services.form.fields.path.label"),
1432
1401
  "label-attributes": {
1433
1402
  info: o(l)("gateway_services.form.fields.path.tooltip"),
@@ -1435,7 +1404,7 @@ const Y = {
1435
1404
  },
1436
1405
  name: "path",
1437
1406
  placeholder: o(l)("gateway_services.form.fields.path.placeholder"),
1438
- onInput: r[8] || (r[8] = (u) => x("path"))
1407
+ onInput: r[8] || (r[8] = (u) => H("path"))
1439
1408
  }, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder"])
1440
1409
  ])) : D("", !0),
1441
1410
  c(h, {
@@ -1443,13 +1412,13 @@ const Y = {
1443
1412
  "onUpdate:modelValue": [
1444
1413
  r[9] || (r[9] = (u) => e.fields.port = u),
1445
1414
  r[11] || (r[11] = () => {
1446
- e.fields.port = W(e.fields.port + "");
1415
+ e.fields.port = Q(e.fields.port + "");
1447
1416
  })
1448
1417
  ],
1449
1418
  class: "gateway-service-form-margin-top",
1450
1419
  "data-testid": "gateway-service-port-input",
1451
1420
  error: !!e.formFieldErrors.port,
1452
- "error-message": J("port"),
1421
+ "error-message": $("port"),
1453
1422
  label: o(l)("gateway_services.form.fields.port.label"),
1454
1423
  "label-attributes": {
1455
1424
  info: o(l)("gateway_services.form.fields.port.tooltip"),
@@ -1457,15 +1426,15 @@ const Y = {
1457
1426
  },
1458
1427
  name: "port",
1459
1428
  type: "number",
1460
- onInput: r[10] || (r[10] = (u) => x("port"))
1429
+ onInput: r[10] || (r[10] = (u) => H("port"))
1461
1430
  }, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes"])
1462
1431
  ])) : D("", !0)
1463
1432
  ]),
1464
1433
  _: 1
1465
1434
  }),
1466
- c(X, {
1467
- modelValue: g.value,
1468
- "onUpdate:modelValue": r[27] || (r[27] = (u) => g.value = u),
1435
+ c(Y, {
1436
+ modelValue: v.value,
1437
+ "onUpdate:modelValue": r[27] || (r[27] = (u) => v.value = u),
1469
1438
  "data-testid": "advanced-fields-collapse",
1470
1439
  "trigger-alignment": "leading",
1471
1440
  "trigger-label": o(l)("gateway_services.form.sections.keys.viewAdvancedFields")
@@ -1473,14 +1442,14 @@ const Y = {
1473
1442
  default: d(() => [
1474
1443
  c(Me, { name: "slide-fade" }, {
1475
1444
  default: d(() => [
1476
- g.value ? D("", !0) : (V(), T("div", Wt, [
1477
- I("div", jt, [
1445
+ v.value ? D("", !0) : (E(), T("div", Wt, [
1446
+ S("div", jt, [
1478
1447
  c(h, {
1479
1448
  modelValue: e.fields.retries,
1480
1449
  "onUpdate:modelValue": [
1481
1450
  r[12] || (r[12] = (u) => e.fields.retries = u),
1482
1451
  r[13] || (r[13] = () => {
1483
- e.fields.retries = W(e.fields.retries + "");
1452
+ e.fields.retries = Q(e.fields.retries + "");
1484
1453
  })
1485
1454
  ],
1486
1455
  autocomplete: "off",
@@ -1495,13 +1464,13 @@ const Y = {
1495
1464
  type: "number"
1496
1465
  }, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
1497
1466
  ]),
1498
- I("div", zt, [
1467
+ S("div", zt, [
1499
1468
  c(h, {
1500
1469
  modelValue: e.fields.connect_timeout,
1501
1470
  "onUpdate:modelValue": [
1502
1471
  r[14] || (r[14] = (u) => e.fields.connect_timeout = u),
1503
1472
  r[15] || (r[15] = () => {
1504
- e.fields.connect_timeout = W(e.fields.connect_timeout + "");
1473
+ e.fields.connect_timeout = Q(e.fields.connect_timeout + "");
1505
1474
  })
1506
1475
  ],
1507
1476
  autocomplete: "off",
@@ -1516,13 +1485,13 @@ const Y = {
1516
1485
  type: "number"
1517
1486
  }, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
1518
1487
  ]),
1519
- I("div", Ht, [
1488
+ S("div", Ht, [
1520
1489
  c(h, {
1521
1490
  modelValue: e.fields.write_timeout,
1522
1491
  "onUpdate:modelValue": [
1523
1492
  r[16] || (r[16] = (u) => e.fields.write_timeout = u),
1524
1493
  r[17] || (r[17] = () => {
1525
- e.fields.write_timeout = W(e.fields.write_timeout + "");
1494
+ e.fields.write_timeout = Q(e.fields.write_timeout + "");
1526
1495
  })
1527
1496
  ],
1528
1497
  autocomplete: "off",
@@ -1537,13 +1506,13 @@ const Y = {
1537
1506
  type: "number"
1538
1507
  }, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
1539
1508
  ]),
1540
- I("div", Zt, [
1509
+ S("div", Zt, [
1541
1510
  c(h, {
1542
1511
  modelValue: e.fields.read_timeout,
1543
1512
  "onUpdate:modelValue": [
1544
1513
  r[18] || (r[18] = (u) => e.fields.read_timeout = u),
1545
1514
  r[19] || (r[19] = () => {
1546
- e.fields.read_timeout = W(e.fields.read_timeout + "");
1515
+ e.fields.read_timeout = Q(e.fields.read_timeout + "");
1547
1516
  })
1548
1517
  ],
1549
1518
  autocomplete: "off",
@@ -1558,7 +1527,7 @@ const Y = {
1558
1527
  type: "number"
1559
1528
  }, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
1560
1529
  ]),
1561
- be.value ? (V(), T("div", Jt, [
1530
+ $e.value ? (E(), T("div", Jt, [
1562
1531
  c(h, {
1563
1532
  modelValue: e.fields.client_certificate,
1564
1533
  "onUpdate:modelValue": r[20] || (r[20] = (u) => e.fields.client_certificate = u),
@@ -1575,10 +1544,10 @@ const Y = {
1575
1544
  placeholder: o(l)("gateway_services.form.fields.client_certificate.placeholder"),
1576
1545
  readonly: e.isReadonly,
1577
1546
  type: "text",
1578
- onInput: r[21] || (r[21] = (u) => _e("client_certificate"))
1547
+ onInput: r[21] || (r[21] = (u) => be("client_certificate"))
1579
1548
  }, null, 8, ["modelValue", "error", "label", "label-attributes", "placeholder", "readonly"])
1580
1549
  ])) : D("", !0),
1581
- Ue.value ? (V(), T("div", Qt, [
1550
+ Re.value ? (E(), T("div", Qt, [
1582
1551
  c(h, {
1583
1552
  modelValue: e.fields.ca_certificates,
1584
1553
  "onUpdate:modelValue": r[22] || (r[22] = (u) => e.fields.ca_certificates = u),
@@ -1591,7 +1560,7 @@ const Y = {
1591
1560
  placeholder: o(l)("gateway_services.form.fields.ca_certificates.placeholder"),
1592
1561
  readonly: e.isReadonly,
1593
1562
  type: "text",
1594
- onInput: r[23] || (r[23] = (u) => _e("ca_certificates"))
1563
+ onInput: r[23] || (r[23] = (u) => be("ca_certificates"))
1595
1564
  }, {
1596
1565
  "label-tooltip": d(() => [
1597
1566
  c(o(N), {
@@ -1599,10 +1568,10 @@ const Y = {
1599
1568
  scope: "global"
1600
1569
  }, {
1601
1570
  code1: d(() => [
1602
- I("code", null, k(o(l)("gateway_services.form.fields.ca_certificates.code1")), 1)
1571
+ S("code", null, V(o(l)("gateway_services.form.fields.ca_certificates.code1")), 1)
1603
1572
  ]),
1604
1573
  code2: d(() => [
1605
- I("code", null, k(o(l)("gateway_services.form.fields.ca_certificates.code2")), 1)
1574
+ S("code", null, V(o(l)("gateway_services.form.fields.ca_certificates.code2")), 1)
1606
1575
  ]),
1607
1576
  _: 1
1608
1577
  })
@@ -1610,7 +1579,7 @@ const Y = {
1610
1579
  _: 1
1611
1580
  }, 8, ["modelValue", "error", "label", "placeholder", "readonly"])
1612
1581
  ])) : D("", !0),
1613
- Re.value ? (V(), T("div", Xt, [
1582
+ ce.value ? (E(), T("div", Xt, [
1614
1583
  c(i, {
1615
1584
  modelValue: e.fields.tls_verify_enabled,
1616
1585
  "onUpdate:modelValue": r[24] || (r[24] = (u) => e.fields.tls_verify_enabled = u),
@@ -1625,14 +1594,14 @@ const Y = {
1625
1594
  scope: "global"
1626
1595
  }, {
1627
1596
  code1: d(() => [
1628
- I("code", null, k(o(l)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
1597
+ S("code", null, V(o(l)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
1629
1598
  ]),
1630
1599
  _: 1
1631
1600
  })
1632
1601
  ]),
1633
1602
  _: 1
1634
1603
  }, 8, ["modelValue", "description", "label"]),
1635
- e.fields.tls_verify_enabled ? (V(), T("div", Yt, [
1604
+ e.fields.tls_verify_enabled ? (E(), T("div", Yt, [
1636
1605
  c(_, {
1637
1606
  modelValue: e.fields.tls_verify_value,
1638
1607
  "onUpdate:modelValue": r[25] || (r[25] = (u) => e.fields.tls_verify_value = u),
@@ -1641,7 +1610,7 @@ const Y = {
1641
1610
  "selected-value": !0
1642
1611
  }, null, 8, ["modelValue", "label"])
1643
1612
  ])) : D("", !0),
1644
- e.fields.tls_verify_enabled ? (V(), T("div", eo, [
1613
+ e.fields.tls_verify_enabled ? (E(), T("div", eo, [
1645
1614
  c(_, {
1646
1615
  modelValue: e.fields.tls_verify_value,
1647
1616
  "onUpdate:modelValue": r[26] || (r[26] = (u) => e.fields.tls_verify_value = u),
@@ -1661,7 +1630,7 @@ const Y = {
1661
1630
  ]),
1662
1631
  _: 1
1663
1632
  }, 8, ["description", "hide-info-header", "title"]),
1664
- c(o(Ne), {
1633
+ c(o(qe), {
1665
1634
  description: o(l)("gateway_services.form.sections.general.description"),
1666
1635
  "hide-info-header": s.hideSectionsInfo,
1667
1636
  title: o(l)("gateway_services.form.sections.general.title")
@@ -1673,8 +1642,8 @@ const Y = {
1673
1642
  modelModifiers: { trim: !0 },
1674
1643
  autocomplete: "off",
1675
1644
  "data-testid": "gateway-service-name-input",
1676
- error: Fe.value,
1677
- "error-message": le.value,
1645
+ error: oe.value,
1646
+ "error-message": ae.value,
1678
1647
  label: o(l)("gateway_services.form.fields.name.label"),
1679
1648
  "label-attributes": {
1680
1649
  info: o(l)("gateway_services.form.fields.name.tooltip"),
@@ -1684,15 +1653,15 @@ const Y = {
1684
1653
  placeholder: o(l)("gateway_services.form.fields.name.placeholder"),
1685
1654
  readonly: e.isReadonly,
1686
1655
  type: "text",
1687
- onInput: ne
1656
+ onInput: we
1688
1657
  }, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder", "readonly"]),
1689
- c(X, {
1658
+ c(Y, {
1690
1659
  "data-testid": "tags-collapse",
1691
1660
  "trigger-alignment": "leading",
1692
1661
  "trigger-label": o(l)("gateway_services.form.fields.tags.collapse")
1693
1662
  }, {
1694
1663
  default: d(() => [
1695
- I("div", to, [
1664
+ S("div", to, [
1696
1665
  c(h, {
1697
1666
  modelValue: e.fields.tags,
1698
1667
  "onUpdate:modelValue": r[29] || (r[29] = (u) => e.fields.tags = u),
@@ -1718,14 +1687,14 @@ const Y = {
1718
1687
  ]),
1719
1688
  _: 1
1720
1689
  }, 8, ["description", "hide-info-header", "title"]),
1721
- e.errorMessages.length ? (V(), de(re, {
1690
+ e.errorMessages.length ? (E(), Ee(ie, {
1722
1691
  key: 0,
1723
1692
  appearance: "danger",
1724
1693
  "data-testid": "form-error"
1725
1694
  }, {
1726
1695
  default: d(() => [
1727
- I("ul", oo, [
1728
- (V(!0), T(Qe, null, Xe(e.errorMessages, (u) => (V(), T("li", { key: u }, k(u), 1))), 128))
1696
+ S("ul", oo, [
1697
+ (E(!0), T(Je, null, Qe(e.errorMessages, (u) => (E(), T("li", { key: u }, V(u), 1))), 128))
1729
1698
  ])
1730
1699
  ]),
1731
1700
  _: 1
@@ -1736,7 +1705,7 @@ const Y = {
1736
1705
  ]);
1737
1706
  };
1738
1707
  }
1739
- }), go = /* @__PURE__ */ He(ro, [["__scopeId", "data-v-2ef1cab4"]]), { validateHost: io, validatePort: lo, validateProtocol: so, validatePath: ao } = Y.useUrlValidators(), yo = () => ({
1708
+ }), go = /* @__PURE__ */ je(ro, [["__scopeId", "data-v-2ef1cab4"]]), { validateHost: io, validatePort: lo, validateProtocol: so, validatePath: ao } = ee.useUrlValidators(), yo = () => ({
1740
1709
  validateHost: io,
1741
1710
  validatePort: lo,
1742
1711
  validateProtocol: so,