@atlassian/clientside-extensions-components 4.0.2 → 5.1.0-5a180d69-mdyn784a
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/dist/cjs/ExtensionPoint.js +1 -1
- package/dist/cjs/ExtensionPoint.js.map +1 -1
- package/dist/cjs/ExtensionPointInfo.js +27 -20
- package/dist/cjs/ExtensionPointInfo.js.map +1 -1
- package/dist/cjs/ExtensionsObservable.js +1 -1
- package/dist/cjs/ExtensionsObservable.js.map +1 -1
- package/dist/cjs/handlers/AsyncPanelHandler.js +1 -1
- package/dist/cjs/handlers/AsyncPanelHandler.js.map +1 -1
- package/dist/cjs/handlers/ButtonHandler.js +2 -2
- package/dist/cjs/handlers/ButtonHandler.js.map +1 -1
- package/dist/cjs/handlers/LinkHandler.js +2 -2
- package/dist/cjs/handlers/LinkHandler.js.map +1 -1
- package/dist/cjs/handlers/ModalHandler.js +5 -5
- package/dist/cjs/handlers/ModalHandler.js.map +1 -1
- package/dist/cjs/handlers/PanelHandler.js +1 -1
- package/dist/cjs/handlers/PanelHandler.js.map +1 -1
- package/dist/cjs/handlers/SectionHandler.js +1 -2
- package/dist/cjs/handlers/SectionHandler.js.map +1 -1
- package/dist/cjs/index.js +10 -10
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/renderElementAsReact.js +4 -3
- package/dist/cjs/renderElementAsReact.js.map +1 -1
- package/dist/cjs/styled.js +17 -47
- package/dist/cjs/styled.js.map +1 -1
- package/dist/cjs/types.js +1 -2
- package/dist/cjs/types.js.map +1 -1
- package/dist/cjs/useExtensions.js +1 -1
- package/dist/cjs/useExtensions.js.map +1 -1
- package/dist/cjs/useWebPanelRenderer.js.map +1 -1
- package/dist/esm/ExtensionPoint.js.map +1 -1
- package/dist/esm/ExtensionPointInfo.js +26 -19
- package/dist/esm/ExtensionPointInfo.js.map +1 -1
- package/dist/esm/ExtensionsObservable.js.map +1 -1
- package/dist/esm/handlers/AsyncPanelHandler.js.map +1 -1
- package/dist/esm/handlers/ButtonHandler.js.map +1 -1
- package/dist/esm/handlers/LinkHandler.js.map +1 -1
- package/dist/esm/handlers/ModalHandler.js +5 -5
- package/dist/esm/handlers/ModalHandler.js.map +1 -1
- package/dist/esm/handlers/PanelHandler.js.map +1 -1
- package/dist/esm/handlers/SectionHandler.js +0 -1
- package/dist/esm/handlers/SectionHandler.js.map +1 -1
- package/dist/esm/renderElementAsReact.js +3 -2
- package/dist/esm/renderElementAsReact.js.map +1 -1
- package/dist/esm/styled.js +14 -44
- package/dist/esm/styled.js.map +1 -1
- package/dist/esm/useExtensions.js.map +1 -1
- package/dist/esm/useWebPanelRenderer.js.map +1 -1
- package/dist/types/ExtensionPointInfo.d.ts +1 -1
- package/dist/types/ExtensionPointInfo.d.ts.map +1 -1
- package/dist/types/ExtensionsObservable.d.ts.map +1 -1
- package/dist/types/debug/types.d.ts +1 -1
- package/dist/types/debug/types.d.ts.map +1 -1
- package/dist/types/debug/useDebug.d.ts.map +1 -1
- package/dist/types/debug/useDiscovery.d.ts.map +1 -1
- package/dist/types/debug/useLogging.d.ts.map +1 -1
- package/dist/types/debug/useValidation.d.ts.map +1 -1
- package/dist/types/handlers/AsyncPanelHandler.d.ts +1 -1
- package/dist/types/handlers/AsyncPanelHandler.d.ts.map +1 -1
- package/dist/types/handlers/ButtonHandler.d.ts +2 -0
- package/dist/types/handlers/ButtonHandler.d.ts.map +1 -1
- package/dist/types/handlers/LinkHandler.d.ts +2 -0
- package/dist/types/handlers/LinkHandler.d.ts.map +1 -1
- package/dist/types/handlers/ModalHandler.d.ts +2 -1
- package/dist/types/handlers/ModalHandler.d.ts.map +1 -1
- package/dist/types/handlers/SectionHandler.d.ts +6 -1
- package/dist/types/handlers/SectionHandler.d.ts.map +1 -1
- package/dist/types/renderElementAsReact.d.ts +2 -1
- package/dist/types/renderElementAsReact.d.ts.map +1 -1
- package/dist/types/styled.d.ts +33 -14
- package/dist/types/styled.d.ts.map +1 -1
- package/dist/types/types.d.ts +4 -4
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/useExtensions.d.ts.map +1 -1
- package/lib/ExtensionPoint.test.tsx +1 -1
- package/lib/ExtensionPointInfo.test.tsx +1 -1
- package/lib/ExtensionPointInfo.tsx +51 -24
- package/lib/ExtensionsObservable.test.ts +1 -1
- package/lib/__snapshots__/ExtensionPointInfo.test.tsx.snap +203 -124
- package/lib/debug/useDebug.test.ts +2 -2
- package/lib/debug/useDiscovery.test.ts +2 -2
- package/lib/debug/useLogging.test.ts +2 -2
- package/lib/debug/useValidation.test.ts +2 -2
- package/lib/handlers/ButtonHandler.test.tsx +5 -1
- package/lib/handlers/ButtonHandler.tsx +3 -1
- package/lib/handlers/LinkHandler.test.tsx +5 -1
- package/lib/handlers/LinkHandler.tsx +1 -0
- package/lib/handlers/ModalHandler.test.tsx +9 -7
- package/lib/handlers/ModalHandler.tsx +11 -9
- package/lib/handlers/SectionHandler.test.tsx +1 -1
- package/lib/handlers/SectionHandler.tsx +5 -1
- package/lib/renderElementAsReact.test.tsx +7 -6
- package/lib/renderElementAsReact.tsx +12 -3
- package/lib/styled.ts +15 -46
- package/lib/useExtensions.test.ts +49 -43
- package/package.json +25 -24
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsyncPanelHandler.d.ts","sourceRoot":"","sources":["../../../lib/handlers/AsyncPanelHandler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAE5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGxD,
|
|
1
|
+
{"version":3,"file":"AsyncPanelHandler.d.ts","sourceRoot":"","sources":["../../../lib/handlers/AsyncPanelHandler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAE5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGxD,MAAM,MAAM,yBAAyB,GAAG,MAAM,OAAO,CAAC;IAAE,OAAO,EAAE,mBAAmB,CAAC,yBAAyB,CAAC;IAAC,UAAU,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AAEvI,MAAM,WAAW,sBAAsB;IACnC,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,MAAM,CAAC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,yBAAyB,CAAC;IAC1C,eAAe,CAAC,EAAE,MAAM,OAAO,CAAC,EAAE,CAAC,CAAC;IACpC,QAAQ,CAAC,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;CAC5C;AA6CD,eAAO,MAAM,iBAAiB,EAAE,iBAAiB,CAAC,sBAAsB,CAmEvE,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { FunctionComponent } from 'react';
|
|
2
3
|
import type { OnClickHandler } from './types';
|
|
3
4
|
export interface ButtonHandlerProps extends OnClickHandler {
|
|
5
|
+
children?: React.ReactNode;
|
|
4
6
|
}
|
|
5
7
|
export declare const ButtonHandler: FunctionComponent<ButtonHandlerProps>;
|
|
6
8
|
//# sourceMappingURL=ButtonHandler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonHandler.d.ts","sourceRoot":"","sources":["../../../lib/handlers/ButtonHandler.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ButtonHandler.d.ts","sourceRoot":"","sources":["../../../lib/handlers/ButtonHandler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,WAAW,kBAAmB,SAAQ,cAAc;IACtD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B;AAED,eAAO,MAAM,aAAa,EAAE,iBAAiB,CAAC,kBAAkB,CA2B/D,CAAC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { FunctionComponent } from 'react';
|
|
2
3
|
import type { OnClickHandler } from './types';
|
|
3
4
|
export interface LinkHandlerProps extends Partial<OnClickHandler> {
|
|
4
5
|
href: string;
|
|
6
|
+
children?: React.ReactNode;
|
|
5
7
|
}
|
|
6
8
|
export declare const LinkHandler: FunctionComponent<LinkHandlerProps>;
|
|
7
9
|
//# sourceMappingURL=LinkHandler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkHandler.d.ts","sourceRoot":"","sources":["../../../lib/handlers/LinkHandler.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LinkHandler.d.ts","sourceRoot":"","sources":["../../../lib/handlers/LinkHandler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,WAAW,gBAAiB,SAAQ,OAAO,CAAC,cAAc,CAAC;IAC7D,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B;AAED,eAAO,MAAM,WAAW,EAAE,iBAAiB,CAAC,gBAAgB,CA4B3D,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { FunctionComponent } from 'react';
|
|
2
1
|
import { ModalExtension } from '@atlassian/clientside-extensions';
|
|
2
|
+
import type { FunctionComponent, ReactNode } from 'react';
|
|
3
3
|
import type { OnClickHandler } from './types';
|
|
4
4
|
export interface ModalHandlerProps {
|
|
5
5
|
render: ModalExtension.ModalRenderExtension;
|
|
@@ -10,6 +10,7 @@ export interface ModalHandlerProps {
|
|
|
10
10
|
}
|
|
11
11
|
export declare const ModalHandler: FunctionComponent<ModalHandlerProps>;
|
|
12
12
|
export interface ModalWithActionHandlerProps extends Omit<OnClickHandler, 'onAction'> {
|
|
13
|
+
children?: ReactNode;
|
|
13
14
|
render: ModalExtension.ModalRenderExtension;
|
|
14
15
|
__withoutTransition?: boolean;
|
|
15
16
|
__disableFocusLock?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalHandler.d.ts","sourceRoot":"","sources":["../../../lib/handlers/ModalHandler.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ModalHandler.d.ts","sourceRoot":"","sources":["../../../lib/handlers/ModalHandler.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAsB9C,MAAM,WAAW,iBAAiB;IAC9B,MAAM,EAAE,cAAc,CAAC,oBAAoB,CAAC;IAC5C,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,eAAO,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,CA0D7D,CAAC;AAEF,MAAM,WAAW,2BAA4B,SAAQ,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC;IACjF,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE,cAAc,CAAC,oBAAoB,CAAC;IAC5C,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,eAAO,MAAM,sBAAsB,EAAE,iBAAiB,CAAC,2BAA2B,CAmDjF,CAAC"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { FunctionComponent } from 'react';
|
|
2
|
-
|
|
3
|
+
interface SectionHandlerProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const SectionHandler: FunctionComponent<SectionHandlerProps>;
|
|
7
|
+
export {};
|
|
3
8
|
//# sourceMappingURL=SectionHandler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionHandler.d.ts","sourceRoot":"","sources":["../../../lib/handlers/SectionHandler.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SectionHandler.d.ts","sourceRoot":"","sources":["../../../lib/handlers/SectionHandler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG/C,UAAU,mBAAmB;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED,eAAO,MAAM,cAAc,EAAE,iBAAiB,CAAC,mBAAmB,CAEjE,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ComponentType } from 'react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import type { MountableExtension } from '@atlassian/clientside-extensions';
|
|
3
|
-
declare function renderElementAsReact<PropsT>(renderApi: MountableExtension, RenderElement: ComponentType<PropsT>, additionalProps?:
|
|
4
|
+
declare function renderElementAsReact<PropsT extends React.JSX.IntrinsicAttributes>(renderApi: MountableExtension, RenderElement: ComponentType<PropsT>, additionalProps?: unknown): void;
|
|
4
5
|
export default renderElementAsReact;
|
|
5
6
|
//# sourceMappingURL=renderElementAsReact.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderElementAsReact.d.ts","sourceRoot":"","sources":["../../lib/renderElementAsReact.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"renderElementAsReact.d.ts","sourceRoot":"","sources":["../../lib/renderElementAsReact.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,iBAAS,oBAAoB,CAAC,MAAM,SAAS,KAAK,CAAC,GAAG,CAAC,mBAAmB,EACtE,SAAS,EAAE,kBAAkB,EAC7B,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,EACpC,eAAe,CAAC,EAAE,OAAO,QAe5B;AAED,eAAe,oBAAoB,CAAC"}
|
package/dist/types/styled.d.ts
CHANGED
|
@@ -1,15 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const BlinkerContainer: import("@emotion/styled
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}>;
|
|
14
|
-
export declare const
|
|
1
|
+
export declare const GRID_SIZE = 8;
|
|
2
|
+
export declare const BlinkerContainer: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme;
|
|
4
|
+
as?: React.ElementType;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
6
|
+
export declare const Blinker: import("@emotion/styled").StyledComponent<{
|
|
7
|
+
theme?: import("@emotion/react").Theme;
|
|
8
|
+
as?: React.ElementType;
|
|
9
|
+
}, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
10
|
+
export declare const Table: import("@emotion/styled").StyledComponent<{
|
|
11
|
+
theme?: import("@emotion/react").Theme;
|
|
12
|
+
as?: React.ElementType;
|
|
13
|
+
}, import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, {}>;
|
|
14
|
+
export declare const HeadRow: import("@emotion/styled").StyledComponent<{
|
|
15
|
+
theme?: import("@emotion/react").Theme;
|
|
16
|
+
as?: React.ElementType;
|
|
17
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, {}>;
|
|
18
|
+
export declare const HeadCell: import("@emotion/styled").StyledComponent<{
|
|
19
|
+
theme?: import("@emotion/react").Theme;
|
|
20
|
+
as?: React.ElementType;
|
|
21
|
+
}, import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, {}>;
|
|
22
|
+
export declare const TableRow: import("@emotion/styled").StyledComponent<{
|
|
23
|
+
theme?: import("@emotion/react").Theme;
|
|
24
|
+
as?: React.ElementType;
|
|
25
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, {}>;
|
|
26
|
+
export declare const TableCell: import("@emotion/styled").StyledComponent<{
|
|
27
|
+
theme?: import("@emotion/react").Theme;
|
|
28
|
+
as?: React.ElementType;
|
|
29
|
+
}, import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, {}>;
|
|
30
|
+
export declare const HeadingWrapper: import("@emotion/styled").StyledComponent<{
|
|
31
|
+
theme?: import("@emotion/react").Theme;
|
|
32
|
+
as?: React.ElementType;
|
|
33
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
15
34
|
//# sourceMappingURL=styled.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../lib/styled.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../lib/styled.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,SAAS,IAAI,CAAC;AAE3B,eAAO,MAAM,gBAAgB;;SAmBzB,MAAI,WAAW;2GAjBlB,CAAC;AAaF,eAAO,MAAM,OAAO;;eAIZ,WAAW;qHAkBlB,CAAC;AAKF,eAAO,MAAM,KAAK;;eAvBV,WAAW;kHA0BlB,CAAC;AAEF,eAAO,MAAM,OAAO;;eA5BZ,WAAW;mHA8BlB,CAAC;AAEF,eAAO,MAAM,QAAQ;;eAhCb,WAAW;mIA0ClB,CAAC;AAEF,eAAO,MAAM,QAAQ;;eA5Cb,WAAW;mHAiDlB,CAAC;AAEF,eAAO,MAAM,SAAS;;eAnDd,WAAW;+HAuDlB,CAAC;AAEF,eAAO,MAAM,cAAc;;eAzDnB,WAAW;yGA2DlB,CAAC"}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { ExtensionAttributes, ExtensionDescriptor } from '@atlassian/clientside-extensions-registry';
|
|
3
3
|
import type { Validator } from '@atlassian/clientside-extensions-schema';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
4
|
+
export type ExtensionState<T extends ExtensionAttributes> = [ExtensionDescriptor<T>[], ExtensionDescriptor<T>[], boolean];
|
|
5
|
+
export type ExtensionPointCallback<T> = (supportedDescriptors: T[], unsupportedDescriptors: T[], loading: boolean) => ReactNode;
|
|
6
|
+
export type ExtensionPointState<T extends ExtensionAttributes = ExtensionAttributes> = {
|
|
7
7
|
descriptors: ExtensionDescriptor<T>[];
|
|
8
8
|
loadingState: boolean;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type ExtensionPointUpdate<T extends ExtensionAttributes = ExtensionAttributes> = {
|
|
11
11
|
state: ExtensionPointState<T>;
|
|
12
12
|
update: ExtensionDescriptor<T>[];
|
|
13
13
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../lib/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAG1G,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../lib/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAG1G,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,mBAAmB,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE,EAAE,mBAAmB,CAAC,CAAC,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;AAC1H,MAAM,MAAM,sBAAsB,CAAC,CAAC,IAAI,CAAC,oBAAoB,EAAE,CAAC,EAAE,EAAE,sBAAsB,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,OAAO,KAAK,SAAS,CAAC;AAChI,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,mBAAmB,GAAG,mBAAmB,IAAI;IACnF,WAAW,EAAE,mBAAmB,CAAC,CAAC,CAAC,EAAE,CAAC;IACtC,YAAY,EAAE,OAAO,CAAC;CACzB,CAAC;AACF,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,mBAAmB,GAAG,mBAAmB,IAAI;IACpF,KAAK,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC;IAC9B,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAAC,EAAE,CAAC;CACpC,CAAC;AAEF,MAAM,WAAW,OAAO;IACpB,kBAAkB,EAAE,SAAS,CAAC;IAC9B,gBAAgB,CAAC,EAAE,SAAS,CAAC;CAChC;AAED,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,GAAG,SAAS,GAAG,CAAC,GAAG,KAAK,IAAI,CAAC,CAE/E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useExtensions.d.ts","sourceRoot":"","sources":["../../lib/useExtensions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,2CAA2C,CAAC;AAG9F,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAYvD,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"useExtensions.d.ts","sourceRoot":"","sources":["../../lib/useExtensions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,2CAA2C,CAAC;AAG9F,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAYvD,eAAO,MAAM,gBAAgB,GAAI,QAAQ,SAAS,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,SAAS,WAAW,SAAS,mBAAmB,wCAChG,MAAM,WACb,QAAQ,WACR,OAAO,KACjB,cAAc,CAAC,WAAW,CA2B5B,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,QAAQ,SAAS,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,SAAS,WAAW,SAAS,mBAAmB,wCAC7F,MAAM,WACb,QAAQ,WACR,OAAO,6MAInB,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACjC,QAAQ,SAAS,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,SACnC,WAAW,SAAS,mBAAmB,8BAEjC,MAAM,WACH,QAAQ,WACR,OAAO,6MAInB,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAClC,QAAQ,SAAS,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,SACnC,WAAW,SAAS,mBAAmB,8BAEjC,MAAM,WACH,QAAQ,WACR,OAAO,YAInB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { mocked } from '
|
|
2
|
+
import { mocked } from 'jest-mock';
|
|
3
3
|
import { act, render } from '@testing-library/react';
|
|
4
4
|
import type { ExtensionDescriptor } from '@atlassian/clientside-extensions-registry';
|
|
5
5
|
import registry from '@atlassian/clientside-extensions-registry';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { mocked } from '
|
|
2
|
+
import { mocked } from 'jest-mock';
|
|
3
3
|
import { render, fireEvent, screen, findByRole as findByRoleInContainer } from '@testing-library/react';
|
|
4
4
|
|
|
5
5
|
import type { SerializedDocument } from '@atlassian/clientside-extensions-schema';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import Button from '@atlaskit/button/new';
|
|
2
|
+
import Heading from '@atlaskit/heading';
|
|
3
|
+
import Modal, { ModalFooter, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
|
|
1
4
|
import type { FunctionComponent } from 'react';
|
|
2
5
|
import React, { memo, useState } from 'react';
|
|
3
|
-
import
|
|
4
|
-
import Modal, { ModalTransition, ModalTitle, ModalHeader, ModalFooter } from '@atlaskit/modal-dialog';
|
|
5
|
-
import { Link, Element } from 'react-scroll';
|
|
6
|
+
import { Element, Link } from 'react-scroll';
|
|
6
7
|
|
|
7
8
|
import type {
|
|
8
9
|
SerializedDocument,
|
|
@@ -13,9 +14,8 @@ import type {
|
|
|
13
14
|
// We only import types here
|
|
14
15
|
// eslint-disable-next-line node/no-unpublished-import
|
|
15
16
|
} from '@atlassian/clientside-extensions-schema';
|
|
16
|
-
import { gridSize } from '@atlaskit/theme/constants';
|
|
17
17
|
import useDiscovery from './debug/useDiscovery';
|
|
18
|
-
import {
|
|
18
|
+
import { Blinker, BlinkerContainer, GRID_SIZE, HeadCell, HeadingWrapper, HeadRow, Table, TableCell, TableRow } from './styled';
|
|
19
19
|
|
|
20
20
|
export type ExtensionPointInfoProps = {
|
|
21
21
|
name: string;
|
|
@@ -28,7 +28,8 @@ const LinkToElement = ({ to }: { to: string }) => {
|
|
|
28
28
|
const cleanTo = to.replace(/[^a-zA-Z0-9]/g, '');
|
|
29
29
|
|
|
30
30
|
return (
|
|
31
|
-
// eslint-disable-next-line jsx-a11y/anchor-is-valid
|
|
31
|
+
// eslint-disable-next-line jsx-a11y/anchor-is-valid, @typescript-eslint/ban-ts-comment
|
|
32
|
+
// @ts-ignore: react-scroll types are not up to date with the latest react version
|
|
32
33
|
<Link to={cleanTo} href="" containerId="___cse_info_container" offset={-20} smooth>
|
|
33
34
|
{to}
|
|
34
35
|
</Link>
|
|
@@ -65,9 +66,13 @@ const TypeRenderer: FunctionComponent<{ objectType: SerializedObjectType }> = ({
|
|
|
65
66
|
|
|
66
67
|
const EnumTypeRenderer = ({ enumType }: { enumType: SerializedEnumType }) => (
|
|
67
68
|
<>
|
|
68
|
-
<
|
|
69
|
-
<
|
|
70
|
-
|
|
69
|
+
<HeadingWrapper>
|
|
70
|
+
<Heading size="small" as="h3">
|
|
71
|
+
{/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}
|
|
72
|
+
{/* @ts-ignore: react-scroll types are not up to date with the latest react version*/}
|
|
73
|
+
<Element id={enumType.name}>{enumType.name}</Element>
|
|
74
|
+
</Heading>
|
|
75
|
+
</HeadingWrapper>
|
|
71
76
|
{enumType.description ? (
|
|
72
77
|
<p>{enumType.description}</p>
|
|
73
78
|
) : (
|
|
@@ -80,9 +85,13 @@ const EnumTypeRenderer = ({ enumType }: { enumType: SerializedEnumType }) => (
|
|
|
80
85
|
|
|
81
86
|
const UnionTypeRenderer = ({ unionType }: { unionType: SerializedUnionType }) => (
|
|
82
87
|
<>
|
|
83
|
-
<
|
|
84
|
-
<
|
|
85
|
-
|
|
88
|
+
<HeadingWrapper>
|
|
89
|
+
<Heading size="small" as="h3">
|
|
90
|
+
{/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}
|
|
91
|
+
{/* @ts-ignore: react-scroll types are not up to date with the latest react version*/}
|
|
92
|
+
<Element id={unionType.name}>{unionType.name}</Element>
|
|
93
|
+
</Heading>
|
|
94
|
+
</HeadingWrapper>
|
|
86
95
|
{unionType.description ? (
|
|
87
96
|
<p>{unionType.description}</p>
|
|
88
97
|
) : (
|
|
@@ -101,9 +110,13 @@ const UnionTypeRenderer = ({ unionType }: { unionType: SerializedUnionType }) =>
|
|
|
101
110
|
|
|
102
111
|
const ScalarRenderer = ({ scalar }: { scalar: SerializedScalar }) => (
|
|
103
112
|
<>
|
|
104
|
-
<
|
|
105
|
-
<
|
|
106
|
-
|
|
113
|
+
<HeadingWrapper>
|
|
114
|
+
<Heading size="small" as="h3">
|
|
115
|
+
{/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}
|
|
116
|
+
{/* @ts-ignore: react-scroll types are not up to date with the latest react version*/}
|
|
117
|
+
<Element id={scalar.name}>{scalar.name}</Element>
|
|
118
|
+
</Heading>
|
|
119
|
+
</HeadingWrapper>
|
|
107
120
|
<p>{scalar.description}</p>
|
|
108
121
|
</>
|
|
109
122
|
);
|
|
@@ -130,7 +143,9 @@ const SchemasRenderer = ({ schemaDocuments: { schema, contextSchema } }: Omit<Ex
|
|
|
130
143
|
|
|
131
144
|
return (
|
|
132
145
|
<>
|
|
133
|
-
<h2>
|
|
146
|
+
<Heading size="medium" as="h2">
|
|
147
|
+
Attributes
|
|
148
|
+
</Heading>
|
|
134
149
|
{attributesDocument ? (
|
|
135
150
|
<>
|
|
136
151
|
<p>List of attributes supported by this extension point.</p>
|
|
@@ -140,7 +155,11 @@ const SchemasRenderer = ({ schemaDocuments: { schema, contextSchema } }: Omit<Ex
|
|
|
140
155
|
<p>No attributes information provided for this extension point.</p>
|
|
141
156
|
)}
|
|
142
157
|
|
|
143
|
-
<
|
|
158
|
+
<HeadingWrapper>
|
|
159
|
+
<Heading size="medium" as="h2">
|
|
160
|
+
Context
|
|
161
|
+
</Heading>
|
|
162
|
+
</HeadingWrapper>
|
|
144
163
|
{contextDocument ? (
|
|
145
164
|
<>
|
|
146
165
|
<p>List of values provided by this extension point as context.</p>
|
|
@@ -150,13 +169,21 @@ const SchemasRenderer = ({ schemaDocuments: { schema, contextSchema } }: Omit<Ex
|
|
|
150
169
|
<p>No context information provided for this extension point.</p>
|
|
151
170
|
)}
|
|
152
171
|
|
|
153
|
-
<
|
|
172
|
+
<HeadingWrapper>
|
|
173
|
+
<Heading size="medium" as="h2">
|
|
174
|
+
Types reference
|
|
175
|
+
</Heading>
|
|
176
|
+
</HeadingWrapper>
|
|
154
177
|
{objectTypeEntries &&
|
|
155
178
|
objectTypeEntries.map((objectType) => (
|
|
156
179
|
<React.Fragment key={objectType.name}>
|
|
157
|
-
<
|
|
158
|
-
<
|
|
159
|
-
|
|
180
|
+
<HeadingWrapper>
|
|
181
|
+
<Heading size="small" as="h3">
|
|
182
|
+
{/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}
|
|
183
|
+
{/* @ts-ignore: react-scroll types are not up to date with the latest react version*/}
|
|
184
|
+
<Element id={objectType.name}>{objectType.name}</Element>
|
|
185
|
+
</Heading>
|
|
186
|
+
</HeadingWrapper>
|
|
160
187
|
<TypeRenderer objectType={objectType} />
|
|
161
188
|
</React.Fragment>
|
|
162
189
|
))}
|
|
@@ -175,11 +202,11 @@ const bodyStyles: React.CSSProperties = {
|
|
|
175
202
|
overflowY: 'auto',
|
|
176
203
|
overflowX: 'hidden',
|
|
177
204
|
// The rest of the styles are copied from the @atlaskit/modal-dialog/dist/esm/modal-body.js
|
|
178
|
-
padding:
|
|
205
|
+
padding: GRID_SIZE * 3,
|
|
179
206
|
flex: '1 1 auto',
|
|
180
207
|
};
|
|
181
208
|
|
|
182
|
-
const CustomModalBody: React.FC = ({ children }) => {
|
|
209
|
+
const CustomModalBody: React.FC<{ children: React.ReactNode }> = ({ children }) => {
|
|
183
210
|
return (
|
|
184
211
|
<div id="___cse_info_container" style={bodyStyles}>
|
|
185
212
|
{children}
|
|
@@ -198,7 +225,7 @@ const ExtensionPointInfo: React.FC<ExtensionPointInfoProps> = ({ name, schemaDoc
|
|
|
198
225
|
<ModalTransition>
|
|
199
226
|
{dialogOpen && (
|
|
200
227
|
<Modal onClose={closeDialog} width="x-large">
|
|
201
|
-
<ModalHeader>
|
|
228
|
+
<ModalHeader hasCloseButton>
|
|
202
229
|
<ModalTitle>{`Extension point: ${name}`}</ModalTitle>
|
|
203
230
|
</ModalHeader>
|
|
204
231
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { mocked } from '
|
|
1
|
+
import { mocked } from 'jest-mock';
|
|
2
2
|
import registry from '@atlassian/clientside-extensions-registry';
|
|
3
3
|
import * as debug from '@atlassian/clientside-extensions-debug';
|
|
4
4
|
import type { ExtensionAPI, ExtensionDescriptor } from '@atlassian/clientside-extensions-registry';
|