@atlaskit/link-datasource 1.24.7 → 1.24.9
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 +14 -0
- package/dist/cjs/ui/assets-modal/modal/render-assets-content/initial-state-view/index.js +2 -1
- package/dist/cjs/ui/common/error-state/access-required.js +2 -1
- package/dist/cjs/ui/common/error-state/loading-error.js +2 -1
- package/dist/cjs/ui/common/error-state/messages.js +0 -11
- package/dist/cjs/ui/common/error-state/modal-loading-error.js +5 -13
- package/dist/cjs/ui/common/error-state/no-instances.js +2 -1
- package/dist/cjs/ui/common/error-state/no-results.js +2 -1
- package/dist/cjs/ui/common/initial-state-view/index.js +2 -1
- package/dist/cjs/ui/confluence-search-modal/confluence-search-container/index.js +48 -0
- package/dist/cjs/ui/confluence-search-modal/confluence-search-container/messages.js +14 -0
- package/dist/cjs/ui/confluence-search-modal/modal/index.js +223 -30
- package/dist/cjs/ui/confluence-search-modal/modal/messages.js +4 -4
- package/dist/cjs/ui/confluence-search-modal/types.js +5 -0
- package/dist/cjs/ui/issue-like-table/column-picker/concatenated-menu-list.js +2 -1
- package/dist/cjs/ui/issue-like-table/drag-column-preview.js +2 -1
- package/dist/cjs/ui/issue-like-table/index.js +2 -1
- package/dist/cjs/ui/issue-like-table/styled.js +2 -1
- package/dist/cjs/ui/jira-issues-modal/modal/index.js +9 -1
- package/dist/cjs/ui/jira-issues-modal/modal/messages.js +5 -0
- package/dist/cjs/ui/jira-issues-modal/mode-switcher/index.js +1 -0
- package/dist/es2019/ui/assets-modal/modal/render-assets-content/initial-state-view/index.js +2 -1
- package/dist/es2019/ui/common/error-state/access-required.js +2 -1
- package/dist/es2019/ui/common/error-state/loading-error.js +2 -1
- package/dist/es2019/ui/common/error-state/messages.js +0 -11
- package/dist/es2019/ui/common/error-state/modal-loading-error.js +4 -10
- package/dist/es2019/ui/common/error-state/no-instances.js +2 -1
- package/dist/es2019/ui/common/error-state/no-results.js +2 -1
- package/dist/es2019/ui/common/initial-state-view/index.js +2 -1
- package/dist/es2019/ui/confluence-search-modal/confluence-search-container/index.js +35 -0
- package/dist/es2019/ui/confluence-search-modal/confluence-search-container/messages.js +8 -0
- package/dist/es2019/ui/confluence-search-modal/modal/index.js +210 -27
- package/dist/es2019/ui/confluence-search-modal/modal/messages.js +4 -4
- package/dist/es2019/ui/confluence-search-modal/types.js +1 -0
- package/dist/es2019/ui/issue-like-table/column-picker/concatenated-menu-list.js +2 -1
- package/dist/es2019/ui/issue-like-table/drag-column-preview.js +2 -1
- package/dist/es2019/ui/issue-like-table/index.js +2 -1
- package/dist/es2019/ui/issue-like-table/styled.js +2 -1
- package/dist/es2019/ui/jira-issues-modal/modal/index.js +7 -1
- package/dist/es2019/ui/jira-issues-modal/modal/messages.js +5 -0
- package/dist/es2019/ui/jira-issues-modal/mode-switcher/index.js +1 -0
- package/dist/esm/ui/assets-modal/modal/render-assets-content/initial-state-view/index.js +2 -1
- package/dist/esm/ui/common/error-state/access-required.js +2 -1
- package/dist/esm/ui/common/error-state/loading-error.js +2 -1
- package/dist/esm/ui/common/error-state/messages.js +0 -11
- package/dist/esm/ui/common/error-state/modal-loading-error.js +5 -12
- package/dist/esm/ui/common/error-state/no-instances.js +2 -1
- package/dist/esm/ui/common/error-state/no-results.js +2 -1
- package/dist/esm/ui/common/initial-state-view/index.js +2 -1
- package/dist/esm/ui/confluence-search-modal/confluence-search-container/index.js +38 -0
- package/dist/esm/ui/confluence-search-modal/confluence-search-container/messages.js +8 -0
- package/dist/esm/ui/confluence-search-modal/modal/index.js +225 -30
- package/dist/esm/ui/confluence-search-modal/modal/messages.js +4 -4
- package/dist/esm/ui/confluence-search-modal/types.js +1 -0
- package/dist/esm/ui/issue-like-table/column-picker/concatenated-menu-list.js +2 -1
- package/dist/esm/ui/issue-like-table/drag-column-preview.js +2 -1
- package/dist/esm/ui/issue-like-table/index.js +2 -1
- package/dist/esm/ui/issue-like-table/styled.js +2 -1
- package/dist/esm/ui/jira-issues-modal/modal/index.js +9 -1
- package/dist/esm/ui/jira-issues-modal/modal/messages.js +5 -0
- package/dist/esm/ui/jira-issues-modal/mode-switcher/index.js +1 -0
- package/dist/types/common/types.d.ts +3 -6
- package/dist/types/ui/common/error-state/messages.d.ts +0 -10
- package/dist/types/ui/common/error-state/modal-loading-error.d.ts +3 -2
- package/dist/types/ui/confluence-search-modal/confluence-search-container/index.d.ts +9 -0
- package/dist/types/ui/confluence-search-modal/confluence-search-container/messages.d.ts +7 -0
- package/dist/types/ui/confluence-search-modal/index.d.ts +2 -2
- package/dist/types/ui/confluence-search-modal/modal/index.d.ts +2 -2
- package/dist/types/ui/confluence-search-modal/modal/messages.d.ts +1 -1
- package/dist/types/ui/confluence-search-modal/types.d.ts +22 -0
- package/dist/types/ui/jira-issues-modal/index.d.ts +2 -2
- package/dist/types/ui/jira-issues-modal/modal/index.d.ts +3 -13
- package/dist/types/ui/jira-issues-modal/modal/messages.d.ts +5 -0
- package/dist/types/ui/jira-issues-modal/types.d.ts +5 -1
- package/dist/types-ts4.5/common/types.d.ts +3 -6
- package/dist/types-ts4.5/ui/common/error-state/messages.d.ts +0 -10
- package/dist/types-ts4.5/ui/common/error-state/modal-loading-error.d.ts +3 -2
- package/dist/types-ts4.5/ui/confluence-search-modal/confluence-search-container/index.d.ts +9 -0
- package/dist/types-ts4.5/ui/confluence-search-modal/confluence-search-container/messages.d.ts +7 -0
- package/dist/types-ts4.5/ui/confluence-search-modal/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/confluence-search-modal/modal/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/confluence-search-modal/modal/messages.d.ts +1 -1
- package/dist/types-ts4.5/ui/confluence-search-modal/types.d.ts +22 -0
- package/dist/types-ts4.5/ui/jira-issues-modal/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/jira-issues-modal/modal/index.d.ts +3 -13
- package/dist/types-ts4.5/ui/jira-issues-modal/modal/messages.d.ts +5 -0
- package/dist/types-ts4.5/ui/jira-issues-modal/types.d.ts +5 -1
- package/examples-helpers/buildConfluenceSearchTable.tsx +77 -0
- package/package.json +4 -4
|
@@ -502,7 +502,15 @@ export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(prop
|
|
|
502
502
|
var selectedJiraSiteUrl = selectedJiraSite === null || selectedJiraSite === void 0 ? void 0 : selectedJiraSite.url;
|
|
503
503
|
if (status === 'rejected' && jqlUrl) {
|
|
504
504
|
return jsx(ModalLoadingError, {
|
|
505
|
-
|
|
505
|
+
errorMessage: jqlUrl ? jsx(FormattedMessage, _extends({}, modalMessages.checkConnectionWithSource, {
|
|
506
|
+
values: {
|
|
507
|
+
a: function a(urlText) {
|
|
508
|
+
return jsx("a", {
|
|
509
|
+
href: jqlUrl
|
|
510
|
+
}, urlText);
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
})) : undefined
|
|
506
514
|
});
|
|
507
515
|
} else if (status === 'unauthorized') {
|
|
508
516
|
return jsx(AccessRequired, {
|
|
@@ -115,5 +115,10 @@ export var modalMessages = defineMessages({
|
|
|
115
115
|
id: 'linkDataSource.jira-issues.no.jira.sites.access.description',
|
|
116
116
|
description: 'Description that shows in the modal when user has no access to any Jira sites',
|
|
117
117
|
defaultMessage: 'To request access, contact your admin.'
|
|
118
|
+
},
|
|
119
|
+
checkConnectionWithSource: {
|
|
120
|
+
id: 'linkDataSource.jira-issues.checkConnectionWithSource',
|
|
121
|
+
description: 'Instructions to let the user know how to resolve the error that occured, or click the link provided to open the query in Jira',
|
|
122
|
+
defaultMessage: 'Check your connection and refresh, or <a>open this query in Jira</a> to review.'
|
|
118
123
|
}
|
|
119
124
|
});
|
|
@@ -80,6 +80,7 @@ export var ModeSwitcher = function ModeSwitcher(props) {
|
|
|
80
80
|
tooltipText = _ref.tooltipText;
|
|
81
81
|
var isSelected = value === selectedOptionValue;
|
|
82
82
|
return jsx(Tooltip, {
|
|
83
|
+
key: value,
|
|
83
84
|
content: tooltipText
|
|
84
85
|
}, function (tooltipProps) {
|
|
85
86
|
return jsx("label", _extends({}, tooltipProps, {
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
|
-
import { DatasourceAdf, InlineCardAdf } from '@atlaskit/linking-common/types';
|
|
3
|
-
import { DatasourceParameters } from '@atlaskit/linking-types';
|
|
4
2
|
import { IssueLikeDataTableViewProps } from '../ui/issue-like-table/types';
|
|
5
|
-
import { JiraIssueDatasourceParameters } from '../ui/jira-issues-modal/types';
|
|
6
3
|
export type JiraSearchMethod = 'basic' | 'jql';
|
|
7
4
|
export interface Site {
|
|
8
5
|
cloudId: string;
|
|
@@ -10,17 +7,17 @@ export interface Site {
|
|
|
10
7
|
url: string;
|
|
11
8
|
}
|
|
12
9
|
export type IssueViewModes = 'issue' | 'count';
|
|
13
|
-
export type ConfigModalProps = {
|
|
10
|
+
export type ConfigModalProps<ADF, Parameters> = {
|
|
14
11
|
/** Unique identifier for which type of datasource is being rendered and for making its requests */
|
|
15
12
|
datasourceId: string;
|
|
16
13
|
/** The url that was used to insert a List of Links */
|
|
17
14
|
url?: string;
|
|
18
15
|
/** Parameters for making the data requests necessary to render data within the table */
|
|
19
|
-
parameters?:
|
|
16
|
+
parameters?: Parameters;
|
|
20
17
|
/** Callback function to be invoked when the modal is closed either via cancel button click, esc keydown, or modal blanket click */
|
|
21
18
|
onCancel: () => void;
|
|
22
19
|
/** Callback function to be invoked when the insert issues button is clicked */
|
|
23
|
-
onInsert: (adf:
|
|
20
|
+
onInsert: (adf: ADF, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
24
21
|
/** The view mode that the modal will show on open:
|
|
25
22
|
* - Table = Displays a list of links in table format
|
|
26
23
|
* - Inline link = Presents a smart link that shows the count of query results. However, if there's only one result, it converts to an inline smart link of that issue.
|
|
@@ -39,16 +39,6 @@ export declare const loadingErrorMessages: {
|
|
|
39
39
|
description: string;
|
|
40
40
|
defaultMessage: string;
|
|
41
41
|
};
|
|
42
|
-
checkConnectionWithSourceDuplicate: {
|
|
43
|
-
id: string;
|
|
44
|
-
description: string;
|
|
45
|
-
defaultMessage: string;
|
|
46
|
-
};
|
|
47
|
-
checkConnectionWithSource: {
|
|
48
|
-
id: string;
|
|
49
|
-
description: string;
|
|
50
|
-
defaultMessage: string;
|
|
51
|
-
};
|
|
52
42
|
noResultsFoundDuplicate: {
|
|
53
43
|
id: string;
|
|
54
44
|
description: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { jsx } from '@emotion/react';
|
|
2
3
|
interface ModalLoadingErrorProps {
|
|
3
|
-
|
|
4
|
+
errorMessage?: React.ReactNode;
|
|
4
5
|
}
|
|
5
|
-
export declare const ModalLoadingError: ({
|
|
6
|
+
export declare const ModalLoadingError: ({ errorMessage, }: ModalLoadingErrorProps) => jsx.JSX.Element;
|
|
6
7
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface Props {
|
|
3
|
+
cloudId?: string;
|
|
4
|
+
initialSearchValue?: string;
|
|
5
|
+
isSearching: boolean;
|
|
6
|
+
onSearch: (searchTerm: string) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const ConfluenceSearchContainer: ({ cloudId, initialSearchValue, isSearching, onSearch, }: Props) => JSX.Element;
|
|
9
|
+
export default ConfluenceSearchContainer;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { ConfluenceSearchConfigModalProps } from './types';
|
|
3
3
|
export declare const CONFLUENCE_SEARCH_DATASOURCE_ID = "768fc736-3af4-4a8f-b27e-203602bff8ca";
|
|
4
|
-
declare const ConfluenceSearchConfigModalWithWrappers: (props:
|
|
4
|
+
declare const ConfluenceSearchConfigModalWithWrappers: (props: ConfluenceSearchConfigModalProps) => JSX.Element;
|
|
5
5
|
export default ConfluenceSearchConfigModalWithWrappers;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
|
-
import {
|
|
3
|
-
export declare const ConfluenceSearchConfigModal: (props:
|
|
2
|
+
import { ConfluenceSearchConfigModalProps } from '../types';
|
|
3
|
+
export declare const ConfluenceSearchConfigModal: (props: ConfluenceSearchConfigModalProps) => jsx.JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { DatasourceAdf } from '@atlaskit/linking-common/types';
|
|
2
|
+
import { ConfigModalProps } from '../../common/types';
|
|
3
|
+
export interface ConfluenceSearchConfigModalProps extends ConfigModalProps<ConfluenceSearchDatasourceAdf, ConfluenceSearchDatasourceParameters> {
|
|
4
|
+
}
|
|
5
|
+
export type ConfluenceSearchDatasourceParameters = {
|
|
6
|
+
cloudId: string;
|
|
7
|
+
searchString?: string;
|
|
8
|
+
entityTypes?: string[];
|
|
9
|
+
contentARIs?: string[];
|
|
10
|
+
spaceKeys?: string[];
|
|
11
|
+
contributorAccountIds?: string[];
|
|
12
|
+
labels?: string[];
|
|
13
|
+
ancestorPageIds?: string[];
|
|
14
|
+
containerStatus?: string[];
|
|
15
|
+
contentStatuses?: string[];
|
|
16
|
+
creatorAccountIds?: string[];
|
|
17
|
+
lastModified?: 'today' | 'yesterday' | 'past7Days' | 'past30Days' | 'pastYear' | 'custom';
|
|
18
|
+
lastModifiedFrom?: string;
|
|
19
|
+
lastModifiedTo?: string;
|
|
20
|
+
shouldMatchTitleOnly?: boolean;
|
|
21
|
+
};
|
|
22
|
+
export type ConfluenceSearchDatasourceAdf = DatasourceAdf<ConfluenceSearchDatasourceParameters>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { JiraConfigModalProps } from './types';
|
|
3
3
|
export declare const JIRA_LIST_OF_LINKS_DATASOURCE_ID = "d8b75300-dfda-4519-b6cd-e49abbd50401";
|
|
4
|
-
declare const JiraIssuesConfigModalWithWrappers: (props:
|
|
4
|
+
declare const JiraIssuesConfigModalWithWrappers: (props: JiraConfigModalProps) => JSX.Element;
|
|
5
5
|
export default JiraIssuesConfigModalWithWrappers;
|
|
@@ -1,21 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
|
-
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
|
-
import { InlineCardAdf } from '@atlaskit/linking-common/types';
|
|
5
3
|
import { DatasourceAction } from '../../../analytics/types';
|
|
6
|
-
import
|
|
7
|
-
import { JiraIssueDatasourceParameters } from '../types';
|
|
4
|
+
import { JiraConfigModalProps } from '../types';
|
|
8
5
|
/**
|
|
9
6
|
* This method should be called when one atomic action is performed on columns: adding new item, removing one item, changing items order.
|
|
10
7
|
* The assumption is that since only one action is changed at each time, we don't have to verify the actual contents of the lists.
|
|
11
8
|
*/
|
|
12
9
|
export declare const getColumnAction: (oldVisibleColumnKeys: string[], newVisibleColumnKeys: string[]) => DatasourceAction;
|
|
13
|
-
export declare const PlainJiraIssuesConfigModal: (props:
|
|
14
|
-
export declare const JiraIssuesConfigModal: import("react").ForwardRefExoticComponent<
|
|
15
|
-
datasourceId: string;
|
|
16
|
-
url?: string | undefined;
|
|
17
|
-
parameters?: import("@atlaskit/linking-types").DatasourceParameters | JiraIssueDatasourceParameters | undefined;
|
|
18
|
-
onCancel: () => void;
|
|
19
|
-
onInsert: (adf: InlineCardAdf | import("@atlaskit/linking-common/types").DatasourceAdf<Record<string, unknown>>, analyticsEvent?: UIAnalyticsEvent | undefined) => void;
|
|
20
|
-
viewMode?: IssueViewModes | undefined;
|
|
21
|
-
} & Partial<Pick<import("../../issue-like-table/types").IssueLikeDataTableViewProps, "visibleColumnKeys" | "wrappedColumnKeys" | "columnCustomSizes">> & import("@atlaskit/analytics-next").WithContextProps & import("react").RefAttributes<any>>;
|
|
10
|
+
export declare const PlainJiraIssuesConfigModal: (props: JiraConfigModalProps) => jsx.JSX.Element;
|
|
11
|
+
export declare const JiraIssuesConfigModal: import("react").ForwardRefExoticComponent<JiraConfigModalProps & import("@atlaskit/analytics-next").WithContextProps & import("react").RefAttributes<any>>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { DatasourceAdf } from '@atlaskit/linking-common/types';
|
|
1
|
+
import { DatasourceAdf, InlineCardAdf } from '@atlaskit/linking-common/types';
|
|
2
|
+
import { DatasourceParameters } from '@atlaskit/linking-types';
|
|
3
|
+
import { ConfigModalProps } from '../../common/types';
|
|
2
4
|
type XOR<T1, T2> = (T1 & {
|
|
3
5
|
[k in Exclude<keyof T2, keyof T1>]?: never;
|
|
4
6
|
}) | (T2 & {
|
|
@@ -13,4 +15,6 @@ export type JiraIssueDatasourceParameters = {
|
|
|
13
15
|
cloudId: string;
|
|
14
16
|
} & JiraIssueDatasourceParametersQuery;
|
|
15
17
|
export type JiraIssuesDatasourceAdf = DatasourceAdf<JiraIssueDatasourceParameters>;
|
|
18
|
+
export interface JiraConfigModalProps extends ConfigModalProps<InlineCardAdf | DatasourceAdf, DatasourceParameters | JiraIssueDatasourceParameters> {
|
|
19
|
+
}
|
|
16
20
|
export {};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
|
-
import { DatasourceAdf, InlineCardAdf } from '@atlaskit/linking-common/types';
|
|
3
|
-
import { DatasourceParameters } from '@atlaskit/linking-types';
|
|
4
2
|
import { IssueLikeDataTableViewProps } from '../ui/issue-like-table/types';
|
|
5
|
-
import { JiraIssueDatasourceParameters } from '../ui/jira-issues-modal/types';
|
|
6
3
|
export type JiraSearchMethod = 'basic' | 'jql';
|
|
7
4
|
export interface Site {
|
|
8
5
|
cloudId: string;
|
|
@@ -10,17 +7,17 @@ export interface Site {
|
|
|
10
7
|
url: string;
|
|
11
8
|
}
|
|
12
9
|
export type IssueViewModes = 'issue' | 'count';
|
|
13
|
-
export type ConfigModalProps = {
|
|
10
|
+
export type ConfigModalProps<ADF, Parameters> = {
|
|
14
11
|
/** Unique identifier for which type of datasource is being rendered and for making its requests */
|
|
15
12
|
datasourceId: string;
|
|
16
13
|
/** The url that was used to insert a List of Links */
|
|
17
14
|
url?: string;
|
|
18
15
|
/** Parameters for making the data requests necessary to render data within the table */
|
|
19
|
-
parameters?:
|
|
16
|
+
parameters?: Parameters;
|
|
20
17
|
/** Callback function to be invoked when the modal is closed either via cancel button click, esc keydown, or modal blanket click */
|
|
21
18
|
onCancel: () => void;
|
|
22
19
|
/** Callback function to be invoked when the insert issues button is clicked */
|
|
23
|
-
onInsert: (adf:
|
|
20
|
+
onInsert: (adf: ADF, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
24
21
|
/** The view mode that the modal will show on open:
|
|
25
22
|
* - Table = Displays a list of links in table format
|
|
26
23
|
* - Inline link = Presents a smart link that shows the count of query results. However, if there's only one result, it converts to an inline smart link of that issue.
|
|
@@ -39,16 +39,6 @@ export declare const loadingErrorMessages: {
|
|
|
39
39
|
description: string;
|
|
40
40
|
defaultMessage: string;
|
|
41
41
|
};
|
|
42
|
-
checkConnectionWithSourceDuplicate: {
|
|
43
|
-
id: string;
|
|
44
|
-
description: string;
|
|
45
|
-
defaultMessage: string;
|
|
46
|
-
};
|
|
47
|
-
checkConnectionWithSource: {
|
|
48
|
-
id: string;
|
|
49
|
-
description: string;
|
|
50
|
-
defaultMessage: string;
|
|
51
|
-
};
|
|
52
42
|
noResultsFoundDuplicate: {
|
|
53
43
|
id: string;
|
|
54
44
|
description: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { jsx } from '@emotion/react';
|
|
2
3
|
interface ModalLoadingErrorProps {
|
|
3
|
-
|
|
4
|
+
errorMessage?: React.ReactNode;
|
|
4
5
|
}
|
|
5
|
-
export declare const ModalLoadingError: ({
|
|
6
|
+
export declare const ModalLoadingError: ({ errorMessage, }: ModalLoadingErrorProps) => jsx.JSX.Element;
|
|
6
7
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface Props {
|
|
3
|
+
cloudId?: string;
|
|
4
|
+
initialSearchValue?: string;
|
|
5
|
+
isSearching: boolean;
|
|
6
|
+
onSearch: (searchTerm: string) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const ConfluenceSearchContainer: ({ cloudId, initialSearchValue, isSearching, onSearch, }: Props) => JSX.Element;
|
|
9
|
+
export default ConfluenceSearchContainer;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { ConfluenceSearchConfigModalProps } from './types';
|
|
3
3
|
export declare const CONFLUENCE_SEARCH_DATASOURCE_ID = "768fc736-3af4-4a8f-b27e-203602bff8ca";
|
|
4
|
-
declare const ConfluenceSearchConfigModalWithWrappers: (props:
|
|
4
|
+
declare const ConfluenceSearchConfigModalWithWrappers: (props: ConfluenceSearchConfigModalProps) => JSX.Element;
|
|
5
5
|
export default ConfluenceSearchConfigModalWithWrappers;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
|
-
import {
|
|
3
|
-
export declare const ConfluenceSearchConfigModal: (props:
|
|
2
|
+
import { ConfluenceSearchConfigModalProps } from '../types';
|
|
3
|
+
export declare const ConfluenceSearchConfigModal: (props: ConfluenceSearchConfigModalProps) => jsx.JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { DatasourceAdf } from '@atlaskit/linking-common/types';
|
|
2
|
+
import { ConfigModalProps } from '../../common/types';
|
|
3
|
+
export interface ConfluenceSearchConfigModalProps extends ConfigModalProps<ConfluenceSearchDatasourceAdf, ConfluenceSearchDatasourceParameters> {
|
|
4
|
+
}
|
|
5
|
+
export type ConfluenceSearchDatasourceParameters = {
|
|
6
|
+
cloudId: string;
|
|
7
|
+
searchString?: string;
|
|
8
|
+
entityTypes?: string[];
|
|
9
|
+
contentARIs?: string[];
|
|
10
|
+
spaceKeys?: string[];
|
|
11
|
+
contributorAccountIds?: string[];
|
|
12
|
+
labels?: string[];
|
|
13
|
+
ancestorPageIds?: string[];
|
|
14
|
+
containerStatus?: string[];
|
|
15
|
+
contentStatuses?: string[];
|
|
16
|
+
creatorAccountIds?: string[];
|
|
17
|
+
lastModified?: 'today' | 'yesterday' | 'past7Days' | 'past30Days' | 'pastYear' | 'custom';
|
|
18
|
+
lastModifiedFrom?: string;
|
|
19
|
+
lastModifiedTo?: string;
|
|
20
|
+
shouldMatchTitleOnly?: boolean;
|
|
21
|
+
};
|
|
22
|
+
export type ConfluenceSearchDatasourceAdf = DatasourceAdf<ConfluenceSearchDatasourceParameters>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { JiraConfigModalProps } from './types';
|
|
3
3
|
export declare const JIRA_LIST_OF_LINKS_DATASOURCE_ID = "d8b75300-dfda-4519-b6cd-e49abbd50401";
|
|
4
|
-
declare const JiraIssuesConfigModalWithWrappers: (props:
|
|
4
|
+
declare const JiraIssuesConfigModalWithWrappers: (props: JiraConfigModalProps) => JSX.Element;
|
|
5
5
|
export default JiraIssuesConfigModalWithWrappers;
|
|
@@ -1,21 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
|
-
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
|
-
import { InlineCardAdf } from '@atlaskit/linking-common/types';
|
|
5
3
|
import { DatasourceAction } from '../../../analytics/types';
|
|
6
|
-
import
|
|
7
|
-
import { JiraIssueDatasourceParameters } from '../types';
|
|
4
|
+
import { JiraConfigModalProps } from '../types';
|
|
8
5
|
/**
|
|
9
6
|
* This method should be called when one atomic action is performed on columns: adding new item, removing one item, changing items order.
|
|
10
7
|
* The assumption is that since only one action is changed at each time, we don't have to verify the actual contents of the lists.
|
|
11
8
|
*/
|
|
12
9
|
export declare const getColumnAction: (oldVisibleColumnKeys: string[], newVisibleColumnKeys: string[]) => DatasourceAction;
|
|
13
|
-
export declare const PlainJiraIssuesConfigModal: (props:
|
|
14
|
-
export declare const JiraIssuesConfigModal: import("react").ForwardRefExoticComponent<
|
|
15
|
-
datasourceId: string;
|
|
16
|
-
url?: string | undefined;
|
|
17
|
-
parameters?: import("@atlaskit/linking-types").DatasourceParameters | JiraIssueDatasourceParameters | undefined;
|
|
18
|
-
onCancel: () => void;
|
|
19
|
-
onInsert: (adf: InlineCardAdf | import("@atlaskit/linking-common/types").DatasourceAdf<Record<string, unknown>>, analyticsEvent?: UIAnalyticsEvent | undefined) => void;
|
|
20
|
-
viewMode?: IssueViewModes | undefined;
|
|
21
|
-
} & Partial<Pick<import("../../issue-like-table/types").IssueLikeDataTableViewProps, "visibleColumnKeys" | "wrappedColumnKeys" | "columnCustomSizes">> & import("@atlaskit/analytics-next").WithContextProps & import("react").RefAttributes<any>>;
|
|
10
|
+
export declare const PlainJiraIssuesConfigModal: (props: JiraConfigModalProps) => jsx.JSX.Element;
|
|
11
|
+
export declare const JiraIssuesConfigModal: import("react").ForwardRefExoticComponent<JiraConfigModalProps & import("@atlaskit/analytics-next").WithContextProps & import("react").RefAttributes<any>>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { DatasourceAdf } from '@atlaskit/linking-common/types';
|
|
1
|
+
import { DatasourceAdf, InlineCardAdf } from '@atlaskit/linking-common/types';
|
|
2
|
+
import { DatasourceParameters } from '@atlaskit/linking-types';
|
|
3
|
+
import { ConfigModalProps } from '../../common/types';
|
|
2
4
|
type XOR<T1, T2> = (T1 & {
|
|
3
5
|
[k in Exclude<keyof T2, keyof T1>]?: never;
|
|
4
6
|
}) | (T2 & {
|
|
@@ -13,4 +15,6 @@ export type JiraIssueDatasourceParameters = {
|
|
|
13
15
|
cloudId: string;
|
|
14
16
|
} & JiraIssueDatasourceParametersQuery;
|
|
15
17
|
export type JiraIssuesDatasourceAdf = DatasourceAdf<JiraIssueDatasourceParameters>;
|
|
18
|
+
export interface JiraConfigModalProps extends ConfigModalProps<InlineCardAdf | DatasourceAdf, DatasourceParameters | JiraIssueDatasourceParameters> {
|
|
19
|
+
}
|
|
16
20
|
export {};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import React, { useEffect, useMemo } from 'react';
|
|
2
|
+
|
|
3
|
+
import { IntlMessagesProvider } from '@atlaskit/intl-messages-provider';
|
|
4
|
+
import { SmartCardProvider } from '@atlaskit/link-provider';
|
|
5
|
+
import { mockDatasourceFetchRequests } from '@atlaskit/link-test-helpers/datasource';
|
|
6
|
+
import { DatasourceParameters } from '@atlaskit/linking-types';
|
|
7
|
+
|
|
8
|
+
import { DatasourceTableView } from '../src';
|
|
9
|
+
import { fetchMessagesForLocale } from '../src/common/utils/locale/fetch-messages-for-locale';
|
|
10
|
+
import { ConfluenceSearchDatasourceParameters } from '../src/ui/confluence-search-modal/types';
|
|
11
|
+
|
|
12
|
+
import SmartLinkClient from './smartLinkCustomClient';
|
|
13
|
+
import { useCommonTableProps } from './useCommonTableProps';
|
|
14
|
+
|
|
15
|
+
interface ConfluenceSearchTableViewProps {
|
|
16
|
+
parameters?: DatasourceParameters;
|
|
17
|
+
mockDatasourceFetchRequest?: boolean;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const ConfluenceSearchTableView = ({
|
|
21
|
+
parameters,
|
|
22
|
+
}: ConfluenceSearchTableViewProps) => {
|
|
23
|
+
const cloudId = parameters?.cloudId || 'some-cloud-id';
|
|
24
|
+
|
|
25
|
+
const datasourceParameters = useMemo<ConfluenceSearchDatasourceParameters>(
|
|
26
|
+
() => ({
|
|
27
|
+
cloudId,
|
|
28
|
+
searchString: 'some-query',
|
|
29
|
+
}),
|
|
30
|
+
[cloudId],
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
const {
|
|
34
|
+
visibleColumnKeys,
|
|
35
|
+
onVisibleColumnKeysChange,
|
|
36
|
+
columnCustomSizes,
|
|
37
|
+
onColumnResize,
|
|
38
|
+
wrappedColumnKeys,
|
|
39
|
+
onWrappedColumnChange,
|
|
40
|
+
} = useCommonTableProps({
|
|
41
|
+
defaultColumnCustomSizes: {
|
|
42
|
+
people: 100,
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<DatasourceTableView
|
|
48
|
+
datasourceId={'some-datasource-id'}
|
|
49
|
+
parameters={datasourceParameters}
|
|
50
|
+
visibleColumnKeys={visibleColumnKeys}
|
|
51
|
+
onVisibleColumnKeysChange={onVisibleColumnKeysChange}
|
|
52
|
+
columnCustomSizes={columnCustomSizes}
|
|
53
|
+
onColumnResize={onColumnResize}
|
|
54
|
+
onWrappedColumnChange={onWrappedColumnChange}
|
|
55
|
+
wrappedColumnKeys={wrappedColumnKeys}
|
|
56
|
+
/>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export const ExampleConfluenceSearchTableView = ({
|
|
61
|
+
parameters,
|
|
62
|
+
mockDatasourceFetchRequest = true,
|
|
63
|
+
}: ConfluenceSearchTableViewProps) => {
|
|
64
|
+
useEffect(() => {
|
|
65
|
+
if (mockDatasourceFetchRequest) {
|
|
66
|
+
mockDatasourceFetchRequests();
|
|
67
|
+
}
|
|
68
|
+
}, [mockDatasourceFetchRequest]);
|
|
69
|
+
|
|
70
|
+
return (
|
|
71
|
+
<IntlMessagesProvider loaderFn={fetchMessagesForLocale}>
|
|
72
|
+
<SmartCardProvider client={new SmartLinkClient()}>
|
|
73
|
+
<ConfluenceSearchTableView parameters={parameters} />
|
|
74
|
+
</SmartCardProvider>
|
|
75
|
+
</IntlMessagesProvider>
|
|
76
|
+
);
|
|
77
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "1.24.
|
|
3
|
+
"version": "1.24.9",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@atlaskit/avatar": "^21.5.0",
|
|
37
37
|
"@atlaskit/avatar-group": "^9.5.0",
|
|
38
38
|
"@atlaskit/badge": "^15.2.0",
|
|
39
|
-
"@atlaskit/button": "^17.
|
|
39
|
+
"@atlaskit/button": "^17.8.0",
|
|
40
40
|
"@atlaskit/dropdown-menu": "^12.8.0",
|
|
41
41
|
"@atlaskit/editor-prosemirror": "3.0.0",
|
|
42
42
|
"@atlaskit/empty-state": "^7.7.0",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.0",
|
|
61
61
|
"@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll": "^1.0.0",
|
|
62
62
|
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^1.0.0",
|
|
63
|
-
"@atlaskit/primitives": "^5.
|
|
63
|
+
"@atlaskit/primitives": "^5.2.0",
|
|
64
64
|
"@atlaskit/select": "^17.3.0",
|
|
65
65
|
"@atlaskit/smart-card": "^26.50.0",
|
|
66
66
|
"@atlaskit/spinner": "^16.0.0",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"@types/debounce-promise": "^3.1.2",
|
|
103
103
|
"fetch-mock": "^8.0.0",
|
|
104
104
|
"jest-fetch-mock": "^3.0.3",
|
|
105
|
-
"json-ld-types": "^
|
|
105
|
+
"json-ld-types": "^4.1.0",
|
|
106
106
|
"typescript": "~5.4.2",
|
|
107
107
|
"wait-for-expect": "^1.2.0"
|
|
108
108
|
},
|