@scalar/api-client 2.0.15 → 2.0.17

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 (124) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +46 -3
  3. package/dist/App/ApiClientApp.vue.d.ts +3 -0
  4. package/dist/App/ApiClientApp.vue.d.ts.map +1 -0
  5. package/dist/App/ApiClientApp.vue.js +56 -0
  6. package/dist/App/ApiClientApp.vue3.js +5 -0
  7. package/dist/App/createApiClientApp.d.ts +16 -0
  8. package/dist/App/createApiClientApp.d.ts.map +1 -0
  9. package/dist/App/createApiClientApp.js +62 -0
  10. package/dist/App/index.d.ts +3 -0
  11. package/dist/App/index.d.ts.map +1 -0
  12. package/dist/App/index.js +6 -0
  13. package/dist/App.vue.d.ts.map +1 -1
  14. package/dist/App.vue.js +49 -33
  15. package/dist/Modal/api-client-modal.d.ts +1 -1
  16. package/dist/Modal/api-client-modal.d.ts.map +1 -1
  17. package/dist/Modal/api-client-modal.js +7 -7
  18. package/dist/Modal/index.js +4 -4
  19. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  20. package/dist/components/AddressBar/AddressBar.vue.js +1 -1
  21. package/dist/components/AddressBar/AddressBar.vue2.js +2 -2
  22. package/dist/components/CodeInput/CodeInput.vue.d.ts +40 -4
  23. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  24. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  25. package/dist/components/CodeInput/CodeInput.vue2.js +87 -38
  26. package/dist/components/CommandPalette/CommandPalette.vue.d.ts +17 -0
  27. package/dist/components/CommandPalette/CommandPalette.vue.d.ts.map +1 -0
  28. package/dist/components/CommandPalette/CommandPalette.vue.js +7 -0
  29. package/dist/components/CommandPalette/CommandPalette.vue2.js +184 -0
  30. package/dist/components/{ActionModal/ActionModalImport.vue.d.ts → CommandPalette/CommandPaletteCollection.vue.d.ts} +1 -1
  31. package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -0
  32. package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +66 -0
  33. package/dist/components/CommandPalette/CommandPaletteCollection.vue2.js +4 -0
  34. package/dist/components/{ActionModal/ActionModalCollection.vue.d.ts → CommandPalette/CommandPaletteExample.vue.d.ts} +1 -1
  35. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -0
  36. package/dist/components/CommandPalette/CommandPaletteExample.vue.js +107 -0
  37. package/dist/components/CommandPalette/CommandPaletteExample.vue2.js +4 -0
  38. package/dist/components/{ActionModal/ActionModalRequest.vue.d.ts → CommandPalette/CommandPaletteFolder.vue.d.ts} +1 -1
  39. package/dist/components/CommandPalette/CommandPaletteFolder.vue.d.ts.map +1 -0
  40. package/dist/components/CommandPalette/CommandPaletteFolder.vue.js +104 -0
  41. package/dist/components/CommandPalette/CommandPaletteFolder.vue2.js +4 -0
  42. package/dist/components/{ActionModal/ActionModalVariant.vue.d.ts → CommandPalette/CommandPaletteImport.vue.d.ts} +1 -1
  43. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -0
  44. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +86 -0
  45. package/dist/components/CommandPalette/CommandPaletteImport.vue2.js +4 -0
  46. package/dist/components/{ActionModal/ActionModalFolder.vue.d.ts → CommandPalette/CommandPaletteRequest.vue.d.ts} +1 -1
  47. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -0
  48. package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +119 -0
  49. package/dist/components/CommandPalette/CommandPaletteRequest.vue2.js +4 -0
  50. package/dist/components/ContextBar.vue.js +5 -5
  51. package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.js +6 -6
  52. package/dist/components/DataTable/DataTableCell.vue.d.ts.map +1 -1
  53. package/dist/components/DataTable/DataTableCell.vue.js +4 -4
  54. package/dist/components/DataTable/DataTableInput.vue.js +2 -2
  55. package/dist/components/DataTable/DataTableInput.vue2.js +13 -13
  56. package/dist/components/DataTable/{DataTableInputEnumSelect.vue.d.ts → DataTableInputSelect.vue.d.ts} +3 -3
  57. package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -0
  58. package/dist/components/DataTable/DataTableInputSelect.vue.js +109 -0
  59. package/dist/components/DataTable/DataTableInputSelect.vue2.js +4 -0
  60. package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
  61. package/dist/components/SideNav/SideNavLink.vue.js +3 -3
  62. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  63. package/dist/components/TopNav/TopNav.vue.js +1 -1
  64. package/dist/components/TopNav/TopNav.vue2.js +26 -26
  65. package/dist/components/TopNav/TopNavItem.vue.js +2 -2
  66. package/dist/components/TopNav/TopNavItem.vue2.js +8 -8
  67. package/dist/hooks/index.d.ts +0 -1
  68. package/dist/hooks/index.d.ts.map +1 -1
  69. package/dist/hooks/index.js +6 -9
  70. package/dist/index.d.ts +1 -0
  71. package/dist/index.d.ts.map +1 -1
  72. package/dist/index.js +11 -6
  73. package/dist/router.d.ts +4 -1
  74. package/dist/router.d.ts.map +1 -1
  75. package/dist/store/workspace.d.ts +52 -2
  76. package/dist/store/workspace.d.ts.map +1 -1
  77. package/dist/store/workspace.js +74 -73
  78. package/dist/style.css +1 -1
  79. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  80. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +32 -31
  81. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  82. package/dist/views/Request/Request.vue.js +2 -2
  83. package/dist/views/Request/Request.vue2.js +68 -74
  84. package/dist/views/Request/RequestSection/RequestSection.vue.js +7 -7
  85. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  86. package/dist/views/Request/RequestSection/RequestTable.vue.js +4 -5
  87. package/dist/views/Request/RequestSection/RequestTable.vue2.js +80 -63
  88. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  89. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  90. package/dist/views/Request/RequestSidebarItem.vue2.js +48 -48
  91. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  92. package/dist/views/Request/RequestSidebarItemMenu.vue.js +41 -68
  93. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +2 -2
  94. package/package.json +11 -6
  95. package/dist/assets/ascii/collection.ascii.js +0 -10
  96. package/dist/assets/ascii/folder.ascii.js +0 -10
  97. package/dist/assets/ascii/import.ascii.js +0 -10
  98. package/dist/assets/ascii/request.ascii.js +0 -10
  99. package/dist/assets/ascii/variant.ascii.js +0 -10
  100. package/dist/components/ActionModal/ActionModal.vue.d.ts +0 -21
  101. package/dist/components/ActionModal/ActionModal.vue.d.ts.map +0 -1
  102. package/dist/components/ActionModal/ActionModal.vue.js +0 -7
  103. package/dist/components/ActionModal/ActionModal.vue2.js +0 -117
  104. package/dist/components/ActionModal/ActionModalCollection.vue.d.ts.map +0 -1
  105. package/dist/components/ActionModal/ActionModalCollection.vue.js +0 -54
  106. package/dist/components/ActionModal/ActionModalCollection.vue2.js +0 -4
  107. package/dist/components/ActionModal/ActionModalFolder.vue.d.ts.map +0 -1
  108. package/dist/components/ActionModal/ActionModalFolder.vue.js +0 -92
  109. package/dist/components/ActionModal/ActionModalFolder.vue2.js +0 -4
  110. package/dist/components/ActionModal/ActionModalImport.vue.d.ts.map +0 -1
  111. package/dist/components/ActionModal/ActionModalImport.vue.js +0 -70
  112. package/dist/components/ActionModal/ActionModalImport.vue2.js +0 -4
  113. package/dist/components/ActionModal/ActionModalRequest.vue.d.ts.map +0 -1
  114. package/dist/components/ActionModal/ActionModalRequest.vue.js +0 -108
  115. package/dist/components/ActionModal/ActionModalRequest.vue2.js +0 -4
  116. package/dist/components/ActionModal/ActionModalVariant.vue.d.ts.map +0 -1
  117. package/dist/components/ActionModal/ActionModalVariant.vue.js +0 -93
  118. package/dist/components/ActionModal/ActionModalVariant.vue2.js +0 -4
  119. package/dist/components/DataTable/DataTableInputEnumSelect.vue.d.ts.map +0 -1
  120. package/dist/components/DataTable/DataTableInputEnumSelect.vue.js +0 -102
  121. package/dist/components/DataTable/DataTableInputEnumSelect.vue2.js +0 -4
  122. package/dist/hooks/useActionModal.d.ts +0 -16
  123. package/dist/hooks/useActionModal.d.ts.map +0 -1
  124. package/dist/hooks/useActionModal.js +0 -25
