@scalar/api-client 2.17.0 → 2.17.1

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,138 +0,0 @@
1
- import { defineComponent as M, ref as p, createBlock as d, openBlock as i, unref as n, withCtx as o, createVNode as l, withKeys as S, createCommentVNode as r, createElementVNode as c, createTextVNode as s } from "vue";
2
- import { ScalarFloating as E, ScalarDropdownMenu as $, ScalarDropdownButton as y, ScalarIcon as f, ScalarDropdownDivider as b } from "@scalar/components";
3
- import { getParentEntry as w } from "@scalar/workspace-store/navigation";
4
- import { onClickOutside as z } from "@vueuse/core";
5
- const N = { class: "flex items-center gap-2" }, O = { class: "flex items-center gap-2" }, T = { class: "flex items-center gap-2" }, V = { class: "text-red flex items-center gap-2" }, W = /* @__PURE__ */ M({
6
- __name: "ItemDecorator",
7
- props: {
8
- item: {},
9
- eventBus: {},
10
- sidebarState: {},
11
- target: {}
12
- },
13
- emits: ["closeMenu", "showDeleteModal"],
14
- setup(e, { emit: B }) {
15
- const u = B, g = p(null);
16
- z(e.target, () => u("closeMenu"), {
17
- ignore: [g]
18
- });
19
- const v = () => e.item.type === "document" || e.item.type === "tag", k = () => e.item.type === "document", x = () => e.item.type === "operation", A = () => e.item.type === "document" && e.item.id !== "drafts" || e.item.type === "tag" || e.item.type === "operation" || e.item.type === "example", D = () => {
20
- if (e.item.type === "document" && e.eventBus.emit("ui:open:command-palette", {
21
- action: "create-request",
22
- payload: {
23
- documentId: e.item.id
24
- }
25
- }), e.item.type === "tag") {
26
- const a = e.sidebarState.getEntryById(e.item.id);
27
- e.eventBus.emit("ui:open:command-palette", {
28
- action: "create-request",
29
- payload: {
30
- documentId: w("document", a)?.id,
31
- tagId: e.item.name
32
- }
33
- });
34
- }
35
- }, I = () => {
36
- e.item.type === "document" && e.eventBus.emit("ui:open:command-palette", {
37
- action: "add-tag",
38
- payload: {
39
- documentId: e.item.id
40
- }
41
- });
42
- }, C = () => {
43
- if (e.item.type === "operation") {
44
- const a = e.sidebarState.getEntryById(e.item.id);
45
- e.eventBus.emit("ui:open:command-palette", {
46
- action: "add-example",
47
- payload: {
48
- documentId: w("document", a)?.id,
49
- operationId: e.item.id
50
- }
51
- });
52
- }
53
- };
54
- return (a, t) => (i(), d(n(E), {
55
- placement: "bottom-end",
56
- target: a.target,
57
- teleport: ""
58
- }, {
59
- floating: o(() => [
60
- l(n($), {
61
- ref_key: "dropdownMenuRef",
62
- ref: g,
63
- onClick: t[4] || (t[4] = (m) => u("closeMenu")),
64
- onKeydown: t[5] || (t[5] = S((m) => u("closeMenu"), ["escape"]))
65
- }, {
66
- default: o(() => [
67
- v() ? (i(), d(n(y), {
68
- key: 0,
69
- onClick: t[0] || (t[0] = (m) => D())
70
- }, {
71
- default: o(() => [
72
- c("div", N, [
73
- l(n(f), {
74
- icon: "Add",
75
- size: "sm"
76
- }),
77
- t[6] || (t[6] = s(" Add Operation ", -1))
78
- ])
79
- ]),
80
- _: 1
81
- })) : r("", !0),
82
- k() ? (i(), d(n(y), {
83
- key: 1,
84
- onClick: t[1] || (t[1] = (m) => I())
85
- }, {
86
- default: o(() => [
87
- c("div", O, [
88
- l(n(f), {
89
- icon: "Add",
90
- size: "sm"
91
- }),
92
- t[7] || (t[7] = s(" Add Tag ", -1))
93
- ])
94
- ]),
95
- _: 1
96
- })) : r("", !0),
97
- x() ? (i(), d(n(y), {
98
- key: 2,
99
- onClick: t[2] || (t[2] = (m) => C())
100
- }, {
101
- default: o(() => [
102
- c("div", T, [
103
- l(n(f), {
104
- icon: "Add",
105
- size: "sm"
106
- }),
107
- t[8] || (t[8] = s(" Add Example ", -1))
108
- ])
109
- ]),
110
- _: 1
111
- })) : r("", !0),
112
- (x() || v() || k()) && A() ? (i(), d(n(b), { key: 3 })) : r("", !0),
113
- A() ? (i(), d(n(y), {
114
- key: 4,
115
- onClick: t[3] || (t[3] = (m) => u("showDeleteModal"))
116
- }, {
117
- default: o(() => [
118
- c("div", V, [
119
- l(n(f), {
120
- icon: "Delete",
121
- size: "sm"
122
- }),
123
- t[9] || (t[9] = s(" Delete ", -1))
124
- ])
125
- ]),
126
- _: 1
127
- })) : r("", !0)
128
- ]),
129
- _: 1
130
- }, 512)
131
- ]),
132
- _: 1
133
- }, 8, ["target"]));
134
- }
135
- });
136
- export {
137
- W as default
138
- };
@@ -1,4 +0,0 @@
1
- import f from "./ItemDecorator.vue.js";
2
- export {
3
- f as default
4
- };