@atlaskit/link-datasource 1.21.0 → 1.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/common/utils/adf.js +15 -0
- package/dist/cjs/index.js +7 -0
- package/dist/cjs/ui/assets-modal/modal/index.js +18 -22
- package/dist/cjs/ui/jira-issues-modal/modal/index.js +18 -23
- package/dist/es2019/common/utils/adf.js +9 -0
- package/dist/es2019/index.js +1 -0
- package/dist/es2019/ui/assets-modal/modal/index.js +16 -20
- package/dist/es2019/ui/jira-issues-modal/modal/index.js +16 -21
- package/dist/esm/common/utils/adf.js +9 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/ui/assets-modal/modal/index.js +18 -22
- package/dist/esm/ui/jira-issues-modal/modal/index.js +18 -23
- package/dist/types/common/utils/adf.d.ts +2 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/ui/assets-modal/types.d.ts +1 -1
- package/dist/types/ui/jira-issues-modal/types.d.ts +1 -20
- package/dist/types-ts4.5/common/utils/adf.d.ts +2 -0
- package/dist/types-ts4.5/index.d.ts +1 -0
- package/dist/types-ts4.5/ui/assets-modal/types.d.ts +1 -1
- package/dist/types-ts4.5/ui/jira-issues-modal/types.d.ts +1 -20
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 1.22.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#70152](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/70152) [`53ed3673df28`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/53ed3673df28) - Updating adf-schema version to 35.5.1
|
|
8
|
+
|
|
9
|
+
## 1.22.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#70612](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/70612) [`87457cd97d6b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/87457cd97d6b) - Exported `buildDatasourceAdf` utility.
|
|
14
|
+
|
|
3
15
|
## 1.21.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.buildDatasourceAdf = void 0;
|
|
7
|
+
var buildDatasourceAdf = exports.buildDatasourceAdf = function buildDatasourceAdf(datasource, url) {
|
|
8
|
+
return {
|
|
9
|
+
type: 'blockCard',
|
|
10
|
+
attrs: {
|
|
11
|
+
url: url,
|
|
12
|
+
datasource: datasource
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
};
|
package/dist/cjs/index.js
CHANGED
|
@@ -47,9 +47,16 @@ Object.defineProperty(exports, "LazyLoadedDatasourceRenderFailedAnalyticsWrapper
|
|
|
47
47
|
return _renderFailed.LazyLoadedDatasourceRenderFailedAnalyticsWrapper;
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
|
+
Object.defineProperty(exports, "buildDatasourceAdf", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
get: function get() {
|
|
53
|
+
return _adf.buildDatasourceAdf;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
50
56
|
var _jiraIssuesModal = _interopRequireWildcard(require("./ui/jira-issues-modal"));
|
|
51
57
|
var _assetsModal = _interopRequireWildcard(require("./ui/assets-modal"));
|
|
52
58
|
var _datasourceTableView = _interopRequireDefault(require("./ui/datasource-table-view"));
|
|
59
|
+
var _adf = require("./common/utils/adf");
|
|
53
60
|
var _renderFailed = require("./analytics/wrappers/render-failed");
|
|
54
61
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
55
62
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -23,6 +23,7 @@ var _types = require("../../../analytics/types");
|
|
|
23
23
|
var _ufoExperiences = require("../../../analytics/ufoExperiences");
|
|
24
24
|
var _useColumnPickerRenderedFailedUfoExperience = require("../../../analytics/ufoExperiences/hooks/useColumnPickerRenderedFailedUfoExperience");
|
|
25
25
|
var _useDataRenderedUfoExperience = require("../../../analytics/ufoExperiences/hooks/useDataRenderedUfoExperience");
|
|
26
|
+
var _adf = require("../../../common/utils/adf");
|
|
26
27
|
var _fetchMessagesForLocale = require("../../../common/utils/locale/fetch-messages-for-locale");
|
|
27
28
|
var _useAssetsClient2 = require("../../../hooks/useAssetsClient");
|
|
28
29
|
var _useDatasourceTableState = require("../../../hooks/useDatasourceTableState");
|
|
@@ -251,29 +252,24 @@ var PlainAssetsConfigModal = function PlainAssetsConfigModal(props) {
|
|
|
251
252
|
}
|
|
252
253
|
}, consumerEvent);
|
|
253
254
|
} else {
|
|
254
|
-
onInsert({
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
key: key
|
|
270
|
-
};
|
|
271
|
-
})
|
|
272
|
-
}
|
|
273
|
-
}]
|
|
255
|
+
onInsert((0, _adf.buildDatasourceAdf)({
|
|
256
|
+
id: datasourceId,
|
|
257
|
+
parameters: {
|
|
258
|
+
workspaceId: workspaceId,
|
|
259
|
+
aql: aql,
|
|
260
|
+
schemaId: schemaId
|
|
261
|
+
},
|
|
262
|
+
views: [{
|
|
263
|
+
type: 'table',
|
|
264
|
+
properties: {
|
|
265
|
+
columns: (visibleColumnKeys !== null && visibleColumnKeys !== void 0 ? visibleColumnKeys : []).map(function (key) {
|
|
266
|
+
return {
|
|
267
|
+
key: key
|
|
268
|
+
};
|
|
269
|
+
})
|
|
274
270
|
}
|
|
275
|
-
}
|
|
276
|
-
}, consumerEvent);
|
|
271
|
+
}]
|
|
272
|
+
}), consumerEvent);
|
|
277
273
|
}
|
|
278
274
|
}, [aql, schemaId, workspaceId, analyticsPayload, totalCount, retrieveUrlForSmartCardRender, responseItems.length, onInsert, datasourceId, visibleColumnKeys]);
|
|
279
275
|
var onCancelClick = (0, _react.useCallback)(function (e, analyticEvent) {
|
|
@@ -30,6 +30,7 @@ var _ufoExperiences = require("../../../analytics/ufoExperiences");
|
|
|
30
30
|
var _useColumnPickerRenderedFailedUfoExperience = require("../../../analytics/ufoExperiences/hooks/useColumnPickerRenderedFailedUfoExperience");
|
|
31
31
|
var _useDataRenderedUfoExperience = require("../../../analytics/ufoExperiences/hooks/useDataRenderedUfoExperience");
|
|
32
32
|
var _utils = require("../../../analytics/utils");
|
|
33
|
+
var _adf = require("../../../common/utils/adf");
|
|
33
34
|
var _fetchMessagesForLocale = require("../../../common/utils/locale/fetch-messages-for-locale");
|
|
34
35
|
var _useDatasourceTableState = require("../../../hooks/useDatasourceTableState");
|
|
35
36
|
var _en = _interopRequireDefault(require("../../../i18n/en"));
|
|
@@ -418,31 +419,25 @@ var PlainJiraIssuesConfigModal = exports.PlainJiraIssuesConfigModal = function P
|
|
|
418
419
|
}
|
|
419
420
|
}, consumerEvent);
|
|
420
421
|
} else {
|
|
421
|
-
onInsert({
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
parameters: {
|
|
428
|
-
cloudId: cloudId,
|
|
429
|
-
jql: upToDateJql // TODO support non JQL type
|
|
430
|
-
},
|
|
422
|
+
onInsert((0, _adf.buildDatasourceAdf)({
|
|
423
|
+
id: datasourceId,
|
|
424
|
+
parameters: {
|
|
425
|
+
cloudId: cloudId,
|
|
426
|
+
jql: upToDateJql // TODO support non JQL type
|
|
427
|
+
},
|
|
431
428
|
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
}
|
|
442
|
-
}]
|
|
429
|
+
views: [{
|
|
430
|
+
type: 'table',
|
|
431
|
+
properties: {
|
|
432
|
+
columns: (visibleColumnKeys || []).map(function (key) {
|
|
433
|
+
return {
|
|
434
|
+
key: key,
|
|
435
|
+
width: columnCustomSizes === null || columnCustomSizes === void 0 ? void 0 : columnCustomSizes[key]
|
|
436
|
+
};
|
|
437
|
+
})
|
|
443
438
|
}
|
|
444
|
-
}
|
|
445
|
-
}, consumerEvent);
|
|
439
|
+
}]
|
|
440
|
+
}, upToDateJqlUrl), consumerEvent);
|
|
446
441
|
}
|
|
447
442
|
}, [isParametersSet, jql, selectedJiraSite, analyticsPayload, totalCount, visibleColumnKeys, currentViewMode, retrieveUrlForSmartCardRender, onInsert, datasourceId, cloudId, columnCustomSizes, searchBarJql, responseItems]);
|
|
448
443
|
var handleViewModeChange = function handleViewModeChange(selectedMode) {
|
package/dist/es2019/index.js
CHANGED
|
@@ -2,6 +2,7 @@ export { default as JiraIssuesConfigModal } from './ui/jira-issues-modal';
|
|
|
2
2
|
export { default as AssetsConfigModal } from './ui/assets-modal';
|
|
3
3
|
export { default as DatasourceTableView } from './ui/datasource-table-view';
|
|
4
4
|
export { default as JSMAssetsConfigModal } from './ui/assets-modal';
|
|
5
|
+
export { buildDatasourceAdf } from './common/utils/adf';
|
|
5
6
|
export { JIRA_LIST_OF_LINKS_DATASOURCE_ID } from './ui/jira-issues-modal';
|
|
6
7
|
export { ASSETS_LIST_OF_LINKS_DATASOURCE_ID } from './ui/assets-modal';
|
|
7
8
|
export { LazyLoadedDatasourceRenderFailedAnalyticsWrapper } from './analytics/wrappers/render-failed';
|
|
@@ -14,6 +14,7 @@ import { DatasourceAction, DatasourceDisplay, DatasourceSearchMethod } from '../
|
|
|
14
14
|
import { startUfoExperience } from '../../../analytics/ufoExperiences';
|
|
15
15
|
import { useColumnPickerRenderedFailedUfoExperience } from '../../../analytics/ufoExperiences/hooks/useColumnPickerRenderedFailedUfoExperience';
|
|
16
16
|
import { useDataRenderedUfoExperience } from '../../../analytics/ufoExperiences/hooks/useDataRenderedUfoExperience';
|
|
17
|
+
import { buildDatasourceAdf } from '../../../common/utils/adf';
|
|
17
18
|
import { fetchMessagesForLocale } from '../../../common/utils/locale/fetch-messages-for-locale';
|
|
18
19
|
import { useAssetsClient } from '../../../hooks/useAssetsClient';
|
|
19
20
|
import { useDatasourceTableState } from '../../../hooks/useDatasourceTableState';
|
|
@@ -227,27 +228,22 @@ const PlainAssetsConfigModal = props => {
|
|
|
227
228
|
}
|
|
228
229
|
}, consumerEvent);
|
|
229
230
|
} else {
|
|
230
|
-
onInsert({
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
columns: visibleColumnKeys === null || visibleColumnKeys === void 0 ? void 0 : visibleColumnKeys.map(key => ({
|
|
244
|
-
key
|
|
245
|
-
}))
|
|
246
|
-
}
|
|
247
|
-
}]
|
|
231
|
+
onInsert(buildDatasourceAdf({
|
|
232
|
+
id: datasourceId,
|
|
233
|
+
parameters: {
|
|
234
|
+
workspaceId,
|
|
235
|
+
aql,
|
|
236
|
+
schemaId
|
|
237
|
+
},
|
|
238
|
+
views: [{
|
|
239
|
+
type: 'table',
|
|
240
|
+
properties: {
|
|
241
|
+
columns: (visibleColumnKeys !== null && visibleColumnKeys !== void 0 ? visibleColumnKeys : []).map(key => ({
|
|
242
|
+
key
|
|
243
|
+
}))
|
|
248
244
|
}
|
|
249
|
-
}
|
|
250
|
-
}, consumerEvent);
|
|
245
|
+
}]
|
|
246
|
+
}), consumerEvent);
|
|
251
247
|
}
|
|
252
248
|
}, [aql, schemaId, workspaceId, analyticsPayload, totalCount, retrieveUrlForSmartCardRender, responseItems.length, onInsert, datasourceId, visibleColumnKeys]);
|
|
253
249
|
const onCancelClick = useCallback((e, analyticEvent) => {
|
|
@@ -18,6 +18,7 @@ import { startUfoExperience } from '../../../analytics/ufoExperiences';
|
|
|
18
18
|
import { useColumnPickerRenderedFailedUfoExperience } from '../../../analytics/ufoExperiences/hooks/useColumnPickerRenderedFailedUfoExperience';
|
|
19
19
|
import { useDataRenderedUfoExperience } from '../../../analytics/ufoExperiences/hooks/useDataRenderedUfoExperience';
|
|
20
20
|
import { mapSearchMethod } from '../../../analytics/utils';
|
|
21
|
+
import { buildDatasourceAdf } from '../../../common/utils/adf';
|
|
21
22
|
import { fetchMessagesForLocale } from '../../../common/utils/locale/fetch-messages-for-locale';
|
|
22
23
|
import { useDatasourceTableState } from '../../../hooks/useDatasourceTableState';
|
|
23
24
|
import i18nEN from '../../../i18n/en';
|
|
@@ -371,29 +372,23 @@ export const PlainJiraIssuesConfigModal = props => {
|
|
|
371
372
|
}
|
|
372
373
|
}, consumerEvent);
|
|
373
374
|
} else {
|
|
374
|
-
onInsert({
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
parameters: {
|
|
381
|
-
cloudId,
|
|
382
|
-
jql: upToDateJql // TODO support non JQL type
|
|
383
|
-
},
|
|
375
|
+
onInsert(buildDatasourceAdf({
|
|
376
|
+
id: datasourceId,
|
|
377
|
+
parameters: {
|
|
378
|
+
cloudId,
|
|
379
|
+
jql: upToDateJql // TODO support non JQL type
|
|
380
|
+
},
|
|
384
381
|
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
}
|
|
393
|
-
}]
|
|
382
|
+
views: [{
|
|
383
|
+
type: 'table',
|
|
384
|
+
properties: {
|
|
385
|
+
columns: (visibleColumnKeys || []).map(key => ({
|
|
386
|
+
key,
|
|
387
|
+
width: columnCustomSizes === null || columnCustomSizes === void 0 ? void 0 : columnCustomSizes[key]
|
|
388
|
+
}))
|
|
394
389
|
}
|
|
395
|
-
}
|
|
396
|
-
}, consumerEvent);
|
|
390
|
+
}]
|
|
391
|
+
}, upToDateJqlUrl), consumerEvent);
|
|
397
392
|
}
|
|
398
393
|
}, [isParametersSet, jql, selectedJiraSite, analyticsPayload, totalCount, visibleColumnKeys, currentViewMode, retrieveUrlForSmartCardRender, onInsert, datasourceId, cloudId, columnCustomSizes, searchBarJql, responseItems]);
|
|
399
394
|
const handleViewModeChange = selectedMode => {
|
package/dist/esm/index.js
CHANGED
|
@@ -2,6 +2,7 @@ export { default as JiraIssuesConfigModal } from './ui/jira-issues-modal';
|
|
|
2
2
|
export { default as AssetsConfigModal } from './ui/assets-modal';
|
|
3
3
|
export { default as DatasourceTableView } from './ui/datasource-table-view';
|
|
4
4
|
export { default as JSMAssetsConfigModal } from './ui/assets-modal';
|
|
5
|
+
export { buildDatasourceAdf } from './common/utils/adf';
|
|
5
6
|
export { JIRA_LIST_OF_LINKS_DATASOURCE_ID } from './ui/jira-issues-modal';
|
|
6
7
|
export { ASSETS_LIST_OF_LINKS_DATASOURCE_ID } from './ui/assets-modal';
|
|
7
8
|
export { LazyLoadedDatasourceRenderFailedAnalyticsWrapper } from './analytics/wrappers/render-failed';
|
|
@@ -18,6 +18,7 @@ import { DatasourceAction, DatasourceDisplay, DatasourceSearchMethod } from '../
|
|
|
18
18
|
import { startUfoExperience } from '../../../analytics/ufoExperiences';
|
|
19
19
|
import { useColumnPickerRenderedFailedUfoExperience } from '../../../analytics/ufoExperiences/hooks/useColumnPickerRenderedFailedUfoExperience';
|
|
20
20
|
import { useDataRenderedUfoExperience } from '../../../analytics/ufoExperiences/hooks/useDataRenderedUfoExperience';
|
|
21
|
+
import { buildDatasourceAdf } from '../../../common/utils/adf';
|
|
21
22
|
import { fetchMessagesForLocale } from '../../../common/utils/locale/fetch-messages-for-locale';
|
|
22
23
|
import { useAssetsClient } from '../../../hooks/useAssetsClient';
|
|
23
24
|
import { useDatasourceTableState } from '../../../hooks/useDatasourceTableState';
|
|
@@ -242,29 +243,24 @@ var PlainAssetsConfigModal = function PlainAssetsConfigModal(props) {
|
|
|
242
243
|
}
|
|
243
244
|
}, consumerEvent);
|
|
244
245
|
} else {
|
|
245
|
-
onInsert({
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
key: key
|
|
261
|
-
};
|
|
262
|
-
})
|
|
263
|
-
}
|
|
264
|
-
}]
|
|
246
|
+
onInsert(buildDatasourceAdf({
|
|
247
|
+
id: datasourceId,
|
|
248
|
+
parameters: {
|
|
249
|
+
workspaceId: workspaceId,
|
|
250
|
+
aql: aql,
|
|
251
|
+
schemaId: schemaId
|
|
252
|
+
},
|
|
253
|
+
views: [{
|
|
254
|
+
type: 'table',
|
|
255
|
+
properties: {
|
|
256
|
+
columns: (visibleColumnKeys !== null && visibleColumnKeys !== void 0 ? visibleColumnKeys : []).map(function (key) {
|
|
257
|
+
return {
|
|
258
|
+
key: key
|
|
259
|
+
};
|
|
260
|
+
})
|
|
265
261
|
}
|
|
266
|
-
}
|
|
267
|
-
}, consumerEvent);
|
|
262
|
+
}]
|
|
263
|
+
}), consumerEvent);
|
|
268
264
|
}
|
|
269
265
|
}, [aql, schemaId, workspaceId, analyticsPayload, totalCount, retrieveUrlForSmartCardRender, responseItems.length, onInsert, datasourceId, visibleColumnKeys]);
|
|
270
266
|
var onCancelClick = useCallback(function (e, analyticEvent) {
|
|
@@ -25,6 +25,7 @@ import { startUfoExperience } from '../../../analytics/ufoExperiences';
|
|
|
25
25
|
import { useColumnPickerRenderedFailedUfoExperience } from '../../../analytics/ufoExperiences/hooks/useColumnPickerRenderedFailedUfoExperience';
|
|
26
26
|
import { useDataRenderedUfoExperience } from '../../../analytics/ufoExperiences/hooks/useDataRenderedUfoExperience';
|
|
27
27
|
import { mapSearchMethod } from '../../../analytics/utils';
|
|
28
|
+
import { buildDatasourceAdf } from '../../../common/utils/adf';
|
|
28
29
|
import { fetchMessagesForLocale } from '../../../common/utils/locale/fetch-messages-for-locale';
|
|
29
30
|
import { useDatasourceTableState } from '../../../hooks/useDatasourceTableState';
|
|
30
31
|
import i18nEN from '../../../i18n/en';
|
|
@@ -409,31 +410,25 @@ export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(prop
|
|
|
409
410
|
}
|
|
410
411
|
}, consumerEvent);
|
|
411
412
|
} else {
|
|
412
|
-
onInsert({
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
parameters: {
|
|
419
|
-
cloudId: cloudId,
|
|
420
|
-
jql: upToDateJql // TODO support non JQL type
|
|
421
|
-
},
|
|
413
|
+
onInsert(buildDatasourceAdf({
|
|
414
|
+
id: datasourceId,
|
|
415
|
+
parameters: {
|
|
416
|
+
cloudId: cloudId,
|
|
417
|
+
jql: upToDateJql // TODO support non JQL type
|
|
418
|
+
},
|
|
422
419
|
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
}
|
|
433
|
-
}]
|
|
420
|
+
views: [{
|
|
421
|
+
type: 'table',
|
|
422
|
+
properties: {
|
|
423
|
+
columns: (visibleColumnKeys || []).map(function (key) {
|
|
424
|
+
return {
|
|
425
|
+
key: key,
|
|
426
|
+
width: columnCustomSizes === null || columnCustomSizes === void 0 ? void 0 : columnCustomSizes[key]
|
|
427
|
+
};
|
|
428
|
+
})
|
|
434
429
|
}
|
|
435
|
-
}
|
|
436
|
-
}, consumerEvent);
|
|
430
|
+
}]
|
|
431
|
+
}, upToDateJqlUrl), consumerEvent);
|
|
437
432
|
}
|
|
438
433
|
}, [isParametersSet, jql, selectedJiraSite, analyticsPayload, totalCount, visibleColumnKeys, currentViewMode, retrieveUrlForSmartCardRender, onInsert, datasourceId, cloudId, columnCustomSizes, searchBarJql, responseItems]);
|
|
439
434
|
var handleViewModeChange = function handleViewModeChange(selectedMode) {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export { default as JiraIssuesConfigModal } from './ui/jira-issues-modal';
|
|
|
2
2
|
export { default as AssetsConfigModal } from './ui/assets-modal';
|
|
3
3
|
export { default as DatasourceTableView } from './ui/datasource-table-view';
|
|
4
4
|
export { default as JSMAssetsConfigModal } from './ui/assets-modal';
|
|
5
|
+
export { buildDatasourceAdf } from './common/utils/adf';
|
|
5
6
|
export type { JiraIssuesDatasourceAdf, JiraIssueDatasourceParameters, } from './ui/jira-issues-modal/types';
|
|
6
7
|
export type { AssetsDatasourceAdf, AssetsDatasourceParameters, } from './ui/assets-modal/types';
|
|
7
8
|
export { JIRA_LIST_OF_LINKS_DATASOURCE_ID } from './ui/jira-issues-modal';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
2
|
import { DatasourceAdf, DatasourceAdfView, InlineCardAdf } from '@atlaskit/linking-common/types';
|
|
3
|
-
export interface AssetsDatasourceParameters {
|
|
3
|
+
export interface AssetsDatasourceParameters extends Record<string, unknown> {
|
|
4
4
|
workspaceId: string;
|
|
5
5
|
aql: string;
|
|
6
6
|
schemaId: string;
|
|
@@ -19,26 +19,7 @@ export interface Site {
|
|
|
19
19
|
displayName: string;
|
|
20
20
|
url: string;
|
|
21
21
|
}
|
|
22
|
-
export
|
|
23
|
-
attrs: {
|
|
24
|
-
url?: string;
|
|
25
|
-
datasource: {
|
|
26
|
-
id: string;
|
|
27
|
-
parameters: JiraIssueDatasourceParameters;
|
|
28
|
-
views: [
|
|
29
|
-
{
|
|
30
|
-
type: 'table';
|
|
31
|
-
properties?: {
|
|
32
|
-
columns: {
|
|
33
|
-
key: string;
|
|
34
|
-
width?: number;
|
|
35
|
-
}[];
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
];
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
}
|
|
22
|
+
export type JiraIssuesDatasourceAdf = DatasourceAdf<JiraIssueDatasourceParameters>;
|
|
42
23
|
export interface JiraIssuesConfigModalProps {
|
|
43
24
|
/** Unique identifier for which type of datasource is being rendered and for making its requests */
|
|
44
25
|
datasourceId: string;
|
|
@@ -2,6 +2,7 @@ export { default as JiraIssuesConfigModal } from './ui/jira-issues-modal';
|
|
|
2
2
|
export { default as AssetsConfigModal } from './ui/assets-modal';
|
|
3
3
|
export { default as DatasourceTableView } from './ui/datasource-table-view';
|
|
4
4
|
export { default as JSMAssetsConfigModal } from './ui/assets-modal';
|
|
5
|
+
export { buildDatasourceAdf } from './common/utils/adf';
|
|
5
6
|
export type { JiraIssuesDatasourceAdf, JiraIssueDatasourceParameters, } from './ui/jira-issues-modal/types';
|
|
6
7
|
export type { AssetsDatasourceAdf, AssetsDatasourceParameters, } from './ui/assets-modal/types';
|
|
7
8
|
export { JIRA_LIST_OF_LINKS_DATASOURCE_ID } from './ui/jira-issues-modal';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
2
|
import { DatasourceAdf, DatasourceAdfView, InlineCardAdf } from '@atlaskit/linking-common/types';
|
|
3
|
-
export interface AssetsDatasourceParameters {
|
|
3
|
+
export interface AssetsDatasourceParameters extends Record<string, unknown> {
|
|
4
4
|
workspaceId: string;
|
|
5
5
|
aql: string;
|
|
6
6
|
schemaId: string;
|
|
@@ -19,26 +19,7 @@ export interface Site {
|
|
|
19
19
|
displayName: string;
|
|
20
20
|
url: string;
|
|
21
21
|
}
|
|
22
|
-
export
|
|
23
|
-
attrs: {
|
|
24
|
-
url?: string;
|
|
25
|
-
datasource: {
|
|
26
|
-
id: string;
|
|
27
|
-
parameters: JiraIssueDatasourceParameters;
|
|
28
|
-
views: [
|
|
29
|
-
{
|
|
30
|
-
type: 'table';
|
|
31
|
-
properties?: {
|
|
32
|
-
columns: {
|
|
33
|
-
key: string;
|
|
34
|
-
width?: number;
|
|
35
|
-
}[];
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
];
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
}
|
|
22
|
+
export type JiraIssuesDatasourceAdf = DatasourceAdf<JiraIssueDatasourceParameters>;
|
|
42
23
|
export interface JiraIssuesConfigModalProps {
|
|
43
24
|
/** Unique identifier for which type of datasource is being rendered and for making its requests */
|
|
44
25
|
datasourceId: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.22.1",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"analytics:codegen": "yarn workspace @atlassian/analytics-tooling run analytics:codegen link-datasource --output ./src/analytics/generated"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@atlaskit/adf-schema": "^35.
|
|
33
|
+
"@atlaskit/adf-schema": "^35.5.1",
|
|
34
34
|
"@atlaskit/analytics-next": "^9.1.3",
|
|
35
35
|
"@atlaskit/avatar": "^21.4.0",
|
|
36
36
|
"@atlaskit/avatar-group": "^9.5.0",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@atlaskit/editor-prosemirror": "1.1.0",
|
|
41
41
|
"@atlaskit/empty-state": "^7.5.0",
|
|
42
42
|
"@atlaskit/form": "^9.0.3",
|
|
43
|
-
"@atlaskit/heading": "^1.
|
|
43
|
+
"@atlaskit/heading": "^1.6.0",
|
|
44
44
|
"@atlaskit/icon": "^22.0.0",
|
|
45
45
|
"@atlaskit/icon-object": "^6.3.0",
|
|
46
46
|
"@atlaskit/image": "^1.1.0",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"@atlaskit/ssr": "*",
|
|
93
93
|
"@atlaskit/visual-regression": "*",
|
|
94
94
|
"@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
|
|
95
|
-
"@atlassian/feature-flags-test-utils": "^0.
|
|
95
|
+
"@atlassian/feature-flags-test-utils": "^0.2.0",
|
|
96
96
|
"@faker-js/faker": "^7.5.0",
|
|
97
97
|
"@testing-library/dom": "^8.17.1",
|
|
98
98
|
"@testing-library/react": "^12.1.5",
|