@atlaskit/link-datasource 1.22.7 → 1.22.8

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.
@@ -43,6 +43,7 @@ const DatasourceTableViewWithoutAnalytics = ({
43
43
  totalCount,
44
44
  loadDatasourceDetails,
45
45
  extensionKey = null,
46
+ providerName,
46
47
  destinationObjectTypes,
47
48
  authDetails
48
49
  } = useDatasourceTableState({
@@ -130,6 +131,7 @@ const DatasourceTableViewWithoutAnalytics = ({
130
131
  return authDetails !== null && authDetails !== void 0 && authDetails.length && authDetails.length > 0 ? jsx(ProviderAuthRequired, {
131
132
  auth: authDetails,
132
133
  extensionKey: extensionKey,
134
+ providerName: providerName,
133
135
  onAuthSuccess: forcedReset,
134
136
  onAuthError: forcedReset
135
137
  }) : jsx(AccessRequired, {
@@ -75,6 +75,10 @@ export var useDatasourceTableState = function useDatasourceTableState(_ref) {
75
75
  _useState28 = _slicedToArray(_useState27, 2),
76
76
  extensionKey = _useState28[0],
77
77
  setExtensionKey = _useState28[1];
78
+ var _useState29 = useState(undefined),
79
+ _useState30 = _slicedToArray(_useState29, 2),
80
+ providerName = _useState30[0],
81
+ setProviderName = _useState30[1];
78
82
  var _useDatasourceClientE = useDatasourceClientExtension(),
79
83
  getDatasourceData = _useDatasourceClientE.getDatasourceData,
80
84
  getDatasourceDetails = _useDatasourceClientE.getDatasourceDetails;
@@ -193,6 +197,7 @@ export var useDatasourceTableState = function useDatasourceTableState(_ref) {
193
197
  _destinationObjectTypes,
194
198
  _extensionKey,
195
199
  auth,
200
+ _providerName,
196
201
  _yield$getDatasourceD5,
197
202
  items,
198
203
  nextPageCursor,
@@ -232,20 +237,22 @@ export var useDatasourceTableState = function useDatasourceTableState(_ref) {
232
237
  _destinationObjectTypes = _yield$getDatasourceD4.destinationObjectTypes;
233
238
  _extensionKey = _yield$getDatasourceD4.extensionKey;
234
239
  auth = _yield$getDatasourceD4.auth;
240
+ _providerName = _yield$getDatasourceD4.providerName;
235
241
  _yield$getDatasourceD5 = _yield$getDatasourceD3.data;
236
242
  items = _yield$getDatasourceD5.items;
237
243
  nextPageCursor = _yield$getDatasourceD5.nextPageCursor;
238
244
  _totalCount = _yield$getDatasourceD5.totalCount;
239
245
  schema = _yield$getDatasourceD5.schema;
240
246
  setExtensionKey(_extensionKey);
247
+ setProviderName(_providerName);
241
248
  if (!(access === 'unauthorized' || access === 'forbidden')) {
242
- _context2.next = 26;
249
+ _context2.next = 28;
243
250
  break;
244
251
  }
245
252
  setStatus(access);
246
253
  setAuthDetails(auth || initialEmptyArray);
247
254
  return _context2.abrupt("return");
248
- case 26:
255
+ case 28:
249
256
  setDestinationObjectTypes(_destinationObjectTypes);
250
257
  setTotalCount(_totalCount);
251
258
  setNextCursor(nextPageCursor);
@@ -277,32 +284,32 @@ export var useDatasourceTableState = function useDatasourceTableState(_ref) {
277
284
  });
278
285
  }
279
286
  setStatus('resolved');
280
- _context2.next = 48;
287
+ _context2.next = 50;
281
288
  break;
282
- case 38:
283
- _context2.prev = 38;
289
+ case 40:
290
+ _context2.prev = 40;
284
291
  _context2.t0 = _context2["catch"](7);
285
292
  captureError('onNextPage', _context2.t0);
286
293
  if (!(_context2.t0 instanceof Response && _context2.t0.status === 401)) {
287
- _context2.next = 44;
294
+ _context2.next = 46;
288
295
  break;
289
296
  }
290
297
  setStatus('unauthorized');
291
298
  return _context2.abrupt("return");
292
- case 44:
299
+ case 46:
293
300
  if (!(_context2.t0 instanceof Response && _context2.t0.status === 403)) {
294
- _context2.next = 47;
301
+ _context2.next = 49;
295
302
  break;
296
303
  }
297
304
  setStatus('forbidden');
298
305
  return _context2.abrupt("return");
299
- case 47:
306
+ case 49:
300
307
  setStatus('rejected');
301
- case 48:
308
+ case 50:
302
309
  case "end":
303
310
  return _context2.stop();
304
311
  }
305
- }, _callee2, null, [[7, 38]]);
312
+ }, _callee2, null, [[7, 40]]);
306
313
  })), [captureError, parameters, fieldKeys, nextCursor, getDatasourceData, datasourceId, responseItems, applySchemaProperties, fireEvent, fullSchema, initialEmptyArray]);
307
314
  var reset = useCallback(function (options) {
308
315
  setResponseItems(initialEmptyArray);
@@ -373,6 +380,7 @@ export var useDatasourceTableState = function useDatasourceTableState(_ref) {
373
380
  defaultVisibleColumnKeys: defaultVisibleColumnKeys,
374
381
  totalCount: totalCount,
375
382
  extensionKey: extensionKey,
383
+ providerName: providerName,
376
384
  destinationObjectTypes: destinationObjectTypes,
377
385
  authDetails: authDetails
378
386
  };
@@ -57,12 +57,12 @@ export var loadingErrorMessages = defineMessages({
57
57
  },
58
58
  authScreenHeaderText: {
59
59
  id: 'linkDataSource.datasource.table.authScreenHeaderText',
60
- defaultMessage: 'Connect your account',
60
+ defaultMessage: 'Connect your {providerName} account',
61
61
  description: 'Header text to be displayed in the auth screen UI.'
62
62
  },
63
63
  authScreenDescriptionText: {
64
64
  id: 'linkDataSource.datasource.table.authScreenDescriptionText',
65
- defaultMessage: 'Connect your account to collaborate on work across Atlassian products.',
65
+ defaultMessage: 'Connect your {providerName} account to collaborate on work across Atlassian products.',
66
66
  description: 'Description text to be displayed in the auth screen UI.'
67
67
  },
68
68
  learnMoreAboutSmartLinks: {