@kong-ui-public/entities-gateway-services 3.8.35 → 3.8.37-pr.1775.486e9e080.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,4 +1,4 @@
1
- import { defineComponent as Ve, ref as V, computed as h, watch as ke, onBeforeMount as xe, resolveComponent as A, openBlock as S, createElementBlock as U, createVNode as u, unref as o, withCtx as p, createBlock as Ce, Teleport as Ae, withDirectives as Fe, createTextVNode as E, toDisplayString as _, vShow as $e, createElementVNode as C, withModifiers as we, reactive as Se, onMounted as De, renderSlot as Be, createCommentVNode as L } from "vue";
1
+ import { defineComponent as Ve, ref as V, computed as h, watch as ke, onBeforeMount as xe, resolveComponent as F, openBlock as S, createElementBlock as U, createVNode as u, unref as o, withCtx as p, createBlock as Ce, Teleport as Ae, withDirectives as Fe, createTextVNode as E, toDisplayString as _, vShow as $e, createElementVNode as C, withModifiers as we, reactive as Se, onMounted as De, renderSlot as Be, createCommentVNode as L } from "vue";
2
2
  import { useRouter as Ue } from "vue-router";
3
3
  import { AddIcon as Ge } from "@kong/icons";
4
4
  import { createI18n as Le, i18nTComponent as Ke } from "@kong-ui-public/i18n";
@@ -192,11 +192,11 @@ function dt() {
192
192
  }