@@ -1,10 +0,0 @@
1
- const n = `
2
- /^v^\\ /^v^\\
3
-
4
- /^v^\\ /^v^\\
5
-
6
- /^v^\\
7
- `;
8
- export {
9
- n as default
10
- };
@@ -1,10 +0,0 @@
1
- const n = `
2
- ___ ___
3
- (o o) (o o)
4
- ( V ) ( V )
5
- | | | |
6
- ---m-m-----m-m--
7
- `;
8
- export {
9
- n as default
10
- };
@@ -1,10 +0,0 @@
1
- const n = `
2
- .\`\\ ___
3
- ;_ \\ /,//>
4
- //,, /
5
- )_/
6
- /_|
7
- `;
8
- export {
9
- n as default
10
- };
@@ -1,10 +0,0 @@
1
- const n = `
2
- \\\\
3
- (o>
4
- \\\\_//)
5
- \\_/_)
6
- _|_
7
- `;
8
- export {
9
- n as default
10
- };
@@ -1,10 +0,0 @@
1
- const n = `
2
- //
3
- \\\\ <o)
4
- (o> //\\
5
- _(()___\\_V_
6
- || ||
7
- `;
8
- export {
9
- n as default
10
- };
@@ -1,21 +0,0 @@
1
- import { type ActionModalState } from '../../hooks/index.js';
2
- declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
3
- state: ActionModalState;
4
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
- "update:tab": (tab: string) => void;
6
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
7
- state: ActionModalState;
8
- }>>> & {
9
- "onUpdate:tab"?: ((tab: string) => any) | undefined;
10
- }, {}, {}>;
11
- export default _default;
12
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
13
- type __VLS_TypePropsToOption<T> = {
14
- [K in keyof T]-?: {} extends Pick<T, K> ? {
15
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
16
- } : {
17
- type: import('vue').PropType<T[K]>;
18
- required: true;
19
- };
20
- };
21
- //# sourceMappingURL=ActionModal.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ActionModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ActionModal/ActionModal.vue"],"names":[],"mappings":"AA2IA,OAAO,EAAE,KAAK,gBAAgB,EAAkB,MAAM,SAAS,CAAA;;WAgBtD,gBAAgB;;;;WAAhB,gBAAgB;;;;AAsbzB,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,7 +0,0 @@
1
- import o from "./ActionModal.vue2.js";
2
- /* empty css */
3
- import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-494207cd"]]);
5
- export {
6
- m as default
7
- };
@@ -1,117 +0,0 @@
1
- import { defineComponent as $, computed as T, ref as w, watch as _, openBlock as r, createBlock as n, unref as t, withCtx as a, createElementVNode as V, createVNode as f, createElementBlock as b, Fragment as c, renderList as x, normalizeClass as D, createTextVNode as I, toDisplayString as N, createCommentVNode as d } from "vue";
2
- import h from "./ActionModalCollection.vue.js";
3
- import j from "./ActionModalFolder.vue.js";
4
- import q from "./ActionModalImport.vue.js";
5
- import z from "./ActionModalRequest.vue.js";
6
- import B from "./ActionModalVariant.vue.js";
7
- import { Dialog as F, DialogPanel as O, DialogDescription as P, TabGroup as R, TabList as A, Tab as E, TabPanels as L, TabPanel as M } from "@headlessui/vue";
8
- import { ActionModalTab as i } from "../../hooks/useActionModal.js";
9
- const G = { class: "animate-modal-fade bg-backdrop fixed left-0 top-0 z-[1001] h-screen w-screen p-[20px] opacity-0 cursor-pointer" }, Y = /* @__PURE__ */ $({
10
- __name: "ActionModal",
11
- props: {
12
- state: {}
13
- },
14
- emits: ["update:tab"],
15
- setup(v, { emit: g }) {
16
- const { state: y } = v, k = g, u = Object.keys(i), p = T(() => {
17
- const e = u.indexOf(y.tab);
18
- return e !== -1 ? e : u.indexOf("Request");
19
- }), m = w(p.value);
20
- _(
21
- p,
22
- (e) => {
23
- m.value = e;
24
- },
25
- { immediate: !0 }
26
- );
27
- const C = (e) => {
28
- m.value = e, k("update:tab", u[e]);
29
- };
30
- return (e, o) => (r(), n(t(F), {
31
- open: e.state.open,
32
- onClose: o[5] || (o[5] = (l) => e.state.hide())
33
- }, {
34
- default: a(() => [
35
- V("div", G, [
36
- f(t(O), { class: "animate-modal-pop before:bg-b-1 relative mx-auto mt-20 w-full max-w-[480px] scale-[0.98] rounded-lg opacity-0 before:absolute before:z-0 before:block before:h-full before:w-full before:rounded-lg before:content-[''] cursor-auto" }, {
37
- default: a(() => [
38
- f(t(P), { class: "bg-b-1 custom-scroll relative overflow-visible rounded-lg" }, {
39
- default: a(() => [
40
- f(t(R), {
41
- selectedIndex: m.value,
42
- onChange: C
43
- }, {
44
- default: a(() => [
45
- f(t(A), { class: "flex justify-center border-b py-3" }, {
46
- default: a(() => [
47
- (r(!0), b(c, null, x(t(u), (l, s) => (r(), n(t(E), {
48
- key: l,
49
- class: D([
50
- "text-c-2 relative px-[9px] text-sm font-medium",
51
- s === m.value ? "!text-c-1 before:bg-c-1 before:absolute before:-bottom-[13px] before:left-0 before:h-px before:w-full before:content-['']" : ""
52
- ])
53
- }, {
54
- default: a(() => [
55
- I(N(l), 1)
56
- ]),
57
- _: 2
58
- }, 1032, ["class"]))), 128))
59
- ]),
60
- _: 1
61
- }),
62
- f(t(L), null, {
63
- default: a(() => [
64
- (r(!0), b(c, null, x(t(u), (l) => (r(), n(t(M), {
65
- key: l,
66
- class: "flex flex-col items-center justify-center gap-3 p-2.5 pt-3 text-sm"
67
- }, {
68
- default: a(() => [
69
- l === "Request" ? (r(), n(z, {
70
- key: 0,
71
- title: t(i).Request,
72
- onClose: o[0] || (o[0] = (s) => e.state.hide())
73
- }, null, 8, ["title"])) : d("", !0),
74
- l === "Folder" ? (r(), n(j, {
75
- key: 1,
76
- title: t(i).Folder,
77
- onClose: o[1] || (o[1] = (s) => e.state.hide())
78
- }, null, 8, ["title"])) : d("", !0),
79
- l === "Import" ? (r(), n(q, {
80
- key: 2,
81
- title: t(i).Import,
82
- onClose: o[2] || (o[2] = (s) => e.state.hide())
83
- }, null, 8, ["title"])) : d("", !0),
84
- l === "Collection" ? (r(), n(h, {
85
- key: 3,
86
- title: t(i).Collection,
87
- onClose: o[3] || (o[3] = (s) => e.state.hide())
88
- }, null, 8, ["title"])) : d("", !0),
89
- l === "Variant" ? (r(), n(B, {
90
- key: 4,
91
- title: t(i).Variant,
92
- onClose: o[4] || (o[4] = (s) => e.state.hide())
93
- }, null, 8, ["title"])) : d("", !0)
94
- ]),
95
- _: 2
96
- }, 1024))), 128))
97
- ]),
98
- _: 1
99
- })
100
- ]),
101
- _: 1
102
- }, 8, ["selectedIndex"])
103
- ]),
104
- _: 1
105
- })
106
- ]),
107
- _: 1
108
- })
109
- ])
110
- ]),
111
- _: 1
112
- }, 8, ["open"]));
113
- }
114
- });
115
- export {
116
- Y as default
117
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"ActionModalCollection.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ActionModal/ActionModalCollection.vue"],"names":[],"mappings":";WA0DS,MAAM;;;;WAAN,MAAM;;;;AAwGf,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,54 +0,0 @@
1
- import { defineComponent as p, ref as u, openBlock as d, createElementBlock as f, Fragment as v, createVNode as l, unref as n, createElementVNode as t, toDisplayString as x, withModifiers as C, withDirectives as h, vModelText as N, withCtx as _, createTextVNode as b } from "vue";
2
- import S from "../../assets/ascii/collection.ascii.js";
3
- import w from "../ScalarAsciiArt.vue.js";
4
- import { useWorkspace as M } from "../../store/workspace.js";
5
- import { ScalarButton as V } from "@scalar/components";
6
- const E = /* @__PURE__ */ p({
7
- __name: "ActionModalCollection",
8
- props: {
9
- title: {}
10
- },
11
- emits: ["close"],
12
- setup(g, { emit: r }) {
13
- const i = r, { collectionMutators: a } = M(), e = u(""), c = () => {
14
- a.add({
15
- spec: {
16
- openapi: "3.1.0",
17
- info: {
18
- title: e.value,
19
- version: "0.0.1"
20
- }
21
- }
22
- }), i("close");
23
- };
24
- return (s, o) => (d(), f(v, null, [
25
- l(w, {
26
- art: n(S),
27
- class: "mt-[3px]"
28
- }, null, 8, ["art"]),
29
- t("h2", null, x(s.title), 1),
30
- t("form", {
31
- class: "flex w-full flex-col gap-3",
32
- onSubmit: C(c, ["prevent"])
33
- }, [
34
- h(t("input", {
35
- "onUpdate:modelValue": o[0] || (o[0] = (m) => e.value = m),
36
- class: "h-10 rounded border p-2",
37
- label: "Collection Name",
38
- placeholder: "Collection Name"
39
- }, null, 512), [
40
- [N, e.value]
41
- ]),
42
- l(n(V), { type: "submit" }, {
43
- default: _(() => [
44
- b("Continue")
45
- ]),
46
- _: 1
47
- })
48
- ], 32)
49
- ], 64));
50
- }
51
- });
52
- export {
53
- E as default
54
- };
@@ -1,4 +0,0 @@
1
- import f from "./ActionModalCollection.vue.js";
2
- export {
3
- f as default
4
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"ActionModalFolder.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ActionModal/ActionModalFolder.vue"],"names":[],"mappings":";WA4FS,MAAM;;;;WAAN,MAAM;;;;AAoLf,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,92 +0,0 @@
1
- import { defineComponent as _, ref as c, computed as m, openBlock as w, createElementBlock as V, Fragment as h, createVNode as s, unref as n, createElementVNode as a, toDisplayString as f, withModifiers as F, withDirectives as N, vModelText as g, withCtx as u, normalizeClass as k, createTextVNode as M } from "vue";
2
- import y from "../../assets/ascii/folder.ascii.js";
3
- import z from "../ScalarAsciiArt.vue.js";
4
- import { useWorkspace as A } from "../../store/workspace.js";
5
- import { ScalarListbox as B, ScalarButton as p, ScalarIcon as D } from "@scalar/components";
6
- const I = /* @__PURE__ */ a("span", { class: "mb-1 block font-medium" }, "Inside:", -1), W = /* @__PURE__ */ _({
7
- __name: "ActionModalFolder",
8
- props: {
9
- title: {}
10
- },
11
- emits: ["close"],
12
- setup(j, { emit: v }) {
13
- const b = v, { collections: x, folderMutators: C } = A(), i = c(""), r = c(""), d = m(
14
- () => Object.values(x).map((e) => {
15
- var l, o;
16
- return {
17
- id: e.uid,
18
- label: ((o = (l = e.spec) == null ? void 0 : l.info) == null ? void 0 : o.title) ?? ""
19
- };
20
- })
21
- ), t = m({
22
- get: () => d.value.find(
23
- ({ id: e }) => e === r.value
24
- ),
25
- set: (e) => {
26
- e != null && e.id && (r.value = e.id);
27
- }
28
- }), S = () => {
29
- i.value && t.value && (C.add(
30
- {
31
- name: i.value
32
- },
33
- r.value
34
- ), b("close"));
35
- };
36
- return (e, l) => (w(), V(h, null, [
37
- s(z, { art: n(y) }, null, 8, ["art"]),
38
- a("h2", null, f(e.title), 1),
39
- a("form", {
40
- class: "flex w-full flex-col gap-3",
41
- onSubmit: F(S, ["prevent"])
42
- }, [
43
- N(a("input", {
44
- "onUpdate:modelValue": l[0] || (l[0] = (o) => i.value = o),
45
- class: "h-10 rounded border p-2",
46
- label: "Folder Name",
47
- placeholder: "Folder Name"
48
- }, null, 512), [
49
- [g, i.value]
50
- ]),
51
- a("div", null, [
52
- I,
53
- s(n(B), {
54
- modelValue: t.value,
55
- "onUpdate:modelValue": l[1] || (l[1] = (o) => t.value = o),
56
- options: d.value,
57
- resize: ""
58
- }, {
59
- default: u(() => [
60
- s(n(p), {
61
- class: "justify-between p-2 w-full",
62
- variant: "outlined"
63
- }, {
64
- default: u(() => [
65
- a("span", {
66
- class: k(t.value ? "text-c-1" : "text-c-3")
67
- }, f(t.value ? t.value.label : "Select Collection"), 3),
68
- s(n(D), {
69
- class: "text-c-3",
70
- icon: "ChevronDown",
71
- size: "xs"
72
- })
73
- ]),
74
- _: 1
75
- })
76
- ]),
77
- _: 1
78
- }, 8, ["modelValue", "options"])
79
- ]),
80
- s(n(p), { type: "submit" }, {
81
- default: u(() => [
82
- M(" Create Folder ")
83
- ]),
84
- _: 1
85
- })
86
- ], 32)
87
- ], 64));
88
- }
89
- });
90
- export {
91
- W as default
92
- };
@@ -1,4 +0,0 @@
1
- import f from "./ActionModalFolder.vue.js";
2
- export {
3
- f as default
4
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"ActionModalImport.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ActionModal/ActionModalImport.vue"],"names":[],"mappings":";WA8ES,MAAM;;;;WAAN,MAAM;;;;AA8Jf,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,70 +0,0 @@
1
- import { defineComponent as F, ref as w, openBlock as x, createElementBlock as y, Fragment as b, createVNode as o, unref as t, createElementVNode as l, toDisplayString as A, withModifiers as C, withCtx as s, createTextVNode as m } from "vue";
2
- import k from "../../assets/ascii/import.ascii.js";
3
- import v from "../ScalarAsciiArt.vue.js";
4
- import { useWorkspace as N } from "../../store/workspace.js";
5
- import { ScalarButton as p, ScalarIcon as R } from "@scalar/components";
6
- import { useFileDialog as U } from "../../hooks/useFileDialog.js";
7
- const B = /* @__PURE__ */ l("input", {
8
- class: "h-10 rounded border p-2",
9
- label: "Paste Swagger File URL",
10
- placeholder: "Paste Swagger File URL"
11
- }, null, -1), T = /* @__PURE__ */ F({
12
- __name: "ActionModalImport",
13
- props: {
14
- title: {}
15
- },
16
- emits: ["close"],
17
- setup(D, { emit: u }) {
18
- const d = u, { importSpecFile: f, importSpecFromUrl: g } = N(), a = w(""), { open: S } = U({
19
- onChange: async (e) => {
20
- const r = e == null ? void 0 : e[0];
21
- if (r) {
22
- const i = new FileReader();
23
- i.onload = async (h) => {
24
- var c;
25
- const _ = (c = h.target) == null ? void 0 : c.result;
26
- f(_), n();
27
- }, i.readAsText(r);
28
- }
29
- },
30
- multiple: !1,
31
- accept: ".json,.yaml,.yml"
32
- }), n = async () => {
33
- a.value && (await g(a.value), d("close"));
34
- };
35
- return (e, r) => (x(), y(b, null, [
36
- o(v, { art: t(k) }, null, 8, ["art"]),
37
- l("h2", null, A(e.title), 1),
38
- l("form", {
39
- class: "flex w-full flex-col gap-3",
40
- onSubmit: C(n, ["prevent"])
41
- }, [
42
- o(t(p), {
43
- class: "relative",
44
- variant: "outlined",
45
- onClick: t(S)
46
- }, {
47
- default: s(() => [
48
- m(" JSON, or YAML Files "),
49
- o(t(R), {
50
- class: "text-c-3 absolute right-3 -rotate-90",
51
- icon: "ArrowRight",
52
- size: "sm"
53
- })
54
- ]),
55
- _: 1
56
- }, 8, ["onClick"]),
57
- B,
58
- o(t(p), { type: "submit" }, {
59
- default: s(() => [
60
- m(" Continue ")
61
- ]),
62
- _: 1
63
- })
64
- ], 32)
65
- ], 64));
66
- }
67
- });
68
- export {
69
- T as default
70
- };
@@ -1,4 +0,0 @@
1
- import f from "./ActionModalImport.vue.js";
2
- export {
3
- f as default
4
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"ActionModalRequest.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ActionModal/ActionModalRequest.vue"],"names":[],"mappings":";WA8HS,MAAM;;;;WAAN,MAAM;;;;AAsOf,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,108 +0,0 @@
1
- import { defineComponent as g, ref as d, computed as p, openBlock as M, createElementBlock as V, Fragment as N, createVNode as o, unref as r, createElementVNode as l, toDisplayString as v, withModifiers as R, withDirectives as k, vModelText as y, withCtx as c, normalizeClass as E, createTextVNode as F } from "vue";
2
- import I from "../../assets/ascii/request.ascii.js";
3
- import U from "../HttpMethod/HttpMethod.vue.js";
4
- import z from "../ScalarAsciiArt.vue.js";
5
- import { useWorkspace as A } from "../../store/workspace.js";
6
- import { ScalarListbox as B, ScalarButton as h, ScalarIcon as D } from "@scalar/components";
7
- import { useRouter as T } from "vue-router";
8
- const j = { class: "flex min-h-10 gap-3 rounded border p-1" }, $ = /* @__PURE__ */ l("span", { class: "mb-1 block font-medium" }, "Inside:", -1), Q = /* @__PURE__ */ g({
9
- __name: "ActionModalRequest",
10
- props: {
11
- title: {}
12
- },
13
- emits: ["close"],
14
- setup(G, { emit: b }) {
15
- const _ = b, { push: x } = T(), { requestMutators: q, activeCollection: n, folders: w } = A(), a = d(""), u = d("GET"), m = d(""), f = p(() => n.value ? Object.values(n.value.childUids).flatMap((e) => {
16
- const t = w[e];
17
- return t ? [
18
- {
19
- id: t.uid,
20
- label: t.name
21
- }
22
- ] : [];
23
- }) : []), s = p({
24
- get: () => f.value.find(({ id: e }) => e === m.value),
25
- set: (e) => {
26
- e != null && e.id && (m.value = e.id);
27
- }
28
- });
29
- function C(e) {
30
- u.value = e;
31
- }
32
- function S() {
33
- if (!n.value) return;
34
- const e = q.add({
35
- path: "",
36
- method: u.value.toUpperCase(),
37
- description: a.value,
38
- operationId: a.value,
39
- summary: a.value,
40
- tags: ["default"]
41
- });
42
- x(`/request/${e.uid}`), _("close");
43
- }
44
- return (e, t) => (M(), V(N, null, [
45
- o(z, { art: r(I) }, null, 8, ["art"]),
46
- l("h2", null, v(e.title), 1),
47
- l("form", {
48
- class: "flex w-full flex-col gap-3",
49
- onSubmit: R(S, ["prevent"])
50
- }, [
51
- l("div", j, [
52
- o(U, {
53
- isEditable: !0,
54
- isSquare: "",
55
- method: u.value,
56
- onChange: C
57
- }, null, 8, ["method"]),
58
- k(l("input", {
59
- "onUpdate:modelValue": t[0] || (t[0] = (i) => a.value = i),
60
- class: "border-transparent outline-none w-full",
61
- label: "Request Name",
62
- placeholder: "Request Name"
63
- }, null, 512), [
64
- [y, a.value]
65
- ])
66
- ]),
67
- l("div", null, [
68
- $,
69
- o(r(B), {
70
- modelValue: s.value,
71
- "onUpdate:modelValue": t[1] || (t[1] = (i) => s.value = i),
72
- options: f.value,
73
- resize: ""
74
- }, {
75
- default: c(() => [
76
- o(r(h), {
77
- class: "justify-between p-2 w-full",
78
- variant: "outlined"
79
- }, {
80
- default: c(() => [
81
- l("span", {
82
- class: E(s.value ? "text-c-1" : "text-c-3")
83
- }, v(s.value ? s.value.label : "Select Folder"), 3),
84
- o(r(D), {
85
- class: "text-c-3",
86
- icon: "ChevronDown",
87
- size: "xs"
88
- })
89
- ]),
90
- _: 1
91
- })
92
- ]),
93
- _: 1
94
- }, 8, ["modelValue", "options"])
95
- ]),
96
- o(r(h), { type: "submit" }, {
97
- default: c(() => [
98
- F(" Create ")
99
- ]),
100
- _: 1
101
- })
102
- ], 32)
103
- ], 64));
104
- }
105
- });
106
- export {
107
- Q as default
108
- };
@@ -1,4 +0,0 @@
1
- import f from "./ActionModalRequest.vue.js";
2
- export {
3
- f as default
4
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"ActionModalVariant.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ActionModal/ActionModalVariant.vue"],"names":[],"mappings":";WA4FS,MAAM;;;;WAAN,MAAM;;;;AAiPf,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}