@kong-ui-public/entities-gateway-services 3.23.15 → 3.24.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,29 +1,29 @@
1
- import { defineComponent as Ie, computed as k, ref as B, watch as xe, onBeforeMount as Ze, resolveComponent as U, openBlock as y, createElementBlock as V, createVNode as i, unref as t, createSlots as Se, withCtx as n, createTextVNode as F, toDisplayString as _, createBlock as G, createCommentVNode as E, createElementVNode as P, withModifiers as Ue, Teleport as Je, Fragment as Be, renderList as Ge, reactive as Me, onMounted as Qe, Transition as Ae, renderSlot as Xe } from "vue";
2
- import { useRouter as We } from "vue-router";
3
- import { BookIcon as Ke, AddIcon as Ce, ServicesIcon as Ye, TrashIcon as et } from "@kong/icons";
4
- import { createI18n as tt, i18nTComponent as at } from "@kong-ui-public/i18n";
5
- import { useAxios as Oe, useTableState as st, useFetcher as ot, useDeleteUrlBuilder as lt, FetcherStatus as rt, EntityBaseTable as it, PermissionsWrapper as ne, TableTags as nt, EntityFilter as ct, EntityToggleModal as dt, EntityDeleteModal as ut, EntityTypes as ft, useHelpers as je, ConfigurationSchemaType as pt, ConfigurationSchemaSection as ke, EntityBaseConfigCard as mt, SupportedEntityType as ze, useErrors as vt, useValidators as gt, EntityBaseFormType as Le, useGatewayFeatureSupported as yt, EntityBaseForm as _t, EntityFormSection as Ne } from "@kong-ui-public/entities-shared";
6
- const ht = { create: "New gateway service", debugger: "Start debugging", 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" } }, bt = { placeholder: { konnect: "Filter by name", kongManager: "Filter by exact name or ID" } }, wt = { 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" } }, empty_state_v2: { create: "New gateway service", create_new: "Create new", import_spec: "Import via Open API spec", title: "Configure your first gateway service", group: "Services created in gateways within this group will automatically appear here.", description: "Gateway services represent backend APIs or microservices that receive traffic routed through the gateway.", learn_more: "Learn more" }, form: { buttons: { try_sample: "Try sample API" }, errors: { host: { empty: "Host cannot be empty", invalid: "Invalid host" }, port: { type: "Port must be a number", invalid: "Port must be between 0 and 65535" }, path: { prefix: "Path must begin with /", invalid: "Path should not include characters outside of the reserved list of RFC 3986" }, protocol: { empty: "Protocol cannot be empty", invalid: "Protocol - value must be one of http, https, grpc, grpcs, tcp, udp, tls, tls_passthrough, ws, wss" }, url: { invalid: "The URL must follow a valid format. Example: https://api.kong-air.com/flights" } }, sections: { general: { title: "General information", description: "Provide a name and tags to help identify and manage this service." }, keys: { title: "Service endpoint", description: "Define where this service should send requests.", checkedGroupLabel: "Choose how and where to send traffic", urlLabel: "Full URL", checkedGroupAltLabel: "Protocol, host, port and path", url: { label: "Full URL", description: "Define the service using a single, complete API URL for simple setup." }, protocol: { label: "Protocol, host, port, and path", description: "Manually specify each component of the API’s URL for advanced configurations." }, viewAdvancedFields: "View advanced fields" } }, fields: { upstream_url: { label: "Full URL", placeholder: "e.g. https://api.kong-air.com/flights", 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 gateway 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: "e.g. api.kong-air.com", tooltip: "The host of the upstream server. Note that the host value is case sensitive." }, path: { label: "Path", placeholder: "e.g. /sample", 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." }, tls_sans_dnsnames: { label: "TLS SANs - DNS names", placeholder: "Enter a DNS name", tooltip: "Additional DNS names that can be matched on the upstream server's TLS certificate.", add: "Add DNS name" }, tls_sans_uris: { label: "TLS SANs - URIs", placeholder: "Enter a URI", tooltip: "Additional URIs that can be matched on the upstream server's TLS certificate.", add: "Add URI" }, 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", collapse: "Add tags" }, 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" } } } }, kt = { 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" }, Vt = { success: "Copied {val} to clipboard", success_brief: "Successfully copied to clipboard" }, St = { gateway_services: "gateway services" }, Ct = {
7
- actions: ht,
8
- search: bt,
9
- gateway_services: wt,
10
- errors: kt,
11
- copy: Vt,
12
- glossary: St
1
+ import { defineComponent as $e, computed as b, ref as I, watch as Le, onBeforeMount as at, resolveComponent as $, openBlock as y, createElementBlock as V, createVNode as n, unref as t, createSlots as ke, withCtx as c, createTextVNode as F, toDisplayString as _, createBlock as N, createCommentVNode as C, createElementVNode as P, withModifiers as Be, Teleport as st, Fragment as Ne, renderList as Je, reactive as Oe, onMounted as lt, Transition as Me, renderSlot as ot } from "vue";
2
+ import { useRouter as Qe } from "vue-router";
3
+ import { BookIcon as je, AddIcon as Pe, ServicesIcon as rt, TrashIcon as it } from "@kong/icons";
4
+ import { createI18n as nt, i18nTComponent as ct } from "@kong-ui-public/i18n";
5
+ import { useAxios as Xe, useTableState as dt, useFetcher as ut, useDeleteUrlBuilder as ft, FetcherStatus as pt, EntityBaseTable as mt, PermissionsWrapper as pe, TableTags as vt, EntityFilter as gt, EntityToggleModal as yt, EntityDeleteModal as _t, EntityTypes as ht, useHelpers as Ye, ConfigurationSchemaType as bt, ConfigurationSchemaSection as Fe, EntityBaseConfigCard as wt, SupportedEntityType as et, useErrors as kt, useValidators as Vt, EntityBaseFormType as ze, useGatewayFeatureSupported as St, EntityBaseForm as Ct, EntityFormSection as He } from "@kong-ui-public/entities-shared";
6
+ const Et = { create: "New gateway service", debugger: "Start debugging", 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", menu_label: "Delete", related_entities: { plugins_only: "{pluginCount} associated {plugin} will be deleted along with this gateway service.", check_failed: "We couldn't verify whether this gateway service has routes or plugins attached. Check the box below to force delete it anyway.", plugin: "{count, plural, one {plugin} other {plugins}}", force_delete_checkbox: "Force delete", force_delete_help: "Check this box to force deletion of all routes and plugins on linked service." } } }, It = { placeholder: { konnect: "Filter by name", kongManager: "Filter by exact name or ID" } }, Ft = { 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" } }, empty_state_v2: { create: "New gateway service", create_new: "Create new", import_spec: "Import via Open API spec", title: "Configure your first gateway service", group: "Services created in gateways within this group will automatically appear here.", description: "Gateway services represent backend APIs or microservices that receive traffic routed through the gateway.", learn_more: "Learn more" }, form: { buttons: { try_sample: "Try sample API" }, errors: { host: { empty: "Host cannot be empty", invalid: "Invalid host" }, port: { type: "Port must be a number", invalid: "Port must be between 0 and 65535" }, path: { prefix: "Path must begin with /", invalid: "Path should not include characters outside of the reserved list of RFC 3986" }, protocol: { empty: "Protocol cannot be empty", invalid: "Protocol - value must be one of http, https, grpc, grpcs, tcp, udp, tls, tls_passthrough, ws, wss" }, url: { invalid: "The URL must follow a valid format. Example: https://api.kong-air.com/flights" } }, sections: { general: { title: "General information", description: "Provide a name and tags to help identify and manage this service." }, keys: { title: "Service endpoint", description: "Define where this service should send requests.", checkedGroupLabel: "Choose how and where to send traffic", urlLabel: "Full URL", checkedGroupAltLabel: "Protocol, host, port and path", url: { label: "Full URL", description: "Define the service using a single, complete API URL for simple setup." }, protocol: { label: "Protocol, host, port, and path", description: "Manually specify each component of the API’s URL for advanced configurations." }, viewAdvancedFields: "View advanced fields" } }, fields: { upstream_url: { label: "Full URL", placeholder: "e.g. https://api.kong-air.com/flights", 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 gateway 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: "e.g. api.kong-air.com", tooltip: "The host of the upstream server. Note that the host value is case sensitive." }, path: { label: "Path", placeholder: "e.g. /sample", 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." }, tls_sans_dnsnames: { label: "TLS SANs - DNS names", placeholder: "Enter a DNS name", tooltip: "Additional DNS names that can be matched on the upstream server's TLS certificate.", add: "Add DNS name" }, tls_sans_uris: { label: "TLS SANs - URIs", placeholder: "Enter a URI", tooltip: "Additional URIs that can be matched on the upstream server's TLS certificate.", add: "Add URI" }, 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", collapse: "Add tags" }, 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" } } } }, Pt = { 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" }, $t = { success: "Copied {val} to clipboard", success_brief: "Successfully copied to clipboard" }, Tt = { gateway_services: "gateway services" }, xt = {
7
+ actions: Et,
8
+ search: It,
9
+ gateway_services: Ft,
10
+ errors: Pt,
11
+ copy: $t,
12
+ glossary: Tt
13
13
  };
14
- function It() {
15
- const o = tt("en-us", Ct);
14
+ function Rt() {
15
+ const l = nt("en-us", xt);
16
16
  return {
17
- i18n: o,
18
- i18nT: at(o)
17
+ i18n: l,
18
+ i18nT: ct(l)
19
19
  // Translation component <i18n-t>
20
20
  };
21
21
  }
22
- function Et() {
22
+ function Ut() {
23
23
  return {
24
24
  getPortFromProtocol: (D, p) => {
25
- const c = [80, 443], r = Number(p);
26
- if ((r || r === 0) && !c.includes(r))
25
+ const d = [80, 443], r = Number(p);
26
+ if ((r || r === 0) && !d.includes(r))
27
27
  return r;
28
28
  switch (D) {
29
29
  case "grpcs":
@@ -37,65 +37,71 @@ function Et() {
37
37
  }
38
38
  };
39
39
  }
40
- const Ft = /^[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?(\.[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?)*(\.)?$/, Pt = /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/, $t = (o) => /^[0-9A-Fa-f:.]+$/.test(o) && o.includes(":");
41
- function Tt() {
42
- const { i18n: { t: o } } = te.useI18n();
40
+ const At = /^[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?(\.[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?)*(\.)?$/, Dt = /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/, Bt = (l) => /^[0-9A-Fa-f:.]+$/.test(l) && l.includes(":");
41
+ function Mt() {
42
+ const { i18n: { t: l } } = le.useI18n();
43
43
  return {
44
- validateHost: (v) => {
45
- if (!v || v.trim() === "") return o("gateway_services.form.errors.host.empty");
44
+ validateHost: (m) => {
45
+ if (!m || m.trim() === "") return l("gateway_services.form.errors.host.empty");
46
46
  try {
47
- if ($t(v))
48
- return new URL("/", `https://[${v}]`), "";
49
- if (Ft.test(v) || Pt.test(v))
50
- return new URL("/", `https://${v}`), "";
47
+ if (Bt(m))
48
+ return new URL("/", `https://[${m}]`), "";
49
+ if (At.test(m) || Dt.test(m))
50
+ return new URL("/", `https://${m}`), "";
51
51
  } catch {
52
52
  }
53
- return o("gateway_services.form.errors.host.invalid");
53
+ return l("gateway_services.form.errors.host.invalid");
54
54
  },
55
- validateProtocol: (v, A) => !v || v.trim() === "" ? o("gateway_services.form.errors.protocol.empty") : (v = v.slice(0, -1), A.find((l) => {
56
- if (l.value === v) return l;
57
- }) === void 0 ? o("gateway_services.form.errors.protocol.invalid") : ""),
58
- validatePath: (v) => !v || v === "" ? "" : v.startsWith("/") ? /[^A-Za-z0-9\-._~:/?#[\]@!$&'()*+,;=%]/.test(v) ? o("gateway_services.form.errors.path.invalid") : "" : o("gateway_services.form.errors.path.prefix"),
59
- validatePort: (v) => {
60
- if (v == null || v === "")
55
+ validateProtocol: (m, R) => !m || m.trim() === "" ? l("gateway_services.form.errors.protocol.empty") : (m = m.slice(0, -1), R.find((o) => {
56
+ if (o.value === m) return o;
57
+ }) === void 0 ? l("gateway_services.form.errors.protocol.invalid") : ""),
58
+ validatePath: (m) => !m || m === "" ? "" : m.startsWith("/") ? /[^A-Za-z0-9\-._~:/?#[\]@!$&'()*+,;=%]/.test(m) ? l("gateway_services.form.errors.path.invalid") : "" : l("gateway_services.form.errors.path.prefix"),
59
+ validatePort: (m) => {
60
+ if (m == null || m === "")
61
61
  return "";
62
- const A = typeof v == "string" ? parseInt(v, 10) : v;
63
- return isNaN(A) ? o("gateway_services.form.errors.port.type") : A < 0 || A > 65535 ? o("gateway_services.form.errors.port.invalid") : "";
62
+ const R = typeof m == "string" ? parseInt(m, 10) : m;
63
+ return isNaN(R) ? l("gateway_services.form.errors.port.type") : R < 0 || R > 65535 ? l("gateway_services.form.errors.port.invalid") : "";
64
64
  }
65
65
  };
66
66
  }
67
- const te = {
68
- useI18n: It,
69
- usePortFromProtocol: Et,
70
- useUrlValidators: Tt
71
- }, Ve = "/v2/control-planes/{controlPlaneId}/core-entities/{workspace}", Re = "/{workspace}", ge = {
67
+ const le = {
68
+ useI18n: Rt,
69
+ usePortFromProtocol: Ut,
70
+ useUrlValidators: Mt
71
+ }, me = "/v2/control-planes/{controlPlaneId}/core-entities/{workspace}", Ke = "/{workspace}", se = {
72
72
  list: {
73
73
  konnect: {
74
- all: `${Ve}/services`,
75
- search: `${Ve}/services/search`
74
+ all: `${me}/services`,
75
+ search: `${me}/services/search`
76
76
  },
77
77
  kongManager: {
78
- all: `${Re}/services`
78
+ all: `${Ke}/services`
79
79
  }
80
80
  },
81
81
  form: {
82
82
  konnect: {
83
- create: `${Ve}/services`,
84
- edit: `${Ve}/services/{id}`
83
+ create: `${me}/services`,
84
+ edit: `${me}/services/{id}`
85
85
  },
86
86
  kongManager: {
87
- create: `${Re}/services`,
88
- edit: `${Re}/services/{id}`
87
+ create: `${Ke}/services`,
88
+ edit: `${Ke}/services/{id}`
89
+ }
90
+ },
91
+ relatedEntities: {
92
+ konnect: {
93
+ routes: `${me}/services/{id}/routes`,
94
+ plugins: `${me}/services/{id}/plugins`
89
95
  }
90
96
  }
91
- }, Ut = { class: "kong-ui-entities-gateway-services-list" }, At = { class: "button-row" }, Rt = { key: 1 }, xt = /* @__PURE__ */ Ie({
97
+ }, Kt = { class: "kong-ui-entities-gateway-services-list" }, Lt = { class: "button-row" }, Nt = { key: 1 }, qt = { key: 0 }, Wt = 1e3, Gt = /* @__PURE__ */ $e({
92
98
  __name: "GatewayServiceList",
93
99
  props: {
94
100
  /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
95
101
  config: {
96
102
  type: Object,
97
103
  required: !0,
98
- validator: (o) => !(!o || !["konnect", "kongManager"].includes(o?.app) || !o.createRoute || !o.getViewRoute || !o.getEditRoute || o.app === "kongManager" && !o.isExactMatch && !o.filterSchema)
104
+ validator: (l) => !(!l || !["konnect", "kongManager"].includes(l?.app) || !l.createRoute || !l.getViewRoute || !l.getEditRoute || l.app === "kongManager" && !l.isExactMatch && !l.filterSchema)
99
105
  },
100
106
  // used to override the default identifier for the cache entry
101
107
  cacheIdentifier: {
@@ -148,11 +154,11 @@ const te = {
148
154
  }
149
155
  },
150
156
  emits: ["error", "click:learn-more", "copy:success", "copy:error", "delete:success", "toggle:success", "click:import"],
151
- setup(o, { emit: D }) {
152
- const p = D, c = o, { i18n: { t: r, formatUnixTimeStamp: v } } = te.useI18n(), A = We(), { axiosInstance: R } = Oe(c.config?.axiosRequestConfig), { hasRecords: l, handleStateChange: $ } = st(() => q.value), C = k(() => l.value && c.config.app === "konnect"), j = k(() => c.config.app !== "kongManager" || !!c.config.disableSorting), ae = {
157
+ setup(l, { emit: D }) {
158
+ const p = D, d = l, { i18n: { t: r, formatUnixTimeStamp: m } } = le.useI18n(), R = Qe(), { axiosInstance: U } = Xe(d.config?.axiosRequestConfig), { hasRecords: o, handleStateChange: T } = dt(() => L.value), E = b(() => o.value && d.config.app === "konnect"), Z = b(() => d.config.app !== "kongManager" || !!d.config.disableSorting), oe = {
153
159
  // the Name column is non-hidable
154
160
  name: { label: r("gateway_services.list.table_headers.name"), searchable: !0, sortable: !0, hidable: !1 },
155
- ...c.config.showControlPlaneColumn ? { control_plane: { label: r("gateway_services.list.table_headers.control_plane") } } : {},
161
+ ...d.config.showControlPlaneColumn ? { control_plane: { label: r("gateway_services.list.table_headers.control_plane") } } : {},
156
162
  protocol: { label: r("gateway_services.list.table_headers.protocol"), searchable: !0, sortable: !0 },
157
163
  host: { label: r("gateway_services.list.table_headers.host"), searchable: !0, sortable: !0 },
158
164
  port: { label: r("gateway_services.list.table_headers.port"), searchable: !0, sortable: !0 },
@@ -161,198 +167,223 @@ const te = {
161
167
  tags: { label: r("gateway_services.list.table_headers.tags"), sortable: !1 },
162
168
  updated_at: { label: r("gateway_services.list.table_headers.updated_at"), sortable: !0 },
163
169
  created_at: { label: r("gateway_services.list.table_headers.created_at"), sortable: !0 }
164
- }, K = {
170
+ }, M = {
165
171
  columnVisibility: {
166
172
  created_at: !1
167
173
  }
168
- }, z = ae, ye = (f) => {
169
- let g = `${c.config.apiBaseUrl}${f}`;
170
- return c.config.app === "konnect" && (g = g.replace(/{controlPlaneId}/gi, c.config?.controlPlaneId || "")), g.replace(/\/{workspace}/gi, c.config?.workspace ? `/${c.config.workspace}` : "");
171
- }, se = k(() => ye(ge.list[c.config.app].all)), Ee = k(() => c.config.app === "konnect" && c.config.workspace && q.value ? ye(ge.list.konnect.search) : se.value), H = k(() => c.config.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${se.value}`) : new URL(se.value)), q = B(""), Z = k(() => {
172
- const f = c.config.app === "konnect" || c.config.isExactMatch;
173
- if (f)
174
+ }, J = oe, ve = (i) => {
175
+ let v = `${d.config.apiBaseUrl}${i}`;
176
+ return d.config.app === "konnect" && (v = v.replace(/{controlPlaneId}/gi, d.config?.controlPlaneId || "")), v.replace(/\/{workspace}/gi, d.config?.workspace ? `/${d.config.workspace}` : "");
177
+ }, re = b(() => ve(se.list[d.config.app].all)), Te = b(() => d.config.app === "konnect" && d.config.workspace && L.value ? ve(se.list.konnect.search) : re.value), Q = b(() => d.config.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${re.value}`) : new URL(re.value)), L = I(""), X = b(() => {
178
+ const i = d.config.app === "konnect" || d.config.isExactMatch;
179
+ if (i)
174
180
  return {
175
- isExactMatch: f,
176
- placeholder: r(`search.placeholder.${c.config.app}`)
181
+ isExactMatch: i,
182
+ placeholder: r(`search.placeholder.${d.config.app}`)
177
183
  };
178
- const { name: g, enabled: w, protocol: S, host: s, port: a, path: u } = ae;
184
+ const { name: v, enabled: w, protocol: k, host: H, port: u, path: De } = oe;
179
185
  return {
180
- isExactMatch: f,
181
- fields: { name: g, enabled: w, protocol: S, host: s, port: a, path: u },
182
- schema: c.config.filterSchema
186
+ isExactMatch: i,
187
+ fields: { name: v, enabled: w, protocol: k, host: H, port: u, path: De },
188
+ schema: d.config.filterSchema
183
189
  };
184
190
  }), {
185
- fetcher: T,
186
- fetcherState: ce,
187
- fetcherCacheKey: J
188
- } = ot(k(() => ({ ...c.config, cacheIdentifier: c.cacheIdentifier })), Ee), Fe = () => {
189
- q.value = "";
191
+ fetcher: x,
192
+ fetcherState: ge,
193
+ fetcherCacheKey: Y
194
+ } = ut(b(() => ({ ...d.config, cacheIdentifier: d.cacheIdentifier })), Te), xe = () => {
195
+ L.value = "";
190
196
  }, e = () => {
191
- J.value++;
192
- }, h = B(null), Pe = k(() => ({
193
- ctaPath: c.config.createRoute,
194
- ctaText: Y.value ? c.isServerless ? r("actions.serverless_create") : r("actions.create") : void 0,
195
- message: `${r("gateway_services.list.empty_state.description")}${c.config.additionMessageForEmptyState ? ` ${c.config.additionMessageForEmptyState}` : ""}`,
196
- title: Y.value ? c.isServerless ? r("gateway_services.list.empty_state.serverless_title") : r("gateway_services.list.empty_state.title") : r("gateway_services.title")
197
- })), oe = B(!1), x = B(null), de = k(() => {
198
- const f = {
197
+ Y.value++;
198
+ }, h = I(null), Re = b(() => ({
199
+ ctaPath: d.config.createRoute,
200
+ ctaText: S.value ? d.isServerless ? r("actions.serverless_create") : r("actions.create") : void 0,
201
+ message: `${r("gateway_services.list.empty_state.description")}${d.config.additionMessageForEmptyState ? ` ${d.config.additionMessageForEmptyState}` : ""}`,
202
+ title: S.value ? d.isServerless ? r("gateway_services.list.empty_state.serverless_title") : r("gateway_services.list.empty_state.title") : r("gateway_services.title")
203
+ })), ie = I(!1), A = I(null), ye = b(() => {
204
+ const i = {
199
205
  action: "disable",
200
206
  id: "",
201
207
  name: ""
202
208
  };
203
- if (x.value) {
204
- const { enabled: g, id: w, name: S } = x.value;
205
- f.action = g ? "disable" : "enable", f.id = w, f.name = S || w;
209
+ if (A.value) {
210
+ const { enabled: v, id: w, name: k } = A.value;
211
+ i.action = v ? "disable" : "enable", i.id = w, i.name = k || w;
206
212
  }
207
- return f;
208
- }), Q = (f) => {
209
- oe.value = !0, x.value = f;
210
- }, ue = () => {
211
- oe.value = !1, x.value = null;
212
- }, _e = async () => {
213
- if (!await c.canEdit?.(x.value) || !x.value)
213
+ return i;
214
+ }), ee = (i) => {
215
+ ie.value = !0, A.value = i;
216
+ }, _e = () => {
217
+ ie.value = !1, A.value = null;
218
+ }, Ve = async () => {
219
+ if (!await d.canEdit?.(A.value) || !A.value)
214
220
  return;
215
- const g = `${H.value.href}/${x.value.id}`, w = !x.value.enabled;
221
+ const v = `${Q.value.href}/${A.value.id}`, w = !A.value.enabled;
216
222
  try {
217
- const S = c.config?.app;
218
- let s;
219
- q.value && S === "konnect" && (s = await R.get(g));
220
- const { data: a } = S === "konnect" ? await R.put(g, { ...s?.data || x.value, enabled: w }) : await R.patch(g, { ...x.value, enabled: w });
221
- p("toggle:success", a), x.value.enabled = w;
222
- } catch (S) {
223
- p("error", S);
223
+ const k = d.config?.app;
224
+ let H;
225
+ L.value && k === "konnect" && (H = await U.get(v));
226
+ const { data: u } = k === "konnect" ? await U.put(v, { ...H?.data || A.value, enabled: w }) : await U.patch(v, { ...A.value, enabled: w });
227
+ p("toggle:success", u), A.value.enabled = w;
228
+ } catch (k) {
229
+ p("error", k);
224
230
  }
225
- }, he = (f) => {
226
- c.config.getControlPlaneRoute && A.push(c.config.getControlPlaneRoute(f));
227
- }, be = async (f, g) => {
228
- const w = f.id;
229
- if (!await g(w)) {
231
+ }, Se = (i) => {
232
+ d.config.getControlPlaneRoute && R.push(d.config.getControlPlaneRoute(i));
233
+ }, Ce = async (i, v) => {
234
+ const w = i.id;
235
+ if (!await v(w)) {
230
236
  p("copy:error", {
231
- entity: f,
237
+ entity: i,
232
238
  field: "id",
233
239
  message: r("errors.copy")
234
240
  });
235
241
  return;
236
242
  }
237
243
  p("copy:success", {
238
- entity: f,
244
+ entity: i,
239
245
  field: "id",
240
246
  message: r("copy.success", { val: w })
241
247
  });
242
- }, le = async (f, g) => {
243
- const w = JSON.stringify(f);
244
- if (!await g(w)) {
248
+ }, ne = async (i, v) => {
249
+ const w = JSON.stringify(i);
250
+ if (!await v(w)) {
245
251
  p("copy:error", {
246
- entity: f,
252
+ entity: i,
247
253
  message: r("errors.copy")
248
254
  });
249
255
  return;
250
256
  }
251
257
  p("copy:success", {
252
- entity: f,
258
+ entity: i,
253
259
  message: r("copy.success_brief")
254
260
  });
255
- }, $e = async (f) => {
256
- await c.canRetrieve?.(f) && A.push(c.config.getViewRoute(f.id));
257
- }, X = (f) => ({
261
+ }, Ue = async (i) => {
262
+ await d.canRetrieve?.(i) && R.push(d.config.getViewRoute(i.id));
263
+ }, te = (i) => ({
258
264
  label: r("actions.view"),
259
- to: c.config.getViewRoute(f)
260
- }), re = (f) => ({
265
+ to: d.config.getViewRoute(i)
266
+ }), ce = (i) => ({
261
267
  label: r("actions.edit"),
262
- to: c.config.getEditRoute(f)
263
- }), W = (f) => {
264
- if (c.config.getDebugRoute)
268
+ to: d.config.getEditRoute(i)
269
+ }), O = (i) => {
270
+ if (d.config.getDebugRoute)
265
271
  return {
266
272
  label: r("actions.debugger"),
267
- to: c.config.getDebugRoute(f)
273
+ to: d.config.getDebugRoute(i)
268
274
  };
269
- }, M = B(void 0), fe = B(!1), pe = B(!1), ie = B(""), O = lt(c.config, se.value), Te = (f) => {
270
- M.value = f, fe.value = !0, ie.value = "";
271
- }, we = () => {
272
- fe.value = !1, M.value = void 0;
273
- }, me = async () => {
274
- if (M.value?.id) {
275
- pe.value = !0;
275
+ }, B = I(void 0), he = I(!1), be = I(!1), de = I(""), j = ft(d.config, re.value), ue = I(0), fe = I(0), q = I(!1), W = I(!1), Ee = b(() => W.value || ue.value > 0 || fe.value > 0), ae = b(() => W.value || ue.value > 0), Ae = b(() => {
276
+ if (W.value)
277
+ return r("actions.delete.related_entities.check_failed");
278
+ const i = fe.value;
279
+ return r("actions.delete.related_entities.plugins_only", {
280
+ pluginCount: i,
281
+ plugin: r("actions.delete.related_entities.plugin", { count: i })
282
+ });
283
+ }), z = async (i, v) => {
284
+ const w = ve(i).replace(/{id}/gi, v), { data: k } = await U.get(w, { params: { size: Wt } });
285
+ return k?.total ?? k?.data?.length ?? 0;
286
+ }, we = async (i) => {
287
+ if (B.value = i, de.value = "", q.value = !1, ue.value = 0, fe.value = 0, W.value = !1, d.config.app === "konnect")
288
+ try {
289
+ const [v, w] = await Promise.all([
290
+ z(se.relatedEntities.konnect.routes, i.id),
291
+ z(se.relatedEntities.konnect.plugins, i.id)
292
+ ]);
293
+ ue.value = v, fe.value = w;
294
+ } catch {
295
+ W.value = !0;
296
+ }
297
+ he.value = !0;
298
+ }, s = () => {
299
+ he.value = !1, B.value = void 0;
300
+ }, a = async () => {
301
+ if (B.value?.id) {
302
+ be.value = !0;
276
303
  try {
277
- await R.delete(O(M.value.id)), p("delete:success", M.value), we(), J.value++;
278
- } catch (f) {
279
- ie.value = f.response?.data?.message || f.message || r("errors.delete"), p("error", f);
304
+ await U.delete(j(B.value.id), {
305
+ // Only ever send force=true when the user has explicitly confirmed it via the checkbox,
306
+ // not merely because routes/plugins were detected
307
+ ...q.value ? { params: { force: !0 } } : {}
308
+ }), p("delete:success", B.value), s(), Y.value++;
309
+ } catch (i) {
310
+ de.value = i.response?.data?.message || i.message || r("errors.delete"), p("error", i);
280
311
  } finally {
281
- pe.value = !1;
312
+ be.value = !1;
282
313
  }
283
314
  }
284
- }, ve = () => {
285
- A.push(c.config.createRoute);
315
+ }, f = () => {
316
+ R.push(d.config.createRoute);
286
317
  };
287
- xe(ce, (f) => {
288
- if (f.status === rt.Error) {
318
+ Le(ge, (i) => {
319
+ if (i.status === pt.Error) {
289
320
  h.value = {
290
321
  title: r("errors.general")
291
- }, f.error?.response?.data?.message && (h.value.message = f.error.response.data.message), p("error", f.error);
322
+ }, i.error?.response?.data?.message && (h.value.message = i.error.response.data.message), p("error", i.error);
292
323
  return;
293
324
  }
294
325
  h.value = null;
295
326
  });
296
- const Y = B(!1);
297
- return Ze(async () => {
298
- Y.value = await c.canCreate();
299
- }), (f, g) => {
300
- const w = U("KButton"), S = U("KDropdownItem"), s = U("KDropdown"), a = U("KEmptyState"), u = U("KBadge"), I = U("KInputSwitch"), b = U("KClipboardProvider");
301
- return y(), V("div", Ut, [
302
- i(t(it), {
303
- "cache-identifier": o.cacheIdentifier,
304
- "default-table-preferences": K,
305
- "disable-sorting": j.value,
306
- "empty-state-options": Pe.value,
327
+ const S = I(!1);
328
+ return at(async () => {
329
+ S.value = await d.canCreate();
330
+ }), (i, v) => {
331
+ const w = $("KButton"), k = $("KDropdownItem"), H = $("KDropdown"), u = $("KEmptyState"), De = $("KBadge"), We = $("KInputSwitch"), Ge = $("KClipboardProvider"), tt = $("KCheckbox");
332
+ return y(), V("div", Kt, [
333
+ n(t(mt), {
334
+ "cache-identifier": l.cacheIdentifier,
335
+ "default-table-preferences": M,
336
+ "disable-sorting": Z.value,
337
+ "empty-state-options": Re.value,
307
338
  "enable-entity-actions": "",
308
339
  "error-message": h.value,
309
- fetcher: t(T),
310
- "fetcher-cache-key": t(J),
340
+ fetcher: t(x),
341
+ "fetcher-cache-key": t(Y),
311
342
  "pagination-type": "offset",
312
343
  "preferences-storage-key": "kong-ui-entities-gateway-services-list",
313
- query: q.value,
314
- "table-headers": t(z),
315
- onClearSearchInput: Fe,
316
- "onClick:row": g[5] || (g[5] = (m) => $e(m)),
344
+ query: L.value,
345
+ "table-headers": t(J),
346
+ onClearSearchInput: xe,
347
+ "onClick:row": v[5] || (v[5] = (g) => Ue(g)),
317
348
  onSort: e,
318
- onState: t($)
319
- }, Se({
320
- "toolbar-filter": n(() => [
321
- i(t(ct), {
322
- modelValue: q.value,
323
- "onUpdate:modelValue": g[0] || (g[0] = (m) => q.value = m),
324
- config: Z.value
349
+ onState: t(T)
350
+ }, ke({
351
+ "toolbar-filter": c(() => [
352
+ n(t(gt), {
353
+ modelValue: L.value,
354
+ "onUpdate:modelValue": v[0] || (v[0] = (g) => L.value = g),
355
+ config: X.value
325
356
  }, null, 8, ["modelValue", "config"])
326
357
  ]),
327
- "toolbar-button": n(() => [
328
- (y(), G(Je, {
329
- disabled: !o.useActionOutside,
358
+ "toolbar-button": c(() => [
359
+ (y(), N(st, {
360
+ disabled: !l.useActionOutside,
330
361
  to: "#kong-ui-app-page-header-action-button"
331
362
  }, [
332
- P("div", At, [
333
- C.value ? (y(), G(w, {
363
+ P("div", Lt, [
364
+ E.value ? (y(), N(w, {
334
365
  key: 0,
335
366
  appearance: "secondary",
336
367
  class: "open-learning-hub",
337
368
  "data-testid": "gateway-services-learn-more-button",
338
369
  icon: "",
339
- onClick: g[1] || (g[1] = (m) => f.$emit("click:learn-more"))
370
+ onClick: v[1] || (v[1] = (g) => i.$emit("click:learn-more"))
340
371
  }, {
341
- default: n(() => [
342
- i(t(Ke), { decorative: "" })
372
+ default: c(() => [
373
+ n(t(je), { decorative: "" })
343
374
  ]),
344
375
  _: 1
345
- })) : E("", !0),
346
- i(t(ne), { "auth-function": o.canCreate }, {
347
- default: n(() => [
348
- i(w, {
376
+ })) : C("", !0),
377
+ n(t(pe), { "auth-function": l.canCreate }, {
378
+ default: c(() => [
379
+ n(w, {
349
380
  appearance: "primary",
350
381
  "data-testid": "toolbar-add-gateway-service",
351
- size: o.useActionOutside ? "medium" : "large",
352
- to: o.config.createRoute
382
+ size: l.useActionOutside ? "medium" : "large",
383
+ to: l.config.createRoute
353
384
  }, {
354
- default: n(() => [
355
- i(t(Ce)),
385
+ default: c(() => [
386
+ n(t(Pe)),
356
387
  F(" " + _(t(r)("gateway_services.list.toolbar_actions.new_gateway_service")), 1)
357
388
  ]),
358
389
  _: 1
@@ -363,61 +394,61 @@ const te = {
363
394
  ])
364
395
  ], 8, ["disabled"]))
365
396
  ]),
366
- name: n(({ rowValue: m }) => [
367
- P("b", null, _(m ?? "-"), 1)
397
+ name: c(({ rowValue: g }) => [
398
+ P("b", null, _(g ?? "-"), 1)
368
399
  ]),
369
- control_plane: n(({ row: m }) => [
370
- m.x_meta?.cluster_id ? (y(), G(u, {
400
+ control_plane: c(({ row: g }) => [
401
+ g.x_meta?.cluster_id ? (y(), N(De, {
371
402
  key: 0,
372
- tooltip: m.x_meta.cluster_id,
403
+ tooltip: g.x_meta.cluster_id,
373
404
  "truncation-tooltip": "",
374
- onClick: Ue((L) => he(m.x_meta.cluster_id), ["stop"])
405
+ onClick: Be((G) => Se(g.x_meta.cluster_id), ["stop"])
375
406
  }, {
376
- default: n(() => [
377
- F(_(m.x_meta.cluster_id), 1)
407
+ default: c(() => [
408
+ F(_(g.x_meta.cluster_id), 1)
378
409
  ]),
379
410
  _: 2
380
- }, 1032, ["tooltip", "onClick"])) : (y(), V("b", Rt, "-"))
411
+ }, 1032, ["tooltip", "onClick"])) : (y(), V("b", Nt, "-"))
381
412
  ]),
382
- enabled: n(({ row: m }) => [
383
- i(t(ne), {
384
- "auth-function": () => o.canEdit(m),
413
+ enabled: c(({ row: g }) => [
414
+ n(t(pe), {
415
+ "auth-function": () => l.canEdit(g),
385
416
  "force-show": ""
386
417
  }, {
387
- default: n(({ isAllowed: L }) => [
418
+ default: c(({ isAllowed: G }) => [
388
419
  P("div", {
389
- onClick: g[4] || (g[4] = Ue(() => {
420
+ onClick: v[4] || (v[4] = Be(() => {
390
421
  }, ["stop"]))
391
422
  }, [
392
- i(I, {
393
- modelValue: m.enabled,
394
- "onUpdate:modelValue": (ee) => m.enabled = ee,
395
- "data-testid": `row-${m.id}-toggle-input`,
396
- disabled: !L,
397
- onClick: Ue((ee) => Q(m), ["prevent"])
423
+ n(We, {
424
+ modelValue: g.enabled,
425
+ "onUpdate:modelValue": (Ie) => g.enabled = Ie,
426
+ "data-testid": `row-${g.id}-toggle-input`,
427
+ disabled: !G,
428
+ onClick: Be((Ie) => ee(g), ["prevent"])
398
429
  }, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "disabled", "onClick"])
399
430
  ])
400
431
  ]),
401
432
  _: 2
402
433
  }, 1032, ["auth-function"])
403
434
  ]),
404
- tags: n(({ rowValue: m }) => [
405
- i(t(nt), { tags: m }, null, 8, ["tags"])
435
+ tags: c(({ rowValue: g }) => [
436
+ n(t(vt), { tags: g }, null, 8, ["tags"])
406
437
  ]),
407
- created_at: n(({ rowValue: m }) => [
408
- F(_(t(v)(m)), 1)
438
+ created_at: c(({ rowValue: g }) => [
439
+ F(_(t(m)(g)), 1)
409
440
  ]),
410
- updated_at: n(({ row: m, rowValue: L }) => [
411
- F(_(t(v)(L ?? m.created_at)), 1)
441
+ updated_at: c(({ row: g, rowValue: G }) => [
442
+ F(_(t(m)(G ?? g.created_at)), 1)
412
443
  ]),
413
- actions: n(({ row: m }) => [
414
- i(b, null, {
415
- default: n(({ copyToClipboard: L }) => [
416
- i(S, {
444
+ actions: c(({ row: g }) => [
445
+ n(Ge, null, {
446
+ default: c(({ copyToClipboard: G }) => [
447
+ n(k, {
417
448
  "data-testid": "action-entity-copy-id",
418
- onClick: (ee) => be(m, L)
449
+ onClick: (Ie) => Ce(g, G)
419
450
  }, {
420
- default: n(() => [
451
+ default: c(() => [
421
452
  F(_(t(r)("actions.copy_id")), 1)
422
453
  ]),
423
454
  _: 1
@@ -425,13 +456,13 @@ const te = {
425
456
  ]),
426
457
  _: 2
427
458
  }, 1024),
428
- i(b, null, {
429
- default: n(({ copyToClipboard: L }) => [
430
- i(S, {
459
+ n(Ge, null, {
460
+ default: c(({ copyToClipboard: G }) => [
461
+ n(k, {
431
462
  "data-testid": "action-entity-copy-json",
432
- onClick: (ee) => le(m, L)
463
+ onClick: (Ie) => ne(g, G)
433
464
  }, {
434
- default: n(() => [
465
+ default: c(() => [
435
466
  F(_(t(r)("actions.copy_json")), 1)
436
467
  ]),
437
468
  _: 1
@@ -439,52 +470,52 @@ const te = {
439
470
  ]),
440
471
  _: 2
441
472
  }, 1024),
442
- i(t(ne), {
443
- "auth-function": () => o.canRetrieve(m)
473
+ n(t(pe), {
474
+ "auth-function": () => l.canRetrieve(g)
444
475
  }, {
445
- default: n(() => [
446
- i(S, {
476
+ default: c(() => [
477
+ n(k, {
447
478
  "data-testid": "action-entity-view",
448
479
  "has-divider": "",
449
- item: X(m.id)
480
+ item: te(g.id)
450
481
  }, null, 8, ["item"])
451
482
  ]),
452
483
  _: 2
453
484
  }, 1032, ["auth-function"]),
454
- i(t(ne), {
455
- "auth-function": () => o.canDebug(m)
485
+ n(t(pe), {
486
+ "auth-function": () => l.canDebug(g)
456
487
  }, {
457
- default: n(() => [
458
- o.config.getDebugRoute ? (y(), G(S, {
488
+ default: c(() => [
489
+ l.config.getDebugRoute ? (y(), N(k, {
459
490
  key: 0,
460
491
  "data-testid": "action-entity-debug",
461
- item: W(m.id)
462
- }, null, 8, ["item"])) : E("", !0)
492
+ item: O(g.id)
493
+ }, null, 8, ["item"])) : C("", !0)
463
494
  ]),
464
495
  _: 2
465
496
  }, 1032, ["auth-function"]),
466
- i(t(ne), {
467
- "auth-function": () => o.canEdit(m)
497
+ n(t(pe), {
498
+ "auth-function": () => l.canEdit(g)
468
499
  }, {
469
- default: n(() => [
470
- i(S, {
500
+ default: c(() => [
501
+ n(k, {
471
502
  "data-testid": "action-entity-edit",
472
- item: re(m.id)
503
+ item: ce(g.id)
473
504
  }, null, 8, ["item"])
474
505
  ]),
475
506
  _: 2
476
507
  }, 1032, ["auth-function"]),
477
- i(t(ne), {
478
- "auth-function": () => o.canDelete(m)
508
+ n(t(pe), {
509
+ "auth-function": () => l.canDelete(g)
479
510
  }, {
480
- default: n(() => [
481
- i(S, {
511
+ default: c(() => [
512
+ n(k, {
482
513
  danger: "",
483
514
  "data-testid": "action-entity-delete",
484
515
  "has-divider": "",
485
- onClick: (L) => Te(m)
516
+ onClick: (G) => we(g)
486
517
  }, {
487
- default: n(() => [
518
+ default: c(() => [
488
519
  F(_(t(r)("actions.delete.menu_label")), 1)
489
520
  ]),
490
521
  _: 1
@@ -495,67 +526,67 @@ const te = {
495
526
  ]),
496
527
  _: 2
497
528
  }, [
498
- !q.value && o.config.app === "konnect" ? {
529
+ !L.value && l.config.app === "konnect" ? {
499
530
  name: "empty-state",
500
- fn: n(() => [
501
- i(a, {
531
+ fn: c(() => [
532
+ n(u, {
502
533
  "data-testid": "gateway-services-entity-empty-state",
503
534
  "icon-background": "",
504
535
  message: t(r)("gateway_services.empty_state_v2.description"),
505
536
  title: t(r)("gateway_services.empty_state_v2.title")
506
- }, Se({
507
- icon: n(() => [
508
- i(t(Ye), { decorative: "" })
537
+ }, ke({
538
+ icon: c(() => [
539
+ n(t(rt), { decorative: "" })
509
540
  ]),
510
- action: n(() => [
511
- Y.value ? (y(), V(Be, { key: 0 }, [
512
- o.canImportSpecs ? (y(), G(s, {
541
+ action: c(() => [
542
+ S.value ? (y(), V(Ne, { key: 0 }, [
543
+ l.canImportSpecs ? (y(), N(H, {
513
544
  key: 0,
514
545
  "data-testid": "entity-create-dropdown",
515
546
  "show-caret": "",
516
547
  "trigger-text": t(r)("gateway_services.empty_state_v2.create"),
517
548
  width: "220"
518
549
  }, {
519
- items: n(() => [
520
- i(S, {
550
+ items: c(() => [
551
+ n(k, {
521
552
  "data-testid": "entity-create-dropdown-item",
522
- onClick: ve
553
+ onClick: f
523
554
  }, {
524
- default: n(() => [
555
+ default: c(() => [
525
556
  F(_(t(r)("gateway_services.empty_state_v2.create_new")), 1)
526
557
  ]),
527
558
  _: 1
528
559
  }),
529
- i(S, {
560
+ n(k, {
530
561
  "data-testid": "entity-import-dropdown-item",
531
- onClick: g[2] || (g[2] = (m) => f.$emit("click:import"))
562
+ onClick: v[2] || (v[2] = (g) => i.$emit("click:import"))
532
563
  }, {
533
- default: n(() => [
564
+ default: c(() => [
534
565
  F(_(t(r)("gateway_services.empty_state_v2.import_spec")), 1)
535
566
  ]),
536
567
  _: 1
537
568
  })
538
569
  ]),
539
570
  _: 1
540
- }, 8, ["trigger-text"])) : (y(), G(w, {
571
+ }, 8, ["trigger-text"])) : (y(), N(w, {
541
572
  key: 1,
542
573
  "data-testid": "entity-create-button",
543
- onClick: ve
574
+ onClick: f
544
575
  }, {
545
- default: n(() => [
546
- i(t(Ce), { decorative: "" }),
576
+ default: c(() => [
577
+ n(t(Pe), { decorative: "" }),
547
578
  F(" " + _(t(r)("gateway_services.empty_state_v2.create")), 1)
548
579
  ]),
549
580
  _: 1
550
581
  }))
551
- ], 64)) : E("", !0),
552
- i(w, {
582
+ ], 64)) : C("", !0),
583
+ n(w, {
553
584
  appearance: "secondary",
554
585
  "data-testid": "entity-learn-more-button",
555
- onClick: g[3] || (g[3] = (m) => f.$emit("click:learn-more"))
586
+ onClick: v[3] || (v[3] = (g) => i.$emit("click:learn-more"))
556
587
  }, {
557
- default: n(() => [
558
- i(t(Ke), { decorative: "" }),
588
+ default: c(() => [
589
+ n(t(je), { decorative: "" }),
559
590
  F(" " + _(t(r)("gateway_services.empty_state_v2.learn_more")), 1)
560
591
  ]),
561
592
  _: 1
@@ -563,9 +594,9 @@ const te = {
563
594
  ]),
564
595
  _: 2
565
596
  }, [
566
- o.config?.isControlPlaneGroup ? {
597
+ l.config?.isControlPlaneGroup ? {
567
598
  name: "default",
568
- fn: n(() => [
599
+ fn: c(() => [
569
600
  F(_(t(r)("gateway_services.empty_state_v2.group")), 1)
570
601
  ]),
571
602
  key: "0"
@@ -575,43 +606,59 @@ const te = {
575
606
  key: "0"
576
607
  } : void 0
577
608
  ]), 1032, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "onState"]),
578
- i(t(dt), {
579
- action: de.value.action,
580
- "entity-id": de.value.id,
581
- "entity-name": de.value.name,
609
+ n(t(yt), {
610
+ action: ye.value.action,
611
+ "entity-id": ye.value.id,
612
+ "entity-name": ye.value.name,
582
613
  "entity-type": t(r)("glossary.gateway_services"),
583
- "on-confirm": _e,
584
- visible: oe.value,
585
- onCancel: ue,
586
- onProceed: ue
614
+ "on-confirm": Ve,
615
+ visible: ie.value,
616
+ onCancel: _e,
617
+ onProceed: _e
587
618
  }, null, 8, ["action", "entity-id", "entity-name", "entity-type", "visible"]),
588
- i(t(ut), {
589
- "action-pending": pe.value,
590
- description: t(r)("actions.delete.description"),
591
- "entity-name": M.value && (M.value.name || M.value.id),
592
- "entity-type": t(ft).GatewayService,
593
- error: ie.value,
619
+ n(t(_t), {
620
+ "action-pending": be.value,
621
+ "confirm-disabled": ae.value && !q.value,
622
+ "entity-name": B.value && (B.value.name || B.value.id),
623
+ "entity-type": t(ht).GatewayService,
624
+ error: de.value,
594
625
  title: t(r)("actions.delete.title"),
595
- visible: fe.value,
596
- onCancel: we,
597
- onProceed: me
598
- }, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
626
+ visible: he.value,
627
+ onCancel: s,
628
+ onProceed: a
629
+ }, ke({ _: 2 }, [
630
+ Ee.value ? {
631
+ name: "extra",
632
+ fn: c(() => [
633
+ W.value || !ae.value ? (y(), V("p", qt, _(Ae.value), 1)) : C("", !0),
634
+ ae.value ? (y(), N(tt, {
635
+ key: 1,
636
+ modelValue: q.value,
637
+ "onUpdate:modelValue": v[6] || (v[6] = (g) => q.value = g),
638
+ "data-testid": "gateway-service-delete-force-checkbox",
639
+ description: t(r)("actions.delete.related_entities.force_delete_help"),
640
+ label: t(r)("actions.delete.related_entities.force_delete_checkbox")
641
+ }, null, 8, ["modelValue", "description", "label"])) : C("", !0)
642
+ ]),
643
+ key: "0"
644
+ } : void 0
645
+ ]), 1032, ["action-pending", "confirm-disabled", "entity-name", "entity-type", "error", "title", "visible"])
599
646
  ]);
600
647
  };
601
648
  }
602
- }), De = (o, D) => {
603
- const p = o.__vccOpts || o;
604
- for (const [c, r] of D)
605
- p[c] = r;
649
+ }), qe = (l, D) => {
650
+ const p = l.__vccOpts || l;
651
+ for (const [d, r] of D)
652
+ p[d] = r;
606
653
  return p;
607
- }, ga = /* @__PURE__ */ De(xt, [["__scopeId", "data-v-ba8ffcb8"]]), Bt = { class: "kong-ui-gateway-service-entity-config-card" }, ya = /* @__PURE__ */ Ie({
654
+ }, Ca = /* @__PURE__ */ qe(Gt, [["__scopeId", "data-v-488e17e4"]]), Ot = { class: "kong-ui-gateway-service-entity-config-card" }, Ea = /* @__PURE__ */ $e({
608
655
  __name: "GatewayServiceConfigCard",
609
656
  props: {
610
657
  /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
611
658
  config: {
612
659
  type: Object,
613
660
  required: !0,
614
- validator: (o) => !(!o || !["konnect", "kongManager"].includes(o?.app) || o.app === "konnect" && !o.controlPlaneId || o.app === "kongManager" && typeof o.workspace != "string" || !o.entityId)
661
+ validator: (l) => !(!l || !["konnect", "kongManager"].includes(l?.app) || l.app === "konnect" && !l.controlPlaneId || l.app === "kongManager" && typeof l.workspace != "string" || !l.entityId)
615
662
  },
616
663
  /**
617
664
  * External link for documentation that determines visibility of Documentation button
@@ -630,8 +677,8 @@ const te = {
630
677
  }
631
678
  },
632
679
  emits: ["loading", "fetch:error", "fetch:success"],
633
- setup(o) {
634
- const D = o, { i18n: { t: p }, i18nT: c } = te.useI18n(), r = k(() => ge.form[D.config.app].edit), { getPropValue: v } = je(), A = (l, $) => v(l, $) === !0 ? p("gateway_services.form.fields.tls_verify_option.true.display") : p("gateway_services.form.fields.tls_verify_option.false.display"), R = B({
680
+ setup(l) {
681
+ const D = l, { i18n: { t: p }, i18nT: d } = le.useI18n(), r = b(() => se.form[D.config.app].edit), { getPropValue: m } = Ye(), R = (o, T) => m(o, T) === !0 ? p("gateway_services.form.fields.tls_verify_option.true.display") : p("gateway_services.form.fields.tls_verify_option.false.display"), U = I({
635
682
  id: {},
636
683
  name: {
637
684
  tooltip: p("gateway_services.form.fields.name.tooltip")
@@ -640,19 +687,19 @@ const te = {
640
687
  updated_at: {},
641
688
  created_at: {},
642
689
  protocol: {
643
- section: ke.Basic,
690
+ section: Fe.Basic,
644
691
  tooltip: p("gateway_services.form.fields.protocol.tooltip")
645
692
  },
646
693
  host: {
647
- section: ke.Basic,
694
+ section: Fe.Basic,
648
695
  tooltip: p("gateway_services.form.fields.host.tooltip")
649
696
  },
650
697
  path: {
651
- section: ke.Basic,
698
+ section: Fe.Basic,
652
699
  tooltip: p("gateway_services.form.fields.path.tooltip")
653
700
  },
654
701
  port: {
655
- section: ke.Basic,
702
+ section: Fe.Basic,
656
703
  tooltip: p("gateway_services.form.fields.port.tooltip")
657
704
  },
658
705
  tags: {
@@ -680,7 +727,7 @@ const te = {
680
727
  tooltip: p("gateway_services.form.fields.client_certificate.tooltip")
681
728
  },
682
729
  ca_certificates: {
683
- type: pt.BadgeTag,
730
+ type: bt.BadgeTag,
684
731
  label: p("gateway_services.form.fields.ca_certificates.label"),
685
732
  order: 6
686
733
  },
@@ -691,77 +738,77 @@ const te = {
691
738
  hidden: !0
692
739
  }
693
740
  });
694
- return (l, $) => (y(), V("div", Bt, [
695
- i(t(mt), {
696
- config: o.config,
697
- "config-card-doc": o.configCardDoc,
698
- "config-schema": R.value,
699
- "entity-type": t(ze).GatewayService,
741
+ return (o, T) => (y(), V("div", Ot, [
742
+ n(t(wt), {
743
+ config: l.config,
744
+ "config-card-doc": l.configCardDoc,
745
+ "config-schema": U.value,
746
+ "entity-type": t(et).GatewayService,
700
747
  "fetch-url": r.value,
701
- "hide-title": o.hideTitle,
702
- "onFetch:error": $[0] || ($[0] = (C) => l.$emit("fetch:error", C)),
703
- "onFetch:success": $[1] || ($[1] = (C) => l.$emit("fetch:success", C)),
704
- onLoading: $[2] || ($[2] = (C) => l.$emit("loading", C))
748
+ "hide-title": l.hideTitle,
749
+ "onFetch:error": T[0] || (T[0] = (E) => o.$emit("fetch:error", E)),
750
+ "onFetch:success": T[1] || (T[1] = (E) => o.$emit("fetch:success", E)),
751
+ onLoading: T[2] || (T[2] = (E) => o.$emit("loading", E))
705
752
  }, {
706
- "enabled-label-tooltip": n(() => [
707
- i(t(c), {
753
+ "enabled-label-tooltip": c(() => [
754
+ n(t(d), {
708
755
  keypath: "gateway_services.form.fields.enabled.tooltip",
709
756
  scope: "global"
710
757
  }, {
711
- false: n(() => [
758
+ false: c(() => [
712
759
  P("code", null, _(t(p)("gateway_services.form.fields.enabled.false")), 1)
713
760
  ]),
714
- true: n(() => [
761
+ true: c(() => [
715
762
  P("code", null, _(t(p)("gateway_services.form.fields.enabled.true")), 1)
716
763
  ]),
717
764
  _: 1
718
765
  })
719
766
  ]),
720
- "ca_certificates-label-tooltip": n(() => [
721
- i(t(c), {
767
+ "ca_certificates-label-tooltip": c(() => [
768
+ n(t(d), {
722
769
  keypath: "gateway_services.form.fields.ca_certificates.tooltip",
723
770
  scope: "global"
724
771
  }, {
725
- code1: n(() => [
772
+ code1: c(() => [
726
773
  P("code", null, _(t(p)("gateway_services.form.fields.ca_certificates.code1")), 1)
727
774
  ]),
728
- code2: n(() => [
775
+ code2: c(() => [
729
776
  P("code", null, _(t(p)("gateway_services.form.fields.ca_certificates.code2")), 1)
730
777
  ]),
731
778
  _: 1
732
779
  })
733
780
  ]),
734
- "tls_verify-label-tooltip": n(() => [
735
- i(t(c), {
781
+ "tls_verify-label-tooltip": c(() => [
782
+ n(t(d), {
736
783
  keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
737
784
  scope: "global"
738
785
  }, {
739
- code1: n(() => [
786
+ code1: c(() => [
740
787
  P("code", null, _(t(p)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
741
788
  ]),
742
789
  _: 1
743
790
  })
744
791
  ]),
745
- tls_verify: n((C) => [
746
- F(_(typeof t(v)("rowValue", C) == "boolean" ? A("rowValue", C) : t(p)("gateway_services.form.fields.tls_verify_option.unset.display")), 1)
792
+ tls_verify: c((E) => [
793
+ F(_(typeof t(m)("rowValue", E) == "boolean" ? R("rowValue", E) : t(p)("gateway_services.form.fields.tls_verify_option.unset.display")), 1)
747
794
  ]),
748
- client_certificate: n((C) => [
749
- F(_(t(v)("rowValue", C) ? t(v)("rowValue", C).id : "–"), 1)
795
+ client_certificate: c((E) => [
796
+ F(_(t(m)("rowValue", E) ? t(m)("rowValue", E).id : "–"), 1)
750
797
  ]),
751
798
  _: 1
752
799
  }, 8, ["config", "config-card-doc", "config-schema", "entity-type", "fetch-url", "hide-title"])
753
800
  ]));
754
801
  }
755
- }), N = {
802
+ }), K = {
756
803
  name: "Kong-Air-Flights-API",
757
804
  protocol: "https",
758
805
  path: "/flights",
759
806
  host: "api.kong-air.com",
760
807
  port: 443
761
- }, Dt = "#d60027", Mt = { class: "tls-sans-field-container" }, Kt = {
808
+ }, jt = "#d60027", zt = { class: "tls-sans-field-container" }, Ht = {
762
809
  key: 0,
763
810
  class: "tls-sans-field-controls"
764
- }, Lt = { key: 0 }, Nt = /* @__PURE__ */ Ie({
811
+ }, Zt = { key: 0 }, Jt = /* @__PURE__ */ $e({
765
812
  __name: "GatewayServiceFormTlsSansField",
766
813
  props: {
767
814
  modelValue: {},
@@ -774,117 +821,117 @@ const te = {
774
821
  readonly: { type: Boolean }
775
822
  },
776
823
  emits: ["update:modelValue", "input"],
777
- setup(o, { emit: D }) {
778
- const p = o, c = D, r = () => {
779
- c("update:modelValue", [...p.modelValue, ""]);
780
- }, v = (R) => {
781
- const l = [...p.modelValue];
782
- l.splice(R, 1), c("update:modelValue", l);
783
- }, A = (R, l) => {
784
- const $ = [...p.modelValue];
785
- $[R] = l, c("update:modelValue", $), c("input");
824
+ setup(l, { emit: D }) {
825
+ const p = l, d = D, r = () => {
826
+ d("update:modelValue", [...p.modelValue, ""]);
827
+ }, m = (U) => {
828
+ const o = [...p.modelValue];
829
+ o.splice(U, 1), d("update:modelValue", o);
830
+ }, R = (U, o) => {
831
+ const T = [...p.modelValue];
832
+ T[U] = o, d("update:modelValue", T), d("input");
786
833
  };
787
- return (R, l) => {
788
- const $ = U("KLabel"), C = U("KInput"), j = U("KButton");
789
- return y(), V("div", Mt, [
790
- i($, { info: o.tooltip }, {
791
- default: n(() => [
792
- F(_(o.label), 1)
834
+ return (U, o) => {
835
+ const T = $("KLabel"), E = $("KInput"), Z = $("KButton");
836
+ return y(), V("div", zt, [
837
+ n(T, { info: l.tooltip }, {
838
+ default: c(() => [
839
+ F(_(l.label), 1)
793
840
  ]),
794
841
  _: 1
795
842
  }, 8, ["info"]),
796
- (y(!0), V(Be, null, Ge(o.modelValue, (ae, K) => (y(), V("div", {
797
- key: K,
843
+ (y(!0), V(Ne, null, Je(l.modelValue, (oe, M) => (y(), V("div", {
844
+ key: M,
798
845
  class: "tls-sans-field-input"
799
846
  }, [
800
- i(C, {
847
+ n(E, {
801
848
  autocomplete: "off",
802
- "data-testid": `${o.testIdPrefix}-input-${K}`,
803
- error: o.error,
804
- "model-value": o.modelValue[K],
805
- placeholder: o.placeholder,
806
- readonly: o.readonly,
849
+ "data-testid": `${l.testIdPrefix}-input-${M}`,
850
+ error: l.error,
851
+ "model-value": l.modelValue[M],
852
+ placeholder: l.placeholder,
853
+ readonly: l.readonly,
807
854
  type: "text",
808
- "onUpdate:modelValue": (z) => A(K, z.trim())
855
+ "onUpdate:modelValue": (J) => R(M, J.trim())
809
856
  }, null, 8, ["data-testid", "error", "model-value", "placeholder", "readonly", "onUpdate:modelValue"]),
810
- o.readonly ? E("", !0) : (y(), V("div", Kt, [
811
- i(j, {
857
+ l.readonly ? C("", !0) : (y(), V("div", Ht, [
858
+ n(Z, {
812
859
  appearance: "tertiary",
813
- "data-testid": `remove-${o.testIdPrefix}`,
860
+ "data-testid": `remove-${l.testIdPrefix}`,
814
861
  icon: "",
815
- onClick: (z) => v(K)
862
+ onClick: (J) => m(M)
816
863
  }, {
817
- default: n(() => [
818
- i(t(et), {
819
- color: `var(--kui-color-text-danger, ${t(Dt)})`
864
+ default: c(() => [
865
+ n(t(it), {
866
+ color: `var(--kui-color-text-danger, ${t(jt)})`
820
867
  }, null, 8, ["color"])
821
868
  ]),
822
869
  _: 1
823
870
  }, 8, ["data-testid", "onClick"]),
824
- i(j, {
871
+ n(Z, {
825
872
  appearance: "tertiary",
826
- "data-testid": `add-${o.testIdPrefix}`,
827
- disabled: K !== o.modelValue.length - 1,
873
+ "data-testid": `add-${l.testIdPrefix}`,
874
+ disabled: M !== l.modelValue.length - 1,
828
875
  icon: "",
829
876
  onClick: r
830
877
  }, {
831
- default: n(() => [
832
- i(t(Ce))
878
+ default: c(() => [
879
+ n(t(Pe))
833
880
  ]),
834
881
  _: 1
835
882
  }, 8, ["data-testid", "disabled"])
836
883
  ]))
837
884
  ]))), 128)),
838
- o.modelValue.length === 0 && !o.readonly ? (y(), V("div", Lt, [
839
- i(j, {
840
- "data-testid": `add-${o.testIdPrefix}`,
885
+ l.modelValue.length === 0 && !l.readonly ? (y(), V("div", Zt, [
886
+ n(Z, {
887
+ "data-testid": `add-${l.testIdPrefix}`,
841
888
  onClick: r
842
889
  }, {
843
- default: n(() => [
844
- i(t(Ce)),
845
- F(" " + _(o.addButtonText), 1)
890
+ default: c(() => [
891
+ n(t(Pe)),
892
+ F(" " + _(l.addButtonText), 1)
846
893
  ]),
847
894
  _: 1
848
895
  }, 8, ["data-testid"])
849
- ])) : E("", !0)
896
+ ])) : C("", !0)
850
897
  ]);
851
898
  };
852
899
  }
853
- }), qe = /* @__PURE__ */ De(Nt, [["__scopeId", "data-v-4f239c35"]]), qt = { class: "kong-ui-entities-gateway-service-form" }, Gt = {
900
+ }), Ze = /* @__PURE__ */ qe(Jt, [["__scopeId", "data-v-4f239c35"]]), Qt = { class: "kong-ui-entities-gateway-service-form" }, Xt = {
854
901
  key: 0,
855
902
  class: "gateway-service-form-general-info"
856
- }, Wt = { class: "gateway-service-form-group-selection-wrapper" }, Ot = {
903
+ }, Yt = { class: "gateway-service-form-group-selection-wrapper" }, ea = {
857
904
  key: 0,
858
905
  class: "gateway-service-form-group-fields"
859
- }, jt = {
906
+ }, ta = {
860
907
  key: 0,
861
908
  class: "gateway-service-form-group-fields"
862
- }, zt = { key: 0 }, Ht = {
909
+ }, aa = { key: 0 }, sa = {
863
910
  key: 0,
864
911
  class: "gateway-service-form-advanced-fields"
865
- }, Zt = { class: "gateway-service-form-margin-bottom" }, Jt = { class: "gateway-service-form-margin-bottom" }, Qt = { class: "gateway-service-form-margin-bottom" }, Xt = { class: "gateway-service-form-margin-bottom" }, Yt = {
912
+ }, la = { class: "gateway-service-form-margin-bottom" }, oa = { class: "gateway-service-form-margin-bottom" }, ra = { class: "gateway-service-form-margin-bottom" }, ia = { class: "gateway-service-form-margin-bottom" }, na = {
866
913
  key: 0,
867
914
  class: "gateway-service-form-margin-bottom"
868
- }, ea = {
915
+ }, ca = {
869
916
  key: 3,
870
917
  class: "gateway-service-form-margin-bottom"
871
- }, ta = {
918
+ }, da = {
872
919
  key: 4,
873
920
  class: "gateway-service-form-margin-bottom"
874
- }, aa = {
921
+ }, ua = {
875
922
  key: 0,
876
923
  class: "checkbox-aligned-radio"
877
- }, sa = {
924
+ }, fa = {
878
925
  key: 1,
879
926
  class: "checkbox-aligned-radio"
880
- }, oa = { class: "gateway-service-form-tags" }, la = { class: "form-error-list" }, ra = /* @__PURE__ */ Ie({
927
+ }, pa = { class: "gateway-service-form-tags" }, ma = { class: "form-error-list" }, va = /* @__PURE__ */ $e({
881
928
  __name: "GatewayServiceForm",
882
929
  props: {
883
930
  /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
884
931
  config: {
885
932
  type: Object,
886
933
  required: !0,
887
- validator: (o) => !(!o || !["konnect", "kongManager"].includes(o?.app) || o.app === "konnect" && !o.controlPlaneId || o.app === "kongManager" && typeof o.workspace != "string" || !o.cancelRoute)
934
+ validator: (l) => !(!l || !["konnect", "kongManager"].includes(l?.app) || l.app === "konnect" && !l.controlPlaneId || l.app === "kongManager" && typeof l.workspace != "string" || !l.cancelRoute)
888
935
  },
889
936
  /** If a valid Gateway Service ID is provided, it will put the form in Edit mode instead of Create */
890
937
  gatewayServiceId: {
@@ -912,8 +959,8 @@ const te = {
912
959
  }
913
960
  },
914
961
  emits: ["update", "error", "url-valid:success", "url-valid:error", "loading", "model-updated", "try-sample-api"],
915
- setup(o, { expose: D, emit: p }) {
916
- const c = p, r = o, v = B(!0), A = We(), { i18nT: R, i18n: { t: l } } = te.useI18n(), { getErrorFieldsFromError: $ } = vt(), { axiosInstance: C } = Oe(r.config?.axiosRequestConfig), j = gt(), { validateHost: ae, validatePath: K, validatePort: z, validateProtocol: ye } = te.useUrlValidators(), { objectsAreEqual: se } = je(), Ee = k(() => ge.form[r.config.app].edit), H = k(() => r.gatewayServiceId ? Le.Edit : Le.Create), q = B(!1), Z = k(() => !!r.gatewayServiceId), T = B(Z.value ? "protocol" : "url"), ce = te.usePortFromProtocol(), J = B(""), Fe = k(() => !!J.value || !!X("name")), e = Me({
962
+ setup(l, { expose: D, emit: p }) {
963
+ const d = p, r = l, m = I(!0), R = Qe(), { i18nT: U, i18n: { t: o } } = le.useI18n(), { getErrorFieldsFromError: T } = kt(), { axiosInstance: E } = Xe(r.config?.axiosRequestConfig), Z = Vt(), { validateHost: oe, validatePath: M, validatePort: J, validateProtocol: ve } = le.useUrlValidators(), { objectsAreEqual: re } = Ye(), Te = b(() => se.form[r.config.app].edit), Q = b(() => r.gatewayServiceId ? ze.Edit : ze.Create), L = I(!1), X = b(() => !!r.gatewayServiceId), x = I(X.value ? "protocol" : "url"), ge = le.usePortFromProtocol(), Y = I(""), xe = b(() => !!Y.value || !!te("name")), e = Oe({
917
964
  fields: {
918
965
  name: "",
919
966
  protocol: "http",
@@ -953,7 +1000,7 @@ const te = {
953
1000
  tls_verify_enabled: "",
954
1001
  tls_verify_value: ""
955
1002
  }
956
- }), h = Me({
1003
+ }), h = Oe({
957
1004
  name: "",
958
1005
  protocol: "http",
959
1006
  host: "",
@@ -971,148 +1018,148 @@ const te = {
971
1018
  tls_verify_value: !1,
972
1019
  tags: "",
973
1020
  enabled: !0
974
- }), Pe = r.config.app === "konnect" || yt({
1021
+ }), Re = r.config.app === "konnect" || St({
975
1022
  gatewayInfo: r.config.gatewayInfo,
976
1023
  // 'ws' and 'wss' are not valid values for the protocol field in Gateway Community Edition or before Gateway Enterprise Edition 3.0
977
1024
  supportedRange: {
978
1025
  enterprise: ["3.0"]
979
1026
  }
980
- }), oe = [
1027
+ }), ie = [
981
1028
  {
982
- label: l("gateway_services.form.fields.protocol.options.http"),
1029
+ label: o("gateway_services.form.fields.protocol.options.http"),
983
1030
  value: "http",
984
1031
  group: "http"
985
1032
  },
986
1033
  {
987
- label: l("gateway_services.form.fields.protocol.options.https"),
1034
+ label: o("gateway_services.form.fields.protocol.options.https"),
988
1035
  value: "https",
989
1036
  group: "http"
990
1037
  },
991
1038
  {
992
- label: l("gateway_services.form.fields.protocol.options.tcp"),
1039
+ label: o("gateway_services.form.fields.protocol.options.tcp"),
993
1040
  value: "tcp",
994
1041
  group: "tcp"
995
1042
  },
996
1043
  {
997
- label: l("gateway_services.form.fields.protocol.options.tls"),
1044
+ label: o("gateway_services.form.fields.protocol.options.tls"),
998
1045
  value: "tls",
999
1046
  group: "tcp"
1000
1047
  },
1001
1048
  {
1002
- label: l("gateway_services.form.fields.protocol.options.tls_passthrough"),
1049
+ label: o("gateway_services.form.fields.protocol.options.tls_passthrough"),
1003
1050
  value: "tls_passthrough",
1004
1051
  group: "tcp"
1005
1052
  },
1006
1053
  {
1007
- label: l("gateway_services.form.fields.protocol.options.grpc"),
1054
+ label: o("gateway_services.form.fields.protocol.options.grpc"),
1008
1055
  value: "grpc",
1009
1056
  group: "grpc"
1010
1057
  },
1011
1058
  {
1012
- label: l("gateway_services.form.fields.protocol.options.grpcs"),
1059
+ label: o("gateway_services.form.fields.protocol.options.grpcs"),
1013
1060
  value: "grpcs",
1014
1061
  group: "grpc"
1015
1062
  },
1016
- ...Pe ? [
1063
+ ...Re ? [
1017
1064
  {
1018
- label: l("gateway_services.form.fields.protocol.options.ws"),
1065
+ label: o("gateway_services.form.fields.protocol.options.ws"),
1019
1066
  value: "ws",
1020
1067
  group: "websocket"
1021
1068
  },
1022
1069
  {
1023
- label: l("gateway_services.form.fields.protocol.options.wss"),
1070
+ label: o("gateway_services.form.fields.protocol.options.wss"),
1024
1071
  value: "wss",
1025
1072
  group: "websocket"
1026
1073
  }
1027
1074
  ] : [],
1028
1075
  {
1029
- label: l("gateway_services.form.fields.protocol.options.udp"),
1076
+ label: o("gateway_services.form.fields.protocol.options.udp"),
1030
1077
  value: "udp",
1031
1078
  group: "udp"
1032
1079
  }
1033
- ], x = { url: "url", protocol: "protocol" }, de = (s) => {
1034
- e.fields.protocol = s.value, e.fields.port = ce.getPortFromProtocol(e.fields.protocol, String(e.fields.port));
1035
- }, Q = (s) => s ? parseFloat(s) : 0, ue = () => {
1080
+ ], A = { url: "url", protocol: "protocol" }, ye = (s) => {
1081
+ e.fields.protocol = s.value, e.fields.port = ge.getPortFromProtocol(e.fields.protocol, String(e.fields.port));
1082
+ }, ee = (s) => s ? parseFloat(s) : 0, _e = () => {
1036
1083
  e.fields.host = h.host, e.fields.path = h.path, e.fields.port = h.port, e.fields.protocol = h.protocol, e.fields.url = h.url, e.fields.retries = h.retries, e.fields.connect_timeout = h.connect_timeout, e.fields.write_timeout = h.write_timeout, e.fields.read_timeout = h.read_timeout, e.fields.client_certificate = h.client_certificate, e.fields.tls_sans = {
1037
1084
  dnsnames: [...h.tls_sans.dnsnames],
1038
1085
  uris: [...h.tls_sans.uris]
1039
1086
  }, e.fields.ca_certificates = h.ca_certificates, e.fields.tls_verify_enabled = h.tls_verify_enabled, e.fields.tls_verify_value = h.tls_verify_value, e.fields.enabled = h.enabled;
1040
- }, _e = () => {
1041
- v.value = !0, W(), e.errorMessages = [], ue();
1042
- }, he = () => {
1043
- switch (ue(), e.fields.name = `${N.name}-${(/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 17)}`, T.value) {
1087
+ }, Ve = () => {
1088
+ m.value = !0, O(), e.errorMessages = [], _e();
1089
+ }, Se = () => {
1090
+ switch (_e(), e.fields.name = `${K.name}-${(/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 17)}`, x.value) {
1044
1091
  case "url":
1045
- e.fields.url = `${N.protocol}://${N.host}${N.path}`;
1092
+ e.fields.url = `${K.protocol}://${K.host}${K.path}`;
1046
1093
  break;
1047
1094
  case "protocol":
1048
- e.fields.host = N.host, e.fields.path = N.path, e.fields.protocol = N.protocol, e.fields.port = N.port;
1095
+ e.fields.host = K.host, e.fields.path = K.path, e.fields.protocol = K.protocol, e.fields.port = K.port;
1049
1096
  break;
1050
1097
  default:
1051
- e.fields.url = `${N.protocol}://${N.host}${N.path}`;
1098
+ e.fields.url = `${K.protocol}://${K.host}${K.path}`;
1052
1099
  }
1053
- }, be = () => {
1054
- if (W(), e.fields.url.length)
1100
+ }, Ce = () => {
1101
+ if (O(), e.fields.url.length)
1055
1102
  try {
1056
- const s = new URL(e.fields.url), a = ye(s.protocol, oe);
1103
+ const s = new URL(e.fields.url), a = ve(s.protocol, ie);
1057
1104
  if (a) throw new Error(a);
1058
1105
  e.fields.protocol = s.protocol.slice(0, -1);
1059
- const u = ae(s.hostname);
1060
- if (u) throw new Error(u);
1106
+ const f = oe(s.hostname);
1107
+ if (f) throw new Error(f);
1061
1108
  e.fields.host = s.hostname;
1062
- const I = K(s.pathname);
1063
- if (I) throw new Error(I);
1109
+ const S = M(s.pathname);
1110
+ if (S) throw new Error(S);
1064
1111
  e.fields.path = s.pathname;
1065
- const b = z(s.port);
1066
- if (b) throw new Error(b);
1067
- const m = Number(s.port);
1068
- q.value = !!m, e.fields.port = m || ce.getPortFromProtocol(e.fields.protocol), c("url-valid:success");
1112
+ const i = J(s.port);
1113
+ if (i) throw new Error(i);
1114
+ const v = Number(s.port);
1115
+ L.value = !!v, e.fields.port = v || ge.getPortFromProtocol(e.fields.protocol), d("url-valid:success");
1069
1116
  } catch {
1070
- c("url-valid:error", l("gateway_services.form.errors.url.invalid")), e.formFieldErrors.url = l("gateway_services.form.errors.url.invalid");
1117
+ d("url-valid:error", o("gateway_services.form.errors.url.invalid")), e.formFieldErrors.url = o("gateway_services.form.errors.url.invalid");
1071
1118
  }
1072
- }, le = (s) => {
1073
- W(s);
1074
- }, $e = k(() => !!e.formFieldErrors.url || !!e.formFieldErrors.host || !!e.formFieldErrors.port), X = (s) => {
1119
+ }, ne = (s) => {
1120
+ O(s);
1121
+ }, Ue = b(() => !!e.formFieldErrors.url || !!e.formFieldErrors.host || !!e.formFieldErrors.port), te = (s) => {
1075
1122
  if (e.errorMessages.length) return "";
1076
1123
  const a = e.formFieldErrors;
1077
1124
  return a[s] ? a[s] : "";
1078
- }, re = (s) => {
1079
- W(s ?? void 0);
1080
- const a = ae(e.fields.host);
1125
+ }, ce = (s) => {
1126
+ O(s ?? void 0);
1127
+ const a = oe(e.fields.host);
1081
1128
  a && (e.formFieldErrors.host = a);
1082
- const u = K(e.fields.path);
1083
- u && (e.formFieldErrors.path = u);
1084
- const I = z(e.fields.port);
1085
- I && (e.formFieldErrors.port = I), M.value ? c("url-valid:success") : c("url-valid:error", e.errorMessages.join(",") || l("gateway_services.form.errors.url.invalid"));
1086
- }, W = (s) => {
1129
+ const f = M(e.fields.path);
1130
+ f && (e.formFieldErrors.path = f);
1131
+ const S = J(e.fields.port);
1132
+ S && (e.formFieldErrors.port = S), B.value ? d("url-valid:success") : d("url-valid:error", e.errorMessages.join(",") || o("gateway_services.form.errors.url.invalid"));
1133
+ }, O = (s) => {
1087
1134
  if (s)
1088
1135
  e.formFieldErrors[s] = "";
1089
1136
  else
1090
1137
  for (let a in e.formFieldErrors)
1091
1138
  e.formFieldErrors[a] = "";
1092
1139
  e.errorMessages = [];
1093
- }, M = k(() => {
1140
+ }, B = b(() => {
1094
1141
  for (let s in e.formFieldErrors)
1095
1142
  if (e.formFieldErrors[s].length)
1096
1143
  return !1;
1097
1144
  return !0;
1098
- }), fe = () => {
1099
- e.fields.url && T.value === "url" ? be() : re();
1100
- }, pe = () => `new-service-${(/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 17)}`, ie = k(() => !["tcp", "tls", "tls_passthrough", "grpc", "grpcs", "udp"].includes(e.fields.protocol)), O = k(() => {
1101
- if (T.value === "url")
1145
+ }), he = () => {
1146
+ e.fields.url && x.value === "url" ? Ce() : ce();
1147
+ }, be = () => `new-service-${(/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 17)}`, de = b(() => !["tcp", "tls", "tls_passthrough", "grpc", "grpcs", "udp"].includes(e.fields.protocol)), j = b(() => {
1148
+ if (x.value === "url")
1102
1149
  return !0;
1103
1150
  const s = ["https", "wss", "tls"].includes(e.fields.protocol);
1104
- return T.value === "protocol" && s;
1105
- }), Te = k(() => {
1106
- if (T.value === "url")
1151
+ return x.value === "protocol" && s;
1152
+ }), ue = b(() => {
1153
+ if (x.value === "url")
1107
1154
  return !0;
1108
1155
  const s = ["https", "tls"].includes(e.fields.protocol);
1109
- return T.value === "protocol" && s;
1110
- }), we = (s) => {
1111
- W("name"), J.value = j.utf8Name(s);
1112
- }, me = k(() => {
1113
- const s = !Z.value || !se(e.fields, h), a = T.value === "url" && !!e.fields.url && M.value, u = T.value === "protocol" && !!e.fields.host && M.value;
1114
- return s && (a || u);
1115
- }), ve = (s) => {
1156
+ return x.value === "protocol" && s;
1157
+ }), fe = (s) => {
1158
+ O("name"), Y.value = Z.utf8Name(s);
1159
+ }, q = b(() => {
1160
+ const s = !X.value || !re(e.fields, h), a = x.value === "url" && !!e.fields.url && B.value, f = x.value === "protocol" && !!e.fields.host && B.value;
1161
+ return s && (a || f);
1162
+ }), W = (s) => {
1116
1163
  e.fields.name = s?.name || "", e.fields.tags = s?.tags?.join(", ") || "", e.fields.protocol = s?.protocol || "http", e.fields.path = s?.path || "", e.fields.read_timeout = s?.read_timeout || s?.read_timeout === 0 ? s?.read_timeout : 6e4, e.fields.retries = s?.retries || s?.retries === 0 ? s?.retries : 5, e.fields.host = s?.host || "", e.fields.connect_timeout = s?.connect_timeout || s?.connect_timeout === 0 ? s?.connect_timeout : 6e4, e.fields.tls_verify_enabled = s?.tls_verify !== "" && s?.tls_verify !== null && s?.tls_verify !== void 0, e.fields.tls_verify_value = s?.tls_verify ? s?.tls_verify : !1, e.fields.ca_certificates = s?.ca_certificates?.join(",") || "", e.fields.client_certificate = s?.client_certificate?.id || "", e.fields.tls_sans = {
1117
1164
  dnsnames: s?.tls_sans?.dnsnames ?? [""],
1118
1165
  uris: s?.tls_sans?.uris ?? [""]
@@ -1120,22 +1167,22 @@ const te = {
1120
1167
  dnsnames: [...e.fields.tls_sans.dnsnames],
1121
1168
  uris: [...e.fields.tls_sans.uris]
1122
1169
  };
1123
- }, Y = () => {
1124
- A.push(r.config.cancelRoute);
1125
- }, f = k(() => {
1126
- let s = `${r.config.apiBaseUrl}${ge.form[r.config.app][H.value]}`;
1170
+ }, Ee = () => {
1171
+ R.push(r.config.cancelRoute);
1172
+ }, ae = b(() => {
1173
+ let s = `${r.config.apiBaseUrl}${se.form[r.config.app][Q.value]}`;
1127
1174
  return r.config.app === "konnect" && (s = s.replace(/{controlPlaneId}/gi, r.config?.controlPlaneId || "")), s.replace(/\/{workspace}/gi, r.config?.workspace ? `/${r.config.workspace}` : "").replace(/{id}/gi, r.gatewayServiceId ?? "");
1128
- }), g = k(() => {
1175
+ }), Ae = b(() => {
1129
1176
  if (!r.isTlsSansSupported)
1130
1177
  return;
1131
- if (!O.value)
1178
+ if (!j.value)
1132
1179
  return null;
1133
- const s = e.fields.tls_sans.dnsnames.map((u) => u.trim()).filter(Boolean), a = e.fields.tls_sans.uris.map((u) => u.trim()).filter(Boolean);
1180
+ const s = e.fields.tls_sans.dnsnames.map((f) => f.trim()).filter(Boolean), a = e.fields.tls_sans.uris.map((f) => f.trim()).filter(Boolean);
1134
1181
  return s.length || a.length ? {
1135
1182
  dnsnames: s.length ? s : null,
1136
1183
  uris: a.length ? a : null
1137
1184
  } : null;
1138
- }), w = k(() => {
1185
+ }), z = b(() => {
1139
1186
  const s = {
1140
1187
  name: e.fields.name || null,
1141
1188
  tags: e.fields.tags ? e.fields.tags?.split(",")?.map((a) => String(a || "").trim())?.filter((a) => a !== "") : null,
@@ -1147,143 +1194,143 @@ const te = {
1147
1194
  connect_timeout: e.fields.connect_timeout,
1148
1195
  ca_certificates: e.fields.ca_certificates ? e.fields.ca_certificates?.split(",").filter((a) => a !== "") : null,
1149
1196
  client_certificate: e.fields.client_certificate ? { id: e.fields.client_certificate } : null,
1150
- tls_sans: g.value,
1197
+ tls_sans: Ae.value,
1151
1198
  write_timeout: e.fields.write_timeout,
1152
1199
  port: e.fields.port,
1153
1200
  url: e.fields.url,
1154
1201
  enabled: e.fields.enabled
1155
1202
  };
1156
- return O.value || (s.client_certificate = null), e.fields.tls_verify_enabled && ["https", "wss", "tls"].includes(e.fields.protocol) && (s.tls_verify = e.fields.tls_verify_value), ie.value || (s.path = null), H.value === "create" ? T.value === "url" ? (delete s.protocol, delete s.host, delete s.path, r.config.app === "konnect" && delete s.port) : delete s.url : H.value === "edit" && delete s.url, s;
1157
- }), S = async () => {
1203
+ return j.value || (s.client_certificate = null), e.fields.tls_verify_enabled && ["https", "wss", "tls"].includes(e.fields.protocol) && (s.tls_verify = e.fields.tls_verify_value), de.value || (s.path = null), Q.value === "create" ? x.value === "url" ? (delete s.protocol, delete s.host, delete s.path, r.config.app === "konnect" && delete s.port) : delete s.url : Q.value === "edit" && delete s.url, s;
1204
+ }), we = async () => {
1158
1205
  try {
1159
1206
  e.isReadonly = !0;
1160
- const s = w.value;
1207
+ const s = z.value;
1161
1208
  let a;
1162
- if (H.value === "create" ? a = await C.post(f.value, s) : H.value === "edit" && (a = r.config?.app === "konnect" ? await C.put(f.value, s) : await C.patch(f.value, s)), a) {
1163
- const { data: u } = a;
1164
- e.fields.name = u?.name || "", e.fields.port = u.port || ce.getPortFromProtocol(u.protocol), e.fields.protocol = u?.protocol || "http", e.fields.host = u?.host || "", e.fields.path = u?.path || "", e.fields.url = u?.url || "", e.fields.retries = u?.retries || u?.retries === 0 ? u?.retries : 5, e.fields.connect_timeout = u?.connect_timeout || u?.connect_timeout === 0 ? u?.connect_timeout : 6e4, e.fields.write_timeout = u?.write_timeout || u?.write_timeout === 0 ? u?.write_timeout : 6e4, e.fields.read_timeout = u?.read_timeout || u?.read_timeout === 0 ? u?.read_timeout : 6e4, e.fields.client_certificate = u?.client_certificate?.id || "", e.fields.tls_sans = {
1165
- dnsnames: u?.tls_sans?.dnsnames ?? [],
1166
- uris: u?.tls_sans?.uris ?? []
1167
- }, e.fields.ca_certificates = u?.ca_certificates?.length ? u?.ca_certificates.join(",") : "", e.fields.tls_verify_enabled = u?.tls_verify !== "" && u?.tls_verify !== null && u?.tls_verify !== void 0, e.fields.tls_verify_value = e.fields.tls_verify_enabled && u?.tls_verify, e.fields.tags = u?.tags?.length ? u.tags.join(", ") : "", e.fields.enabled = u?.enabled ?? !0, Object.assign(h, e.fields), h.tls_sans = {
1209
+ if (Q.value === "create" ? a = await E.post(ae.value, s) : Q.value === "edit" && (a = r.config?.app === "konnect" ? await E.put(ae.value, s) : await E.patch(ae.value, s)), a) {
1210
+ const { data: f } = a;
1211
+ e.fields.name = f?.name || "", e.fields.port = f.port || ge.getPortFromProtocol(f.protocol), e.fields.protocol = f?.protocol || "http", e.fields.host = f?.host || "", e.fields.path = f?.path || "", e.fields.url = f?.url || "", e.fields.retries = f?.retries || f?.retries === 0 ? f?.retries : 5, e.fields.connect_timeout = f?.connect_timeout || f?.connect_timeout === 0 ? f?.connect_timeout : 6e4, e.fields.write_timeout = f?.write_timeout || f?.write_timeout === 0 ? f?.write_timeout : 6e4, e.fields.read_timeout = f?.read_timeout || f?.read_timeout === 0 ? f?.read_timeout : 6e4, e.fields.client_certificate = f?.client_certificate?.id || "", e.fields.tls_sans = {
1212
+ dnsnames: f?.tls_sans?.dnsnames ?? [],
1213
+ uris: f?.tls_sans?.uris ?? []
1214
+ }, e.fields.ca_certificates = f?.ca_certificates?.length ? f?.ca_certificates.join(",") : "", e.fields.tls_verify_enabled = f?.tls_verify !== "" && f?.tls_verify !== null && f?.tls_verify !== void 0, e.fields.tls_verify_value = e.fields.tls_verify_enabled && f?.tls_verify, e.fields.tags = f?.tags?.length ? f.tags.join(", ") : "", e.fields.enabled = f?.enabled ?? !0, Object.assign(h, e.fields), h.tls_sans = {
1168
1215
  dnsnames: [...e.fields.tls_sans.dnsnames],
1169
1216
  uris: [...e.fields.tls_sans.uris]
1170
- }, c("update", a?.data);
1217
+ }, d("update", a?.data);
1171
1218
  }
1172
1219
  return a;
1173
1220
  } catch (s) {
1174
- const { fields: a, messages: u } = $(s);
1175
- e.errorMessages = u, a.length && a.forEach((I) => {
1176
- const b = I.field;
1177
- b === "client_certificate.id" ? e.formFieldErrors.client_certificate = I.message : b.startsWith("tls_sans.dnsnames") ? e.formFieldErrors.tls_sans_dnsnames = I.message : b.startsWith("tls_sans.uris") ? e.formFieldErrors.tls_sans_uris = I.message : b.startsWith("ca_certificates") ? e.formFieldErrors.ca_certificates = I.message : Object.keys(e.formFieldErrors).includes(b) && (e.formFieldErrors = {
1221
+ const { fields: a, messages: f } = T(s);
1222
+ e.errorMessages = f, a.length && a.forEach((S) => {
1223
+ const i = S.field;
1224
+ i === "client_certificate.id" ? e.formFieldErrors.client_certificate = S.message : i.startsWith("tls_sans.dnsnames") ? e.formFieldErrors.tls_sans_dnsnames = S.message : i.startsWith("tls_sans.uris") ? e.formFieldErrors.tls_sans_uris = S.message : i.startsWith("ca_certificates") ? e.formFieldErrors.ca_certificates = S.message : Object.keys(e.formFieldErrors).includes(i) && (e.formFieldErrors = {
1178
1225
  ...e.formFieldErrors,
1179
- [b]: I.message
1226
+ [i]: S.message
1180
1227
  });
1181
- }), c("error", s);
1228
+ }), d("error", s);
1182
1229
  } finally {
1183
1230
  e.isReadonly = !1;
1184
1231
  }
1185
1232
  };
1186
- return xe(() => r.gatewayServiceId, () => {
1233
+ return Le(() => r.gatewayServiceId, () => {
1187
1234
  Object.assign(e.fields, h);
1188
- }), xe(e.fields, () => {
1189
- c("model-updated", w.value);
1190
- }), Qe(() => {
1191
- c("model-updated", w.value), Z.value || (e.fields.name = pe());
1235
+ }), Le(e.fields, () => {
1236
+ d("model-updated", z.value);
1237
+ }), lt(() => {
1238
+ d("model-updated", z.value), X.value || (e.fields.name = be());
1192
1239
  }), D({
1193
- validateUrl: fe,
1194
- getPayload: w,
1195
- saveFormData: S,
1196
- canSubmit: me,
1197
- initForm: ve
1240
+ validateUrl: he,
1241
+ getPayload: z,
1242
+ saveFormData: we,
1243
+ canSubmit: q,
1244
+ initForm: W
1198
1245
  }), (s, a) => {
1199
- const u = U("KRadio"), I = U("KButton"), b = U("KInput"), m = U("KSelect"), L = U("KCheckbox"), ee = U("KCollapse"), He = U("KAlert");
1200
- return y(), V("div", qt, [
1201
- i(t(_t), {
1202
- "can-submit": me.value,
1203
- config: o.config,
1204
- "edit-id": o.gatewayServiceId,
1205
- "entity-type": t(ze).GatewayService,
1206
- "fetch-url": Ee.value,
1207
- "form-fields": w.value,
1246
+ const f = $("KRadio"), S = $("KButton"), i = $("KInput"), v = $("KSelect"), w = $("KCheckbox"), k = $("KCollapse"), H = $("KAlert");
1247
+ return y(), V("div", Qt, [
1248
+ n(t(Ct), {
1249
+ "can-submit": q.value,
1250
+ config: l.config,
1251
+ "edit-id": l.gatewayServiceId,
1252
+ "entity-type": t(et).GatewayService,
1253
+ "fetch-url": Te.value,
1254
+ "form-fields": z.value,
1208
1255
  "is-readonly": e.isReadonly,
1209
- onCancel: Y,
1210
- "onFetch:error": a[34] || (a[34] = (d) => s.$emit("error", d)),
1211
- "onFetch:success": ve,
1212
- onLoading: a[35] || (a[35] = (d) => s.$emit("loading", d)),
1213
- onSubmit: S
1256
+ onCancel: Ee,
1257
+ "onFetch:error": a[34] || (a[34] = (u) => s.$emit("error", u)),
1258
+ "onFetch:success": W,
1259
+ onLoading: a[35] || (a[35] = (u) => s.$emit("loading", u)),
1260
+ onSubmit: we
1214
1261
  }, {
1215
- "form-actions": n(() => [
1216
- Xe(s.$slots, "form-actions", {
1217
- canSubmit: me.value,
1218
- cancel: Y,
1219
- submit: S
1262
+ "form-actions": c(() => [
1263
+ ot(s.$slots, "form-actions", {
1264
+ canSubmit: q.value,
1265
+ cancel: Ee,
1266
+ submit: we
1220
1267
  }, void 0, !0)
1221
1268
  ]),
1222
- default: n(() => [
1223
- i(t(Ne), {
1224
- description: t(l)("gateway_services.form.sections.keys.description"),
1225
- "hide-info-header": o.hideSectionsInfo,
1226
- title: t(l)("gateway_services.form.sections.keys.title")
1269
+ default: c(() => [
1270
+ n(t(He), {
1271
+ description: t(o)("gateway_services.form.sections.keys.description"),
1272
+ "hide-info-header": l.hideSectionsInfo,
1273
+ title: t(o)("gateway_services.form.sections.keys.title")
1227
1274
  }, {
1228
- default: n(() => [
1229
- Z.value ? E("", !0) : (y(), V("div", Gt, [
1230
- P("div", Wt, [
1231
- i(u, {
1232
- modelValue: T.value,
1233
- "onUpdate:modelValue": a[0] || (a[0] = (d) => T.value = d),
1275
+ default: c(() => [
1276
+ X.value ? C("", !0) : (y(), V("div", Xt, [
1277
+ P("div", Yt, [
1278
+ n(f, {
1279
+ modelValue: x.value,
1280
+ "onUpdate:modelValue": a[0] || (a[0] = (u) => x.value = u),
1234
1281
  card: "",
1235
1282
  "card-orientation": "horizontal",
1236
1283
  "data-testid": "gateway-service-url-radio",
1237
- description: t(l)("gateway_services.form.sections.keys.url.description"),
1238
- label: t(l)("gateway_services.form.sections.keys.url.label"),
1239
- "selected-value": x.url,
1240
- onChange: _e
1284
+ description: t(o)("gateway_services.form.sections.keys.url.description"),
1285
+ label: t(o)("gateway_services.form.sections.keys.url.label"),
1286
+ "selected-value": A.url,
1287
+ onChange: Ve
1241
1288
  }, null, 8, ["modelValue", "description", "label", "selected-value"]),
1242
- i(u, {
1243
- modelValue: T.value,
1244
- "onUpdate:modelValue": a[1] || (a[1] = (d) => T.value = d),
1289
+ n(f, {
1290
+ modelValue: x.value,
1291
+ "onUpdate:modelValue": a[1] || (a[1] = (u) => x.value = u),
1245
1292
  card: "",
1246
1293
  "card-orientation": "horizontal",
1247
1294
  "checked-group": "protocol",
1248
1295
  "data-testid": "gateway-service-protocol-radio",
1249
- description: t(l)("gateway_services.form.sections.keys.protocol.description"),
1250
- label: t(l)("gateway_services.form.sections.keys.protocol.label"),
1251
- "selected-value": x.protocol,
1252
- onChange: _e
1296
+ description: t(o)("gateway_services.form.sections.keys.protocol.description"),
1297
+ label: t(o)("gateway_services.form.sections.keys.protocol.label"),
1298
+ "selected-value": A.protocol,
1299
+ onChange: Ve
1253
1300
  }, null, 8, ["modelValue", "description", "label", "selected-value"])
1254
1301
  ]),
1255
- i(Ae, { name: "slide-fade" }, {
1256
- default: n(() => [
1257
- T.value === "url" ? (y(), V("div", Ot, [
1258
- i(b, {
1302
+ n(Me, { name: "slide-fade" }, {
1303
+ default: c(() => [
1304
+ x.value === "url" ? (y(), V("div", ea, [
1305
+ n(i, {
1259
1306
  modelValue: e.fields.url,
1260
- "onUpdate:modelValue": a[2] || (a[2] = (d) => e.fields.url = d),
1307
+ "onUpdate:modelValue": a[2] || (a[2] = (u) => e.fields.url = u),
1261
1308
  modelModifiers: { trim: !0 },
1262
1309
  class: "gateway-service-url-input gateway-service-form-margin-bottom",
1263
1310
  "data-testid": "gateway-service-url-input",
1264
- error: $e.value,
1265
- "error-message": X("url"),
1266
- label: t(l)("gateway_services.form.fields.upstream_url.label"),
1311
+ error: Ue.value,
1312
+ "error-message": te("url"),
1313
+ label: t(o)("gateway_services.form.fields.upstream_url.label"),
1267
1314
  "label-attributes": {
1268
- info: o.config.app === "konnect" ? t(l)("gateway_services.form.fields.upstream_url.tooltip_for_konnect") : t(l)("gateway_services.form.fields.upstream_url.tooltip_for_km"),
1315
+ info: l.config.app === "konnect" ? t(o)("gateway_services.form.fields.upstream_url.tooltip_for_konnect") : t(o)("gateway_services.form.fields.upstream_url.tooltip_for_km"),
1269
1316
  tooltipAttributes: { maxWidth: "400" }
1270
1317
  },
1271
1318
  name: "url",
1272
- placeholder: t(l)("gateway_services.form.fields.upstream_url.placeholder"),
1319
+ placeholder: t(o)("gateway_services.form.fields.upstream_url.placeholder"),
1273
1320
  required: "",
1274
- onInput: be
1275
- }, Se({ _: 2 }, [
1276
- o.hideTrySampleApiButton ? void 0 : {
1321
+ onInput: Ce
1322
+ }, ke({ _: 2 }, [
1323
+ l.hideTrySampleApiButton ? void 0 : {
1277
1324
  name: "after",
1278
- fn: n(() => [
1279
- i(I, {
1325
+ fn: c(() => [
1326
+ n(S, {
1280
1327
  appearance: "tertiary",
1281
1328
  "data-testid": "try-sample-api",
1282
1329
  size: "small",
1283
- onClick: he
1330
+ onClick: Se
1284
1331
  }, {
1285
- default: n(() => [
1286
- F(_(t(l)("gateway_services.form.buttons.try_sample")), 1)
1332
+ default: c(() => [
1333
+ F(_(t(o)("gateway_services.form.buttons.try_sample")), 1)
1287
1334
  ]),
1288
1335
  _: 1
1289
1336
  })
@@ -1291,57 +1338,57 @@ const te = {
1291
1338
  key: "0"
1292
1339
  }
1293
1340
  ]), 1032, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder"])
1294
- ])) : E("", !0)
1341
+ ])) : C("", !0)
1295
1342
  ]),
1296
1343
  _: 1
1297
1344
  })
1298
1345
  ])),
1299
- i(Ae, { name: "slide-fade" }, {
1300
- default: n(() => [
1301
- T.value === "protocol" || Z.value ? (y(), V("div", jt, [
1302
- i(m, {
1346
+ n(Me, { name: "slide-fade" }, {
1347
+ default: c(() => [
1348
+ x.value === "protocol" || X.value ? (y(), V("div", ta, [
1349
+ n(v, {
1303
1350
  modelValue: e.fields.protocol,
1304
- "onUpdate:modelValue": a[3] || (a[3] = (d) => e.fields.protocol = d),
1351
+ "onUpdate:modelValue": a[3] || (a[3] = (u) => e.fields.protocol = u),
1305
1352
  "data-testid": "gateway-service-protocol-select",
1306
- items: oe,
1307
- label: t(l)("gateway_services.form.fields.protocol.label"),
1353
+ items: ie,
1354
+ label: t(o)("gateway_services.form.fields.protocol.label"),
1308
1355
  "label-attributes": {
1309
- info: t(l)("gateway_services.form.fields.protocol.tooltip"),
1356
+ info: t(o)("gateway_services.form.fields.protocol.tooltip"),
1310
1357
  tooltipAttributes: { maxWidth: "400" }
1311
1358
  },
1312
1359
  readonly: e.isReadonly,
1313
1360
  required: "",
1314
1361
  width: "100%",
1315
- onSelected: de
1362
+ onSelected: ye
1316
1363
  }, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
1317
- i(b, {
1364
+ n(i, {
1318
1365
  modelValue: e.fields.host,
1319
- "onUpdate:modelValue": a[4] || (a[4] = (d) => e.fields.host = d),
1366
+ "onUpdate:modelValue": a[4] || (a[4] = (u) => e.fields.host = u),
1320
1367
  modelModifiers: { trim: !0 },
1321
1368
  class: "gateway-service-form-margin-top",
1322
1369
  "data-testid": "gateway-service-host-input",
1323
1370
  error: !!e.formFieldErrors.host,
1324
- "error-message": X("host"),
1325
- label: t(l)("gateway_services.form.fields.host.label"),
1371
+ "error-message": te("host"),
1372
+ label: t(o)("gateway_services.form.fields.host.label"),
1326
1373
  "label-attributes": {
1327
- info: t(l)("gateway_services.form.fields.host.tooltip"),
1374
+ info: t(o)("gateway_services.form.fields.host.tooltip"),
1328
1375
  tooltipAttributes: { maxWidth: "400" }
1329
1376
  },
1330
1377
  name: "host",
1331
- placeholder: t(l)("gateway_services.form.fields.host.placeholder"),
1378
+ placeholder: t(o)("gateway_services.form.fields.host.placeholder"),
1332
1379
  required: "",
1333
- onInput: a[5] || (a[5] = (d) => re("host"))
1334
- }, Se({ _: 2 }, [
1335
- o.hideTrySampleApiButton ? void 0 : {
1380
+ onInput: a[5] || (a[5] = (u) => ce("host"))
1381
+ }, ke({ _: 2 }, [
1382
+ l.hideTrySampleApiButton ? void 0 : {
1336
1383
  name: "after",
1337
- fn: n(() => [
1338
- i(I, {
1384
+ fn: c(() => [
1385
+ n(S, {
1339
1386
  appearance: "tertiary",
1340
1387
  size: "small",
1341
- onClick: he
1388
+ onClick: Se
1342
1389
  }, {
1343
- default: n(() => [
1344
- F(_(t(l)("gateway_services.form.buttons.try_sample")), 1)
1390
+ default: c(() => [
1391
+ F(_(t(o)("gateway_services.form.buttons.try_sample")), 1)
1345
1392
  ]),
1346
1393
  _: 1
1347
1394
  })
@@ -1349,75 +1396,75 @@ const te = {
1349
1396
  key: "0"
1350
1397
  }
1351
1398
  ]), 1032, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder"]),
1352
- ie.value ? (y(), V("div", zt, [
1353
- i(b, {
1399
+ de.value ? (y(), V("div", aa, [
1400
+ n(i, {
1354
1401
  modelValue: e.fields.path,
1355
- "onUpdate:modelValue": a[6] || (a[6] = (d) => e.fields.path = d),
1402
+ "onUpdate:modelValue": a[6] || (a[6] = (u) => e.fields.path = u),
1356
1403
  modelModifiers: { trim: !0 },
1357
1404
  class: "gateway-service-form-margin-top",
1358
1405
  "data-testid": "gateway-service-path-input",
1359
1406
  error: !!e.formFieldErrors.path,
1360
- "error-message": X("path"),
1361
- label: t(l)("gateway_services.form.fields.path.label"),
1407
+ "error-message": te("path"),
1408
+ label: t(o)("gateway_services.form.fields.path.label"),
1362
1409
  "label-attributes": {
1363
- info: t(l)("gateway_services.form.fields.path.tooltip"),
1410
+ info: t(o)("gateway_services.form.fields.path.tooltip"),
1364
1411
  tooltipAttributes: { maxWidth: "400" }
1365
1412
  },
1366
1413
  name: "path",
1367
- placeholder: t(l)("gateway_services.form.fields.path.placeholder"),
1368
- onInput: a[7] || (a[7] = (d) => re("path"))
1414
+ placeholder: t(o)("gateway_services.form.fields.path.placeholder"),
1415
+ onInput: a[7] || (a[7] = (u) => ce("path"))
1369
1416
  }, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder"])
1370
- ])) : E("", !0),
1371
- i(b, {
1417
+ ])) : C("", !0),
1418
+ n(i, {
1372
1419
  modelValue: e.fields.port,
1373
1420
  "onUpdate:modelValue": [
1374
- a[8] || (a[8] = (d) => e.fields.port = d),
1421
+ a[8] || (a[8] = (u) => e.fields.port = u),
1375
1422
  a[10] || (a[10] = () => {
1376
- e.fields.port = Q(e.fields.port + "");
1423
+ e.fields.port = ee(e.fields.port + "");
1377
1424
  })
1378
1425
  ],
1379
1426
  class: "gateway-service-form-margin-top",
1380
1427
  "data-testid": "gateway-service-port-input",
1381
1428
  error: !!e.formFieldErrors.port,
1382
- "error-message": X("port"),
1383
- label: t(l)("gateway_services.form.fields.port.label"),
1429
+ "error-message": te("port"),
1430
+ label: t(o)("gateway_services.form.fields.port.label"),
1384
1431
  "label-attributes": {
1385
- info: t(l)("gateway_services.form.fields.port.tooltip"),
1432
+ info: t(o)("gateway_services.form.fields.port.tooltip"),
1386
1433
  tooltipAttributes: { maxWidth: "400" }
1387
1434
  },
1388
1435
  name: "port",
1389
1436
  type: "number",
1390
- onInput: a[9] || (a[9] = (d) => re("port"))
1437
+ onInput: a[9] || (a[9] = (u) => ce("port"))
1391
1438
  }, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes"])
1392
- ])) : E("", !0)
1439
+ ])) : C("", !0)
1393
1440
  ]),
1394
1441
  _: 1
1395
1442
  }),
1396
- i(ee, {
1397
- modelValue: v.value,
1398
- "onUpdate:modelValue": a[30] || (a[30] = (d) => v.value = d),
1443
+ n(k, {
1444
+ modelValue: m.value,
1445
+ "onUpdate:modelValue": a[30] || (a[30] = (u) => m.value = u),
1399
1446
  "data-testid": "advanced-fields-collapse",
1400
1447
  "trigger-alignment": "leading",
1401
- "trigger-label": t(l)("gateway_services.form.sections.keys.viewAdvancedFields")
1448
+ "trigger-label": t(o)("gateway_services.form.sections.keys.viewAdvancedFields")
1402
1449
  }, {
1403
- default: n(() => [
1404
- i(Ae, { name: "slide-fade" }, {
1405
- default: n(() => [
1406
- v.value ? E("", !0) : (y(), V("div", Ht, [
1407
- P("div", Zt, [
1408
- i(b, {
1450
+ default: c(() => [
1451
+ n(Me, { name: "slide-fade" }, {
1452
+ default: c(() => [
1453
+ m.value ? C("", !0) : (y(), V("div", sa, [
1454
+ P("div", la, [
1455
+ n(i, {
1409
1456
  modelValue: e.fields.retries,
1410
1457
  "onUpdate:modelValue": [
1411
- a[11] || (a[11] = (d) => e.fields.retries = d),
1458
+ a[11] || (a[11] = (u) => e.fields.retries = u),
1412
1459
  a[12] || (a[12] = () => {
1413
- e.fields.retries = Q(e.fields.retries + "");
1460
+ e.fields.retries = ee(e.fields.retries + "");
1414
1461
  })
1415
1462
  ],
1416
1463
  autocomplete: "off",
1417
1464
  "data-testid": "gateway-service-retries-input",
1418
- label: t(l)("gateway_services.form.fields.retries.label"),
1465
+ label: t(o)("gateway_services.form.fields.retries.label"),
1419
1466
  "label-attributes": {
1420
- info: t(l)("gateway_services.form.fields.retries.tooltip"),
1467
+ info: t(o)("gateway_services.form.fields.retries.tooltip"),
1421
1468
  tooltipAttributes: { maxWidth: "400" }
1422
1469
  },
1423
1470
  name: "retries",
@@ -1425,20 +1472,20 @@ const te = {
1425
1472
  type: "number"
1426
1473
  }, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
1427
1474
  ]),
1428
- P("div", Jt, [
1429
- i(b, {
1475
+ P("div", oa, [
1476
+ n(i, {
1430
1477
  modelValue: e.fields.connect_timeout,
1431
1478
  "onUpdate:modelValue": [
1432
- a[13] || (a[13] = (d) => e.fields.connect_timeout = d),
1479
+ a[13] || (a[13] = (u) => e.fields.connect_timeout = u),
1433
1480
  a[14] || (a[14] = () => {
1434
- e.fields.connect_timeout = Q(e.fields.connect_timeout + "");
1481
+ e.fields.connect_timeout = ee(e.fields.connect_timeout + "");
1435
1482
  })
1436
1483
  ],
1437
1484
  autocomplete: "off",
1438
1485
  "data-testid": "gateway-service-connTimeout-input",
1439
- label: t(l)("gateway_services.form.fields.connect_timeout.label"),
1486
+ label: t(o)("gateway_services.form.fields.connect_timeout.label"),
1440
1487
  "label-attributes": {
1441
- info: t(l)("gateway_services.form.fields.connect_timeout.tooltip"),
1488
+ info: t(o)("gateway_services.form.fields.connect_timeout.tooltip"),
1442
1489
  tooltipAttributes: { maxWidth: "400" }
1443
1490
  },
1444
1491
  name: "connTimeout",
@@ -1446,20 +1493,20 @@ const te = {
1446
1493
  type: "number"
1447
1494
  }, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
1448
1495
  ]),
1449
- P("div", Qt, [
1450
- i(b, {
1496
+ P("div", ra, [
1497
+ n(i, {
1451
1498
  modelValue: e.fields.write_timeout,
1452
1499
  "onUpdate:modelValue": [
1453
- a[15] || (a[15] = (d) => e.fields.write_timeout = d),
1500
+ a[15] || (a[15] = (u) => e.fields.write_timeout = u),
1454
1501
  a[16] || (a[16] = () => {
1455
- e.fields.write_timeout = Q(e.fields.write_timeout + "");
1502
+ e.fields.write_timeout = ee(e.fields.write_timeout + "");
1456
1503
  })
1457
1504
  ],
1458
1505
  autocomplete: "off",
1459
1506
  "data-testid": "gateway-service-writeTimeout-input",
1460
- label: t(l)("gateway_services.form.fields.write_timeout.label"),
1507
+ label: t(o)("gateway_services.form.fields.write_timeout.label"),
1461
1508
  "label-attributes": {
1462
- info: t(l)("gateway_services.form.fields.write_timeout.tooltip"),
1509
+ info: t(o)("gateway_services.form.fields.write_timeout.tooltip"),
1463
1510
  tooltipAttributes: { maxWidth: "400" }
1464
1511
  },
1465
1512
  name: "writeTimeout",
@@ -1467,20 +1514,20 @@ const te = {
1467
1514
  type: "number"
1468
1515
  }, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
1469
1516
  ]),
1470
- P("div", Xt, [
1471
- i(b, {
1517
+ P("div", ia, [
1518
+ n(i, {
1472
1519
  modelValue: e.fields.read_timeout,
1473
1520
  "onUpdate:modelValue": [
1474
- a[17] || (a[17] = (d) => e.fields.read_timeout = d),
1521
+ a[17] || (a[17] = (u) => e.fields.read_timeout = u),
1475
1522
  a[18] || (a[18] = () => {
1476
- e.fields.read_timeout = Q(e.fields.read_timeout + "");
1523
+ e.fields.read_timeout = ee(e.fields.read_timeout + "");
1477
1524
  })
1478
1525
  ],
1479
1526
  autocomplete: "off",
1480
1527
  "data-testid": "gateway-service-readTimeout-input",
1481
- label: t(l)("gateway_services.form.fields.read_timeout.label"),
1528
+ label: t(o)("gateway_services.form.fields.read_timeout.label"),
1482
1529
  "label-attributes": {
1483
- info: t(l)("gateway_services.form.fields.read_timeout.tooltip"),
1530
+ info: t(o)("gateway_services.form.fields.read_timeout.tooltip"),
1484
1531
  tooltipAttributes: { maxWidth: "400" }
1485
1532
  },
1486
1533
  name: "readTimeout",
@@ -1488,129 +1535,129 @@ const te = {
1488
1535
  type: "number"
1489
1536
  }, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
1490
1537
  ]),
1491
- O.value ? (y(), V("div", Yt, [
1492
- i(b, {
1538
+ j.value ? (y(), V("div", na, [
1539
+ n(i, {
1493
1540
  modelValue: e.fields.client_certificate,
1494
- "onUpdate:modelValue": a[19] || (a[19] = (d) => e.fields.client_certificate = d),
1541
+ "onUpdate:modelValue": a[19] || (a[19] = (u) => e.fields.client_certificate = u),
1495
1542
  modelModifiers: { trim: !0 },
1496
1543
  autocomplete: "off",
1497
1544
  "data-testid": "gateway-service-clientCert-input",
1498
1545
  error: !!e.formFieldErrors.client_certificate,
1499
- label: t(l)("gateway_services.form.fields.client_certificate.label"),
1546
+ label: t(o)("gateway_services.form.fields.client_certificate.label"),
1500
1547
  "label-attributes": {
1501
- info: t(l)("gateway_services.form.fields.client_certificate.tooltip"),
1548
+ info: t(o)("gateway_services.form.fields.client_certificate.tooltip"),
1502
1549
  tooltipAttributes: { maxWidth: "400" }
1503
1550
  },
1504
1551
  name: "clientCert",
1505
- placeholder: t(l)("gateway_services.form.fields.client_certificate.placeholder"),
1552
+ placeholder: t(o)("gateway_services.form.fields.client_certificate.placeholder"),
1506
1553
  readonly: e.isReadonly,
1507
1554
  type: "text",
1508
- onInput: a[20] || (a[20] = (d) => le("client_certificate"))
1555
+ onInput: a[20] || (a[20] = (u) => ne("client_certificate"))
1509
1556
  }, null, 8, ["modelValue", "error", "label", "label-attributes", "placeholder", "readonly"])
1510
- ])) : E("", !0),
1511
- O.value && o.isTlsSansSupported ? (y(), G(qe, {
1557
+ ])) : C("", !0),
1558
+ j.value && l.isTlsSansSupported ? (y(), N(Ze, {
1512
1559
  key: 1,
1513
1560
  modelValue: e.fields.tls_sans.dnsnames,
1514
- "onUpdate:modelValue": a[21] || (a[21] = (d) => e.fields.tls_sans.dnsnames = d),
1515
- "add-button-text": t(l)("gateway_services.form.fields.tls_sans_dnsnames.add"),
1561
+ "onUpdate:modelValue": a[21] || (a[21] = (u) => e.fields.tls_sans.dnsnames = u),
1562
+ "add-button-text": t(o)("gateway_services.form.fields.tls_sans_dnsnames.add"),
1516
1563
  class: "gateway-service-form-margin-bottom",
1517
1564
  "data-testid": "gateway-service-tls-sans-dnsnames",
1518
1565
  error: !!e.formFieldErrors.tls_sans_dnsnames,
1519
- label: t(l)("gateway_services.form.fields.tls_sans_dnsnames.label"),
1520
- placeholder: t(l)("gateway_services.form.fields.tls_sans_dnsnames.placeholder"),
1566
+ label: t(o)("gateway_services.form.fields.tls_sans_dnsnames.label"),
1567
+ placeholder: t(o)("gateway_services.form.fields.tls_sans_dnsnames.placeholder"),
1521
1568
  readonly: e.isReadonly,
1522
1569
  "test-id-prefix": "tls-sans-dnsnames",
1523
- tooltip: t(l)("gateway_services.form.fields.tls_sans_dnsnames.tooltip"),
1524
- onInput: a[22] || (a[22] = (d) => le("tls_sans_dnsnames"))
1525
- }, null, 8, ["modelValue", "add-button-text", "error", "label", "placeholder", "readonly", "tooltip"])) : E("", !0),
1526
- O.value && o.isTlsSansSupported ? (y(), G(qe, {
1570
+ tooltip: t(o)("gateway_services.form.fields.tls_sans_dnsnames.tooltip"),
1571
+ onInput: a[22] || (a[22] = (u) => ne("tls_sans_dnsnames"))
1572
+ }, null, 8, ["modelValue", "add-button-text", "error", "label", "placeholder", "readonly", "tooltip"])) : C("", !0),
1573
+ j.value && l.isTlsSansSupported ? (y(), N(Ze, {
1527
1574
  key: 2,
1528
1575
  modelValue: e.fields.tls_sans.uris,
1529
- "onUpdate:modelValue": a[23] || (a[23] = (d) => e.fields.tls_sans.uris = d),
1530
- "add-button-text": t(l)("gateway_services.form.fields.tls_sans_uris.add"),
1576
+ "onUpdate:modelValue": a[23] || (a[23] = (u) => e.fields.tls_sans.uris = u),
1577
+ "add-button-text": t(o)("gateway_services.form.fields.tls_sans_uris.add"),
1531
1578
  class: "gateway-service-form-margin-bottom",
1532
1579
  "data-testid": "gateway-service-tls-sans-uris",
1533
1580
  error: !!e.formFieldErrors.tls_sans_uris,
1534
- label: t(l)("gateway_services.form.fields.tls_sans_uris.label"),
1535
- placeholder: t(l)("gateway_services.form.fields.tls_sans_uris.placeholder"),
1581
+ label: t(o)("gateway_services.form.fields.tls_sans_uris.label"),
1582
+ placeholder: t(o)("gateway_services.form.fields.tls_sans_uris.placeholder"),
1536
1583
  readonly: e.isReadonly,
1537
1584
  "test-id-prefix": "tls-sans-uris",
1538
- tooltip: t(l)("gateway_services.form.fields.tls_sans_uris.tooltip"),
1539
- onInput: a[24] || (a[24] = (d) => le("tls_sans_uris"))
1540
- }, null, 8, ["modelValue", "add-button-text", "error", "label", "placeholder", "readonly", "tooltip"])) : E("", !0),
1541
- Te.value ? (y(), V("div", ea, [
1542
- i(b, {
1585
+ tooltip: t(o)("gateway_services.form.fields.tls_sans_uris.tooltip"),
1586
+ onInput: a[24] || (a[24] = (u) => ne("tls_sans_uris"))
1587
+ }, null, 8, ["modelValue", "add-button-text", "error", "label", "placeholder", "readonly", "tooltip"])) : C("", !0),
1588
+ ue.value ? (y(), V("div", ca, [
1589
+ n(i, {
1543
1590
  modelValue: e.fields.ca_certificates,
1544
- "onUpdate:modelValue": a[25] || (a[25] = (d) => e.fields.ca_certificates = d),
1591
+ "onUpdate:modelValue": a[25] || (a[25] = (u) => e.fields.ca_certificates = u),
1545
1592
  modelModifiers: { trim: !0 },
1546
1593
  autocomplete: "off",
1547
1594
  "data-testid": "gateway-service-ca-certs-input",
1548
1595
  error: !!e.formFieldErrors.ca_certificates,
1549
- label: t(l)("gateway_services.form.fields.ca_certificates.label"),
1596
+ label: t(o)("gateway_services.form.fields.ca_certificates.label"),
1550
1597
  "label-attributes": { tooltipAttributes: { maxWidth: "400" } },
1551
- placeholder: t(l)("gateway_services.form.fields.ca_certificates.placeholder"),
1598
+ placeholder: t(o)("gateway_services.form.fields.ca_certificates.placeholder"),
1552
1599
  readonly: e.isReadonly,
1553
1600
  type: "text",
1554
- onInput: a[26] || (a[26] = (d) => le("ca_certificates"))
1601
+ onInput: a[26] || (a[26] = (u) => ne("ca_certificates"))
1555
1602
  }, {
1556
- "label-tooltip": n(() => [
1557
- i(t(R), {
1603
+ "label-tooltip": c(() => [
1604
+ n(t(U), {
1558
1605
  keypath: "gateway_services.form.fields.ca_certificates.tooltip",
1559
1606
  scope: "global"
1560
1607
  }, {
1561
- code1: n(() => [
1562
- P("code", null, _(t(l)("gateway_services.form.fields.ca_certificates.code1")), 1)
1608
+ code1: c(() => [
1609
+ P("code", null, _(t(o)("gateway_services.form.fields.ca_certificates.code1")), 1)
1563
1610
  ]),
1564
- code2: n(() => [
1565
- P("code", null, _(t(l)("gateway_services.form.fields.ca_certificates.code2")), 1)
1611
+ code2: c(() => [
1612
+ P("code", null, _(t(o)("gateway_services.form.fields.ca_certificates.code2")), 1)
1566
1613
  ]),
1567
1614
  _: 1
1568
1615
  })
1569
1616
  ]),
1570
1617
  _: 1
1571
1618
  }, 8, ["modelValue", "error", "label", "placeholder", "readonly"])
1572
- ])) : E("", !0),
1573
- O.value ? (y(), V("div", ta, [
1574
- i(L, {
1619
+ ])) : C("", !0),
1620
+ j.value ? (y(), V("div", da, [
1621
+ n(w, {
1575
1622
  modelValue: e.fields.tls_verify_enabled,
1576
- "onUpdate:modelValue": a[27] || (a[27] = (d) => e.fields.tls_verify_enabled = d),
1623
+ "onUpdate:modelValue": a[27] || (a[27] = (u) => e.fields.tls_verify_enabled = u),
1577
1624
  "data-testid": "gateway-service-tls-verify-checkbox",
1578
- description: t(l)("gateway_services.form.fields.tls_verify_enabled.help"),
1579
- label: t(l)("gateway_services.form.fields.tls_verify_enabled.label"),
1625
+ description: t(o)("gateway_services.form.fields.tls_verify_enabled.help"),
1626
+ label: t(o)("gateway_services.form.fields.tls_verify_enabled.label"),
1580
1627
  "label-attributes": { tooltipAttributes: { maxWidth: "400" } }
1581
1628
  }, {
1582
- tooltip: n(() => [
1583
- i(t(R), {
1629
+ tooltip: c(() => [
1630
+ n(t(U), {
1584
1631
  keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
1585
1632
  scope: "global"
1586
1633
  }, {
1587
- code1: n(() => [
1588
- P("code", null, _(t(l)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
1634
+ code1: c(() => [
1635
+ P("code", null, _(t(o)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
1589
1636
  ]),
1590
1637
  _: 1
1591
1638
  })
1592
1639
  ]),
1593
1640
  _: 1
1594
1641
  }, 8, ["modelValue", "description", "label"]),
1595
- e.fields.tls_verify_enabled ? (y(), V("div", aa, [
1596
- i(u, {
1642
+ e.fields.tls_verify_enabled ? (y(), V("div", ua, [
1643
+ n(f, {
1597
1644
  modelValue: e.fields.tls_verify_value,
1598
- "onUpdate:modelValue": a[28] || (a[28] = (d) => e.fields.tls_verify_value = d),
1645
+ "onUpdate:modelValue": a[28] || (a[28] = (u) => e.fields.tls_verify_value = u),
1599
1646
  "data-testid": "gateway-service-tls-verify-true-option",
1600
- label: t(l)("gateway_services.form.fields.tls_verify_option.true.label"),
1647
+ label: t(o)("gateway_services.form.fields.tls_verify_option.true.label"),
1601
1648
  "selected-value": !0
1602
1649
  }, null, 8, ["modelValue", "label"])
1603
- ])) : E("", !0),
1604
- e.fields.tls_verify_enabled ? (y(), V("div", sa, [
1605
- i(u, {
1650
+ ])) : C("", !0),
1651
+ e.fields.tls_verify_enabled ? (y(), V("div", fa, [
1652
+ n(f, {
1606
1653
  modelValue: e.fields.tls_verify_value,
1607
- "onUpdate:modelValue": a[29] || (a[29] = (d) => e.fields.tls_verify_value = d),
1654
+ "onUpdate:modelValue": a[29] || (a[29] = (u) => e.fields.tls_verify_value = u),
1608
1655
  "data-testid": "gateway-service-tls-verify-false-option",
1609
- label: t(l)("gateway_services.form.fields.tls_verify_option.false.label"),
1656
+ label: t(o)("gateway_services.form.fields.tls_verify_option.false.label"),
1610
1657
  "selected-value": !1
1611
1658
  }, null, 8, ["modelValue", "label"])
1612
- ])) : E("", !0)
1613
- ])) : E("", !0)
1659
+ ])) : C("", !0)
1660
+ ])) : C("", !0)
1614
1661
  ]))
1615
1662
  ]),
1616
1663
  _: 1
@@ -1621,55 +1668,55 @@ const te = {
1621
1668
  ]),
1622
1669
  _: 1
1623
1670
  }, 8, ["description", "hide-info-header", "title"]),
1624
- i(t(Ne), {
1625
- description: t(l)("gateway_services.form.sections.general.description"),
1626
- "hide-info-header": o.hideSectionsInfo,
1627
- title: t(l)("gateway_services.form.sections.general.title")
1671
+ n(t(He), {
1672
+ description: t(o)("gateway_services.form.sections.general.description"),
1673
+ "hide-info-header": l.hideSectionsInfo,
1674
+ title: t(o)("gateway_services.form.sections.general.title")
1628
1675
  }, {
1629
- default: n(() => [
1630
- i(b, {
1676
+ default: c(() => [
1677
+ n(i, {
1631
1678
  modelValue: e.fields.name,
1632
- "onUpdate:modelValue": a[31] || (a[31] = (d) => e.fields.name = d),
1679
+ "onUpdate:modelValue": a[31] || (a[31] = (u) => e.fields.name = u),
1633
1680
  modelModifiers: { trim: !0 },
1634
1681
  autocomplete: "off",
1635
1682
  "data-testid": "gateway-service-name-input",
1636
- error: Fe.value,
1637
- "error-message": J.value,
1638
- label: t(l)("gateway_services.form.fields.name.label"),
1683
+ error: xe.value,
1684
+ "error-message": Y.value,
1685
+ label: t(o)("gateway_services.form.fields.name.label"),
1639
1686
  "label-attributes": {
1640
- info: t(l)("gateway_services.form.fields.name.tooltip"),
1687
+ info: t(o)("gateway_services.form.fields.name.tooltip"),
1641
1688
  tooltipAttributes: { maxWidth: "400" }
1642
1689
  },
1643
1690
  name: "name",
1644
- placeholder: t(l)("gateway_services.form.fields.name.placeholder"),
1691
+ placeholder: t(o)("gateway_services.form.fields.name.placeholder"),
1645
1692
  readonly: e.isReadonly,
1646
1693
  type: "text",
1647
- onInput: we
1694
+ onInput: fe
1648
1695
  }, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder", "readonly"]),
1649
- i(ee, {
1696
+ n(k, {
1650
1697
  "data-testid": "tags-collapse",
1651
1698
  "trigger-alignment": "leading",
1652
- "trigger-label": t(l)("gateway_services.form.fields.tags.collapse")
1699
+ "trigger-label": t(o)("gateway_services.form.fields.tags.collapse")
1653
1700
  }, {
1654
- default: n(() => [
1655
- P("div", oa, [
1656
- i(b, {
1701
+ default: c(() => [
1702
+ P("div", pa, [
1703
+ n(i, {
1657
1704
  modelValue: e.fields.tags,
1658
- "onUpdate:modelValue": a[32] || (a[32] = (d) => e.fields.tags = d),
1705
+ "onUpdate:modelValue": a[32] || (a[32] = (u) => e.fields.tags = u),
1659
1706
  modelModifiers: { trim: !0 },
1660
1707
  autocomplete: "off",
1661
1708
  "data-testid": "gateway-service-tags-input",
1662
- help: t(l)("gateway_services.form.fields.tags.help"),
1663
- label: t(l)("gateway_services.form.fields.tags.label"),
1709
+ help: t(o)("gateway_services.form.fields.tags.help"),
1710
+ label: t(o)("gateway_services.form.fields.tags.label"),
1664
1711
  "label-attributes": {
1665
- info: t(l)("gateway_services.form.fields.tags.tooltip"),
1712
+ info: t(o)("gateway_services.form.fields.tags.tooltip"),
1666
1713
  tooltipAttributes: { maxWidth: "400" }
1667
1714
  },
1668
1715
  name: "tags",
1669
- placeholder: t(l)("gateway_services.form.fields.tags.placeholder"),
1716
+ placeholder: t(o)("gateway_services.form.fields.tags.placeholder"),
1670
1717
  readonly: e.isReadonly,
1671
1718
  type: "text",
1672
- onInput: a[33] || (a[33] = (d) => W("tags"))
1719
+ onInput: a[33] || (a[33] = (u) => O("tags"))
1673
1720
  }, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"])
1674
1721
  ])
1675
1722
  ]),
@@ -1678,33 +1725,33 @@ const te = {
1678
1725
  ]),
1679
1726
  _: 1
1680
1727
  }, 8, ["description", "hide-info-header", "title"]),
1681
- e.errorMessages.length ? (y(), G(He, {
1728
+ e.errorMessages.length ? (y(), N(H, {
1682
1729
  key: 0,
1683
1730
  appearance: "danger",
1684
1731
  "data-testid": "form-error"
1685
1732
  }, {
1686
- default: n(() => [
1687
- P("ul", la, [
1688
- (y(!0), V(Be, null, Ge(e.errorMessages, (d) => (y(), V("li", { key: d }, _(d), 1))), 128))
1733
+ default: c(() => [
1734
+ P("ul", ma, [
1735
+ (y(!0), V(Ne, null, Je(e.errorMessages, (u) => (y(), V("li", { key: u }, _(u), 1))), 128))
1689
1736
  ])
1690
1737
  ]),
1691
1738
  _: 1
1692
- })) : E("", !0)
1739
+ })) : C("", !0)
1693
1740
  ]),
1694
1741
  _: 3
1695
1742
  }, 8, ["can-submit", "config", "edit-id", "entity-type", "fetch-url", "form-fields", "is-readonly"])
1696
1743
  ]);
1697
1744
  };
1698
1745
  }
1699
- }), _a = /* @__PURE__ */ De(ra, [["__scopeId", "data-v-fac65b64"]]), { validateHost: ia, validatePort: na, validateProtocol: ca, validatePath: da } = te.useUrlValidators(), ha = () => ({
1700
- validateHost: ia,
1701
- validatePort: na,
1702
- validateProtocol: ca,
1703
- validatePath: da
1746
+ }), Ia = /* @__PURE__ */ qe(va, [["__scopeId", "data-v-fac65b64"]]), { validateHost: ga, validatePort: ya, validateProtocol: _a, validatePath: ha } = le.useUrlValidators(), Fa = () => ({
1747
+ validateHost: ga,
1748
+ validatePort: ya,
1749
+ validateProtocol: _a,
1750
+ validatePath: ha
1704
1751
  });
1705
1752
  export {
1706
- ya as GatewayServiceConfigCard,
1707
- _a as GatewayServiceForm,
1708
- ga as GatewayServiceList,
1709
- ha as useUrlValidator
1753
+ Ea as GatewayServiceConfigCard,
1754
+ Ia as GatewayServiceForm,
1755
+ Ca as GatewayServiceList,
1756
+ Fa as useUrlValidator
1710
1757
  };