@scalar/api-client 2.2.22 → 2.2.24

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.
Files changed (127) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBar.vue.js +2 -2
  4. package/dist/components/AddressBar/AddressBar.vue2.js +69 -70
  5. package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
  6. package/dist/components/AddressBar/AddressBarServer.vue.js +69 -61
  7. package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts.map +1 -1
  8. package/dist/components/AddressBar/AddressBarServerItem.vue.js +17 -16
  9. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  10. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  11. package/dist/components/CodeInput/CodeInput.vue2.js +46 -46
  12. package/dist/components/CodeInput/codeVariableWidget.d.ts +4 -4
  13. package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
  14. package/dist/components/CodeInput/codeVariableWidget.js +42 -38
  15. package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +25 -24
  16. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +1 -1
  17. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
  18. package/dist/components/CommandPalette/CommandPaletteExample.vue.js +64 -55
  19. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
  20. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +110 -106
  21. package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +2 -2
  22. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +1 -1
  23. package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
  24. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +38 -37
  25. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
  26. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +52 -49
  27. package/dist/components/ImportCollection/DropEventListener.vue.d.ts.map +1 -1
  28. package/dist/components/ImportCollection/DropEventListener.vue.js +46 -43
  29. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +40 -39
  30. package/dist/components/ImportCollection/ImportNowButton.vue.js +44 -42
  31. package/dist/components/ImportCollection/WorkspaceSelector.vue.js +76 -69
  32. package/dist/components/ScalarAsciiArt.vue.js +1 -1
  33. package/dist/components/ScalarAsciiArt.vue2.js +22 -19
  34. package/dist/components/Search/useSearch.d.ts.map +1 -1
  35. package/dist/components/Search/useSearch.js +57 -49
  36. package/dist/components/SideNav/SideNavRouterLink.vue.d.ts.map +1 -1
  37. package/dist/components/SideNav/SideNavRouterLink.vue.js +22 -19
  38. package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
  39. package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
  40. package/dist/components/Sidebar/SidebarListElement.vue2.js +38 -36
  41. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  42. package/dist/components/TopNav/TopNav.vue.js +71 -64
  43. package/dist/layouts/App/ApiClientApp.vue.js +4 -1
  44. package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
  45. package/dist/layouts/Modal/ApiClientModal.vue2.js +22 -19
  46. package/dist/layouts/Web/ApiClientWeb.vue.js +4 -1
  47. package/dist/libs/create-client.d.ts +10 -10
  48. package/dist/libs/create-client.d.ts.map +1 -1
  49. package/dist/libs/create-client.js +42 -36
  50. package/dist/libs/extractAttachmentFilename.d.ts +3 -0
  51. package/dist/libs/extractAttachmentFilename.d.ts.map +1 -1
  52. package/dist/libs/extractAttachmentFilename.js +7 -7
  53. package/dist/libs/importers/curl.d.ts.map +1 -1
  54. package/dist/libs/importers/curl.js +18 -18
  55. package/dist/libs/normalize-headers.d.ts.map +1 -1
  56. package/dist/libs/normalize-headers.js +2 -2
  57. package/dist/libs/parse-curl.js +39 -36
  58. package/dist/store/active-entities.d.ts +4 -4
  59. package/dist/store/active-entities.d.ts.map +1 -1
  60. package/dist/store/active-entities.js +88 -86
  61. package/dist/store/collections.d.ts.map +1 -1
  62. package/dist/store/collections.js +29 -29
  63. package/dist/store/request-example.d.ts.map +1 -1
  64. package/dist/store/request-example.js +27 -23
  65. package/dist/store/requests.d.ts.map +1 -1
  66. package/dist/store/requests.js +94 -77
  67. package/dist/store/security-schemes.d.ts.map +1 -1
  68. package/dist/store/security-schemes.js +27 -27
  69. package/dist/store/servers.d.ts.map +1 -1
  70. package/dist/store/servers.js +18 -18
  71. package/dist/store/tags.d.ts.map +1 -1
  72. package/dist/store/tags.js +35 -33
  73. package/dist/style.css +1 -1
  74. package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
  75. package/dist/views/Cookies/CookieForm.vue.js +14 -9
  76. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  77. package/dist/views/Cookies/Cookies.vue2.js +39 -37
  78. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  79. package/dist/views/Environment/Environment.vue2.js +94 -89
  80. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  81. package/dist/views/Request/Request.vue.js +1 -1
  82. package/dist/views/Request/Request.vue2.js +118 -116
  83. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
  84. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +28 -25
  85. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  86. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
  87. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +38 -37
  88. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
  89. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +2 -2
  90. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +76 -73
  91. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +2 -2
  92. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue2.js +80 -80
  93. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  94. package/dist/views/Request/RequestSection/RequestBody.vue.js +1 -1
  95. package/dist/views/Request/RequestSection/RequestBody.vue2.js +192 -178
  96. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
  97. package/dist/views/Request/RequestSection/RequestParams.vue.js +80 -73
  98. package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
  99. package/dist/views/Request/RequestSection/RequestPathParams.vue.js +50 -48
  100. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  101. package/dist/views/Request/RequestSidebar.vue.js +1 -1
  102. package/dist/views/Request/RequestSidebar.vue2.js +149 -144
  103. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  104. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  105. package/dist/views/Request/RequestSidebarItem.vue2.js +168 -150
  106. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  107. package/dist/views/Request/RequestSidebarItemMenu.vue.js +4 -4
  108. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +80 -80
  109. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  110. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
  111. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +1 -1
  112. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  113. package/dist/views/Request/components/WorkspaceDropdown.vue.js +166 -156
  114. package/dist/views/Request/handle-drag.d.ts.map +1 -1
  115. package/dist/views/Request/handle-drag.js +37 -31
  116. package/dist/views/Request/hooks/useOpenApiWatcher.js +27 -27
  117. package/dist/views/Request/libs/live-sync.d.ts.map +1 -1
  118. package/dist/views/Request/libs/live-sync.js +147 -130
  119. package/dist/views/Request/types/sidebar-item.d.ts +4 -1
  120. package/dist/views/Request/types/sidebar-item.d.ts.map +1 -1
  121. package/dist/views/Servers/ServerForm.vue.js +38 -35
  122. package/dist/views/Servers/Servers.vue2.js +38 -35
  123. package/dist/views/Settings/Settings.vue.d.ts.map +1 -1
  124. package/dist/views/Settings/Settings.vue2.js +15 -15
  125. package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
  126. package/dist/views/Settings/SettingsGeneral.vue.js +206 -174
  127. package/package.json +8 -8
