@atlaskit/link-datasource 5.4.4 → 5.5.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 +17 -0
- package/dist/cjs/common/utils/locale/fetch-messages-for-locale.js +16 -18
- package/dist/cjs/hooks/useAssetsClient.js +41 -41
- package/dist/cjs/hooks/useDatasourceTableState.js +50 -49
- package/dist/cjs/hooks/useLoadOptions.js +8 -8
- package/dist/cjs/hooks/useObjectSchemas.js +17 -17
- package/dist/cjs/hooks/useValidateAqlText.js +15 -15
- package/dist/cjs/services/cmdbService.js +43 -43
- package/dist/cjs/services/getAvailableSites.js +19 -19
- package/dist/cjs/services/makeGetJqlAutocompleteData.js +19 -19
- package/dist/cjs/services/makeGetJqlSuggestionsData.js +17 -17
- package/dist/cjs/services/useAvailableSites.js +4 -4
- package/dist/cjs/services/useBasicFilterAGG.js +1 -1
- package/dist/cjs/state/actions/index.js +11 -11
- package/dist/cjs/ui/assets-modal/search-container/object-schema-select/index.js +13 -13
- package/dist/cjs/ui/common/error-state/provider-auth-required.js +13 -12
- package/dist/cjs/ui/common/modal/popup-select/index.js +1 -1
- package/dist/cjs/ui/confluence-search-modal/basic-filters/filters/date-range-picker/messages.js +2 -2
- package/dist/cjs/ui/confluence-search-modal/basic-filters/filters/edited-or-created-by/index.js +2 -2
- package/dist/cjs/ui/confluence-search-modal/basic-filters/hooks/useBasicFilterHydration.js +12 -12
- package/dist/cjs/ui/confluence-search-modal/basic-filters/hooks/useCurrentUserInfo.js +4 -4
- package/dist/cjs/ui/confluence-search-modal/basic-filters/hooks/useRecommendation.js +19 -19
- package/dist/cjs/ui/issue-like-table/drag-column-preview.compiled.css +1 -1
- package/dist/cjs/ui/issue-like-table/drag-column-preview.js +1 -1
- package/dist/cjs/ui/issue-like-table/index.js +14 -13
- package/dist/cjs/ui/jira-issues-modal/basic-filters/hooks/useFilterOptions.js +25 -23
- package/dist/cjs/ui/jira-issues-modal/basic-filters/hooks/useHydrateJqlQuery.js +13 -13
- package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.js +2 -2
- package/dist/es2019/ui/confluence-search-modal/basic-filters/filters/date-range-picker/messages.js +2 -2
- package/dist/es2019/ui/issue-like-table/drag-column-preview.compiled.css +1 -1
- package/dist/es2019/ui/issue-like-table/drag-column-preview.js +1 -1
- package/dist/esm/common/utils/locale/fetch-messages-for-locale.js +15 -17
- package/dist/esm/hooks/useAssetsClient.js +41 -41
- package/dist/esm/hooks/useDatasourceTableState.js +50 -49
- package/dist/esm/hooks/useLoadOptions.js +8 -8
- package/dist/esm/hooks/useObjectSchemas.js +17 -17
- package/dist/esm/hooks/useValidateAqlText.js +15 -15
- package/dist/esm/services/cmdbService.js +43 -43
- package/dist/esm/services/getAvailableSites.js +19 -19
- package/dist/esm/services/makeGetJqlAutocompleteData.js +19 -19
- package/dist/esm/services/makeGetJqlSuggestionsData.js +17 -17
- package/dist/esm/services/useAvailableSites.js +4 -4
- package/dist/esm/services/useBasicFilterAGG.js +1 -1
- package/dist/esm/state/actions/index.js +11 -11
- package/dist/esm/ui/assets-modal/search-container/object-schema-select/index.js +12 -12
- package/dist/esm/ui/common/error-state/provider-auth-required.js +12 -11
- package/dist/esm/ui/common/modal/popup-select/index.js +1 -1
- package/dist/esm/ui/confluence-search-modal/basic-filters/filters/date-range-picker/messages.js +2 -2
- package/dist/esm/ui/confluence-search-modal/basic-filters/filters/edited-or-created-by/index.js +2 -2
- package/dist/esm/ui/confluence-search-modal/basic-filters/hooks/useBasicFilterHydration.js +12 -12
- package/dist/esm/ui/confluence-search-modal/basic-filters/hooks/useCurrentUserInfo.js +4 -4
- package/dist/esm/ui/confluence-search-modal/basic-filters/hooks/useRecommendation.js +19 -19
- package/dist/esm/ui/issue-like-table/drag-column-preview.compiled.css +1 -1
- package/dist/esm/ui/issue-like-table/drag-column-preview.js +1 -1
- package/dist/esm/ui/issue-like-table/index.js +13 -12
- package/dist/esm/ui/jira-issues-modal/basic-filters/hooks/useFilterOptions.js +25 -23
- package/dist/esm/ui/jira-issues-modal/basic-filters/hooks/useHydrateJqlQuery.js +13 -13
- package/dist/esm/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.js +2 -2
- package/link-datasource.docs.tsx +6 -3
- package/package.json +13 -13
|
@@ -11,28 +11,28 @@ var _linkingCommon = require("@atlaskit/linking-common");
|
|
|
11
11
|
var _cmdbService = require("./cmdbService.utils");
|
|
12
12
|
var getWorkspaceId = exports.getWorkspaceId = /*#__PURE__*/function () {
|
|
13
13
|
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(fireEvent) {
|
|
14
|
-
var url, _workspaceDetailsResp, workspaceDetailsResponse, error;
|
|
15
|
-
return _regenerator.default.wrap(function
|
|
14
|
+
var url, _workspaceDetailsResp, workspaceDetailsResponse, error, _t;
|
|
15
|
+
return _regenerator.default.wrap(function (_context) {
|
|
16
16
|
while (1) switch (_context.prev = _context.next) {
|
|
17
17
|
case 0:
|
|
18
18
|
url = '/rest/servicedesk/cmdb/latest/workspace';
|
|
19
19
|
_context.prev = 1;
|
|
20
|
-
_context.next =
|
|
20
|
+
_context.next = 2;
|
|
21
21
|
return (0, _linkingCommon.request)('get', url, undefined, undefined, [200, 201, 202, 203, 204]);
|
|
22
|
-
case
|
|
22
|
+
case 2:
|
|
23
23
|
workspaceDetailsResponse = _context.sent;
|
|
24
24
|
if ((_workspaceDetailsResp = workspaceDetailsResponse.results) !== null && _workspaceDetailsResp !== void 0 && _workspaceDetailsResp.length) {
|
|
25
|
-
_context.next =
|
|
25
|
+
_context.next = 3;
|
|
26
26
|
break;
|
|
27
27
|
}
|
|
28
28
|
throw new _cmdbService.PermissionError('No workspace results found');
|
|
29
|
-
case
|
|
29
|
+
case 3:
|
|
30
30
|
fireEvent && fireEvent('operational.getWorkspaceId.success', {});
|
|
31
31
|
return _context.abrupt("return", workspaceDetailsResponse.results[0].id);
|
|
32
|
-
case
|
|
33
|
-
_context.prev =
|
|
34
|
-
|
|
35
|
-
error = (0, _cmdbService.mapFetchErrors)(
|
|
32
|
+
case 4:
|
|
33
|
+
_context.prev = 4;
|
|
34
|
+
_t = _context["catch"](1);
|
|
35
|
+
error = (0, _cmdbService.mapFetchErrors)(_t);
|
|
36
36
|
if (error instanceof _cmdbService.FetchError) {
|
|
37
37
|
fireEvent && fireEvent('operational.getWorkspaceId.failed', {
|
|
38
38
|
statusCodeGroup: (0, _cmdbService.getStatusCodeGroup)(error)
|
|
@@ -43,11 +43,11 @@ var getWorkspaceId = exports.getWorkspaceId = /*#__PURE__*/function () {
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
throw error;
|
|
46
|
-
case
|
|
46
|
+
case 5:
|
|
47
47
|
case "end":
|
|
48
48
|
return _context.stop();
|
|
49
49
|
}
|
|
50
|
-
}, _callee, null, [[1,
|
|
50
|
+
}, _callee, null, [[1, 4]]);
|
|
51
51
|
}));
|
|
52
52
|
return function getWorkspaceId(_x) {
|
|
53
53
|
return _ref.apply(this, arguments);
|
|
@@ -55,25 +55,25 @@ var getWorkspaceId = exports.getWorkspaceId = /*#__PURE__*/function () {
|
|
|
55
55
|
}();
|
|
56
56
|
var validateAql = exports.validateAql = /*#__PURE__*/function () {
|
|
57
57
|
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(workspaceId, data, fireEvent) {
|
|
58
|
-
var url, response, error;
|
|
59
|
-
return _regenerator.default.wrap(function
|
|
58
|
+
var url, response, error, _t2;
|
|
59
|
+
return _regenerator.default.wrap(function (_context2) {
|
|
60
60
|
while (1) switch (_context2.prev = _context2.next) {
|
|
61
61
|
case 0:
|
|
62
62
|
url = "/gateway/api/jsm/assets/workspace/".concat(workspaceId, "/v1/aql/validate");
|
|
63
63
|
_context2.prev = 1;
|
|
64
|
-
_context2.next =
|
|
64
|
+
_context2.next = 2;
|
|
65
65
|
return (0, _linkingCommon.request)('post', url, {
|
|
66
66
|
qlQuery: data.qlQuery,
|
|
67
67
|
context: 'SMART_LINKS'
|
|
68
68
|
}, undefined, [200, 201, 202, 203, 204]);
|
|
69
|
-
case
|
|
69
|
+
case 2:
|
|
70
70
|
response = _context2.sent;
|
|
71
71
|
fireEvent && fireEvent('operational.validateAql.success', {});
|
|
72
72
|
return _context2.abrupt("return", response);
|
|
73
|
-
case
|
|
74
|
-
_context2.prev =
|
|
75
|
-
|
|
76
|
-
error = (0, _cmdbService.mapFetchErrors)(
|
|
73
|
+
case 3:
|
|
74
|
+
_context2.prev = 3;
|
|
75
|
+
_t2 = _context2["catch"](1);
|
|
76
|
+
error = (0, _cmdbService.mapFetchErrors)(_t2);
|
|
77
77
|
if (error instanceof _cmdbService.FetchError) {
|
|
78
78
|
fireEvent && fireEvent('operational.validateAql.failed', {
|
|
79
79
|
statusCodeGroup: (0, _cmdbService.getStatusCodeGroup)(error)
|
|
@@ -83,11 +83,11 @@ var validateAql = exports.validateAql = /*#__PURE__*/function () {
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
throw error;
|
|
86
|
-
case
|
|
86
|
+
case 4:
|
|
87
87
|
case "end":
|
|
88
88
|
return _context2.stop();
|
|
89
89
|
}
|
|
90
|
-
}, _callee2, null, [[1,
|
|
90
|
+
}, _callee2, null, [[1, 3]]);
|
|
91
91
|
}));
|
|
92
92
|
return function validateAql(_x2, _x3, _x4) {
|
|
93
93
|
return _ref2.apply(this, arguments);
|
|
@@ -95,22 +95,22 @@ var validateAql = exports.validateAql = /*#__PURE__*/function () {
|
|
|
95
95
|
}();
|
|
96
96
|
var fetchObjectSchema = exports.fetchObjectSchema = /*#__PURE__*/function () {
|
|
97
97
|
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(workspaceId, schemaId, fireEvent) {
|
|
98
|
-
var url, response, error;
|
|
99
|
-
return _regenerator.default.wrap(function
|
|
98
|
+
var url, response, error, _t3;
|
|
99
|
+
return _regenerator.default.wrap(function (_context3) {
|
|
100
100
|
while (1) switch (_context3.prev = _context3.next) {
|
|
101
101
|
case 0:
|
|
102
102
|
url = "/gateway/api/jsm/assets/workspace/".concat(workspaceId, "/v1/objectschema/").concat(schemaId);
|
|
103
103
|
_context3.prev = 1;
|
|
104
|
-
_context3.next =
|
|
104
|
+
_context3.next = 2;
|
|
105
105
|
return (0, _linkingCommon.request)('get', url, undefined, undefined, [200, 201, 202, 203, 204]);
|
|
106
|
-
case
|
|
106
|
+
case 2:
|
|
107
107
|
response = _context3.sent;
|
|
108
108
|
fireEvent && fireEvent('operational.objectSchema.success', {});
|
|
109
109
|
return _context3.abrupt("return", response);
|
|
110
|
-
case
|
|
111
|
-
_context3.prev =
|
|
112
|
-
|
|
113
|
-
error = (0, _cmdbService.mapFetchErrors)(
|
|
110
|
+
case 3:
|
|
111
|
+
_context3.prev = 3;
|
|
112
|
+
_t3 = _context3["catch"](1);
|
|
113
|
+
error = (0, _cmdbService.mapFetchErrors)(_t3);
|
|
114
114
|
if (error instanceof _cmdbService.FetchError) {
|
|
115
115
|
fireEvent && fireEvent('operational.objectSchema.failed', {
|
|
116
116
|
statusCodeGroup: (0, _cmdbService.getStatusCodeGroup)(error)
|
|
@@ -120,11 +120,11 @@ var fetchObjectSchema = exports.fetchObjectSchema = /*#__PURE__*/function () {
|
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
throw error;
|
|
123
|
-
case
|
|
123
|
+
case 4:
|
|
124
124
|
case "end":
|
|
125
125
|
return _context3.stop();
|
|
126
126
|
}
|
|
127
|
-
}, _callee3, null, [[1,
|
|
127
|
+
}, _callee3, null, [[1, 3]]);
|
|
128
128
|
}));
|
|
129
129
|
return function fetchObjectSchema(_x5, _x6, _x7) {
|
|
130
130
|
return _ref3.apply(this, arguments);
|
|
@@ -132,8 +132,8 @@ var fetchObjectSchema = exports.fetchObjectSchema = /*#__PURE__*/function () {
|
|
|
132
132
|
}();
|
|
133
133
|
var fetchObjectSchemas = exports.fetchObjectSchemas = /*#__PURE__*/function () {
|
|
134
134
|
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(workspaceId, query, fireEvent) {
|
|
135
|
-
var queryParams, url, response, error;
|
|
136
|
-
return _regenerator.default.wrap(function
|
|
135
|
+
var queryParams, url, response, error, _t4;
|
|
136
|
+
return _regenerator.default.wrap(function (_context4) {
|
|
137
137
|
while (1) switch (_context4.prev = _context4.next) {
|
|
138
138
|
case 0:
|
|
139
139
|
queryParams = new URLSearchParams();
|
|
@@ -141,17 +141,17 @@ var fetchObjectSchemas = exports.fetchObjectSchemas = /*#__PURE__*/function () {
|
|
|
141
141
|
queryParams.set('includeCounts', 'false');
|
|
142
142
|
query && queryParams.set('query', query);
|
|
143
143
|
url = "/gateway/api/jsm/assets/workspace/".concat(workspaceId, "/v1/objectschema/list?").concat(queryParams);
|
|
144
|
-
_context4.prev =
|
|
145
|
-
_context4.next =
|
|
144
|
+
_context4.prev = 1;
|
|
145
|
+
_context4.next = 2;
|
|
146
146
|
return (0, _linkingCommon.request)('get', url, undefined, undefined, [200, 201, 202, 203, 204]);
|
|
147
|
-
case
|
|
147
|
+
case 2:
|
|
148
148
|
response = _context4.sent;
|
|
149
149
|
fireEvent && fireEvent('operational.objectSchemas.success', {});
|
|
150
150
|
return _context4.abrupt("return", response);
|
|
151
|
-
case
|
|
152
|
-
_context4.prev =
|
|
153
|
-
|
|
154
|
-
error = (0, _cmdbService.mapFetchErrors)(
|
|
151
|
+
case 3:
|
|
152
|
+
_context4.prev = 3;
|
|
153
|
+
_t4 = _context4["catch"](1);
|
|
154
|
+
error = (0, _cmdbService.mapFetchErrors)(_t4);
|
|
155
155
|
if (error instanceof _cmdbService.FetchError) {
|
|
156
156
|
fireEvent && fireEvent('operational.objectSchemas.failed', {
|
|
157
157
|
statusCodeGroup: (0, _cmdbService.getStatusCodeGroup)(error)
|
|
@@ -161,11 +161,11 @@ var fetchObjectSchemas = exports.fetchObjectSchemas = /*#__PURE__*/function () {
|
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
throw error;
|
|
164
|
-
case
|
|
164
|
+
case 4:
|
|
165
165
|
case "end":
|
|
166
166
|
return _context4.stop();
|
|
167
167
|
}
|
|
168
|
-
}, _callee4, null, [[
|
|
168
|
+
}, _callee4, null, [[1, 3]]);
|
|
169
169
|
}));
|
|
170
170
|
return function fetchObjectSchemas(_x8, _x9, _x0) {
|
|
171
171
|
return _ref4.apply(this, arguments);
|
|
@@ -11,8 +11,8 @@ var _hooks = require("@atlaskit/linking-common/hooks");
|
|
|
11
11
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
12
|
var getAccessibleProducts = exports.getAccessibleProducts = /*#__PURE__*/function () {
|
|
13
13
|
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(product) {
|
|
14
|
-
var requestConfig, endpoint, response, res;
|
|
15
|
-
return _regenerator.default.wrap(function
|
|
14
|
+
var requestConfig, endpoint, response, res, _t, _t2, _t3;
|
|
15
|
+
return _regenerator.default.wrap(function (_context) {
|
|
16
16
|
while (1) switch (_context.prev = _context.next) {
|
|
17
17
|
case 0:
|
|
18
18
|
requestConfig = {
|
|
@@ -28,34 +28,34 @@ var getAccessibleProducts = exports.getAccessibleProducts = /*#__PURE__*/functio
|
|
|
28
28
|
})
|
|
29
29
|
};
|
|
30
30
|
endpoint = (0, _platformFeatureFlags.fg)('linking_platform_link_datasource_unit_compliant') ? '/gateway/api/experimental/v2/accessible-products' : '/gateway/api/v2/accessible-products';
|
|
31
|
-
_context.next =
|
|
31
|
+
_context.next = 1;
|
|
32
32
|
return fetch(endpoint, requestConfig);
|
|
33
|
-
case
|
|
33
|
+
case 1:
|
|
34
34
|
response = _context.sent;
|
|
35
35
|
if (!response.ok) {
|
|
36
|
-
_context.next =
|
|
36
|
+
_context.next = 3;
|
|
37
37
|
break;
|
|
38
38
|
}
|
|
39
|
-
_context.next =
|
|
39
|
+
_context.next = 2;
|
|
40
40
|
return response.json();
|
|
41
|
-
case
|
|
41
|
+
case 2:
|
|
42
42
|
res = _context.sent;
|
|
43
43
|
return _context.abrupt("return", (0, _hooks.mapAccessibleProductsToAvailableSites)(res.data));
|
|
44
|
-
case
|
|
45
|
-
|
|
46
|
-
_context.next =
|
|
44
|
+
case 3:
|
|
45
|
+
_t = Error;
|
|
46
|
+
_context.next = 4;
|
|
47
47
|
return response.text();
|
|
48
|
-
case
|
|
49
|
-
|
|
50
|
-
if (
|
|
51
|
-
_context.next =
|
|
48
|
+
case 4:
|
|
49
|
+
_t2 = _context.sent;
|
|
50
|
+
if (_t2) {
|
|
51
|
+
_context.next = 5;
|
|
52
52
|
break;
|
|
53
53
|
}
|
|
54
|
-
|
|
55
|
-
case
|
|
56
|
-
|
|
57
|
-
throw new
|
|
58
|
-
case
|
|
54
|
+
_t2 = 'Something went wrong';
|
|
55
|
+
case 5:
|
|
56
|
+
_t3 = _t2;
|
|
57
|
+
throw new _t(_t3);
|
|
58
|
+
case 6:
|
|
59
59
|
case "end":
|
|
60
60
|
return _context.stop();
|
|
61
61
|
}
|
|
@@ -10,11 +10,11 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
10
10
|
var makeGetJqlAutocompleteData = exports.makeGetJqlAutocompleteData = function makeGetJqlAutocompleteData(cloudId) {
|
|
11
11
|
return /*#__PURE__*/function () {
|
|
12
12
|
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(url) {
|
|
13
|
-
var response, data;
|
|
14
|
-
return _regenerator.default.wrap(function
|
|
13
|
+
var response, data, _t, _t2, _t3;
|
|
14
|
+
return _regenerator.default.wrap(function (_context) {
|
|
15
15
|
while (1) switch (_context.prev = _context.next) {
|
|
16
16
|
case 0:
|
|
17
|
-
_context.next =
|
|
17
|
+
_context.next = 1;
|
|
18
18
|
return fetch("/gateway/api/ex/jira/".concat(cloudId, "/").concat(url), {
|
|
19
19
|
method: 'POST',
|
|
20
20
|
headers: {
|
|
@@ -24,35 +24,35 @@ var makeGetJqlAutocompleteData = exports.makeGetJqlAutocompleteData = function m
|
|
|
24
24
|
includeCollapsedFields: true
|
|
25
25
|
})
|
|
26
26
|
});
|
|
27
|
-
case
|
|
27
|
+
case 1:
|
|
28
28
|
response = _context.sent;
|
|
29
29
|
if (!response.ok) {
|
|
30
|
-
_context.next =
|
|
30
|
+
_context.next = 3;
|
|
31
31
|
break;
|
|
32
32
|
}
|
|
33
|
-
_context.next =
|
|
33
|
+
_context.next = 2;
|
|
34
34
|
return response.json();
|
|
35
|
-
case
|
|
35
|
+
case 2:
|
|
36
36
|
data = _context.sent;
|
|
37
37
|
return _context.abrupt("return", {
|
|
38
38
|
jqlFields: data.visibleFieldNames,
|
|
39
39
|
jqlFunctions: data.visibleFunctionNames
|
|
40
40
|
});
|
|
41
|
-
case
|
|
42
|
-
|
|
43
|
-
_context.next =
|
|
41
|
+
case 3:
|
|
42
|
+
_t = Error;
|
|
43
|
+
_context.next = 4;
|
|
44
44
|
return response.text();
|
|
45
|
-
case
|
|
46
|
-
|
|
47
|
-
if (
|
|
48
|
-
_context.next =
|
|
45
|
+
case 4:
|
|
46
|
+
_t2 = _context.sent;
|
|
47
|
+
if (_t2) {
|
|
48
|
+
_context.next = 5;
|
|
49
49
|
break;
|
|
50
50
|
}
|
|
51
|
-
|
|
52
|
-
case
|
|
53
|
-
|
|
54
|
-
throw new
|
|
55
|
-
case
|
|
51
|
+
_t2 = 'Something went wrong';
|
|
52
|
+
case 5:
|
|
53
|
+
_t3 = _t2;
|
|
54
|
+
throw new _t(_t3);
|
|
55
|
+
case 6:
|
|
56
56
|
case "end":
|
|
57
57
|
return _context.stop();
|
|
58
58
|
}
|
|
@@ -10,38 +10,38 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
10
10
|
var makeGetJqlSuggestionsData = exports.makeGetJqlSuggestionsData = function makeGetJqlSuggestionsData(cloudId) {
|
|
11
11
|
return /*#__PURE__*/function () {
|
|
12
12
|
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(url) {
|
|
13
|
-
var response;
|
|
14
|
-
return _regenerator.default.wrap(function
|
|
13
|
+
var response, _t, _t2, _t3;
|
|
14
|
+
return _regenerator.default.wrap(function (_context) {
|
|
15
15
|
while (1) switch (_context.prev = _context.next) {
|
|
16
16
|
case 0:
|
|
17
|
-
_context.next =
|
|
17
|
+
_context.next = 1;
|
|
18
18
|
return fetch("/gateway/api/ex/jira/".concat(cloudId, "/").concat(url), {
|
|
19
19
|
headers: {
|
|
20
20
|
'content-type': 'application/json'
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
|
-
case
|
|
23
|
+
case 1:
|
|
24
24
|
response = _context.sent;
|
|
25
25
|
if (!response.ok) {
|
|
26
|
-
_context.next =
|
|
26
|
+
_context.next = 2;
|
|
27
27
|
break;
|
|
28
28
|
}
|
|
29
29
|
return _context.abrupt("return", response.json());
|
|
30
|
-
case
|
|
31
|
-
|
|
32
|
-
_context.next =
|
|
30
|
+
case 2:
|
|
31
|
+
_t = Error;
|
|
32
|
+
_context.next = 3;
|
|
33
33
|
return response.text();
|
|
34
|
-
case
|
|
35
|
-
|
|
36
|
-
if (
|
|
37
|
-
_context.next =
|
|
34
|
+
case 3:
|
|
35
|
+
_t2 = _context.sent;
|
|
36
|
+
if (_t2) {
|
|
37
|
+
_context.next = 4;
|
|
38
38
|
break;
|
|
39
39
|
}
|
|
40
|
-
|
|
41
|
-
case
|
|
42
|
-
|
|
43
|
-
throw new
|
|
44
|
-
case
|
|
40
|
+
_t2 = 'Something went wrong';
|
|
41
|
+
case 4:
|
|
42
|
+
_t3 = _t2;
|
|
43
|
+
throw new _t(_t3);
|
|
44
|
+
case 5:
|
|
45
45
|
case "end":
|
|
46
46
|
return _context.stop();
|
|
47
47
|
}
|
|
@@ -20,18 +20,18 @@ var useAvailableSites = exports.useAvailableSites = function useAvailableSites(p
|
|
|
20
20
|
var fetchSiteDisplayNames = /*#__PURE__*/function () {
|
|
21
21
|
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
22
22
|
var sites, sortedAvailableSites;
|
|
23
|
-
return _regenerator.default.wrap(function
|
|
23
|
+
return _regenerator.default.wrap(function (_context) {
|
|
24
24
|
while (1) switch (_context.prev = _context.next) {
|
|
25
25
|
case 0:
|
|
26
|
-
_context.next =
|
|
26
|
+
_context.next = 1;
|
|
27
27
|
return (0, _getAvailableSites.getAccessibleProducts)(product);
|
|
28
|
-
case
|
|
28
|
+
case 1:
|
|
29
29
|
sites = _context.sent;
|
|
30
30
|
sortedAvailableSites = (0, _toConsumableArray2.default)(sites).sort(function (a, b) {
|
|
31
31
|
return a.displayName.localeCompare(b.displayName);
|
|
32
32
|
});
|
|
33
33
|
setAvailableSites(sortedAvailableSites);
|
|
34
|
-
case
|
|
34
|
+
case 2:
|
|
35
35
|
case "end":
|
|
36
36
|
return _context.stop();
|
|
37
37
|
}
|
|
@@ -14,7 +14,7 @@ var AGG_BASE_URL = '/gateway/api/graphql';
|
|
|
14
14
|
var useBasicFilterAGG = exports.useBasicFilterAGG = function useBasicFilterAGG() {
|
|
15
15
|
var requestCall = (0, _react.useCallback)( /*#__PURE__*/function () {
|
|
16
16
|
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(body, headers) {
|
|
17
|
-
return _regenerator.default.wrap(function
|
|
17
|
+
return _regenerator.default.wrap(function (_context) {
|
|
18
18
|
while (1) switch (_context.prev = _context.next) {
|
|
19
19
|
case 0:
|
|
20
20
|
return _context.abrupt("return", (0, _linkingCommon.request)('post', AGG_BASE_URL, body, headers, [200, 201, 202, 203, 204]));
|
|
@@ -73,15 +73,15 @@ var actions = exports.actions = {
|
|
|
73
73
|
discoverActions: function discoverActions(captureError, fireEvent, api, request) {
|
|
74
74
|
return /*#__PURE__*/function () {
|
|
75
75
|
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_ref) {
|
|
76
|
-
var setState, getState, response, _getState, currentActions, currentPermissions, actionsByIntegration, permissions;
|
|
77
|
-
return _regenerator.default.wrap(function
|
|
76
|
+
var setState, getState, response, _getState, currentActions, currentPermissions, actionsByIntegration, permissions, _t;
|
|
77
|
+
return _regenerator.default.wrap(function (_context) {
|
|
78
78
|
while (1) switch (_context.prev = _context.next) {
|
|
79
79
|
case 0:
|
|
80
80
|
setState = _ref.setState, getState = _ref.getState;
|
|
81
81
|
_context.prev = 1;
|
|
82
|
-
_context.next =
|
|
82
|
+
_context.next = 2;
|
|
83
83
|
return api.getDatasourceActionsAndPermissions(request);
|
|
84
|
-
case
|
|
84
|
+
case 2:
|
|
85
85
|
response = _context.sent;
|
|
86
86
|
if ('permissions' in response) {
|
|
87
87
|
_getState = getState(), currentActions = _getState.actionsByIntegration, currentPermissions = _getState.permissions;
|
|
@@ -116,20 +116,20 @@ var actions = exports.actions = {
|
|
|
116
116
|
experience: 'datasource'
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
|
-
_context.next =
|
|
119
|
+
_context.next = 4;
|
|
120
120
|
break;
|
|
121
|
-
case
|
|
122
|
-
_context.prev =
|
|
123
|
-
|
|
121
|
+
case 3:
|
|
122
|
+
_context.prev = 3;
|
|
123
|
+
_t = _context["catch"](1);
|
|
124
124
|
/**
|
|
125
125
|
* captureError was already initialised with integrationKey or datasourceId
|
|
126
126
|
*/
|
|
127
|
-
captureError('actionDiscovery',
|
|
128
|
-
case
|
|
127
|
+
captureError('actionDiscovery', _t);
|
|
128
|
+
case 4:
|
|
129
129
|
case "end":
|
|
130
130
|
return _context.stop();
|
|
131
131
|
}
|
|
132
|
-
}, _callee, null, [[1,
|
|
132
|
+
}, _callee, null, [[1, 3]]);
|
|
133
133
|
}));
|
|
134
134
|
return function (_x) {
|
|
135
135
|
return _ref2.apply(this, arguments);
|
|
@@ -31,7 +31,7 @@ var _utils = require("./utils");
|
|
|
31
31
|
var _excluded = ["as", "style"],
|
|
32
32
|
_excluded2 = ["onChange", "onFocus"],
|
|
33
33
|
_excluded3 = ["isOpen"];
|
|
34
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var
|
|
34
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t2 in e) "default" !== _t2 && {}.hasOwnProperty.call(e, _t2) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t2)) && (i.get || i.set) ? o(f, _t2, i) : f[_t2] = e[_t2]); return f; })(e, t); }
|
|
35
35
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
36
36
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
37
37
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled
|
|
@@ -95,16 +95,16 @@ var AssetsObjectSchemaSelect = exports.AssetsObjectSchemaSelect = function Asset
|
|
|
95
95
|
var loadOptions = /*#__PURE__*/function () {
|
|
96
96
|
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(inputValue) {
|
|
97
97
|
var _yield$fetchObjectSch, objectSchemas;
|
|
98
|
-
return _regenerator.default.wrap(function
|
|
98
|
+
return _regenerator.default.wrap(function (_context) {
|
|
99
99
|
while (1) switch (_context.prev = _context.next) {
|
|
100
100
|
case 0:
|
|
101
|
-
_context.next =
|
|
101
|
+
_context.next = 1;
|
|
102
102
|
return fetchObjectSchemas(inputValue);
|
|
103
|
-
case
|
|
103
|
+
case 1:
|
|
104
104
|
_yield$fetchObjectSch = _context.sent;
|
|
105
105
|
objectSchemas = _yield$fetchObjectSch.objectSchemas;
|
|
106
106
|
return _context.abrupt("return", mapObjectSchemasToOptions(objectSchemas));
|
|
107
|
-
case
|
|
107
|
+
case 2:
|
|
108
108
|
case "end":
|
|
109
109
|
return _context.stop();
|
|
110
110
|
}
|
|
@@ -124,7 +124,7 @@ var AssetsObjectSchemaSelect = exports.AssetsObjectSchemaSelect = function Asset
|
|
|
124
124
|
var debounceTimeout = (0, _react.useRef)(null);
|
|
125
125
|
var handleInputChange = (0, _react.useCallback)( /*#__PURE__*/function () {
|
|
126
126
|
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(newSearchTerm, actionMeta) {
|
|
127
|
-
return _regenerator.default.wrap(function
|
|
127
|
+
return _regenerator.default.wrap(function (_context3) {
|
|
128
128
|
while (1) switch (_context3.prev = _context3.next) {
|
|
129
129
|
case 0:
|
|
130
130
|
if (actionMeta.action === 'input-change' && newSearchTerm !== searchTerm) {
|
|
@@ -133,16 +133,16 @@ var AssetsObjectSchemaSelect = exports.AssetsObjectSchemaSelect = function Asset
|
|
|
133
133
|
clearTimeout(debounceTimeout.current);
|
|
134
134
|
}
|
|
135
135
|
debounceTimeout.current = setTimeout( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
136
|
-
|
|
136
|
+
var _t;
|
|
137
|
+
return _regenerator.default.wrap(function (_context2) {
|
|
137
138
|
while (1) switch (_context2.prev = _context2.next) {
|
|
138
139
|
case 0:
|
|
139
|
-
|
|
140
|
-
_context2.next =
|
|
140
|
+
_t = setOptions;
|
|
141
|
+
_context2.next = 1;
|
|
141
142
|
return debouncedLoadOptions(newSearchTerm);
|
|
142
|
-
case
|
|
143
|
-
_context2.
|
|
144
|
-
|
|
145
|
-
case 5:
|
|
143
|
+
case 1:
|
|
144
|
+
_t(_context2.sent);
|
|
145
|
+
case 2:
|
|
146
146
|
case "end":
|
|
147
147
|
return _context2.stop();
|
|
148
148
|
}
|
|
@@ -23,7 +23,7 @@ var _analytics = require("../../../analytics");
|
|
|
23
23
|
var _useErrorLogger2 = _interopRequireDefault(require("../../../hooks/useErrorLogger"));
|
|
24
24
|
var _messages = require("./messages");
|
|
25
25
|
var _providerAuthRequiredSvg = require("./provider-auth-required-svg");
|
|
26
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var
|
|
26
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t2 in e) "default" !== _t2 && {}.hasOwnProperty.call(e, _t2) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t2)) && (i.get || i.set) ? o(f, _t2, i) : f[_t2] = e[_t2]); return f; })(e, t); }
|
|
27
27
|
var styles = {
|
|
28
28
|
buttonContainer: "_19pkpxbi"
|
|
29
29
|
};
|
|
@@ -53,35 +53,36 @@ var ProviderAuthRequired = exports.ProviderAuthRequired = function ProviderAuthR
|
|
|
53
53
|
}, [fireEvent]);
|
|
54
54
|
var onAuthRequest = /*#__PURE__*/function () {
|
|
55
55
|
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
56
|
-
|
|
56
|
+
var _t;
|
|
57
|
+
return _regenerator.default.wrap(function (_context) {
|
|
57
58
|
while (1) switch (_context.prev = _context.next) {
|
|
58
59
|
case 0:
|
|
59
60
|
_context.prev = 0;
|
|
60
|
-
_context.next =
|
|
61
|
+
_context.next = 1;
|
|
61
62
|
return (0, _outboundAuthFlowClient.auth)(authInfo.url);
|
|
62
|
-
case
|
|
63
|
+
case 1:
|
|
63
64
|
fireEvent('operational.provider.authSuccess', {
|
|
64
65
|
extensionKey: extensionKey,
|
|
65
66
|
experience: 'datasource'
|
|
66
67
|
});
|
|
67
68
|
onAuthSuccess === null || onAuthSuccess === void 0 || onAuthSuccess();
|
|
68
|
-
_context.next =
|
|
69
|
+
_context.next = 3;
|
|
69
70
|
break;
|
|
70
|
-
case
|
|
71
|
-
_context.prev =
|
|
72
|
-
|
|
71
|
+
case 2:
|
|
72
|
+
_context.prev = 2;
|
|
73
|
+
_t = _context["catch"](0);
|
|
73
74
|
fireEvent('operational.provider.authFailure', {
|
|
74
|
-
reason:
|
|
75
|
+
reason: _t instanceof _outboundAuthFlowClient.AuthError && _t.type ? _t.type : null,
|
|
75
76
|
extensionKey: extensionKey,
|
|
76
77
|
experience: 'datasource'
|
|
77
78
|
});
|
|
78
|
-
captureError('ProviderOnAuthRequest',
|
|
79
|
+
captureError('ProviderOnAuthRequest', _t);
|
|
79
80
|
onAuthError === null || onAuthError === void 0 || onAuthError();
|
|
80
|
-
case
|
|
81
|
+
case 3:
|
|
81
82
|
case "end":
|
|
82
83
|
return _context.stop();
|
|
83
84
|
}
|
|
84
|
-
}, _callee, null, [[0,
|
|
85
|
+
}, _callee, null, [[0, 2]]);
|
|
85
86
|
}));
|
|
86
87
|
return function onAuthRequest() {
|
|
87
88
|
return _ref2.apply(this, arguments);
|
|
@@ -143,7 +143,7 @@ var FilterPopupSelect = exports.FilterPopupSelect = function FilterPopupSelect(_
|
|
|
143
143
|
}, [filterName, fireEvent, onInputChange, onMenuClose, searchTerm, selectedOptions.length]);
|
|
144
144
|
var handleInputChange = (0, _react.useCallback)( /*#__PURE__*/function () {
|
|
145
145
|
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(newSearchTerm, actionMeta) {
|
|
146
|
-
return _regenerator.default.wrap(function
|
|
146
|
+
return _regenerator.default.wrap(function (_context) {
|
|
147
147
|
while (1) switch (_context.prev = _context.next) {
|
|
148
148
|
case 0:
|
|
149
149
|
if (actionMeta.action === 'input-change' && newSearchTerm !== searchTerm) {
|
package/dist/cjs/ui/confluence-search-modal/basic-filters/filters/date-range-picker/messages.js
CHANGED
|
@@ -44,7 +44,7 @@ var dateRangeMessages = exports.dateRangeMessages = (0, _reactIntl.defineMessage
|
|
|
44
44
|
dateRangeCustom: {
|
|
45
45
|
id: 'linkDataSource.confluence-search.configmodal.date.range.custom',
|
|
46
46
|
defaultMessage: 'Custom',
|
|
47
|
-
description: '
|
|
47
|
+
description: 'Option to select a custom date range for filtering content by last modified date'
|
|
48
48
|
},
|
|
49
49
|
dateRangeFrom: {
|
|
50
50
|
id: 'linkDataSource.confluence-search.configmodal.date.range.from',
|
|
@@ -54,7 +54,7 @@ var dateRangeMessages = exports.dateRangeMessages = (0, _reactIntl.defineMessage
|
|
|
54
54
|
dateRangeTo: {
|
|
55
55
|
id: 'linkDataSource.confluence-search.configmodal.date.range.to',
|
|
56
56
|
defaultMessage: 'To',
|
|
57
|
-
description: '
|
|
57
|
+
description: 'Label for the end date field in the custom date range filter picker'
|
|
58
58
|
},
|
|
59
59
|
dateRangeDateInputPlaceholder: {
|
|
60
60
|
id: 'linkDataSource.confluence-search.configmodal.date.range.input.placeholder',
|
package/dist/cjs/ui/confluence-search-modal/basic-filters/filters/edited-or-created-by/index.js
CHANGED
|
@@ -55,12 +55,12 @@ var EditedOrCreatedByFilter = function EditedOrCreatedByFilter(_ref) {
|
|
|
55
55
|
handleDebouncedFetchFilterOptions = _useDebouncedCallback2[0];
|
|
56
56
|
var handleInputChange = (0, _react.useCallback)( /*#__PURE__*/function () {
|
|
57
57
|
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(newSearchTerm) {
|
|
58
|
-
return _regenerator.default.wrap(function
|
|
58
|
+
return _regenerator.default.wrap(function (_context) {
|
|
59
59
|
while (1) switch (_context.prev = _context.next) {
|
|
60
60
|
case 0:
|
|
61
61
|
setSearchTerm(newSearchTerm);
|
|
62
62
|
handleDebouncedFetchFilterOptions(newSearchTerm);
|
|
63
|
-
case
|
|
63
|
+
case 1:
|
|
64
64
|
case "end":
|
|
65
65
|
return _context.stop();
|
|
66
66
|
}
|