@scalar/api-client 2.3.26 → 2.3.27
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.
- package/CHANGELOG.md +31 -0
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CodeInput/CodeInput.vue2.js +75 -72
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/CodeInput/codeVariableWidget.js +48 -45
- package/dist/components/DataTable/DataTableInput.vue.d.ts +2 -0
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInput.vue.js +3 -3
- package/dist/components/DataTable/DataTableInput.vue2.js +46 -43
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +82 -92
- package/dist/components/Form/Form.vue.d.ts +2 -2
- package/dist/components/Form/Form.vue.d.ts.map +1 -1
- package/dist/components/Form/Form.vue.js +17 -14
- package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/IntegrationLogo.vue.js +2 -1
- package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.js +30 -30
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts +16 -0
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.js +3 -2
- package/dist/components/Sidebar/SidebarListElement.vue2.js +76 -54
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts +2 -2
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +5 -4
- package/dist/hooks/useClientConfig.d.ts +6 -6
- package/dist/hooks/useClientConfig.d.ts.map +1 -1
- package/dist/layouts/App/create-api-client-app.d.ts +3 -3
- package/dist/layouts/Modal/create-api-client-modal.d.ts +6 -6
- package/dist/layouts/Web/create-api-client-web.d.ts +3 -3
- package/dist/libs/create-client.d.ts +3 -3
- package/dist/libs/env-helpers.d.ts +10 -2
- package/dist/libs/env-helpers.d.ts.map +1 -1
- package/dist/libs/env-helpers.js +4 -2
- package/dist/libs/environment-parser.d.ts +1 -1
- package/dist/libs/hot-keys.d.ts +1 -1
- package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
- package/dist/libs/send-request/create-request-operation.js +9 -9
- package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
- package/dist/libs/string-template.d.ts.map +1 -1
- package/dist/libs/string-template.js +35 -21
- package/dist/routes.d.ts +10 -10
- package/dist/store/active-entities.js +34 -34
- package/dist/store/environment.js +1 -1
- package/dist/store/store.d.ts +3 -3
- package/dist/store/workspace.d.ts +2 -2
- package/dist/style.css +1 -1
- package/dist/views/Collection/CollectionCookies.vue.d.ts +1 -1
- package/dist/views/Collection/CollectionEnvironment.vue.d.ts +1 -1
- package/dist/views/Collection/CollectionOverview.vue.d.ts +1 -1
- package/dist/views/Collection/CollectionScripts.vue.d.ts +1 -1
- package/dist/views/Collection/CollectionServerForm.vue.d.ts.map +1 -1
- package/dist/views/Collection/CollectionServerForm.vue.js +39 -34
- package/dist/views/Collection/CollectionServers.vue.d.ts.map +1 -1
- package/dist/views/Collection/CollectionServers.vue2.js +58 -78
- package/dist/views/Collection/CollectionSync.vue.d.ts +1 -1
- package/dist/views/Cookies/CookieForm.vue.d.ts +1 -1
- package/dist/views/Cookies/CookieRaw.vue.d.ts +1 -1
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue2.js +208 -188
- package/dist/views/Environment/EnvironmentColors.vue.js +5 -5
- package/dist/views/Environment/EnvironmentModal.vue.js +21 -21
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +9 -9
- package/dist/views/Environment/handle-drag.d.ts +13 -0
- package/dist/views/Environment/handle-drag.d.ts.map +1 -0
- package/dist/views/Environment/handle-drag.js +32 -0
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +111 -88
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.js +1 -0
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +62 -56
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +4 -4
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +42 -47
- package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +10 -10
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +1 -1
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @scalar/api-client
|
|
2
2
|
|
|
3
|
+
## 2.3.27
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1e9f510: feat: makes collection environment draggable
|
|
8
|
+
- 1e9f510: fix: updates string template replacement value for operation
|
|
9
|
+
- 335da88: fix: updates padding on request input with pill
|
|
10
|
+
- b240f4a: feat: adds select all capability to auth scopes
|
|
11
|
+
- 3cf1457: feat: updates collection server page style
|
|
12
|
+
- 1e9f510: fix: environment collection management
|
|
13
|
+
- 950772d: fix(api-client): make password fields not trigger browser autofill
|
|
14
|
+
- f2b8732: fix: increases reponse loading overlay z index
|
|
15
|
+
- b3f599f: fix: disables view layout section attribute inheritance
|
|
16
|
+
- Updated dependencies [62c4ce3]
|
|
17
|
+
- @scalar/types@0.1.12
|
|
18
|
+
- @scalar/oas-utils@0.2.137
|
|
19
|
+
- @scalar/openapi-parser@0.10.16
|
|
20
|
+
- @scalar/snippetz@0.2.19
|
|
21
|
+
- @scalar/themes@0.10.4
|
|
22
|
+
- @scalar/components@0.13.54
|
|
23
|
+
- @scalar/draggable@0.1.11
|
|
24
|
+
- @scalar/icons@0.3.3
|
|
25
|
+
- @scalar/import@0.3.20
|
|
26
|
+
- @scalar/object-utils@1.1.13
|
|
27
|
+
- @scalar/openapi-types@0.2.1
|
|
28
|
+
- @scalar/postman-to-openapi@0.2.10
|
|
29
|
+
- @scalar/use-codemirror@0.11.99
|
|
30
|
+
- @scalar/use-hooks@0.1.46
|
|
31
|
+
- @scalar/use-toasts@0.7.9
|
|
32
|
+
- @scalar/use-tooltip@1.0.6
|
|
33
|
+
|
|
3
34
|
## 2.3.26
|
|
4
35
|
|
|
5
36
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.vue"],"names":[],"mappings":"AAgiBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAErE,OAAO,EAIL,KAAK,kBAAkB,EAExB,MAAM,wBAAwB,CAAA;AAG/B,OAAO,EA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2iBI,GAAG;kBACN,GAAG;;AAzkB9B,wBAooBC;AAeD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -2,7 +2,7 @@ import o from "./CodeInput.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const
|
|
5
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-842fa0df"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
a as default
|
|
8
8
|
};
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarIcon as
|
|
3
|
-
import { prettyPrintJson as
|
|
4
|
-
import { useCodeMirror as
|
|
5
|
-
import { useClipboard as
|
|
6
|
-
import { nanoid as
|
|
7
|
-
import
|
|
1
|
+
import { defineComponent as J, useAttrs as Q, ref as d, computed as y, toRef as r, watch as G, openBlock as n, createElementBlock as s, Fragment as X, normalizeClass as Y, unref as u, createElementVNode as m, toDisplayString as Z, createBlock as g, mergeProps as _, withKeys as v, withModifiers as N, createVNode as ee, createCommentVNode as p, createTextVNode as k, renderSlot as R } from "vue";
|
|
2
|
+
import { ScalarIcon as oe } from "@scalar/components";
|
|
3
|
+
import { prettyPrintJson as le } from "@scalar/oas-utils/helpers";
|
|
4
|
+
import { useCodeMirror as te, useDropdown as ne, colorPicker as ae } from "@scalar/use-codemirror";
|
|
5
|
+
import { useClipboard as re } from "@scalar/use-hooks/useClipboard";
|
|
6
|
+
import { nanoid as se } from "nanoid";
|
|
7
|
+
import ie from "../../views/Environment/EnvironmentVariableDropdown.vue.js";
|
|
8
8
|
import B from "../DataTable/DataTableInputSelect.vue.js";
|
|
9
|
-
import { pillPlugin as
|
|
10
|
-
import { useLayout as
|
|
11
|
-
const
|
|
9
|
+
import { pillPlugin as ue, backspaceCommand as de } from "./codeVariableWidget.js";
|
|
10
|
+
import { useLayout as pe } from "../../hooks/useLayout.js";
|
|
11
|
+
const fe = { class: "whitespace-nowrap" }, me = ["id"], ce = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "scalar-code-copy z-context"
|
|
14
|
-
},
|
|
14
|
+
}, be = {
|
|
15
15
|
key: 1,
|
|
16
16
|
class: "z-context text-c-2 absolute bottom-1 right-1.5 hidden font-sans group-has-[:focus-visible]/input:block",
|
|
17
17
|
role: "alert"
|
|
18
|
-
},
|
|
18
|
+
}, ye = {
|
|
19
19
|
key: 5,
|
|
20
20
|
class: "centered-y text-orange absolute right-7 text-xs"
|
|
21
|
-
},
|
|
21
|
+
}, ge = {
|
|
22
22
|
key: 6,
|
|
23
23
|
class: "centered-y group-has-[.cm-focused]:z-1 absolute right-0 flex h-full items-center p-1.5"
|
|
24
|
-
},
|
|
24
|
+
}, ve = {
|
|
25
25
|
key: 7,
|
|
26
26
|
class: "required centered-y text-xxs text-c-3 group-[.error]:text-red bg-b-1 pointer-events-none absolute right-0 mr-0.5 pr-2 pt-px opacity-100 shadow-[-8px_0_4px_var(--scalar-background-1)] transition-opacity duration-150 group-[.alert]:bg-transparent group-[.error]:bg-transparent group-[.alert]:shadow-none group-[.error]:shadow-none peer-has-[.cm-focused]:opacity-0"
|
|
27
|
-
},
|
|
27
|
+
}, he = {
|
|
28
28
|
inheritAttrs: !1
|
|
29
|
-
},
|
|
30
|
-
...
|
|
29
|
+
}, Ee = /* @__PURE__ */ J({
|
|
30
|
+
...he,
|
|
31
31
|
__name: "CodeInput",
|
|
32
32
|
props: {
|
|
33
33
|
colorPicker: { type: Boolean, default: !1 },
|
|
@@ -61,39 +61,42 @@ const de = { class: "whitespace-nowrap" }, pe = ["id"], fe = {
|
|
|
61
61
|
emits: ["submit", "update:modelValue", "curl", "blur"],
|
|
62
62
|
setup(z, { expose: A, emit: M }) {
|
|
63
63
|
var q;
|
|
64
|
-
const o = z,
|
|
64
|
+
const o = z, i = M, C = Q(), O = C.id || `id-${se()}`, x = d(!1), h = d(!1), P = d(""), S = d({ left: 0, top: 0 }), c = d(null), { layout: w } = pe(), { copyToClipboard: K } = re();
|
|
65
65
|
function D(e) {
|
|
66
66
|
var l;
|
|
67
|
-
return e === o.modelValue ? null : o.importCurl && e.trim().toLowerCase().startsWith("curl") ? (
|
|
67
|
+
return e === o.modelValue ? null : o.importCurl && e.trim().toLowerCase().startsWith("curl") ? (i("curl", e), (l = a.value) == null || l.dispatch({
|
|
68
68
|
changes: {
|
|
69
69
|
from: 0,
|
|
70
70
|
to: a.value.state.doc.length,
|
|
71
71
|
insert: String(o.modelValue)
|
|
72
72
|
}
|
|
73
|
-
}), null) : o.handleFieldChange ? o.handleFieldChange(e) :
|
|
73
|
+
}), null) : o.handleFieldChange ? o.handleFieldChange(e) : i("update:modelValue", e);
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
return o.handleFieldSubmit ? o.handleFieldSubmit(e) :
|
|
75
|
+
function V(e) {
|
|
76
|
+
return o.handleFieldSubmit ? o.handleFieldSubmit(e) : i("submit", e);
|
|
77
77
|
}
|
|
78
78
|
function T(e) {
|
|
79
|
-
x.value = !1, o.emitOnBlur && o.modelValue &&
|
|
79
|
+
x.value = !1, o.emitOnBlur && o.modelValue && V(e), i("blur", e);
|
|
80
80
|
}
|
|
81
|
-
const
|
|
82
|
-
o.colorPicker &&
|
|
83
|
-
|
|
81
|
+
const E = [];
|
|
82
|
+
o.colorPicker && E.push(ae);
|
|
83
|
+
const L = y(
|
|
84
|
+
() => ue({
|
|
84
85
|
environment: o.environment,
|
|
85
86
|
envVariables: o.envVariables,
|
|
86
87
|
workspace: o.workspace,
|
|
87
|
-
isReadOnly:
|
|
88
|
-
})
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
isReadOnly: w === "modal"
|
|
89
|
+
})
|
|
90
|
+
), U = y(() => [
|
|
91
|
+
...E,
|
|
92
|
+
L.value,
|
|
93
|
+
de
|
|
94
|
+
]), F = d(null), { codeMirror: a } = te({
|
|
92
95
|
content: r(
|
|
93
96
|
() => o.modelValue !== void 0 ? String(o.modelValue) : ""
|
|
94
97
|
),
|
|
95
98
|
onChange: (e) => {
|
|
96
|
-
D(e),
|
|
99
|
+
D(e), j();
|
|
97
100
|
},
|
|
98
101
|
onFocus: () => x.value = !0,
|
|
99
102
|
onBlur: (e) => T(e),
|
|
@@ -104,23 +107,23 @@ const de = { class: "whitespace-nowrap" }, pe = ["id"], fe = {
|
|
|
104
107
|
lineNumbers: r(() => o.lineNumbers),
|
|
105
108
|
language: r(() => o.language),
|
|
106
109
|
lint: r(() => o.lint),
|
|
107
|
-
extensions:
|
|
110
|
+
extensions: U,
|
|
108
111
|
placeholder: r(() => o.placeholder)
|
|
109
112
|
});
|
|
110
|
-
(q = a.value) == null || q.focus(),
|
|
113
|
+
(q = a.value) == null || q.focus(), G(a, () => {
|
|
111
114
|
a.value && Object.prototype.hasOwnProperty.call(C, "autofocus") && a.value.focus();
|
|
112
115
|
});
|
|
113
|
-
const { handleDropdownSelect:
|
|
116
|
+
const { handleDropdownSelect: W, updateDropdownVisibility: j } = ne({
|
|
114
117
|
codeMirror: a,
|
|
115
|
-
query:
|
|
116
|
-
showDropdown:
|
|
117
|
-
dropdownPosition:
|
|
118
|
-
}), $ =
|
|
118
|
+
query: P,
|
|
119
|
+
showDropdown: h,
|
|
120
|
+
dropdownPosition: S
|
|
121
|
+
}), $ = y(
|
|
119
122
|
() => o.nullable ? ["true", "false", "null"] : ["true", "false"]
|
|
120
123
|
), b = (e, l) => {
|
|
121
|
-
var f, t,
|
|
122
|
-
|
|
123
|
-
},
|
|
124
|
+
var f, t, I;
|
|
125
|
+
h.value ? e === "down" ? (l.preventDefault(), (f = c.value) == null || f.handleArrowKey("down")) : e === "up" ? (l.preventDefault(), (t = c.value) == null || t.handleArrowKey("up")) : e === "enter" && (l.preventDefault(), (I = c.value) == null || I.handleSelect()) : e === "escape" ? o.disableTabIndent || l.stopPropagation() : e === "enter" && l.target instanceof HTMLDivElement && V(l.target.textContent ?? "");
|
|
126
|
+
}, H = y(() => Array.isArray(o.type) ? (
|
|
124
127
|
// Find the first type, that’s not 'null'
|
|
125
128
|
o.type.find((e) => e !== "null") ?? "string"
|
|
126
129
|
) : (
|
|
@@ -135,42 +138,42 @@ const de = { class: "whitespace-nowrap" }, pe = ["id"], fe = {
|
|
|
135
138
|
},
|
|
136
139
|
// Expose these methods for testing
|
|
137
140
|
handleChange: D,
|
|
138
|
-
handleSubmit:
|
|
141
|
+
handleSubmit: V,
|
|
139
142
|
handleBlur: T,
|
|
140
143
|
booleanOptions: $,
|
|
141
144
|
codeMirror: a,
|
|
142
145
|
modelValue: o.modelValue
|
|
143
146
|
}), (e, l) => {
|
|
144
147
|
var f;
|
|
145
|
-
return n(), s(
|
|
148
|
+
return n(), s(X, null, [
|
|
146
149
|
e.disabled ? (n(), s("div", {
|
|
147
150
|
key: 0,
|
|
148
|
-
class:
|
|
151
|
+
class: Y(["text-c-2 flex cursor-default items-center justify-center", u(w) === "modal" ? "font-code pl-1 pr-2 text-sm" : "px-2"]),
|
|
149
152
|
"data-testid": "code-input-disabled"
|
|
150
153
|
}, [
|
|
151
|
-
m("span",
|
|
152
|
-
], 2)) : o.enum && o.enum.length ? (n(),
|
|
154
|
+
m("span", fe, Z(e.modelValue), 1)
|
|
155
|
+
], 2)) : o.enum && o.enum.length ? (n(), g(B, {
|
|
153
156
|
key: 1,
|
|
154
157
|
default: o.default,
|
|
155
158
|
modelValue: e.modelValue,
|
|
156
|
-
type:
|
|
159
|
+
type: H.value,
|
|
157
160
|
value: o.enum,
|
|
158
|
-
"onUpdate:modelValue": l[0] || (l[0] = (t) =>
|
|
159
|
-
}, null, 8, ["default", "modelValue", "type", "value"])) : e.type === "boolean" || (f = e.type) != null && f.includes("boolean") ? (n(),
|
|
161
|
+
"onUpdate:modelValue": l[0] || (l[0] = (t) => i("update:modelValue", t))
|
|
162
|
+
}, null, 8, ["default", "modelValue", "type", "value"])) : e.type === "boolean" || (f = e.type) != null && f.includes("boolean") ? (n(), g(B, {
|
|
160
163
|
key: 2,
|
|
161
164
|
default: o.default,
|
|
162
165
|
modelValue: e.modelValue,
|
|
163
166
|
value: $.value,
|
|
164
|
-
"onUpdate:modelValue": l[1] || (l[1] = (t) =>
|
|
165
|
-
}, null, 8, ["default", "modelValue", "value"])) : o.examples && o.examples.length ? (n(),
|
|
167
|
+
"onUpdate:modelValue": l[1] || (l[1] = (t) => i("update:modelValue", t))
|
|
168
|
+
}, null, 8, ["default", "modelValue", "value"])) : o.examples && o.examples.length ? (n(), g(B, {
|
|
166
169
|
key: 3,
|
|
167
170
|
default: o.default,
|
|
168
171
|
modelValue: o.modelValue,
|
|
169
172
|
value: o.examples,
|
|
170
|
-
"onUpdate:modelValue": l[2] || (l[2] = (t) =>
|
|
171
|
-
}, null, 8, ["default", "modelValue", "value"])) : (n(), s("div",
|
|
173
|
+
"onUpdate:modelValue": l[2] || (l[2] = (t) => i("update:modelValue", t))
|
|
174
|
+
}, null, 8, ["default", "modelValue", "value"])) : (n(), s("div", _({
|
|
172
175
|
key: 4,
|
|
173
|
-
id:
|
|
176
|
+
id: u(O)
|
|
174
177
|
}, e.$attrs, {
|
|
175
178
|
ref_key: "codeMirrorRef",
|
|
176
179
|
ref: F,
|
|
@@ -179,54 +182,54 @@ const de = { class: "whitespace-nowrap" }, pe = ["id"], fe = {
|
|
|
179
182
|
"flow-code-input--error": e.error
|
|
180
183
|
}],
|
|
181
184
|
onKeydown: [
|
|
182
|
-
l[4] || (l[4] =
|
|
183
|
-
l[5] || (l[5] =
|
|
184
|
-
l[6] || (l[6] =
|
|
185
|
-
l[7] || (l[7] =
|
|
185
|
+
l[4] || (l[4] = v(N((t) => b("down", t), ["stop"]), ["down"])),
|
|
186
|
+
l[5] || (l[5] = v((t) => b("enter", t), ["enter"])),
|
|
187
|
+
l[6] || (l[6] = v((t) => b("escape", t), ["escape"])),
|
|
188
|
+
l[7] || (l[7] = v(N((t) => b("up", t), ["stop"]), ["up"]))
|
|
186
189
|
]
|
|
187
190
|
}), [
|
|
188
|
-
e.isCopyable ? (n(), s("div",
|
|
191
|
+
e.isCopyable ? (n(), s("div", ce, [
|
|
189
192
|
m("button", {
|
|
190
193
|
class: "copy-button",
|
|
191
194
|
type: "button",
|
|
192
|
-
onClick: l[3] || (l[3] = (t) =>
|
|
195
|
+
onClick: l[3] || (l[3] = (t) => u(K)(u(le)(e.modelValue)))
|
|
193
196
|
}, [
|
|
194
197
|
l[8] || (l[8] = m("span", { class: "sr-only" }, "Copy content", -1)),
|
|
195
|
-
|
|
198
|
+
ee(u(oe), {
|
|
196
199
|
icon: "Clipboard",
|
|
197
200
|
size: "md"
|
|
198
201
|
})
|
|
199
202
|
])
|
|
200
203
|
])) : p("", !0),
|
|
201
|
-
e.disableTabIndent ? p("", !0) : (n(), s("div",
|
|
204
|
+
e.disableTabIndent ? p("", !0) : (n(), s("div", be, l[9] || (l[9] = [
|
|
202
205
|
k(" Press "),
|
|
203
206
|
m("kbd", { class: "-mx-0.25 rounded border px-0.5 font-mono" }, "Esc", -1),
|
|
204
207
|
k(" then "),
|
|
205
208
|
m("kbd", { class: "-mx-0.25 rounded border px-0.5 font-mono" }, "Tab", -1),
|
|
206
209
|
k(" to exit ")
|
|
207
210
|
])))
|
|
208
|
-
], 16,
|
|
209
|
-
e.$slots.warning ? (n(), s("div",
|
|
211
|
+
], 16, me)),
|
|
212
|
+
e.$slots.warning ? (n(), s("div", ye, [
|
|
210
213
|
R(e.$slots, "warning", {}, void 0, !0)
|
|
211
214
|
])) : p("", !0),
|
|
212
|
-
e.$slots.icon ? (n(), s("div",
|
|
215
|
+
e.$slots.icon ? (n(), s("div", ge, [
|
|
213
216
|
R(e.$slots, "icon", {}, void 0, !0)
|
|
214
217
|
])) : p("", !0),
|
|
215
|
-
e.required ? (n(), s("div",
|
|
216
|
-
|
|
218
|
+
e.required ? (n(), s("div", ve, " Required ")) : p("", !0),
|
|
219
|
+
h.value && e.withVariables && u(w) !== "modal" && e.environment ? (n(), g(ie, {
|
|
217
220
|
key: 8,
|
|
218
221
|
ref_key: "dropdownRef",
|
|
219
222
|
ref: c,
|
|
220
|
-
dropdownPosition:
|
|
223
|
+
dropdownPosition: S.value,
|
|
221
224
|
envVariables: e.envVariables,
|
|
222
225
|
environment: e.environment,
|
|
223
|
-
query:
|
|
224
|
-
onSelect:
|
|
226
|
+
query: P.value,
|
|
227
|
+
onSelect: u(W)
|
|
225
228
|
}, null, 8, ["dropdownPosition", "envVariables", "environment", "query", "onSelect"])) : p("", !0)
|
|
226
229
|
], 64);
|
|
227
230
|
};
|
|
228
231
|
}
|
|
229
232
|
});
|
|
230
233
|
export {
|
|
231
|
-
|
|
234
|
+
Ee as default
|
|
232
235
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codeVariableWidget.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/codeVariableWidget.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAe,MAAM,oBAAoB,CAAA;AAEnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAErE,OAAO,EACL,UAAU,EACV,KAAK,aAAa,EAClB,UAAU,EAEV,UAAU,EACV,KAAK,UAAU,EAEhB,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"codeVariableWidget.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/codeVariableWidget.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAe,MAAM,oBAAoB,CAAA;AAEnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAErE,OAAO,EACL,UAAU,EACV,KAAK,aAAa,EAClB,UAAU,EAEV,UAAU,EACV,KAAK,UAAU,EAEhB,MAAM,wBAAwB,CAAA;AAuI/B;;GAEG;AACH,eAAO,MAAM,UAAU,UAAW;IAChC,WAAW,EAAE,WAAW,GAAG,SAAS,CAAA;IACpC,YAAY,EAAE,YAAY,GAAG,SAAS,CAAA;IACtC,SAAS,EAAE,SAAS,GAAG,SAAS,CAAA;IAChC,UAAU,EAAE,OAAO,GAAG,SAAS,CAAA;CAChC;iBAGkB,aAAa;mBAMX,UAAU;2BASF,UAAU;EAkCpC,CAAA;AAEH,eAAO,MAAM,gBAAgB,uCA8B3B,CAAA"}
|
|
@@ -1,46 +1,52 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { getEnvColor as
|
|
5
|
-
import {
|
|
6
|
-
import { REGEX as
|
|
7
|
-
import { ViewPlugin as
|
|
8
|
-
import { defineComponent as
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
var f = Object.defineProperty;
|
|
2
|
+
var b = (n, t, e) => t in n ? f(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
3
|
+
var r = (n, t, e) => b(n, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { getEnvColor as v } from "../../libs/env-helpers.js";
|
|
5
|
+
import { ScalarIcon as h, ScalarButton as g, ScalarTooltip as w } from "@scalar/components";
|
|
6
|
+
import { REGEX as y } from "@scalar/oas-utils/helpers";
|
|
7
|
+
import { ViewPlugin as x, RangeSetBuilder as F, Decoration as N, EditorView as k, WidgetType as C } from "@scalar/use-codemirror";
|
|
8
|
+
import { defineComponent as E, h as s, createApp as V } from "vue";
|
|
9
|
+
import { nanoid as R } from "nanoid";
|
|
10
|
+
import { parseEnvVariables as S } from "../../libs/environment-parser.js";
|
|
11
|
+
class u extends C {
|
|
12
|
+
constructor(e, o, i, l, a) {
|
|
12
13
|
super();
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
this
|
|
14
|
+
r(this, "app");
|
|
15
|
+
r(this, "uid");
|
|
16
|
+
r(this, "environment");
|
|
17
|
+
r(this, "envVariables");
|
|
18
|
+
r(this, "workspace");
|
|
19
|
+
r(this, "isReadOnly");
|
|
20
|
+
this.variableName = e, this.variableName = e, this.environment = o, this.envVariables = i, this.workspace = l, this.isReadOnly = a ?? !1, this.uid = R();
|
|
19
21
|
}
|
|
20
22
|
toDOM() {
|
|
21
23
|
const e = document.createElement("span");
|
|
22
24
|
e.className = "cm-pill", e.textContent = `${this.variableName}`;
|
|
23
|
-
const o =
|
|
25
|
+
const o = E({
|
|
24
26
|
props: { variableName: { type: String, default: null } },
|
|
25
27
|
render: () => {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
var d;
|
|
29
|
+
const i = this.envVariables ? S(this.envVariables).find((m) => m.key === this.variableName) : void 0, l = (i == null ? void 0 : i.source) === "global", a = l ? "#FFFFFF" : i && this.environment ? v(this.environment) : "#FFFFFF";
|
|
30
|
+
e.style.setProperty("--tw-bg-base", a), e.style.opacity = i != null && i.value ? "1" : "0.5";
|
|
31
|
+
const c = s("div", { class: "flex items-center gap-1 whitespace-nowrap" }, [
|
|
32
|
+
(l || ((d = this.environment) == null ? void 0 : d.name) === "No Environment" && (i == null ? void 0 : i.value)) && s(h, { class: "size-2.5 -ml-1", icon: "Globe" }),
|
|
33
|
+
s("span", this.variableName)
|
|
34
|
+
]), p = i != null && i.value ? s("div", { class: "p-2" }, i.value) : s("div", { class: "divide-y divide-1/2 grid" }, [
|
|
29
35
|
s("span", { class: "p-2 opacity-25" }, "No value"),
|
|
30
36
|
!this.isReadOnly && s("div", { class: "p-1" }, [
|
|
31
37
|
s(
|
|
32
|
-
|
|
38
|
+
g,
|
|
33
39
|
{
|
|
34
40
|
class: "gap-1.5 justify-start font-normal px-1 py-1.5 h-auto transition-colors rounded no-underline text-xxs w-full hover:bg-b-2",
|
|
35
41
|
variant: "ghost",
|
|
36
42
|
onClick: () => {
|
|
37
|
-
var
|
|
38
|
-
window.location.href = `/workspace/${(
|
|
43
|
+
var m;
|
|
44
|
+
window.location.href = `/workspace/${(m = this.workspace) == null ? void 0 : m.uid}/environment`;
|
|
39
45
|
}
|
|
40
46
|
},
|
|
41
47
|
{
|
|
42
48
|
default: () => [
|
|
43
|
-
s(
|
|
49
|
+
s(h, {
|
|
44
50
|
class: "w-2",
|
|
45
51
|
icon: "Add",
|
|
46
52
|
size: "xs"
|
|
@@ -52,7 +58,7 @@ class d extends k {
|
|
|
52
58
|
])
|
|
53
59
|
]);
|
|
54
60
|
return s(
|
|
55
|
-
|
|
61
|
+
w,
|
|
56
62
|
{
|
|
57
63
|
align: "center",
|
|
58
64
|
class: "w-full",
|
|
@@ -61,16 +67,13 @@ class d extends k {
|
|
|
61
67
|
sideOffset: 6
|
|
62
68
|
},
|
|
63
69
|
{
|
|
64
|
-
trigger: () =>
|
|
70
|
+
trigger: () => c,
|
|
65
71
|
content: () => s(
|
|
66
72
|
"div",
|
|
67
73
|
{
|
|
68
|
-
class: [
|
|
69
|
-
"border w-content rounded bg-b-1 brightness-lifted text-xxs leading-5 text-c-1",
|
|
70
|
-
i != null && i.value ? "border-solid" : "border-dashed"
|
|
71
|
-
]
|
|
74
|
+
class: ["border w-content rounded bg-b-1 brightness-lifted text-xxs leading-5 text-c-1"]
|
|
72
75
|
},
|
|
73
|
-
|
|
76
|
+
p
|
|
74
77
|
)
|
|
75
78
|
}
|
|
76
79
|
);
|
|
@@ -82,16 +85,16 @@ class d extends k {
|
|
|
82
85
|
this.app && this.app.unmount();
|
|
83
86
|
}
|
|
84
87
|
eq(e) {
|
|
85
|
-
return e instanceof
|
|
88
|
+
return e instanceof u && e.variableName === this.variableName && e.uid === this.uid;
|
|
86
89
|
}
|
|
87
90
|
ignoreEvent() {
|
|
88
91
|
return !1;
|
|
89
92
|
}
|
|
90
93
|
}
|
|
91
|
-
const
|
|
94
|
+
const z = (n) => x.fromClass(
|
|
92
95
|
class {
|
|
93
96
|
constructor(t) {
|
|
94
|
-
|
|
97
|
+
r(this, "decorations");
|
|
95
98
|
this.decorations = this.buildDecorations(t);
|
|
96
99
|
}
|
|
97
100
|
update(t) {
|
|
@@ -100,18 +103,18 @@ const q = (n) => y.fromClass(
|
|
|
100
103
|
});
|
|
101
104
|
}
|
|
102
105
|
buildDecorations(t) {
|
|
103
|
-
const e = new
|
|
106
|
+
const e = new F();
|
|
104
107
|
for (const { from: o, to: i } of t.visibleRanges) {
|
|
105
|
-
const
|
|
108
|
+
const l = t.state.doc.sliceString(o, i);
|
|
106
109
|
let a;
|
|
107
|
-
for (; (a =
|
|
108
|
-
const
|
|
110
|
+
for (; (a = y.VARIABLES.exec(l)) !== null; ) {
|
|
111
|
+
const c = o + a.index, p = c + a[0].length, d = a[1] ?? "";
|
|
109
112
|
e.add(
|
|
110
|
-
|
|
113
|
+
c,
|
|
111
114
|
p,
|
|
112
|
-
|
|
113
|
-
widget: new
|
|
114
|
-
|
|
115
|
+
N.widget({
|
|
116
|
+
widget: new u(
|
|
117
|
+
d,
|
|
115
118
|
n.environment,
|
|
116
119
|
n.envVariables,
|
|
117
120
|
n.workspace,
|
|
@@ -128,7 +131,7 @@ const q = (n) => y.fromClass(
|
|
|
128
131
|
{
|
|
129
132
|
decorations: (t) => t.decorations
|
|
130
133
|
}
|
|
131
|
-
), I =
|
|
134
|
+
), I = k.domEventHandlers({
|
|
132
135
|
keydown(n, t) {
|
|
133
136
|
if (n.key === "Backspace") {
|
|
134
137
|
const { state: e } = t, { from: o, to: i } = e.selection.main;
|
|
@@ -148,5 +151,5 @@ const q = (n) => y.fromClass(
|
|
|
148
151
|
});
|
|
149
152
|
export {
|
|
150
153
|
I as backspaceCommand,
|
|
151
|
-
|
|
154
|
+
z as pillPlugin
|
|
152
155
|
};
|
|
@@ -19,6 +19,7 @@ type __VLS_Props = {
|
|
|
19
19
|
envVariables: EnvVariable[];
|
|
20
20
|
workspace: Workspace;
|
|
21
21
|
description?: string | undefined;
|
|
22
|
+
lineWrapping?: boolean;
|
|
22
23
|
};
|
|
23
24
|
declare function __VLS_template(): {
|
|
24
25
|
attrs: Partial<{}>;
|
|
@@ -230,6 +231,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}
|
|
|
230
231
|
}>, {
|
|
231
232
|
required: boolean;
|
|
232
233
|
readOnly: boolean;
|
|
234
|
+
lineWrapping: boolean;
|
|
233
235
|
canAddCustomEnumValue: boolean;
|
|
234
236
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
235
237
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DataTableInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableInput.vue"],"names":[],"mappings":"AAqMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAIrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAO/C,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,sEAAsE;IACtE,cAAc,CAAC,EAAE,YAAY,GAAG,SAAS,CAAA;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,0EAA0E;IAC1E,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,QAAQ,CAAC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export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ a(t, [["__scopeId", "data-v-15c12a41"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|