@stoplight/elements-dev-portal 1.16.6 → 1.16.7
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/index.esm.js +7 -3
- package/index.js +7 -3
- package/index.mjs +7 -3
- package/package.json +1 -1
- package/styles.min.css +1 -1
- package/version.d.ts +1 -1
- package/web-components.min.js +1 -1
package/index.esm.js
CHANGED
|
@@ -249,7 +249,7 @@ const UpgradeToStarter = () => (React__default.createElement(Flex, { as: "a", hr
|
|
|
249
249
|
React__default.createElement(Icon, { icon: ['fas', 'exclamation-triangle'], size: "4x" }),
|
|
250
250
|
React__default.createElement(Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
|
|
251
251
|
|
|
252
|
-
const appVersion = '1.16.
|
|
252
|
+
const appVersion = '1.16.7';
|
|
253
253
|
|
|
254
254
|
class ResponseError extends Error {
|
|
255
255
|
constructor(message, responseCode) {
|
|
@@ -325,7 +325,8 @@ function useGetTableOfContents({ projectId, branchSlug }) {
|
|
|
325
325
|
}
|
|
326
326
|
|
|
327
327
|
const StoplightProjectImpl = ({ projectId, hideTryIt, hideMocking, hideExport, collapseTableOfContents = false, tryItCredentialsPolicy, tryItCorsProxy, }) => {
|
|
328
|
-
const { branchSlug = '', nodeSlug = '' } = useParams();
|
|
328
|
+
const { branchSlug: encodedBranchSlug = '', nodeSlug = '' } = useParams();
|
|
329
|
+
const branchSlug = decodeURIComponent(encodedBranchSlug);
|
|
329
330
|
const history = useHistory();
|
|
330
331
|
const { data: tableOfContents, isFetched: isTocFetched } = useGetTableOfContents({ projectId, branchSlug });
|
|
331
332
|
const { data: branches } = useGetBranches({ projectId });
|
|
@@ -376,7 +377,10 @@ const StoplightProjectImpl = ({ projectId, hideTryIt, hideMocking, hideExport, c
|
|
|
376
377
|
}
|
|
377
378
|
};
|
|
378
379
|
return (React.createElement(SidebarLayout, { ref: container, sidebar: React.createElement(React.Fragment, null,
|
|
379
|
-
branches && branches.length > 1 ? (React.createElement(BranchSelector, { branchSlug: branchSlug, branches: branches, onChange: branch =>
|
|
380
|
+
branches && branches.length > 1 ? (React.createElement(BranchSelector, { branchSlug: branchSlug, branches: branches, onChange: branch => {
|
|
381
|
+
const encodedBranchSlug = encodeURIComponent(branch.slug);
|
|
382
|
+
history.push(branch.is_default ? `/${nodeSlug}` : `/branches/${encodedBranchSlug}/${nodeSlug}`);
|
|
383
|
+
} })) : null,
|
|
380
384
|
tableOfContents ? (React.createElement(TableOfContents, { activeId: (node === null || node === void 0 ? void 0 : node.id) || (nodeSlug === null || nodeSlug === void 0 ? void 0 : nodeSlug.split('-')[0]) || '', tableOfContents: tableOfContents, Link: Link, collapseTableOfContents: collapseTableOfContents, onLinkClick: handleTocClick })) : null) }, elem));
|
|
381
385
|
};
|
|
382
386
|
const StoplightProjectRouter = (_a) => {
|
package/index.js
CHANGED
|
@@ -276,7 +276,7 @@ const UpgradeToStarter = () => (React__default["default"].createElement(mosaic.F
|
|
|
276
276
|
React__default["default"].createElement(mosaic.Icon, { icon: ['fas', 'exclamation-triangle'], size: "4x" }),
|
|
277
277
|
React__default["default"].createElement(mosaic.Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
|
|
278
278
|
|
|
279
|
-
const appVersion = '1.16.
|
|
279
|
+
const appVersion = '1.16.7';
|
|
280
280
|
|
|
281
281
|
class ResponseError extends Error {
|
|
282
282
|
constructor(message, responseCode) {
|
|
@@ -352,7 +352,8 @@ function useGetTableOfContents({ projectId, branchSlug }) {
|
|
|
352
352
|
}
|
|
353
353
|
|
|
354
354
|
const StoplightProjectImpl = ({ projectId, hideTryIt, hideMocking, hideExport, collapseTableOfContents = false, tryItCredentialsPolicy, tryItCorsProxy, }) => {
|
|
355
|
-
const { branchSlug = '', nodeSlug = '' } = reactRouterDom.useParams();
|
|
355
|
+
const { branchSlug: encodedBranchSlug = '', nodeSlug = '' } = reactRouterDom.useParams();
|
|
356
|
+
const branchSlug = decodeURIComponent(encodedBranchSlug);
|
|
356
357
|
const history = reactRouterDom.useHistory();
|
|
357
358
|
const { data: tableOfContents, isFetched: isTocFetched } = useGetTableOfContents({ projectId, branchSlug });
|
|
358
359
|
const { data: branches } = useGetBranches({ projectId });
|
|
@@ -403,7 +404,10 @@ const StoplightProjectImpl = ({ projectId, hideTryIt, hideMocking, hideExport, c
|
|
|
403
404
|
}
|
|
404
405
|
};
|
|
405
406
|
return (React__namespace.createElement(elementsCore.SidebarLayout, { ref: container, sidebar: React__namespace.createElement(React__namespace.Fragment, null,
|
|
406
|
-
branches && branches.length > 1 ? (React__namespace.createElement(BranchSelector, { branchSlug: branchSlug, branches: branches, onChange: branch =>
|
|
407
|
+
branches && branches.length > 1 ? (React__namespace.createElement(BranchSelector, { branchSlug: branchSlug, branches: branches, onChange: branch => {
|
|
408
|
+
const encodedBranchSlug = encodeURIComponent(branch.slug);
|
|
409
|
+
history.push(branch.is_default ? `/${nodeSlug}` : `/branches/${encodedBranchSlug}/${nodeSlug}`);
|
|
410
|
+
} })) : null,
|
|
407
411
|
tableOfContents ? (React__namespace.createElement(TableOfContents, { activeId: (node === null || node === void 0 ? void 0 : node.id) || (nodeSlug === null || nodeSlug === void 0 ? void 0 : nodeSlug.split('-')[0]) || '', tableOfContents: tableOfContents, Link: reactRouterDom.Link, collapseTableOfContents: collapseTableOfContents, onLinkClick: handleTocClick })) : null) }, elem));
|
|
408
412
|
};
|
|
409
413
|
const StoplightProjectRouter = (_a) => {
|
package/index.mjs
CHANGED
|
@@ -249,7 +249,7 @@ const UpgradeToStarter = () => (React__default.createElement(Flex, { as: "a", hr
|
|
|
249
249
|
React__default.createElement(Icon, { icon: ['fas', 'exclamation-triangle'], size: "4x" }),
|
|
250
250
|
React__default.createElement(Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
|
|
251
251
|
|
|
252
|
-
const appVersion = '1.16.
|
|
252
|
+
const appVersion = '1.16.7';
|
|
253
253
|
|
|
254
254
|
class ResponseError extends Error {
|
|
255
255
|
constructor(message, responseCode) {
|
|
@@ -325,7 +325,8 @@ function useGetTableOfContents({ projectId, branchSlug }) {
|
|
|
325
325
|
}
|
|
326
326
|
|
|
327
327
|
const StoplightProjectImpl = ({ projectId, hideTryIt, hideMocking, hideExport, collapseTableOfContents = false, tryItCredentialsPolicy, tryItCorsProxy, }) => {
|
|
328
|
-
const { branchSlug = '', nodeSlug = '' } = useParams();
|
|
328
|
+
const { branchSlug: encodedBranchSlug = '', nodeSlug = '' } = useParams();
|
|
329
|
+
const branchSlug = decodeURIComponent(encodedBranchSlug);
|
|
329
330
|
const history = useHistory();
|
|
330
331
|
const { data: tableOfContents, isFetched: isTocFetched } = useGetTableOfContents({ projectId, branchSlug });
|
|
331
332
|
const { data: branches } = useGetBranches({ projectId });
|
|
@@ -376,7 +377,10 @@ const StoplightProjectImpl = ({ projectId, hideTryIt, hideMocking, hideExport, c
|
|
|
376
377
|
}
|
|
377
378
|
};
|
|
378
379
|
return (React.createElement(SidebarLayout, { ref: container, sidebar: React.createElement(React.Fragment, null,
|
|
379
|
-
branches && branches.length > 1 ? (React.createElement(BranchSelector, { branchSlug: branchSlug, branches: branches, onChange: branch =>
|
|
380
|
+
branches && branches.length > 1 ? (React.createElement(BranchSelector, { branchSlug: branchSlug, branches: branches, onChange: branch => {
|
|
381
|
+
const encodedBranchSlug = encodeURIComponent(branch.slug);
|
|
382
|
+
history.push(branch.is_default ? `/${nodeSlug}` : `/branches/${encodedBranchSlug}/${nodeSlug}`);
|
|
383
|
+
} })) : null,
|
|
380
384
|
tableOfContents ? (React.createElement(TableOfContents, { activeId: (node === null || node === void 0 ? void 0 : node.id) || (nodeSlug === null || nodeSlug === void 0 ? void 0 : nodeSlug.split('-')[0]) || '', tableOfContents: tableOfContents, Link: Link, collapseTableOfContents: collapseTableOfContents, onLinkClick: handleTocClick })) : null) }, elem));
|
|
381
385
|
};
|
|
382
386
|
const StoplightProjectRouter = (_a) => {
|