@jpmorganchase/elemental 6.0.2 → 7.1.1
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/API/APIWithResponsiveSidebarLayout.d.ts +25 -0
- package/components/API/APIWithSidebarLayout.d.ts +17 -1
- package/components/API/APIWithStackedLayout.d.ts +16 -1
- package/components/API/utils.d.ts +8 -6
- package/containers/API.d.ts +9 -1
- package/containers/API.spec.d.ts +0 -2
- package/containers/API.stories.d.ts +2 -0
- package/containers/story-helper.d.ts +2 -0
- package/index.d.ts +2 -0
- package/index.esm.js +662 -526
- package/index.js +675 -550
- package/index.mjs +662 -526
- package/package.json +9 -9
- package/styles.min.css +1 -1
- package/utils/oas/types.d.ts +5 -2
- package/web-components.min.js +1 -1
- package/web-components.min.js.LICENSE.txt +34 -25
@@ -0,0 +1,25 @@
|
|
1
|
+
import { ExportButtonProps } from '@jpmorganchase/elemental-core';
|
2
|
+
import { ExtensionAddonRenderer } from '@jpmorganchase/elemental-core/components/Docs';
|
3
|
+
import * as React from 'react';
|
4
|
+
import { ServiceNode } from '../../utils/oas/types';
|
5
|
+
declare type SidebarLayoutProps = {
|
6
|
+
serviceNode: ServiceNode;
|
7
|
+
logo?: string;
|
8
|
+
hideTryItPanel?: boolean;
|
9
|
+
hideTryIt?: boolean;
|
10
|
+
hideSamples?: boolean;
|
11
|
+
hideSchemas?: boolean;
|
12
|
+
hideInternal?: boolean;
|
13
|
+
hideExport?: boolean;
|
14
|
+
hideServerInfo?: boolean;
|
15
|
+
hideSecurityInfo?: boolean;
|
16
|
+
exportProps?: ExportButtonProps;
|
17
|
+
tryItCredentialsPolicy?: 'omit' | 'include' | 'same-origin';
|
18
|
+
tryItCorsProxy?: string;
|
19
|
+
compact?: number | boolean;
|
20
|
+
renderExtensionAddon?: ExtensionAddonRenderer;
|
21
|
+
basePath?: string;
|
22
|
+
outerRouter?: boolean;
|
23
|
+
};
|
24
|
+
export declare const APIWithResponsiveSidebarLayout: React.FC<SidebarLayoutProps>;
|
25
|
+
export {};
|
@@ -1,20 +1,36 @@
|
|
1
|
-
import { ExportButtonProps } from '@jpmorganchase/elemental-core';
|
1
|
+
import { ExportButtonProps, TableOfContentsItem } from '@jpmorganchase/elemental-core';
|
2
|
+
import { ExtensionAddonRenderer } from '@jpmorganchase/elemental-core/components/Docs';
|
2
3
|
import * as React from 'react';
|
3
4
|
import { ServiceNode } from '../../utils/oas/types';
|
4
5
|
declare type SidebarLayoutProps = {
|
5
6
|
serviceNode: ServiceNode;
|
6
7
|
logo?: string;
|
8
|
+
hideTryItPanel?: boolean;
|
7
9
|
hideTryIt?: boolean;
|
10
|
+
hideSamples?: boolean;
|
8
11
|
hideSchemas?: boolean;
|
9
12
|
hideInternal?: boolean;
|
13
|
+
hideServerInfo?: boolean;
|
14
|
+
hideSecurityInfo?: boolean;
|
10
15
|
hideExport?: boolean;
|
11
16
|
hideInlineExamples?: boolean;
|
12
17
|
exportProps?: ExportButtonProps;
|
13
18
|
tryItCredentialsPolicy?: 'omit' | 'include' | 'same-origin';
|
14
19
|
tryItCorsProxy?: string;
|
20
|
+
renderExtensionAddon?: ExtensionAddonRenderer;
|
21
|
+
basePath?: string;
|
22
|
+
outerRouter?: boolean;
|
15
23
|
tryItOutDefaultServer?: string;
|
16
24
|
useCustomNav?: boolean;
|
17
25
|
layout?: 'sidebar' | 'drawer';
|
18
26
|
};
|
19
27
|
export declare const APIWithSidebarLayout: React.FC<SidebarLayoutProps>;
|
28
|
+
declare type SidebarProps = {
|
29
|
+
serviceNode: ServiceNode;
|
30
|
+
logo?: string;
|
31
|
+
container: React.RefObject<HTMLElement>;
|
32
|
+
pathname: string;
|
33
|
+
tree: TableOfContentsItem[];
|
34
|
+
};
|
35
|
+
export declare const Sidebar: React.FC<SidebarProps>;
|
20
36
|
export {};
|
@@ -1,15 +1,30 @@
|
|
1
1
|
import { ExportButtonProps } from '@jpmorganchase/elemental-core';
|
2
|
+
import { ExtensionAddonRenderer } from '@jpmorganchase/elemental-core/components/Docs';
|
2
3
|
import * as React from 'react';
|
3
4
|
import { ServiceNode } from '../../utils/oas/types';
|
4
5
|
declare type TryItCredentialsPolicy = 'omit' | 'include' | 'same-origin';
|
6
|
+
interface Location {
|
7
|
+
pathname: string;
|
8
|
+
search: string;
|
9
|
+
hash: string;
|
10
|
+
state: unknown;
|
11
|
+
key: string;
|
12
|
+
}
|
5
13
|
declare type StackedLayoutProps = {
|
6
14
|
serviceNode: ServiceNode;
|
15
|
+
hideTryItPanel?: boolean;
|
7
16
|
hideTryIt?: boolean;
|
17
|
+
hideSamples?: boolean;
|
8
18
|
hideExport?: boolean;
|
9
|
-
|
19
|
+
hideServerInfo?: boolean;
|
20
|
+
hideSecurityInfo?: boolean;
|
10
21
|
exportProps?: ExportButtonProps;
|
11
22
|
tryItCredentialsPolicy?: TryItCredentialsPolicy;
|
12
23
|
tryItCorsProxy?: string;
|
24
|
+
showPoweredByLink?: boolean;
|
25
|
+
location: Location;
|
26
|
+
renderExtensionAddon?: ExtensionAddonRenderer;
|
27
|
+
hideInlineExamples?: boolean;
|
13
28
|
tryItOutDefaultServer?: string;
|
14
29
|
};
|
15
30
|
export declare const APIWithStackedLayout: React.FC<StackedLayoutProps>;
|
@@ -1,12 +1,13 @@
|
|
1
1
|
import { TableOfContentsItem } from '@jpmorganchase/elemental-core';
|
2
|
-
import { OperationNode, ServiceChildNode, ServiceNode } from '../../utils/oas/types';
|
3
|
-
|
2
|
+
import { OperationNode, SchemaNode, ServiceChildNode, ServiceNode, WebhookNode } from '../../utils/oas/types';
|
3
|
+
declare type GroupableNode = OperationNode | WebhookNode | SchemaNode;
|
4
|
+
export declare type TagGroup<T extends GroupableNode> = {
|
4
5
|
title: string;
|
5
|
-
items:
|
6
|
+
items: T[];
|
6
7
|
};
|
7
|
-
export declare
|
8
|
-
groups: TagGroup[];
|
9
|
-
ungrouped:
|
8
|
+
export declare function computeTagGroups<T extends GroupableNode>(serviceNode: ServiceNode, nodeType: T['type']): {
|
9
|
+
groups: TagGroup<T>[];
|
10
|
+
ungrouped: T[];
|
10
11
|
};
|
11
12
|
interface ComputeAPITreeConfig {
|
12
13
|
hideSchemas?: boolean;
|
@@ -15,4 +16,5 @@ interface ComputeAPITreeConfig {
|
|
15
16
|
export declare const computeAPITree: (serviceNode: ServiceNode, config?: ComputeAPITreeConfig) => TableOfContentsItem[];
|
16
17
|
export declare const findFirstNodeSlug: (tree: TableOfContentsItem[]) => string | void;
|
17
18
|
export declare const isInternal: (node: ServiceChildNode | ServiceNode) => boolean;
|
19
|
+
export declare const resolveRelativePath: (currentPath: string, basePath: string, outerRouter: boolean) => string;
|
18
20
|
export {};
|
package/containers/API.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import { RoutingProps } from '@jpmorganchase/elemental-core';
|
2
|
+
import { ExtensionAddonRenderer } from '@jpmorganchase/elemental-core/components/Docs';
|
2
3
|
import * as React from 'react';
|
3
4
|
export declare type APIProps = APIPropsWithDocument | APIPropsWithUrl;
|
4
5
|
export declare type APIPropsWithUrl = {
|
@@ -9,15 +10,22 @@ export declare type APIPropsWithDocument = {
|
|
9
10
|
apiDescriptionUrl?: string;
|
10
11
|
} & CommonAPIProps;
|
11
12
|
export interface CommonAPIProps extends RoutingProps {
|
12
|
-
layout?: 'sidebar' | 'stacked' | 'drawer';
|
13
|
+
layout?: 'sidebar' | 'stacked' | 'responsive' | 'drawer';
|
13
14
|
logo?: string;
|
14
15
|
hideTryIt?: boolean;
|
16
|
+
hideSamples?: boolean;
|
17
|
+
hideTryItPanel?: boolean;
|
18
|
+
hideSecurityInfo?: boolean;
|
19
|
+
hideServerInfo?: boolean;
|
15
20
|
hideSchemas?: boolean;
|
16
21
|
hideInternal?: boolean;
|
17
22
|
hideExport?: boolean;
|
18
23
|
hideInlineExamples?: boolean;
|
19
24
|
tryItCredentialsPolicy?: 'omit' | 'include' | 'same-origin';
|
20
25
|
tryItCorsProxy?: string;
|
26
|
+
maxRefDepth?: number;
|
27
|
+
renderExtensionAddon?: ExtensionAddonRenderer;
|
28
|
+
outerRouter?: boolean;
|
21
29
|
tryItOutDefaultServer?: string;
|
22
30
|
useCustomNav?: boolean;
|
23
31
|
}
|
package/containers/API.spec.d.ts
CHANGED
@@ -50,7 +50,9 @@ export declare const APIWithInternalOperations: import("@storybook/types").Annot
|
|
50
50
|
export declare const OpenApi3Schema: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, APIProps>;
|
51
51
|
export declare const BadgesForSchema: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, APIProps>;
|
52
52
|
export declare const StackedLayout: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, APIProps>;
|
53
|
+
export declare const ResponsiveLayout: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, APIProps>;
|
53
54
|
export declare const Box: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, APIProps>;
|
54
55
|
export declare const DigitalOcean: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, APIProps>;
|
55
56
|
export declare const Github: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, APIProps>;
|
56
57
|
export declare const Instagram: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, APIProps>;
|
58
|
+
export declare const WithExtensionRenderer: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, APIProps>;
|
package/index.d.ts
CHANGED
@@ -1,5 +1,7 @@
|
|
1
|
+
export { APIWithStackedLayout } from './components/API/APIWithStackedLayout';
|
1
2
|
export type { APIProps } from './containers/API';
|
2
3
|
export { API } from './containers/API';
|
3
4
|
export { useGetOasNavTree } from './hooks/oas-nav-tree/useGetOasNavTree';
|
4
5
|
export { useExportDocumentProps } from './hooks/useExportDocumentProps';
|
5
6
|
export { transformOasToServiceNode } from './utils/oas';
|
7
|
+
export type { ServiceNode } from './utils/oas/types';
|