@@ -1,69 +1,76 @@
1
- import { defineComponent as K, computed as y, onMounted as $, ref as E, watch as S, openBlock as T, createBlock as A, withCtx as n, createTextVNode as h, toDisplayString as x, createElementVNode as o, createVNode as f, unref as R, withModifiers as z, nextTick as k } from "vue";
2
- import B from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
3
- import { useActiveEntities as M } from "../../../store/active-entities.js";
4
- import N from "./RequestTable.vue.js";
5
- import { ScalarTooltip as V, ScalarButton as W } from "@scalar/components";
6
- import { requestExampleParametersSchema as b } from "@scalar/oas-utils/entities/spec";
7
- import { useWorkspace as D } from "../../../store/store.js";
8
- const O = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/params:opacity-100 has-[:focus-visible]:opacity-100 request-meta-buttons" }, U = { class: "sr-only" }, Z = /* @__PURE__ */ K({
1
+ import { defineComponent as B, computed as q, onMounted as M, ref as N, watch as V, openBlock as W, createBlock as D, withCtx as r, createTextVNode as C, toDisplayString as K, createElementVNode as i, createVNode as f, unref as $, withModifiers as O, nextTick as w } from "vue";
2
+ import U from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
3
+ import { useActiveEntities as j } from "../../../store/active-entities.js";
4
+ import F from "./RequestTable.vue.js";
5
+ import { ScalarTooltip as G, ScalarButton as H } from "@scalar/components";
6
+ import { requestExampleParametersSchema as E } from "@scalar/oas-utils/entities/spec";
7
+ import { useWorkspace as J } from "../../../store/store.js";
8
+ const L = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/params:opacity-100 has-[:focus-visible]:opacity-100 request-meta-buttons" }, Q = { class: "sr-only" }, ne = /* @__PURE__ */ B({
9
9
  __name: "RequestParams",
