@atlaskit/link-datasource 2.9.0 → 2.9.2
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/CHANGELOG.md +18 -0
- package/dist/cjs/hooks/useDatasourceTableState.js +2 -0
- package/dist/cjs/ui/assets-modal/modal/index.js +2 -0
- package/dist/cjs/ui/assets-modal/modal/render-assets-content/index.js +3 -1
- package/dist/cjs/ui/common/modal/datasource-modal/createDatasourceModal.js +55 -0
- package/dist/cjs/ui/common/modal/datasources-table-in-modal-preview/index.js +15 -2
- package/dist/cjs/ui/common/modal/insert-button/index.js +5 -4
- package/dist/cjs/ui/confluence-search-modal/modal/ModalOld.js +3 -1
- package/dist/cjs/ui/confluence-search-modal/modal/index.js +35 -39
- package/dist/cjs/ui/datasource-table-view/datasourceTableView.js +2 -0
- package/dist/cjs/ui/issue-like-table/index.js +56 -66
- package/dist/cjs/ui/issue-like-table/styled.js +25 -3
- package/dist/cjs/ui/issue-like-table/table-cell-content/index.js +54 -0
- package/dist/cjs/ui/issue-like-table/truncate-text-tag/index.js +32 -0
- package/dist/cjs/ui/jira-issues-modal/modal/ModalOld.js +3 -1
- package/dist/cjs/ui/jira-issues-modal/modal/index.js +141 -211
- package/dist/es2019/hooks/useDatasourceTableState.js +2 -1
- package/dist/es2019/ui/assets-modal/modal/index.js +2 -0
- package/dist/es2019/ui/assets-modal/modal/render-assets-content/index.js +3 -1
- package/dist/es2019/ui/common/modal/datasource-context/index.js +1 -1
- package/dist/es2019/ui/common/modal/datasource-modal/createDatasourceModal.js +51 -0
- package/dist/es2019/ui/common/modal/datasources-table-in-modal-preview/index.js +11 -2
- package/dist/es2019/ui/common/modal/insert-button/index.js +5 -4
- package/dist/es2019/ui/confluence-search-modal/modal/ModalOld.js +3 -1
- package/dist/es2019/ui/confluence-search-modal/modal/index.js +35 -39
- package/dist/es2019/ui/datasource-table-view/datasourceTableView.js +2 -0
- package/dist/es2019/ui/issue-like-table/index.js +32 -52
- package/dist/es2019/ui/issue-like-table/styled.js +33 -0
- package/dist/es2019/ui/issue-like-table/table-cell-content/index.js +44 -0
- package/dist/es2019/ui/issue-like-table/truncate-text-tag/index.js +21 -0
- package/dist/es2019/ui/jira-issues-modal/modal/ModalOld.js +3 -1
- package/dist/es2019/ui/jira-issues-modal/modal/index.js +133 -202
- package/dist/esm/hooks/useDatasourceTableState.js +2 -0
- package/dist/esm/ui/assets-modal/modal/index.js +2 -0
- package/dist/esm/ui/assets-modal/modal/render-assets-content/index.js +3 -1
- package/dist/esm/ui/common/modal/datasource-modal/createDatasourceModal.js +48 -0
- package/dist/esm/ui/common/modal/datasources-table-in-modal-preview/index.js +12 -2
- package/dist/esm/ui/common/modal/insert-button/index.js +5 -4
- package/dist/esm/ui/confluence-search-modal/modal/ModalOld.js +3 -1
- package/dist/esm/ui/confluence-search-modal/modal/index.js +38 -42
- package/dist/esm/ui/datasource-table-view/datasourceTableView.js +2 -0
- package/dist/esm/ui/issue-like-table/index.js +53 -61
- package/dist/esm/ui/issue-like-table/styled.js +24 -2
- package/dist/esm/ui/issue-like-table/table-cell-content/index.js +47 -0
- package/dist/esm/ui/issue-like-table/truncate-text-tag/index.js +21 -0
- package/dist/esm/ui/jira-issues-modal/modal/ModalOld.js +3 -1
- package/dist/esm/ui/jira-issues-modal/modal/index.js +146 -216
- package/dist/types/common/types.d.ts +2 -1
- package/dist/types/hooks/useDatasourceTableState.d.ts +2 -0
- package/dist/types/ui/assets-modal/modal/render-assets-content/index.d.ts +1 -0
- package/dist/types/ui/common/modal/datasource-context/index.d.ts +9 -12
- package/dist/types/ui/common/modal/datasource-modal/createDatasourceModal.d.ts +15 -0
- package/dist/types/ui/common/modal/insert-button/index.d.ts +4 -2
- package/dist/types/ui/confluence-search-modal/modal/index.d.ts +3 -4
- package/dist/types/ui/confluence-search-modal/types.d.ts +6 -1
- package/dist/types/ui/issue-like-table/index.d.ts +1 -17
- package/dist/types/ui/issue-like-table/styled.d.ts +4 -0
- package/dist/types/ui/issue-like-table/table-cell-content/index.d.ts +12 -0
- package/dist/types/ui/issue-like-table/truncate-text-tag/index.d.ts +6 -0
- package/dist/types/ui/issue-like-table/types.d.ts +20 -1
- package/dist/types/ui/jira-issues-modal/modal/index.d.ts +3 -3
- package/dist/types/ui/jira-issues-modal/types.d.ts +3 -0
- package/dist/types-ts4.5/common/types.d.ts +2 -1
- package/dist/types-ts4.5/hooks/useDatasourceTableState.d.ts +2 -0
- package/dist/types-ts4.5/ui/assets-modal/modal/render-assets-content/index.d.ts +1 -0
- package/dist/types-ts4.5/ui/common/modal/datasource-context/index.d.ts +9 -12
- package/dist/types-ts4.5/ui/common/modal/datasource-modal/createDatasourceModal.d.ts +15 -0
- package/dist/types-ts4.5/ui/common/modal/insert-button/index.d.ts +4 -2
- package/dist/types-ts4.5/ui/confluence-search-modal/modal/index.d.ts +3 -4
- package/dist/types-ts4.5/ui/confluence-search-modal/types.d.ts +6 -1
- package/dist/types-ts4.5/ui/issue-like-table/index.d.ts +1 -17
- package/dist/types-ts4.5/ui/issue-like-table/styled.d.ts +4 -0
- package/dist/types-ts4.5/ui/issue-like-table/table-cell-content/index.d.ts +12 -0
- package/dist/types-ts4.5/ui/issue-like-table/truncate-text-tag/index.d.ts +6 -0
- package/dist/types-ts4.5/ui/issue-like-table/types.d.ts +20 -1
- package/dist/types-ts4.5/ui/jira-issues-modal/modal/index.d.ts +3 -3
- package/dist/types-ts4.5/ui/jira-issues-modal/types.d.ts +3 -0
- package/examples-helpers/buildIssueLikeTable.tsx +2 -0
- package/package.json +8 -8
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { type Ref } from 'react';
|
|
6
1
|
import { jsx } from '@emotion/react';
|
|
7
2
|
import { type DatasourceResponseSchemaProperty } from '@atlaskit/linking-types/datasource';
|
|
8
3
|
import { type IssueLikeDataTableViewProps } from './types';
|
|
@@ -13,17 +8,6 @@ export declare const scrollableContainerShadowsCssComponents: {
|
|
|
13
8
|
backgroundSize: string;
|
|
14
9
|
backgroundAttachment: string;
|
|
15
10
|
};
|
|
16
|
-
export interface RowType {
|
|
17
|
-
cells: Array<RowCellType>;
|
|
18
|
-
key?: string;
|
|
19
|
-
ref?: Ref<HTMLTableRowElement>;
|
|
20
|
-
}
|
|
21
|
-
export interface RowCellType {
|
|
22
|
-
key: string;
|
|
23
|
-
width?: number;
|
|
24
|
-
shouldTruncate?: boolean;
|
|
25
|
-
content?: React.ReactNode | string;
|
|
26
|
-
}
|
|
27
11
|
export declare const getOrderedColumns: (columns: DatasourceResponseSchemaProperty[], visibleColumnKeys: string[]) => DatasourceResponseSchemaProperty[];
|
|
28
|
-
export declare const IssueLikeDataTableView: ({ testId, onNextPage, onLoadDatasourceDetails, items, columns, renderItem, visibleColumnKeys, onVisibleColumnKeysChange, columnCustomSizes, onColumnResize, wrappedColumnKeys, onWrappedColumnChange, status, hasNextPage, scrollableContainerHeight, extensionKey, }: IssueLikeDataTableViewProps) => jsx.JSX.Element;
|
|
12
|
+
export declare const IssueLikeDataTableView: ({ testId, onNextPage, onLoadDatasourceDetails, items, itemIds, columns, renderItem, visibleColumnKeys, onVisibleColumnKeysChange, columnCustomSizes, onColumnResize, wrappedColumnKeys, onWrappedColumnChange, status, hasNextPage, scrollableContainerHeight, extensionKey, }: IssueLikeDataTableViewProps) => jsx.JSX.Element;
|
|
29
13
|
export declare const EmptyState: ({ isCompact, testId }: import("./empty-state").Props) => jsx.JSX.Element;
|
|
@@ -18,3 +18,7 @@ export declare const TableHeading: import("@emotion/styled").StyledComponent<{
|
|
|
18
18
|
theme?: import("@emotion/react").Theme | undefined;
|
|
19
19
|
as?: import("react").ElementType<any> | undefined;
|
|
20
20
|
}, import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, {}>;
|
|
21
|
+
export declare const TableCell: import("@emotion/styled").StyledComponent<{
|
|
22
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
23
|
+
as?: import("react").ElementType<any> | undefined;
|
|
24
|
+
}, import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, {}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type TableViewPropsRenderType } from '../types';
|
|
3
|
+
interface TableCellContentProps {
|
|
4
|
+
id: string;
|
|
5
|
+
columnKey: string | null;
|
|
6
|
+
columnType: string;
|
|
7
|
+
/** Used to retrieve cell content from the store */
|
|
8
|
+
renderItem: TableViewPropsRenderType;
|
|
9
|
+
wrappedColumnKeys: string[] | undefined;
|
|
10
|
+
}
|
|
11
|
+
export declare const TableCellContent: ({ columnKey, columnType, id, renderItem, wrappedColumnKeys, }: TableCellContentProps) => JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { type Ref } from 'react';
|
|
2
2
|
import type { DatasourceDataResponseItem, DatasourceResponseSchemaProperty, DatasourceTableStatusType, DatasourceType } from '@atlaskit/linking-types';
|
|
3
3
|
import type { NextPageType } from '../../hooks/useDatasourceTableState';
|
|
4
4
|
export type DatasourceTypeWithOnlyValues = {
|
|
@@ -32,6 +32,7 @@ export interface IssueLikeDataTableViewProps {
|
|
|
32
32
|
hasNextPage: boolean;
|
|
33
33
|
status: DatasourceTableStatusType;
|
|
34
34
|
items: DatasourceDataResponseItem[];
|
|
35
|
+
itemIds: string[];
|
|
35
36
|
onNextPage: NextPageType;
|
|
36
37
|
onLoadDatasourceDetails: () => void;
|
|
37
38
|
/**
|
|
@@ -76,3 +77,21 @@ export interface IssueLikeDataTableViewProps {
|
|
|
76
77
|
*/
|
|
77
78
|
onWrappedColumnChange?: (key: string, shouldWrap: boolean) => void;
|
|
78
79
|
}
|
|
80
|
+
export interface HeaderRowCellType {
|
|
81
|
+
key: string;
|
|
82
|
+
width?: number;
|
|
83
|
+
shouldTruncate?: boolean;
|
|
84
|
+
content?: React.ReactNode | string;
|
|
85
|
+
}
|
|
86
|
+
export interface RowType {
|
|
87
|
+
cells: Array<RowCellType>;
|
|
88
|
+
key?: string;
|
|
89
|
+
ref?: Ref<HTMLTableRowElement>;
|
|
90
|
+
}
|
|
91
|
+
export interface RowCellType {
|
|
92
|
+
key: string;
|
|
93
|
+
type?: DatasourceType['type'];
|
|
94
|
+
width?: number;
|
|
95
|
+
shouldTruncate?: boolean;
|
|
96
|
+
content?: React.ReactNode | string;
|
|
97
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import type
|
|
3
|
-
export declare const JiraIssuesConfigModal:
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
|
+
import { type JiraConfigModalProps } from '../types';
|
|
3
|
+
export declare const JiraIssuesConfigModal: (props: JiraConfigModalProps) => jsx.JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type DatasourceAdf, type InlineCardAdf } from '@atlaskit/linking-common/types';
|
|
2
2
|
import { type DatasourceParameters } from '@atlaskit/linking-types';
|
|
3
3
|
import { type ConfigModalProps } from '../../common/types';
|
|
4
|
+
import { type ConnectedConfigModalProps } from '../common/modal/datasource-modal/createDatasourceModal';
|
|
4
5
|
type XOR<T1, T2> = (T1 & {
|
|
5
6
|
[k in Exclude<keyof T2, keyof T1>]?: never;
|
|
6
7
|
}) | (T2 & {
|
|
@@ -17,4 +18,6 @@ export type JiraIssueDatasourceParameters = {
|
|
|
17
18
|
export type JiraIssuesDatasourceAdf = DatasourceAdf<JiraIssueDatasourceParameters>;
|
|
18
19
|
export interface JiraConfigModalProps extends ConfigModalProps<InlineCardAdf | DatasourceAdf, DatasourceParameters | JiraIssueDatasourceParameters> {
|
|
19
20
|
}
|
|
21
|
+
export interface ConnectedJiraConfigModalProps extends ConnectedConfigModalProps<JiraIssueDatasourceParameters> {
|
|
22
|
+
}
|
|
20
23
|
export {};
|
|
@@ -7,6 +7,7 @@ export interface Site {
|
|
|
7
7
|
url: string;
|
|
8
8
|
}
|
|
9
9
|
export type DisplayViewModes = 'table' | 'inline';
|
|
10
|
+
export type OnInsertFunction<ADF> = (adf: ADF, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
10
11
|
export type ConfigModalProps<ADF, Parameters> = {
|
|
11
12
|
/** Unique identifier for which type of datasource is being rendered and for making its requests */
|
|
12
13
|
datasourceId: string;
|
|
@@ -17,7 +18,7 @@ export type ConfigModalProps<ADF, Parameters> = {
|
|
|
17
18
|
/** Callback function to be invoked when the modal is closed either via cancel button click, esc keydown, or modal blanket click */
|
|
18
19
|
onCancel: () => void;
|
|
19
20
|
/** Callback function to be invoked when the insert issues button is clicked */
|
|
20
|
-
onInsert:
|
|
21
|
+
onInsert: OnInsertFunction<ADF>;
|
|
21
22
|
/**
|
|
22
23
|
* The view mode that the modal will show on open:
|
|
23
24
|
* - Table = Displays a list of links in table format
|
|
@@ -20,6 +20,8 @@ export interface DatasourceTableState {
|
|
|
20
20
|
reset: (options?: ResetOptions) => void;
|
|
21
21
|
/** Requests the available column schemas that can be displayed within the table */
|
|
22
22
|
loadDatasourceDetails: () => void;
|
|
23
|
+
/** Item ids to be hydrated from a store by consumers [NOTE: They must be in the same order as responseItems] */
|
|
24
|
+
responseItemIds: string[];
|
|
23
25
|
/** Items to be rendered within the table */
|
|
24
26
|
responseItems: DatasourceDataResponseItem[];
|
|
25
27
|
/** Indicates whether there is still more data that can be paginated */
|
|
@@ -1,30 +1,27 @@
|
|
|
1
1
|
import React, { type PropsWithChildren } from 'react';
|
|
2
|
-
import { type UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
2
|
import { type DatasourceAdf, type InlineCardAdf } from '@atlaskit/linking-common';
|
|
4
3
|
import type { DatasourceParameters } from '@atlaskit/linking-types';
|
|
4
|
+
import { type OnInsertFunction } from '../../../../common/types';
|
|
5
5
|
import { type DatasourceTableState } from '../../../../hooks/useDatasourceTableState';
|
|
6
6
|
import type { ColumnSizesMap } from '../../../issue-like-table/types';
|
|
7
7
|
import { type ColumnResizeProps } from '../datasources-table-in-modal-preview/use-column-resize';
|
|
8
8
|
import { type ColumnVisibilityProps } from '../datasources-table-in-modal-preview/use-column-visibility';
|
|
9
9
|
import { type ColumnWrappingProps } from '../datasources-table-in-modal-preview/use-column-wrapping';
|
|
10
|
-
type
|
|
11
|
-
datasourceId: string;
|
|
12
|
-
isValidParameters: (params: DatasourceParameters | undefined) => boolean;
|
|
10
|
+
type DatasourceContextValue<Parameters extends DatasourceParameters = DatasourceParameters> = ColumnVisibilityProps & ColumnWrappingProps & ColumnResizeProps & Pick<DatasourceContextProviderProps<Parameters>, 'datasourceId' | 'onInsert' | 'isValidParameters'> & {
|
|
13
11
|
tableState: DatasourceTableState;
|
|
14
12
|
visibleColumnKeys?: string[];
|
|
15
|
-
parameters:
|
|
16
|
-
setParameters: React.Dispatch<React.SetStateAction<
|
|
17
|
-
onInsert: (adf: InlineCardAdf | DatasourceAdf<any>, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
13
|
+
parameters: Parameters | undefined;
|
|
14
|
+
setParameters: React.Dispatch<React.SetStateAction<Parameters | undefined>>;
|
|
18
15
|
};
|
|
19
|
-
|
|
16
|
+
type DatasourceContextProviderProps<Parameters extends DatasourceParameters> = PropsWithChildren<{
|
|
20
17
|
datasourceId: string;
|
|
21
18
|
isValidParameters: (params: DatasourceParameters | undefined) => boolean;
|
|
22
|
-
initialParameters:
|
|
19
|
+
initialParameters: Parameters | undefined;
|
|
23
20
|
initialVisibleColumnKeys?: string[] | undefined;
|
|
24
21
|
initialWrappedColumnKeys?: string[] | undefined;
|
|
25
22
|
initialColumnCustomSizes?: ColumnSizesMap | undefined;
|
|
26
|
-
onInsert:
|
|
23
|
+
onInsert: OnInsertFunction<InlineCardAdf | DatasourceAdf<Parameters>>;
|
|
27
24
|
}>;
|
|
28
|
-
export declare const DatasourceContextProvider: ({ children, datasourceId, isValidParameters, initialParameters, initialVisibleColumnKeys, initialColumnCustomSizes, initialWrappedColumnKeys, onInsert, }:
|
|
29
|
-
export declare const useDatasourceContext: () =>
|
|
25
|
+
export declare const DatasourceContextProvider: <Parameters extends DatasourceParameters>({ children, datasourceId, isValidParameters, initialParameters, initialVisibleColumnKeys, initialColumnCustomSizes, initialWrappedColumnKeys, onInsert, }: DatasourceContextProviderProps<Parameters>) => JSX.Element;
|
|
26
|
+
export declare const useDatasourceContext: <Parameters extends DatasourceParameters>() => DatasourceContextValue<Parameters>;
|
|
30
27
|
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { jsx } from '@emotion/react';
|
|
7
|
+
import { type DatasourceAdf, type InlineCardAdf } from '@atlaskit/linking-common';
|
|
8
|
+
import { type DatasourceParameters } from '@atlaskit/linking-types';
|
|
9
|
+
import { type ConfigModalProps } from '../../../../common/types';
|
|
10
|
+
export type ConnectedConfigModalProps<Parameters extends DatasourceParameters> = Omit<ConfigModalProps<DatasourceAdf<Parameters> | InlineCardAdf, Parameters>, 'onInsert' | 'parameters'>;
|
|
11
|
+
export declare const createDatasourceModal: <Parameters extends DatasourceParameters>({ isValidParameters, dataProvider, component: ModalContent, }: {
|
|
12
|
+
isValidParameters: (params: DatasourceParameters | undefined) => boolean;
|
|
13
|
+
dataProvider: string;
|
|
14
|
+
component: React.ComponentType<ConnectedConfigModalProps<Parameters>>;
|
|
15
|
+
}) => (props: ConfigModalProps<DatasourceAdf<Parameters> | InlineCardAdf, DatasourceParameters | Parameters>) => jsx.JSX.Element;
|
|
@@ -4,9 +4,11 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { type PropsWithChildren } from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
|
-
|
|
7
|
+
import { type DatasourceParameters } from '@atlaskit/linking-types';
|
|
8
|
+
export type InsertButtonProps<Parameters extends DatasourceParameters> = PropsWithChildren<{
|
|
8
9
|
testId: string;
|
|
9
10
|
url: string | undefined;
|
|
10
11
|
getAnalyticsPayload: () => Record<string, any>;
|
|
12
|
+
overwriteParameters?: (parameters: Parameters) => Parameters;
|
|
11
13
|
}>;
|
|
12
|
-
export declare const InsertButton: ({ testId, url, getAnalyticsPayload, children }: InsertButtonProps) => jsx.JSX.Element;
|
|
14
|
+
export declare const InsertButton: <Parameters extends DatasourceParameters>({ testId, url, getAnalyticsPayload, overwriteParameters, children, }: InsertButtonProps<Parameters>) => jsx.JSX.Element;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { jsx } from '@emotion/react';
|
|
3
|
-
import { type ConfluenceSearchConfigModalProps } from '../types';
|
|
4
|
-
export declare const PlainConfluenceSearchConfigModal: (props:
|
|
5
|
-
export declare const ConfluenceSearchConfigModal:
|
|
2
|
+
import { type ConfluenceSearchConfigModalProps, type ConnectedConfluenceSearchConfigModalProps } from '../types';
|
|
3
|
+
export declare const PlainConfluenceSearchConfigModal: (props: ConnectedConfluenceSearchConfigModalProps) => jsx.JSX.Element;
|
|
4
|
+
export declare const ConfluenceSearchConfigModal: (props: ConfluenceSearchConfigModalProps) => jsx.JSX.Element;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { type DatasourceAdf, type InlineCardAdf } from '@atlaskit/linking-common/types';
|
|
2
|
-
import type
|
|
2
|
+
import { type DatasourceParameters } from '@atlaskit/linking-types';
|
|
3
3
|
import { type ConfigModalProps } from '../../common/types';
|
|
4
|
+
import { type ConnectedConfigModalProps } from '../common/modal/datasource-modal/createDatasourceModal';
|
|
4
5
|
import { type DateRangeType } from '../common/modal/popup-select/types';
|
|
5
6
|
export interface ConfluenceSearchConfigModalProps extends ConfigModalProps<InlineCardAdf | ConfluenceSearchDatasourceAdf, DatasourceParameters | ConfluenceSearchDatasourceParameters> {
|
|
6
7
|
disableDisplayDropdown?: boolean;
|
|
7
8
|
overrideParameters?: Pick<ConfluenceSearchDatasourceParameters, 'entityTypes'>;
|
|
8
9
|
}
|
|
10
|
+
export interface ConnectedConfluenceSearchConfigModalProps extends ConnectedConfigModalProps<ConfluenceSearchDatasourceParameters> {
|
|
11
|
+
disableDisplayDropdown?: boolean;
|
|
12
|
+
overrideParameters?: Pick<ConfluenceSearchDatasourceParameters, 'entityTypes'>;
|
|
13
|
+
}
|
|
9
14
|
export type ConfluenceSearchDatasourceParameters = {
|
|
10
15
|
cloudId: string;
|
|
11
16
|
searchString?: string;
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { type Ref } from 'react';
|
|
6
1
|
import { jsx } from '@emotion/react';
|
|
7
2
|
import { type DatasourceResponseSchemaProperty } from '@atlaskit/linking-types/datasource';
|
|
8
3
|
import { type IssueLikeDataTableViewProps } from './types';
|
|
@@ -13,17 +8,6 @@ export declare const scrollableContainerShadowsCssComponents: {
|
|
|
13
8
|
backgroundSize: string;
|
|
14
9
|
backgroundAttachment: string;
|
|
15
10
|
};
|
|
16
|
-
export interface RowType {
|
|
17
|
-
cells: Array<RowCellType>;
|
|
18
|
-
key?: string;
|
|
19
|
-
ref?: Ref<HTMLTableRowElement>;
|
|
20
|
-
}
|
|
21
|
-
export interface RowCellType {
|
|
22
|
-
key: string;
|
|
23
|
-
width?: number;
|
|
24
|
-
shouldTruncate?: boolean;
|
|
25
|
-
content?: React.ReactNode | string;
|
|
26
|
-
}
|
|
27
11
|
export declare const getOrderedColumns: (columns: DatasourceResponseSchemaProperty[], visibleColumnKeys: string[]) => DatasourceResponseSchemaProperty[];
|
|
28
|
-
export declare const IssueLikeDataTableView: ({ testId, onNextPage, onLoadDatasourceDetails, items, columns, renderItem, visibleColumnKeys, onVisibleColumnKeysChange, columnCustomSizes, onColumnResize, wrappedColumnKeys, onWrappedColumnChange, status, hasNextPage, scrollableContainerHeight, extensionKey, }: IssueLikeDataTableViewProps) => jsx.JSX.Element;
|
|
12
|
+
export declare const IssueLikeDataTableView: ({ testId, onNextPage, onLoadDatasourceDetails, items, itemIds, columns, renderItem, visibleColumnKeys, onVisibleColumnKeysChange, columnCustomSizes, onColumnResize, wrappedColumnKeys, onWrappedColumnChange, status, hasNextPage, scrollableContainerHeight, extensionKey, }: IssueLikeDataTableViewProps) => jsx.JSX.Element;
|
|
29
13
|
export declare const EmptyState: ({ isCompact, testId }: import("./empty-state").Props) => jsx.JSX.Element;
|
|
@@ -18,3 +18,7 @@ export declare const TableHeading: import("@emotion/styled").StyledComponent<{
|
|
|
18
18
|
theme?: import("@emotion/react").Theme | undefined;
|
|
19
19
|
as?: import("react").ElementType<any> | undefined;
|
|
20
20
|
}, import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, {}>;
|
|
21
|
+
export declare const TableCell: import("@emotion/styled").StyledComponent<{
|
|
22
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
23
|
+
as?: import("react").ElementType<any> | undefined;
|
|
24
|
+
}, import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, {}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type TableViewPropsRenderType } from '../types';
|
|
3
|
+
interface TableCellContentProps {
|
|
4
|
+
id: string;
|
|
5
|
+
columnKey: string | null;
|
|
6
|
+
columnType: string;
|
|
7
|
+
/** Used to retrieve cell content from the store */
|
|
8
|
+
renderItem: TableViewPropsRenderType;
|
|
9
|
+
wrappedColumnKeys: string[] | undefined;
|
|
10
|
+
}
|
|
11
|
+
export declare const TableCellContent: ({ columnKey, columnType, id, renderItem, wrappedColumnKeys, }: TableCellContentProps) => JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { type Ref } from 'react';
|
|
2
2
|
import type { DatasourceDataResponseItem, DatasourceResponseSchemaProperty, DatasourceTableStatusType, DatasourceType } from '@atlaskit/linking-types';
|
|
3
3
|
import type { NextPageType } from '../../hooks/useDatasourceTableState';
|
|
4
4
|
export type DatasourceTypeWithOnlyValues = {
|
|
@@ -32,6 +32,7 @@ export interface IssueLikeDataTableViewProps {
|
|
|
32
32
|
hasNextPage: boolean;
|
|
33
33
|
status: DatasourceTableStatusType;
|
|
34
34
|
items: DatasourceDataResponseItem[];
|
|
35
|
+
itemIds: string[];
|
|
35
36
|
onNextPage: NextPageType;
|
|
36
37
|
onLoadDatasourceDetails: () => void;
|
|
37
38
|
/**
|
|
@@ -76,3 +77,21 @@ export interface IssueLikeDataTableViewProps {
|
|
|
76
77
|
*/
|
|
77
78
|
onWrappedColumnChange?: (key: string, shouldWrap: boolean) => void;
|
|
78
79
|
}
|
|
80
|
+
export interface HeaderRowCellType {
|
|
81
|
+
key: string;
|
|
82
|
+
width?: number;
|
|
83
|
+
shouldTruncate?: boolean;
|
|
84
|
+
content?: React.ReactNode | string;
|
|
85
|
+
}
|
|
86
|
+
export interface RowType {
|
|
87
|
+
cells: Array<RowCellType>;
|
|
88
|
+
key?: string;
|
|
89
|
+
ref?: Ref<HTMLTableRowElement>;
|
|
90
|
+
}
|
|
91
|
+
export interface RowCellType {
|
|
92
|
+
key: string;
|
|
93
|
+
type?: DatasourceType['type'];
|
|
94
|
+
width?: number;
|
|
95
|
+
shouldTruncate?: boolean;
|
|
96
|
+
content?: React.ReactNode | string;
|
|
97
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import type
|
|
3
|
-
export declare const JiraIssuesConfigModal:
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
|
+
import { type JiraConfigModalProps } from '../types';
|
|
3
|
+
export declare const JiraIssuesConfigModal: (props: JiraConfigModalProps) => jsx.JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type DatasourceAdf, type InlineCardAdf } from '@atlaskit/linking-common/types';
|
|
2
2
|
import { type DatasourceParameters } from '@atlaskit/linking-types';
|
|
3
3
|
import { type ConfigModalProps } from '../../common/types';
|
|
4
|
+
import { type ConnectedConfigModalProps } from '../common/modal/datasource-modal/createDatasourceModal';
|
|
4
5
|
type XOR<T1, T2> = (T1 & {
|
|
5
6
|
[k in Exclude<keyof T2, keyof T1>]?: never;
|
|
6
7
|
}) | (T2 & {
|
|
@@ -17,4 +18,6 @@ export type JiraIssueDatasourceParameters = {
|
|
|
17
18
|
export type JiraIssuesDatasourceAdf = DatasourceAdf<JiraIssueDatasourceParameters>;
|
|
18
19
|
export interface JiraConfigModalProps extends ConfigModalProps<InlineCardAdf | DatasourceAdf, DatasourceParameters | JiraIssueDatasourceParameters> {
|
|
19
20
|
}
|
|
21
|
+
export interface ConnectedJiraConfigModalProps extends ConnectedConfigModalProps<JiraIssueDatasourceParameters> {
|
|
22
|
+
}
|
|
20
23
|
export {};
|
|
@@ -53,6 +53,7 @@ const ExampleBody = ({ isReadonly, canResizeColumns = true, canControlWrapping =
|
|
|
53
53
|
status,
|
|
54
54
|
onNextPage,
|
|
55
55
|
responseItems,
|
|
56
|
+
responseItemIds,
|
|
56
57
|
hasNextPage,
|
|
57
58
|
defaultVisibleColumnKeys,
|
|
58
59
|
columns,
|
|
@@ -83,6 +84,7 @@ const ExampleBody = ({ isReadonly, canResizeColumns = true, canControlWrapping =
|
|
|
83
84
|
<IssueLikeDataTableView
|
|
84
85
|
testId="link-datasource"
|
|
85
86
|
items={responseItems}
|
|
87
|
+
itemIds={responseItemIds}
|
|
86
88
|
onNextPage={onNextPage}
|
|
87
89
|
onLoadDatasourceDetails={loadDatasourceDetails}
|
|
88
90
|
hasNextPage={hasNextPage}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.2",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -37,25 +37,25 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@atlaskit/adf-schema": "^40.3.0",
|
|
39
39
|
"@atlaskit/analytics-next": "^9.3.0",
|
|
40
|
-
"@atlaskit/avatar": "^21.
|
|
40
|
+
"@atlaskit/avatar": "^21.12.0",
|
|
41
41
|
"@atlaskit/avatar-group": "^9.9.0",
|
|
42
42
|
"@atlaskit/badge": "^16.3.0",
|
|
43
43
|
"@atlaskit/button": "^19.1.0",
|
|
44
44
|
"@atlaskit/datetime-picker": "^13.7.0",
|
|
45
|
-
"@atlaskit/dropdown-menu": "^12.
|
|
45
|
+
"@atlaskit/dropdown-menu": "^12.15.0",
|
|
46
46
|
"@atlaskit/editor-prosemirror": "5.0.1",
|
|
47
47
|
"@atlaskit/empty-state": "^7.9.0",
|
|
48
48
|
"@atlaskit/form": "^10.4.0",
|
|
49
49
|
"@atlaskit/heading": "^2.4.0",
|
|
50
|
-
"@atlaskit/icon": "^22.
|
|
50
|
+
"@atlaskit/icon": "^22.9.0",
|
|
51
51
|
"@atlaskit/icon-object": "^6.4.0",
|
|
52
52
|
"@atlaskit/image": "^1.3.0",
|
|
53
53
|
"@atlaskit/intl-messages-provider": "^1.0.0",
|
|
54
54
|
"@atlaskit/jql-ast": "^3.3.0",
|
|
55
55
|
"@atlaskit/jql-editor": "^4.4.0",
|
|
56
56
|
"@atlaskit/jql-editor-autocomplete-rest": "^2.0.0",
|
|
57
|
-
"@atlaskit/link-client-extension": "^1.
|
|
58
|
-
"@atlaskit/linking-common": "^5.
|
|
57
|
+
"@atlaskit/link-client-extension": "^1.11.0",
|
|
58
|
+
"@atlaskit/linking-common": "^5.8.0",
|
|
59
59
|
"@atlaskit/linking-types": "^8.12.0",
|
|
60
60
|
"@atlaskit/logo": "^14.1.0",
|
|
61
61
|
"@atlaskit/lozenge": "^11.9.0",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^1.1.0",
|
|
70
70
|
"@atlaskit/primitives": "^11.1.0",
|
|
71
71
|
"@atlaskit/select": "^17.11.0",
|
|
72
|
-
"@atlaskit/smart-card": "^27.
|
|
72
|
+
"@atlaskit/smart-card": "^27.12.0",
|
|
73
73
|
"@atlaskit/smart-user-picker": "6.10.0",
|
|
74
74
|
"@atlaskit/spinner": "^16.2.0",
|
|
75
75
|
"@atlaskit/tag": "^12.4.0",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"devDependencies": {
|
|
98
98
|
"@af/integration-testing": "*",
|
|
99
99
|
"@af/visual-regression": "*",
|
|
100
|
-
"@atlaskit/link-provider": "^1.
|
|
100
|
+
"@atlaskit/link-provider": "^1.14.0",
|
|
101
101
|
"@atlaskit/link-test-helpers": "^7.0.0",
|
|
102
102
|
"@atlaskit/ssr": "*",
|
|
103
103
|
"@atlaskit/visual-regression": "*",
|