@scalar/api-client 0.5.1 → 0.5.2
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/package.json +6 -7
- package/src/components/ApiClient/AddressBar.vue +0 -462
- package/src/components/ApiClient/ApiClient.vue +0 -266
- package/src/components/ApiClient/Request/Request.vue +0 -271
- package/src/components/ApiClient/Request/RequestAuth.vue +0 -221
- package/src/components/ApiClient/Request/RequestBody.vue +0 -40
- package/src/components/ApiClient/Request/RequestHeaders.vue +0 -24
- package/src/components/ApiClient/Request/RequestQuery.vue +0 -25
- package/src/components/ApiClient/Request/RequestVariables.vue +0 -25
- package/src/components/ApiClient/Request/index.ts +0 -1
- package/src/components/ApiClient/RequestHistory.vue +0 -114
- package/src/components/ApiClient/RequestHistoryItem.vue +0 -59
- package/src/components/ApiClient/Response/Copilot.vue.bak +0 -385
- package/src/components/ApiClient/Response/Response.vue +0 -120
- package/src/components/ApiClient/Response/ResponseBody.vue +0 -24
- package/src/components/ApiClient/Response/ResponseHeaders.vue +0 -52
- package/src/components/ApiClient/Response/ResponseMetaInformation.vue +0 -58
- package/src/components/ApiClient/Response/index.ts +0 -1
- package/src/components/ApiClient/index.ts +0 -1
- package/src/components/CollapsibleSection/CollapsibleSection.vue +0 -149
- package/src/components/CollapsibleSection/index.ts +0 -1
- package/src/components/FlowModal.vue +0 -133
- package/src/components/Grid/Grid.vue +0 -511
- package/src/components/Grid/SimpleGrid.vue +0 -33
- package/src/components/Grid/index.ts +0 -2
- package/src/components/HelpfulLink.vue +0 -19
- package/src/components/SimpleTable/SimpleCell.vue +0 -47
- package/src/components/SimpleTable/SimpleHeader.vue +0 -17
- package/src/components/SimpleTable/SimpleRow.vue +0 -14
- package/src/components/SimpleTable/SimpleTable.vue +0 -13
- package/src/components/SimpleTable/index.ts +0 -4
- package/src/fixtures/httpHeaders.ts +0 -530
- package/src/fixtures/httpStatusCodes.ts +0 -259
- package/src/fixtures/index.ts +0 -6
- package/src/helpers/concatenateUrlAndPath.test.ts +0 -27
- package/src/helpers/concatenateUrlAndPath.ts +0 -13
- package/src/helpers/createPlaceholderRequest.ts +0 -16
- package/src/helpers/generateParameters.ts +0 -19
- package/src/helpers/generateRequest.ts +0 -26
- package/src/helpers/index.ts +0 -10
- package/src/helpers/mapFromArray.ts +0 -16
- package/src/helpers/normalizePath.test.ts +0 -17
- package/src/helpers/normalizePath.ts +0 -16
- package/src/helpers/normalizeRequestMethod.test.ts +0 -29
- package/src/helpers/normalizeRequestMethod.ts +0 -43
- package/src/helpers/normalizeUrl.test.ts +0 -25
- package/src/helpers/normalizeUrl.ts +0 -24
- package/src/helpers/replaceVariables.test.ts +0 -13
- package/src/helpers/replaceVariables.ts +0 -11
- package/src/helpers/sendRequest.test.ts +0 -50
- package/src/helpers/sendRequest.ts +0 -105
- package/src/hooks/index.ts +0 -2
- package/src/hooks/useCopilot.ts +0 -64
- package/src/hooks/useOperation.ts +0 -43
- package/src/index.ts +0 -8
- package/src/stores/apiClientRequestStore.ts +0 -103
- package/src/stores/apiClientStore.ts +0 -57
- package/src/stores/index.ts +0 -5
- package/src/types.ts +0 -185
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import { Disclosure, DisclosureButton, DisclosurePanel } from '@headlessui/vue'
|
|
3
|
-
|
|
4
|
-
defineProps<{
|
|
5
|
-
title?: string
|
|
6
|
-
}>()
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<template>
|
|
10
|
-
<Disclosure
|
|
11
|
-
v-slot="{ open }"
|
|
12
|
-
:defaultOpen="true">
|
|
13
|
-
<div
|
|
14
|
-
class="scalar-api-client__item"
|
|
15
|
-
:class="{ 'scalar-api-client__item--open': open }">
|
|
16
|
-
<DisclosureButton class="scalar-api-client__toggle">
|
|
17
|
-
<svg
|
|
18
|
-
class="scalar-api-client__toggle__icon"
|
|
19
|
-
height="10"
|
|
20
|
-
viewBox="0 0 5 10"
|
|
21
|
-
width="5"
|
|
22
|
-
xmlns="http://www.w3.org/2000/svg">
|
|
23
|
-
<path
|
|
24
|
-
d="M0 10l5-5-5-5z"
|
|
25
|
-
fill="currentColor"
|
|
26
|
-
fill-rule="nonzero" />
|
|
27
|
-
</svg>
|
|
28
|
-
<span class="scalar-api-client__item__title">
|
|
29
|
-
{{ title }}
|
|
30
|
-
</span>
|
|
31
|
-
<div
|
|
32
|
-
v-if="$slots.options && open"
|
|
33
|
-
class="scalar-api-client__item__options">
|
|
34
|
-
<slot name="options" />
|
|
35
|
-
</div>
|
|
36
|
-
</DisclosureButton>
|
|
37
|
-
<DisclosurePanel>
|
|
38
|
-
<div class="scalar-api-client__item__content">
|
|
39
|
-
<slot />
|
|
40
|
-
</div>
|
|
41
|
-
</DisclosurePanel>
|
|
42
|
-
</div>
|
|
43
|
-
</Disclosure>
|
|
44
|
-
</template>
|
|
45
|
-
|
|
46
|
-
<style>
|
|
47
|
-
.scalar-api-client__item {
|
|
48
|
-
border-radius: var(--theme-radius-lg);
|
|
49
|
-
margin-bottom: 6px;
|
|
50
|
-
background: var(--theme-background-2);
|
|
51
|
-
box-shadow: var(--shadow1);
|
|
52
|
-
position: relative;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.scalar-api-client__item button {
|
|
56
|
-
background-color: transparent;
|
|
57
|
-
text-align: left;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.scalar-api-client__item:hover {
|
|
61
|
-
cursor: pointer;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.scalar-api-client__item--open {
|
|
65
|
-
background: var(--theme-background-2);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.scalar-api-client__item--open:focus-within {
|
|
69
|
-
box-shadow: var(--shadow1);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.scalar-api-client__item--open .scalar-api-client__item__content {
|
|
73
|
-
display: flex;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.scalar-api-client__item--open:hover {
|
|
77
|
-
cursor: default;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.scalar-api-client__item--open .scalar-api-client__toggle__icon {
|
|
81
|
-
transform: rotate(90deg);
|
|
82
|
-
}
|
|
83
|
-
.scalar-api-client__toggle {
|
|
84
|
-
padding: 6px 12px;
|
|
85
|
-
min-height: 37px;
|
|
86
|
-
display: flex;
|
|
87
|
-
align-items: center;
|
|
88
|
-
justify-content: space-between;
|
|
89
|
-
position: relative;
|
|
90
|
-
width: 100%;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.scalar-api-client__item .scalar-api-client__item__title {
|
|
94
|
-
color: var(--theme-color-1);
|
|
95
|
-
font-size: var(--theme-small);
|
|
96
|
-
font-weight: var(--theme-bold);
|
|
97
|
-
user-select: none;
|
|
98
|
-
flex: 1;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.scalar-api-client__item .scalar-api-client__item__title:after {
|
|
102
|
-
content: '';
|
|
103
|
-
position: absolute;
|
|
104
|
-
top: 0;
|
|
105
|
-
left: 0;
|
|
106
|
-
width: 100%;
|
|
107
|
-
height: 100%;
|
|
108
|
-
display: block;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.scalar-api-client__item .scalar-api-client__toggle__icon {
|
|
112
|
-
width: 10px;
|
|
113
|
-
margin-right: 6px;
|
|
114
|
-
color: var(--theme-color-1);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.scalar-api-client__item__options {
|
|
118
|
-
position: relative;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.scalar-api-client__item__options span {
|
|
122
|
-
background: var(--theme-background-3);
|
|
123
|
-
padding: 2px 6px;
|
|
124
|
-
border-radius: 3px;
|
|
125
|
-
font-size: 12px;
|
|
126
|
-
pointer-events: none;
|
|
127
|
-
color: var(--theme-color-2);
|
|
128
|
-
border: 1px solid var(--theme-border-color);
|
|
129
|
-
display: flex;
|
|
130
|
-
align-items: center;
|
|
131
|
-
justify-content: center;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.scalar-api-client__item__options span svg {
|
|
135
|
-
width: 9px;
|
|
136
|
-
height: 9px;
|
|
137
|
-
margin-left: 3px;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.scalar-api-client__item__options select {
|
|
141
|
-
position: absolute;
|
|
142
|
-
top: 0;
|
|
143
|
-
left: 0;
|
|
144
|
-
width: 100%;
|
|
145
|
-
height: 100%;
|
|
146
|
-
opacity: 0;
|
|
147
|
-
cursor: pointer;
|
|
148
|
-
}
|
|
149
|
-
</style>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as CollapsibleSection } from './CollapsibleSection.vue'
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
Dialog,
|
|
4
|
-
DialogDescription,
|
|
5
|
-
DialogPanel,
|
|
6
|
-
DialogTitle,
|
|
7
|
-
} from '@headlessui/vue'
|
|
8
|
-
import { reactive } from 'vue'
|
|
9
|
-
|
|
10
|
-
withDefaults(
|
|
11
|
-
defineProps<{
|
|
12
|
-
state: ModalState
|
|
13
|
-
title?: string
|
|
14
|
-
bodyClass?: string
|
|
15
|
-
maxWidth?: string
|
|
16
|
-
variant?: 'small' | 'normal' | 'large'
|
|
17
|
-
}>(),
|
|
18
|
-
{
|
|
19
|
-
variant: 'normal',
|
|
20
|
-
},
|
|
21
|
-
)
|
|
22
|
-
</script>
|
|
23
|
-
<script lang="ts">
|
|
24
|
-
export type ModalState = ReturnType<typeof useModalState>
|
|
25
|
-
|
|
26
|
-
export const useModalState = () =>
|
|
27
|
-
reactive({
|
|
28
|
-
open: false,
|
|
29
|
-
show() {
|
|
30
|
-
this.open = true
|
|
31
|
-
},
|
|
32
|
-
hide() {
|
|
33
|
-
this.open = false
|
|
34
|
-
},
|
|
35
|
-
})
|
|
36
|
-
</script>
|
|
37
|
-
<template>
|
|
38
|
-
<Dialog
|
|
39
|
-
:open="state.open"
|
|
40
|
-
@close="state.hide()">
|
|
41
|
-
<div class="modal-layout">
|
|
42
|
-
<DialogPanel
|
|
43
|
-
class="modal"
|
|
44
|
-
:class="{
|
|
45
|
-
'modal-content-large': variant === 'large',
|
|
46
|
-
'modal-content-normal': variant === 'normal',
|
|
47
|
-
'modal-content-small': variant === 'small',
|
|
48
|
-
}"
|
|
49
|
-
:style="{ maxWidth }">
|
|
50
|
-
<DialogTitle
|
|
51
|
-
v-if="title"
|
|
52
|
-
class="modal-header">
|
|
53
|
-
{{ title }}
|
|
54
|
-
</DialogTitle>
|
|
55
|
-
<DialogDescription
|
|
56
|
-
class="modal-body custom-scroll"
|
|
57
|
-
:class="[bodyClass]">
|
|
58
|
-
<slot />
|
|
59
|
-
</DialogDescription>
|
|
60
|
-
</DialogPanel>
|
|
61
|
-
</div>
|
|
62
|
-
</Dialog>
|
|
63
|
-
</template>
|
|
64
|
-
<style scoped>
|
|
65
|
-
.modal-layout {
|
|
66
|
-
position: fixed;
|
|
67
|
-
width: 100vw;
|
|
68
|
-
height: 100vh;
|
|
69
|
-
top: 0;
|
|
70
|
-
left: 0;
|
|
71
|
-
z-index: 1001;
|
|
72
|
-
background: rgba(0, 0, 0, 0.44);
|
|
73
|
-
padding: 20px;
|
|
74
|
-
opacity: 0;
|
|
75
|
-
animation: modal-fade 0.2s forwards;
|
|
76
|
-
}
|
|
77
|
-
.modal-body {
|
|
78
|
-
padding: 24px 12px 18px 24px;
|
|
79
|
-
max-height: calc(100vh - 240px);
|
|
80
|
-
background: var(--theme-background-1);
|
|
81
|
-
border-radius: var(--theme-radius-lg);
|
|
82
|
-
font-family: var(--theme-font);
|
|
83
|
-
}
|
|
84
|
-
.modal {
|
|
85
|
-
margin: 80px auto 0;
|
|
86
|
-
position: relative;
|
|
87
|
-
background: var(--theme-background-2);
|
|
88
|
-
border-radius: var(--theme-radius-lg);
|
|
89
|
-
color: var(--theme-color-1);
|
|
90
|
-
width: 100%;
|
|
91
|
-
text-align: left;
|
|
92
|
-
line-height: 1.4;
|
|
93
|
-
opacity: 0;
|
|
94
|
-
transform: scale(0.98);
|
|
95
|
-
animation: modal-pop 0.15s 0.15s forwards;
|
|
96
|
-
display: flex;
|
|
97
|
-
flex-direction: column;
|
|
98
|
-
}
|
|
99
|
-
.modal-content-large {
|
|
100
|
-
max-width: 800px;
|
|
101
|
-
}
|
|
102
|
-
.modal-content-normal {
|
|
103
|
-
max-width: 640px;
|
|
104
|
-
}
|
|
105
|
-
.modal-content-small {
|
|
106
|
-
max-width: 480px;
|
|
107
|
-
}
|
|
108
|
-
@keyframes modal-fade {
|
|
109
|
-
from {
|
|
110
|
-
opacity: 0;
|
|
111
|
-
}
|
|
112
|
-
to {
|
|
113
|
-
opacity: 1;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
@keyframes modal-pop {
|
|
117
|
-
0% {
|
|
118
|
-
opacity: 0;
|
|
119
|
-
}
|
|
120
|
-
100% {
|
|
121
|
-
opacity: 1;
|
|
122
|
-
transform: scale(1);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
.modal-header {
|
|
126
|
-
padding: 12px 24px;
|
|
127
|
-
color: var(--theme-color-1);
|
|
128
|
-
font-size: var(--theme-font-size-4);
|
|
129
|
-
text-align: left;
|
|
130
|
-
font-weight: 600;
|
|
131
|
-
border-radius: var(--theme-radius-lg) var(--theme-radius-lg) 0 0;
|
|
132
|
-
}
|
|
133
|
-
</style>
|