10
10
  props: {
11
11
  title: {},
12
12
  paramKey: {}
13
13
  },
14
- setup(_) {
15
- const r = _, { activeRequest: u, activeExample: a } = M(), { requestExampleMutators: i } = D(), l = y(
14
+ setup(S) {
15
+ const n = S, { activeRequest: u, activeExample: s } = j(), { requestExampleMutators: o } = J(), l = q(
16
16
  () => {
17
17
  var e;
18
- return ((e = a.value) == null ? void 0 : e.parameters[r.paramKey]) ?? [];
18
+ return ((e = s.value) == null ? void 0 : e.parameters[n.paramKey]) ?? [];
19
19
  }
20
20
  );
21
- $(() => {
21
+ M(() => {
22
22
  v();
23
23
  });
24
24
  const p = () => {
25
- if (!u.value || !a.value) return;
26
- const e = b.parse({ enabled: !1 }), t = [...l.value, e];
27
- i.edit(
28
- a.value.uid,
29
- `parameters.${r.paramKey}`,
25
+ if (!u.value || !s.value) return;
26
+ const e = E.parse({ enabled: !1 }), t = [...l.value, e];
27
+ o.edit(
28
+ s.value.uid,
29
+ `parameters.${n.paramKey}`,
30
30
  t
31
31
  );
32
- }, m = E(null), q = (e, t, d) => {
33
- if (!u.value || !a.value) return;
34
- const c = l.value;
35
- if (c.length > e) {
36
- const s = [...c];
37
- s[e] = { ...s[e], [t]: d }, (s[e].key !== "" || s[e].value !== "") && (s[e].enabled = !0), s[e].key === "" && s[e].value === "" && s.splice(e, 1), i.edit(
38
- a.value.uid,
39
- `parameters.${r.paramKey}`,
40
- s
32
+ }, c = N(null), T = (e, t, d) => {
33
+ var g, y, h, k, b, R, _;
34
+ if (!u.value || !s.value) return;
35
+ const m = l.value;
36
+ if (m.length > e) {
37
+ const a = [...m];
38
+ a[e] = {
39
+ ...a[e],
40
+ [t]: d || "",
41
+ value: ((g = a[e]) == null ? void 0 : g.value) || "",
42
+ key: ((y = a[e]) == null ? void 0 : y.key) || "",
43
+ enabled: ((h = a[e]) == null ? void 0 : h.enabled) ?? !1
44
+ }, (((k = a[e]) == null ? void 0 : k.key) !== "" || ((b = a[e]) == null ? void 0 : b.value) !== "") && (a[e].enabled = !0), ((R = a[e]) == null ? void 0 : R.key) === "" && ((_ = a[e]) == null ? void 0 : _.value) === "" && a.splice(e, 1), o.edit(
45
+ s.value.uid,
46
+ `parameters.${n.paramKey}`,
47
+ a
41
48
  );
42
49
  } else {
43
- const s = [b.parse({ [t]: d })];
44
- i.edit(
45
- a.value.uid,
46
- `parameters.${r.paramKey}`,
47
- s
48
- ), k(() => {
49
- var g;
50
- if (!m.value) return;
51
- (g = m.value.querySelectorAll("input")[t === "key" ? 0 : 1]) == null || g.focus();
50
+ const a = [E.parse({ [t]: d })];
51
+ o.edit(
52
+ s.value.uid,
53
+ `parameters.${n.paramKey}`,
54
+ a
55
+ ), w(() => {
56
+ var x;
57
+ if (!c.value) return;
58
+ (x = c.value.querySelectorAll("input")[t === "key" ? 0 : 1]) == null || x.focus();
52
59
  });
53
60
  }
54
- e === c.length - 1 && p();
55
- }, w = (e, t) => u.value && a.value && i.edit(
56
- a.value.uid,
57
- `parameters.${r.paramKey}.${e}.enabled`,
61
+ e === m.length - 1 && p();
62
+ }, A = (e, t) => u.value && s.value && o.edit(
63
+ s.value.uid,
64
+ `parameters.${n.paramKey}.${e}.enabled`,
58
65
  t
59
- ), C = () => {
60
- if (!u.value || !a.value) return;
66
+ ), P = () => {
67
+ if (!u.value || !s.value) return;
61
68
  const e = l.value.filter((t) => t.required);
62
- i.edit(
63
- a.value.uid,
64
- `parameters.${r.paramKey}`,
69
+ o.edit(
70
+ s.value.uid,
71
+ `parameters.${n.paramKey}`,
65
72
  e
66
- ), k(() => {
73
+ ), w(() => {
67
74
  p();
68
75
  });
69
76
  };
@@ -72,49 +79,49 @@ const O = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/params
72
79
  p();
73
80
  else if (l.value.length >= 1) {
74
81
  const e = l.value[l.value.length - 1];
75
- e.key !== "" && e.value !== "" && p();
82
+ (e == null ? void 0 : e.key) !== "" && (e == null ? void 0 : e.value) !== "" && p();
76
83
  }
77
84
  }
78
- const P = y(
85
+ const z = q(
79
86
  () => l.value.filter((e) => e.key || e.value).length
80
87
  );
81
- return S(
82
- () => a.value,
88
+ return V(
89
+ () => s.value,
83
90
  (e, t) => {
84
91
  e !== t && v();
85
92
  },
86
93
  { immediate: !0 }
87
- ), (e, t) => (T(), A(B, {
94
+ ), (e, t) => (W(), D(U, {
88
95
  class: "group/params",
89
- itemCount: P.value
96
+ itemCount: z.value
90
97
  }, {
91
- title: n(() => [
92
- h(x(e.title), 1)
98
+ title: r(() => [
99
+ C(K(e.title), 1)
93
100
  ]),
94
- actions: n(() => [
95
- o("div", O, [
96
- f(R(V), {
101
+ actions: r(() => [
102
+ i("div", L, [
103
+ f($(G), {
97
104
  side: "right",
98
105
  sideOffset: 12
99
106
  }, {
100
- trigger: n(() => [
101
- f(R(W), {
107
+ trigger: r(() => [
108
+ f($(H), {
102
109
  class: "px-1 transition-none",
103
110
  size: "sm",
104
111
  variant: "ghost",
105
- onClick: z(C, ["stop"])
112
+ onClick: O(P, ["stop"])
106
113
  }, {
107
- default: n(() => [
108
- t[0] || (t[0] = h(" Clear ")),
109
- o("span", U, "All " + x(e.title), 1)
114
+ default: r(() => [
115
+ t[0] || (t[0] = C(" Clear ")),
116
+ i("span", Q, "All " + K(e.title), 1)
110
117
  ]),
111
118
  _: 1
112
119
  })
113
120
  ]),
114
- content: n(() => t[1] || (t[1] = [
115
- o("div", { class: "grid gap-1.5 pointer-events-none min-w-48 w-content shadow-lg rounded bg-b-1 z-context p-2 text-xxs leading-5 z-10 text-c-1" }, [
116
- o("div", { class: "flex items-center text-c-2" }, [
117
- o("span", null, "Clear optional parameters")
121
+ content: r(() => t[1] || (t[1] = [
122
+ i("div", { class: "grid gap-1.5 pointer-events-none min-w-48 w-content shadow-lg rounded bg-b-1 z-context p-2 text-xxs leading-5 z-10 text-c-1" }, [
123
+ i("div", { class: "flex items-center text-c-2" }, [
124
+ i("span", null, "Clear optional parameters")
118
125
  ])
119
126
  ], -1)
120
127
  ])),
@@ -122,17 +129,17 @@ const O = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/params
122
129
  })
123
130
  ])
124
131
  ]),
125
- default: n(() => [
126
- o("div", {
132
+ default: r(() => [
133
+ i("div", {
127
134
  ref_key: "tableWrapperRef",
128
- ref: m
135
+ ref: c
129
136
  }, [
130
- f(N, {
137
+ f(F, {
131
138
  class: "flex-1",
132
139
  columns: ["32px", "", ""],
133
140
  items: l.value,
134
- onToggleRow: w,
135
- onUpdateRow: q
141
+ onToggleRow: A,
142
+ onUpdateRow: T
136
143
  }, null, 8, ["items"])
137
144
  ], 512)
138
145
  ]),
@@ -141,5 +148,5 @@ const O = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/params
141
148
  }
142
149
  });
143
150
  export {
144
- Z as default
151
+ ne as default
145
152
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestPathParams.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestPathParams.vue"],"names":[],"mappings":"AA8IA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAMrE,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,cAAc,CAAC,YAAY,CAAC,CAAA;CAC7C,CAAC;;AAyMF,wBAOG"}
1
+ {"version":3,"file":"RequestPathParams.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestPathParams.vue"],"names":[],"mappings":"AA+IA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAMrE,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,cAAc,CAAC,YAAY,CAAC,CAAA;CAC7C,CAAC;;AA0MF,wBAOG"}
@@ -1,61 +1,63 @@
1
- import { defineComponent as P, computed as _, watch as y, openBlock as g, createBlock as R, withCtx as $, createTextVNode as b, toDisplayString as q, createCommentVNode as w } from "vue";
2
- import V from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
1
+ import { defineComponent as P, computed as _, watch as y, openBlock as g, createBlock as R, withCtx as $, createTextVNode as b, toDisplayString as q, createCommentVNode as V } from "vue";
2
+ import w from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
3
3
  import { useActiveEntities as M } from "../../../store/active-entities.js";
4
- import U from "./RequestTable.vue.js";
5
- import { REGEX as N } from "@scalar/oas-utils/helpers";
6
- import { useWorkspace as T } from "../../../store/store.js";
7
- const S = /* @__PURE__ */ P({
4
+ import N from "./RequestTable.vue.js";
5
+ import { REGEX as T } from "@scalar/oas-utils/helpers";
6
+ import { useWorkspace as U } from "../../../store/store.js";
7
+ const W = /* @__PURE__ */ P({
8
8
  __name: "RequestPathParams",
9
9
  props: {
10
10
  title: {},
11
11
  paramKey: {}
12
12
  },
13
13
  setup(E) {
14
- const s = E, { activeRequest: o, activeExample: n, activeServer: d } = M(), { requestMutators: v, requestExampleMutators: f } = T(), l = _(() => {
14
+ const u = E, { activeRequest: o, activeExample: n, activeServer: l } = M(), { requestMutators: f, requestExampleMutators: v } = U(), c = _(() => {
15
15
  const e = n.value;
16
- return e ? e.parameters[s.paramKey].map((t) => {
17
- var r;
16
+ return e ? e.parameters[u.paramKey].map((t) => {
17
+ var a;
18
18
  return {
19
19
  ...t,
20
- enum: t.enum || ((r = e.serverVariables) == null ? void 0 : r[t.key])
20
+ enum: t.enum || ((a = e.serverVariables) == null ? void 0 : a[t.key])
21
21
  };
22
22
  }) : [];
23
- }), K = (e, t, r) => {
24
- var p, a;
23
+ }), K = (e, t, a) => {
24
+ var p, r;
25
25
  if (!o.value || !n.value) return;
26
- const u = n.value.parameters[s.paramKey], i = (p = u[e]) == null ? void 0 : p.key;
27
- if (t === "key") {
28
- if ((a = u[e]) != null && a.required)
29
- return;
30
- if (r) {
31
- const c = encodeURIComponent(i), m = encodeURIComponent(r), x = new RegExp(`(?<=/):${c}(?=[/?#]|$)`, "g"), C = o.value.path.replace(
32
- x,
33
- `:${m}`
34
- );
35
- v.edit(o.value.uid, "path", C);
36
- } else {
37
- u.splice(e, 1);
38
- const c = new RegExp(`/:${encodeURIComponent(i)}(?=[/?#]|$)`, "g"), m = o.value.path.replace(c, "");
39
- v.edit(o.value.uid, "path", m);
26
+ const i = n.value.parameters[u.paramKey], s = (p = i[e]) == null ? void 0 : p.key;
27
+ if (s) {
28
+ if (t === "key") {
29
+ if ((r = i[e]) != null && r.required)
30
+ return;
31
+ if (a) {
32
+ const m = encodeURIComponent(s), d = encodeURIComponent(a), x = new RegExp(`(?<=/):${m}(?=[/?#]|$)`, "g"), C = o.value.path.replace(
33
+ x,
34
+ `:${d}`
35
+ );
36
+ f.edit(o.value.uid, "path", C);
37
+ } else {
38
+ i.splice(e, 1);
39
+ const m = new RegExp(`/:${encodeURIComponent(s)}(?=[/?#]|$)`, "g"), d = o.value.path.replace(m, "");
40
+ f.edit(o.value.uid, "path", d);
41
+ }
40
42
  }
43
+ v.edit(
44
+ n.value.uid,
45
+ `parameters.${u.paramKey}.${e}.${t}`,
46
+ a
47
+ );
41
48
  }
42
- f.edit(
43
- n.value.uid,
44
- `parameters.${s.paramKey}.${e}.${t}`,
45
- r
46
- );
47
49
  }, k = (e) => {
48
50
  var p;
49
51
  if (!n.value) return;
50
- const t = ((p = e.match(N.PATH)) == null ? void 0 : p.map((a) => a.slice(1, -1))) || [], r = n.value.parameters[s.paramKey], u = new Map(r.map((a) => [a.key, a])), i = t.map(
51
- (a) => u.get(a) || { key: a, value: "", enabled: !0 }
52
+ const t = ((p = e.match(T.PATH)) == null ? void 0 : p.map((r) => r.slice(1, -1))) || [], a = n.value.parameters[u.paramKey], i = new Map(a.map((r) => [r.key, r])), s = t.map(
53
+ (r) => i.get(r) || { key: r, value: "", enabled: !0 }
52
54
  );
53
- r.forEach((a) => {
54
- !t.includes(a.key) && (a.value || a.required) && i.push(a);
55
- }), r.splice(0, r.length, ...i), f.edit(
55
+ a.forEach((r) => {
56
+ !t.includes(r.key) && (r.value || r.required) && s.push(r);
57
+ }), a.splice(0, a.length, ...s), v.edit(
56
58
  n.value.uid,
57
- `parameters.${s.paramKey}`,
58
- r
59
+ `parameters.${u.paramKey}`,
60
+ a
59
61
  );
60
62
  }, h = (e) => {
61
63
  e && k(e);
@@ -63,36 +65,36 @@ const S = /* @__PURE__ */ P({
63
65
  return y(
64
66
  () => o.value,
65
67
  (e) => {
66
- var t;
67
- e && h((t = d.value) == null ? void 0 : t.url);
68
+ var t, a;
69
+ e && ((t = l.value) != null && t.url) && h((a = l.value) == null ? void 0 : a.url);
68
70
  }
69
71
  ), y(
70
72
  () => {
71
73
  var e;
72
- return (e = d.value) == null ? void 0 : e.url;
74
+ return (e = l.value) == null ? void 0 : e.url;
73
75
  },
74
76
  (e, t) => {
75
- e !== t && h(e);
77
+ e && e !== t && h(e);
76
78
  }
77
- ), (e, t) => (g(), R(V, {
78
- itemCount: l.value.length
79
+ ), (e, t) => (g(), R(w, {
80
+ itemCount: c.value.length
79
81
  }, {
80
82
  title: $(() => [
81
83
  b(q(e.title), 1)
82
84
  ]),
83
85
  default: $(() => [
84
- l.value.length ? (g(), R(U, {
86
+ c.value.length ? (g(), R(N, {
85
87
  key: 0,
86
88
  class: "flex-1",
87
89
  isEnabledHidden: "",
88
- items: l.value,
90
+ items: c.value,
89
91
  onUpdateRow: K
90
- }, null, 8, ["items"])) : w("", !0)
92
+ }, null, 8, ["items"])) : V("", !0)
91
93
  ]),
92
94
  _: 1
93
95
  }, 8, ["itemCount"]));
94
96
  }
95
97
  });
96
98
  export {
97
- S as default
99
+ W as default
98
100
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebar.vue"],"names":[],"mappings":"AA0eA,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,OAAO,CAAA;CACvB,CAAC;;;;;cAMqC,MAAM;aAAO,MAAM;;;;;;;cAAnB,MAAM;aAAO,MAAM;;;;AAgwB1D,wBAOG"}
1
+ {"version":3,"file":"RequestSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebar.vue"],"names":[],"mappings":"AAkfA,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,OAAO,CAAA;CACvB,CAAC;;;;;cAMqC,MAAM;aAAO,MAAM;;;;;;;cAAnB,MAAM;aAAO,MAAM;;;;AAwwB1D,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestSidebar.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-189ce360"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-79c72478"]]);
5
5
  export {
6
6
  m as default
7
7
  };