docusaurus-theme-openapi-docs 1.4.1 → 1.4.3
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/lib/theme/ApiDemoPanel/Execute/index.js +3 -1
- package/lib/theme/SchemaTabs/index.js +14 -5
- package/lib-next/theme/ApiDemoPanel/Execute/index.js +7 -0
- package/lib-next/theme/SchemaTabs/index.js +14 -5
- package/package.json +3 -3
- package/src/theme/ApiDemoPanel/Execute/index.tsx +1 -0
- package/src/theme/SchemaTabs/index.js +14 -5
|
@@ -108,7 +108,9 @@ function Execute({
|
|
|
108
108
|
};
|
|
109
109
|
|
|
110
110
|
if (agreementAccepted) {
|
|
111
|
-
return <button className="button button--sm button--secondary" disabled={!isValidRequest}
|
|
111
|
+
return <button className="button button--sm button--secondary" disabled={!isValidRequest} style={!isValidRequest ? {
|
|
112
|
+
pointerEvents: "all"
|
|
113
|
+
} : {}} onClick={async () => {
|
|
112
114
|
dispatch((0, _slice.setResponse)("Fetching..."));
|
|
113
115
|
|
|
114
116
|
try {
|
|
@@ -147,12 +147,21 @@ function SchemaTabsComponent(props) {
|
|
|
147
147
|
const [showTabArrows, setShowTabArrows] = useState(false);
|
|
148
148
|
|
|
149
149
|
useEffect(() => {
|
|
150
|
-
const
|
|
151
|
-
|
|
150
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
|
151
|
+
for (let entry of entries) {
|
|
152
|
+
if (entry.target.offsetWidth < entry.target.scrollWidth) {
|
|
153
|
+
setShowTabArrows(true);
|
|
154
|
+
} else {
|
|
155
|
+
setShowTabArrows(false);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
});
|
|
152
159
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
160
|
+
resizeObserver.observe(tabItemListContainerRef.current);
|
|
161
|
+
|
|
162
|
+
return () => {
|
|
163
|
+
resizeObserver.disconnect();
|
|
164
|
+
};
|
|
156
165
|
}, []);
|
|
157
166
|
|
|
158
167
|
const handleRightClick = () => {
|
|
@@ -93,6 +93,13 @@ function Execute({ postman, proxy }) {
|
|
|
93
93
|
<button
|
|
94
94
|
className="button button--sm button--secondary"
|
|
95
95
|
disabled={!isValidRequest}
|
|
96
|
+
style={
|
|
97
|
+
!isValidRequest
|
|
98
|
+
? {
|
|
99
|
+
pointerEvents: "all",
|
|
100
|
+
}
|
|
101
|
+
: {}
|
|
102
|
+
}
|
|
96
103
|
onClick={async () => {
|
|
97
104
|
dispatch(setResponse("Fetching..."));
|
|
98
105
|
|
|
@@ -147,12 +147,21 @@ function SchemaTabsComponent(props) {
|
|
|
147
147
|
const [showTabArrows, setShowTabArrows] = useState(false);
|
|
148
148
|
|
|
149
149
|
useEffect(() => {
|
|
150
|
-
const
|
|
151
|
-
|
|
150
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
|
151
|
+
for (let entry of entries) {
|
|
152
|
+
if (entry.target.offsetWidth < entry.target.scrollWidth) {
|
|
153
|
+
setShowTabArrows(true);
|
|
154
|
+
} else {
|
|
155
|
+
setShowTabArrows(false);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
});
|
|
152
159
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
160
|
+
resizeObserver.observe(tabItemListContainerRef.current);
|
|
161
|
+
|
|
162
|
+
return () => {
|
|
163
|
+
resizeObserver.disconnect();
|
|
164
|
+
};
|
|
156
165
|
}, []);
|
|
157
166
|
|
|
158
167
|
const handleRightClick = () => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docusaurus-theme-openapi-docs",
|
|
3
3
|
"description": "OpenAPI theme for Docusaurus.",
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.3",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"openapi",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"buffer": "^6.0.3",
|
|
52
52
|
"clsx": "^1.1.1",
|
|
53
53
|
"crypto-js": "^4.1.1",
|
|
54
|
-
"docusaurus-plugin-openapi-docs": "^1.4.
|
|
54
|
+
"docusaurus-plugin-openapi-docs": "^1.4.3",
|
|
55
55
|
"file-saver": "^2.0.5",
|
|
56
56
|
"immer": "^9.0.7",
|
|
57
57
|
"lodash": "^4.17.20",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"engines": {
|
|
74
74
|
"node": ">=14"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "277586102253008f831bedbb990fb9854658a190"
|
|
77
77
|
}
|
|
@@ -112,6 +112,7 @@ function Execute({ postman, proxy }: Props) {
|
|
|
112
112
|
<button
|
|
113
113
|
className="button button--sm button--secondary"
|
|
114
114
|
disabled={!isValidRequest}
|
|
115
|
+
style={!isValidRequest ? { pointerEvents: "all" } : {}}
|
|
115
116
|
onClick={async () => {
|
|
116
117
|
dispatch(setResponse("Fetching..."));
|
|
117
118
|
try {
|
|
@@ -147,12 +147,21 @@ function SchemaTabsComponent(props) {
|
|
|
147
147
|
const [showTabArrows, setShowTabArrows] = useState(false);
|
|
148
148
|
|
|
149
149
|
useEffect(() => {
|
|
150
|
-
const
|
|
151
|
-
|
|
150
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
|
151
|
+
for (let entry of entries) {
|
|
152
|
+
if (entry.target.offsetWidth < entry.target.scrollWidth) {
|
|
153
|
+
setShowTabArrows(true);
|
|
154
|
+
} else {
|
|
155
|
+
setShowTabArrows(false);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
});
|
|
152
159
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
160
|
+
resizeObserver.observe(tabItemListContainerRef.current);
|
|
161
|
+
|
|
162
|
+
return () => {
|
|
163
|
+
resizeObserver.disconnect();
|
|
164
|
+
};
|
|
156
165
|
}, []);
|
|
157
166
|
|
|
158
167
|
const handleRightClick = () => {
|