193
193
  function ut() {
194
194
  return {
195
- getPortFromProtocol: ($, m) => {
195
+ getPortFromProtocol: (D, m) => {
196
196
  const d = [80, 443], r = Number(m);
197
197
  if ((r || r === 0) && !d.includes(r))
198
198
  return r;
199
- switch ($) {
199
+ switch (D) {
200
200
  case "grpcs":
201
201
  case "tls":
202
202
  case "https":
@@ -286,9 +286,9 @@ const ue = {
286
286
  }
287
287
  },
288
288
  emits: ["error", "copy:success", "copy:error", "delete:success", "toggle:success"],
289
- setup(n, { emit: $ }) {
289
+ setup(n, { emit: D }) {
290
290
  var P;
291
- const m = $, d = n, { i18n: { t: r, formatUnixTimeStamp: M } } = ue.useI18n(), W = Ue(), { axiosInstance: K } = Ee((P = d.config) == null ? void 0 : P.axiosRequestConfig), s = V(1), I = h(() => d.config.app !== "kongManager" || !!d.config.disableSorting), b = {
291
+ const m = D, d = n, { i18n: { t: r, formatUnixTimeStamp: M } } = ue.useI18n(), W = Ue(), { axiosInstance: K } = Ee((P = d.config) == null ? void 0 : P.axiosRequestConfig), s = V(1), I = 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
294
  ...d.config.showControlPlaneColumn ? { control_plane: { label: r("gateway_services.list.table_headers.control_plane") } } : {},
@@ -304,11 +304,11 @@ const ue = {
304
304
  columnVisibility: {
305
305
  created_at: !1
306
306
  }
307
- }, pe = b, F = h(() => {
307
+ }, pe = b, $ = h(() => {
308
308
  var f, l;
309
309
  let a = `${d.config.apiBaseUrl}${oe.list[d.config.app].all}`;
310
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
- }), me = h(() => d.config.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${F.value}`) : new URL(F.value)), D = V(""), w = h(() => {
311
+ }), me = h(() => d.config.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${$.value}`) : new URL($.value)), B = V(""), w = h(() => {
312
312
  const a = d.config.app === "konnect" || d.config.isExactMatch;
313
313
  if (a)
314
314
  return {
@@ -321,8 +321,8 @@ const ue = {
321
321
  fields: { name: f, enabled: l, protocol: k, host: c, port: x, path: ae },
322
322
  schema: d.config.filterSchema
323
323
  };
324
- }), { fetcher: j, fetcherState: H } = qe(d.config, F.value), ve = () => {
325
- D.value = "";
324
+ }), { fetcher: j, fetcherState: H } = qe(d.config, $.value), ve = () => {
325
+ B.value = "";
326
326
  }, e = () => {
327
327
  s.value++;
328
328
  }, y = V(null), J = V(!1), ge = h(() => ({
@@ -330,7 +330,7 @@ const ue = {
330
330
  ctaText: g.value ? d.isServerless ? r("actions.serverless_create") : r("actions.create") : void 0,
331
331
  message: `${r("gateway_services.list.empty_state.description")}${d.config.additionMessageForEmptyState ? ` ${d.config.additionMessageForEmptyState}` : ""}`,
332
332
  title: g.value ? d.isServerless ? r("gateway_services.list.empty_state.serverless_title") : r("gateway_services.list.empty_state.title") : r("gateway_services.title")
333
- })), O = V(!1), T = V(null), B = h(() => {
333
+ })), O = V(!1), T = V(null), G = h(() => {
334
334
  const a = {
335
335
  action: "disable",
336
336
  id: "",
@@ -395,7 +395,7 @@ const ue = {
395
395
  }), re = (a) => ({
396
396
  label: r("actions.edit"),
397
397
  to: d.config.getEditRoute(a)
398
- }), R = V(void 0), X = V(!1), q = V(!1), Y = V(""), N = Ne(d.config, F.value), Z = (a) => {
398
+ }), R = V(void 0), X = V(!1), q = V(!1), Y = V(""), N = Ne(d.config, $.value), Z = (a) => {
399
399
  R.value = a, X.value = !0, Y.value = "";
400
400
  }, ee = () => {
401
401
  X.value = !1, R.value = void 0;
@@ -426,7 +426,7 @@ const ue = {
426
426
  return xe(async () => {
427
427
  g.value = await d.canCreate();
428
428
  }), (a, f) => {
429
- const l = A("KButton"), k = A("KBadge"), c = A("KInputSwitch"), x = A("KDropdownItem"), ae = A("KClipboardProvider");
429
+ const l = F("KButton"), k = F("KBadge"), c = F("KInputSwitch"), x = F("KDropdownItem"), ae = F("KClipboardProvider");
430
430
  return S(), U("div", ft, [
431
431
  u(o(We), {
432
432
  "cache-identifier": n.cacheIdentifier,
@@ -440,7 +440,7 @@ const ue = {
440
440
  "hide-toolbar": J.value,
441
441
  "pagination-type": "offset",
442
442
  "preferences-storage-key": "kong-ui-entities-gateway-services-list",
443
- query: D.value,
443
+ query: B.value,
444
444
  "table-headers": o(pe),
445
445
  onClearSearchInput: ve,
446
446
  "onClick:row": f[2] || (f[2] = (v) => he(v)),
@@ -448,8 +448,8 @@ const ue = {
448
448
  }, {
449
449
  "toolbar-filter": p(() => [
450
450
  u(o(Oe), {
451
- modelValue: D.value,
452
- "onUpdate:modelValue": f[0] || (f[0] = (v) => D.value = v),
451
+ modelValue: B.value,
452
+ "onUpdate:modelValue": f[0] || (f[0] = (v) => B.value = v),
453
453
  config: w.value
454
454
  }, null, 8, ["modelValue", "config"])
455
455
  ]),
@@ -485,9 +485,9 @@ const ue = {
485
485
  C("b", null, _(v ?? "-"), 1)
486
486
  ]),
487
487
  control_plane: p(({ row: v }) => {
488
- var G;
488
+ var A;
489
489
  return [
490
- (G = v.x_meta) != null && G.cluster_id ? (S(), Ce(k, {
490
+ (A = v.x_meta) != null && A.cluster_id ? (S(), Ce(k, {
491
491
  key: 0,
492
492
  tooltip: v.x_meta.cluster_id,
493
493
  "truncation-tooltip": "",
@@ -505,7 +505,7 @@ const ue = {
505
505
  "auth-function": () => n.canEdit(v),
506
506
  "force-show": ""
507
507
  }, {
508
- default: p(({ isAllowed: G }) => [
508
+ default: p(({ isAllowed: A }) => [
509
509
  C("div", {
510
510
  onClick: f[1] || (f[1] = we(() => {
511
511
  }, ["stop"]))
@@ -514,7 +514,7 @@ const ue = {
514
514
  modelValue: v.enabled,
515
515
  "onUpdate:modelValue": (te) => v.enabled = te,
516
516
  "data-testid": `row-${v.id}-toggle-input`,
517
- disabled: !G,
517
+ disabled: !A,
518
518
  onClick: we((te) => ie(v), ["prevent"])
519
519
  }, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "disabled", "onClick"])
520
520
  ])
@@ -528,15 +528,15 @@ const ue = {
528
528
  created_at: p(({ rowValue: v }) => [
529
529
  E(_(o(M)(v)), 1)
530
530
  ]),
531
- updated_at: p(({ rowValue: v }) => [
532
- E(_(o(M)(v)), 1)
531
+ updated_at: p(({ row: v, rowValue: A }) => [
532
+ E(_(o(M)(A ?? v.created_at)), 1)
533
533
  ]),
534
534
  actions: p(({ row: v }) => [
535
535
  u(ae, null, {
536
- default: p(({ copyToClipboard: G }) => [
536
+ default: p(({ copyToClipboard: A }) => [
537
537
  u(x, {
538
538
  "data-testid": "action-entity-copy-id",
539
- onClick: (te) => _e(v, G)
539
+ onClick: (te) => _e(v, A)
540
540
  }, {
541
541
  default: p(() => [
542
542
  E(_(o(r)("actions.copy_id")), 1)
@@ -547,10 +547,10 @@ const ue = {
547
547
  _: 2
548
548
  }, 1024),
549
549
  u(ae, null, {
550
- default: p(({ copyToClipboard: G }) => [
550
+ default: p(({ copyToClipboard: A }) => [
551
551
  u(x, {
552
552
  "data-testid": "action-entity-copy-json",
553
- onClick: (te) => be(v, G)
553
+ onClick: (te) => be(v, A)
554
554
  }, {
555
555
  default: p(() => [
556
556
  E(_(o(r)("actions.copy_json")), 1)
@@ -591,7 +591,7 @@ const ue = {
591
591
  danger: "",
592
592
  "data-testid": "action-entity-delete",
593
593
  "has-divider": "",
594
- onClick: (G) => Z(v)
594
+ onClick: (A) => Z(v)
595
595
  }, {
596
596
  default: p(() => [
597
597
  E(_(o(r)("actions.delete.menu_label")), 1)
@@ -605,9 +605,9 @@ const ue = {
605
605
  _: 1
606
606
  }, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "hide-toolbar", "query", "table-headers"]),
607
607
  u(o(He), {
608
- action: B.value.action,
609
- "entity-id": B.value.id,
610
- "entity-name": B.value.name,
608
+ action: G.value.action,
609
+ "entity-id": G.value.id,
610
+ "entity-name": G.value.name,
611
611
  "entity-type": o(r)("glossary.gateway_services"),
612
612
  "on-confirm": se,
613
613
  visible: O.value,
@@ -628,12 +628,12 @@ const ue = {
628
628
  ]);
629
629
  };
630
630
  }
631
- }), Re = (n, $) => {
631
+ }), Re = (n, D) => {
632
632
  const m = n.__vccOpts || n;
633
- for (const [d, r] of $)
633
+ for (const [d, r] of D)
634
634
  m[d] = r;
635
635
  return m;
636
- }, Gt = /* @__PURE__ */ Re(mt, [["__scopeId", "data-v-d7870a2d"]]), vt = { class: "kong-ui-entities-gateway-service-form" }, gt = { key: 0 }, yt = { class: "gateway-service-form-traffic-label" }, _t = { class: "gateway-service-form-margin-bottom" }, bt = {
636
+ }, Gt = /* @__PURE__ */ Re(mt, [["__scopeId", "data-v-48f9a998"]]), vt = { class: "kong-ui-entities-gateway-service-form" }, gt = { key: 0 }, yt = { class: "gateway-service-form-traffic-label" }, _t = { class: "gateway-service-form-margin-bottom" }, bt = {
637
637
  key: 0,
638
638
  class: "gateway-service-form-group-fields"
639
639
  }, ht = {
@@ -677,9 +677,9 @@ const ue = {
677
677
  }
678
678
  },
679
679
  emits: ["update", "error", "url-valid:success", "url-valid:error", "loading", "model-updated"],
680
- setup(n, { expose: $, emit: m }) {
680
+ setup(n, { expose: D, emit: m }) {
681
681
  var ee;
682
- const d = m, r = n, M = V(!0), W = Ue(), { i18nT: K, i18n: { t: s } } = ue.useI18n(), { getMessageFromError: I } = Qe(), { axiosInstance: b } = Ee((ee = r.config) == null ? void 0 : ee.axiosRequestConfig), fe = Xe(), pe = h(() => oe.form[r.config.app].edit), F = h(() => r.gatewayServiceId ? Te.Edit : Te.Create), me = V(!1), D = h(() => !!r.gatewayServiceId), w = V(D.value ? "protocol" : "url"), j = ue.usePortFromProtocol(), H = V(""), ve = h(() => !!H.value), e = Se({
682
+ const d = m, r = n, M = V(!0), W = Ue(), { i18nT: K, i18n: { t: s } } = ue.useI18n(), { getMessageFromError: I } = Qe(), { axiosInstance: b } = Ee((ee = r.config) == null ? void 0 : ee.axiosRequestConfig), fe = Xe(), pe = h(() => oe.form[r.config.app].edit), $ = h(() => r.gatewayServiceId ? Te.Edit : Te.Create), me = V(!1), B = h(() => !!r.gatewayServiceId), w = V(B.value ? "protocol" : "url"), j = ue.usePortFromProtocol(), H = V(""), ve = h(() => !!H.value), e = Se({
683
683
  fields: {
684
684
  name: "",
685
685
  protocol: "http",
@@ -776,7 +776,7 @@ const ue = {
776
776
  }
777
777
  ], O = { url: "url", protocol: "protocol" }, T = (t, i) => {
778
778
  i.value;
779
- }, B = (t) => t ? parseFloat(t) : 0, ie = () => {
779
+ }, G = (t) => t ? parseFloat(t) : 0, ie = () => {
780
780
  M.value = !0, e.errorMessage = "", e.fields.host = y.host, e.fields.path = y.path, e.fields.port = y.port, e.fields.protocol = y.protocol, e.fields.url = y.url, e.fields.retries = y.retries, e.fields.connect_timeout = y.connect_timeout, e.fields.write_timeout = y.write_timeout, e.fields.read_timeout = y.read_timeout, e.fields.client_certificate = y.client_certificate, e.fields.ca_certificates = y.ca_certificates, e.fields.tls_verify_enabled = y.tls_verify_enabled, e.fields.tls_verify_value = y.tls_verify_value;
781
781
  }, z = () => {
782
782
  if (e.fields.url && w.value === "url")
@@ -807,7 +807,7 @@ const ue = {
807
807
  return w.value === "protocol" && t;
808
808
  }), he = (t) => {
809
809
  H.value = fe.utf8Name(t);
810
- }, Q = h(() => D.value && JSON.stringify(e.fields) !== JSON.stringify(y) || w.value === "url" && !!e.fields.url || w.value === "protocol" && !!e.fields.host), re = (t) => {
810
+ }, Q = h(() => B.value && JSON.stringify(e.fields) !== JSON.stringify(y) || w.value === "url" && !!e.fields.url || w.value === "protocol" && !!e.fields.host), re = (t) => {
811
811
  var i, g, P;
812
812
  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 = ((g = t == null ? void 0 : t.ca_certificates) == null ? void 0 : g.join(",")) || "", e.fields.client_certificate = ((P = t == null ? void 0 : t.client_certificate) == null ? void 0 : P.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(y, e.fields);
813
813
  }, R = () => {
@@ -818,7 +818,7 @@ const ue = {
818
818
  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, (g = r.config) != null && g.workspace ? `/${r.config.workspace}` : "")), t = t.replace(/{id}/gi, r.gatewayServiceId), t;
819
819
  }), q = h(() => {
820
820
  var i, g;
821
- let t = `${r.config.apiBaseUrl}${oe.form[r.config.app][F.value]}`;
821
+ let t = `${r.config.apiBaseUrl}${oe.form[r.config.app][$.value]}`;
822
822
  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, (g = r.config) != null && g.workspace ? `/${r.config.workspace}` : "")), t = t.replace(/{id}/gi, r.gatewayServiceId), t;
823
823
  }), Y = (t) => {
824
824
  let i = "";
@@ -842,7 +842,7 @@ const ue = {
842
842
  port: e.fields.port,
843
843
  url: e.fields.url
844
844
  };
845
- 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), se.value || (t.path = null), F.value === "create" ? w.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;
845
+ 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), se.value || (t.path = null), $.value === "create" ? w.value === "url" ? (delete t.protocol, delete t.host, delete t.path, r.config.app === "konnect" && delete t.port) : delete t.url : $.value === "edit" && delete t.url, t;
846
846
  }), Z = async () => {
847
847
  var t, i, g, P;
848
848
  try {
@@ -850,7 +850,7 @@ const ue = {
850
850
  const a = N.value;
851
851
  Y(a);
852
852
  let f;
853
- if (await b.post(X.value, a), F.value === "create" ? f = await b.post(q.value, a) : F.value === "edit" && (f = ((t = r.config) == null ? void 0 : t.app) === "konnect" ? await b.put(q.value, a) : await b.patch(q.value, a)), f) {
853
+ if (await b.post(X.value, a), $.value === "create" ? f = await b.post(q.value, a) : $.value === "edit" && (f = ((t = r.config) == null ? void 0 : t.app) === "konnect" ? await b.put(q.value, a) : await b.patch(q.value, a)), f) {
854
854
  const { data: l } = f;
855
855
  e.fields.name = (l == null ? void 0 : l.name) || "", e.fields.port = l.port || j.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 = (g = l == null ? void 0 : l.ca_certificates) != null && g.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 = (P = l == null ? void 0 : l.tags) != null && P.length ? l.tags.join(", ") : "", Object.assign(y, e.fields), d("update", f == null ? void 0 : f.data);
856
856
  }
@@ -867,14 +867,14 @@ const ue = {
867
867
  e.fields.port = j.getPortFromProtocol(t.protocol, String(t.port)), d("model-updated", N.value);
868
868
  }), De(() => {
869
869
  d("model-updated", N.value);
870
- }), $({
870
+ }), D({
871
871
  validateUrl: z,
872
872
  getPayload: N,
873
873
  saveFormData: Z,
874
874
  canSubmit: Q,
875
875
  initForm: re
876
876
  }), (t, i) => {
877
- const g = A("KInput"), P = A("KLabel"), a = A("KRadio"), f = A("KSelect"), l = A("KCheckbox"), k = A("KCollapse");
877
+ const g = F("KInput"), P = F("KLabel"), a = F("KRadio"), f = F("KSelect"), l = F("KCheckbox"), k = F("KCollapse");
878
878
  return S(), U("div", vt, [
879
879
  u(o(Ze), {
880
880
  "can-submit": Q.value,
@@ -950,7 +950,7 @@ const ue = {
950
950
  title: o(s)("gateway_services.form.sections.keys.title")
951
951
  }, {
952
952
  default: p(() => [
953
- D.value ? L("", !0) : (S(), U("div", gt, [
953
+ B.value ? L("", !0) : (S(), U("div", gt, [
954
954
  C("div", yt, [
955
955
  u(P, { required: "" }, {
956
956
  default: p(() => [
@@ -1004,7 +1004,7 @@ const ue = {
1004
1004
  _: 1
1005
1005
  }, 8, ["modelValue", "selected-value"])
1006
1006
  ])),
1007
- w.value === "protocol" || D.value ? (S(), U("div", ht, [
1007
+ w.value === "protocol" || B.value ? (S(), U("div", ht, [
1008
1008
  u(f, {
1009
1009
  modelValue: e.fields.protocol,
1010
1010
  "onUpdate:modelValue": i[5] || (i[5] = (c) => e.fields.protocol = c),
@@ -1056,7 +1056,7 @@ const ue = {
1056
1056
  "onUpdate:modelValue": [
1057
1057
  i[9] || (i[9] = (c) => e.fields.port = c),
1058
1058
  i[10] || (i[10] = () => {
1059
- e.fields.port = B(e.fields.port + "");
1059
+ e.fields.port = G(e.fields.port + "");
1060
1060
  })
1061
1061
  ],
1062
1062
  class: "gateway-service-form-margin-top",
@@ -1085,7 +1085,7 @@ const ue = {
1085
1085
  "onUpdate:modelValue": [
1086
1086
  i[11] || (i[11] = (c) => e.fields.retries = c),
1087
1087
  i[12] || (i[12] = () => {
1088
- e.fields.retries = B(e.fields.retries + "");
1088
+ e.fields.retries = G(e.fields.retries + "");
1089
1089
  })
1090
1090
  ],
1091
1091
  autocomplete: "off",
@@ -1106,7 +1106,7 @@ const ue = {
1106
1106
  "onUpdate:modelValue": [
1107
1107
  i[13] || (i[13] = (c) => e.fields.connect_timeout = c),
1108
1108
  i[14] || (i[14] = () => {
1109
- e.fields.connect_timeout = B(e.fields.connect_timeout + "");
1109
+ e.fields.connect_timeout = G(e.fields.connect_timeout + "");
1110
1110
  })
1111
1111
  ],
1112
1112
  autocomplete: "off",
@@ -1127,7 +1127,7 @@ const ue = {
1127
1127
  "onUpdate:modelValue": [
1128
1128
  i[15] || (i[15] = (c) => e.fields.write_timeout = c),
1129
1129
  i[16] || (i[16] = () => {
1130
- e.fields.write_timeout = B(e.fields.write_timeout + "");
1130
+ e.fields.write_timeout = G(e.fields.write_timeout + "");
1131
1131
  })
1132
1132
  ],
1133
1133
  autocomplete: "off",
@@ -1148,7 +1148,7 @@ const ue = {
1148
1148
  "onUpdate:modelValue": [
1149
1149
  i[17] || (i[17] = (c) => e.fields.read_timeout = c),
1150
1150
  i[18] || (i[18] = () => {
1151
- e.fields.read_timeout = B(e.fields.read_timeout + "");
1151
+ e.fields.read_timeout = G(e.fields.read_timeout + "");
1152
1152
  })
1153
1153
  ],
1154
1154
  autocomplete: "off",
@@ -1292,7 +1292,7 @@ const ue = {
1292
1292
  },
1293
1293
  emits: ["loading", "fetch:error", "fetch:success"],
1294
1294
  setup(n) {
1295
- const $ = n, { i18n: { t: m }, i18nT: d } = ue.useI18n(), r = h(() => oe.form[$.config.app].edit), { getPropValue: M } = et(), W = (s, I) => M(s, I) === !0 ? m("gateway_services.form.fields.tls_verify_option.true.display") : m("gateway_services.form.fields.tls_verify_option.false.display"), K = V({
1295
+ const D = n, { i18n: { t: m }, i18nT: d } = ue.useI18n(), r = h(() => oe.form[D.config.app].edit), { getPropValue: M } = et(), W = (s, I) => M(s, I) === !0 ? m("gateway_services.form.fields.tls_verify_option.true.display") : m("gateway_services.form.fields.tls_verify_option.false.display"), K = V({
1296
1296
  id: {},
1297
1297
  name: {
1298
1298
  tooltip: m("gateway_services.form.fields.name.tooltip")
@@ -1 +1 @@
1
- (function(w,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vue-router"),require("@kong/icons"),require("@kong-ui-public/i18n"),require("@kong-ui-public/entities-shared")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","@kong/icons","@kong-ui-public/i18n","@kong-ui-public/entities-shared"],e):(w=typeof globalThis<"u"?globalThis:w||self,e(w["kong-ui-public-entities-gateway-services"]={},w.Vue,w.VueRouter,w.KongIcons,w["kong-ui-public-i18n"],w["kong-ui-public-entities-shared"]))})(this,function(w,e,de,ue,fe,u){"use strict";const me={actions:{create:"New Gateway Service",serverless_create:"Add a Service",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",clear:"Clear",view:"View Details",delete:{title:"Delete a Gateway Service",description:"Deleting this Gateway Service will also remove any associated plugins. This action cannot be reversed.",menu_label:"Delete"}},search:{placeholder:{konnect:"Filter by name",kongManager:"Filter by exact name or ID"}},gateway_services:{title:"Gateway Services",list:{toolbar_actions:{new_gateway_service:"New Gateway Service"},table_headers:{name:"Name",control_plane:"Control Plane",protocol:"Protocol",host:"Host",port:"Port",path:"Path",enabled:"Enabled",tags:"Tags",id:"ID",created_at:"Created At",updated_at:"Last Modified"},empty_state:{title:"Configure a New Gateway Service",description:"Gateway services are used to proxy traffic.",serverless_title:"Configure your first Gateway Service"}},form:{sections:{general:{title:"General Information",description:"General information will help identify and manage this Gateway Service."},keys:{title:"Service Endpoint",description:"Define the endpoint for this service by specifying the full URL or by its separate elements.",checkedGroupLabel:"Choose how and where to send traffic",urlLabel:"Full URL",checkedGroupAltLabel:"Protocol, Host, Port and Path",viewAdvancedFields:"View Advanced Fields"}},fields:{upstream_url:{label:"Upstream URL",placeholder:"Enter a URL",tooltip_for_konnect:"This is the URL of the API you will manage in Konnect.",tooltip_for_km:"This is the URL of the API you will manage in Kong Gateway."},name:{label:"Name",placeholder:"Enter a unique name",tooltip:"The Service name."},protocol:{label:"Protocol",tooltip:"The protocol used to communicate with the upstream.",options:{http:"http",https:"https",tcp:"tcp",tls:"tls",tls_passthrough:"tls_passthrough",grpc:"grpc",grpcs:"grpcs",ws:"ws",wss:"wss",udp:"udp"}},host:{label:"Host",placeholder:"Enter a host",tooltip:"The host of the upstream server. Note that the host value is case sensitive."},path:{label:"Path",placeholder:"Enter a path",tooltip:"The path to be used in request to the upstream server."},port:{label:"Port",tooltip:"The upstream server port."},retries:{label:"Retries",tooltip:"The number of retries to execute upon failure to proxy."},connect_timeout:{label:"Connection Timeout",tooltip:"The timeout in milliseconds for establishing a connection to the upstream server."},write_timeout:{label:"Write Timeout",tooltip:"The timeout in milliseconds between two successive write operations for transmitting a request to the upstream server."},read_timeout:{label:"Read Timeout",tooltip:"The timeout in milliseconds between two successive read operations for transmitting a request to the upstream server."},client_certificate:{label:"Client Certificate",placeholder:"Enter a Certificate ID",tooltip:"Certificate to be used as client certificate while TLS handshaking to the upstream server."},ca_certificates:{label:"CA Certificates",placeholder:"Enter a comma separated list of CA Certificate IDs",tooltip:"Array of {code1} object UUIDs that are used to build the trust store while verifying upstream server's TLS certificate. If set to {code2} when Nginx default is respected. If default CA list in Nginx are not specified and TLS verification is enabled, then handshake with upstream server will always fail (because no CA are trusted).",code1:"CA Certificate",code2:"null"},tls_verify_enabled:{label:"TLS Verify",help:"If unchecked, use default system setting",tooltip:"Whether to enable verification of upstream server TLS certificate. If set to {code1}, then the Nginx default is respected.",code1:"null"},tls_verify_option:{unset:{display:"Use default system setting"},true:{label:"True",display:"On"},false:{label:"False",display:"Off"}},tags:{label:"Tags",tooltip:"An optional set of strings associated with the Service for grouping and filtering.",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3"},enabled:{label:"Enabled",tooltip:"Whether the Service is active. If set to {false}, the proxy behavior will be as if any routes attached to it do not exist (404). Default: {true}.",false:"false",true:"true"}}}},errors:{general:"Gateway Services could not be retrieved",delete:"The gateway service could not be deleted at this time.",copy:"Failed to copy to clipboard",urlErrorMessage:"Error: invalid URL"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},glossary:{gateway_services:"gateway services"}};function ge(){const n=fe.createI18n("en-us",me);return{i18n:n,i18nT:fe.i18nTComponent(n)}}function ye(){return{getPortFromProtocol:(S,p)=>{const d=[80,443],s=Number(p);if((s||s===0)&&!d.includes(s))return s;switch(S){case"grpcs":case"tls":case"https":case"wss":return 443;case"grpc":case"tcp":case"http":case"ws":default:return 80}}}}const J={useI18n:ge,usePortFromProtocol:ye},z="/v2/control-planes/{controlPlaneId}/core-entities",Q="/{workspace}",F={list:{konnect:{all:`${z}/services`},kongManager:{all:`${Q}/services`}},form:{konnect:{create:`${z}/services`,validate:`${z}/v1/schemas/json/service/validate`,edit:`${z}/services/{id}`},kongManager:{create:`${Q}/services`,validate:`${Q}/schemas/services/validate`,edit:`${Q}/services/{id}`}}},_e={class:"kong-ui-entities-gateway-services-list"},be={key:1},he=e.defineComponent({__name:"GatewayServiceList",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||!n.createRoute||!n.getViewRoute||!n.getEditRoute||n.app==="kongManager"&&!n.isExactMatch&&!n.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1},isServerless:{type:Boolean,default:!1}},emits:["error","copy:success","copy:error","delete:success","toggle:success"],setup(n,{emit:S}){var C;const p=S,d=n,{i18n:{t:s,formatUnixTimeStamp:k}}=J.useI18n(),D=de.useRouter(),{axiosInstance:B}=u.useAxios((C=d.config)==null?void 0:C.axiosRequestConfig),r=e.ref(1),v=e.computed(()=>d.config.app!=="kongManager"||!!d.config.disableSorting),_={name:{label:s("gateway_services.list.table_headers.name"),searchable:!0,sortable:!0,hidable:!1},...d.config.showControlPlaneColumn?{control_plane:{label:s("gateway_services.list.table_headers.control_plane")}}:{},protocol:{label:s("gateway_services.list.table_headers.protocol"),searchable:!0,sortable:!0},host:{label:s("gateway_services.list.table_headers.host"),searchable:!0,sortable:!0},port:{label:s("gateway_services.list.table_headers.port"),searchable:!0,sortable:!0},path:{label:s("gateway_services.list.table_headers.path"),searchable:!0,sortable:!0},enabled:{label:s("gateway_services.list.table_headers.enabled"),searchable:!0,sortable:!0},tags:{label:s("gateway_services.list.table_headers.tags"),sortable:!1},updated_at:{label:s("gateway_services.list.table_headers.updated_at"),sortable:!0},created_at:{label:s("gateway_services.list.table_headers.created_at"),sortable:!0}},te={columnVisibility:{created_at:!1}},oe=_,E=e.computed(()=>{var f,l;let a=`${d.config.apiBaseUrl}${F.list[d.config.app].all}`;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}),le=e.computed(()=>d.config.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${E.value}`):new URL(E.value)),T=e.ref(""),b=e.computed(()=>{const a=d.config.app==="konnect"||d.config.isExactMatch;if(a)return{isExactMatch:a,placeholder:s(`search.placeholder.${d.config.app}`)};const{name:f,enabled:l,protocol:h,host:c,port:x,path:ee}=_;return{isExactMatch:a,fields:{name:f,enabled:l,protocol:h,host:c,port:x,path:ee},schema:d.config.filterSchema}}),{fetcher:A,fetcherState:$}=u.useFetcher(d.config,E.value),ie=()=>{T.value=""},t=()=>{r.value++},y=e.ref(null),G=e.ref(!1),re=e.computed(()=>({ctaPath:d.config.createRoute,ctaText:g.value?d.isServerless?s("actions.serverless_create"):s("actions.create"):void 0,message:`${s("gateway_services.list.empty_state.description")}${d.config.additionMessageForEmptyState?` ${d.config.additionMessageForEmptyState}`:""}`,title:g.value?d.isServerless?s("gateway_services.list.empty_state.serverless_title"):s("gateway_services.list.empty_state.title"):s("gateway_services.title")})),R=e.ref(!1),V=e.ref(null),I=e.computed(()=>{const a={action:"disable",id:"",name:""};if(V.value){const{enabled:f,id:l,name:h}=V.value;a.action=f?"disable":"enable",a.id=l,a.name=h||l}return a}),X=a=>{R.value=!0,V.value=a},L=()=>{R.value=!1,V.value=null},Y=async()=>{var h,c;if(!await((h=d.canEdit)==null?void 0:h.call(d,V.value))||!V.value)return;const f=`${le.value.href}/${V.value.id}`,l=!V.value.enabled;try{const{data:x}=((c=d.config)==null?void 0:c.app)==="konnect"?await B.put(f,{...V.value,enabled:l}):await B.patch(f,{...V.value,enabled:l});p("toggle:success",x),V.value.enabled=l}catch(x){p("error",x)}},se=a=>{d.config.getControlPlaneRoute&&D.push(d.config.getControlPlaneRoute(a))},ae=(a,f)=>{const l=a.id;if(!f(l)){p("copy:error",{entity:a,field:"id",message:s("errors.copy")});return}p("copy:success",{entity:a,field:"id",message:s("copy.success",{val:l})})},ne=(a,f)=>{const l=JSON.stringify(a);if(!f(l)){p("copy:error",{entity:a,message:s("errors.copy")});return}p("copy:success",{entity:a,message:s("copy.success_brief")})},ce=async a=>{var l;await((l=d.canRetrieve)==null?void 0:l.call(d,a))&&D.push(d.config.getViewRoute(a.id))},q=a=>({label:s("actions.view"),to:d.config.getViewRoute(a)}),Z=a=>({label:s("actions.edit"),to:d.config.getEditRoute(a)}),N=e.ref(void 0),K=e.ref(!1),U=e.ref(!1),W=e.ref(""),M=u.useDeleteUrlBuilder(d.config,E.value),O=a=>{N.value=a,K.value=!0,W.value=""},j=()=>{K.value=!1,N.value=void 0},o=async()=>{var a,f,l;if((a=N.value)!=null&&a.id){U.value=!0;try{await B.delete(M(N.value.id)),p("delete:success",N.value),j(),r.value++}catch(h){W.value=((l=(f=h.response)==null?void 0:f.data)==null?void 0:l.message)||h.message||s("errors.delete"),p("error",h)}finally{U.value=!1}}},i=e.ref(!1);e.watch($,a=>{var f,l,h,c;if(Array.isArray((f=a==null?void 0:a.response)==null?void 0:f.data)&&(i.value=a.response.data.length>0),a.status===u.FetcherStatus.NoRecords?G.value=!0:G.value=!1,a.status===u.FetcherStatus.Error){y.value={title:s("errors.general")},(c=(h=(l=a.error)==null?void 0:l.response)==null?void 0:h.data)!=null&&c.message&&(y.value.message=a.error.response.data.message),p("error",a.error);return}y.value=null});const g=e.ref(!1);return e.onBeforeMount(async()=>{g.value=await d.canCreate()}),(a,f)=>{const l=e.resolveComponent("KButton"),h=e.resolveComponent("KBadge"),c=e.resolveComponent("KInputSwitch"),x=e.resolveComponent("KDropdownItem"),ee=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",_e,[e.createVNode(e.unref(u.EntityBaseTable),{"cache-identifier":n.cacheIdentifier,"default-table-preferences":te,"disable-sorting":v.value,"empty-state-options":re.value,"enable-entity-actions":"","error-message":y.value,fetcher:e.unref(A),"fetcher-cache-key":r.value,"hide-toolbar":G.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-gateway-services-list",query:T.value,"table-headers":e.unref(oe),onClearSearchInput:ie,"onClick:row":f[2]||(f[2]=m=>ce(m)),onSort:t},{"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(u.EntityFilter),{modelValue:T.value,"onUpdate:modelValue":f[0]||(f[0]=m=>T.value=m),config:b.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!n.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>n.canCreate()},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(l,{appearance:"primary","data-testid":"toolbar-add-gateway-service",size:n.useActionOutside?"medium":"large",to:n.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(ue.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(s)("gateway_services.list.toolbar_actions.new_gateway_service")),1)]),_:1},8,["size","to"]),[[e.vShow,i.value]])]),_:1},8,["auth-function"])],8,["disabled"]))]),name:e.withCtx(({rowValue:m})=>[e.createElementVNode("b",null,e.toDisplayString(m??"-"),1)]),control_plane:e.withCtx(({row:m})=>{var P;return[(P=m.x_meta)!=null&&P.cluster_id?(e.openBlock(),e.createBlock(h,{key:0,tooltip:m.x_meta.cluster_id,"truncation-tooltip":"",onClick:e.withModifiers(H=>se(m.x_meta.cluster_id),["stop"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.x_meta.cluster_id),1)]),_:2},1032,["tooltip","onClick"])):(e.openBlock(),e.createElementBlock("b",be,"-"))]}),enabled:e.withCtx(({row:m})=>[e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>n.canEdit(m),"force-show":""},{default:e.withCtx(({isAllowed:P})=>[e.createElementVNode("div",{onClick:f[1]||(f[1]=e.withModifiers(()=>{},["stop"]))},[e.createVNode(c,{modelValue:m.enabled,"onUpdate:modelValue":H=>m.enabled=H,"data-testid":`row-${m.id}-toggle-input`,disabled:!P,onClick:e.withModifiers(H=>X(m),["prevent"])},null,8,["modelValue","onUpdate:modelValue","data-testid","disabled","onClick"])])]),_:2},1032,["auth-function"])]),tags:e.withCtx(({rowValue:m})=>[e.createVNode(e.unref(u.TableTags),{tags:m},null,8,["tags"])]),created_at:e.withCtx(({rowValue:m})=>[e.createTextVNode(e.toDisplayString(e.unref(k)(m)),1)]),updated_at:e.withCtx(({rowValue:m})=>[e.createTextVNode(e.toDisplayString(e.unref(k)(m)),1)]),actions:e.withCtx(({row:m})=>[e.createVNode(ee,null,{default:e.withCtx(({copyToClipboard:P})=>[e.createVNode(x,{"data-testid":"action-entity-copy-id",onClick:H=>ae(m,P)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)("actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(ee,null,{default:e.withCtx(({copyToClipboard:P})=>[e.createVNode(x,{"data-testid":"action-entity-copy-json",onClick:H=>ne(m,P)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)("actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>n.canRetrieve(m)},{default:e.withCtx(()=>[e.createVNode(x,{"data-testid":"action-entity-view","has-divider":"",item:q(m.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>n.canEdit(m)},{default:e.withCtx(()=>[e.createVNode(x,{"data-testid":"action-entity-edit",item:Z(m.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>n.canDelete(m)},{default:e.withCtx(()=>[e.createVNode(x,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:P=>O(m)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)("actions.delete.menu_label")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","hide-toolbar","query","table-headers"]),e.createVNode(e.unref(u.EntityToggleModal),{action:I.value.action,"entity-id":I.value.id,"entity-name":I.value.name,"entity-type":e.unref(s)("glossary.gateway_services"),"on-confirm":Y,visible:R.value,onCancel:L,onProceed:L},null,8,["action","entity-id","entity-name","entity-type","visible"]),e.createVNode(e.unref(u.EntityDeleteModal),{"action-pending":U.value,description:e.unref(s)("actions.delete.description"),"entity-name":N.value&&(N.value.name||N.value.id),"entity-type":e.unref(u.EntityTypes).GatewayService,error:W.value,title:e.unref(s)("actions.delete.title"),visible:K.value,onCancel:j,onProceed:o},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),pe=(n,S)=>{const p=n.__vccOpts||n;for(const[d,s]of S)p[d]=s;return p},we=pe(he,[["__scopeId","data-v-d7870a2d"]]),ve={class:"kong-ui-entities-gateway-service-form"},Ve={key:0},Ce={class:"gateway-service-form-traffic-label"},ke={class:"gateway-service-form-margin-bottom"},Ne={key:0,class:"gateway-service-form-group-fields"},xe={key:1,class:"gateway-service-form-group-fields"},Ee={key:0},Se={class:"gateway-service-form-margin-top"},Te={class:"gateway-service-form-margin-bottom"},Ie={class:"gateway-service-form-margin-bottom"},Pe={class:"gateway-service-form-margin-bottom"},Be={class:"gateway-service-form-margin-bottom"},Ue={key:0,class:"gateway-service-form-margin-bottom"},Me={key:1,class:"gateway-service-form-margin-bottom"},De={key:2,class:"gateway-service-form-margin-bottom"},Re={key:0,class:"checkbox-aligned-radio"},Fe={key:1,class:"checkbox-aligned-radio"},Ae=pe(e.defineComponent({__name:"GatewayServiceForm",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||n.app==="konnect"&&!n.controlPlaneId||n.app==="kongManager"&&typeof n.workspace!="string"||!n.cancelRoute)},gatewayServiceId:{type:String,required:!1,default:""},hideSectionsInfo:{type:Boolean,required:!1,default:!1}},emits:["update","error","url-valid:success","url-valid:error","loading","model-updated"],setup(n,{expose:S,emit:p}){var j;const d=p,s=n,k=e.ref(!0),D=de.useRouter(),{i18nT:B,i18n:{t:r}}=J.useI18n(),{getMessageFromError:v}=u.useErrors(),{axiosInstance:_}=u.useAxios((j=s.config)==null?void 0:j.axiosRequestConfig),te=u.useValidators(),oe=e.computed(()=>F.form[s.config.app].edit),E=e.computed(()=>s.gatewayServiceId?u.EntityBaseFormType.Edit:u.EntityBaseFormType.Create),le=e.ref(!1),T=e.computed(()=>!!s.gatewayServiceId),b=e.ref(T.value?"protocol":"url"),A=J.usePortFromProtocol(),$=e.ref(""),ie=e.computed(()=>!!$.value),t=e.reactive({fields:{name:"",protocol:"http",host:"",path:"",port:80,url:"",retries:5,connect_timeout:6e4,write_timeout:6e4,read_timeout:6e4,client_certificate:"",ca_certificates:"",tls_verify_enabled:!1,tls_verify_value:!1,tags:""},isReadonly:!1,errorMessage:""}),y=e.reactive({name:"",protocol:"http",host:"",path:"",port:80,url:"",retries:5,connect_timeout:6e4,write_timeout:6e4,read_timeout:6e4,client_certificate:"",ca_certificates:"",tls_verify_enabled:!1,tls_verify_value:!1,tags:""}),G=s.config.app==="konnect"||u.useGatewayFeatureSupported({gatewayInfo:s.config.gatewayInfo,supportedRange:{enterprise:["3.0"]}}),re=[{label:r("gateway_services.form.fields.protocol.options.http"),value:"http",group:"http"},{label:r("gateway_services.form.fields.protocol.options.https"),value:"https",group:"http"},{label:r("gateway_services.form.fields.protocol.options.tcp"),value:"tcp",group:"tcp"},{label:r("gateway_services.form.fields.protocol.options.tls"),value:"tls",group:"tcp"},{label:r("gateway_services.form.fields.protocol.options.tls_passthrough"),value:"tls_passthrough",group:"tcp"},{label:r("gateway_services.form.fields.protocol.options.grpc"),value:"grpc",group:"grpc"},{label:r("gateway_services.form.fields.protocol.options.grpcs"),value:"grpcs",group:"grpc"},...G?[{label:r("gateway_services.form.fields.protocol.options.ws"),value:"ws",group:"websocket"},{label:r("gateway_services.form.fields.protocol.options.wss"),value:"wss",group:"websocket"}]:[],{label:r("gateway_services.form.fields.protocol.options.udp"),value:"udp",group:"udp"}],R={url:"url",protocol:"protocol"},V=(o,i)=>{i.value},I=o=>o?parseFloat(o):0,X=()=>{k.value=!0,t.errorMessage="",t.fields.host=y.host,t.fields.path=y.path,t.fields.port=y.port,t.fields.protocol=y.protocol,t.fields.url=y.url,t.fields.retries=y.retries,t.fields.connect_timeout=y.connect_timeout,t.fields.write_timeout=y.write_timeout,t.fields.read_timeout=y.read_timeout,t.fields.client_certificate=y.client_certificate,t.fields.ca_certificates=y.ca_certificates,t.fields.tls_verify_enabled=y.tls_verify_enabled,t.fields.tls_verify_value=y.tls_verify_value},L=()=>{if(t.fields.url&&b.value==="url")try{const o=new URL(t.fields.url);t.errorMessage="",t.fields.protocol=o.protocol.slice(0,-1),t.fields.host=o.hostname,t.fields.path=o.pathname;const i=Number(o.port);le.value=!!i,t.fields.port=i||A.getPortFromProtocol(t.fields.protocol),t.errorMessage="",d("url-valid:success")}catch(o){t.errorMessage=r("errors.urlErrorMessage"),d("url-valid:error",v(o))}else d("url-valid:success"),t.errorMessage=""},Y=e.computed(()=>!["tcp","tls","tls_passthrough","grpc","grpcs","udp"].includes(t.fields.protocol)),se=e.computed(()=>{if(b.value==="url")return!0;const o=["https","wss","tls"].includes(t.fields.protocol);return b.value==="protocol"&&o}),ae=e.computed(()=>{if(b.value==="url")return!0;const o=["https","tls"].includes(t.fields.protocol);return b.value==="protocol"&&o}),ne=e.computed(()=>{if(b.value==="url")return!0;const o=["https","wss","tls"].includes(t.fields.protocol);return b.value==="protocol"&&o}),ce=o=>{$.value=te.utf8Name(o)},q=e.computed(()=>T.value&&JSON.stringify(t.fields)!==JSON.stringify(y)||b.value==="url"&&!!t.fields.url||b.value==="protocol"&&!!t.fields.host),Z=o=>{var i,g,C;t.fields.name=(o==null?void 0:o.name)||"",t.fields.tags=((i=o==null?void 0:o.tags)==null?void 0:i.join(", "))||"",t.fields.protocol=(o==null?void 0:o.protocol)||"http",t.fields.path=(o==null?void 0:o.path)||"",t.fields.read_timeout=o!=null&&o.read_timeout||(o==null?void 0:o.read_timeout)===0?o==null?void 0:o.read_timeout:6e4,t.fields.retries=o!=null&&o.retries||(o==null?void 0:o.retries)===0?o==null?void 0:o.retries:5,t.fields.host=(o==null?void 0:o.host)||"",t.fields.connect_timeout=o!=null&&o.connect_timeout||(o==null?void 0:o.connect_timeout)===0?o==null?void 0:o.connect_timeout:6e4,t.fields.tls_verify_enabled=(o==null?void 0:o.tls_verify)!==""&&(o==null?void 0:o.tls_verify)!==null&&(o==null?void 0:o.tls_verify)!==void 0,t.fields.tls_verify_value=o!=null&&o.tls_verify?o==null?void 0:o.tls_verify:!1,t.fields.ca_certificates=((g=o==null?void 0:o.ca_certificates)==null?void 0:g.join(","))||"",t.fields.client_certificate=((C=o==null?void 0:o.client_certificate)==null?void 0:C.id)||"",t.fields.write_timeout=o!=null&&o.write_timeout||(o==null?void 0:o.write_timeout)===0?o==null?void 0:o.write_timeout:6e4,t.fields.port=o!=null&&o.port||(o==null?void 0:o.port)===0?o==null?void 0:o.port:80,Object.assign(y,t.fields)},N=()=>{D.push(s.config.cancelRoute)},K=e.computed(()=>{var i,g;let o=`${s.config.apiBaseUrl}${F.form[s.config.app].validate}`;return s.config.app==="konnect"?o=o.replace(/{controlPlaneId}/gi,((i=s.config)==null?void 0:i.controlPlaneId)||""):s.config.app==="kongManager"&&(o=o.replace(/\/{workspace}/gi,(g=s.config)!=null&&g.workspace?`/${s.config.workspace}`:"")),o=o.replace(/{id}/gi,s.gatewayServiceId),o}),U=e.computed(()=>{var i,g;let o=`${s.config.apiBaseUrl}${F.form[s.config.app][E.value]}`;return s.config.app==="konnect"?o=o.replace(/{controlPlaneId}/gi,((i=s.config)==null?void 0:i.controlPlaneId)||""):s.config.app==="kongManager"&&(o=o.replace(/\/{workspace}/gi,(g=s.config)!=null&&g.workspace?`/${s.config.workspace}`:"")),o=o.replace(/{id}/gi,s.gatewayServiceId),o}),W=o=>{let i="";o.url&&(i=new URL(o.url).protocol),(["https","wss","tls"].includes(o.protocol)||["https","wss","tls"].includes(i))&&(o.tls_verify=o.tls_verify_enabled?o.tls_verify_value:null),delete o.tls_verify_enabled,delete o.tls_verify_value},M=e.computed(()=>{var i,g,C,a;const o={name:t.fields.name||null,tags:t.fields.tags?(C=(g=(i=t.fields.tags)==null?void 0:i.split(","))==null?void 0:g.map(f=>String(f||"").trim()))==null?void 0:C.filter(f=>f!==""):null,protocol:t.fields.protocol,path:t.fields.path||null,read_timeout:t.fields.read_timeout,retries:t.fields.retries,host:t.fields.host,connect_timeout:t.fields.connect_timeout,tls_verify_value:t.fields.tls_verify_value,tls_verify_enabled:t.fields.tls_verify_enabled,ca_certificates:t.fields.ca_certificates?(a=t.fields.ca_certificates)==null?void 0:a.split(",").filter(f=>f!==""):null,client_certificate:t.fields.client_certificate?{id:t.fields.client_certificate}:null,write_timeout:t.fields.write_timeout,port:t.fields.port,url:t.fields.url};return t.fields.client_certificate&&["https","wss","tls"].includes(t.fields.protocol)&&(o.client_certificate={id:t.fields.client_certificate}),t.fields.tls_verify_enabled&&["https","wss","tls"].includes(t.fields.protocol)&&(o.tls_verify=t.fields.tls_verify_value),Y.value||(o.path=null),E.value==="create"?b.value==="url"?(delete o.protocol,delete o.host,delete o.path,s.config.app==="konnect"&&delete o.port):delete o.url:E.value==="edit"&&delete o.url,o}),O=async()=>{var o,i,g,C;try{t.isReadonly=!0,L();const a=M.value;W(a);let f;if(await _.post(K.value,a),E.value==="create"?f=await _.post(U.value,a):E.value==="edit"&&(f=((o=s.config)==null?void 0:o.app)==="konnect"?await _.put(U.value,a):await _.patch(U.value,a)),f){const{data:l}=f;t.fields.name=(l==null?void 0:l.name)||"",t.fields.port=l.port||A.getPortFromProtocol(l.protocol),t.fields.protocol=(l==null?void 0:l.protocol)||"http",t.fields.host=(l==null?void 0:l.host)||"",t.fields.path=(l==null?void 0:l.path)||"",t.fields.url=(l==null?void 0:l.url)||"",t.fields.retries=l!=null&&l.retries||(l==null?void 0:l.retries)===0?l==null?void 0:l.retries:5,t.fields.connect_timeout=l!=null&&l.connect_timeout||(l==null?void 0:l.connect_timeout)===0?l==null?void 0:l.connect_timeout:6e4,t.fields.write_timeout=l!=null&&l.write_timeout||(l==null?void 0:l.write_timeout)===0?l==null?void 0:l.write_timeout:6e4,t.fields.read_timeout=l!=null&&l.read_timeout||(l==null?void 0:l.read_timeout)===0?l==null?void 0:l.read_timeout:6e4,t.fields.client_certificate=((i=l==null?void 0:l.client_certificate)==null?void 0:i.id)||"",t.fields.ca_certificates=(g=l==null?void 0:l.ca_certificates)!=null&&g.length?l==null?void 0:l.ca_certificates.join(","):"",t.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,t.fields.tls_verify_value=t.fields.tls_verify_enabled&&(l==null?void 0:l.tls_verify),t.fields.tags=(C=l==null?void 0:l.tags)!=null&&C.length?l.tags.join(", "):"",Object.assign(y,t.fields),d("update",f==null?void 0:f.data)}return f}catch(a){t.errorMessage=v(a),d("error",a)}finally{t.isReadonly=!1}};return e.watch(()=>s.gatewayServiceId,()=>{Object.assign(t.fields,y)}),e.watch(t.fields,o=>{t.fields.port=A.getPortFromProtocol(o.protocol,String(o.port)),d("model-updated",M.value)}),e.onMounted(()=>{d("model-updated",M.value)}),S({validateUrl:L,getPayload:M,saveFormData:O,canSubmit:q,initForm:Z}),(o,i)=>{const g=e.resolveComponent("KInput"),C=e.resolveComponent("KLabel"),a=e.resolveComponent("KRadio"),f=e.resolveComponent("KSelect"),l=e.resolveComponent("KCheckbox"),h=e.resolveComponent("KCollapse");return e.openBlock(),e.createElementBlock("div",ve,[e.createVNode(e.unref(u.EntityBaseForm),{"can-submit":q.value,config:n.config,"edit-id":n.gatewayServiceId,"entity-type":e.unref(u.SupportedEntityType).GatewayService,"error-message":t.errorMessage,"fetch-url":oe.value,"form-fields":M.value,"is-readonly":t.isReadonly,onCancel:N,"onFetch:error":i[25]||(i[25]=c=>o.$emit("error",c)),"onFetch:success":Z,onLoading:i[26]||(i[26]=c=>o.$emit("loading",c)),onSubmit:O},{"form-actions":e.withCtx(()=>[e.renderSlot(o.$slots,"form-actions",{canSubmit:q.value,cancel:N,submit:O},void 0,!0)]),default:e.withCtx(()=>[e.createVNode(e.unref(u.EntityFormSection),{description:e.unref(r)("gateway_services.form.sections.general.description"),"hide-info-header":n.hideSectionsInfo,title:e.unref(r)("gateway_services.form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:t.fields.name,"onUpdate:modelValue":i[0]||(i[0]=c=>t.fields.name=c),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-name-input",error:ie.value,"error-message":$.value,label:e.unref(r)("gateway_services.form.fields.name.label"),"label-attributes":{info:e.unref(r)("gateway_services.form.fields.name.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"name",placeholder:e.unref(r)("gateway_services.form.fields.name.placeholder"),readonly:t.isReadonly,type:"text",onInput:ce},null,8,["modelValue","error","error-message","label","label-attributes","placeholder","readonly"]),e.createVNode(g,{modelValue:t.fields.tags,"onUpdate:modelValue":i[1]||(i[1]=c=>t.fields.tags=c),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-tags-input",help:e.unref(r)("gateway_services.form.fields.tags.help"),label:e.unref(r)("gateway_services.form.fields.tags.label"),"label-attributes":{info:e.unref(r)("gateway_services.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"tags",placeholder:e.unref(r)("gateway_services.form.fields.tags.placeholder"),readonly:t.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","hide-info-header","title"]),e.createVNode(e.unref(u.EntityFormSection),{description:e.unref(r)("gateway_services.form.sections.keys.description"),"hide-info-header":n.hideSectionsInfo,title:e.unref(r)("gateway_services.form.sections.keys.title")},{default:e.withCtx(()=>[T.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ve,[e.createElementVNode("div",Ce,[e.createVNode(C,{required:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("gateway_services.form.sections.keys.checkedGroupLabel")),1)]),_:1})]),e.createElementVNode("div",ke,[e.createVNode(a,{modelValue:b.value,"onUpdate:modelValue":i[2]||(i[2]=c=>b.value=c),"data-testid":"gateway-service-url-radio","selected-value":R.url,onChange:X},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("gateway_services.form.sections.keys.urlLabel")),1)]),_:1},8,["modelValue","selected-value"])]),b.value==="url"?(e.openBlock(),e.createElementBlock("div",Ne,[e.createVNode(g,{modelValue:t.fields.url,"onUpdate:modelValue":i[3]||(i[3]=c=>t.fields.url=c),modelModifiers:{trim:!0},class:"gateway-service-url-input gateway-service-form-margin-bottom","data-testid":"gateway-service-url-input",label:e.unref(r)("gateway_services.form.fields.upstream_url.label"),"label-attributes":{info:n.config.app==="konnect"?e.unref(r)("gateway_services.form.fields.upstream_url.tooltip_for_konnect"):e.unref(r)("gateway_services.form.fields.upstream_url.tooltip_for_km"),tooltipAttributes:{maxWidth:"400"}},name:"url",placeholder:e.unref(r)("gateway_services.form.fields.upstream_url.placeholder"),required:""},null,8,["modelValue","label","label-attributes","placeholder"])])):e.createCommentVNode("",!0),e.createVNode(a,{modelValue:b.value,"onUpdate:modelValue":i[4]||(i[4]=c=>b.value=c),"checked-group":"protocol","data-testid":"gateway-service-protocol-radio","selected-value":R.protocol,onChange:X},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("gateway_services.form.sections.keys.checkedGroupAltLabel")),1)]),_:1},8,["modelValue","selected-value"])])),b.value==="protocol"||T.value?(e.openBlock(),e.createElementBlock("div",xe,[e.createVNode(f,{modelValue:t.fields.protocol,"onUpdate:modelValue":i[5]||(i[5]=c=>t.fields.protocol=c),"data-testid":"gateway-service-protocol-select",items:re,label:e.unref(r)("gateway_services.form.fields.protocol.label"),"label-attributes":{info:e.unref(r)("gateway_services.form.fields.protocol.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.isReadonly,required:"",width:"100%",onSelected:i[6]||(i[6]=c=>V(t.fields.protocol,c))},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(g,{modelValue:t.fields.host,"onUpdate:modelValue":i[7]||(i[7]=c=>t.fields.host=c),modelModifiers:{trim:!0},class:"gateway-service-form-margin-top","data-testid":"gateway-service-host-input",label:e.unref(r)("gateway_services.form.fields.host.label"),"label-attributes":{info:e.unref(r)("gateway_services.form.fields.host.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"host",placeholder:e.unref(r)("gateway_services.form.fields.host.placeholder"),required:""},null,8,["modelValue","label","label-attributes","placeholder"]),Y.value?(e.openBlock(),e.createElementBlock("div",Ee,[e.createVNode(g,{modelValue:t.fields.path,"onUpdate:modelValue":i[8]||(i[8]=c=>t.fields.path=c),modelModifiers:{trim:!0},class:"gateway-service-form-margin-top","data-testid":"gateway-service-path-input",label:e.unref(r)("gateway_services.form.fields.path.label"),"label-attributes":{info:e.unref(r)("gateway_services.form.fields.path.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"path",placeholder:e.unref(r)("gateway_services.form.fields.path.placeholder")},null,8,["modelValue","label","label-attributes","placeholder"])])):e.createCommentVNode("",!0),e.createVNode(g,{modelValue:t.fields.port,"onUpdate:modelValue":[i[9]||(i[9]=c=>t.fields.port=c),i[10]||(i[10]=()=>{t.fields.port=I(t.fields.port+"")})],class:"gateway-service-form-margin-top","data-testid":"gateway-service-port-input",label:e.unref(r)("gateway_services.form.fields.port.label"),"label-attributes":{info:e.unref(r)("gateway_services.form.fields.port.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"port",type:"number"},null,8,["modelValue","label","label-attributes"])])):e.createCommentVNode("",!0),e.createVNode(h,{modelValue:k.value,"onUpdate:modelValue":i[24]||(i[24]=c=>k.value=c),"data-testid":"advanced-fields-collapse","trigger-alignment":"leading","trigger-label":e.unref(r)("gateway_services.form.sections.keys.viewAdvancedFields")},{default:e.withCtx(()=>[e.createElementVNode("div",Se,[e.createElementVNode("div",Te,[e.createVNode(g,{modelValue:t.fields.retries,"onUpdate:modelValue":[i[11]||(i[11]=c=>t.fields.retries=c),i[12]||(i[12]=()=>{t.fields.retries=I(t.fields.retries+"")})],autocomplete:"off","data-testid":"gateway-service-retries-input",label:e.unref(r)("gateway_services.form.fields.retries.label"),"label-attributes":{info:e.unref(r)("gateway_services.form.fields.retries.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"retries",readonly:t.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",Ie,[e.createVNode(g,{modelValue:t.fields.connect_timeout,"onUpdate:modelValue":[i[13]||(i[13]=c=>t.fields.connect_timeout=c),i[14]||(i[14]=()=>{t.fields.connect_timeout=I(t.fields.connect_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-connTimeout-input",label:e.unref(r)("gateway_services.form.fields.connect_timeout.label"),"label-attributes":{info:e.unref(r)("gateway_services.form.fields.connect_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"connTimeout",readonly:t.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",Pe,[e.createVNode(g,{modelValue:t.fields.write_timeout,"onUpdate:modelValue":[i[15]||(i[15]=c=>t.fields.write_timeout=c),i[16]||(i[16]=()=>{t.fields.write_timeout=I(t.fields.write_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-writeTimeout-input",label:e.unref(r)("gateway_services.form.fields.write_timeout.label"),"label-attributes":{info:e.unref(r)("gateway_services.form.fields.write_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"writeTimeout",readonly:t.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",Be,[e.createVNode(g,{modelValue:t.fields.read_timeout,"onUpdate:modelValue":[i[17]||(i[17]=c=>t.fields.read_timeout=c),i[18]||(i[18]=()=>{t.fields.read_timeout=I(t.fields.read_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-readTimeout-input",label:e.unref(r)("gateway_services.form.fields.read_timeout.label"),"label-attributes":{info:e.unref(r)("gateway_services.form.fields.read_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"readTimeout",readonly:t.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),se.value?(e.openBlock(),e.createElementBlock("div",Ue,[e.createVNode(g,{modelValue:t.fields.client_certificate,"onUpdate:modelValue":i[19]||(i[19]=c=>t.fields.client_certificate=c),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-clientCert-input",label:e.unref(r)("gateway_services.form.fields.client_certificate.label"),"label-attributes":{info:e.unref(r)("gateway_services.form.fields.client_certificate.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"clientCert",placeholder:e.unref(r)("gateway_services.form.fields.client_certificate.placeholder"),readonly:t.isReadonly,type:"text"},null,8,["modelValue","label","label-attributes","placeholder","readonly"])])):e.createCommentVNode("",!0),ae.value?(e.openBlock(),e.createElementBlock("div",Me,[e.createVNode(g,{modelValue:t.fields.ca_certificates,"onUpdate:modelValue":i[20]||(i[20]=c=>t.fields.ca_certificates=c),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-ca-certs-input",label:e.unref(r)("gateway_services.form.fields.ca_certificates.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(r)("gateway_services.form.fields.ca_certificates.placeholder"),readonly:t.isReadonly,type:"text"},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(B),{keypath:"gateway_services.form.fields.ca_certificates.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(r)("gateway_services.form.fields.ca_certificates.code1")),1)]),code2:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(r)("gateway_services.form.fields.ca_certificates.code2")),1)]),_:1})]),_:1},8,["modelValue","label","placeholder","readonly"])])):e.createCommentVNode("",!0),ne.value?(e.openBlock(),e.createElementBlock("div",De,[e.createVNode(l,{modelValue:t.fields.tls_verify_enabled,"onUpdate:modelValue":i[21]||(i[21]=c=>t.fields.tls_verify_enabled=c),"data-testid":"gateway-service-tls-verify-checkbox",description:e.unref(r)("gateway_services.form.fields.tls_verify_enabled.help"),label:e.unref(r)("gateway_services.form.fields.tls_verify_enabled.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}}},{tooltip:e.withCtx(()=>[e.createVNode(e.unref(B),{keypath:"gateway_services.form.fields.tls_verify_enabled.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(r)("gateway_services.form.fields.tls_verify_enabled.code1")),1)]),_:1})]),_:1},8,["modelValue","description","label"]),t.fields.tls_verify_enabled?(e.openBlock(),e.createElementBlock("div",Re,[e.createVNode(a,{modelValue:t.fields.tls_verify_value,"onUpdate:modelValue":i[22]||(i[22]=c=>t.fields.tls_verify_value=c),"data-testid":"gateway-service-tls-verify-true-option",label:e.unref(r)("gateway_services.form.fields.tls_verify_option.true.label"),"selected-value":!0},null,8,["modelValue","label"])])):e.createCommentVNode("",!0),t.fields.tls_verify_enabled?(e.openBlock(),e.createElementBlock("div",Fe,[e.createVNode(a,{modelValue:t.fields.tls_verify_value,"onUpdate:modelValue":i[23]||(i[23]=c=>t.fields.tls_verify_value=c),"data-testid":"gateway-service-tls-verify-false-option",label:e.unref(r)("gateway_services.form.fields.tls_verify_option.false.label"),"selected-value":!1},null,8,["modelValue","label"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","trigger-label"])]),_:1},8,["description","hide-info-header","title"])]),_:3},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-35e0db56"]]),$e={class:"kong-ui-gateway-service-entity-config-card"},Ge=e.defineComponent({__name:"GatewayServiceConfigCard",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||n.app==="konnect"&&!n.controlPlaneId||n.app==="kongManager"&&typeof n.workspace!="string"||!n.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(n){const S=n,{i18n:{t:p},i18nT:d}=J.useI18n(),s=e.computed(()=>F.form[S.config.app].edit),{getPropValue:k}=u.useHelpers(),D=(r,v)=>k(r,v)===!0?p("gateway_services.form.fields.tls_verify_option.true.display"):p("gateway_services.form.fields.tls_verify_option.false.display"),B=e.ref({id:{},name:{tooltip:p("gateway_services.form.fields.name.tooltip")},enabled:{},updated_at:{},created_at:{},protocol:{section:u.ConfigurationSchemaSection.Basic,tooltip:p("gateway_services.form.fields.protocol.tooltip")},host:{section:u.ConfigurationSchemaSection.Basic,tooltip:p("gateway_services.form.fields.host.tooltip")},path:{section:u.ConfigurationSchemaSection.Basic,tooltip:p("gateway_services.form.fields.path.tooltip")},port:{section:u.ConfigurationSchemaSection.Basic,tooltip:p("gateway_services.form.fields.port.tooltip")},tags:{tooltip:p("gateway_services.form.fields.tags.tooltip")},retries:{order:1,tooltip:p("gateway_services.form.fields.retries.tooltip")},connect_timeout:{order:2,tooltip:p("gateway_services.form.fields.connect_timeout.tooltip")},write_timeout:{order:3,tooltip:p("gateway_services.form.fields.write_timeout.tooltip")},read_timeout:{order:4,tooltip:p("gateway_services.form.fields.read_timeout.tooltip")},client_certificate:{order:5,tooltip:p("gateway_services.form.fields.client_certificate.tooltip")},ca_certificates:{type:u.ConfigurationSchemaType.BadgeTag,label:p("gateway_services.form.fields.ca_certificates.label"),order:6},tls_verify:{label:p("gateway_services.form.fields.tls_verify_enabled.label")},tls_verify_depth:{hidden:!0}});return(r,v)=>(e.openBlock(),e.createElementBlock("div",$e,[e.createVNode(e.unref(u.EntityBaseConfigCard),{config:n.config,"config-card-doc":n.configCardDoc,"config-schema":B.value,"entity-type":e.unref(u.SupportedEntityType).GatewayService,"fetch-url":s.value,"hide-title":n.hideTitle,"onFetch:error":v[0]||(v[0]=_=>r.$emit("fetch:error",_)),"onFetch:success":v[1]||(v[1]=_=>r.$emit("fetch:success",_)),onLoading:v[2]||(v[2]=_=>r.$emit("loading",_))},{"enabled-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(d),{keypath:"gateway_services.form.fields.enabled.tooltip",scope:"global"},{false:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(p)("gateway_services.form.fields.enabled.false")),1)]),true:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(p)("gateway_services.form.fields.enabled.true")),1)]),_:1})]),"ca_certificates-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(d),{keypath:"gateway_services.form.fields.ca_certificates.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(p)("gateway_services.form.fields.ca_certificates.code1")),1)]),code2:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(p)("gateway_services.form.fields.ca_certificates.code2")),1)]),_:1})]),"tls_verify-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(d),{keypath:"gateway_services.form.fields.tls_verify_enabled.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(p)("gateway_services.form.fields.tls_verify_enabled.code1")),1)]),_:1})]),tls_verify:e.withCtx(_=>[e.createTextVNode(e.toDisplayString(typeof e.unref(k)("rowValue",_)=="boolean"?D("rowValue",_):e.unref(p)("gateway_services.form.fields.tls_verify_option.unset.display")),1)]),client_certificate:e.withCtx(_=>[e.createTextVNode(e.toDisplayString(e.unref(k)("rowValue",_)?e.unref(k)("rowValue",_).id:"–"),1)]),_:1},8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}});w.GatewayServiceConfigCard=Ge,w.GatewayServiceForm=Ae,w.GatewayServiceList=we,Object.defineProperty(w,Symbol.toStringTag,{value:"Module"})});
1
+ (function(w,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vue-router"),require("@kong/icons"),require("@kong-ui-public/i18n"),require("@kong-ui-public/entities-shared")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","@kong/icons","@kong-ui-public/i18n","@kong-ui-public/entities-shared"],e):(w=typeof globalThis<"u"?globalThis:w||self,e(w["kong-ui-public-entities-gateway-services"]={},w.Vue,w.VueRouter,w.KongIcons,w["kong-ui-public-i18n"],w["kong-ui-public-entities-shared"]))})(this,function(w,e,de,ue,fe,u){"use strict";const me={actions:{create:"New Gateway Service",serverless_create:"Add a Service",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",clear:"Clear",view:"View Details",delete:{title:"Delete a Gateway Service",description:"Deleting this Gateway Service will also remove any associated plugins. This action cannot be reversed.",menu_label:"Delete"}},search:{placeholder:{konnect:"Filter by name",kongManager:"Filter by exact name or ID"}},gateway_services:{title:"Gateway Services",list:{toolbar_actions:{new_gateway_service:"New Gateway Service"},table_headers:{name:"Name",control_plane:"Control Plane",protocol:"Protocol",host:"Host",port:"Port",path:"Path",enabled:"Enabled",tags:"Tags",id:"ID",created_at:"Created At",updated_at:"Last Modified"},empty_state:{title:"Configure a New Gateway Service",description:"Gateway services are used to proxy traffic.",serverless_title:"Configure your first Gateway Service"}},form:{sections:{general:{title:"General Information",description:"General information will help identify and manage this Gateway Service."},keys:{title:"Service Endpoint",description:"Define the endpoint for this service by specifying the full URL or by its separate elements.",checkedGroupLabel:"Choose how and where to send traffic",urlLabel:"Full URL",checkedGroupAltLabel:"Protocol, Host, Port and Path",viewAdvancedFields:"View Advanced Fields"}},fields:{upstream_url:{label:"Upstream URL",placeholder:"Enter a URL",tooltip_for_konnect:"This is the URL of the API you will manage in Konnect.",tooltip_for_km:"This is the URL of the API you will manage in Kong Gateway."},name:{label:"Name",placeholder:"Enter a unique name",tooltip:"The Service name."},protocol:{label:"Protocol",tooltip:"The protocol used to communicate with the upstream.",options:{http:"http",https:"https",tcp:"tcp",tls:"tls",tls_passthrough:"tls_passthrough",grpc:"grpc",grpcs:"grpcs",ws:"ws",wss:"wss",udp:"udp"}},host:{label:"Host",placeholder:"Enter a host",tooltip:"The host of the upstream server. Note that the host value is case sensitive."},path:{label:"Path",placeholder:"Enter a path",tooltip:"The path to be used in request to the upstream server."},port:{label:"Port",tooltip:"The upstream server port."},retries:{label:"Retries",tooltip:"The number of retries to execute upon failure to proxy."},connect_timeout:{label:"Connection Timeout",tooltip:"The timeout in milliseconds for establishing a connection to the upstream server."},write_timeout:{label:"Write Timeout",tooltip:"The timeout in milliseconds between two successive write operations for transmitting a request to the upstream server."},read_timeout:{label:"Read Timeout",tooltip:"The timeout in milliseconds between two successive read operations for transmitting a request to the upstream server."},client_certificate:{label:"Client Certificate",placeholder:"Enter a Certificate ID",tooltip:"Certificate to be used as client certificate while TLS handshaking to the upstream server."},ca_certificates:{label:"CA Certificates",placeholder:"Enter a comma separated list of CA Certificate IDs",tooltip:"Array of {code1} object UUIDs that are used to build the trust store while verifying upstream server's TLS certificate. If set to {code2} when Nginx default is respected. If default CA list in Nginx are not specified and TLS verification is enabled, then handshake with upstream server will always fail (because no CA are trusted).",code1:"CA Certificate",code2:"null"},tls_verify_enabled:{label:"TLS Verify",help:"If unchecked, use default system setting",tooltip:"Whether to enable verification of upstream server TLS certificate. If set to {code1}, then the Nginx default is respected.",code1:"null"},tls_verify_option:{unset:{display:"Use default system setting"},true:{label:"True",display:"On"},false:{label:"False",display:"Off"}},tags:{label:"Tags",tooltip:"An optional set of strings associated with the Service for grouping and filtering.",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3"},enabled:{label:"Enabled",tooltip:"Whether the Service is active. If set to {false}, the proxy behavior will be as if any routes attached to it do not exist (404). Default: {true}.",false:"false",true:"true"}}}},errors:{general:"Gateway Services could not be retrieved",delete:"The gateway service could not be deleted at this time.",copy:"Failed to copy to clipboard",urlErrorMessage:"Error: invalid URL"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},glossary:{gateway_services:"gateway services"}};function ge(){const n=fe.createI18n("en-us",me);return{i18n:n,i18nT:fe.i18nTComponent(n)}}function ye(){return{getPortFromProtocol:(T,p)=>{const d=[80,443],s=Number(p);if((s||s===0)&&!d.includes(s))return s;switch(T){case"grpcs":case"tls":case"https":case"wss":return 443;case"grpc":case"tcp":case"http":case"ws":default:return 80}}}}const J={useI18n:ge,usePortFromProtocol:ye},z="/v2/control-planes/{controlPlaneId}/core-entities",Q="/{workspace}",F={list:{konnect:{all:`${z}/services`},kongManager:{all:`${Q}/services`}},form:{konnect:{create:`${z}/services`,validate:`${z}/v1/schemas/json/service/validate`,edit:`${z}/services/{id}`},kongManager:{create:`${Q}/services`,validate:`${Q}/schemas/services/validate`,edit:`${Q}/services/{id}`}}},_e={class:"kong-ui-entities-gateway-services-list"},be={key:1},he=e.defineComponent({__name:"GatewayServiceList",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||!n.createRoute||!n.getViewRoute||!n.getEditRoute||n.app==="kongManager"&&!n.isExactMatch&&!n.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1},isServerless:{type:Boolean,default:!1}},emits:["error","copy:success","copy:error","delete:success","toggle:success"],setup(n,{emit:T}){var C;const p=T,d=n,{i18n:{t:s,formatUnixTimeStamp:k}}=J.useI18n(),D=de.useRouter(),{axiosInstance:B}=u.useAxios((C=d.config)==null?void 0:C.axiosRequestConfig),r=e.ref(1),v=e.computed(()=>d.config.app!=="kongManager"||!!d.config.disableSorting),_={name:{label:s("gateway_services.list.table_headers.name"),searchable:!0,sortable:!0,hidable:!1},...d.config.showControlPlaneColumn?{control_plane:{label:s("gateway_services.list.table_headers.control_plane")}}:{},protocol:{label:s("gateway_services.list.table_headers.protocol"),searchable:!0,sortable:!0},host:{label:s("gateway_services.list.table_headers.host"),searchable:!0,sortable:!0},port:{label:s("gateway_services.list.table_headers.port"),searchable:!0,sortable:!0},path:{label:s("gateway_services.list.table_headers.path"),searchable:!0,sortable:!0},enabled:{label:s("gateway_services.list.table_headers.enabled"),searchable:!0,sortable:!0},tags:{label:s("gateway_services.list.table_headers.tags"),sortable:!1},updated_at:{label:s("gateway_services.list.table_headers.updated_at"),sortable:!0},created_at:{label:s("gateway_services.list.table_headers.created_at"),sortable:!0}},te={columnVisibility:{created_at:!1}},oe=_,S=e.computed(()=>{var f,l;let a=`${d.config.apiBaseUrl}${F.list[d.config.app].all}`;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}),le=e.computed(()=>d.config.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${S.value}`):new URL(S.value)),I=e.ref(""),b=e.computed(()=>{const a=d.config.app==="konnect"||d.config.isExactMatch;if(a)return{isExactMatch:a,placeholder:s(`search.placeholder.${d.config.app}`)};const{name:f,enabled:l,protocol:h,host:c,port:x,path:ee}=_;return{isExactMatch:a,fields:{name:f,enabled:l,protocol:h,host:c,port:x,path:ee},schema:d.config.filterSchema}}),{fetcher:A,fetcherState:$}=u.useFetcher(d.config,S.value),ie=()=>{I.value=""},t=()=>{r.value++},y=e.ref(null),G=e.ref(!1),re=e.computed(()=>({ctaPath:d.config.createRoute,ctaText:g.value?d.isServerless?s("actions.serverless_create"):s("actions.create"):void 0,message:`${s("gateway_services.list.empty_state.description")}${d.config.additionMessageForEmptyState?` ${d.config.additionMessageForEmptyState}`:""}`,title:g.value?d.isServerless?s("gateway_services.list.empty_state.serverless_title"):s("gateway_services.list.empty_state.title"):s("gateway_services.title")})),R=e.ref(!1),V=e.ref(null),P=e.computed(()=>{const a={action:"disable",id:"",name:""};if(V.value){const{enabled:f,id:l,name:h}=V.value;a.action=f?"disable":"enable",a.id=l,a.name=h||l}return a}),X=a=>{R.value=!0,V.value=a},L=()=>{R.value=!1,V.value=null},Y=async()=>{var h,c;if(!await((h=d.canEdit)==null?void 0:h.call(d,V.value))||!V.value)return;const f=`${le.value.href}/${V.value.id}`,l=!V.value.enabled;try{const{data:x}=((c=d.config)==null?void 0:c.app)==="konnect"?await B.put(f,{...V.value,enabled:l}):await B.patch(f,{...V.value,enabled:l});p("toggle:success",x),V.value.enabled=l}catch(x){p("error",x)}},se=a=>{d.config.getControlPlaneRoute&&D.push(d.config.getControlPlaneRoute(a))},ae=(a,f)=>{const l=a.id;if(!f(l)){p("copy:error",{entity:a,field:"id",message:s("errors.copy")});return}p("copy:success",{entity:a,field:"id",message:s("copy.success",{val:l})})},ne=(a,f)=>{const l=JSON.stringify(a);if(!f(l)){p("copy:error",{entity:a,message:s("errors.copy")});return}p("copy:success",{entity:a,message:s("copy.success_brief")})},ce=async a=>{var l;await((l=d.canRetrieve)==null?void 0:l.call(d,a))&&D.push(d.config.getViewRoute(a.id))},q=a=>({label:s("actions.view"),to:d.config.getViewRoute(a)}),Z=a=>({label:s("actions.edit"),to:d.config.getEditRoute(a)}),N=e.ref(void 0),K=e.ref(!1),U=e.ref(!1),W=e.ref(""),M=u.useDeleteUrlBuilder(d.config,S.value),O=a=>{N.value=a,K.value=!0,W.value=""},j=()=>{K.value=!1,N.value=void 0},o=async()=>{var a,f,l;if((a=N.value)!=null&&a.id){U.value=!0;try{await B.delete(M(N.value.id)),p("delete:success",N.value),j(),r.value++}catch(h){W.value=((l=(f=h.response)==null?void 0:f.data)==null?void 0:l.message)||h.message||s("errors.delete"),p("error",h)}finally{U.value=!1}}},i=e.ref(!1);e.watch($,a=>{var f,l,h,c;if(Array.isArray((f=a==null?void 0:a.response)==null?void 0:f.data)&&(i.value=a.response.data.length>0),a.status===u.FetcherStatus.NoRecords?G.value=!0:G.value=!1,a.status===u.FetcherStatus.Error){y.value={title:s("errors.general")},(c=(h=(l=a.error)==null?void 0:l.response)==null?void 0:h.data)!=null&&c.message&&(y.value.message=a.error.response.data.message),p("error",a.error);return}y.value=null});const g=e.ref(!1);return e.onBeforeMount(async()=>{g.value=await d.canCreate()}),(a,f)=>{const l=e.resolveComponent("KButton"),h=e.resolveComponent("KBadge"),c=e.resolveComponent("KInputSwitch"),x=e.resolveComponent("KDropdownItem"),ee=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",_e,[e.createVNode(e.unref(u.EntityBaseTable),{"cache-identifier":n.cacheIdentifier,"default-table-preferences":te,"disable-sorting":v.value,"empty-state-options":re.value,"enable-entity-actions":"","error-message":y.value,fetcher:e.unref(A),"fetcher-cache-key":r.value,"hide-toolbar":G.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-gateway-services-list",query:I.value,"table-headers":e.unref(oe),onClearSearchInput:ie,"onClick:row":f[2]||(f[2]=m=>ce(m)),onSort:t},{"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(u.EntityFilter),{modelValue:I.value,"onUpdate:modelValue":f[0]||(f[0]=m=>I.value=m),config:b.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!n.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>n.canCreate()},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(l,{appearance:"primary","data-testid":"toolbar-add-gateway-service",size:n.useActionOutside?"medium":"large",to:n.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(ue.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(s)("gateway_services.list.toolbar_actions.new_gateway_service")),1)]),_:1},8,["size","to"]),[[e.vShow,i.value]])]),_:1},8,["auth-function"])],8,["disabled"]))]),name:e.withCtx(({rowValue:m})=>[e.createElementVNode("b",null,e.toDisplayString(m??"-"),1)]),control_plane:e.withCtx(({row:m})=>{var E;return[(E=m.x_meta)!=null&&E.cluster_id?(e.openBlock(),e.createBlock(h,{key:0,tooltip:m.x_meta.cluster_id,"truncation-tooltip":"",onClick:e.withModifiers(H=>se(m.x_meta.cluster_id),["stop"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.x_meta.cluster_id),1)]),_:2},1032,["tooltip","onClick"])):(e.openBlock(),e.createElementBlock("b",be,"-"))]}),enabled:e.withCtx(({row:m})=>[e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>n.canEdit(m),"force-show":""},{default:e.withCtx(({isAllowed:E})=>[e.createElementVNode("div",{onClick:f[1]||(f[1]=e.withModifiers(()=>{},["stop"]))},[e.createVNode(c,{modelValue:m.enabled,"onUpdate:modelValue":H=>m.enabled=H,"data-testid":`row-${m.id}-toggle-input`,disabled:!E,onClick:e.withModifiers(H=>X(m),["prevent"])},null,8,["modelValue","onUpdate:modelValue","data-testid","disabled","onClick"])])]),_:2},1032,["auth-function"])]),tags:e.withCtx(({rowValue:m})=>[e.createVNode(e.unref(u.TableTags),{tags:m},null,8,["tags"])]),created_at:e.withCtx(({rowValue:m})=>[e.createTextVNode(e.toDisplayString(e.unref(k)(m)),1)]),updated_at:e.withCtx(({row:m,rowValue:E})=>[e.createTextVNode(e.toDisplayString(e.unref(k)(E??m.created_at)),1)]),actions:e.withCtx(({row:m})=>[e.createVNode(ee,null,{default:e.withCtx(({copyToClipboard:E})=>[e.createVNode(x,{"data-testid":"action-entity-copy-id",onClick:H=>ae(m,E)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)("actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(ee,null,{default:e.withCtx(({copyToClipboard:E})=>[e.createVNode(x,{"data-testid":"action-entity-copy-json",onClick:H=>ne(m,E)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)("actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>n.canRetrieve(m)},{default:e.withCtx(()=>[e.createVNode(x,{"data-testid":"action-entity-view","has-divider":"",item:q(m.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>n.canEdit(m)},{default:e.withCtx(()=>[e.createVNode(x,{"data-testid":"action-entity-edit",item:Z(m.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>n.canDelete(m)},{default:e.withCtx(()=>[e.createVNode(x,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:E=>O(m)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)("actions.delete.menu_label")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","hide-toolbar","query","table-headers"]),e.createVNode(e.unref(u.EntityToggleModal),{action:P.value.action,"entity-id":P.value.id,"entity-name":P.value.name,"entity-type":e.unref(s)("glossary.gateway_services"),"on-confirm":Y,visible:R.value,onCancel:L,onProceed:L},null,8,["action","entity-id","entity-name","entity-type","visible"]),e.createVNode(e.unref(u.EntityDeleteModal),{"action-pending":U.value,description:e.unref(s)("actions.delete.description"),"entity-name":N.value&&(N.value.name||N.value.id),"entity-type":e.unref(u.EntityTypes).GatewayService,error:W.value,title:e.unref(s)("actions.delete.title"),visible:K.value,onCancel:j,onProceed:o},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),pe=(n,T)=>{const p=n.__vccOpts||n;for(const[d,s]of T)p[d]=s;return p},we=pe(he,[["__scopeId","data-v-48f9a998"]]),ve={class:"kong-ui-entities-gateway-service-form"},Ve={key:0},Ce={class:"gateway-service-form-traffic-label"},ke={class:"gateway-service-form-margin-bottom"},Ne={key:0,class:"gateway-service-form-group-fields"},xe={key:1,class:"gateway-service-form-group-fields"},Ee={key:0},Se={class:"gateway-service-form-margin-top"},Te={class:"gateway-service-form-margin-bottom"},Ie={class:"gateway-service-form-margin-bottom"},Pe={class:"gateway-service-form-margin-bottom"},Be={class:"gateway-service-form-margin-bottom"},Ue={key:0,class:"gateway-service-form-margin-bottom"},Me={key:1,class:"gateway-service-form-margin-bottom"},De={key:2,class:"gateway-service-form-margin-bottom"},Re={key:0,class:"checkbox-aligned-radio"},Fe={key:1,class:"checkbox-aligned-radio"},Ae=pe(e.defineComponent({__name:"GatewayServiceForm",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||n.app==="konnect"&&!n.controlPlaneId||n.app==="kongManager"&&typeof n.workspace!="string"||!n.cancelRoute)},gatewayServiceId:{type:String,required:!1,default:""},hideSectionsInfo:{type:Boolean,required:!1,default:!1}},emits:["update","error","url-valid:success","url-valid:error","loading","model-updated"],setup(n,{expose:T,emit:p}){var j;const d=p,s=n,k=e.ref(!0),D=de.useRouter(),{i18nT:B,i18n:{t:r}}=J.useI18n(),{getMessageFromError:v}=u.useErrors(),{axiosInstance:_}=u.useAxios((j=s.config)==null?void 0:j.axiosRequestConfig),te=u.useValidators(),oe=e.computed(()=>F.form[s.config.app].edit),S=e.computed(()=>s.gatewayServiceId?u.EntityBaseFormType.Edit:u.EntityBaseFormType.Create),le=e.ref(!1),I=e.computed(()=>!!s.gatewayServiceId),b=e.ref(I.value?"protocol":"url"),A=J.usePortFromProtocol(),$=e.ref(""),ie=e.computed(()=>!!$.value),t=e.reactive({fields:{name:"",protocol:"http",host:"",path:"",port:80,url:"",retries:5,connect_timeout:6e4,write_timeout:6e4,read_timeout:6e4,client_certificate:"",ca_certificates:"",tls_verify_enabled:!1,tls_verify_value:!1,tags:""},isReadonly:!1,errorMessage:""}),y=e.reactive({name:"",protocol:"http",host:"",path:"",port:80,url:"",retries:5,connect_timeout:6e4,write_timeout:6e4,read_timeout:6e4,client_certificate:"",ca_certificates:"",tls_verify_enabled:!1,tls_verify_value:!1,tags:""}),G=s.config.app==="konnect"||u.useGatewayFeatureSupported({gatewayInfo:s.config.gatewayInfo,supportedRange:{enterprise:["3.0"]}}),re=[{label:r("gateway_services.form.fields.protocol.options.http"),value:"http",group:"http"},{label:r("gateway_services.form.fields.protocol.options.https"),value:"https",group:"http"},{label:r("gateway_services.form.fields.protocol.options.tcp"),value:"tcp",group:"tcp"},{label:r("gateway_services.form.fields.protocol.options.tls"),value:"tls",group:"tcp"},{label:r("gateway_services.form.fields.protocol.options.tls_passthrough"),value:"tls_passthrough",group:"tcp"},{label:r("gateway_services.form.fields.protocol.options.grpc"),value:"grpc",group:"grpc"},{label:r("gateway_services.form.fields.protocol.options.grpcs"),value:"grpcs",group:"grpc"},...G?[{label:r("gateway_services.form.fields.protocol.options.ws"),value:"ws",group:"websocket"},{label:r("gateway_services.form.fields.protocol.options.wss"),value:"wss",group:"websocket"}]:[],{label:r("gateway_services.form.fields.protocol.options.udp"),value:"udp",group:"udp"}],R={url:"url",protocol:"protocol"},V=(o,i)=>{i.value},P=o=>o?parseFloat(o):0,X=()=>{k.value=!0,t.errorMessage="",t.fields.host=y.host,t.fields.path=y.path,t.fields.port=y.port,t.fields.protocol=y.protocol,t.fields.url=y.url,t.fields.retries=y.retries,t.fields.connect_timeout=y.connect_timeout,t.fields.write_timeout=y.write_timeout,t.fields.read_timeout=y.read_timeout,t.fields.client_certificate=y.client_certificate,t.fields.ca_certificates=y.ca_certificates,t.fields.tls_verify_enabled=y.tls_verify_enabled,t.fields.tls_verify_value=y.tls_verify_value},L=()=>{if(t.fields.url&&b.value==="url")try{const o=new URL(t.fields.url);t.errorMessage="",t.fields.protocol=o.protocol.slice(0,-1),t.fields.host=o.hostname,t.fields.path=o.pathname;const i=Number(o.port);le.value=!!i,t.fields.port=i||A.getPortFromProtocol(t.fields.protocol),t.errorMessage="",d("url-valid:success")}catch(o){t.errorMessage=r("errors.urlErrorMessage"),d("url-valid:error",v(o))}else d("url-valid:success"),t.errorMessage=""},Y=e.computed(()=>!["tcp","tls","tls_passthrough","grpc","grpcs","udp"].includes(t.fields.protocol)),se=e.computed(()=>{if(b.value==="url")return!0;const o=["https","wss","tls"].includes(t.fields.protocol);return b.value==="protocol"&&o}),ae=e.computed(()=>{if(b.value==="url")return!0;const o=["https","tls"].includes(t.fields.protocol);return b.value==="protocol"&&o}),ne=e.computed(()=>{if(b.value==="url")return!0;const o=["https","wss","tls"].includes(t.fields.protocol);return b.value==="protocol"&&o}),ce=o=>{$.value=te.utf8Name(o)},q=e.computed(()=>I.value&&JSON.stringify(t.fields)!==JSON.stringify(y)||b.value==="url"&&!!t.fields.url||b.value==="protocol"&&!!t.fields.host),Z=o=>{var i,g,C;t.fields.name=(o==null?void 0:o.name)||"",t.fields.tags=((i=o==null?void 0:o.tags)==null?void 0:i.join(", "))||"",t.fields.protocol=(o==null?void 0:o.protocol)||"http",t.fields.path=(o==null?void 0:o.path)||"",t.fields.read_timeout=o!=null&&o.read_timeout||(o==null?void 0:o.read_timeout)===0?o==null?void 0:o.read_timeout:6e4,t.fields.retries=o!=null&&o.retries||(o==null?void 0:o.retries)===0?o==null?void 0:o.retries:5,t.fields.host=(o==null?void 0:o.host)||"",t.fields.connect_timeout=o!=null&&o.connect_timeout||(o==null?void 0:o.connect_timeout)===0?o==null?void 0:o.connect_timeout:6e4,t.fields.tls_verify_enabled=(o==null?void 0:o.tls_verify)!==""&&(o==null?void 0:o.tls_verify)!==null&&(o==null?void 0:o.tls_verify)!==void 0,t.fields.tls_verify_value=o!=null&&o.tls_verify?o==null?void 0:o.tls_verify:!1,t.fields.ca_certificates=((g=o==null?void 0:o.ca_certificates)==null?void 0:g.join(","))||"",t.fields.client_certificate=((C=o==null?void 0:o.client_certificate)==null?void 0:C.id)||"",t.fields.write_timeout=o!=null&&o.write_timeout||(o==null?void 0:o.write_timeout)===0?o==null?void 0:o.write_timeout:6e4,t.fields.port=o!=null&&o.port||(o==null?void 0:o.port)===0?o==null?void 0:o.port:80,Object.assign(y,t.fields)},N=()=>{D.push(s.config.cancelRoute)},K=e.computed(()=>{var i,g;let o=`${s.config.apiBaseUrl}${F.form[s.config.app].validate}`;return s.config.app==="konnect"?o=o.replace(/{controlPlaneId}/gi,((i=s.config)==null?void 0:i.controlPlaneId)||""):s.config.app==="kongManager"&&(o=o.replace(/\/{workspace}/gi,(g=s.config)!=null&&g.workspace?`/${s.config.workspace}`:"")),o=o.replace(/{id}/gi,s.gatewayServiceId),o}),U=e.computed(()=>{var i,g;let o=`${s.config.apiBaseUrl}${F.form[s.config.app][S.value]}`;return s.config.app==="konnect"?o=o.replace(/{controlPlaneId}/gi,((i=s.config)==null?void 0:i.controlPlaneId)||""):s.config.app==="kongManager"&&(o=o.replace(/\/{workspace}/gi,(g=s.config)!=null&&g.workspace?`/${s.config.workspace}`:"")),o=o.replace(/{id}/gi,s.gatewayServiceId),o}),W=o=>{let i="";o.url&&(i=new URL(o.url).protocol),(["https","wss","tls"].includes(o.protocol)||["https","wss","tls"].includes(i))&&(o.tls_verify=o.tls_verify_enabled?o.tls_verify_value:null),delete o.tls_verify_enabled,delete o.tls_verify_value},M=e.computed(()=>{var i,g,C,a;const o={name:t.fields.name||null,tags:t.fields.tags?(C=(g=(i=t.fields.tags)==null?void 0:i.split(","))==null?void 0:g.map(f=>String(f||"").trim()))==null?void 0:C.filter(f=>f!==""):null,protocol:t.fields.protocol,path:t.fields.path||null,read_timeout:t.fields.read_timeout,retries:t.fields.retries,host:t.fields.host,connect_timeout:t.fields.connect_timeout,tls_verify_value:t.fields.tls_verify_value,tls_verify_enabled:t.fields.tls_verify_enabled,ca_certificates:t.fields.ca_certificates?(a=t.fields.ca_certificates)==null?void 0:a.split(",").filter(f=>f!==""):null,client_certificate:t.fields.client_certificate?{id:t.fields.client_certificate}:null,write_timeout:t.fields.write_timeout,port:t.fields.port,url:t.fields.url};return t.fields.client_certificate&&["https","wss","tls"].includes(t.fields.protocol)&&(o.client_certificate={id:t.fields.client_certificate}),t.fields.tls_verify_enabled&&["https","wss","tls"].includes(t.fields.protocol)&&(o.tls_verify=t.fields.tls_verify_value),Y.value||(o.path=null),S.value==="create"?b.value==="url"?(delete o.protocol,delete o.host,delete o.path,s.config.app==="konnect"&&delete o.port):delete o.url:S.value==="edit"&&delete o.url,o}),O=async()=>{var o,i,g,C;try{t.isReadonly=!0,L();const a=M.value;W(a);let f;if(await _.post(K.value,a),S.value==="create"?f=await _.post(U.value,a):S.value==="edit"&&(f=((o=s.config)==null?void 0:o.app)==="konnect"?await _.put(U.value,a):await _.patch(U.value,a)),f){const{data:l}=f;t.fields.name=(l==null?void 0:l.name)||"",t.fields.port=l.port||A.getPortFromProtocol(l.protocol),t.fields.protocol=(l==null?void 0:l.protocol)||"http",t.fields.host=(l==null?void 0:l.host)||"",t.fields.path=(l==null?void 0:l.path)||"",t.fields.url=(l==null?void 0:l.url)||"",t.fields.retries=l!=null&&l.retries||(l==null?void 0:l.retries)===0?l==null?void 0:l.retries:5,t.fields.connect_timeout=l!=null&&l.connect_timeout||(l==null?void 0:l.connect_timeout)===0?l==null?void 0:l.connect_timeout:6e4,t.fields.write_timeout=l!=null&&l.write_timeout||(l==null?void 0:l.write_timeout)===0?l==null?void 0:l.write_timeout:6e4,t.fields.read_timeout=l!=null&&l.read_timeout||(l==null?void 0:l.read_timeout)===0?l==null?void 0:l.read_timeout:6e4,t.fields.client_certificate=((i=l==null?void 0:l.client_certificate)==null?void 0:i.id)||"",t.fields.ca_certificates=(g=l==null?void 0:l.ca_certificates)!=null&&g.length?l==null?void 0:l.ca_certificates.join(","):"",t.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,t.fields.tls_verify_value=t.fields.tls_verify_enabled&&(l==null?void 0:l.tls_verify),t.fields.tags=(C=l==null?void 0:l.tags)!=null&&C.length?l.tags.join(", "):"",Object.assign(y,t.fields),d("update",f==null?void 0:f.data)}return f}catch(a){t.errorMessage=v(a),d("error",a)}finally{t.isReadonly=!1}};return e.watch(()=>s.gatewayServiceId,()=>{Object.assign(t.fields,y)}),e.watch(t.fields,o=>{t.fields.port=A.getPortFromProtocol(o.protocol,String(o.port)),d("model-updated",M.value)}),e.onMounted(()=>{d("model-updated",M.value)}),T({validateUrl:L,getPayload:M,saveFormData:O,canSubmit:q,initForm:Z}),(o,i)=>{const g=e.resolveComponent("KInput"),C=e.resolveComponent("KLabel"),a=e.resolveComponent("KRadio"),f=e.resolveComponent("KSelect"),l=e.resolveComponent("KCheckbox"),h=e.resolveComponent("KCollapse");return e.openBlock(),e.createElementBlock("div",ve,[e.createVNode(e.unref(u.EntityBaseForm),{"can-submit":q.value,config:n.config,"edit-id":n.gatewayServiceId,"entity-type":e.unref(u.SupportedEntityType).GatewayService,"error-message":t.errorMessage,"fetch-url":oe.value,"form-fields":M.value,"is-readonly":t.isReadonly,onCancel:N,"onFetch:error":i[25]||(i[25]=c=>o.$emit("error",c)),"onFetch:success":Z,onLoading:i[26]||(i[26]=c=>o.$emit("loading",c)),onSubmit:O},{"form-actions":e.withCtx(()=>[e.renderSlot(o.$slots,"form-actions",{canSubmit:q.value,cancel:N,submit:O},void 0,!0)]),default:e.withCtx(()=>[e.createVNode(e.unref(u.EntityFormSection),{description:e.unref(r)("gateway_services.form.sections.general.description"),"hide-info-header":n.hideSectionsInfo,title:e.unref(r)("gateway_services.form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:t.fields.name,"onUpdate:modelValue":i[0]||(i[0]=c=>t.fields.name=c),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-name-input",error:ie.value,"error-message":$.value,label:e.unref(r)("gateway_services.form.fields.name.label"),"label-attributes":{info:e.unref(r)("gateway_services.form.fields.name.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"name",placeholder:e.unref(r)("gateway_services.form.fields.name.placeholder"),readonly:t.isReadonly,type:"text",onInput:ce},null,8,["modelValue","error","error-message","label","label-attributes","placeholder","readonly"]),e.createVNode(g,{modelValue:t.fields.tags,"onUpdate:modelValue":i[1]||(i[1]=c=>t.fields.tags=c),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-tags-input",help:e.unref(r)("gateway_services.form.fields.tags.help"),label:e.unref(r)("gateway_services.form.fields.tags.label"),"label-attributes":{info:e.unref(r)("gateway_services.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"tags",placeholder:e.unref(r)("gateway_services.form.fields.tags.placeholder"),readonly:t.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","hide-info-header","title"]),e.createVNode(e.unref(u.EntityFormSection),{description:e.unref(r)("gateway_services.form.sections.keys.description"),"hide-info-header":n.hideSectionsInfo,title:e.unref(r)("gateway_services.form.sections.keys.title")},{default:e.withCtx(()=>[I.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ve,[e.createElementVNode("div",Ce,[e.createVNode(C,{required:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("gateway_services.form.sections.keys.checkedGroupLabel")),1)]),_:1})]),e.createElementVNode("div",ke,[e.createVNode(a,{modelValue:b.value,"onUpdate:modelValue":i[2]||(i[2]=c=>b.value=c),"data-testid":"gateway-service-url-radio","selected-value":R.url,onChange:X},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("gateway_services.form.sections.keys.urlLabel")),1)]),_:1},8,["modelValue","selected-value"])]),b.value==="url"?(e.openBlock(),e.createElementBlock("div",Ne,[e.createVNode(g,{modelValue:t.fields.url,"onUpdate:modelValue":i[3]||(i[3]=c=>t.fields.url=c),modelModifiers:{trim:!0},class:"gateway-service-url-input gateway-service-form-margin-bottom","data-testid":"gateway-service-url-input",label:e.unref(r)("gateway_services.form.fields.upstream_url.label"),"label-attributes":{info:n.config.app==="konnect"?e.unref(r)("gateway_services.form.fields.upstream_url.tooltip_for_konnect"):e.unref(r)("gateway_services.form.fields.upstream_url.tooltip_for_km"),tooltipAttributes:{maxWidth:"400"}},name:"url",placeholder:e.unref(r)("gateway_services.form.fields.upstream_url.placeholder"),required:""},null,8,["modelValue","label","label-attributes","placeholder"])])):e.createCommentVNode("",!0),e.createVNode(a,{modelValue:b.value,"onUpdate:modelValue":i[4]||(i[4]=c=>b.value=c),"checked-group":"protocol","data-testid":"gateway-service-protocol-radio","selected-value":R.protocol,onChange:X},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("gateway_services.form.sections.keys.checkedGroupAltLabel")),1)]),_:1},8,["modelValue","selected-value"])])),b.value==="protocol"||I.value?(e.openBlock(),e.createElementBlock("div",xe,[e.createVNode(f,{modelValue:t.fields.protocol,"onUpdate:modelValue":i[5]||(i[5]=c=>t.fields.protocol=c),"data-testid":"gateway-service-protocol-select",items:re,label:e.unref(r)("gateway_services.form.fields.protocol.label"),"label-attributes":{info:e.unref(r)("gateway_services.form.fields.protocol.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.isReadonly,required:"",width:"100%",onSelected:i[6]||(i[6]=c=>V(t.fields.protocol,c))},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(g,{modelValue:t.fields.host,"onUpdate:modelValue":i[7]||(i[7]=c=>t.fields.host=c),modelModifiers:{trim:!0},class:"gateway-service-form-margin-top","data-testid":"gateway-service-host-input",label:e.unref(r)("gateway_services.form.fields.host.label"),"label-attributes":{info:e.unref(r)("gateway_services.form.fields.host.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"host",placeholder:e.unref(r)("gateway_services.form.fields.host.placeholder"),required:""},null,8,["modelValue","label","label-attributes","placeholder"]),Y.value?(e.openBlock(),e.createElementBlock("div",Ee,[e.createVNode(g,{modelValue:t.fields.path,"onUpdate:modelValue":i[8]||(i[8]=c=>t.fields.path=c),modelModifiers:{trim:!0},class:"gateway-service-form-margin-top","data-testid":"gateway-service-path-input",label:e.unref(r)("gateway_services.form.fields.path.label"),"label-attributes":{info:e.unref(r)("gateway_services.form.fields.path.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"path",placeholder:e.unref(r)("gateway_services.form.fields.path.placeholder")},null,8,["modelValue","label","label-attributes","placeholder"])])):e.createCommentVNode("",!0),e.createVNode(g,{modelValue:t.fields.port,"onUpdate:modelValue":[i[9]||(i[9]=c=>t.fields.port=c),i[10]||(i[10]=()=>{t.fields.port=P(t.fields.port+"")})],class:"gateway-service-form-margin-top","data-testid":"gateway-service-port-input",label:e.unref(r)("gateway_services.form.fields.port.label"),"label-attributes":{info:e.unref(r)("gateway_services.form.fields.port.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"port",type:"number"},null,8,["modelValue","label","label-attributes"])])):e.createCommentVNode("",!0),e.createVNode(h,{modelValue:k.value,"onUpdate:modelValue":i[24]||(i[24]=c=>k.value=c),"data-testid":"advanced-fields-collapse","trigger-alignment":"leading","trigger-label":e.unref(r)("gateway_services.form.sections.keys.viewAdvancedFields")},{default:e.withCtx(()=>[e.createElementVNode("div",Se,[e.createElementVNode("div",Te,[e.createVNode(g,{modelValue:t.fields.retries,"onUpdate:modelValue":[i[11]||(i[11]=c=>t.fields.retries=c),i[12]||(i[12]=()=>{t.fields.retries=P(t.fields.retries+"")})],autocomplete:"off","data-testid":"gateway-service-retries-input",label:e.unref(r)("gateway_services.form.fields.retries.label"),"label-attributes":{info:e.unref(r)("gateway_services.form.fields.retries.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"retries",readonly:t.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",Ie,[e.createVNode(g,{modelValue:t.fields.connect_timeout,"onUpdate:modelValue":[i[13]||(i[13]=c=>t.fields.connect_timeout=c),i[14]||(i[14]=()=>{t.fields.connect_timeout=P(t.fields.connect_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-connTimeout-input",label:e.unref(r)("gateway_services.form.fields.connect_timeout.label"),"label-attributes":{info:e.unref(r)("gateway_services.form.fields.connect_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"connTimeout",readonly:t.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",Pe,[e.createVNode(g,{modelValue:t.fields.write_timeout,"onUpdate:modelValue":[i[15]||(i[15]=c=>t.fields.write_timeout=c),i[16]||(i[16]=()=>{t.fields.write_timeout=P(t.fields.write_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-writeTimeout-input",label:e.unref(r)("gateway_services.form.fields.write_timeout.label"),"label-attributes":{info:e.unref(r)("gateway_services.form.fields.write_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"writeTimeout",readonly:t.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",Be,[e.createVNode(g,{modelValue:t.fields.read_timeout,"onUpdate:modelValue":[i[17]||(i[17]=c=>t.fields.read_timeout=c),i[18]||(i[18]=()=>{t.fields.read_timeout=P(t.fields.read_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-readTimeout-input",label:e.unref(r)("gateway_services.form.fields.read_timeout.label"),"label-attributes":{info:e.unref(r)("gateway_services.form.fields.read_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"readTimeout",readonly:t.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),se.value?(e.openBlock(),e.createElementBlock("div",Ue,[e.createVNode(g,{modelValue:t.fields.client_certificate,"onUpdate:modelValue":i[19]||(i[19]=c=>t.fields.client_certificate=c),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-clientCert-input",label:e.unref(r)("gateway_services.form.fields.client_certificate.label"),"label-attributes":{info:e.unref(r)("gateway_services.form.fields.client_certificate.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"clientCert",placeholder:e.unref(r)("gateway_services.form.fields.client_certificate.placeholder"),readonly:t.isReadonly,type:"text"},null,8,["modelValue","label","label-attributes","placeholder","readonly"])])):e.createCommentVNode("",!0),ae.value?(e.openBlock(),e.createElementBlock("div",Me,[e.createVNode(g,{modelValue:t.fields.ca_certificates,"onUpdate:modelValue":i[20]||(i[20]=c=>t.fields.ca_certificates=c),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-ca-certs-input",label:e.unref(r)("gateway_services.form.fields.ca_certificates.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(r)("gateway_services.form.fields.ca_certificates.placeholder"),readonly:t.isReadonly,type:"text"},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(B),{keypath:"gateway_services.form.fields.ca_certificates.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(r)("gateway_services.form.fields.ca_certificates.code1")),1)]),code2:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(r)("gateway_services.form.fields.ca_certificates.code2")),1)]),_:1})]),_:1},8,["modelValue","label","placeholder","readonly"])])):e.createCommentVNode("",!0),ne.value?(e.openBlock(),e.createElementBlock("div",De,[e.createVNode(l,{modelValue:t.fields.tls_verify_enabled,"onUpdate:modelValue":i[21]||(i[21]=c=>t.fields.tls_verify_enabled=c),"data-testid":"gateway-service-tls-verify-checkbox",description:e.unref(r)("gateway_services.form.fields.tls_verify_enabled.help"),label:e.unref(r)("gateway_services.form.fields.tls_verify_enabled.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}}},{tooltip:e.withCtx(()=>[e.createVNode(e.unref(B),{keypath:"gateway_services.form.fields.tls_verify_enabled.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(r)("gateway_services.form.fields.tls_verify_enabled.code1")),1)]),_:1})]),_:1},8,["modelValue","description","label"]),t.fields.tls_verify_enabled?(e.openBlock(),e.createElementBlock("div",Re,[e.createVNode(a,{modelValue:t.fields.tls_verify_value,"onUpdate:modelValue":i[22]||(i[22]=c=>t.fields.tls_verify_value=c),"data-testid":"gateway-service-tls-verify-true-option",label:e.unref(r)("gateway_services.form.fields.tls_verify_option.true.label"),"selected-value":!0},null,8,["modelValue","label"])])):e.createCommentVNode("",!0),t.fields.tls_verify_enabled?(e.openBlock(),e.createElementBlock("div",Fe,[e.createVNode(a,{modelValue:t.fields.tls_verify_value,"onUpdate:modelValue":i[23]||(i[23]=c=>t.fields.tls_verify_value=c),"data-testid":"gateway-service-tls-verify-false-option",label:e.unref(r)("gateway_services.form.fields.tls_verify_option.false.label"),"selected-value":!1},null,8,["modelValue","label"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","trigger-label"])]),_:1},8,["description","hide-info-header","title"])]),_:3},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-35e0db56"]]),$e={class:"kong-ui-gateway-service-entity-config-card"},Ge=e.defineComponent({__name:"GatewayServiceConfigCard",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||n.app==="konnect"&&!n.controlPlaneId||n.app==="kongManager"&&typeof n.workspace!="string"||!n.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(n){const T=n,{i18n:{t:p},i18nT:d}=J.useI18n(),s=e.computed(()=>F.form[T.config.app].edit),{getPropValue:k}=u.useHelpers(),D=(r,v)=>k(r,v)===!0?p("gateway_services.form.fields.tls_verify_option.true.display"):p("gateway_services.form.fields.tls_verify_option.false.display"),B=e.ref({id:{},name:{tooltip:p("gateway_services.form.fields.name.tooltip")},enabled:{},updated_at:{},created_at:{},protocol:{section:u.ConfigurationSchemaSection.Basic,tooltip:p("gateway_services.form.fields.protocol.tooltip")},host:{section:u.ConfigurationSchemaSection.Basic,tooltip:p("gateway_services.form.fields.host.tooltip")},path:{section:u.ConfigurationSchemaSection.Basic,tooltip:p("gateway_services.form.fields.path.tooltip")},port:{section:u.ConfigurationSchemaSection.Basic,tooltip:p("gateway_services.form.fields.port.tooltip")},tags:{tooltip:p("gateway_services.form.fields.tags.tooltip")},retries:{order:1,tooltip:p("gateway_services.form.fields.retries.tooltip")},connect_timeout:{order:2,tooltip:p("gateway_services.form.fields.connect_timeout.tooltip")},write_timeout:{order:3,tooltip:p("gateway_services.form.fields.write_timeout.tooltip")},read_timeout:{order:4,tooltip:p("gateway_services.form.fields.read_timeout.tooltip")},client_certificate:{order:5,tooltip:p("gateway_services.form.fields.client_certificate.tooltip")},ca_certificates:{type:u.ConfigurationSchemaType.BadgeTag,label:p("gateway_services.form.fields.ca_certificates.label"),order:6},tls_verify:{label:p("gateway_services.form.fields.tls_verify_enabled.label")},tls_verify_depth:{hidden:!0}});return(r,v)=>(e.openBlock(),e.createElementBlock("div",$e,[e.createVNode(e.unref(u.EntityBaseConfigCard),{config:n.config,"config-card-doc":n.configCardDoc,"config-schema":B.value,"entity-type":e.unref(u.SupportedEntityType).GatewayService,"fetch-url":s.value,"hide-title":n.hideTitle,"onFetch:error":v[0]||(v[0]=_=>r.$emit("fetch:error",_)),"onFetch:success":v[1]||(v[1]=_=>r.$emit("fetch:success",_)),onLoading:v[2]||(v[2]=_=>r.$emit("loading",_))},{"enabled-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(d),{keypath:"gateway_services.form.fields.enabled.tooltip",scope:"global"},{false:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(p)("gateway_services.form.fields.enabled.false")),1)]),true:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(p)("gateway_services.form.fields.enabled.true")),1)]),_:1})]),"ca_certificates-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(d),{keypath:"gateway_services.form.fields.ca_certificates.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(p)("gateway_services.form.fields.ca_certificates.code1")),1)]),code2:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(p)("gateway_services.form.fields.ca_certificates.code2")),1)]),_:1})]),"tls_verify-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(d),{keypath:"gateway_services.form.fields.tls_verify_enabled.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(p)("gateway_services.form.fields.tls_verify_enabled.code1")),1)]),_:1})]),tls_verify:e.withCtx(_=>[e.createTextVNode(e.toDisplayString(typeof e.unref(k)("rowValue",_)=="boolean"?D("rowValue",_):e.unref(p)("gateway_services.form.fields.tls_verify_option.unset.display")),1)]),client_certificate:e.withCtx(_=>[e.createTextVNode(e.toDisplayString(e.unref(k)("rowValue",_)?e.unref(k)("rowValue",_).id:"–"),1)]),_:1},8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}});w.GatewayServiceConfigCard=Ge,w.GatewayServiceForm=Ae,w.GatewayServiceList=we,Object.defineProperty(w,Symbol.toStringTag,{value:"Module"})});
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .config-card-fieldset[data-v-68ca83ec]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-68ca83ec]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-c96811e5] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-2fde1e51]{align-items:center;border-bottom:var(--445df5cd);display:var(--36146f00);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-2fde1e51]{width:var(--41377040)}.config-card-details-row .config-card-details-label label[data-v-2fde1e51]{color:#3a3f51}.config-card-details-row .config-card-details-value[data-v-2fde1e51]{width:var(--4132e48a)}.config-card-details-row .config-card-details-value .truncated[data-v-2fde1e51]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-2fde1e51]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-2fde1e51] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-2fde1e51]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-2fde1e51]{margin-right:4px}.config-card-details-row[data-v-2fde1e51] .k-label{margin-bottom:0}.config-card-details-row[data-v-2fde1e51] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-2fde1e51] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 8px 12px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0;padding-top:0}.json-endpoint .k-code-block .code-block-secondary-actions{margin-top:0!important}.json-endpoint code{direction:rtl;max-width:var(--454fa8c4);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d15be7fe]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-7ef5c755]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-7ef5c755]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-7ef5c755]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-7ef5c755] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-7ef5c755]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-6210a67a]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form .form-actions[data-v-6210a67a]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.kong-ui-entity-base-form .form-actions[data-v-6210a67a] .k-button:last-of-type,.kong-ui-entity-base-form .form-actions[data-v-6210a67a] .k-button:nth-last-of-type(2){margin-left:16px}.kong-ui-entity-base-form[data-v-6210a67a] .k-slideout-title{color:#000933!important;font-size:24px!important;font-weight:700!important;line-height:32px!important;margin-bottom:16px!important}.kong-ui-entity-base-form[data-v-6210a67a] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-6210a67a] .tab-item>div.tab-link.has-panels{color:#6c7489!important;font-size:14px!important;font-weight:700!important;line-height:24px!important}.kong-ui-entity-base-form[data-v-6210a67a] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.content-wrapper[data-v-b252463e] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-765e475b]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-765e475b]{margin-left:auto}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-10fa27a5]{width:100%}.kong-ui-entity-filter-clear[data-v-10fa27a5]{cursor:pointer}.kong-ui-entity-filter[data-v-10fa27a5]{display:flex;position:relative}.kong-ui-entity-filter[data-v-10fa27a5] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-10fa27a5] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-10fa27a5]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-10fa27a5]{background-color:#fff;border:1px solid #afb7c5;border-radius:4px;box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;padding:8px 0 12px;position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-10fa27a5]{border-bottom:1px solid #e0e4ea;color:#6c7489;font-size:12px;font-weight:400;line-height:16px;list-style:none;margin:0 20px;padding:16px 0;position:relative;white-space:nowrap}.menu-item-title[data-v-10fa27a5]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-10fa27a5]{color:#232633}.menu-item-expand-icon[data-v-10fa27a5]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-10fa27a5]{transform:rotate(180deg)}.menu-item-indicator[data-v-10fa27a5]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-10fa27a5]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-10fa27a5] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-10fa27a5] .k-input{width:100%}.menu-item-body[data-v-10fa27a5] .k-select-input .input{font-size:12px}.menu-item-body[data-v-10fa27a5] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-10fa27a5]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-10fa27a5]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-10fa27a5]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.kong-ui-public-entity-link[data-v-60e3ef7c]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-60e3ef7c]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-60e3ef7c]{display:flex}.kong-ui-public-entity-link .entity-link[data-v-60e3ef7c] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-60e3ef7c]{display:inline-block;font-weight:400;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-60e3ef7c]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-60e3ef7c]{margin-left:2px}.kong-ui-entities-gateway-services-list[data-v-d7870a2d]{width:100%}.kong-ui-entities-gateway-services-list .kong-ui-entity-filter-input[data-v-d7870a2d]{margin-right:12px}.kong-ui-entities-gateway-service-form[data-v-35e0db56]{width:100%}.kong-ui-entities-gateway-service-form[data-v-35e0db56] .k-tooltip{max-width:300px}.kong-ui-entities-gateway-service-form .gateway-service-form-margin-top[data-v-35e0db56]{margin-top:16px}.kong-ui-entities-gateway-service-form .gateway-service-form-traffic-label[data-v-35e0db56]{margin-bottom:16px}.kong-ui-entities-gateway-service-form .gateway-service-url-input[data-v-35e0db56],.kong-ui-entities-gateway-service-form .gateway-service-url-input[data-v-35e0db56] .input-element-wrapper{display:flex}.kong-ui-entities-gateway-service-form .gateway-service-form-group-fields[data-v-35e0db56]{margin-left:24px}.kong-ui-entities-gateway-service-form .gateway-service-form-margin-bottom[data-v-35e0db56]{margin-bottom:16px}.kong-ui-entities-gateway-service-form .checkbox-aligned-radio[data-v-35e0db56]{margin:4px;padding-left:24px}
1
+ .config-card-fieldset[data-v-68ca83ec]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-68ca83ec]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-c96811e5] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-2fde1e51]{align-items:center;border-bottom:var(--445df5cd);display:var(--36146f00);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-2fde1e51]{width:var(--41377040)}.config-card-details-row .config-card-details-label label[data-v-2fde1e51]{color:#3a3f51}.config-card-details-row .config-card-details-value[data-v-2fde1e51]{width:var(--4132e48a)}.config-card-details-row .config-card-details-value .truncated[data-v-2fde1e51]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-2fde1e51]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-2fde1e51] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-2fde1e51]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-2fde1e51]{margin-right:4px}.config-card-details-row[data-v-2fde1e51] .k-label{margin-bottom:0}.config-card-details-row[data-v-2fde1e51] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-2fde1e51] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 8px 12px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0;padding-top:0}.json-endpoint .k-code-block .code-block-secondary-actions{margin-top:0!important}.json-endpoint code{direction:rtl;max-width:var(--454fa8c4);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d15be7fe]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-7ef5c755]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-7ef5c755]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-7ef5c755]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-7ef5c755] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-7ef5c755]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-6210a67a]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form .form-actions[data-v-6210a67a]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.kong-ui-entity-base-form .form-actions[data-v-6210a67a] .k-button:last-of-type,.kong-ui-entity-base-form .form-actions[data-v-6210a67a] .k-button:nth-last-of-type(2){margin-left:16px}.kong-ui-entity-base-form[data-v-6210a67a] .k-slideout-title{color:#000933!important;font-size:24px!important;font-weight:700!important;line-height:32px!important;margin-bottom:16px!important}.kong-ui-entity-base-form[data-v-6210a67a] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-6210a67a] .tab-item>div.tab-link.has-panels{color:#6c7489!important;font-size:14px!important;font-weight:700!important;line-height:24px!important}.kong-ui-entity-base-form[data-v-6210a67a] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.content-wrapper[data-v-b252463e] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-765e475b]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-765e475b]{margin-left:auto}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-10fa27a5]{width:100%}.kong-ui-entity-filter-clear[data-v-10fa27a5]{cursor:pointer}.kong-ui-entity-filter[data-v-10fa27a5]{display:flex;position:relative}.kong-ui-entity-filter[data-v-10fa27a5] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-10fa27a5] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-10fa27a5]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-10fa27a5]{background-color:#fff;border:1px solid #afb7c5;border-radius:4px;box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;padding:8px 0 12px;position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-10fa27a5]{border-bottom:1px solid #e0e4ea;color:#6c7489;font-size:12px;font-weight:400;line-height:16px;list-style:none;margin:0 20px;padding:16px 0;position:relative;white-space:nowrap}.menu-item-title[data-v-10fa27a5]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-10fa27a5]{color:#232633}.menu-item-expand-icon[data-v-10fa27a5]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-10fa27a5]{transform:rotate(180deg)}.menu-item-indicator[data-v-10fa27a5]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-10fa27a5]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-10fa27a5] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-10fa27a5] .k-input{width:100%}.menu-item-body[data-v-10fa27a5] .k-select-input .input{font-size:12px}.menu-item-body[data-v-10fa27a5] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-10fa27a5]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-10fa27a5]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-10fa27a5]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.kong-ui-public-entity-link[data-v-60e3ef7c]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-60e3ef7c]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-60e3ef7c]{display:flex}.kong-ui-public-entity-link .entity-link[data-v-60e3ef7c] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-60e3ef7c]{display:inline-block;font-weight:400;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-60e3ef7c]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-60e3ef7c]{margin-left:2px}.kong-ui-entities-gateway-services-list[data-v-48f9a998]{width:100%}.kong-ui-entities-gateway-services-list .kong-ui-entity-filter-input[data-v-48f9a998]{margin-right:12px}.kong-ui-entities-gateway-service-form[data-v-35e0db56]{width:100%}.kong-ui-entities-gateway-service-form[data-v-35e0db56] .k-tooltip{max-width:300px}.kong-ui-entities-gateway-service-form .gateway-service-form-margin-top[data-v-35e0db56]{margin-top:16px}.kong-ui-entities-gateway-service-form .gateway-service-form-traffic-label[data-v-35e0db56]{margin-bottom:16px}.kong-ui-entities-gateway-service-form .gateway-service-url-input[data-v-35e0db56],.kong-ui-entities-gateway-service-form .gateway-service-url-input[data-v-35e0db56] .input-element-wrapper{display:flex}.kong-ui-entities-gateway-service-form .gateway-service-form-group-fields[data-v-35e0db56]{margin-left:24px}.kong-ui-entities-gateway-service-form .gateway-service-form-margin-bottom[data-v-35e0db56]{margin-bottom:16px}.kong-ui-entities-gateway-service-form .checkbox-aligned-radio[data-v-35e0db56]{margin:4px;padding-left:24px}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/entities-gateway-services",
3
- "version": "3.8.35",
3
+ "version": "3.8.37-pr.1775.486e9e080.0",
4
4
  "type": "module",
5
5
  "main": "./dist/entities-gateway-services.umd.js",
6
6
  "module": "./dist/entities-gateway-services.es.js",
@@ -22,12 +22,12 @@
22
22
  },
23
23
  "peerDependencies": {
24
24
  "@kong/icons": "^1.19.1",
25
- "@kong/kongponents": "^9.14.8",
25
+ "@kong/kongponents": "^9.14.13",
26
26
  "axios": "^1.7.7",
27
27
  "vue": ">= 3.3.13 < 4",
28
28
  "vue-router": "^4.4.5",
29
- "@kong-ui-public/entities-shared": "^3.10.7",
30
- "@kong-ui-public/i18n": "^2.2.8"
29
+ "@kong-ui-public/entities-shared": "^3.10.9-pr.1775.486e9e080.0",
30
+ "@kong-ui-public/i18n": "^2.2.9-pr.1775.486e9e080.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@kong/design-tokens": "1.17.2",
@@ -36,8 +36,8 @@
36
36
  "axios": "^1.7.7",
37
37
  "vue": "^3.5.12",
38
38
  "vue-router": "^4.4.5",
39
- "@kong-ui-public/entities-shared": "^3.10.7",
40
- "@kong-ui-public/i18n": "^2.2.8"
39
+ "@kong-ui-public/entities-shared": "^3.10.9-pr.1775.486e9e080.0",
40
+ "@kong-ui-public/i18n": "^2.2.9-pr.1775.486e9e080.0"
41
41
  },
42
42
  "repository": {
43
43
  "type": "git",