@atlaskit/link-datasource 1.23.9 → 1.24.0
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 +10 -0
- package/dist/cjs/ui/jira-issues-modal/modal/index.js +28 -7
- package/dist/es2019/ui/jira-issues-modal/modal/index.js +29 -7
- package/dist/esm/ui/jira-issues-modal/modal/index.js +28 -7
- package/dist/types/ui/datasource-table-view/datasourceTableView.d.ts +1 -1
- package/dist/types/ui/datasource-table-view/types.d.ts +1 -1
- package/dist/types/ui/jira-issues-modal/modal/index.d.ts +11 -2
- package/dist/types/ui/jira-issues-modal/types.d.ts +3 -7
- package/dist/types-ts4.5/ui/datasource-table-view/datasourceTableView.d.ts +1 -1
- package/dist/types-ts4.5/ui/datasource-table-view/types.d.ts +1 -1
- package/dist/types-ts4.5/ui/jira-issues-modal/modal/index.d.ts +11 -2
- package/dist/types-ts4.5/ui/jira-issues-modal/types.d.ts +3 -7
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 1.24.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#76893](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/76893) [`09e169066b2b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/09e169066b2b) - [ux] Add column wrapping configuration into the table inside Jira Modal dialog
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 1.23.9
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -113,6 +113,7 @@ var getColumnAction = exports.getColumnAction = function getColumnAction(oldVisi
|
|
|
113
113
|
var PlainJiraIssuesConfigModal = exports.PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
114
114
|
var datasourceId = props.datasourceId,
|
|
115
115
|
initialColumnCustomSizes = props.columnCustomSizes,
|
|
116
|
+
initialWrappedColumnKeys = props.wrappedColumnKeys,
|
|
116
117
|
onCancel = props.onCancel,
|
|
117
118
|
onInsert = props.onInsert,
|
|
118
119
|
_props$viewMode = props.viewMode,
|
|
@@ -171,6 +172,19 @@ var PlainJiraIssuesConfigModal = exports.PlainJiraIssuesConfigModal = function P
|
|
|
171
172
|
var onColumnResize = (0, _react.useCallback)(function (key, width) {
|
|
172
173
|
setColumnCustomSizes(_objectSpread(_objectSpread({}, columnCustomSizes), {}, (0, _defineProperty2.default)({}, key, width)));
|
|
173
174
|
}, [columnCustomSizes]);
|
|
175
|
+
var _useState17 = (0, _react.useState)(initialWrappedColumnKeys),
|
|
176
|
+
_useState18 = (0, _slicedToArray2.default)(_useState17, 2),
|
|
177
|
+
wrappedColumnKeys = _useState18[0],
|
|
178
|
+
setWrappedColumnKeys = _useState18[1];
|
|
179
|
+
var onWrappedColumnChange = (0, _react.useCallback)(function (key, isWrapped) {
|
|
180
|
+
var set = new Set(wrappedColumnKeys);
|
|
181
|
+
if (isWrapped) {
|
|
182
|
+
set.add(key);
|
|
183
|
+
} else {
|
|
184
|
+
set.delete(key);
|
|
185
|
+
}
|
|
186
|
+
setWrappedColumnKeys(Array.from(set));
|
|
187
|
+
}, [wrappedColumnKeys]);
|
|
174
188
|
var _useDatasourceTableSt = (0, _useDatasourceTableState.useDatasourceTableState)({
|
|
175
189
|
datasourceId: datasourceId,
|
|
176
190
|
parameters: isParametersSet ? parameters : undefined,
|
|
@@ -431,16 +445,21 @@ var PlainJiraIssuesConfigModal = exports.PlainJiraIssuesConfigModal = function P
|
|
|
431
445
|
type: 'table',
|
|
432
446
|
properties: {
|
|
433
447
|
columns: (visibleColumnKeys || []).map(function (key) {
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
448
|
+
var width = columnCustomSizes === null || columnCustomSizes === void 0 ? void 0 : columnCustomSizes[key];
|
|
449
|
+
var isWrapped = wrappedColumnKeys === null || wrappedColumnKeys === void 0 ? void 0 : wrappedColumnKeys.includes(key);
|
|
450
|
+
return _objectSpread(_objectSpread({
|
|
451
|
+
key: key
|
|
452
|
+
}, width ? {
|
|
453
|
+
width: width
|
|
454
|
+
} : {}), isWrapped ? {
|
|
455
|
+
isWrapped: isWrapped
|
|
456
|
+
} : {});
|
|
438
457
|
})
|
|
439
458
|
}
|
|
440
459
|
}]
|
|
441
460
|
}, upToDateJqlUrl), consumerEvent);
|
|
442
461
|
}
|
|
443
|
-
}, [isParametersSet, jql, selectedJiraSite, analyticsPayload, totalCount,
|
|
462
|
+
}, [isParametersSet, jql, selectedJiraSite, searchBarJql, analyticsPayload, totalCount, currentViewMode, retrieveUrlForSmartCardRender, responseItems.length, onInsert, datasourceId, cloudId, visibleColumnKeys, columnCustomSizes, wrappedColumnKeys]);
|
|
444
463
|
var handleViewModeChange = function handleViewModeChange(selectedMode) {
|
|
445
464
|
userInteractionActions.current.add(_types.DatasourceAction.DISPLAY_VIEW_CHANGED);
|
|
446
465
|
setCurrentViewMode(selectedMode);
|
|
@@ -473,9 +492,11 @@ var PlainJiraIssuesConfigModal = exports.PlainJiraIssuesConfigModal = function P
|
|
|
473
492
|
parentContainerRenderInstanceId: modalRenderInstanceId,
|
|
474
493
|
extensionKey: extensionKey,
|
|
475
494
|
columnCustomSizes: columnCustomSizes,
|
|
476
|
-
onColumnResize: onColumnResize
|
|
495
|
+
onColumnResize: onColumnResize,
|
|
496
|
+
wrappedColumnKeys: wrappedColumnKeys,
|
|
497
|
+
onWrappedColumnChange: (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.datasource-word_wrap') ? onWrappedColumnChange : undefined
|
|
477
498
|
}));
|
|
478
|
-
}, [
|
|
499
|
+
}, [status, columns, responseItems, hasNextPage, visibleColumnKeys, defaultVisibleColumnKeys, handleOnNextPage, loadDatasourceDetails, handleVisibleColumnKeysChange, modalRenderInstanceId, extensionKey, columnCustomSizes, onColumnResize, wrappedColumnKeys, onWrappedColumnChange]);
|
|
479
500
|
var renderCountModeContent = (0, _react.useCallback)(function () {
|
|
480
501
|
var selectedJiraSiteUrl = selectedJiraSite === null || selectedJiraSite === void 0 ? void 0 : selectedJiraSite.url;
|
|
481
502
|
if (status === 'unauthorized') {
|
|
@@ -98,6 +98,7 @@ export const PlainJiraIssuesConfigModal = props => {
|
|
|
98
98
|
const {
|
|
99
99
|
datasourceId,
|
|
100
100
|
columnCustomSizes: initialColumnCustomSizes,
|
|
101
|
+
wrappedColumnKeys: initialWrappedColumnKeys,
|
|
101
102
|
onCancel,
|
|
102
103
|
onInsert,
|
|
103
104
|
viewMode = 'issue',
|
|
@@ -133,6 +134,16 @@ export const PlainJiraIssuesConfigModal = props => {
|
|
|
133
134
|
[key]: width
|
|
134
135
|
});
|
|
135
136
|
}, [columnCustomSizes]);
|
|
137
|
+
const [wrappedColumnKeys, setWrappedColumnKeys] = useState(initialWrappedColumnKeys);
|
|
138
|
+
const onWrappedColumnChange = useCallback((key, isWrapped) => {
|
|
139
|
+
const set = new Set(wrappedColumnKeys);
|
|
140
|
+
if (isWrapped) {
|
|
141
|
+
set.add(key);
|
|
142
|
+
} else {
|
|
143
|
+
set.delete(key);
|
|
144
|
+
}
|
|
145
|
+
setWrappedColumnKeys(Array.from(set));
|
|
146
|
+
}, [wrappedColumnKeys]);
|
|
136
147
|
const {
|
|
137
148
|
reset,
|
|
138
149
|
status,
|
|
@@ -383,15 +394,24 @@ export const PlainJiraIssuesConfigModal = props => {
|
|
|
383
394
|
views: [{
|
|
384
395
|
type: 'table',
|
|
385
396
|
properties: {
|
|
386
|
-
columns: (visibleColumnKeys || []).map(key =>
|
|
387
|
-
key
|
|
388
|
-
|
|
389
|
-
|
|
397
|
+
columns: (visibleColumnKeys || []).map(key => {
|
|
398
|
+
const width = columnCustomSizes === null || columnCustomSizes === void 0 ? void 0 : columnCustomSizes[key];
|
|
399
|
+
const isWrapped = wrappedColumnKeys === null || wrappedColumnKeys === void 0 ? void 0 : wrappedColumnKeys.includes(key);
|
|
400
|
+
return {
|
|
401
|
+
key,
|
|
402
|
+
...(width ? {
|
|
403
|
+
width
|
|
404
|
+
} : {}),
|
|
405
|
+
...(isWrapped ? {
|
|
406
|
+
isWrapped
|
|
407
|
+
} : {})
|
|
408
|
+
};
|
|
409
|
+
})
|
|
390
410
|
}
|
|
391
411
|
}]
|
|
392
412
|
}, upToDateJqlUrl), consumerEvent);
|
|
393
413
|
}
|
|
394
|
-
}, [isParametersSet, jql, selectedJiraSite, analyticsPayload, totalCount,
|
|
414
|
+
}, [isParametersSet, jql, selectedJiraSite, searchBarJql, analyticsPayload, totalCount, currentViewMode, retrieveUrlForSmartCardRender, responseItems.length, onInsert, datasourceId, cloudId, visibleColumnKeys, columnCustomSizes, wrappedColumnKeys]);
|
|
395
415
|
const handleViewModeChange = selectedMode => {
|
|
396
416
|
userInteractionActions.current.add(DatasourceAction.DISPLAY_VIEW_CHANGED);
|
|
397
417
|
setCurrentViewMode(selectedMode);
|
|
@@ -421,8 +441,10 @@ export const PlainJiraIssuesConfigModal = props => {
|
|
|
421
441
|
parentContainerRenderInstanceId: modalRenderInstanceId,
|
|
422
442
|
extensionKey: extensionKey,
|
|
423
443
|
columnCustomSizes: columnCustomSizes,
|
|
424
|
-
onColumnResize: onColumnResize
|
|
425
|
-
|
|
444
|
+
onColumnResize: onColumnResize,
|
|
445
|
+
wrappedColumnKeys: wrappedColumnKeys,
|
|
446
|
+
onWrappedColumnChange: getBooleanFF('platform.linking-platform.datasource-word_wrap') ? onWrappedColumnChange : undefined
|
|
447
|
+
})), [status, columns, responseItems, hasNextPage, visibleColumnKeys, defaultVisibleColumnKeys, handleOnNextPage, loadDatasourceDetails, handleVisibleColumnKeysChange, modalRenderInstanceId, extensionKey, columnCustomSizes, onColumnResize, wrappedColumnKeys, onWrappedColumnChange]);
|
|
426
448
|
const renderCountModeContent = useCallback(() => {
|
|
427
449
|
const selectedJiraSiteUrl = selectedJiraSite === null || selectedJiraSite === void 0 ? void 0 : selectedJiraSite.url;
|
|
428
450
|
if (status === 'unauthorized') {
|
|
@@ -104,6 +104,7 @@ export var getColumnAction = function getColumnAction(oldVisibleColumnKeys, newV
|
|
|
104
104
|
export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
105
105
|
var datasourceId = props.datasourceId,
|
|
106
106
|
initialColumnCustomSizes = props.columnCustomSizes,
|
|
107
|
+
initialWrappedColumnKeys = props.wrappedColumnKeys,
|
|
107
108
|
onCancel = props.onCancel,
|
|
108
109
|
onInsert = props.onInsert,
|
|
109
110
|
_props$viewMode = props.viewMode,
|
|
@@ -162,6 +163,19 @@ export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(prop
|
|
|
162
163
|
var onColumnResize = useCallback(function (key, width) {
|
|
163
164
|
setColumnCustomSizes(_objectSpread(_objectSpread({}, columnCustomSizes), {}, _defineProperty({}, key, width)));
|
|
164
165
|
}, [columnCustomSizes]);
|
|
166
|
+
var _useState17 = useState(initialWrappedColumnKeys),
|
|
167
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
168
|
+
wrappedColumnKeys = _useState18[0],
|
|
169
|
+
setWrappedColumnKeys = _useState18[1];
|
|
170
|
+
var onWrappedColumnChange = useCallback(function (key, isWrapped) {
|
|
171
|
+
var set = new Set(wrappedColumnKeys);
|
|
172
|
+
if (isWrapped) {
|
|
173
|
+
set.add(key);
|
|
174
|
+
} else {
|
|
175
|
+
set.delete(key);
|
|
176
|
+
}
|
|
177
|
+
setWrappedColumnKeys(Array.from(set));
|
|
178
|
+
}, [wrappedColumnKeys]);
|
|
165
179
|
var _useDatasourceTableSt = useDatasourceTableState({
|
|
166
180
|
datasourceId: datasourceId,
|
|
167
181
|
parameters: isParametersSet ? parameters : undefined,
|
|
@@ -422,16 +436,21 @@ export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(prop
|
|
|
422
436
|
type: 'table',
|
|
423
437
|
properties: {
|
|
424
438
|
columns: (visibleColumnKeys || []).map(function (key) {
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
439
|
+
var width = columnCustomSizes === null || columnCustomSizes === void 0 ? void 0 : columnCustomSizes[key];
|
|
440
|
+
var isWrapped = wrappedColumnKeys === null || wrappedColumnKeys === void 0 ? void 0 : wrappedColumnKeys.includes(key);
|
|
441
|
+
return _objectSpread(_objectSpread({
|
|
442
|
+
key: key
|
|
443
|
+
}, width ? {
|
|
444
|
+
width: width
|
|
445
|
+
} : {}), isWrapped ? {
|
|
446
|
+
isWrapped: isWrapped
|
|
447
|
+
} : {});
|
|
429
448
|
})
|
|
430
449
|
}
|
|
431
450
|
}]
|
|
432
451
|
}, upToDateJqlUrl), consumerEvent);
|
|
433
452
|
}
|
|
434
|
-
}, [isParametersSet, jql, selectedJiraSite, analyticsPayload, totalCount,
|
|
453
|
+
}, [isParametersSet, jql, selectedJiraSite, searchBarJql, analyticsPayload, totalCount, currentViewMode, retrieveUrlForSmartCardRender, responseItems.length, onInsert, datasourceId, cloudId, visibleColumnKeys, columnCustomSizes, wrappedColumnKeys]);
|
|
435
454
|
var handleViewModeChange = function handleViewModeChange(selectedMode) {
|
|
436
455
|
userInteractionActions.current.add(DatasourceAction.DISPLAY_VIEW_CHANGED);
|
|
437
456
|
setCurrentViewMode(selectedMode);
|
|
@@ -464,9 +483,11 @@ export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(prop
|
|
|
464
483
|
parentContainerRenderInstanceId: modalRenderInstanceId,
|
|
465
484
|
extensionKey: extensionKey,
|
|
466
485
|
columnCustomSizes: columnCustomSizes,
|
|
467
|
-
onColumnResize: onColumnResize
|
|
486
|
+
onColumnResize: onColumnResize,
|
|
487
|
+
wrappedColumnKeys: wrappedColumnKeys,
|
|
488
|
+
onWrappedColumnChange: getBooleanFF('platform.linking-platform.datasource-word_wrap') ? onWrappedColumnChange : undefined
|
|
468
489
|
}));
|
|
469
|
-
}, [
|
|
490
|
+
}, [status, columns, responseItems, hasNextPage, visibleColumnKeys, defaultVisibleColumnKeys, handleOnNextPage, loadDatasourceDetails, handleVisibleColumnKeysChange, modalRenderInstanceId, extensionKey, columnCustomSizes, onColumnResize, wrappedColumnKeys, onWrappedColumnChange]);
|
|
470
491
|
var renderCountModeContent = useCallback(function () {
|
|
471
492
|
var selectedJiraSiteUrl = selectedJiraSite === null || selectedJiraSite === void 0 ? void 0 : selectedJiraSite.url;
|
|
472
493
|
if (status === 'unauthorized') {
|
|
@@ -4,4 +4,4 @@ export declare const DatasourceTableView: import("react").ForwardRefExoticCompon
|
|
|
4
4
|
parameters: object;
|
|
5
5
|
fields?: string[] | undefined;
|
|
6
6
|
url?: string | undefined;
|
|
7
|
-
} & Partial<Pick<import("../issue-like-table/types").IssueLikeDataTableViewProps, "visibleColumnKeys"
|
|
7
|
+
} & Partial<Pick<import("../issue-like-table/types").IssueLikeDataTableViewProps, "visibleColumnKeys" | "wrappedColumnKeys" | "columnCustomSizes" | "onVisibleColumnKeysChange" | "onColumnResize" | "onWrappedColumnChange">> & import("@atlaskit/analytics-next").WithContextProps & import("react").RefAttributes<any>>;
|
|
@@ -7,4 +7,4 @@ export type DatasourceTableViewProps = {
|
|
|
7
7
|
fields?: string[];
|
|
8
8
|
/** Url for an existing datasource, initially used for displaying to a user unauthorized to query that site */
|
|
9
9
|
url?: string;
|
|
10
|
-
} & Partial<Pick<IssueLikeDataTableViewProps, 'visibleColumnKeys'
|
|
10
|
+
} & Partial<Pick<IssueLikeDataTableViewProps, 'visibleColumnKeys' | 'onVisibleColumnKeysChange' | 'wrappedColumnKeys' | 'onWrappedColumnChange' | 'onColumnResize' | 'columnCustomSizes'>>;
|
|
@@ -1,11 +1,20 @@
|
|
|
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';
|
|
3
5
|
import { DatasourceAction } from '../../../analytics/types';
|
|
4
|
-
import { JiraIssuesConfigModalProps } from '../types';
|
|
6
|
+
import { JiraIssueDatasourceParameters, JiraIssuesConfigModalProps, JiraIssueViewModes } from '../types';
|
|
5
7
|
/**
|
|
6
8
|
* This method should be called when one atomic action is performed on columns: adding new item, removing one item, changing items order.
|
|
7
9
|
* 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.
|
|
8
10
|
*/
|
|
9
11
|
export declare const getColumnAction: (oldVisibleColumnKeys: string[], newVisibleColumnKeys: string[]) => DatasourceAction;
|
|
10
12
|
export declare const PlainJiraIssuesConfigModal: (props: JiraIssuesConfigModalProps) => jsx.JSX.Element;
|
|
11
|
-
export declare const JiraIssuesConfigModal: import("react").ForwardRefExoticComponent<
|
|
13
|
+
export declare const JiraIssuesConfigModal: import("react").ForwardRefExoticComponent<{
|
|
14
|
+
datasourceId: string;
|
|
15
|
+
url?: string | undefined;
|
|
16
|
+
parameters?: JiraIssueDatasourceParameters | undefined;
|
|
17
|
+
onCancel: () => void;
|
|
18
|
+
onInsert: (adf: import("../types").JiraIssuesDatasourceAdf | InlineCardAdf, analyticsEvent?: UIAnalyticsEvent | undefined) => void;
|
|
19
|
+
viewMode?: JiraIssueViewModes | undefined;
|
|
20
|
+
} & Partial<Pick<import("../../issue-like-table/types").IssueLikeDataTableViewProps, "visibleColumnKeys" | "wrappedColumnKeys" | "columnCustomSizes">> & import("@atlaskit/analytics-next").WithContextProps & import("react").RefAttributes<any>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
2
|
import { DatasourceAdf, InlineCardAdf } from '@atlaskit/linking-common/types';
|
|
3
|
+
import { IssueLikeDataTableViewProps } from '../issue-like-table/types';
|
|
3
4
|
type XOR<T1, T2> = (T1 & {
|
|
4
5
|
[k in Exclude<keyof T2, keyof T1>]?: never;
|
|
5
6
|
}) | (T2 & {
|
|
@@ -20,14 +21,9 @@ export interface Site {
|
|
|
20
21
|
url: string;
|
|
21
22
|
}
|
|
22
23
|
export type JiraIssuesDatasourceAdf = DatasourceAdf<JiraIssueDatasourceParameters>;
|
|
23
|
-
export
|
|
24
|
+
export type JiraIssuesConfigModalProps = {
|
|
24
25
|
/** Unique identifier for which type of datasource is being rendered and for making its requests */
|
|
25
26
|
datasourceId: string;
|
|
26
|
-
/** The keys for each of the visible columns to the shown in the rendered table */
|
|
27
|
-
visibleColumnKeys?: string[];
|
|
28
|
-
columnCustomSizes?: {
|
|
29
|
-
[key: string]: number;
|
|
30
|
-
};
|
|
31
27
|
/** The url that was used to insert a Jira List of Links */
|
|
32
28
|
url?: string;
|
|
33
29
|
/** Parameters for making the data requests necessary to render data within the table */
|
|
@@ -43,5 +39,5 @@ export interface JiraIssuesConfigModalProps {
|
|
|
43
39
|
* The view modes in 'JiraIssueViewModes' have not been changed from 'count' to 'inline link' and 'issue' to 'table'
|
|
44
40
|
* because it will introduce breaking changes to the public API requiring a major version bump*/
|
|
45
41
|
viewMode?: JiraIssueViewModes;
|
|
46
|
-
}
|
|
42
|
+
} & Partial<Pick<IssueLikeDataTableViewProps, 'visibleColumnKeys' | 'wrappedColumnKeys' | 'columnCustomSizes'>>;
|
|
47
43
|
export {};
|
|
@@ -4,4 +4,4 @@ export declare const DatasourceTableView: import("react").ForwardRefExoticCompon
|
|
|
4
4
|
parameters: object;
|
|
5
5
|
fields?: string[] | undefined;
|
|
6
6
|
url?: string | undefined;
|
|
7
|
-
} & Partial<Pick<import("../issue-like-table/types").IssueLikeDataTableViewProps, "visibleColumnKeys"
|
|
7
|
+
} & Partial<Pick<import("../issue-like-table/types").IssueLikeDataTableViewProps, "visibleColumnKeys" | "wrappedColumnKeys" | "columnCustomSizes" | "onVisibleColumnKeysChange" | "onColumnResize" | "onWrappedColumnChange">> & import("@atlaskit/analytics-next").WithContextProps & import("react").RefAttributes<any>>;
|
|
@@ -7,4 +7,4 @@ export type DatasourceTableViewProps = {
|
|
|
7
7
|
fields?: string[];
|
|
8
8
|
/** Url for an existing datasource, initially used for displaying to a user unauthorized to query that site */
|
|
9
9
|
url?: string;
|
|
10
|
-
} & Partial<Pick<IssueLikeDataTableViewProps, 'visibleColumnKeys'
|
|
10
|
+
} & Partial<Pick<IssueLikeDataTableViewProps, 'visibleColumnKeys' | 'onVisibleColumnKeysChange' | 'wrappedColumnKeys' | 'onWrappedColumnChange' | 'onColumnResize' | 'columnCustomSizes'>>;
|
|
@@ -1,11 +1,20 @@
|
|
|
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';
|
|
3
5
|
import { DatasourceAction } from '../../../analytics/types';
|
|
4
|
-
import { JiraIssuesConfigModalProps } from '../types';
|
|
6
|
+
import { JiraIssueDatasourceParameters, JiraIssuesConfigModalProps, JiraIssueViewModes } from '../types';
|
|
5
7
|
/**
|
|
6
8
|
* This method should be called when one atomic action is performed on columns: adding new item, removing one item, changing items order.
|
|
7
9
|
* 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.
|
|
8
10
|
*/
|
|
9
11
|
export declare const getColumnAction: (oldVisibleColumnKeys: string[], newVisibleColumnKeys: string[]) => DatasourceAction;
|
|
10
12
|
export declare const PlainJiraIssuesConfigModal: (props: JiraIssuesConfigModalProps) => jsx.JSX.Element;
|
|
11
|
-
export declare const JiraIssuesConfigModal: import("react").ForwardRefExoticComponent<
|
|
13
|
+
export declare const JiraIssuesConfigModal: import("react").ForwardRefExoticComponent<{
|
|
14
|
+
datasourceId: string;
|
|
15
|
+
url?: string | undefined;
|
|
16
|
+
parameters?: JiraIssueDatasourceParameters | undefined;
|
|
17
|
+
onCancel: () => void;
|
|
18
|
+
onInsert: (adf: import("../types").JiraIssuesDatasourceAdf | InlineCardAdf, analyticsEvent?: UIAnalyticsEvent | undefined) => void;
|
|
19
|
+
viewMode?: JiraIssueViewModes | undefined;
|
|
20
|
+
} & Partial<Pick<import("../../issue-like-table/types").IssueLikeDataTableViewProps, "visibleColumnKeys" | "wrappedColumnKeys" | "columnCustomSizes">> & import("@atlaskit/analytics-next").WithContextProps & import("react").RefAttributes<any>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
2
|
import { DatasourceAdf, InlineCardAdf } from '@atlaskit/linking-common/types';
|
|
3
|
+
import { IssueLikeDataTableViewProps } from '../issue-like-table/types';
|
|
3
4
|
type XOR<T1, T2> = (T1 & {
|
|
4
5
|
[k in Exclude<keyof T2, keyof T1>]?: never;
|
|
5
6
|
}) | (T2 & {
|
|
@@ -20,14 +21,9 @@ export interface Site {
|
|
|
20
21
|
url: string;
|
|
21
22
|
}
|
|
22
23
|
export type JiraIssuesDatasourceAdf = DatasourceAdf<JiraIssueDatasourceParameters>;
|
|
23
|
-
export
|
|
24
|
+
export type JiraIssuesConfigModalProps = {
|
|
24
25
|
/** Unique identifier for which type of datasource is being rendered and for making its requests */
|
|
25
26
|
datasourceId: string;
|
|
26
|
-
/** The keys for each of the visible columns to the shown in the rendered table */
|
|
27
|
-
visibleColumnKeys?: string[];
|
|
28
|
-
columnCustomSizes?: {
|
|
29
|
-
[key: string]: number;
|
|
30
|
-
};
|
|
31
27
|
/** The url that was used to insert a Jira List of Links */
|
|
32
28
|
url?: string;
|
|
33
29
|
/** Parameters for making the data requests necessary to render data within the table */
|
|
@@ -43,5 +39,5 @@ export interface JiraIssuesConfigModalProps {
|
|
|
43
39
|
* The view modes in 'JiraIssueViewModes' have not been changed from 'count' to 'inline link' and 'issue' to 'table'
|
|
44
40
|
* because it will introduce breaking changes to the public API requiring a major version bump*/
|
|
45
41
|
viewMode?: JiraIssueViewModes;
|
|
46
|
-
}
|
|
42
|
+
} & Partial<Pick<IssueLikeDataTableViewProps, 'visibleColumnKeys' | 'wrappedColumnKeys' | 'columnCustomSizes'>>;
|
|
47
43
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.24.0",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@atlaskit/jql-editor": "^4.0.0",
|
|
51
51
|
"@atlaskit/jql-editor-autocomplete-rest": "^2.0.0",
|
|
52
52
|
"@atlaskit/link-client-extension": "^1.8.0",
|
|
53
|
-
"@atlaskit/linking-common": "^5.
|
|
53
|
+
"@atlaskit/linking-common": "^5.5.0",
|
|
54
54
|
"@atlaskit/linking-types": "^8.7.0",
|
|
55
55
|
"@atlaskit/lozenge": "^11.6.0",
|
|
56
56
|
"@atlaskit/modal-dialog": "^12.10.0",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^1.0.0",
|
|
63
63
|
"@atlaskit/primitives": "^4.1.0",
|
|
64
64
|
"@atlaskit/select": "^17.3.0",
|
|
65
|
-
"@atlaskit/smart-card": "^26.
|
|
65
|
+
"@atlaskit/smart-card": "^26.50.0",
|
|
66
66
|
"@atlaskit/spinner": "^16.0.0",
|
|
67
67
|
"@atlaskit/tag": "^12.0.0",
|
|
68
68
|
"@atlaskit/textfield": "6.1.1",
|
|
@@ -144,6 +144,9 @@
|
|
|
144
144
|
"platform.linking-platform.datasource.show-jlol-basic-filters": {
|
|
145
145
|
"type": "boolean"
|
|
146
146
|
},
|
|
147
|
+
"platform.linking-platform.datasource-word_wrap": {
|
|
148
|
+
"type": "boolean"
|
|
149
|
+
},
|
|
147
150
|
"platform.linking-platform.datasources.enable-sentry-client": {
|
|
148
151
|
"type": "boolean"
|
|
149
152
|
},
|