@kong-ui-public/entities-vaults 3.13.48 → 3.13.49

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,27 +1,28 @@
1
- import { defineComponent as ce, computed as V, ref as I, watch as $e, onBeforeMount as Ve, resolveComponent as W, openBlock as x, createElementBlock as N, createVNode as c, unref as e, withCtx as v, createBlock as ae, Teleport as Be, createTextVNode as ne, toDisplayString as F, createElementVNode as R, reactive as de, resolveDynamicComponent as Re, TransitionGroup as ze, createCommentVNode as Q, Fragment as Le, mergeProps as He } from "vue";
2
- import { useRouter as Se } from "vue-router";
3
- import { AddIcon as Me, AzureIcon as Ge, HashicorpIcon as Ze, GoogleCloudIcon as Je, AwsIcon as Qe, CodeIcon as Ye, KongIcon as Xe } from "@kong/icons";
4
- import { useAxios as me, useFetcher as Ke, useDeleteUrlBuilder as Pe, FetcherStatus as Ne, EntityBaseTable as Fe, EntityFilter as Oe, PermissionsWrapper as se, TableTags as et, EntityDeleteModal as qe, EntityTypes as De, useErrors as We, EntityBaseFormType as fe, useGatewayFeatureSupported as tt, EntityBaseForm as je, SupportedEntityType as Ee, EntityFormSection as we, ConfigurationSchemaSection as Ue, ConfigurationSchemaType as lt, EntityBaseConfigCard as ot } from "@kong-ui-public/entities-shared";
5
- import { createI18n as at, i18nTComponent as it } from "@kong-ui-public/i18n";
6
- const rt = {
1
+ import { defineComponent as ie, computed as E, ref as U, watch as he, onBeforeMount as ke, resolveComponent as N, openBlock as A, createElementBlock as q, createVNode as d, unref as e, withCtx as y, createBlock as oe, Teleport as Le, createTextVNode as pe, toDisplayString as P, createElementVNode as R, reactive as _e, resolveDynamicComponent as Ue, TransitionGroup as ze, createCommentVNode as ae, Fragment as Ge, mergeProps as Pe, nextTick as Ze } from "vue";
2
+ import { useRouter as Ie } from "vue-router";
3
+ import { AddIcon as Me, AzureIcon as Je, HashicorpIcon as Qe, GoogleCloudIcon as Ye, AwsIcon as Xe, CodeIcon as et, KongIcon as tt } from "@kong/icons";
4
+ import { useAxios as ve, useFetcher as He, useDeleteUrlBuilder as Fe, FetcherStatus as Ne, EntityBaseTable as Oe, EntityFilter as qe, PermissionsWrapper as fe, TableTags as lt, EntityDeleteModal as De, EntityTypes as We, useErrors as je, EntityBaseFormType as be, useGatewayFeatureSupported as ot, EntityBaseForm as Be, SupportedEntityType as xe, EntityFormSection as Se, ConfigurationSchemaSection as $e, ConfigurationSchemaType as at, EntityBaseConfigCard as rt, useDebouncedFilter as Te } from "@kong-ui-public/entities-shared";
5
+ import { createI18n as it, i18nTComponent as nt } from "@kong-ui-public/i18n";
6
+ const st = {
7
7
  create: "New Vault",
8
8
  copy_id: "Copy ID",
9
9
  copy_json: "Copy JSON",
10
10
  edit: "Edit",
11
11
  delete: "Delete",
12
- view: "View Details"
13
- }, nt = {
12
+ view: "View Details",
13
+ loading: "Loading..."
14
+ }, ct = {
14
15
  general: "Vaults could not be retrieved",
15
16
  delete: "The vault could not be deleted at this time.",
16
17
  copy: "Failed to copy to clipboard"
17
- }, st = {
18
+ }, ut = {
18
19
  placeholder_for_vaults: {
19
20
  konnect: "Filter by exact prefix or ID"
20
21
  },
21
22
  placeholder_for_secrets: {
22
23
  konnect: "Filter by exact key"
23
24
  }
24
- }, ct = {
25
+ }, dt = {
25
26
  title: "Vaults",
26
27
  list: {
27
28
  toolbar_actions: {
@@ -39,7 +40,7 @@ const rt = {
39
40
  description: "Improve the security of your Kong Gateway deployment with centralized secrets."
40
41
  }
41
42
  }
42
- }, ut = {
43
+ }, pt = {
43
44
  title: "Secrets",
44
45
  list: {
45
46
  toolbar_actions: {
@@ -71,12 +72,12 @@ const rt = {
71
72
  },
72
73
  hint: "Once saved, the secret value will not be visible"
73
74
  }
74
- }, dt = {
75
+ }, ft = {
75
76
  success: "Copied {val} to clipboard",
76
77
  success_brief: "Successfully copied to clipboard"
77
- }, ft = {
78
+ }, mt = {
78
79
  vault_type: "Vault Type"
79
- }, pt = {
80
+ }, vt = {
80
81
  sections: {
81
82
  general: {
82
83
  title: "General Information",
@@ -325,36 +326,66 @@ const rt = {
325
326
  }
326
327
  },
327
328
  unavailable: "This vault provider is available on Enterprise."
328
- }, mt = {
329
- actions: rt,
329
+ }, gt = {
330
+ title: "Look up Key in Vault",
331
+ vault: {
332
+ label: "Vault",
333
+ placeholder: "Select a vault"
334
+ },
335
+ secret_id: {
336
+ label: "Secret ID",
337
+ input_placeholder: "Enter a secret ID",
338
+ select_placeholder: "Select or enter a complete secret ID"
339
+ },
340
+ optional_secret_key: {
341
+ label: "Secret Key",
342
+ placeholder: "Enter the key or key path to access a nested secret value",
343
+ help: "Optional. e.g. tokens, tokens/refresh_token"
344
+ },
345
+ fetch_error: {
346
+ vaults: "Could not fetch available vaults",
347
+ secrets: "Could not fetch available secrets",
348
+ vaults_and_secrets: "Could not fetch available vaults and secrets"
349
+ },
350
+ no_results: "No results found",
351
+ actions: {
352
+ use_key: "Use Key"
353
+ },
354
+ provider: {
355
+ complete_action: "Look up {cta}",
356
+ cta: "Key in Vault"
357
+ }
358
+ }, _t = {
359
+ actions: st,
330
360
  delete: {
331
361
  title: "Delete a Vault",
332
362
  title_for_secret: "Delete a Secret",
333
363
  description: "This action cannot be reversed."
334
364
  },
335
- errors: nt,
336
- search: st,
337
- vaults: ct,
338
- secrets: ut,
339
- copy: dt,
340
- labels: ft,
341
- form: pt
365
+ errors: ct,
366
+ search: ut,
367
+ vaults: dt,
368
+ secrets: pt,
369
+ copy: ft,
370
+ labels: mt,
371
+ form: vt,
372
+ vault_secret_picker: gt
342
373
  };
343
- function gt() {
344
- const l = at("en-us", mt);
374
+ function bt() {
375
+ const l = it("en-us", _t);
345
376
  return {
346
377
  i18n: l,
347
- i18nT: it(l)
378
+ i18nT: nt(l)
348
379
  // Translation component <i18n-t>
349
380
  };
350
381
  }
351
- const he = {
352
- useI18n: gt
353
- }, ke = "/v2/control-planes/{controlPlaneId}/core-entities", Te = "/v2/control-planes/{controlPlaneId}/config-stores", Ce = "/{workspace}", pe = {
382
+ const ge = {
383
+ useI18n: bt
384
+ }, we = "/v2/control-planes/{controlPlaneId}/core-entities", Ke = "/v2/control-planes/{controlPlaneId}/config-stores", Ce = "/{workspace}", se = {
354
385
  list: {
355
386
  konnect: {
356
- getAll: `${ke}/vaults`,
357
- deleteConfigStore: `${Te}/{id}?force=true`
387
+ getAll: `${we}/vaults`,
388
+ deleteConfigStore: `${Ke}/{id}?force=true`
358
389
  },
359
390
  kongManager: {
360
391
  getAll: `${Ce}/vaults`
@@ -362,16 +393,16 @@ const he = {
362
393
  },
363
394
  form: {
364
395
  konnect: {
365
- create: `${ke}/vaults`,
366
- createConfigStore: Te,
367
- edit: `${ke}/vaults/{id}`
396
+ create: `${we}/vaults`,
397
+ createConfigStore: Ke,
398
+ edit: `${we}/vaults/{id}`
368
399
  },
369
400
  kongManager: {
370
401
  create: `${Ce}/vaults`,
371
402
  edit: `${Ce}/vaults/{id}`
372
403
  }
373
404
  }
374
- }, vt = { class: "kong-ui-entities-vaults-list" }, bt = { class: "table-content-overflow-wrapper" }, yt = { class: "table-content-overflow-wrapper" }, ht = /* @__PURE__ */ ce({
405
+ }, yt = { class: "kong-ui-entities-vaults-list" }, ht = { class: "table-content-overflow-wrapper" }, Vt = { class: "table-content-overflow-wrapper" }, kt = /* @__PURE__ */ ie({
375
406
  __name: "VaultList",
376
407
  props: {
377
408
  /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
@@ -416,157 +447,157 @@ const he = {
416
447
  }
417
448
  },
418
449
  emits: ["error", "copy:success", "copy:error", "delete:success"],
419
- setup(l, { emit: M }) {
420
- var ve;
421
- const f = M, u = l, { i18n: { t: p } } = he.useI18n(), a = Se(), { axiosInstance: w } = me((ve = u.config) == null ? void 0 : ve.axiosRequestConfig), S = V(() => u.config.app !== "kongManager" || !!u.config.disableSorting), y = {
450
+ setup(l, { emit: I }) {
451
+ var T;
452
+ const c = I, n = l, { i18n: { t: f } } = ge.useI18n(), o = Ie(), { axiosInstance: x } = ve((T = n.config) == null ? void 0 : T.axiosRequestConfig), C = E(() => n.config.app !== "kongManager" || !!n.config.disableSorting), b = {
422
453
  // the Prefix column is non-hidable
423
- prefix: { label: p("vaults.list.table_headers.prefix"), searchable: !0, sortable: !0, hidable: !1 },
454
+ prefix: { label: f("vaults.list.table_headers.prefix"), searchable: !0, sortable: !0, hidable: !1 },
424
455
  // it's "Vault Type" on display, but we still use "name" to fit API schema
425
- name: { label: p("vaults.list.table_headers.name"), searchable: !0, sortable: !0 },
426
- description: { label: p("vaults.list.table_headers.description"), sortable: !1 },
427
- tags: { label: p("vaults.list.table_headers.tags"), sortable: !1 }
428
- }, d = y, k = V(() => {
429
- var h, _;
430
- let g = `${u.config.apiBaseUrl}${pe.list[u.config.app].getAll}`;
431
- return u.config.app === "konnect" ? g = g.replace(/{controlPlaneId}/gi, ((h = u.config) == null ? void 0 : h.controlPlaneId) || "") : u.config.app === "kongManager" && (g = g.replace(/\/{workspace}/gi, (_ = u.config) != null && _.workspace ? `/${u.config.workspace}` : "")), g;
432
- }), s = I(""), K = V(() => {
433
- if (u.config.app === "konnect" || u.config.isExactMatch)
456
+ name: { label: f("vaults.list.table_headers.name"), searchable: !0, sortable: !0 },
457
+ description: { label: f("vaults.list.table_headers.description"), sortable: !1 },
458
+ tags: { label: f("vaults.list.table_headers.tags"), sortable: !1 }
459
+ }, p = b, h = E(() => {
460
+ var w, V;
461
+ let m = `${n.config.apiBaseUrl}${se.list[n.config.app].getAll}`;
462
+ return n.config.app === "konnect" ? m = m.replace(/{controlPlaneId}/gi, ((w = n.config) == null ? void 0 : w.controlPlaneId) || "") : n.config.app === "kongManager" && (m = m.replace(/\/{workspace}/gi, (V = n.config) != null && V.workspace ? `/${n.config.workspace}` : "")), m;
463
+ }), u = U(""), O = E(() => {
464
+ if (n.config.app === "konnect" || n.config.isExactMatch)
434
465
  return {
435
466
  isExactMatch: !0,
436
- placeholder: p("search.placeholder_for_vaults.konnect")
467
+ placeholder: f("search.placeholder_for_vaults.konnect")
437
468
  };
438
- const { prefix: h, name: _ } = y;
469
+ const { prefix: w, name: V } = b;
439
470
  return {
440
471
  isExactMatch: !1,
441
- fields: { name: _, prefix: h },
442
- schema: u.config.filterSchema
472
+ fields: { name: V, prefix: w },
473
+ schema: n.config.filterSchema
443
474
  };
444
- }), O = I(1), { fetcher: oe, fetcherState: Y } = Ke(u.config, k.value), o = () => {
445
- s.value = "";
446
- }, Z = () => {
447
- O.value++;
448
- }, X = I(null), q = (g, h) => {
449
- const _ = g.id;
450
- if (!h(_)) {
451
- f("copy:error", {
452
- entity: g,
475
+ }), D = U(1), { fetcher: re, fetcherState: z } = He(n.config, h.value), a = () => {
476
+ u.value = "";
477
+ }, Y = () => {
478
+ D.value++;
479
+ }, ee = U(null), W = (m, w) => {
480
+ const V = m.id;
481
+ if (!w(V)) {
482
+ c("copy:error", {
483
+ entity: m,
453
484
  field: "id",
454
- message: p("errors.copy")
485
+ message: f("errors.copy")
455
486
  });
456
487
  return;
457
488
  }
458
- f("copy:success", {
459
- entity: g,
489
+ c("copy:success", {
490
+ entity: m,
460
491
  field: "id",
461
- message: p("copy.success", { val: _ })
492
+ message: f("copy.success", { val: V })
462
493
  });
463
- }, ee = (g, h) => {
464
- const _ = JSON.stringify(g);
465
- if (!h(_)) {
466
- f("copy:error", {
467
- entity: g,
468
- message: p("errors.copy")
494
+ }, G = (m, w) => {
495
+ const V = JSON.stringify(m);
496
+ if (!w(V)) {
497
+ c("copy:error", {
498
+ entity: m,
499
+ message: f("errors.copy")
469
500
  });
470
501
  return;
471
502
  }
472
- f("copy:success", {
473
- entity: g,
474
- message: p("copy.success_brief")
503
+ c("copy:success", {
504
+ entity: m,
505
+ message: f("copy.success_brief")
475
506
  });
476
- }, J = async (g) => {
477
- var _;
478
- await ((_ = u.canRetrieve) == null ? void 0 : _.call(u, g)) && a.push(u.config.getViewRoute(g.id));
479
- }, m = (g) => ({
480
- label: p("actions.view"),
481
- to: u.config.getViewRoute(g)
482
- }), H = (g) => ({
483
- label: p("actions.edit"),
484
- to: u.config.getEditRoute(g)
485
- }), U = I(void 0), j = I(!1), te = I(!1), z = I(""), ue = Pe(u.config, k.value), E = (g) => {
486
- U.value = g, j.value = !0;
487
- }, L = () => {
507
+ }, X = async (m) => {
508
+ var V;
509
+ await ((V = n.canRetrieve) == null ? void 0 : V.call(n, m)) && o.push(n.config.getViewRoute(m.id));
510
+ }, g = (m) => ({
511
+ label: f("actions.view"),
512
+ to: n.config.getViewRoute(m)
513
+ }), H = (m) => ({
514
+ label: f("actions.edit"),
515
+ to: n.config.getEditRoute(m)
516
+ }), M = U(void 0), j = U(!1), te = U(!1), Z = U(""), ne = Fe(n.config, h.value), $ = (m) => {
517
+ M.value = m, j.value = !0;
518
+ }, J = () => {
488
519
  j.value = !1;
489
- }, G = async (g) => {
490
- const { apiBaseUrl: h, app: _, controlPlaneId: $ } = u.config, le = `${h}${pe.list[_].deleteConfigStore}`.replace(/{controlPlaneId}/gi, $ || "").replace(/{id}/gi, g);
520
+ }, B = async (m) => {
521
+ const { apiBaseUrl: w, app: V, controlPlaneId: k } = n.config, le = `${w}${se.list[V].deleteConfigStore}`.replace(/{controlPlaneId}/gi, k || "").replace(/{id}/gi, m);
491
522
  try {
492
- await w.delete(le);
523
+ await x.delete(le);
493
524
  } catch {
494
525
  }
495
- }, B = async () => {
496
- var g, h, _, $;
497
- if ((g = U.value) != null && g.id) {
526
+ }, _ = async () => {
527
+ var m, w, V, k;
528
+ if ((m = M.value) != null && m.id) {
498
529
  te.value = !0;
499
530
  try {
500
- await w.delete(ue(U.value.id)), u.config.app === "konnect" && ((h = U.value.config) != null && h.config_store_id) && G(U.value.config.config_store_id), te.value = !1, j.value = !1, O.value++, f("delete:success", U.value);
531
+ await x.delete(ne(M.value.id)), n.config.app === "konnect" && ((w = M.value.config) != null && w.config_store_id) && B(M.value.config.config_store_id), te.value = !1, j.value = !1, D.value++, c("delete:success", M.value);
501
532
  } catch (le) {
502
- z.value = (($ = (_ = le.response) == null ? void 0 : _.data) == null ? void 0 : $.message) || le.message || p("errors.delete"), f("error", le);
533
+ Z.value = ((k = (V = le.response) == null ? void 0 : V.data) == null ? void 0 : k.message) || le.message || f("errors.delete"), c("error", le);
503
534
  } finally {
504
535
  te.value = !1;
505
536
  }
506
537
  }
507
538
  };
508
- $e(Y, (g) => {
509
- var h, _, $;
510
- if (g.status === Ne.Error) {
511
- X.value = {
512
- title: p("errors.general")
513
- }, ($ = (_ = (h = g.error) == null ? void 0 : h.response) == null ? void 0 : _.data) != null && $.message && (X.value.message = g.error.response.data.message), f("error", g.error);
539
+ he(z, (m) => {
540
+ var w, V, k;
541
+ if (m.status === Ne.Error) {
542
+ ee.value = {
543
+ title: f("errors.general")
544
+ }, (k = (V = (w = m.error) == null ? void 0 : w.response) == null ? void 0 : V.data) != null && k.message && (ee.value.message = m.error.response.data.message), c("error", m.error);
514
545
  return;
515
546
  }
516
- X.value = null;
547
+ ee.value = null;
517
548
  });
518
- const T = I({
519
- ctaPath: u.config.createRoute,
549
+ const v = U({
550
+ ctaPath: n.config.createRoute,
520
551
  ctaText: void 0,
521
- message: `${p("vaults.list.empty_state.description")}${u.config.additionMessageForEmptyState ? ` ${u.config.additionMessageForEmptyState}` : ""}`,
522
- title: p("vaults.title")
552
+ message: `${f("vaults.list.empty_state.description")}${n.config.additionMessageForEmptyState ? ` ${n.config.additionMessageForEmptyState}` : ""}`,
553
+ title: f("vaults.title")
523
554
  });
524
- return Ve(async () => {
525
- await u.canCreate() && (T.value.title = p("vaults.list.empty_state.title"), T.value.ctaText = p("actions.create"));
526
- }), (g, h) => {
527
- const _ = W("KButton"), $ = W("KDropdownItem"), le = W("KClipboardProvider");
528
- return x(), N("div", vt, [
529
- c(e(Fe), {
555
+ return ke(async () => {
556
+ await n.canCreate() && (v.value.title = f("vaults.list.empty_state.title"), v.value.ctaText = f("actions.create"));
557
+ }), (m, w) => {
558
+ const V = N("KButton"), k = N("KDropdownItem"), le = N("KClipboardProvider");
559
+ return A(), q("div", yt, [
560
+ d(e(Oe), {
530
561
  "cache-identifier": l.cacheIdentifier,
531
- "disable-sorting": S.value,
532
- "empty-state-options": T.value,
562
+ "disable-sorting": C.value,
563
+ "empty-state-options": v.value,
533
564
  "enable-entity-actions": "",
534
- "error-message": X.value,
535
- fetcher: e(oe),
536
- "fetcher-cache-key": O.value,
565
+ "error-message": ee.value,
566
+ fetcher: e(re),
567
+ "fetcher-cache-key": D.value,
537
568
  "pagination-type": "offset",
538
569
  "preferences-storage-key": "kong-ui-entities-vaults-list",
539
- query: s.value,
540
- "table-headers": e(d),
541
- onClearSearchInput: o,
542
- "onClick:row": h[1] || (h[1] = (C) => J(C)),
543
- onSort: Z
570
+ query: u.value,
571
+ "table-headers": e(p),
572
+ onClearSearchInput: a,
573
+ "onClick:row": w[1] || (w[1] = (K) => X(K)),
574
+ onSort: Y
544
575
  }, {
545
- "toolbar-filter": v(() => [
546
- c(e(Oe), {
547
- modelValue: s.value,
548
- "onUpdate:modelValue": h[0] || (h[0] = (C) => s.value = C),
549
- config: K.value
576
+ "toolbar-filter": y(() => [
577
+ d(e(qe), {
578
+ modelValue: u.value,
579
+ "onUpdate:modelValue": w[0] || (w[0] = (K) => u.value = K),
580
+ config: O.value
550
581
  }, null, 8, ["modelValue", "config"])
551
582
  ]),
552
- "toolbar-button": v(() => [
553
- (x(), ae(Be, {
583
+ "toolbar-button": y(() => [
584
+ (A(), oe(Le, {
554
585
  disabled: !l.useActionOutside,
555
586
  to: "#kong-ui-app-page-header-action-button"
556
587
  }, [
557
- c(e(se), {
588
+ d(e(fe), {
558
589
  "auth-function": () => l.canCreate()
559
590
  }, {
560
- default: v(() => [
561
- c(_, {
591
+ default: y(() => [
592
+ d(V, {
562
593
  appearance: "primary",
563
594
  "data-testid": "toolbar-add-vault",
564
595
  size: l.useActionOutside ? "medium" : "large",
565
596
  to: l.config.createRoute
566
597
  }, {
567
- default: v(() => [
568
- c(e(Me)),
569
- ne(" " + F(e(p)("vaults.list.toolbar_actions.new_vault")), 1)
598
+ default: y(() => [
599
+ d(e(Me)),
600
+ pe(" " + P(e(f)("vaults.list.toolbar_actions.new_vault")), 1)
570
601
  ]),
571
602
  _: 1
572
603
  }, 8, ["size", "to"])
@@ -575,84 +606,84 @@ const he = {
575
606
  }, 8, ["auth-function"])
576
607
  ], 8, ["disabled"]))
577
608
  ]),
578
- prefix: v(({ rowValue: C }) => [
579
- R("div", bt, [
580
- R("b", null, F(C ?? "-"), 1)
609
+ prefix: y(({ rowValue: K }) => [
610
+ R("div", ht, [
611
+ R("b", null, P(K ?? "-"), 1)
581
612
  ])
582
613
  ]),
583
- name: v(({ rowValue: C }) => [
584
- R("b", null, F(C ?? "-"), 1)
614
+ name: y(({ rowValue: K }) => [
615
+ R("b", null, P(K ?? "-"), 1)
585
616
  ]),
586
- description: v(({ rowValue: C }) => [
587
- R("div", yt, F(C ?? "-"), 1)
617
+ description: y(({ rowValue: K }) => [
618
+ R("div", Vt, P(K ?? "-"), 1)
588
619
  ]),
589
- tags: v(({ rowValue: C }) => [
590
- c(e(et), { tags: C }, null, 8, ["tags"])
620
+ tags: y(({ rowValue: K }) => [
621
+ d(e(lt), { tags: K }, null, 8, ["tags"])
591
622
  ]),
592
- actions: v(({ row: C }) => [
593
- c(le, null, {
594
- default: v(({ copyToClipboard: n }) => [
595
- c($, {
623
+ actions: y(({ row: K }) => [
624
+ d(le, null, {
625
+ default: y(({ copyToClipboard: s }) => [
626
+ d(k, {
596
627
  "data-testid": "action-entity-copy-id",
597
- onClick: (i) => q(C, n)
628
+ onClick: (r) => W(K, s)
598
629
  }, {
599
- default: v(() => [
600
- ne(F(e(p)("actions.copy_id")), 1)
630
+ default: y(() => [
631
+ pe(P(e(f)("actions.copy_id")), 1)
601
632
  ]),
602
633
  _: 2
603
634
  }, 1032, ["onClick"])
604
635
  ]),
605
636
  _: 2
606
637
  }, 1024),
607
- c(le, null, {
608
- default: v(({ copyToClipboard: n }) => [
609
- c($, {
638
+ d(le, null, {
639
+ default: y(({ copyToClipboard: s }) => [
640
+ d(k, {
610
641
  "data-testid": "action-entity-copy-json",
611
- onClick: (i) => ee(C, n)
642
+ onClick: (r) => G(K, s)
612
643
  }, {
613
- default: v(() => [
614
- ne(F(e(p)("actions.copy_json")), 1)
644
+ default: y(() => [
645
+ pe(P(e(f)("actions.copy_json")), 1)
615
646
  ]),
616
647
  _: 2
617
648
  }, 1032, ["onClick"])
618
649
  ]),
619
650
  _: 2
620
651
  }, 1024),
621
- c(e(se), {
622
- "auth-function": () => l.canRetrieve(C)
652
+ d(e(fe), {
653
+ "auth-function": () => l.canRetrieve(K)
623
654
  }, {
624
- default: v(() => [
625
- c($, {
655
+ default: y(() => [
656
+ d(k, {
626
657
  "data-testid": "action-entity-view",
627
658
  "has-divider": "",
628
- item: m(C.id)
659
+ item: g(K.id)
629
660
  }, null, 8, ["item"])
630
661
  ]),
631
662
  _: 2
632
663
  }, 1032, ["auth-function"]),
633
- c(e(se), {
634
- "auth-function": () => l.canEdit(C)
664
+ d(e(fe), {
665
+ "auth-function": () => l.canEdit(K)
635
666
  }, {
636
- default: v(() => [
637
- c($, {
667
+ default: y(() => [
668
+ d(k, {
638
669
  "data-testid": "action-entity-edit",
639
- item: H(C.id)
670
+ item: H(K.id)
640
671
  }, null, 8, ["item"])
641
672
  ]),
642
673
  _: 2
643
674
  }, 1032, ["auth-function"]),
644
- c(e(se), {
645
- "auth-function": () => l.canDelete(C)
675
+ d(e(fe), {
676
+ "auth-function": () => l.canDelete(K)
646
677
  }, {
647
- default: v(() => [
648
- c($, {
678
+ default: y(() => [
679
+ d(k, {
649
680
  danger: "",
650
681
  "data-testid": "action-entity-delete",
651
682
  "has-divider": "",
652
- onClick: (n) => E(C)
683
+ onClick: (s) => $(K)
653
684
  }, {
654
- default: v(() => [
655
- ne(F(e(p)("actions.delete")), 1)
685
+ default: y(() => [
686
+ pe(P(e(f)("actions.delete")), 1)
656
687
  ]),
657
688
  _: 2
658
689
  }, 1032, ["onClick"])
@@ -662,40 +693,40 @@ const he = {
662
693
  ]),
663
694
  _: 1
664
695
  }, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers"]),
665
- c(e(qe), {
696
+ d(e(De), {
666
697
  "action-pending": te.value,
667
- description: e(p)("delete.description"),
668
- "entity-name": U.value && (U.value.prefix || U.value.id),
669
- "entity-type": e(De).Vault,
670
- error: z.value,
671
- title: e(p)("delete.title"),
698
+ description: e(f)("delete.description"),
699
+ "entity-name": M.value && (M.value.prefix || M.value.id),
700
+ "entity-type": e(We).Vault,
701
+ error: Z.value,
702
+ title: e(f)("delete.title"),
672
703
  visible: j.value,
673
- onCancel: L,
674
- onProceed: B
704
+ onCancel: J,
705
+ onProceed: _
675
706
  }, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
676
707
  ]);
677
708
  };
678
709
  }
679
- }), ge = (l, M) => {
680
- const f = l.__vccOpts || l;
681
- for (const [u, p] of M)
682
- f[u] = p;
683
- return f;
684
- }, Yt = /* @__PURE__ */ ge(ht, [["__scopeId", "data-v-6704960c"]]);
685
- var t = /* @__PURE__ */ ((l) => (l.AWS = "aws", l.GCP = "gcp", l.HCV = "hcv", l.ENV = "env", l.AZURE = "azure", l.KONNECT = "konnect", l))(t || {}), A = /* @__PURE__ */ ((l) => (l.TOKEN = "token", l.K8S = "kubernetes", l.APP_ROLE = "approle", l))(A || {});
686
- const _t = { class: "kong-ui-entities-vault-form" }, Vt = { class: "vault-form-provider-cards-container" }, kt = ["data-testid"], Ct = { class: "provider-item-title-container" }, wt = { class: "provider-item-title" }, St = { class: "provider-item-description" }, Et = {
710
+ }), ce = (l, I) => {
711
+ const c = l.__vccOpts || l;
712
+ for (const [n, f] of I)
713
+ c[n] = f;
714
+ return c;
715
+ }, ml = /* @__PURE__ */ ce(kt, [["__scopeId", "data-v-6704960c"]]);
716
+ var t = /* @__PURE__ */ ((l) => (l.AWS = "aws", l.GCP = "gcp", l.HCV = "hcv", l.ENV = "env", l.AZURE = "azure", l.KONNECT = "konnect", l))(t || {}), F = /* @__PURE__ */ ((l) => (l.TOKEN = "token", l.K8S = "kubernetes", l.APP_ROLE = "approle", l))(F || {});
717
+ const wt = { class: "kong-ui-entities-vault-form" }, Ct = { class: "vault-form-provider-cards-container" }, St = ["data-testid"], It = { class: "provider-item-title-container" }, xt = { class: "provider-item-title" }, Et = { class: "provider-item-description" }, At = {
687
718
  key: "kong-vault-config-fields",
688
719
  class: "vault-form-config-fields-container"
689
- }, xt = {
720
+ }, Rt = {
690
721
  key: 0,
691
722
  class: "vault-form-config-auth-method-container"
692
- }, It = {
723
+ }, Ut = {
693
724
  key: 1,
694
725
  class: "vault-form-config-auth-method-container"
695
- }, At = {
726
+ }, $t = {
696
727
  key: 2,
697
728
  class: "vault-form-config-auth-method-container"
698
- }, Rt = { key: 5 }, Ut = { class: "wrapper" }, Tt = { class: "item-50" }, $t = { class: "item-50" }, Ht = { class: "wrapper" }, Mt = { class: "item-100" }, Kt = /* @__PURE__ */ ce({
729
+ }, Tt = { key: 5 }, Kt = { class: "wrapper" }, Pt = { class: "item-50" }, Mt = { class: "item-50" }, Ht = { class: "wrapper" }, Ft = { class: "item-100" }, Nt = /* @__PURE__ */ ie({
699
730
  __name: "VaultForm",
700
731
  props: {
701
732
  /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
@@ -712,9 +743,9 @@ const _t = { class: "kong-ui-entities-vault-form" }, Vt = { class: "vault-form-p
712
743
  }
713
744
  },
714
745
  emits: ["update", "error", "loading"],
715
- setup(l, { emit: M }) {
716
- var C;
717
- const f = l, u = M, { i18nT: p, i18n: { t: a } } = he.useI18n(), w = Se(), { axiosInstance: S } = me((C = f.config) == null ? void 0 : C.axiosRequestConfig), { getMessageFromError: y } = We(), d = de({
746
+ setup(l, { emit: I }) {
747
+ var K;
748
+ const c = l, n = I, { i18nT: f, i18n: { t: o } } = ge.useI18n(), x = Ie(), { axiosInstance: C } = ve((K = c.config) == null ? void 0 : K.axiosRequestConfig), { getMessageFromError: b } = je(), p = _e({
718
749
  fields: {
719
750
  prefix: "",
720
751
  description: "",
@@ -722,40 +753,40 @@ const _t = { class: "kong-ui-entities-vault-form" }, Vt = { class: "vault-form-p
722
753
  },
723
754
  isReadonly: !1,
724
755
  errorMessage: ""
725
- }), k = de({
756
+ }), h = _e({
726
757
  prefix: "",
727
758
  description: "",
728
759
  tags: ""
729
- }), s = I(f.config.konnectConfigStoreAvailable ? t.KONNECT : t.ENV), K = I(null), O = I(), oe = V(() => [t.AWS, t.GCP, t.HCV, t.AZURE].includes(s.value)), Y = V(() => [
730
- ...f.config.konnectConfigStoreAvailable ? [{
731
- label: a("form.config.konnect.label"),
760
+ }), u = U(c.config.konnectConfigStoreAvailable ? t.KONNECT : t.ENV), O = U(null), D = U(), re = E(() => [t.AWS, t.GCP, t.HCV, t.AZURE].includes(u.value)), z = E(() => [
761
+ ...c.config.konnectConfigStoreAvailable ? [{
762
+ label: o("form.config.konnect.label"),
732
763
  value: t.KONNECT
733
764
  }] : [],
734
765
  {
735
- label: a("form.config.env.label"),
766
+ label: o("form.config.env.label"),
736
767
  value: t.ENV
737
768
  },
738
769
  {
739
- label: a("form.config.aws.label"),
770
+ label: o("form.config.aws.label"),
740
771
  value: t.AWS,
741
772
  disabled: !j.value
742
773
  },
743
774
  {
744
- label: a("form.config.gcp.label"),
775
+ label: o("form.config.gcp.label"),
745
776
  value: t.GCP,
746
777
  disabled: !j.value
747
778
  },
748
779
  {
749
- label: a("form.config.hcv.label"),
780
+ label: o("form.config.hcv.label"),
750
781
  value: t.HCV,
751
782
  disabled: !j.value
752
783
  },
753
- ...f.config.azureVaultProviderAvailable ? [{
754
- label: a("form.config.azure.label"),
784
+ ...c.config.azureVaultProviderAvailable ? [{
785
+ label: o("form.config.azure.label"),
755
786
  value: t.AZURE,
756
787
  disabled: !j.value
757
788
  }] : []
758
- ]), o = de({
789
+ ]), a = _e({
759
790
  [t.KONNECT]: {},
760
791
  [t.ENV]: {
761
792
  prefix: ""
@@ -776,7 +807,7 @@ const _t = { class: "kong-ui-entities-vault-form" }, Vt = { class: "vault-form-p
776
807
  mount: "secret",
777
808
  kv: "v1",
778
809
  namespace: "",
779
- auth_method: A.TOKEN,
810
+ auth_method: F.TOKEN,
780
811
  token: "",
781
812
  kube_role: "",
782
813
  kube_auth_path: "",
@@ -795,7 +826,7 @@ const _t = { class: "kong-ui-entities-vault-form" }, Vt = { class: "vault-form-p
795
826
  client_id: "",
796
827
  tenant_id: ""
797
828
  }
798
- }), Z = de({
829
+ }), Y = _e({
799
830
  [t.KONNECT]: {},
800
831
  [t.ENV]: {
801
832
  prefix: ""
@@ -816,7 +847,7 @@ const _t = { class: "kong-ui-entities-vault-form" }, Vt = { class: "vault-form-p
816
847
  mount: "secret",
817
848
  kv: "v1",
818
849
  namespace: "",
819
- auth_method: A.TOKEN,
850
+ auth_method: F.TOKEN,
820
851
  token: "",
821
852
  kube_role: "",
822
853
  kube_auth_path: "",
@@ -835,85 +866,85 @@ const _t = { class: "kong-ui-entities-vault-form" }, Vt = { class: "vault-form-p
835
866
  client_id: "",
836
867
  tenant_id: ""
837
868
  }
838
- }), X = [
839
- { label: `${a("form.config.aws.fields.region.locations.us-east-1.location")} (us-east-1)`, value: "us-east-1" },
840
- { label: `${a("form.config.aws.fields.region.locations.us-east-2.location")} (us-east-2)`, value: "us-east-2" },
841
- { label: `${a("form.config.aws.fields.region.locations.us-west-1.location")} (us-west-1)`, value: "us-west-1" },
842
- { label: `${a("form.config.aws.fields.region.locations.us-west-2.location")} (us-west-2)`, value: "us-west-2" },
843
- { label: `${a("form.config.aws.fields.region.locations.af-south-1.location")} (af-south-1)`, value: "af-south-1" },
844
- { label: `${a("form.config.aws.fields.region.locations.ap-east-1.location")} (ap-east-1)`, value: "ap-east-1" },
845
- { label: `${a("form.config.aws.fields.region.locations.ap-southeast-3.location")} (ap-southeast-3)`, value: "ap-southeast-3" },
846
- { label: `${a("form.config.aws.fields.region.locations.ap-south-1.location")} (ap-south-1)`, value: "ap-south-1" },
847
- { label: `${a("form.config.aws.fields.region.locations.ap-northeast-1.location")} (ap-northeast-1)`, value: "ap-northeast-1" },
848
- { label: `${a("form.config.aws.fields.region.locations.ap-northeast-2.location")} (ap-northeast-2)`, value: "ap-northeast-2" },
849
- { label: `${a("form.config.aws.fields.region.locations.ap-northeast-3.location")} (ap-northeast-3)`, value: "ap-northeast-3" },
850
- { label: `${a("form.config.aws.fields.region.locations.ap-southeast-1.location")} (ap-southeast-1)`, value: "ap-southeast-1" },
851
- { label: `${a("form.config.aws.fields.region.locations.ap-southeast-2.location")} (ap-southeast-2)`, value: "ap-southeast-2" },
852
- { label: `${a("form.config.aws.fields.region.locations.ca-central-1.location")} (ca-central-1)`, value: "ca-central-1" },
853
- { label: `${a("form.config.aws.fields.region.locations.eu-central-1.location")} (eu-central-1)`, value: "eu-central-1" },
854
- { label: `${a("form.config.aws.fields.region.locations.eu-west-1.location")} (eu-west-1)`, value: "eu-west-1" },
855
- { label: `${a("form.config.aws.fields.region.locations.eu-west-2.location")} (eu-west-2)`, value: "eu-west-2" },
856
- { label: `${a("form.config.aws.fields.region.locations.eu-west-3.location")} (eu-west-3)`, value: "eu-west-3" },
857
- { label: `${a("form.config.aws.fields.region.locations.eu-south-1.location")} (eu-south-1)`, value: "eu-south-1" },
858
- { label: `${a("form.config.aws.fields.region.locations.eu-north-1.location")} (eu-north-1)`, value: "eu-north-1" },
859
- { label: `${a("form.config.aws.fields.region.locations.me-south-1.location")} (me-south-1)`, value: "me-south-1" },
860
- { label: `${a("form.config.aws.fields.region.locations.sa-east-1.location")} (sa-east-1)`, value: "sa-east-1" },
861
- { label: `${a("form.config.aws.fields.region.locations.us-gov-east-1.location")} (us-gov-east-1)`, value: "us-gov-east-1" },
862
- { label: `${a("form.config.aws.fields.region.locations.us-gov-west-1.location")} (us-gov-west-1)`, value: "us-gov-west-1" }
863
- ], q = [{ label: "secrets", value: "secrets" }], ee = [{ label: "http", value: "http" }, { label: "https", value: "https" }], J = [{ label: "v1", value: "v1" }, { label: "v2", value: "v2" }], m = V(() => f.vaultId ? fe.Edit : fe.Create), H = V(() => {
864
- var n, i;
865
- return (i = pe.form[(n = f.config) == null ? void 0 : n.app]) == null ? void 0 : i.edit;
866
- }), U = V(() => m.value === fe.Edit && f.config.app === "kongManager"), j = V(() => f.config.app === "konnect" || tt({
867
- gatewayInfo: f.config.gatewayInfo,
869
+ }), ee = [
870
+ { label: `${o("form.config.aws.fields.region.locations.us-east-1.location")} (us-east-1)`, value: "us-east-1" },
871
+ { label: `${o("form.config.aws.fields.region.locations.us-east-2.location")} (us-east-2)`, value: "us-east-2" },
872
+ { label: `${o("form.config.aws.fields.region.locations.us-west-1.location")} (us-west-1)`, value: "us-west-1" },
873
+ { label: `${o("form.config.aws.fields.region.locations.us-west-2.location")} (us-west-2)`, value: "us-west-2" },
874
+ { label: `${o("form.config.aws.fields.region.locations.af-south-1.location")} (af-south-1)`, value: "af-south-1" },
875
+ { label: `${o("form.config.aws.fields.region.locations.ap-east-1.location")} (ap-east-1)`, value: "ap-east-1" },
876
+ { label: `${o("form.config.aws.fields.region.locations.ap-southeast-3.location")} (ap-southeast-3)`, value: "ap-southeast-3" },
877
+ { label: `${o("form.config.aws.fields.region.locations.ap-south-1.location")} (ap-south-1)`, value: "ap-south-1" },
878
+ { label: `${o("form.config.aws.fields.region.locations.ap-northeast-1.location")} (ap-northeast-1)`, value: "ap-northeast-1" },
879
+ { label: `${o("form.config.aws.fields.region.locations.ap-northeast-2.location")} (ap-northeast-2)`, value: "ap-northeast-2" },
880
+ { label: `${o("form.config.aws.fields.region.locations.ap-northeast-3.location")} (ap-northeast-3)`, value: "ap-northeast-3" },
881
+ { label: `${o("form.config.aws.fields.region.locations.ap-southeast-1.location")} (ap-southeast-1)`, value: "ap-southeast-1" },
882
+ { label: `${o("form.config.aws.fields.region.locations.ap-southeast-2.location")} (ap-southeast-2)`, value: "ap-southeast-2" },
883
+ { label: `${o("form.config.aws.fields.region.locations.ca-central-1.location")} (ca-central-1)`, value: "ca-central-1" },
884
+ { label: `${o("form.config.aws.fields.region.locations.eu-central-1.location")} (eu-central-1)`, value: "eu-central-1" },
885
+ { label: `${o("form.config.aws.fields.region.locations.eu-west-1.location")} (eu-west-1)`, value: "eu-west-1" },
886
+ { label: `${o("form.config.aws.fields.region.locations.eu-west-2.location")} (eu-west-2)`, value: "eu-west-2" },
887
+ { label: `${o("form.config.aws.fields.region.locations.eu-west-3.location")} (eu-west-3)`, value: "eu-west-3" },
888
+ { label: `${o("form.config.aws.fields.region.locations.eu-south-1.location")} (eu-south-1)`, value: "eu-south-1" },
889
+ { label: `${o("form.config.aws.fields.region.locations.eu-north-1.location")} (eu-north-1)`, value: "eu-north-1" },
890
+ { label: `${o("form.config.aws.fields.region.locations.me-south-1.location")} (me-south-1)`, value: "me-south-1" },
891
+ { label: `${o("form.config.aws.fields.region.locations.sa-east-1.location")} (sa-east-1)`, value: "sa-east-1" },
892
+ { label: `${o("form.config.aws.fields.region.locations.us-gov-east-1.location")} (us-gov-east-1)`, value: "us-gov-east-1" },
893
+ { label: `${o("form.config.aws.fields.region.locations.us-gov-west-1.location")} (us-gov-west-1)`, value: "us-gov-west-1" }
894
+ ], W = [{ label: "secrets", value: "secrets" }], G = [{ label: "http", value: "http" }, { label: "https", value: "https" }], X = [{ label: "v1", value: "v1" }, { label: "v2", value: "v2" }], g = E(() => c.vaultId ? be.Edit : be.Create), H = E(() => {
895
+ var s, r;
896
+ return (r = se.form[(s = c.config) == null ? void 0 : s.app]) == null ? void 0 : r.edit;
897
+ }), M = E(() => g.value === be.Edit && c.config.app === "kongManager"), j = E(() => c.config.app === "konnect" || ot({
898
+ gatewayInfo: c.config.gatewayInfo,
868
899
  // vault name can only be `env` in Gateway Community Edition
869
900
  supportedRange: {
870
901
  enterprise: []
871
902
  }
872
903
  })), te = () => {
873
- var n;
874
- w.push(((n = f.config) == null ? void 0 : n.cancelRoute) || { name: "vault-list" });
875
- }, z = (n) => {
876
- u("loading", n);
877
- }, ue = (n) => {
878
- u("error", n);
879
- }, E = (n) => {
880
- switch (n) {
904
+ var s;
905
+ x.push(((s = c.config) == null ? void 0 : s.cancelRoute) || { name: "vault-list" });
906
+ }, Z = (s) => {
907
+ n("loading", s);
908
+ }, ne = (s) => {
909
+ n("error", s);
910
+ }, $ = (s) => {
911
+ switch (s) {
881
912
  case t.KONNECT:
882
- return Xe;
913
+ return tt;
883
914
  case t.ENV:
884
- return Ye;
915
+ return et;
885
916
  case t.AWS:
886
- return Qe;
917
+ return Xe;
887
918
  case t.GCP:
888
- return Je;
919
+ return Ye;
889
920
  case t.HCV:
890
- return Ze;
921
+ return Qe;
891
922
  case t.AZURE:
892
- return Ge;
923
+ return Je;
893
924
  }
894
- }, L = (n) => {
895
- switch (n) {
925
+ }, J = (s) => {
926
+ switch (s) {
896
927
  case t.KONNECT:
897
- return a("form.config.konnect.description");
928
+ return o("form.config.konnect.description");
898
929
  case t.ENV:
899
- return a("form.config.env.description");
930
+ return o("form.config.env.description");
900
931
  case t.AWS:
901
- return a("form.config.aws.description");
932
+ return o("form.config.aws.description");
902
933
  case t.GCP:
903
- return a("form.config.gcp.description");
934
+ return o("form.config.gcp.description");
904
935
  case t.HCV:
905
- return a("form.config.hcv.description");
936
+ return o("form.config.hcv.description");
906
937
  case t.AZURE:
907
- return a("form.config.azure.description");
938
+ return o("form.config.azure.description");
908
939
  }
909
- }, G = (n) => {
910
- var D, b, be, ie, re, r;
911
- d.fields.prefix = ((D = n == null ? void 0 : n.item) == null ? void 0 : D.prefix) || (n == null ? void 0 : n.prefix) || "", d.fields.description = ((b = n == null ? void 0 : n.item) == null ? void 0 : b.description) || (n == null ? void 0 : n.description) || "";
912
- const i = ((be = n == null ? void 0 : n.item) == null ? void 0 : be.tags) || (n == null ? void 0 : n.tags) || [];
913
- d.fields.tags = (i == null ? void 0 : i.join(", ")) || "", Object.assign(k, d.fields);
914
- const P = ((ie = n == null ? void 0 : n.item) == null ? void 0 : ie.config) || (n == null ? void 0 : n.config) || null;
915
- P && (Object.keys(P).length || (n == null ? void 0 : n.name) === t.KONNECT) ? (s.value = ((re = n == null ? void 0 : n.item) == null ? void 0 : re.name) || (n == null ? void 0 : n.name) || "", K.value = s.value, O.value = ((r = n == null ? void 0 : n.config) == null ? void 0 : r.config_store_id) || void 0, Object.assign(o[s.value], P), Object.assign(Z[s.value], P)) : d.errorMessage = "Error loading vault config";
916
- }, B = V(() => s.value === t.HCV ? !Object.keys(o[t.HCV]).filter((n) => [
940
+ }, B = (s) => {
941
+ var Q, S, ye, ue, de, i;
942
+ p.fields.prefix = ((Q = s == null ? void 0 : s.item) == null ? void 0 : Q.prefix) || (s == null ? void 0 : s.prefix) || "", p.fields.description = ((S = s == null ? void 0 : s.item) == null ? void 0 : S.description) || (s == null ? void 0 : s.description) || "";
943
+ const r = ((ye = s == null ? void 0 : s.item) == null ? void 0 : ye.tags) || (s == null ? void 0 : s.tags) || [];
944
+ p.fields.tags = (r == null ? void 0 : r.join(", ")) || "", Object.assign(h, p.fields);
945
+ const L = ((ue = s == null ? void 0 : s.item) == null ? void 0 : ue.config) || (s == null ? void 0 : s.config) || null;
946
+ L && (Object.keys(L).length || (s == null ? void 0 : s.name) === t.KONNECT) ? (u.value = ((de = s == null ? void 0 : s.item) == null ? void 0 : de.name) || (s == null ? void 0 : s.name) || "", O.value = u.value, D.value = ((i = s == null ? void 0 : s.config) == null ? void 0 : i.config_store_id) || void 0, Object.assign(a[u.value], L), Object.assign(Y[u.value], L)) : p.errorMessage = "Error loading vault config";
947
+ }, _ = E(() => u.value === t.HCV ? !Object.keys(a[t.HCV]).filter((s) => [
917
948
  "namespace",
918
949
  "ttl",
919
950
  "neg_ttl",
@@ -922,148 +953,148 @@ const _t = { class: "kong-ui-entities-vault-form" }, Vt = { class: "vault-form-p
922
953
  "approle_auth_path",
923
954
  "approle_secret_id",
924
955
  "approle_secret_id_file"
925
- ].includes(n) || o[t.HCV].auth_method !== A.K8S && (n === "kube_role" || n === "kube_api_token_file") || o[t.HCV].auth_method !== A.TOKEN && n === "token" || o[t.HCV].auth_method !== A.APP_ROLE && (n === "approle_role_id" || n === "approle_response_wrapping") || o[t.HCV].auth_method === A.APP_ROLE && n === "approle_response_wrapping" && typeof o[s.value][n] == "boolean" ? !1 : !o[s.value][n]).length : s.value === t.AZURE ? !Object.keys(o[t.AZURE]).filter((n) => ["client_id", "tenant_id", "ttl", "neg_ttl", "resurrect_ttl"].includes(n) ? !1 : !o[s.value][n]).length : s.value === t.AWS ? !Object.keys(o[t.AWS]).filter((n) => ["endpoint_url", "assume_role_arn", "ttl", "neg_ttl", "resurrect_ttl", "sts_endpoint_url"].includes(n) ? !1 : !o[s.value][n]).length : !Object.keys(o[s.value]).filter((n) => ["ttl", "neg_ttl", "resurrect_ttl"].includes(n) ? !1 : !o[s.value][n]).length), T = V(() => !!d.fields.prefix && B.value), ve = V(() => JSON.stringify(d.fields) !== JSON.stringify(k) || s.value !== K.value || JSON.stringify(o[s.value]) !== JSON.stringify(Z[s.value])), g = V(() => {
926
- var i, P;
927
- let n = `${f.config.apiBaseUrl}${pe.form[f.config.app][m.value]}`;
928
- return f.config.app === "konnect" ? n = n.replace(/{controlPlaneId}/gi, ((i = f.config) == null ? void 0 : i.controlPlaneId) || "") : f.config.app === "kongManager" && (n = n.replace(/\/{workspace}/gi, (P = f.config) != null && P.workspace ? `/${f.config.workspace}` : "")), n = n.replace(/{id}/gi, f.vaultId), n;
929
- }), h = V(() => {
930
- var ie, re;
931
- const n = {
932
- protocol: o[t.HCV].protocol,
933
- host: o[t.HCV].host,
934
- port: parseInt(o[t.HCV].port.toString()),
935
- mount: o[t.HCV].mount,
936
- kv: o[t.HCV].kv,
937
- namespace: o[t.HCV].namespace || null,
938
- auth_method: o[t.HCV].auth_method,
939
- ...o[t.HCV].auth_method === A.TOKEN && { token: o[t.HCV].token },
956
+ ].includes(s) || a[t.HCV].auth_method !== F.K8S && (s === "kube_role" || s === "kube_api_token_file") || a[t.HCV].auth_method !== F.TOKEN && s === "token" || a[t.HCV].auth_method !== F.APP_ROLE && (s === "approle_role_id" || s === "approle_response_wrapping") || a[t.HCV].auth_method === F.APP_ROLE && s === "approle_response_wrapping" && typeof a[u.value][s] == "boolean" ? !1 : !a[u.value][s]).length : u.value === t.AZURE ? !Object.keys(a[t.AZURE]).filter((s) => ["client_id", "tenant_id", "ttl", "neg_ttl", "resurrect_ttl"].includes(s) ? !1 : !a[u.value][s]).length : u.value === t.AWS ? !Object.keys(a[t.AWS]).filter((s) => ["endpoint_url", "assume_role_arn", "ttl", "neg_ttl", "resurrect_ttl", "sts_endpoint_url"].includes(s) ? !1 : !a[u.value][s]).length : !Object.keys(a[u.value]).filter((s) => ["ttl", "neg_ttl", "resurrect_ttl"].includes(s) ? !1 : !a[u.value][s]).length), v = E(() => !!p.fields.prefix && _.value), T = E(() => JSON.stringify(p.fields) !== JSON.stringify(h) || u.value !== O.value || JSON.stringify(a[u.value]) !== JSON.stringify(Y[u.value])), m = E(() => {
957
+ var r, L;
958
+ let s = `${c.config.apiBaseUrl}${se.form[c.config.app][g.value]}`;
959
+ return c.config.app === "konnect" ? s = s.replace(/{controlPlaneId}/gi, ((r = c.config) == null ? void 0 : r.controlPlaneId) || "") : c.config.app === "kongManager" && (s = s.replace(/\/{workspace}/gi, (L = c.config) != null && L.workspace ? `/${c.config.workspace}` : "")), s = s.replace(/{id}/gi, c.vaultId), s;
960
+ }), w = E(() => {
961
+ var ue, de;
962
+ const s = {
963
+ protocol: a[t.HCV].protocol,
964
+ host: a[t.HCV].host,
965
+ port: parseInt(a[t.HCV].port.toString()),
966
+ mount: a[t.HCV].mount,
967
+ kv: a[t.HCV].kv,
968
+ namespace: a[t.HCV].namespace || null,
969
+ auth_method: a[t.HCV].auth_method,
970
+ ...a[t.HCV].auth_method === F.TOKEN && { token: a[t.HCV].token },
940
971
  // For Kong Admin API, when auth_method is kubernetes, token must be in the request body and its value has to be null
941
- ...o[t.HCV].auth_method === A.K8S && {
942
- kube_role: o[t.HCV].kube_role,
943
- kube_auth_path: o[t.HCV].kube_auth_path || void 0,
944
- kube_api_token_file: o[t.HCV].kube_api_token_file,
972
+ ...a[t.HCV].auth_method === F.K8S && {
973
+ kube_role: a[t.HCV].kube_role,
974
+ kube_auth_path: a[t.HCV].kube_auth_path || void 0,
975
+ kube_api_token_file: a[t.HCV].kube_api_token_file,
945
976
  token: null
946
977
  },
947
- ...o[t.HCV].auth_method === A.APP_ROLE && {
948
- approle_auth_path: o[t.HCV].approle_auth_path || void 0,
949
- approle_role_id: o[t.HCV].approle_role_id,
950
- approle_secret_id: o[t.HCV].approle_secret_id || void 0,
951
- approle_secret_id_file: o[t.HCV].approle_secret_id_file || void 0,
952
- approle_response_wrapping: o[t.HCV].approle_response_wrapping ?? !1
978
+ ...a[t.HCV].auth_method === F.APP_ROLE && {
979
+ approle_auth_path: a[t.HCV].approle_auth_path || void 0,
980
+ approle_role_id: a[t.HCV].approle_role_id,
981
+ approle_secret_id: a[t.HCV].approle_secret_id || void 0,
982
+ approle_secret_id_file: a[t.HCV].approle_secret_id_file || void 0,
983
+ approle_response_wrapping: a[t.HCV].approle_response_wrapping ?? !1
953
984
  }
954
- }, i = {
955
- ...o[s.value],
956
- client_id: o[s.value].client_id || null,
957
- tenant_id: o[s.value].tenant_id || null
958
- }, P = {
959
- ...o[s.value],
960
- endpoint_url: o[s.value].endpoint_url || null,
961
- assume_role_arn: o[s.value].assume_role_arn || null,
962
- ...f.config.awsStsEndpointUrlAvailable ? { sts_endpoint_url: o[s.value].sts_endpoint_url || null } : {}
985
+ }, r = {
986
+ ...a[u.value],
987
+ client_id: a[u.value].client_id || null,
988
+ tenant_id: a[u.value].tenant_id || null
989
+ }, L = {
990
+ ...a[u.value],
991
+ endpoint_url: a[u.value].endpoint_url || null,
992
+ assume_role_arn: a[u.value].assume_role_arn || null,
993
+ ...c.config.awsStsEndpointUrlAvailable ? { sts_endpoint_url: a[u.value].sts_endpoint_url || null } : {}
963
994
  };
964
- let D = o[s.value];
965
- s.value === t.HCV ? D = n : s.value === t.AZURE ? D = i : s.value === t.AWS && (D = P);
966
- let b = {};
967
- if (![t.KONNECT, t.ENV].includes(s.value)) {
968
- const r = o[s.value], xe = r.ttl, Ie = r.neg_ttl, Ae = r.resurrect_ttl;
969
- b = {
970
- ttl: xe ? parseInt(xe.toString(), 10) : null,
971
- neg_ttl: Ie ? parseInt(Ie.toString(), 10) : null,
972
- resurrect_ttl: Ae ? parseInt(Ae.toString(), 10) : null
995
+ let Q = a[u.value];
996
+ u.value === t.HCV ? Q = s : u.value === t.AZURE ? Q = r : u.value === t.AWS && (Q = L);
997
+ let S = {};
998
+ if (![t.KONNECT, t.ENV].includes(u.value)) {
999
+ const i = a[u.value], Ee = i.ttl, Ae = i.neg_ttl, Re = i.resurrect_ttl;
1000
+ S = {
1001
+ ttl: Ee ? parseInt(Ee.toString(), 10) : null,
1002
+ neg_ttl: Ae ? parseInt(Ae.toString(), 10) : null,
1003
+ resurrect_ttl: Re ? parseInt(Re.toString(), 10) : null
973
1004
  };
974
1005
  }
975
1006
  return {
976
- prefix: d.fields.prefix,
977
- description: d.fields.description || null,
978
- tags: (re = (ie = d.fields.tags.split(",")) == null ? void 0 : ie.map((r) => String(r || "").trim())) == null ? void 0 : re.filter((r) => r !== ""),
979
- name: s.value,
1007
+ prefix: p.fields.prefix,
1008
+ description: p.fields.description || null,
1009
+ tags: (de = (ue = p.fields.tags.split(",")) == null ? void 0 : ue.map((i) => String(i || "").trim())) == null ? void 0 : de.filter((i) => i !== ""),
1010
+ name: u.value,
980
1011
  config: {
981
- ...D,
982
- ...b
1012
+ ...Q,
1013
+ ...S
983
1014
  }
984
1015
  };
985
- }), _ = V(() => ({
986
- ...h.value,
1016
+ }), V = E(() => ({
1017
+ ...w.value,
987
1018
  config: {
988
- ...h.value.config,
989
- config_store_id: O.value
1019
+ ...w.value.config,
1020
+ config_store_id: D.value
990
1021
  }
991
- })), $ = async () => {
992
- var n;
1022
+ })), k = async () => {
1023
+ var s;
993
1024
  try {
994
- d.isReadonly = !0;
995
- const i = `${f.config.apiBaseUrl}${pe.form.konnect.createConfigStore}`.replace(/{controlPlaneId}/gi, ((n = f.config) == null ? void 0 : n.controlPlaneId) || ""), P = await S.post(i);
996
- return P == null ? void 0 : P.data.id;
997
- } catch (i) {
998
- d.errorMessage = y(i), u("error", i);
1025
+ p.isReadonly = !0;
1026
+ const r = `${c.config.apiBaseUrl}${se.form.konnect.createConfigStore}`.replace(/{controlPlaneId}/gi, ((s = c.config) == null ? void 0 : s.controlPlaneId) || ""), L = await C.post(r);
1027
+ return L == null ? void 0 : L.data.id;
1028
+ } catch (r) {
1029
+ p.errorMessage = b(r), n("error", r);
999
1030
  } finally {
1000
- d.isReadonly = !1;
1031
+ p.isReadonly = !1;
1001
1032
  }
1002
1033
  }, le = async () => {
1003
- var n;
1034
+ var s;
1004
1035
  try {
1005
- d.isReadonly = !0;
1006
- let i;
1007
- m.value === "create" ? s.value === t.KONNECT ? (O.value = await $(), i = await S.post(g.value, _.value)) : i = await S.post(g.value, h.value) : m.value === "edit" && (s.value === t.KONNECT && !O.value ? (O.value = await $(), i = await S.put(g.value, _.value)) : i = ((n = f.config) == null ? void 0 : n.app) === "konnect" ? await S.put(g.value, _.value) : await S.patch(g.value, h.value)), G(i == null ? void 0 : i.data), u("update", i == null ? void 0 : i.data);
1008
- } catch (i) {
1009
- d.errorMessage = y(i), u("error", i);
1036
+ p.isReadonly = !0;
1037
+ let r;
1038
+ g.value === "create" ? u.value === t.KONNECT ? (D.value = await k(), r = await C.post(m.value, V.value)) : r = await C.post(m.value, w.value) : g.value === "edit" && (u.value === t.KONNECT && !D.value ? (D.value = await k(), r = await C.put(m.value, V.value)) : r = ((s = c.config) == null ? void 0 : s.app) === "konnect" ? await C.put(m.value, V.value) : await C.patch(m.value, w.value)), B(r == null ? void 0 : r.data), n("update", r == null ? void 0 : r.data);
1039
+ } catch (r) {
1040
+ p.errorMessage = b(r), n("error", r);
1010
1041
  } finally {
1011
- d.isReadonly = !1;
1042
+ p.isReadonly = !1;
1012
1043
  }
1013
1044
  };
1014
- return (n, i) => {
1015
- const P = W("KTooltip"), D = W("KSelect"), b = W("KInput"), be = W("KCheckbox"), ie = W("KCollapse"), re = W("KTextArea");
1016
- return x(), N("div", _t, [
1017
- c(e(je), {
1018
- "can-submit": T.value && ve.value,
1045
+ return (s, r) => {
1046
+ const L = N("KTooltip"), Q = N("KSelect"), S = N("KInput"), ye = N("KCheckbox"), ue = N("KCollapse"), de = N("KTextArea");
1047
+ return A(), q("div", wt, [
1048
+ d(e(Be), {
1049
+ "can-submit": v.value && T.value,
1019
1050
  config: l.config,
1020
1051
  "edit-id": l.vaultId,
1021
- "entity-type": e(Ee).Vault,
1022
- "error-message": d.errorMessage,
1052
+ "entity-type": e(xe).Vault,
1053
+ "error-message": p.errorMessage,
1023
1054
  "fetch-url": H.value,
1024
- "form-fields": h.value,
1025
- "is-readonly": d.isReadonly,
1055
+ "form-fields": w.value,
1056
+ "is-readonly": p.isReadonly,
1026
1057
  onCancel: te,
1027
- "onFetch:error": ue,
1028
- "onFetch:success": G,
1029
- onLoading: z,
1058
+ "onFetch:error": ne,
1059
+ "onFetch:success": B,
1060
+ onLoading: Z,
1030
1061
  onSubmit: le
1031
1062
  }, {
1032
- default: v(() => [
1033
- c(e(we), {
1034
- description: e(a)("form.sections.config.description"),
1035
- title: e(a)("form.sections.config.title")
1063
+ default: y(() => [
1064
+ d(e(Se), {
1065
+ description: e(o)("form.sections.config.description"),
1066
+ title: e(o)("form.sections.config.title")
1036
1067
  }, {
1037
- default: v(() => [
1038
- R("div", Vt, [
1039
- c(D, {
1040
- modelValue: s.value,
1041
- "onUpdate:modelValue": i[0] || (i[0] = (r) => s.value = r),
1068
+ default: y(() => [
1069
+ R("div", Ct, [
1070
+ d(Q, {
1071
+ modelValue: u.value,
1072
+ "onUpdate:modelValue": r[0] || (r[0] = (i) => u.value = i),
1042
1073
  "data-testid": "provider-select",
1043
- disabled: U.value,
1074
+ disabled: M.value,
1044
1075
  "dropdown-max-height": "500",
1045
- items: Y.value
1076
+ items: z.value
1046
1077
  }, {
1047
- "selected-item-template": v(({ item: r }) => [
1048
- (x(), ae(Re(E(r.value)))),
1049
- ne(" " + F(r == null ? void 0 : r.label), 1)
1078
+ "selected-item-template": y(({ item: i }) => [
1079
+ (A(), oe(Ue($(i.value)))),
1080
+ pe(" " + P(i == null ? void 0 : i.label), 1)
1050
1081
  ]),
1051
- "item-template": v(({ item: r }) => [
1052
- c(P, {
1082
+ "item-template": y(({ item: i }) => [
1083
+ d(L, {
1053
1084
  placement: "top",
1054
- text: r.disabled ? e(a)("form.unavailable") : ""
1085
+ text: i.disabled ? e(o)("form.unavailable") : ""
1055
1086
  }, {
1056
- default: v(() => [
1087
+ default: y(() => [
1057
1088
  R("div", {
1058
1089
  class: "provider-item",
1059
- "data-testid": `vault-form-provider-${r.value}`
1090
+ "data-testid": `vault-form-provider-${i.value}`
1060
1091
  }, [
1061
- (x(), ae(Re(E(r.value)))),
1062
- R("div", Ct, [
1063
- R("span", wt, F(r == null ? void 0 : r.label), 1),
1064
- R("span", St, F(L(r.value)), 1)
1092
+ (A(), oe(Ue($(i.value)))),
1093
+ R("div", It, [
1094
+ R("span", xt, P(i == null ? void 0 : i.label), 1),
1095
+ R("span", Et, P(J(i.value)), 1)
1065
1096
  ])
1066
- ], 8, kt)
1097
+ ], 8, St)
1067
1098
  ]),
1068
1099
  _: 2
1069
1100
  }, 1032, ["text"])
@@ -1071,407 +1102,407 @@ const _t = { class: "kong-ui-entities-vault-form" }, Vt = { class: "vault-form-p
1071
1102
  _: 1
1072
1103
  }, 8, ["modelValue", "disabled", "items"])
1073
1104
  ]),
1074
- c(ze, { name: "appear" }, {
1075
- default: v(() => [
1076
- s.value === e(t).ENV ? (x(), N("div", Et, [
1077
- c(b, {
1078
- modelValue: o[e(t).ENV].prefix,
1079
- "onUpdate:modelValue": i[1] || (i[1] = (r) => o[e(t).ENV].prefix = r),
1105
+ d(ze, { name: "appear" }, {
1106
+ default: y(() => [
1107
+ u.value === e(t).ENV ? (A(), q("div", At, [
1108
+ d(S, {
1109
+ modelValue: a[e(t).ENV].prefix,
1110
+ "onUpdate:modelValue": r[1] || (r[1] = (i) => a[e(t).ENV].prefix = i),
1080
1111
  modelModifiers: { trim: !0 },
1081
1112
  autocomplete: "off",
1082
1113
  "data-testid": "vault-form-config-kong-prefix",
1083
- "is-readonly": d.isReadonly,
1084
- label: e(a)("form.config.env.fields.prefix.label"),
1114
+ "is-readonly": p.isReadonly,
1115
+ label: e(o)("form.config.env.fields.prefix.label"),
1085
1116
  "label-attributes": {
1086
- info: e(a)("form.config.env.fields.prefix.tooltip"),
1117
+ info: e(o)("form.config.env.fields.prefix.tooltip"),
1087
1118
  tooltipAttributes: { maxWidth: "400" }
1088
1119
  },
1089
- placeholder: e(a)("form.config.env.fields.prefix.placeholder"),
1120
+ placeholder: e(o)("form.config.env.fields.prefix.placeholder"),
1090
1121
  required: "",
1091
1122
  type: "text"
1092
1123
  }, null, 8, ["modelValue", "is-readonly", "label", "label-attributes", "placeholder"])
1093
- ])) : Q("", !0),
1094
- s.value === e(t).AWS ? (x(), N("div", {
1124
+ ])) : ae("", !0),
1125
+ u.value === e(t).AWS ? (A(), q("div", {
1095
1126
  key: `${e(t).AWS}-vault-config-fields`,
1096
1127
  class: "vault-form-config-fields-container"
1097
1128
  }, [
1098
- c(D, {
1099
- modelValue: o[e(t).AWS].region,
1100
- "onUpdate:modelValue": i[2] || (i[2] = (r) => o[e(t).AWS].region = r),
1129
+ d(Q, {
1130
+ modelValue: a[e(t).AWS].region,
1131
+ "onUpdate:modelValue": r[2] || (r[2] = (i) => a[e(t).AWS].region = i),
1101
1132
  "data-testid": "vault-form-config-aws-region",
1102
- items: X,
1103
- label: e(a)("form.config.aws.fields.region.label"),
1104
- "label-attributes": { info: e(a)("form.config.aws.fields.region.tooltip") },
1105
- placeholder: e(a)("form.config.aws.fields.region.placeholder"),
1106
- readonly: d.isReadonly,
1133
+ items: ee,
1134
+ label: e(o)("form.config.aws.fields.region.label"),
1135
+ "label-attributes": { info: e(o)("form.config.aws.fields.region.tooltip") },
1136
+ placeholder: e(o)("form.config.aws.fields.region.placeholder"),
1137
+ readonly: p.isReadonly,
1107
1138
  required: "",
1108
1139
  width: "100%"
1109
1140
  }, null, 8, ["modelValue", "label", "label-attributes", "placeholder", "readonly"]),
1110
- c(b, {
1111
- modelValue: o[e(t).AWS].endpoint_url,
1112
- "onUpdate:modelValue": i[3] || (i[3] = (r) => o[e(t).AWS].endpoint_url = r),
1141
+ d(S, {
1142
+ modelValue: a[e(t).AWS].endpoint_url,
1143
+ "onUpdate:modelValue": r[3] || (r[3] = (i) => a[e(t).AWS].endpoint_url = i),
1113
1144
  modelModifiers: { trim: !0 },
1114
1145
  autocomplete: "off",
1115
1146
  "data-testid": "vault-form-config-aws-endpoint_url",
1116
- "is-readonly": d.isReadonly,
1117
- label: e(a)("form.config.aws.fields.endpoint_url.label"),
1147
+ "is-readonly": p.isReadonly,
1148
+ label: e(o)("form.config.aws.fields.endpoint_url.label"),
1118
1149
  "label-attributes": {
1119
- info: e(a)("form.config.aws.fields.endpoint_url.tooltip"),
1150
+ info: e(o)("form.config.aws.fields.endpoint_url.tooltip"),
1120
1151
  tooltipAttributes: { maxWidth: "400" }
1121
1152
  },
1122
1153
  type: "text"
1123
1154
  }, null, 8, ["modelValue", "is-readonly", "label", "label-attributes"]),
1124
- c(b, {
1125
- modelValue: o[e(t).AWS].assume_role_arn,
1126
- "onUpdate:modelValue": i[4] || (i[4] = (r) => o[e(t).AWS].assume_role_arn = r),
1155
+ d(S, {
1156
+ modelValue: a[e(t).AWS].assume_role_arn,
1157
+ "onUpdate:modelValue": r[4] || (r[4] = (i) => a[e(t).AWS].assume_role_arn = i),
1127
1158
  modelModifiers: { trim: !0 },
1128
1159
  autocomplete: "off",
1129
1160
  "data-testid": "vault-form-config-aws-assume_role_arn",
1130
- "is-readonly": d.isReadonly,
1131
- label: e(a)("form.config.aws.fields.assume_role_arn.label"),
1161
+ "is-readonly": p.isReadonly,
1162
+ label: e(o)("form.config.aws.fields.assume_role_arn.label"),
1132
1163
  "label-attributes": {
1133
- info: e(a)("form.config.aws.fields.assume_role_arn.tooltip"),
1164
+ info: e(o)("form.config.aws.fields.assume_role_arn.tooltip"),
1134
1165
  tooltipAttributes: { maxWidth: "400" }
1135
1166
  },
1136
1167
  type: "text"
1137
1168
  }, null, 8, ["modelValue", "is-readonly", "label", "label-attributes"]),
1138
- c(b, {
1139
- modelValue: o[e(t).AWS].role_session_name,
1140
- "onUpdate:modelValue": i[5] || (i[5] = (r) => o[e(t).AWS].role_session_name = r),
1169
+ d(S, {
1170
+ modelValue: a[e(t).AWS].role_session_name,
1171
+ "onUpdate:modelValue": r[5] || (r[5] = (i) => a[e(t).AWS].role_session_name = i),
1141
1172
  modelModifiers: { trim: !0 },
1142
1173
  autocomplete: "off",
1143
1174
  "data-testid": "vault-form-config-aws-role_session_name",
1144
- "is-readonly": d.isReadonly,
1145
- label: e(a)("form.config.aws.fields.role_session_name.label"),
1175
+ "is-readonly": p.isReadonly,
1176
+ label: e(o)("form.config.aws.fields.role_session_name.label"),
1146
1177
  "label-attributes": {
1147
- info: e(a)("form.config.aws.fields.role_session_name.tooltip"),
1178
+ info: e(o)("form.config.aws.fields.role_session_name.tooltip"),
1148
1179
  tooltipAttributes: { maxWidth: "400" }
1149
1180
  },
1150
1181
  required: "",
1151
1182
  type: "text"
1152
1183
  }, null, 8, ["modelValue", "is-readonly", "label", "label-attributes"]),
1153
- l.config.awsStsEndpointUrlAvailable ? (x(), ae(b, {
1184
+ l.config.awsStsEndpointUrlAvailable ? (A(), oe(S, {
1154
1185
  key: 0,
1155
- modelValue: o[e(t).AWS].sts_endpoint_url,
1156
- "onUpdate:modelValue": i[6] || (i[6] = (r) => o[e(t).AWS].sts_endpoint_url = r),
1186
+ modelValue: a[e(t).AWS].sts_endpoint_url,
1187
+ "onUpdate:modelValue": r[6] || (r[6] = (i) => a[e(t).AWS].sts_endpoint_url = i),
1157
1188
  modelModifiers: { trim: !0 },
1158
1189
  autocomplete: "off",
1159
1190
  "data-testid": "vault-form-config-aws-sts_endpoint_url",
1160
- "is-readonly": d.isReadonly,
1161
- label: e(a)("form.config.aws.fields.sts_endpoint_url.label"),
1191
+ "is-readonly": p.isReadonly,
1192
+ label: e(o)("form.config.aws.fields.sts_endpoint_url.label"),
1162
1193
  "label-attributes": {
1163
- info: e(a)("form.config.aws.fields.sts_endpoint_url.tooltip"),
1194
+ info: e(o)("form.config.aws.fields.sts_endpoint_url.tooltip"),
1164
1195
  tooltipAttributes: { maxWidth: "400" }
1165
1196
  },
1166
1197
  type: "text"
1167
- }, null, 8, ["modelValue", "is-readonly", "label", "label-attributes"])) : Q("", !0)
1168
- ])) : Q("", !0),
1169
- s.value === e(t).GCP ? (x(), N("div", {
1198
+ }, null, 8, ["modelValue", "is-readonly", "label", "label-attributes"])) : ae("", !0)
1199
+ ])) : ae("", !0),
1200
+ u.value === e(t).GCP ? (A(), q("div", {
1170
1201
  key: `${e(t).GCP}-vault-config-fields`,
1171
1202
  class: "vault-form-config-fields-container"
1172
1203
  }, [
1173
- c(b, {
1174
- modelValue: o[e(t).GCP].project_id,
1175
- "onUpdate:modelValue": i[7] || (i[7] = (r) => o[e(t).GCP].project_id = r),
1204
+ d(S, {
1205
+ modelValue: a[e(t).GCP].project_id,
1206
+ "onUpdate:modelValue": r[7] || (r[7] = (i) => a[e(t).GCP].project_id = i),
1176
1207
  modelModifiers: { trim: !0 },
1177
1208
  autocomplete: "off",
1178
1209
  "data-testid": "vault-form-config-gcp-project-id",
1179
- "is-readonly": d.isReadonly,
1180
- label: e(a)("form.config.gcp.fields.project_id.label"),
1181
- placeholder: e(a)("form.config.gcp.fields.project_id.placeholder"),
1210
+ "is-readonly": p.isReadonly,
1211
+ label: e(o)("form.config.gcp.fields.project_id.label"),
1212
+ placeholder: e(o)("form.config.gcp.fields.project_id.placeholder"),
1182
1213
  required: "",
1183
1214
  type: "text"
1184
1215
  }, {
1185
- "label-tooltip": v(() => [
1186
- c(e(p), {
1216
+ "label-tooltip": y(() => [
1217
+ d(e(f), {
1187
1218
  keypath: "form.config.gcp.fields.project_id.tooltip.text",
1188
1219
  scope: "global"
1189
1220
  }, {
1190
- "italic-text": v(() => [
1191
- R("em", null, F(e(a)("form.config.gcp.fields.project_id.tooltip.italicText")), 1)
1221
+ "italic-text": y(() => [
1222
+ R("em", null, P(e(o)("form.config.gcp.fields.project_id.tooltip.italicText")), 1)
1192
1223
  ]),
1193
1224
  _: 1
1194
1225
  })
1195
1226
  ]),
1196
1227
  _: 1
1197
1228
  }, 8, ["modelValue", "is-readonly", "label", "placeholder"])
1198
- ])) : Q("", !0),
1199
- s.value === e(t).HCV ? (x(), N("div", {
1229
+ ])) : ae("", !0),
1230
+ u.value === e(t).HCV ? (A(), q("div", {
1200
1231
  key: `${e(t).HCV}-vault-config-fields`,
1201
1232
  class: "vault-form-config-fields-container"
1202
1233
  }, [
1203
- c(D, {
1204
- modelValue: o[e(t).HCV].protocol,
1205
- "onUpdate:modelValue": i[8] || (i[8] = (r) => o[e(t).HCV].protocol = r),
1234
+ d(Q, {
1235
+ modelValue: a[e(t).HCV].protocol,
1236
+ "onUpdate:modelValue": r[8] || (r[8] = (i) => a[e(t).HCV].protocol = i),
1206
1237
  "data-testid": "vault-form-config-hcv-protocol",
1207
- items: ee,
1208
- label: e(a)("form.config.hcv.fields.protocol.label"),
1209
- readonly: d.isReadonly,
1238
+ items: G,
1239
+ label: e(o)("form.config.hcv.fields.protocol.label"),
1240
+ readonly: p.isReadonly,
1210
1241
  required: "",
1211
1242
  width: "100%"
1212
1243
  }, null, 8, ["modelValue", "label", "readonly"]),
1213
- c(b, {
1214
- modelValue: o[e(t).HCV].host,
1215
- "onUpdate:modelValue": i[9] || (i[9] = (r) => o[e(t).HCV].host = r),
1244
+ d(S, {
1245
+ modelValue: a[e(t).HCV].host,
1246
+ "onUpdate:modelValue": r[9] || (r[9] = (i) => a[e(t).HCV].host = i),
1216
1247
  modelModifiers: { trim: !0 },
1217
1248
  autocomplete: "off",
1218
1249
  "data-testid": "vault-form-config-hcv-host",
1219
- "is-readonly": d.isReadonly,
1220
- label: e(a)("form.config.hcv.fields.host.label"),
1250
+ "is-readonly": p.isReadonly,
1251
+ label: e(o)("form.config.hcv.fields.host.label"),
1221
1252
  required: "",
1222
1253
  type: "text"
1223
1254
  }, null, 8, ["modelValue", "is-readonly", "label"]),
1224
- c(b, {
1225
- modelValue: o[e(t).HCV].port,
1226
- "onUpdate:modelValue": i[10] || (i[10] = (r) => o[e(t).HCV].port = r),
1255
+ d(S, {
1256
+ modelValue: a[e(t).HCV].port,
1257
+ "onUpdate:modelValue": r[10] || (r[10] = (i) => a[e(t).HCV].port = i),
1227
1258
  autocomplete: "off",
1228
1259
  "data-testid": "vault-form-config-hcv-port",
1229
- "is-readonly": d.isReadonly,
1230
- label: e(a)("form.config.hcv.fields.port.label"),
1260
+ "is-readonly": p.isReadonly,
1261
+ label: e(o)("form.config.hcv.fields.port.label"),
1231
1262
  min: "0",
1232
1263
  required: "",
1233
1264
  type: "number"
1234
1265
  }, null, 8, ["modelValue", "is-readonly", "label"]),
1235
- c(b, {
1236
- modelValue: o[e(t).HCV].mount,
1237
- "onUpdate:modelValue": i[11] || (i[11] = (r) => o[e(t).HCV].mount = r),
1266
+ d(S, {
1267
+ modelValue: a[e(t).HCV].mount,
1268
+ "onUpdate:modelValue": r[11] || (r[11] = (i) => a[e(t).HCV].mount = i),
1238
1269
  modelModifiers: { trim: !0 },
1239
1270
  autocomplete: "off",
1240
1271
  "data-testid": "vault-form-config-hcv-mount",
1241
- "is-readonly": d.isReadonly,
1242
- label: e(a)("form.config.hcv.fields.mount.label"),
1272
+ "is-readonly": p.isReadonly,
1273
+ label: e(o)("form.config.hcv.fields.mount.label"),
1243
1274
  required: "",
1244
1275
  type: "text"
1245
1276
  }, null, 8, ["modelValue", "is-readonly", "label"]),
1246
- c(D, {
1247
- modelValue: o[e(t).HCV].kv,
1248
- "onUpdate:modelValue": i[12] || (i[12] = (r) => o[e(t).HCV].kv = r),
1277
+ d(Q, {
1278
+ modelValue: a[e(t).HCV].kv,
1279
+ "onUpdate:modelValue": r[12] || (r[12] = (i) => a[e(t).HCV].kv = i),
1249
1280
  "data-testid": "vault-form-config-hcv-kv",
1250
- items: J,
1251
- label: e(a)("form.config.hcv.fields.kv.label"),
1252
- readonly: d.isReadonly,
1281
+ items: X,
1282
+ label: e(o)("form.config.hcv.fields.kv.label"),
1283
+ readonly: p.isReadonly,
1253
1284
  required: "",
1254
1285
  width: "100%"
1255
1286
  }, null, 8, ["modelValue", "label", "readonly"]),
1256
- c(b, {
1257
- modelValue: o[e(t).HCV].namespace,
1258
- "onUpdate:modelValue": i[13] || (i[13] = (r) => o[e(t).HCV].namespace = r),
1287
+ d(S, {
1288
+ modelValue: a[e(t).HCV].namespace,
1289
+ "onUpdate:modelValue": r[13] || (r[13] = (i) => a[e(t).HCV].namespace = i),
1259
1290
  modelModifiers: { trim: !0 },
1260
1291
  autocomplete: "off",
1261
1292
  "data-testid": "vault-form-config-hcv-namespace",
1262
- "is-readonly": d.isReadonly,
1263
- label: e(a)("form.config.hcv.fields.namespace.label"),
1293
+ "is-readonly": p.isReadonly,
1294
+ label: e(o)("form.config.hcv.fields.namespace.label"),
1264
1295
  type: "text"
1265
1296
  }, null, 8, ["modelValue", "is-readonly", "label"]),
1266
- c(D, {
1267
- modelValue: o[e(t).HCV].auth_method,
1268
- "onUpdate:modelValue": i[14] || (i[14] = (r) => o[e(t).HCV].auth_method = r),
1297
+ d(Q, {
1298
+ modelValue: a[e(t).HCV].auth_method,
1299
+ "onUpdate:modelValue": r[14] || (r[14] = (i) => a[e(t).HCV].auth_method = i),
1269
1300
  "data-testid": "vault-form-config-hcv-auth_method",
1270
1301
  items: [
1271
- { label: e(A).TOKEN, value: e(A).TOKEN },
1272
- { label: e(A).K8S, value: e(A).K8S },
1273
- ...l.config.hcvAppRoleMethodAvailable ? [{ label: e(A).APP_ROLE, value: e(A).APP_ROLE }] : []
1302
+ { label: e(F).TOKEN, value: e(F).TOKEN },
1303
+ { label: e(F).K8S, value: e(F).K8S },
1304
+ ...l.config.hcvAppRoleMethodAvailable ? [{ label: e(F).APP_ROLE, value: e(F).APP_ROLE }] : []
1274
1305
  ],
1275
- label: e(a)("form.config.hcv.fields.auth_method.label"),
1276
- readonly: d.isReadonly,
1306
+ label: e(o)("form.config.hcv.fields.auth_method.label"),
1307
+ readonly: p.isReadonly,
1277
1308
  required: "",
1278
1309
  width: "100%"
1279
1310
  }, null, 8, ["modelValue", "items", "label", "readonly"]),
1280
- o[e(t).HCV].auth_method === e(A).TOKEN ? (x(), N("div", xt, [
1281
- c(b, {
1282
- modelValue: o[e(t).HCV].token,
1283
- "onUpdate:modelValue": i[15] || (i[15] = (r) => o[e(t).HCV].token = r),
1311
+ a[e(t).HCV].auth_method === e(F).TOKEN ? (A(), q("div", Rt, [
1312
+ d(S, {
1313
+ modelValue: a[e(t).HCV].token,
1314
+ "onUpdate:modelValue": r[15] || (r[15] = (i) => a[e(t).HCV].token = i),
1284
1315
  modelModifiers: { trim: !0 },
1285
1316
  autocomplete: "off",
1286
1317
  "data-testid": "vault-form-config-hcv-token",
1287
- "is-readonly": d.isReadonly,
1288
- label: e(a)("form.config.hcv.fields.token.label"),
1318
+ "is-readonly": p.isReadonly,
1319
+ label: e(o)("form.config.hcv.fields.token.label"),
1289
1320
  required: "",
1290
1321
  type: "text"
1291
1322
  }, null, 8, ["modelValue", "is-readonly", "label"])
1292
- ])) : o[e(t).HCV].auth_method === e(A).K8S ? (x(), N("div", It, [
1293
- c(b, {
1294
- modelValue: o[e(t).HCV].kube_role,
1295
- "onUpdate:modelValue": i[16] || (i[16] = (r) => o[e(t).HCV].kube_role = r),
1323
+ ])) : a[e(t).HCV].auth_method === e(F).K8S ? (A(), q("div", Ut, [
1324
+ d(S, {
1325
+ modelValue: a[e(t).HCV].kube_role,
1326
+ "onUpdate:modelValue": r[16] || (r[16] = (i) => a[e(t).HCV].kube_role = i),
1296
1327
  modelModifiers: { trim: !0 },
1297
1328
  autocomplete: "off",
1298
1329
  "data-testid": "vault-form-config-hcv-kube_role",
1299
- "is-readonly": d.isReadonly,
1300
- label: e(a)("form.config.hcv.fields.kube_role.label"),
1330
+ "is-readonly": p.isReadonly,
1331
+ label: e(o)("form.config.hcv.fields.kube_role.label"),
1301
1332
  required: "",
1302
1333
  type: "text"
1303
1334
  }, null, 8, ["modelValue", "is-readonly", "label"]),
1304
- c(b, {
1305
- modelValue: o[e(t).HCV].kube_auth_path,
1306
- "onUpdate:modelValue": i[17] || (i[17] = (r) => o[e(t).HCV].kube_auth_path = r),
1335
+ d(S, {
1336
+ modelValue: a[e(t).HCV].kube_auth_path,
1337
+ "onUpdate:modelValue": r[17] || (r[17] = (i) => a[e(t).HCV].kube_auth_path = i),
1307
1338
  modelModifiers: { trim: !0 },
1308
1339
  autocomplete: "off",
1309
1340
  "data-testid": "vault-form-config-hcv-kube_auth_path",
1310
- "is-readonly": d.isReadonly,
1311
- label: e(a)("form.config.hcv.fields.kube_auth_path.label"),
1341
+ "is-readonly": p.isReadonly,
1342
+ label: e(o)("form.config.hcv.fields.kube_auth_path.label"),
1312
1343
  type: "text"
1313
1344
  }, null, 8, ["modelValue", "is-readonly", "label"]),
1314
- c(b, {
1315
- modelValue: o[e(t).HCV].kube_api_token_file,
1316
- "onUpdate:modelValue": i[18] || (i[18] = (r) => o[e(t).HCV].kube_api_token_file = r),
1345
+ d(S, {
1346
+ modelValue: a[e(t).HCV].kube_api_token_file,
1347
+ "onUpdate:modelValue": r[18] || (r[18] = (i) => a[e(t).HCV].kube_api_token_file = i),
1317
1348
  modelModifiers: { trim: !0 },
1318
1349
  autocomplete: "off",
1319
1350
  "data-testid": "vault-form-config-hcv-kube_api_token_file",
1320
- "is-readonly": d.isReadonly,
1321
- label: e(a)("form.config.hcv.fields.kube_api_token_file.label"),
1351
+ "is-readonly": p.isReadonly,
1352
+ label: e(o)("form.config.hcv.fields.kube_api_token_file.label"),
1322
1353
  required: "",
1323
1354
  type: "text"
1324
1355
  }, null, 8, ["modelValue", "is-readonly", "label"])
1325
- ])) : o[e(t).HCV].auth_method === e(A).APP_ROLE ? (x(), N("div", At, [
1326
- c(b, {
1327
- modelValue: o[e(t).HCV].approle_auth_path,
1328
- "onUpdate:modelValue": i[19] || (i[19] = (r) => o[e(t).HCV].approle_auth_path = r),
1356
+ ])) : a[e(t).HCV].auth_method === e(F).APP_ROLE ? (A(), q("div", $t, [
1357
+ d(S, {
1358
+ modelValue: a[e(t).HCV].approle_auth_path,
1359
+ "onUpdate:modelValue": r[19] || (r[19] = (i) => a[e(t).HCV].approle_auth_path = i),
1329
1360
  modelModifiers: { trim: !0 },
1330
1361
  autocomplete: "off",
1331
1362
  "data-testid": "vault-form-config-hcv-approle_auth_path",
1332
- "is-readonly": d.isReadonly,
1333
- label: e(a)("form.config.hcv.fields.approle_auth_path.label"),
1363
+ "is-readonly": p.isReadonly,
1364
+ label: e(o)("form.config.hcv.fields.approle_auth_path.label"),
1334
1365
  type: "text"
1335
1366
  }, null, 8, ["modelValue", "is-readonly", "label"]),
1336
- c(b, {
1337
- modelValue: o[e(t).HCV].approle_role_id,
1338
- "onUpdate:modelValue": i[20] || (i[20] = (r) => o[e(t).HCV].approle_role_id = r),
1367
+ d(S, {
1368
+ modelValue: a[e(t).HCV].approle_role_id,
1369
+ "onUpdate:modelValue": r[20] || (r[20] = (i) => a[e(t).HCV].approle_role_id = i),
1339
1370
  modelModifiers: { trim: !0 },
1340
1371
  autocomplete: "off",
1341
1372
  "data-testid": "vault-form-config-hcv-approle_role_id",
1342
- "is-readonly": d.isReadonly,
1343
- label: e(a)("form.config.hcv.fields.approle_role_id.label"),
1373
+ "is-readonly": p.isReadonly,
1374
+ label: e(o)("form.config.hcv.fields.approle_role_id.label"),
1344
1375
  required: "",
1345
1376
  type: "text"
1346
1377
  }, null, 8, ["modelValue", "is-readonly", "label"]),
1347
- c(b, {
1348
- modelValue: o[e(t).HCV].approle_secret_id,
1349
- "onUpdate:modelValue": i[21] || (i[21] = (r) => o[e(t).HCV].approle_secret_id = r),
1378
+ d(S, {
1379
+ modelValue: a[e(t).HCV].approle_secret_id,
1380
+ "onUpdate:modelValue": r[21] || (r[21] = (i) => a[e(t).HCV].approle_secret_id = i),
1350
1381
  modelModifiers: { trim: !0 },
1351
1382
  autocomplete: "off",
1352
1383
  "data-testid": "vault-form-config-hcv-approle_secret_id",
1353
- "is-readonly": d.isReadonly,
1354
- label: e(a)("form.config.hcv.fields.approle_secret_id.label"),
1384
+ "is-readonly": p.isReadonly,
1385
+ label: e(o)("form.config.hcv.fields.approle_secret_id.label"),
1355
1386
  type: "text"
1356
1387
  }, null, 8, ["modelValue", "is-readonly", "label"]),
1357
- c(b, {
1358
- modelValue: o[e(t).HCV].approle_secret_id_file,
1359
- "onUpdate:modelValue": i[22] || (i[22] = (r) => o[e(t).HCV].approle_secret_id_file = r),
1388
+ d(S, {
1389
+ modelValue: a[e(t).HCV].approle_secret_id_file,
1390
+ "onUpdate:modelValue": r[22] || (r[22] = (i) => a[e(t).HCV].approle_secret_id_file = i),
1360
1391
  modelModifiers: { trim: !0 },
1361
1392
  autocomplete: "off",
1362
1393
  "data-testid": "vault-form-config-hcv-approle_secret_id_file",
1363
- "is-readonly": d.isReadonly,
1364
- label: e(a)("form.config.hcv.fields.approle_secret_id_file.label"),
1394
+ "is-readonly": p.isReadonly,
1395
+ label: e(o)("form.config.hcv.fields.approle_secret_id_file.label"),
1365
1396
  type: "text"
1366
1397
  }, null, 8, ["modelValue", "is-readonly", "label"]),
1367
- c(be, {
1368
- modelValue: o[e(t).HCV].approle_response_wrapping,
1369
- "onUpdate:modelValue": i[23] || (i[23] = (r) => o[e(t).HCV].approle_response_wrapping = r),
1398
+ d(ye, {
1399
+ modelValue: a[e(t).HCV].approle_response_wrapping,
1400
+ "onUpdate:modelValue": r[23] || (r[23] = (i) => a[e(t).HCV].approle_response_wrapping = i),
1370
1401
  "data-testid": "vault-form-config-hcv-approle_response_wrapping",
1371
- label: e(a)("form.config.hcv.fields.approle_response_wrapping.label")
1402
+ label: e(o)("form.config.hcv.fields.approle_response_wrapping.label")
1372
1403
  }, null, 8, ["modelValue", "label"])
1373
- ])) : Q("", !0)
1374
- ])) : Q("", !0),
1375
- s.value === e(t).AZURE ? (x(), N("div", {
1404
+ ])) : ae("", !0)
1405
+ ])) : ae("", !0),
1406
+ u.value === e(t).AZURE ? (A(), q("div", {
1376
1407
  key: `${e(t).HCV}-vault-config-fields`,
1377
1408
  class: "vault-form-config-fields-container"
1378
1409
  }, [
1379
- c(b, {
1380
- modelValue: o[e(t).AZURE].location,
1381
- "onUpdate:modelValue": i[24] || (i[24] = (r) => o[e(t).AZURE].location = r),
1410
+ d(S, {
1411
+ modelValue: a[e(t).AZURE].location,
1412
+ "onUpdate:modelValue": r[24] || (r[24] = (i) => a[e(t).AZURE].location = i),
1382
1413
  modelModifiers: { trim: !0 },
1383
1414
  autocomplete: "off",
1384
1415
  "data-testid": "vault-form-config-azure-location",
1385
- "is-readonly": d.isReadonly,
1386
- label: e(a)("form.config.azure.fields.location.label"),
1416
+ "is-readonly": p.isReadonly,
1417
+ label: e(o)("form.config.azure.fields.location.label"),
1387
1418
  required: "",
1388
1419
  type: "text"
1389
1420
  }, null, 8, ["modelValue", "is-readonly", "label"]),
1390
- c(b, {
1391
- modelValue: o[e(t).AZURE].vault_uri,
1392
- "onUpdate:modelValue": i[25] || (i[25] = (r) => o[e(t).AZURE].vault_uri = r),
1421
+ d(S, {
1422
+ modelValue: a[e(t).AZURE].vault_uri,
1423
+ "onUpdate:modelValue": r[25] || (r[25] = (i) => a[e(t).AZURE].vault_uri = i),
1393
1424
  modelModifiers: { trim: !0 },
1394
1425
  autocomplete: "off",
1395
1426
  "data-testid": "vault-form-config-azure-uri",
1396
- "is-readonly": d.isReadonly,
1397
- label: e(a)("form.config.azure.fields.vault_uri.label"),
1427
+ "is-readonly": p.isReadonly,
1428
+ label: e(o)("form.config.azure.fields.vault_uri.label"),
1398
1429
  required: "",
1399
1430
  type: "text"
1400
1431
  }, null, 8, ["modelValue", "is-readonly", "label"]),
1401
- c(b, {
1402
- modelValue: o[e(t).AZURE].credentials_prefix,
1403
- "onUpdate:modelValue": i[26] || (i[26] = (r) => o[e(t).AZURE].credentials_prefix = r),
1432
+ d(S, {
1433
+ modelValue: a[e(t).AZURE].credentials_prefix,
1434
+ "onUpdate:modelValue": r[26] || (r[26] = (i) => a[e(t).AZURE].credentials_prefix = i),
1404
1435
  modelModifiers: { trim: !0 },
1405
1436
  autocomplete: "off",
1406
1437
  "data-testid": "vault-form-config-azure-prefix",
1407
- "is-readonly": d.isReadonly,
1408
- label: e(a)("form.config.azure.fields.credential_prefix.label"),
1438
+ "is-readonly": p.isReadonly,
1439
+ label: e(o)("form.config.azure.fields.credential_prefix.label"),
1409
1440
  required: "",
1410
1441
  type: "text"
1411
1442
  }, null, 8, ["modelValue", "is-readonly", "label"]),
1412
- c(D, {
1413
- modelValue: o[e(t).AZURE].type,
1414
- "onUpdate:modelValue": i[27] || (i[27] = (r) => o[e(t).AZURE].type = r),
1443
+ d(Q, {
1444
+ modelValue: a[e(t).AZURE].type,
1445
+ "onUpdate:modelValue": r[27] || (r[27] = (i) => a[e(t).AZURE].type = i),
1415
1446
  "data-testid": "vault-form-config-azure-type",
1416
- items: q,
1417
- label: e(a)("form.config.azure.fields.type.label"),
1418
- placeholder: e(a)("form.config.azure.fields.type.placeholder"),
1419
- readonly: d.isReadonly,
1447
+ items: W,
1448
+ label: e(o)("form.config.azure.fields.type.label"),
1449
+ placeholder: e(o)("form.config.azure.fields.type.placeholder"),
1450
+ readonly: p.isReadonly,
1420
1451
  required: "",
1421
1452
  width: "100%"
1422
1453
  }, null, 8, ["modelValue", "label", "placeholder", "readonly"]),
1423
- c(b, {
1424
- modelValue: o[e(t).AZURE].client_id,
1425
- "onUpdate:modelValue": i[28] || (i[28] = (r) => o[e(t).AZURE].client_id = r),
1454
+ d(S, {
1455
+ modelValue: a[e(t).AZURE].client_id,
1456
+ "onUpdate:modelValue": r[28] || (r[28] = (i) => a[e(t).AZURE].client_id = i),
1426
1457
  modelModifiers: { trim: !0 },
1427
1458
  autocomplete: "off",
1428
1459
  "data-testid": "vault-form-config-azure-client-id",
1429
- "is-readonly": d.isReadonly,
1430
- label: e(a)("form.config.azure.fields.client_id.label"),
1460
+ "is-readonly": p.isReadonly,
1461
+ label: e(o)("form.config.azure.fields.client_id.label"),
1431
1462
  type: "text"
1432
1463
  }, null, 8, ["modelValue", "is-readonly", "label"]),
1433
- c(b, {
1434
- modelValue: o[e(t).AZURE].tenant_id,
1435
- "onUpdate:modelValue": i[29] || (i[29] = (r) => o[e(t).AZURE].tenant_id = r),
1464
+ d(S, {
1465
+ modelValue: a[e(t).AZURE].tenant_id,
1466
+ "onUpdate:modelValue": r[29] || (r[29] = (i) => a[e(t).AZURE].tenant_id = i),
1436
1467
  modelModifiers: { trim: !0 },
1437
1468
  autocomplete: "off",
1438
1469
  "data-testid": "vault-form-config-azure-tenant-id",
1439
- "is-readonly": d.isReadonly,
1440
- label: e(a)("form.config.azure.fields.tenant_id.label"),
1470
+ "is-readonly": p.isReadonly,
1471
+ label: e(o)("form.config.azure.fields.tenant_id.label"),
1441
1472
  type: "text"
1442
1473
  }, null, 8, ["modelValue", "is-readonly", "label"])
1443
- ])) : Q("", !0),
1444
- l.config.ttl ? (x(), N("div", Rt, [
1445
- oe.value ? (x(), ae(ie, {
1474
+ ])) : ae("", !0),
1475
+ l.config.ttl ? (A(), q("div", Tt, [
1476
+ re.value ? (A(), oe(ue, {
1446
1477
  key: 0,
1447
1478
  class: "advanced-fields-collapse",
1448
1479
  "data-testid": "advanced-fields-collapse",
1449
1480
  "trigger-alignment": "leading",
1450
- "trigger-label": e(a)("form.config.advancedFields.title")
1481
+ "trigger-label": e(o)("form.config.advancedFields.title")
1451
1482
  }, {
1452
- default: v(() => [
1453
- R("div", Ut, [
1454
- R("div", Tt, [
1455
- c(b, {
1456
- modelValue: o[s.value].ttl,
1457
- "onUpdate:modelValue": i[30] || (i[30] = (r) => o[s.value].ttl = r),
1483
+ default: y(() => [
1484
+ R("div", Kt, [
1485
+ R("div", Pt, [
1486
+ d(S, {
1487
+ modelValue: a[u.value].ttl,
1488
+ "onUpdate:modelValue": r[30] || (r[30] = (i) => a[u.value].ttl = i),
1458
1489
  "data-testid": "vault-ttl-input",
1459
- label: e(a)("form.config.advancedFields.ttl"),
1490
+ label: e(o)("form.config.advancedFields.ttl"),
1460
1491
  "label-attributes": {
1461
- info: e(a)("form.config.advancedFields.ttlTooltip"),
1492
+ info: e(o)("form.config.advancedFields.ttlTooltip"),
1462
1493
  tooltipAttributes: { maxWidth: "400" }
1463
1494
  },
1464
1495
  type: "number"
1465
1496
  }, null, 8, ["modelValue", "label", "label-attributes"])
1466
1497
  ]),
1467
- R("div", $t, [
1468
- c(b, {
1469
- modelValue: o[s.value].neg_ttl,
1470
- "onUpdate:modelValue": i[31] || (i[31] = (r) => o[s.value].neg_ttl = r),
1498
+ R("div", Mt, [
1499
+ d(S, {
1500
+ modelValue: a[u.value].neg_ttl,
1501
+ "onUpdate:modelValue": r[31] || (r[31] = (i) => a[u.value].neg_ttl = i),
1471
1502
  "data-testid": "vault-neg-ttl-input",
1472
- label: e(a)("form.config.advancedFields.negTtl"),
1503
+ label: e(o)("form.config.advancedFields.negTtl"),
1473
1504
  "label-attributes": {
1474
- info: e(a)("form.config.advancedFields.negTtlTooltip"),
1505
+ info: e(o)("form.config.advancedFields.negTtlTooltip"),
1475
1506
  tooltipAttributes: { maxWidth: "400" }
1476
1507
  },
1477
1508
  type: "number"
@@ -1479,14 +1510,14 @@ const _t = { class: "kong-ui-entities-vault-form" }, Vt = { class: "vault-form-p
1479
1510
  ])
1480
1511
  ]),
1481
1512
  R("div", Ht, [
1482
- R("div", Mt, [
1483
- c(b, {
1484
- modelValue: o[s.value].resurrect_ttl,
1485
- "onUpdate:modelValue": i[32] || (i[32] = (r) => o[s.value].resurrect_ttl = r),
1513
+ R("div", Ft, [
1514
+ d(S, {
1515
+ modelValue: a[u.value].resurrect_ttl,
1516
+ "onUpdate:modelValue": r[32] || (r[32] = (i) => a[u.value].resurrect_ttl = i),
1486
1517
  "data-testid": "vault-resurrect-ttl-input",
1487
- label: e(a)("form.config.advancedFields.resurrectTtl"),
1518
+ label: e(o)("form.config.advancedFields.resurrectTtl"),
1488
1519
  "label-attributes": {
1489
- info: e(a)("form.config.advancedFields.resurrectTtlTooltip"),
1520
+ info: e(o)("form.config.advancedFields.resurrectTtlTooltip"),
1490
1521
  tooltipAttributes: { maxWidth: "400" }
1491
1522
  },
1492
1523
  type: "number"
@@ -1495,57 +1526,57 @@ const _t = { class: "kong-ui-entities-vault-form" }, Vt = { class: "vault-form-p
1495
1526
  ])
1496
1527
  ]),
1497
1528
  _: 1
1498
- }, 8, ["trigger-label"])) : Q("", !0)
1499
- ])) : Q("", !0)
1529
+ }, 8, ["trigger-label"])) : ae("", !0)
1530
+ ])) : ae("", !0)
1500
1531
  ]),
1501
1532
  _: 1
1502
1533
  })
1503
1534
  ]),
1504
1535
  _: 1
1505
1536
  }, 8, ["description", "title"]),
1506
- c(e(we), {
1507
- description: e(a)("form.sections.general.description"),
1508
- title: e(a)("form.sections.general.title")
1537
+ d(e(Se), {
1538
+ description: e(o)("form.sections.general.description"),
1539
+ title: e(o)("form.sections.general.title")
1509
1540
  }, {
1510
- default: v(() => [
1511
- c(b, {
1512
- modelValue: d.fields.prefix,
1513
- "onUpdate:modelValue": i[33] || (i[33] = (r) => d.fields.prefix = r),
1541
+ default: y(() => [
1542
+ d(S, {
1543
+ modelValue: p.fields.prefix,
1544
+ "onUpdate:modelValue": r[33] || (r[33] = (i) => p.fields.prefix = i),
1514
1545
  modelModifiers: { trim: !0 },
1515
1546
  autocomplete: "off",
1516
1547
  "data-testid": "vault-form-prefix",
1517
- help: e(a)("form.fields.prefix.help"),
1518
- "is-readonly": d.isReadonly,
1519
- label: e(a)("form.fields.prefix.label"),
1548
+ help: e(o)("form.fields.prefix.help"),
1549
+ "is-readonly": p.isReadonly,
1550
+ label: e(o)("form.fields.prefix.label"),
1520
1551
  "label-attributes": {
1521
- info: e(a)("form.fields.prefix.tooltip"),
1552
+ info: e(o)("form.fields.prefix.tooltip"),
1522
1553
  tooltipAttributes: { maxWidth: "400" }
1523
1554
  },
1524
- placeholder: e(a)("form.fields.prefix.placeholder"),
1555
+ placeholder: e(o)("form.fields.prefix.placeholder"),
1525
1556
  required: "",
1526
1557
  type: "text"
1527
1558
  }, null, 8, ["modelValue", "help", "is-readonly", "label", "label-attributes", "placeholder"]),
1528
- c(re, {
1529
- modelValue: d.fields.description,
1530
- "onUpdate:modelValue": i[34] || (i[34] = (r) => d.fields.description = r),
1559
+ d(de, {
1560
+ modelValue: p.fields.description,
1561
+ "onUpdate:modelValue": r[34] || (r[34] = (i) => p.fields.description = i),
1531
1562
  modelModifiers: { trim: !0 },
1532
1563
  "character-limit": 1e3,
1533
1564
  class: "vault-form-textarea",
1534
1565
  "data-testid": "vault-form-description",
1535
- label: e(a)("form.fields.description.label"),
1536
- placeholder: e(a)("form.fields.description.placeholder"),
1537
- readonly: d.isReadonly
1566
+ label: e(o)("form.fields.description.label"),
1567
+ placeholder: e(o)("form.fields.description.placeholder"),
1568
+ readonly: p.isReadonly
1538
1569
  }, null, 8, ["modelValue", "label", "placeholder", "readonly"]),
1539
- c(b, {
1540
- modelValue: d.fields.tags,
1541
- "onUpdate:modelValue": i[35] || (i[35] = (r) => d.fields.tags = r),
1570
+ d(S, {
1571
+ modelValue: p.fields.tags,
1572
+ "onUpdate:modelValue": r[35] || (r[35] = (i) => p.fields.tags = i),
1542
1573
  modelModifiers: { trim: !0 },
1543
1574
  autocomplete: "off",
1544
1575
  "data-testid": "vault-form-tags",
1545
- help: e(a)("form.fields.tags.help"),
1546
- "is-readonly": d.isReadonly,
1547
- label: e(a)("form.fields.tags.label"),
1548
- placeholder: e(a)("form.fields.tags.placeholder"),
1576
+ help: e(o)("form.fields.tags.help"),
1577
+ "is-readonly": p.isReadonly,
1578
+ label: e(o)("form.fields.tags.label"),
1579
+ placeholder: e(o)("form.fields.tags.placeholder"),
1549
1580
  type: "text"
1550
1581
  }, null, 8, ["modelValue", "help", "is-readonly", "label", "placeholder"])
1551
1582
  ]),
@@ -1557,7 +1588,7 @@ const _t = { class: "kong-ui-entities-vault-form" }, Vt = { class: "vault-form-p
1557
1588
  ]);
1558
1589
  };
1559
1590
  }
1560
- }), Xt = /* @__PURE__ */ ge(Kt, [["__scopeId", "data-v-a4e9b325"]]), Pt = { class: "kong-ui-vault-entity-config-card" }, el = /* @__PURE__ */ ce({
1591
+ }), vl = /* @__PURE__ */ ce(Nt, [["__scopeId", "data-v-a4e9b325"]]), Ot = { class: "kong-ui-vault-entity-config-card" }, gl = /* @__PURE__ */ ie({
1561
1592
  __name: "VaultConfigCard",
1562
1593
  props: {
1563
1594
  /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
@@ -1584,60 +1615,60 @@ const _t = { class: "kong-ui-entities-vault-form" }, Vt = { class: "vault-form-p
1584
1615
  },
1585
1616
  emits: ["loading", "fetch:error", "fetch:success"],
1586
1617
  setup(l) {
1587
- const M = l, f = V(() => {
1588
- var a, w;
1589
- return (w = pe.form[(a = M.config) == null ? void 0 : a.app]) == null ? void 0 : w.edit;
1590
- }), { i18n: { t: u } } = he.useI18n(), p = I({
1618
+ const I = l, c = E(() => {
1619
+ var o, x;
1620
+ return (x = se.form[(o = I.config) == null ? void 0 : o.app]) == null ? void 0 : x.edit;
1621
+ }), { i18n: { t: n } } = ge.useI18n(), f = U({
1591
1622
  id: {},
1592
1623
  name: {
1593
- label: u("labels.vault_type")
1624
+ label: n("labels.vault_type")
1594
1625
  },
1595
1626
  updated_at: {},
1596
1627
  created_at: {},
1597
1628
  prefix: {
1598
1629
  order: 5,
1599
- section: Ue.Basic
1630
+ section: $e.Basic
1600
1631
  },
1601
1632
  description: {
1602
1633
  order: 6,
1603
- section: Ue.Basic
1634
+ section: $e.Basic
1604
1635
  },
1605
1636
  tags: {
1606
1637
  order: 7
1607
1638
  },
1608
1639
  config: {
1609
1640
  order: 8,
1610
- type: lt.Json
1641
+ type: at.Json
1611
1642
  }
1612
1643
  });
1613
- return (a, w) => (x(), N("div", Pt, [
1614
- c(e(ot), {
1644
+ return (o, x) => (A(), q("div", Ot, [
1645
+ d(e(rt), {
1615
1646
  config: l.config,
1616
1647
  "config-card-doc": l.configCardDoc,
1617
- "config-schema": p.value,
1618
- "entity-type": e(Ee).Vault,
1619
- "fetch-url": f.value,
1648
+ "config-schema": f.value,
1649
+ "entity-type": e(xe).Vault,
1650
+ "fetch-url": c.value,
1620
1651
  "hide-title": l.hideTitle,
1621
- "onFetch:error": w[0] || (w[0] = (S) => a.$emit("fetch:error", S)),
1622
- "onFetch:success": w[1] || (w[1] = (S) => a.$emit("fetch:success", S)),
1623
- onLoading: w[2] || (w[2] = (S) => a.$emit("loading", S))
1652
+ "onFetch:error": x[0] || (x[0] = (C) => o.$emit("fetch:error", C)),
1653
+ "onFetch:success": x[1] || (x[1] = (C) => o.$emit("fetch:success", C)),
1654
+ onLoading: x[2] || (x[2] = (C) => o.$emit("loading", C))
1624
1655
  }, null, 8, ["config", "config-card-doc", "config-schema", "entity-type", "fetch-url", "hide-title"])
1625
1656
  ]));
1626
1657
  }
1627
- }), _e = "/v2/control-planes/{controlPlaneId}", ye = {
1658
+ }), Ve = "/v2/control-planes/{controlPlaneId}", me = {
1628
1659
  getVault: {
1629
- konnect: `${_e}/core-entities/vaults/{id}`
1660
+ konnect: `${Ve}/core-entities/vaults/{id}`
1630
1661
  },
1631
1662
  list: {
1632
- konnect: `${_e}/config-stores/{id}/secrets`
1663
+ konnect: `${Ve}/config-stores/{id}/secrets`
1633
1664
  },
1634
1665
  form: {
1635
1666
  konnect: {
1636
- create: `${_e}/config-stores/{id}/secrets`,
1637
- edit: `${_e}/config-stores/{id}/secrets/{secretId}`
1667
+ create: `${Ve}/config-stores/{id}/secrets`,
1668
+ edit: `${Ve}/config-stores/{id}/secrets/{secretId}`
1638
1669
  }
1639
1670
  }
1640
- }, Nt = { class: "table-content-overflow-wrapper" }, Ft = /* @__PURE__ */ ce({
1671
+ }, qt = { class: "table-content-overflow-wrapper" }, Dt = /* @__PURE__ */ ie({
1641
1672
  inheritAttrs: !1,
1642
1673
  __name: "SecretListInner",
1643
1674
  props: {
@@ -1677,99 +1708,99 @@ const _t = { class: "kong-ui-entities-vault-form" }, Vt = { class: "vault-form-p
1677
1708
  }
1678
1709
  },
1679
1710
  emits: ["error", "delete:success"],
1680
- setup(l, { emit: M }) {
1681
- var ue;
1682
- const f = M, u = l, { i18n: { t: p, formatUnixTimeStamp: a } } = he.useI18n(), { axiosInstance: w } = me((ue = u.config) == null ? void 0 : ue.axiosRequestConfig), y = {
1711
+ setup(l, { emit: I }) {
1712
+ var ne;
1713
+ const c = I, n = l, { i18n: { t: f, formatUnixTimeStamp: o } } = ge.useI18n(), { axiosInstance: x } = ve((ne = n.config) == null ? void 0 : ne.axiosRequestConfig), b = {
1683
1714
  // the Secret Key column is non-hidable
1684
- key: { label: p("secrets.list.table_headers.key"), sortable: !1, hidable: !1 },
1685
- updated_at: { label: p("secrets.list.table_headers.updated_at"), sortable: !1 }
1686
- }, d = (E) => ({
1687
- "data-testid": E.key
1688
- }), k = V(() => {
1689
- var E;
1690
- return `${u.config.apiBaseUrl}${ye.list[u.config.app]}`.replace(/{controlPlaneId}/gi, ((E = u.config) == null ? void 0 : E.controlPlaneId) || "").replace(/{id}/gi, u.configStoreId || "");
1691
- }), s = I(""), K = {
1715
+ key: { label: f("secrets.list.table_headers.key"), sortable: !1, hidable: !1 },
1716
+ updated_at: { label: f("secrets.list.table_headers.updated_at"), sortable: !1 }
1717
+ }, p = ($) => ({
1718
+ "data-testid": $.key
1719
+ }), h = E(() => {
1720
+ var $;
1721
+ return `${n.config.apiBaseUrl}${me.list[n.config.app]}`.replace(/{controlPlaneId}/gi, (($ = n.config) == null ? void 0 : $.controlPlaneId) || "").replace(/{id}/gi, n.configStoreId || "");
1722
+ }), u = U(""), O = {
1692
1723
  isExactMatch: !0,
1693
- placeholder: p("search.placeholder_for_secrets.konnect")
1694
- }, O = I(1), { fetcher: oe, fetcherState: Y } = Ke(u.config, k.value), o = () => {
1695
- s.value = "";
1696
- }, Z = I(null), X = (E) => ({
1697
- label: p("actions.edit"),
1698
- to: u.config.getEditRoute(E)
1699
- }), q = I(void 0), ee = I(!1), J = I(!1), m = I(""), H = Pe(u.config, k.value), U = (E) => {
1700
- q.value = E, ee.value = !0;
1724
+ placeholder: f("search.placeholder_for_secrets.konnect")
1725
+ }, D = U(1), { fetcher: re, fetcherState: z } = He(n.config, h.value), a = () => {
1726
+ u.value = "";
1727
+ }, Y = U(null), ee = ($) => ({
1728
+ label: f("actions.edit"),
1729
+ to: n.config.getEditRoute($)
1730
+ }), W = U(void 0), G = U(!1), X = U(!1), g = U(""), H = Fe(n.config, h.value), M = ($) => {
1731
+ W.value = $, G.value = !0;
1701
1732
  }, j = () => {
1702
- ee.value = !1;
1733
+ G.value = !1;
1703
1734
  }, te = async () => {
1704
- var E, L, G;
1705
- if ((E = q.value) != null && E.key) {
1706
- J.value = !0;
1735
+ var $, J, B;
1736
+ if (($ = W.value) != null && $.key) {
1737
+ X.value = !0;
1707
1738
  try {
1708
- await w.delete(H(q.value.key)), J.value = !1, ee.value = !1, O.value++, f("delete:success", q.value);
1709
- } catch (B) {
1710
- m.value = ((G = (L = B.response) == null ? void 0 : L.data) == null ? void 0 : G.message) || B.message || p("errors.delete"), f("error", B);
1739
+ await x.delete(H(W.value.key)), X.value = !1, G.value = !1, D.value++, c("delete:success", W.value);
1740
+ } catch (_) {
1741
+ g.value = ((B = (J = _.response) == null ? void 0 : J.data) == null ? void 0 : B.message) || _.message || f("errors.delete"), c("error", _);
1711
1742
  } finally {
1712
- J.value = !1;
1743
+ X.value = !1;
1713
1744
  }
1714
1745
  }
1715
1746
  };
1716
- $e(Y, (E) => {
1717
- var L, G, B;
1718
- if (E.status === Ne.Error) {
1719
- Z.value = {
1720
- title: p("errors.general")
1721
- }, (B = (G = (L = E.error) == null ? void 0 : L.response) == null ? void 0 : G.data) != null && B.message && (Z.value.message = E.error.response.data.message), f("error", E.error);
1747
+ he(z, ($) => {
1748
+ var J, B, _;
1749
+ if ($.status === Ne.Error) {
1750
+ Y.value = {
1751
+ title: f("errors.general")
1752
+ }, (_ = (B = (J = $.error) == null ? void 0 : J.response) == null ? void 0 : B.data) != null && _.message && (Y.value.message = $.error.response.data.message), c("error", $.error);
1722
1753
  return;
1723
1754
  }
1724
- Z.value = null;
1755
+ Y.value = null;
1725
1756
  });
1726
- const z = I({
1727
- ctaPath: u.config.createRoute,
1757
+ const Z = U({
1758
+ ctaPath: n.config.createRoute,
1728
1759
  ctaText: void 0,
1729
- message: `${p("secrets.list.empty_state.description")}${u.config.additionMessageForEmptyState ? ` ${u.config.additionMessageForEmptyState}` : ""}`,
1730
- title: p("secrets.title")
1760
+ message: `${f("secrets.list.empty_state.description")}${n.config.additionMessageForEmptyState ? ` ${n.config.additionMessageForEmptyState}` : ""}`,
1761
+ title: f("secrets.title")
1731
1762
  });
1732
- return Ve(async () => {
1733
- await u.canCreate() && (z.value.title = p("secrets.list.empty_state.title"), z.value.ctaText = p("secrets.list.toolbar_actions.new_secret"));
1734
- }), (E, L) => {
1735
- const G = W("KButton"), B = W("KDropdownItem");
1736
- return x(), N(Le, null, [
1737
- c(e(Fe), {
1763
+ return ke(async () => {
1764
+ await n.canCreate() && (Z.value.title = f("secrets.list.empty_state.title"), Z.value.ctaText = f("secrets.list.toolbar_actions.new_secret"));
1765
+ }), ($, J) => {
1766
+ const B = N("KButton"), _ = N("KDropdownItem");
1767
+ return A(), q(Ge, null, [
1768
+ d(e(Oe), {
1738
1769
  "cache-identifier": l.cacheIdentifier,
1739
1770
  "disable-sorting": "",
1740
- "empty-state-options": z.value,
1771
+ "empty-state-options": Z.value,
1741
1772
  "enable-entity-actions": "",
1742
- "error-message": Z.value,
1743
- fetcher: e(oe),
1744
- "fetcher-cache-key": O.value,
1773
+ "error-message": Y.value,
1774
+ fetcher: e(re),
1775
+ "fetcher-cache-key": D.value,
1745
1776
  "pagination-type": "offset",
1746
1777
  "preferences-storage-key": "kong-ui-entities-secrets-list",
1747
- query: s.value,
1748
- "row-attributes": d,
1749
- "table-headers": e(y),
1750
- onClearSearchInput: o
1778
+ query: u.value,
1779
+ "row-attributes": p,
1780
+ "table-headers": e(b),
1781
+ onClearSearchInput: a
1751
1782
  }, {
1752
- "toolbar-filter": v(() => [
1753
- c(e(Oe), {
1754
- modelValue: s.value,
1755
- "onUpdate:modelValue": L[0] || (L[0] = (T) => s.value = T),
1756
- config: K
1783
+ "toolbar-filter": y(() => [
1784
+ d(e(qe), {
1785
+ modelValue: u.value,
1786
+ "onUpdate:modelValue": J[0] || (J[0] = (v) => u.value = v),
1787
+ config: O
1757
1788
  }, null, 8, ["modelValue"])
1758
1789
  ]),
1759
- "toolbar-button": v(() => [
1760
- c(e(se), {
1790
+ "toolbar-button": y(() => [
1791
+ d(e(fe), {
1761
1792
  "auth-function": () => l.canCreate()
1762
1793
  }, {
1763
- default: v(() => [
1764
- c(G, {
1794
+ default: y(() => [
1795
+ d(B, {
1765
1796
  appearance: "primary",
1766
1797
  "data-testid": "toolbar-add-secret",
1767
1798
  size: "large",
1768
1799
  to: l.config.createRoute
1769
1800
  }, {
1770
- default: v(() => [
1771
- c(e(Me)),
1772
- ne(" " + F(e(p)("secrets.list.toolbar_actions.new_secret")), 1)
1801
+ default: y(() => [
1802
+ d(e(Me)),
1803
+ pe(" " + P(e(f)("secrets.list.toolbar_actions.new_secret")), 1)
1773
1804
  ]),
1774
1805
  _: 1
1775
1806
  }, 8, ["to"])
@@ -1777,38 +1808,38 @@ const _t = { class: "kong-ui-entities-vault-form" }, Vt = { class: "vault-form-p
1777
1808
  _: 1
1778
1809
  }, 8, ["auth-function"])
1779
1810
  ]),
1780
- key: v(({ rowValue: T }) => [
1781
- R("div", Nt, [
1782
- R("b", null, F(T ?? "-"), 1)
1811
+ key: y(({ rowValue: v }) => [
1812
+ R("div", qt, [
1813
+ R("b", null, P(v ?? "-"), 1)
1783
1814
  ])
1784
1815
  ]),
1785
- updated_at: v(({ rowValue: T }) => [
1786
- R("span", null, F(T ? e(a)(new Date(T).getTime() / 1e3) : "-"), 1)
1816
+ updated_at: y(({ rowValue: v }) => [
1817
+ R("span", null, P(v ? e(o)(new Date(v).getTime() / 1e3) : "-"), 1)
1787
1818
  ]),
1788
- actions: v(({ row: T }) => [
1789
- c(e(se), {
1790
- "auth-function": () => l.canEdit(T)
1819
+ actions: y(({ row: v }) => [
1820
+ d(e(fe), {
1821
+ "auth-function": () => l.canEdit(v)
1791
1822
  }, {
1792
- default: v(() => [
1793
- c(B, {
1823
+ default: y(() => [
1824
+ d(_, {
1794
1825
  "data-testid": "action-entity-edit",
1795
- item: X(T.key)
1826
+ item: ee(v.key)
1796
1827
  }, null, 8, ["item"])
1797
1828
  ]),
1798
1829
  _: 2
1799
1830
  }, 1032, ["auth-function"]),
1800
- c(e(se), {
1801
- "auth-function": () => l.canDelete(T)
1831
+ d(e(fe), {
1832
+ "auth-function": () => l.canDelete(v)
1802
1833
  }, {
1803
- default: v(() => [
1804
- c(B, {
1834
+ default: y(() => [
1835
+ d(_, {
1805
1836
  danger: "",
1806
1837
  "data-testid": "action-entity-delete",
1807
1838
  "has-divider": "",
1808
- onClick: (ve) => U(T)
1839
+ onClick: (T) => M(v)
1809
1840
  }, {
1810
- default: v(() => [
1811
- ne(F(e(p)("actions.delete")), 1)
1841
+ default: y(() => [
1842
+ pe(P(e(f)("actions.delete")), 1)
1812
1843
  ]),
1813
1844
  _: 2
1814
1845
  }, 1032, ["onClick"])
@@ -1818,21 +1849,21 @@ const _t = { class: "kong-ui-entities-vault-form" }, Vt = { class: "vault-form-p
1818
1849
  ]),
1819
1850
  _: 1
1820
1851
  }, 8, ["cache-identifier", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers"]),
1821
- c(e(qe), {
1822
- "action-pending": J.value,
1823
- description: e(p)("delete.description"),
1824
- "entity-name": q.value && q.value.key,
1825
- "entity-type": e(De).Secret,
1826
- error: m.value,
1827
- title: e(p)("delete.title_for_secret"),
1828
- visible: ee.value,
1852
+ d(e(De), {
1853
+ "action-pending": X.value,
1854
+ description: e(f)("delete.description"),
1855
+ "entity-name": W.value && W.value.key,
1856
+ "entity-type": e(We).Secret,
1857
+ error: g.value,
1858
+ title: e(f)("delete.title_for_secret"),
1859
+ visible: G.value,
1829
1860
  onCancel: j,
1830
1861
  onProceed: te
1831
1862
  }, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
1832
1863
  ], 64);
1833
1864
  };
1834
1865
  }
1835
- }), Ot = /* @__PURE__ */ ge(Ft, [["__scopeId", "data-v-692e0f7e"]]), qt = { class: "kong-ui-entities-secrets-list" }, Dt = /* @__PURE__ */ ce({
1866
+ }), Wt = /* @__PURE__ */ ce(Dt, [["__scopeId", "data-v-692e0f7e"]]), jt = { class: "kong-ui-entities-secrets-list" }, Bt = /* @__PURE__ */ ie({
1836
1867
  __name: "SecretList",
1837
1868
  props: {
1838
1869
  /** The base konnect config. Pass additional config props in the shared entity component as needed. */
@@ -1871,33 +1902,33 @@ const _t = { class: "kong-ui-entities-vault-form" }, Vt = { class: "vault-form-p
1871
1902
  }
1872
1903
  },
1873
1904
  emits: ["error", "delete:success"],
1874
- setup(l, { emit: M }) {
1875
- var d;
1876
- const f = M, u = l, p = (k) => {
1877
- f("error", k);
1878
- }, a = (k) => {
1879
- f("delete:success", k);
1880
- }, { axiosInstance: w } = me((d = u.config) == null ? void 0 : d.axiosRequestConfig), S = I(""), y = V(() => {
1881
- var k;
1882
- return `${u.config.apiBaseUrl}${ye.getVault[u.config.app]}`.replace(/{controlPlaneId}/gi, ((k = u.config) == null ? void 0 : k.controlPlaneId) || "").replace(/{id}/gi, u.vaultId);
1905
+ setup(l, { emit: I }) {
1906
+ var p;
1907
+ const c = I, n = l, f = (h) => {
1908
+ c("error", h);
1909
+ }, o = (h) => {
1910
+ c("delete:success", h);
1911
+ }, { axiosInstance: x } = ve((p = n.config) == null ? void 0 : p.axiosRequestConfig), C = U(""), b = E(() => {
1912
+ var h;
1913
+ return `${n.config.apiBaseUrl}${me.getVault[n.config.app]}`.replace(/{controlPlaneId}/gi, ((h = n.config) == null ? void 0 : h.controlPlaneId) || "").replace(/{id}/gi, n.vaultId);
1883
1914
  });
1884
- return Ve(async () => {
1885
- var k;
1915
+ return ke(async () => {
1916
+ var h;
1886
1917
  try {
1887
- const { data: s } = await w.get(y.value);
1888
- S.value = (k = s == null ? void 0 : s.config) == null ? void 0 : k.config_store_id;
1889
- } catch (s) {
1890
- f("error", s);
1918
+ const { data: u } = await x.get(b.value);
1919
+ C.value = (h = u == null ? void 0 : u.config) == null ? void 0 : h.config_store_id;
1920
+ } catch (u) {
1921
+ c("error", u);
1891
1922
  }
1892
- }), (k, s) => (x(), N("div", qt, [
1893
- S.value ? (x(), ae(Ot, He({ key: 0 }, u, {
1894
- "config-store-id": S.value,
1895
- "onDelete:success": a,
1896
- onError: p
1897
- }), null, 16, ["config-store-id"])) : Q("", !0)
1923
+ }), (h, u) => (A(), q("div", jt, [
1924
+ C.value ? (A(), oe(Wt, Pe({ key: 0 }, n, {
1925
+ "config-store-id": C.value,
1926
+ "onDelete:success": o,
1927
+ onError: f
1928
+ }), null, 16, ["config-store-id"])) : ae("", !0)
1898
1929
  ]));
1899
1930
  }
1900
- }), tl = /* @__PURE__ */ ge(Dt, [["__scopeId", "data-v-0f9047e6"]]), Wt = /* @__PURE__ */ ce({
1931
+ }), _l = /* @__PURE__ */ ce(Bt, [["__scopeId", "data-v-0f9047e6"]]), Lt = /* @__PURE__ */ ie({
1901
1932
  inheritAttrs: !1,
1902
1933
  __name: "SecretFormInner",
1903
1934
  props: {
@@ -1920,105 +1951,105 @@ const _t = { class: "kong-ui-entities-vault-form" }, Vt = { class: "vault-form-p
1920
1951
  }
1921
1952
  },
1922
1953
  emits: ["update", "error", "loading"],
1923
- setup(l, { emit: M }) {
1924
- var J;
1925
- const f = l, u = M, { i18n: { t: p } } = he.useI18n(), a = Se(), { axiosInstance: w } = me((J = f.config) == null ? void 0 : J.axiosRequestConfig), { getMessageFromError: S } = We(), y = de({
1954
+ setup(l, { emit: I }) {
1955
+ var X;
1956
+ const c = l, n = I, { i18n: { t: f } } = ge.useI18n(), o = Ie(), { axiosInstance: x } = ve((X = c.config) == null ? void 0 : X.axiosRequestConfig), { getMessageFromError: C } = je(), b = _e({
1926
1957
  fields: {
1927
1958
  key: "",
1928
1959
  value: ""
1929
1960
  },
1930
1961
  readonly: !1,
1931
1962
  errorMessage: ""
1932
- }), d = de({
1963
+ }), p = _e({
1933
1964
  key: "",
1934
1965
  value: ""
1935
- }), k = V(
1966
+ }), h = E(
1936
1967
  () => {
1937
- var m, H;
1938
- return (H = ye.form[(m = f.config) == null ? void 0 : m.app]) == null ? void 0 : H.edit.replace(/{id}/gi, f.configStoreId).replace(/{secretId}/gi, f.secretId);
1968
+ var g, H;
1969
+ return (H = me.form[(g = c.config) == null ? void 0 : g.app]) == null ? void 0 : H.edit.replace(/{id}/gi, c.configStoreId).replace(/{secretId}/gi, c.secretId);
1939
1970
  }
1940
- ), s = () => {
1941
- var m;
1942
- a.push(((m = f.config) == null ? void 0 : m.cancelRoute) || { name: "secret-list" });
1943
- }, K = (m) => {
1944
- u("loading", m);
1945
- }, O = (m) => {
1946
- u("error", m);
1947
- }, oe = (m) => {
1948
- var H, U;
1949
- y.fields.key = ((H = m == null ? void 0 : m.item) == null ? void 0 : H.key) || (m == null ? void 0 : m.key) || "", y.fields.value = ((U = m == null ? void 0 : m.item) == null ? void 0 : U.value) || (m == null ? void 0 : m.value) || "", Object.assign(d, y.fields);
1950
- }, Y = V(() => f.secretId ? fe.Edit : fe.Create), o = V(() => {
1951
- var m;
1952
- return `${f.config.apiBaseUrl}${ye.form[f.config.app][Y.value]}`.replace(/{controlPlaneId}/gi, ((m = f.config) == null ? void 0 : m.controlPlaneId) || "").replace(/{id}/gi, f.configStoreId).replace(/{secretId}/gi, f.secretId);
1953
- }), Z = V(() => !!y.fields.key && !!y.fields.value), X = V(() => JSON.stringify(y.fields) !== JSON.stringify(d)), q = V(() => ({
1954
- key: y.fields.key,
1955
- value: y.fields.value
1956
- })), ee = async () => {
1971
+ ), u = () => {
1972
+ var g;
1973
+ o.push(((g = c.config) == null ? void 0 : g.cancelRoute) || { name: "secret-list" });
1974
+ }, O = (g) => {
1975
+ n("loading", g);
1976
+ }, D = (g) => {
1977
+ n("error", g);
1978
+ }, re = (g) => {
1979
+ var H, M;
1980
+ b.fields.key = ((H = g == null ? void 0 : g.item) == null ? void 0 : H.key) || (g == null ? void 0 : g.key) || "", b.fields.value = ((M = g == null ? void 0 : g.item) == null ? void 0 : M.value) || (g == null ? void 0 : g.value) || "", Object.assign(p, b.fields);
1981
+ }, z = E(() => c.secretId ? be.Edit : be.Create), a = E(() => {
1982
+ var g;
1983
+ return `${c.config.apiBaseUrl}${me.form[c.config.app][z.value]}`.replace(/{controlPlaneId}/gi, ((g = c.config) == null ? void 0 : g.controlPlaneId) || "").replace(/{id}/gi, c.configStoreId).replace(/{secretId}/gi, c.secretId);
1984
+ }), Y = E(() => !!b.fields.key && !!b.fields.value), ee = E(() => JSON.stringify(b.fields) !== JSON.stringify(p)), W = E(() => ({
1985
+ key: b.fields.key,
1986
+ value: b.fields.value
1987
+ })), G = async () => {
1957
1988
  try {
1958
- y.readonly = !0;
1959
- let m;
1960
- Y.value === "create" ? m = await w.post(o.value, q.value) : Y.value === "edit" && (m = await w.put(o.value, q.value)), oe(m == null ? void 0 : m.data), u("update", m == null ? void 0 : m.data);
1961
- } catch (m) {
1962
- y.errorMessage = S(m), u("error", m);
1989
+ b.readonly = !0;
1990
+ let g;
1991
+ z.value === "create" ? g = await x.post(a.value, W.value) : z.value === "edit" && (g = await x.put(a.value, W.value)), re(g == null ? void 0 : g.data), n("update", g == null ? void 0 : g.data);
1992
+ } catch (g) {
1993
+ b.errorMessage = C(g), n("error", g);
1963
1994
  } finally {
1964
- y.readonly = !1;
1995
+ b.readonly = !1;
1965
1996
  }
1966
1997
  };
1967
- return (m, H) => {
1968
- const U = W("KInput"), j = W("KTextArea"), te = W("KAlert");
1969
- return x(), ae(e(je), {
1970
- "can-submit": Z.value && X.value,
1998
+ return (g, H) => {
1999
+ const M = N("KInput"), j = N("KTextArea"), te = N("KAlert");
2000
+ return A(), oe(e(Be), {
2001
+ "can-submit": Y.value && ee.value,
1971
2002
  config: l.config,
1972
2003
  "edit-id": l.secretId,
1973
- "entity-type": e(Ee).Other,
1974
- "error-message": y.errorMessage,
1975
- "fetch-url": k.value,
1976
- "form-fields": q.value,
1977
- "is-readonly": y.readonly,
1978
- onCancel: s,
1979
- "onFetch:error": O,
1980
- "onFetch:success": oe,
1981
- onLoading: K,
1982
- onSubmit: ee
2004
+ "entity-type": e(xe).Other,
2005
+ "error-message": b.errorMessage,
2006
+ "fetch-url": h.value,
2007
+ "form-fields": W.value,
2008
+ "is-readonly": b.readonly,
2009
+ onCancel: u,
2010
+ "onFetch:error": D,
2011
+ "onFetch:success": re,
2012
+ onLoading: O,
2013
+ onSubmit: G
1983
2014
  }, {
1984
- default: v(() => [
2015
+ default: y(() => [
1985
2016
  R("div", null, [
1986
- c(e(we), {
1987
- description: e(p)("secrets.form.info.description"),
2017
+ d(e(Se), {
2018
+ description: e(f)("secrets.form.info.description"),
1988
2019
  "has-divider": "",
1989
- title: e(p)("secrets.form.info.title")
2020
+ title: e(f)("secrets.form.info.title")
1990
2021
  }, {
1991
- default: v(() => [
1992
- c(U, {
1993
- modelValue: y.fields.key,
1994
- "onUpdate:modelValue": H[0] || (H[0] = (z) => y.fields.key = z),
2022
+ default: y(() => [
2023
+ d(M, {
2024
+ modelValue: b.fields.key,
2025
+ "onUpdate:modelValue": H[0] || (H[0] = (Z) => b.fields.key = Z),
1995
2026
  modelModifiers: { trim: !0 },
1996
2027
  autocomplete: "off",
1997
2028
  class: "key-field",
1998
2029
  "data-testid": "secret-form-key",
1999
- disabled: Y.value === e(fe).Edit,
2000
- label: e(p)("secrets.form.fields.key.label"),
2001
- placeholder: e(p)("secrets.form.fields.key.placeholder"),
2002
- readonly: y.readonly,
2030
+ disabled: z.value === e(be).Edit,
2031
+ label: e(f)("secrets.form.fields.key.label"),
2032
+ placeholder: e(f)("secrets.form.fields.key.placeholder"),
2033
+ readonly: b.readonly,
2003
2034
  required: "",
2004
2035
  type: "text"
2005
2036
  }, null, 8, ["modelValue", "disabled", "label", "placeholder", "readonly"]),
2006
- c(j, {
2007
- modelValue: y.fields.value,
2008
- "onUpdate:modelValue": H[1] || (H[1] = (z) => y.fields.value = z),
2037
+ d(j, {
2038
+ modelValue: b.fields.value,
2039
+ "onUpdate:modelValue": H[1] || (H[1] = (Z) => b.fields.value = Z),
2009
2040
  modelModifiers: { trim: !0 },
2010
2041
  autocomplete: "off",
2011
2042
  "data-testid": "secret-form-value",
2012
- label: e(p)("secrets.form.fields.value.label"),
2013
- placeholder: e(p)("secrets.form.fields.value.placeholder"),
2014
- readonly: y.readonly,
2043
+ label: e(f)("secrets.form.fields.value.label"),
2044
+ placeholder: e(f)("secrets.form.fields.value.placeholder"),
2045
+ readonly: b.readonly,
2015
2046
  required: "",
2016
2047
  resizable: "",
2017
2048
  type: "text"
2018
2049
  }, null, 8, ["modelValue", "label", "placeholder", "readonly"]),
2019
- c(te, {
2050
+ d(te, {
2020
2051
  appearance: "warning",
2021
- message: e(p)("secrets.form.hint")
2052
+ message: e(f)("secrets.form.hint")
2022
2053
  }, null, 8, ["message"])
2023
2054
  ]),
2024
2055
  _: 1
@@ -2029,7 +2060,7 @@ const _t = { class: "kong-ui-entities-vault-form" }, Vt = { class: "vault-form-p
2029
2060
  }, 8, ["can-submit", "config", "edit-id", "entity-type", "error-message", "fetch-url", "form-fields", "is-readonly"]);
2030
2061
  };
2031
2062
  }
2032
- }), jt = /* @__PURE__ */ ge(Wt, [["__scopeId", "data-v-eb9c7fc4"]]), Bt = { class: "kong-ui-entities-secret-form" }, zt = /* @__PURE__ */ ce({
2063
+ }), zt = /* @__PURE__ */ ce(Lt, [["__scopeId", "data-v-eb9c7fc4"]]), Gt = { class: "kong-ui-entities-secret-form" }, Zt = /* @__PURE__ */ ie({
2033
2064
  __name: "SecretForm",
2034
2065
  props: {
2035
2066
  /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
@@ -2051,44 +2082,327 @@ const _t = { class: "kong-ui-entities-vault-form" }, Vt = { class: "vault-form-p
2051
2082
  }
2052
2083
  },
2053
2084
  emits: ["update", "error", "loading"],
2054
- setup(l, { emit: M }) {
2055
- var k;
2056
- const f = l, u = M, p = (s) => {
2057
- u("update", s);
2058
- }, a = (s) => {
2059
- u("error", s);
2060
- }, w = (s) => {
2061
- u("loading", s);
2062
- }, { axiosInstance: S } = me((k = f.config) == null ? void 0 : k.axiosRequestConfig), y = I(""), d = V(() => {
2063
- var s;
2064
- return `${f.config.apiBaseUrl}${ye.getVault[f.config.app]}`.replace(/{controlPlaneId}/gi, ((s = f.config) == null ? void 0 : s.controlPlaneId) || "").replace(/{id}/gi, f.vaultId);
2085
+ setup(l, { emit: I }) {
2086
+ var h;
2087
+ const c = l, n = I, f = (u) => {
2088
+ n("update", u);
2089
+ }, o = (u) => {
2090
+ n("error", u);
2091
+ }, x = (u) => {
2092
+ n("loading", u);
2093
+ }, { axiosInstance: C } = ve((h = c.config) == null ? void 0 : h.axiosRequestConfig), b = U(""), p = E(() => {
2094
+ var u;
2095
+ return `${c.config.apiBaseUrl}${me.getVault[c.config.app]}`.replace(/{controlPlaneId}/gi, ((u = c.config) == null ? void 0 : u.controlPlaneId) || "").replace(/{id}/gi, c.vaultId);
2065
2096
  });
2066
- return Ve(async () => {
2067
- var s;
2097
+ return ke(async () => {
2098
+ var u;
2068
2099
  try {
2069
- const { data: K } = await S.get(d.value);
2070
- y.value = (s = K == null ? void 0 : K.config) == null ? void 0 : s.config_store_id;
2071
- } catch (K) {
2072
- u("error", K);
2100
+ const { data: O } = await C.get(p.value);
2101
+ b.value = (u = O == null ? void 0 : O.config) == null ? void 0 : u.config_store_id;
2102
+ } catch (O) {
2103
+ n("error", O);
2073
2104
  }
2074
- }), (s, K) => (x(), N("div", Bt, [
2075
- y.value ? (x(), ae(jt, He({ key: 0 }, f, {
2076
- "config-store-id": y.value,
2077
- onError: a,
2078
- onLoading: w,
2079
- onUpdate: p
2080
- }), null, 16, ["config-store-id"])) : Q("", !0)
2105
+ }), (u, O) => (A(), q("div", Gt, [
2106
+ b.value ? (A(), oe(zt, Pe({ key: 0 }, c, {
2107
+ "config-store-id": b.value,
2108
+ onError: o,
2109
+ onLoading: x,
2110
+ onUpdate: f
2111
+ }), null, 16, ["config-store-id"])) : ae("", !0)
2081
2112
  ]));
2082
2113
  }
2083
- }), ll = /* @__PURE__ */ ge(zt, [["__scopeId", "data-v-02e6d2f3"]]);
2114
+ }), bl = /* @__PURE__ */ ce(Zt, [["__scopeId", "data-v-02e6d2f3"]]), Jt = {
2115
+ class: "vault-secret-picker-provider"
2116
+ }, Qt = /* @__PURE__ */ ie({
2117
+ __name: "VaultSecretPickerProvider",
2118
+ props: {
2119
+ value: {},
2120
+ update: {
2121
+ type: Function
2122
+ }
2123
+ },
2124
+ emits: ["open"],
2125
+ setup(l, {
2126
+ emit: I
2127
+ }) {
2128
+ const c = l, n = I, {
2129
+ i18n: {
2130
+ t: f
2131
+ },
2132
+ i18nT: o
2133
+ } = ge.useI18n();
2134
+ return (x, C) => (A(), q("div", Jt, [d(e(o), {
2135
+ keypath: "vault_secret_picker.provider.complete_action",
2136
+ scope: "global"
2137
+ }, {
2138
+ cta: y(() => [R("span", {
2139
+ class: "vault-secret-picker-provider-action",
2140
+ onClick: C[0] || (C[0] = () => n("open", c.value, c.update))
2141
+ }, P(e(f)("vault_secret_picker.provider.cta")), 1)]),
2142
+ _: 1
2143
+ })]));
2144
+ }
2145
+ }), yl = /* @__PURE__ */ ce(Qt, [["__scopeId", "data-v-200e7f4d"]]), Yt = (l) => {
2146
+ let I = l.trim();
2147
+ if (!I.startsWith("{") || !I.endsWith("}"))
2148
+ throw new Error("Invalid secret reference: must be enclosed in curly braces");
2149
+ if (I = I.substring(1, I.length - 1).trim(), !I.startsWith("vault://"))
2150
+ throw new Error("Invalid secret reference: must start with vault://");
2151
+ const c = new URL(`http://${I.substring(8)}`);
2152
+ if (!c)
2153
+ throw new Error("Invalid secret reference: must have a vault prefix");
2154
+ const n = c.host, [, f, ...o] = c.pathname.split("/");
2155
+ if (!n)
2156
+ throw new Error("Invalid secret reference: must have a vault prefix");
2157
+ return {
2158
+ vaultPrefix: n,
2159
+ secretId: f || void 0,
2160
+ // Non-empty string or undefined
2161
+ optionalSecretKey: o == null ? void 0 : o.join("/")
2162
+ // Non-empty string or undefined
2163
+ };
2164
+ }, Xt = (l) => {
2165
+ if (!l.vaultPrefix)
2166
+ throw new Error("Invalid secret reference: must have a vault prefix");
2167
+ let I = `vault://${l.vaultPrefix}`;
2168
+ return l.secretId && (I = `${I}/${l.secretId}`), l.optionalSecretKey && (I = `${I}/${l.optionalSecretKey}`), `{${I}}`;
2169
+ }, el = {
2170
+ key: 1,
2171
+ class: "inputs-wrapper"
2172
+ }, tl = { "data-testid": "no-search-results" }, ll = { class: "k-select-selected-item-label" }, ol = { class: "vault-secret-picker-vault-dropdown-item" }, al = { class: "select-item-label" }, rl = { class: "select-item-description" }, il = { class: "select-item-description" }, nl = { "data-testid": "no-search-results" }, sl = /* @__PURE__ */ ie({
2173
+ __name: "VaultSecretPicker",
2174
+ props: {
2175
+ config: {
2176
+ type: Object,
2177
+ required: !0,
2178
+ validator: (l) => !(!l || !["konnect", "kongManager"].includes(l == null ? void 0 : l.app) || l.app === "konnect" && !l.controlPlaneId || l.app === "kongManager" && typeof l.workspace != "string")
2179
+ },
2180
+ setup: {
2181
+ type: null,
2182
+ required: !1,
2183
+ default: !1
2184
+ }
2185
+ },
2186
+ emits: ["proceed", "cancel"],
2187
+ setup(l, { emit: I }) {
2188
+ var B;
2189
+ const { i18n: { t: c } } = ge.useI18n(), n = l, f = I, { axiosInstance: o } = ve({
2190
+ // 404 errors are allowed in this components
2191
+ validateStatus: (_) => _ === 404 || _ >= 200 && _ < 300,
2192
+ // Spread the passed-in config later to allow overriding
2193
+ ...(B = n.config) == null ? void 0 : B.axiosRequestConfig
2194
+ }), x = U(!1), C = U(""), b = U(""), p = U(""), h = U(), u = E(() => {
2195
+ var _, v;
2196
+ return n.config.app === "konnect" ? me.list[n.config.app].replace(/{id}/gi, ((v = (_ = h.value) == null ? void 0 : _.config) == null ? void 0 : v.config_store_id) ?? "") : "<not_applicable>";
2197
+ }), O = E(() => {
2198
+ if (z && G)
2199
+ return c("vault_secret_picker.fetch_error.vaults_and_secrets");
2200
+ if (z)
2201
+ return c("vault_secret_picker.fetch_error.vaults");
2202
+ if (G)
2203
+ return c("vault_secret_picker.fetch_error.secrets");
2204
+ }), {
2205
+ debouncedQueryChange: D,
2206
+ loading: re,
2207
+ error: z,
2208
+ loadItems: a,
2209
+ results: Y
2210
+ } = Te(n.config, se.list[n.config.app].getAll, void 0, {
2211
+ fetchedItemsKey: "data",
2212
+ searchKeys: ["prefix"]
2213
+ }), {
2214
+ debouncedQueryChange: ee,
2215
+ loading: W,
2216
+ error: G,
2217
+ loadItems: X,
2218
+ results: g
2219
+ } = Te(n.config, u, void 0, {
2220
+ fetchedItemsKey: "data",
2221
+ searchKeys: ["key"],
2222
+ exactMatchKey: "key"
2223
+ }), H = E(() => {
2224
+ var T;
2225
+ let _ = !1;
2226
+ const v = ((T = Y.value) == null ? void 0 : T.map((m) => (m.prefix === C.value && (_ = !0), { label: m.prefix, value: m.prefix, vault: m }))) ?? [];
2227
+ return !_ && h.value && v.push({
2228
+ label: h.value.prefix,
2229
+ value: h.value.prefix,
2230
+ vault: h.value
2231
+ }), v;
2232
+ }), M = E(() => {
2233
+ var T;
2234
+ let _ = !1;
2235
+ const v = ((T = g.value) == null ? void 0 : T.map((m) => (m.key === b.value && (_ = !0), { label: m.key, value: m.key }))) ?? [];
2236
+ return !_ && b.value && v.push({ label: b.value, value: b.value }), v;
2237
+ }), j = E(() => {
2238
+ var _;
2239
+ return ((_ = h == null ? void 0 : h.value) == null ? void 0 : _.name) === "konnect";
2240
+ }), te = E(() => !!h.value && !!b.value), Z = (_) => _.label ? `${_.label} - (${_.vault.name} - ${_.vault.id})` : _.value, ne = (_) => {
2241
+ var T, m;
2242
+ let v = `${n.config.apiBaseUrl}${se.form[n.config.app].edit}`;
2243
+ return n.config.app === "konnect" ? v = v.replace(/{controlPlaneId}/gi, ((T = n.config) == null ? void 0 : T.controlPlaneId) || "") : n.config.app === "kongManager" && (v = v.replace(/\/{workspace}/gi, (m = n.config) != null && m.workspace ? `/${n.config.workspace}` : "")), v.replace(/{id}/gi, _);
2244
+ }, $ = (_, v) => {
2245
+ var T;
2246
+ return n.config.app !== "konnect" ? "<not_applicable>" : `${n.config.apiBaseUrl}${me.form[n.config.app].edit}`.replace(/{controlPlaneId}/gi, ((T = n.config) == null ? void 0 : T.controlPlaneId) || "").replace(/{id}/gi, v).replace(/{secretId}/gi, _);
2247
+ }, J = () => {
2248
+ f("proceed", Xt({
2249
+ vaultPrefix: C.value,
2250
+ secretId: b.value || void 0,
2251
+ // Either a non-empty string or undefined
2252
+ optionalSecretKey: p.value || void 0
2253
+ // Either a non-empty string or undefined
2254
+ }));
2255
+ };
2256
+ return he(() => n.setup, async (_) => {
2257
+ if (_ !== !1) {
2258
+ if (x.value = !0, C.value = "", h.value = void 0, b.value = "", p.value = "", typeof _ == "string" && _.trim().length > 0)
2259
+ try {
2260
+ let v, T = "", m = "", w = "";
2261
+ const V = Yt(_), { data: k } = await o.get(ne(V.vaultPrefix));
2262
+ if (k != null && k.name)
2263
+ if (v = k, T = V.vaultPrefix, v.name === "konnect") {
2264
+ if (V.secretId) {
2265
+ const { data: le } = await o.get($(V.secretId, k.config.config_store_id));
2266
+ le.key === V.secretId && (m = V.secretId, w = V.optionalSecretKey ?? "");
2267
+ }
2268
+ } else
2269
+ m = V.secretId ?? "", w = V.optionalSecretKey ?? "";
2270
+ await Ze(() => {
2271
+ C.value = T, h.value = v, b.value = m, p.value = w;
2272
+ });
2273
+ } catch (v) {
2274
+ console.debug(v);
2275
+ }
2276
+ x.value = !1, await a();
2277
+ }
2278
+ }, { immediate: !0 }), he(C, async (_, v) => {
2279
+ var T;
2280
+ x.value || _ === v || (h.value = (T = H.value.find((m) => m.value === _)) == null ? void 0 : T.vault, b.value = "", p.value = "");
2281
+ }), he(u, async () => {
2282
+ j.value && await X();
2283
+ }, { immediate: !0 }), (_, v) => {
2284
+ const T = N("KEmptyState"), m = N("KSelect"), w = N("KInput"), V = N("KModal");
2285
+ return A(), oe(V, {
2286
+ "action-button-disabled": !te.value,
2287
+ "action-button-text": e(c)("vault_secret_picker.actions.use_key"),
2288
+ class: "vault-secret-picker",
2289
+ "data-testid": "vault-secret-picker-modal",
2290
+ title: e(c)("vault_secret_picker.title"),
2291
+ visible: n.setup !== !1,
2292
+ onCancel: v[4] || (v[4] = () => f("cancel")),
2293
+ onProceed: J
2294
+ }, {
2295
+ default: y(() => [
2296
+ e(z) || e(G) ? (A(), oe(T, {
2297
+ key: 0,
2298
+ "data-testid": "vault-secret-picker-fetch-error",
2299
+ "icon-variant": "error",
2300
+ message: O.value
2301
+ }, null, 8, ["message"])) : (A(), q("div", el, [
2302
+ d(m, {
2303
+ modelValue: C.value,
2304
+ "onUpdate:modelValue": v[0] || (v[0] = (k) => C.value = k),
2305
+ clearable: "",
2306
+ "data-testid": "vault-secret-picker-vault-select",
2307
+ disabled: x.value,
2308
+ "enable-filtering": "",
2309
+ "filter-function": () => !0,
2310
+ items: H.value,
2311
+ "kpop-attributes": { "data-testid": "vault-secret-picker-vault-popover" },
2312
+ label: e(c)("vault_secret_picker.vault.label"),
2313
+ loading: e(re),
2314
+ placeholder: e(c)("vault_secret_picker.vault.placeholder"),
2315
+ required: "",
2316
+ "reuse-item-template": "",
2317
+ width: "100%",
2318
+ onQueryChange: e(D)
2319
+ }, {
2320
+ loading: y(() => [
2321
+ R("div", null, P(e(c)("actions.loading")), 1)
2322
+ ]),
2323
+ empty: y(() => [
2324
+ R("div", tl, P(e(c)("vault_secret_picker.no_results")), 1)
2325
+ ]),
2326
+ "selected-item-template": y(({ item: k }) => [
2327
+ R("span", ll, P(Z(k)), 1)
2328
+ ]),
2329
+ "item-template": y(({ item: k }) => [
2330
+ R("div", ol, [
2331
+ R("span", al, P(k.label), 1),
2332
+ R("span", rl, P(k.vault.name), 1),
2333
+ R("span", il, P(k.vault.id), 1)
2334
+ ])
2335
+ ]),
2336
+ _: 1
2337
+ }, 8, ["modelValue", "disabled", "items", "label", "loading", "placeholder", "onQueryChange"]),
2338
+ j.value ? (A(), oe(m, {
2339
+ key: 0,
2340
+ modelValue: b.value,
2341
+ "onUpdate:modelValue": v[1] || (v[1] = (k) => b.value = k),
2342
+ clearable: "",
2343
+ "data-testid": "vault-secret-picker-secret-id-select",
2344
+ disabled: x.value || !h.value,
2345
+ "enable-filtering": "",
2346
+ "filter-function": () => !0,
2347
+ items: M.value,
2348
+ "kpop-attributes": { "data-testid": "vault-secret-picker-secret-id-popover" },
2349
+ label: e(c)("vault_secret_picker.secret_id.label"),
2350
+ loading: e(W),
2351
+ placeholder: e(c)("vault_secret_picker.secret_id.select_placeholder"),
2352
+ required: "",
2353
+ "reuse-item-template": "",
2354
+ width: "100%",
2355
+ onQueryChange: e(ee)
2356
+ }, {
2357
+ loading: y(() => [
2358
+ R("div", null, P(e(c)("actions.loading")), 1)
2359
+ ]),
2360
+ empty: y(() => [
2361
+ R("div", nl, P(e(c)("vault_secret_picker.no_results")), 1)
2362
+ ]),
2363
+ _: 1
2364
+ }, 8, ["modelValue", "disabled", "items", "label", "loading", "placeholder", "onQueryChange"])) : (A(), oe(w, {
2365
+ key: 1,
2366
+ modelValue: b.value,
2367
+ "onUpdate:modelValue": v[2] || (v[2] = (k) => b.value = k),
2368
+ modelModifiers: { trim: !0 },
2369
+ autocomplete: "off",
2370
+ "data-testid": "vault-secret-picker-secret-id-input",
2371
+ disabled: x.value || !h.value,
2372
+ label: e(c)("vault_secret_picker.secret_id.label"),
2373
+ placeholder: e(c)("vault_secret_picker.secret_id.input_placeholder"),
2374
+ required: "",
2375
+ type: "text"
2376
+ }, null, 8, ["modelValue", "disabled", "label", "placeholder"])),
2377
+ d(w, {
2378
+ modelValue: p.value,
2379
+ "onUpdate:modelValue": v[3] || (v[3] = (k) => p.value = k),
2380
+ modelModifiers: { trim: !0 },
2381
+ autocomplete: "off",
2382
+ "data-testid": "vault-secret-picker-secret-key-input",
2383
+ disabled: x.value || !h.value,
2384
+ help: e(c)("vault_secret_picker.optional_secret_key.help"),
2385
+ label: e(c)("vault_secret_picker.optional_secret_key.label"),
2386
+ placeholder: e(c)("vault_secret_picker.optional_secret_key.placeholder"),
2387
+ type: "text"
2388
+ }, null, 8, ["modelValue", "disabled", "help", "label", "placeholder"])
2389
+ ]))
2390
+ ]),
2391
+ _: 1
2392
+ }, 8, ["action-button-disabled", "action-button-text", "title", "visible"]);
2393
+ };
2394
+ }
2395
+ }), hl = /* @__PURE__ */ ce(sl, [["__scopeId", "data-v-df8552cc"]]);
2084
2396
  export {
2085
- ll as SecretForm,
2086
- tl as SecretList,
2087
- A as VaultAuthMethods,
2088
- el as VaultConfigCard,
2089
- Xt as VaultForm,
2090
- Yt as VaultList,
2397
+ bl as SecretForm,
2398
+ _l as SecretList,
2399
+ F as VaultAuthMethods,
2400
+ gl as VaultConfigCard,
2401
+ vl as VaultForm,
2402
+ ml as VaultList,
2091
2403
  t as VaultProviders,
2092
- ye as secretsEndpoints,
2093
- pe as vaultsEndpoints
2404
+ hl as VaultSecretPicker,
2405
+ yl as VaultSecretPickerProvider,
2406
+ me as secretsEndpoints,
2407
+ se as vaultsEndpoints
2094
2408
  };