@stoplight/elements-dev-portal 1.9.7 → 1.9.8
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/components/NodeContent/NodeContent.d.ts +2 -1
- package/index.esm.js +8 -8
- package/index.js +8 -8
- package/index.mjs +8 -8
- package/package.json +1 -1
- package/version.d.ts +1 -1
- package/web-components.min.js +1 -1
|
@@ -7,8 +7,9 @@ export declare type NodeContentProps = {
|
|
|
7
7
|
Link: CustomLinkComponent;
|
|
8
8
|
hideMocking?: boolean;
|
|
9
9
|
refResolver?: ReferenceResolver;
|
|
10
|
+
onExportRequest?: (type: 'original' | 'bundled') => void;
|
|
10
11
|
} & DocsBaseProps & DocsLayoutProps;
|
|
11
|
-
export declare const NodeContent: ({ node, Link, hideMocking, refResolver, tryItCorsProxy, tryItCredentialsPolicy, nodeHasChanged, compact, hideTryIt, hideTryItPanel, hideExport, }: NodeContentProps) => JSX.Element;
|
|
12
|
+
export declare const NodeContent: ({ node, Link, hideMocking, refResolver, tryItCorsProxy, tryItCredentialsPolicy, nodeHasChanged, compact, hideTryIt, hideTryItPanel, hideExport, onExportRequest, }: NodeContentProps) => JSX.Element;
|
|
12
13
|
export declare const getNodeUriParts: (uri: string) => {
|
|
13
14
|
fileUri: string;
|
|
14
15
|
pointer: string;
|
package/index.esm.js
CHANGED
|
@@ -37,7 +37,7 @@ const PlatformProvider = ({ platformUrl = 'https://stoplight.io', platformAuthTo
|
|
|
37
37
|
};
|
|
38
38
|
const DevPortalProvider = withPersistenceBoundary(withQueryClientProvider(withMosaicProvider(PlatformProvider)));
|
|
39
39
|
|
|
40
|
-
const NodeContent = ({ node, Link, hideMocking, refResolver, tryItCorsProxy, tryItCredentialsPolicy, nodeHasChanged, compact, hideTryIt, hideTryItPanel, hideExport, }) => {
|
|
40
|
+
const NodeContent = ({ node, Link, hideMocking, refResolver, tryItCorsProxy, tryItCredentialsPolicy, nodeHasChanged, compact, hideTryIt, hideTryItPanel, hideExport, onExportRequest, }) => {
|
|
41
41
|
return (React.createElement(NodeLinkContext.Provider, { value: [node, Link] },
|
|
42
42
|
React.createElement(MarkdownComponentsProvider, { value: { a: LinkComponent } },
|
|
43
43
|
React.createElement(MockingProvider, { mockUrl: node.links.mock_url, hideMocking: hideMocking },
|
|
@@ -48,12 +48,12 @@ const NodeContent = ({ node, Link, hideMocking, refResolver, tryItCorsProxy, try
|
|
|
48
48
|
hideExport: hideExport || node.links.export_url === undefined,
|
|
49
49
|
}, useNodeForRefResolving: true, refResolver: refResolver, tryItCorsProxy: tryItCorsProxy, exportProps: [NodeType.HttpService, NodeType.Model].includes(node.type)
|
|
50
50
|
? {
|
|
51
|
-
original:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
bundled:
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
original: onExportRequest
|
|
52
|
+
? { onPress: () => onExportRequest('original') }
|
|
53
|
+
: { href: node.links.export_url },
|
|
54
|
+
bundled: onExportRequest
|
|
55
|
+
? { onPress: () => onExportRequest('bundled') }
|
|
56
|
+
: { href: getBundledUrl(node.links.export_url) },
|
|
57
57
|
}
|
|
58
58
|
: undefined, tryItCredentialsPolicy: tryItCredentialsPolicy, nodeHasChanged: nodeHasChanged })))));
|
|
59
59
|
};
|
|
@@ -240,7 +240,7 @@ const UpgradeToStarter = () => (React__default.createElement(Flex, { as: "a", hr
|
|
|
240
240
|
React__default.createElement(Icon, { icon: ['fas', 'exclamation-triangle'], size: "4x" }),
|
|
241
241
|
React__default.createElement(Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
|
|
242
242
|
|
|
243
|
-
const appVersion = '1.9.
|
|
243
|
+
const appVersion = '1.9.8';
|
|
244
244
|
|
|
245
245
|
class ResponseError extends Error {
|
|
246
246
|
constructor(message, responseCode) {
|
package/index.js
CHANGED
|
@@ -64,7 +64,7 @@ const PlatformProvider = ({ platformUrl = 'https://stoplight.io', platformAuthTo
|
|
|
64
64
|
};
|
|
65
65
|
const DevPortalProvider = elementsCore.withPersistenceBoundary(elementsCore.withQueryClientProvider(elementsCore.withMosaicProvider(PlatformProvider)));
|
|
66
66
|
|
|
67
|
-
const NodeContent = ({ node, Link, hideMocking, refResolver, tryItCorsProxy, tryItCredentialsPolicy, nodeHasChanged, compact, hideTryIt, hideTryItPanel, hideExport, }) => {
|
|
67
|
+
const NodeContent = ({ node, Link, hideMocking, refResolver, tryItCorsProxy, tryItCredentialsPolicy, nodeHasChanged, compact, hideTryIt, hideTryItPanel, hideExport, onExportRequest, }) => {
|
|
68
68
|
return (React__namespace.createElement(NodeLinkContext.Provider, { value: [node, Link] },
|
|
69
69
|
React__namespace.createElement(elementsCore.MarkdownComponentsProvider, { value: { a: LinkComponent } },
|
|
70
70
|
React__namespace.createElement(elementsCore.MockingProvider, { mockUrl: node.links.mock_url, hideMocking: hideMocking },
|
|
@@ -75,12 +75,12 @@ const NodeContent = ({ node, Link, hideMocking, refResolver, tryItCorsProxy, try
|
|
|
75
75
|
hideExport: hideExport || node.links.export_url === undefined,
|
|
76
76
|
}, useNodeForRefResolving: true, refResolver: refResolver, tryItCorsProxy: tryItCorsProxy, exportProps: [types.NodeType.HttpService, types.NodeType.Model].includes(node.type)
|
|
77
77
|
? {
|
|
78
|
-
original:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
bundled:
|
|
82
|
-
|
|
83
|
-
|
|
78
|
+
original: onExportRequest
|
|
79
|
+
? { onPress: () => onExportRequest('original') }
|
|
80
|
+
: { href: node.links.export_url },
|
|
81
|
+
bundled: onExportRequest
|
|
82
|
+
? { onPress: () => onExportRequest('bundled') }
|
|
83
|
+
: { href: getBundledUrl(node.links.export_url) },
|
|
84
84
|
}
|
|
85
85
|
: undefined, tryItCredentialsPolicy: tryItCredentialsPolicy, nodeHasChanged: nodeHasChanged })))));
|
|
86
86
|
};
|
|
@@ -267,7 +267,7 @@ const UpgradeToStarter = () => (React__default["default"].createElement(mosaic.F
|
|
|
267
267
|
React__default["default"].createElement(mosaic.Icon, { icon: ['fas', 'exclamation-triangle'], size: "4x" }),
|
|
268
268
|
React__default["default"].createElement(mosaic.Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
|
|
269
269
|
|
|
270
|
-
const appVersion = '1.9.
|
|
270
|
+
const appVersion = '1.9.8';
|
|
271
271
|
|
|
272
272
|
class ResponseError extends Error {
|
|
273
273
|
constructor(message, responseCode) {
|
package/index.mjs
CHANGED
|
@@ -37,7 +37,7 @@ const PlatformProvider = ({ platformUrl = 'https://stoplight.io', platformAuthTo
|
|
|
37
37
|
};
|
|
38
38
|
const DevPortalProvider = withPersistenceBoundary(withQueryClientProvider(withMosaicProvider(PlatformProvider)));
|
|
39
39
|
|
|
40
|
-
const NodeContent = ({ node, Link, hideMocking, refResolver, tryItCorsProxy, tryItCredentialsPolicy, nodeHasChanged, compact, hideTryIt, hideTryItPanel, hideExport, }) => {
|
|
40
|
+
const NodeContent = ({ node, Link, hideMocking, refResolver, tryItCorsProxy, tryItCredentialsPolicy, nodeHasChanged, compact, hideTryIt, hideTryItPanel, hideExport, onExportRequest, }) => {
|
|
41
41
|
return (React.createElement(NodeLinkContext.Provider, { value: [node, Link] },
|
|
42
42
|
React.createElement(MarkdownComponentsProvider, { value: { a: LinkComponent } },
|
|
43
43
|
React.createElement(MockingProvider, { mockUrl: node.links.mock_url, hideMocking: hideMocking },
|
|
@@ -48,12 +48,12 @@ const NodeContent = ({ node, Link, hideMocking, refResolver, tryItCorsProxy, try
|
|
|
48
48
|
hideExport: hideExport || node.links.export_url === undefined,
|
|
49
49
|
}, useNodeForRefResolving: true, refResolver: refResolver, tryItCorsProxy: tryItCorsProxy, exportProps: [NodeType.HttpService, NodeType.Model].includes(node.type)
|
|
50
50
|
? {
|
|
51
|
-
original:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
bundled:
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
original: onExportRequest
|
|
52
|
+
? { onPress: () => onExportRequest('original') }
|
|
53
|
+
: { href: node.links.export_url },
|
|
54
|
+
bundled: onExportRequest
|
|
55
|
+
? { onPress: () => onExportRequest('bundled') }
|
|
56
|
+
: { href: getBundledUrl(node.links.export_url) },
|
|
57
57
|
}
|
|
58
58
|
: undefined, tryItCredentialsPolicy: tryItCredentialsPolicy, nodeHasChanged: nodeHasChanged })))));
|
|
59
59
|
};
|
|
@@ -240,7 +240,7 @@ const UpgradeToStarter = () => (React__default.createElement(Flex, { as: "a", hr
|
|
|
240
240
|
React__default.createElement(Icon, { icon: ['fas', 'exclamation-triangle'], size: "4x" }),
|
|
241
241
|
React__default.createElement(Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
|
|
242
242
|
|
|
243
|
-
const appVersion = '1.9.
|
|
243
|
+
const appVersion = '1.9.8';
|
|
244
244
|
|
|
245
245
|
class ResponseError extends Error {
|
|
246
246
|
constructor(message, responseCode) {
|
package/package.json
CHANGED
package/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const appVersion = "1.9.
|
|
1
|
+
export declare const appVersion = "1.9.8";
|