@atlaskit/link-datasource 0.24.4 → 0.25.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.
Files changed (27) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/hooks/useDatasourceTableState.js +15 -13
  3. package/dist/cjs/ui/datasource-table-view/datasourceTableView.js +1 -4
  4. package/dist/cjs/ui/jira-issues-modal/modal/index.js +7 -9
  5. package/dist/cjs/ui/jira-issues-modal/modal/messages.js +4 -9
  6. package/dist/cjs/ui/table-footer/index.js +6 -5
  7. package/dist/cjs/ui/table-footer/messages.js +3 -8
  8. package/dist/cjs/version.json +1 -1
  9. package/dist/es2019/hooks/useDatasourceTableState.js +9 -7
  10. package/dist/es2019/ui/datasource-table-view/datasourceTableView.js +1 -4
  11. package/dist/es2019/ui/jira-issues-modal/modal/index.js +8 -10
  12. package/dist/es2019/ui/jira-issues-modal/modal/messages.js +4 -9
  13. package/dist/es2019/ui/table-footer/index.js +7 -6
  14. package/dist/es2019/ui/table-footer/messages.js +3 -8
  15. package/dist/es2019/version.json +1 -1
  16. package/dist/esm/hooks/useDatasourceTableState.js +15 -13
  17. package/dist/esm/ui/datasource-table-view/datasourceTableView.js +1 -4
  18. package/dist/esm/ui/jira-issues-modal/modal/index.js +8 -10
  19. package/dist/esm/ui/jira-issues-modal/modal/messages.js +4 -9
  20. package/dist/esm/ui/table-footer/index.js +7 -6
  21. package/dist/esm/ui/table-footer/messages.js +3 -8
  22. package/dist/esm/version.json +1 -1
  23. package/dist/types/ui/jira-issues-modal/modal/messages.d.ts +1 -6
  24. package/dist/types/ui/table-footer/messages.d.ts +1 -6
  25. package/dist/types-ts4.5/ui/jira-issues-modal/modal/messages.d.ts +1 -6
  26. package/dist/types-ts4.5/ui/table-footer/messages.d.ts +1 -6
  27. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/link-datasource
2
2
 
3
+ ## 0.25.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`64bdd3a389b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/64bdd3a389b) - Style changes and translation updates. Also remove IntlProvider from prode code.
8
+
9
+ ## 0.25.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`f427908df3d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f427908df3d) - change the datasource response type to include the meta data section and the data response will wrap in the data section
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+
3
19
  ## 0.24.4
4
20
 
5
21
  ### Patch Changes
@@ -73,7 +73,7 @@ var useDatasourceTableState = function useDatasourceTableState(_ref) {
73
73
  return column.key === col.key;
74
74
  });
75
75
  };
76
- allColumns = result.schema.properties;
76
+ allColumns = result.data.schema.properties;
77
77
  newColumns = allColumns.filter(isColumnNotPresentInCurrentColumnsList);
78
78
  newColumns.length > 0 && setColumns([].concat((0, _toConsumableArray2.default)(columns), (0, _toConsumableArray2.default)(newColumns)));
79
79
  case 9:
@@ -106,7 +106,8 @@ var useDatasourceTableState = function useDatasourceTableState(_ref) {
106
106
  shouldRequestFirstPage,
107
107
  datasourceDataRequest,
108
108
  _yield$getDatasourceD,
109
- data,
109
+ _yield$getDatasourceD2,
110
+ items,
110
111
  nextPageCursor,
111
112
  _totalCount,
112
113
  schema,
@@ -135,17 +136,18 @@ var useDatasourceTableState = function useDatasourceTableState(_ref) {
135
136
  return getDatasourceData(datasourceId, datasourceDataRequest);
136
137
  case 9:
137
138
  _yield$getDatasourceD = _context2.sent;
138
- data = _yield$getDatasourceD.data;
139
- nextPageCursor = _yield$getDatasourceD.nextPageCursor;
140
- _totalCount = _yield$getDatasourceD.totalCount;
141
- schema = _yield$getDatasourceD.schema;
139
+ _yield$getDatasourceD2 = _yield$getDatasourceD.data;
140
+ items = _yield$getDatasourceD2.items;
141
+ nextPageCursor = _yield$getDatasourceD2.nextPageCursor;
142
+ _totalCount = _yield$getDatasourceD2.totalCount;
143
+ schema = _yield$getDatasourceD2.schema;
142
144
  setTotalCount(_totalCount);
143
145
  setNextCursor(nextPageCursor);
144
146
  setResponseItems(function (currentResponseItems) {
145
147
  if (shouldRequestFirstPage) {
146
- return data;
148
+ return items;
147
149
  }
148
- return [].concat((0, _toConsumableArray2.default)(currentResponseItems), (0, _toConsumableArray2.default)(data));
150
+ return [].concat((0, _toConsumableArray2.default)(currentResponseItems), (0, _toConsumableArray2.default)(items));
149
151
  });
150
152
  setStatus('resolved');
151
153
  setHasNextPage(Boolean(nextPageCursor));
@@ -155,17 +157,17 @@ var useDatasourceTableState = function useDatasourceTableState(_ref) {
155
157
  if (isSchemaFromData && schema) {
156
158
  applySchemaProperties(schema.properties);
157
159
  }
158
- _context2.next = 26;
160
+ _context2.next = 27;
159
161
  break;
160
- case 23:
161
- _context2.prev = 23;
162
+ case 24:
163
+ _context2.prev = 24;
162
164
  _context2.t0 = _context2["catch"](6);
163
165
  setStatus('rejected');
164
- case 26:
166
+ case 27:
165
167
  case "end":
166
168
  return _context2.stop();
167
169
  }
168
- }, _callee2, null, [[6, 23]]);
170
+ }, _callee2, null, [[6, 24]]);
169
171
  })), [parameters, fieldKeys, getDatasourceData, datasourceId, nextCursor, applySchemaProperties]);
170
172
  var reset = (0, _react.useCallback)(function () {
171
173
  setStatus('empty');
@@ -16,10 +16,7 @@ var _tableFooter = require("../table-footer");
16
16
  /** @jsx jsx */
17
17
 
18
18
  var TableViewWrapperStyles = (0, _react2.css)({
19
- display: 'flex',
20
- flexDirection: 'column',
21
- width: '100%',
22
- height: '100%',
19
+ display: 'grid',
23
20
  position: 'relative',
24
21
  padding: "var(--ds-space-200, 16px)",
25
22
  paddingBottom: 0,
@@ -262,9 +262,7 @@ var JiraIssuesConfigModal = function JiraIssuesConfigModal(props) {
262
262
  }
263
263
  return issueLikeDataTableView;
264
264
  }, [status, columns.length, resolvedWithNoResults, jqlUrl, retrieveUrlForSmartCardRender, responseItems.length, issueLikeDataTableView]);
265
- return (0, _react2.jsx)(_reactIntlNext.IntlProvider, {
266
- locale: "en"
267
- }, (0, _react2.jsx)(_modalDialog.ModalTransition, null, (0, _react2.jsx)(_modalDialog.default, {
265
+ return (0, _react2.jsx)(_modalDialog.ModalTransition, null, (0, _react2.jsx)(_modalDialog.default, {
268
266
  testId: 'jira-jql-datasource-modal',
269
267
  onClose: onCancel,
270
268
  width: "x-large",
@@ -302,11 +300,11 @@ var JiraIssuesConfigModal = function JiraIssuesConfigModal(props) {
302
300
  css: issueCountStyles
303
301
  }, (0, _react2.jsx)(_reactIntlNext.FormattedNumber, {
304
302
  value: totalCount
305
- }), ' ', (0, _react2.jsx)(_reactIntlNext.FormattedPlural, {
306
- one: (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _messages.modalMessages.singularIssue),
307
- other: (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _messages.modalMessages.pluralIssues),
308
- value: totalCount
309
- })), (0, _react2.jsx)(_standardButton.default, {
303
+ }), ' ', (0, _react2.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _messages.modalMessages.issueText, {
304
+ values: {
305
+ totalCount: totalCount
306
+ }
307
+ }))), (0, _react2.jsx)(_standardButton.default, {
310
308
  appearance: "default",
311
309
  onClick: onCancel
312
310
  }, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _messages.modalMessages.cancelButtonText)), (0, _react2.jsx)(_standardButton.default, {
@@ -314,6 +312,6 @@ var JiraIssuesConfigModal = function JiraIssuesConfigModal(props) {
314
312
  onClick: onInsertPressed,
315
313
  isDisabled: isDisabled,
316
314
  testId: 'jira-jql-datasource-modal--insert-button'
317
- }, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _messages.modalMessages.insertIssuesButtonText))))));
315
+ }, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _messages.modalMessages.insertIssuesButtonText)))));
318
316
  };
319
317
  exports.JiraIssuesConfigModal = JiraIssuesConfigModal;
@@ -41,15 +41,10 @@ var modalMessages = (0, _reactIntlNext.defineMessages)({
41
41
  description: 'Placeholder text that will be placed next to a count of jira issues',
42
42
  defaultMessage: '### Issues'
43
43
  },
44
- singularIssue: {
45
- id: 'linkDataSource.jira-issues.configmodal.singular.issue',
46
- description: 'Text that appears after single issue count number.',
47
- defaultMessage: 'issue'
48
- },
49
- pluralIssues: {
50
- id: 'linkDataSource.jira-issues.configmodal.plural.issues',
51
- description: 'Text that appears after plural issue count number.',
52
- defaultMessage: 'issues'
44
+ issueText: {
45
+ id: 'linkDataSource.jira-issues.configmodal.issue',
46
+ description: 'Text that appears after issue count number.',
47
+ defaultMessage: '{totalCount, plural, one {issue} other {issues}}'
53
48
  }
54
49
  });
55
50
  exports.modalMessages = modalMessages;
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.TableFooter = void 0;
8
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
8
9
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
10
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
10
11
  var _react = require("react");
@@ -48,11 +49,11 @@ var TableFooter = function TableFooter(_ref) {
48
49
  level: "h400"
49
50
  }, (0, _react2.jsx)(_reactIntlNext.FormattedNumber, {
50
51
  value: issueCount
51
- }), ' ', (0, _react2.jsx)(_reactIntlNext.FormattedPlural, {
52
- one: (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _messages.footerMessages.singularIssue),
53
- other: (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _messages.footerMessages.pluralIssues),
54
- value: issueCount
55
- }))), (0, _react2.jsx)(SyncWrapper, null, onRefresh && (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(SyncTextWrapper, {
52
+ }), ' ', (0, _react2.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _messages.footerMessages.issueText, {
53
+ values: {
54
+ issueCount: issueCount
55
+ }
56
+ })))), (0, _react2.jsx)(SyncWrapper, null, onRefresh && (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(SyncTextWrapper, {
56
57
  "data-testid": "sync-text"
57
58
  }, isLoading ? (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _messages.footerMessages.loadingText) : (0, _react2.jsx)(_syncInfo.SyncInfo, {
58
59
  lastSyncTime: lastSyncTime
@@ -6,15 +6,10 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.footerMessages = void 0;
7
7
  var _reactIntlNext = require("react-intl-next");
8
8
  var footerMessages = (0, _reactIntlNext.defineMessages)({
9
- singularIssue: {
9
+ issueText: {
10
10
  id: 'linkDataSource.table-footer.issue',
11
- description: 'Text that appears after single issue count number.',
12
- defaultMessage: 'issue'
13
- },
14
- pluralIssues: {
15
- id: 'linkDataSource.table-footer.issues',
16
- description: 'Text that appears after plural issue count number.',
17
- defaultMessage: 'issues'
11
+ description: 'Text that appears after issue count number.',
12
+ defaultMessage: '{issueCount, plural, one {issue} other {issues}}'
18
13
  },
19
14
  loadingText: {
20
15
  id: 'linkDataSource.table-footer.loading',
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/link-datasource",
3
- "version": "0.24.4",
3
+ "version": "0.25.1",
4
4
  "sideEffects": false
5
5
  }
@@ -25,7 +25,7 @@ export const useDatasourceTableState = ({
25
25
  parameters
26
26
  });
27
27
  const isColumnNotPresentInCurrentColumnsList = col => !columns.find(column => column.key === col.key);
28
- const allColumns = result.schema.properties;
28
+ const allColumns = result.data.schema.properties;
29
29
  const newColumns = allColumns.filter(isColumnNotPresentInCurrentColumnsList);
30
30
  newColumns.length > 0 && setColumns([...columns, ...newColumns]);
31
31
  }, [columns, datasourceId, getDatasourceDetails, parameters]);
@@ -62,18 +62,20 @@ export const useDatasourceTableState = ({
62
62
  setStatus('loading');
63
63
  try {
64
64
  const {
65
- data,
66
- nextPageCursor,
67
- totalCount,
68
- schema
65
+ data: {
66
+ items,
67
+ nextPageCursor,
68
+ totalCount,
69
+ schema
70
+ }
69
71
  } = await getDatasourceData(datasourceId, datasourceDataRequest);
70
72
  setTotalCount(totalCount);
71
73
  setNextCursor(nextPageCursor);
72
74
  setResponseItems(currentResponseItems => {
73
75
  if (shouldRequestFirstPage) {
74
- return data;
76
+ return items;
75
77
  }
76
- return [...currentResponseItems, ...data];
78
+ return [...currentResponseItems, ...items];
77
79
  });
78
80
  setStatus('resolved');
79
81
  setHasNextPage(Boolean(nextPageCursor));
@@ -8,10 +8,7 @@ import { NoResults } from '../common/error-state/no-results';
8
8
  import { IssueLikeDataTableView } from '../issue-like-table';
9
9
  import { TableFooter } from '../table-footer';
10
10
  const TableViewWrapperStyles = css({
11
- display: 'flex',
12
- flexDirection: 'column',
13
- width: '100%',
14
- height: '100%',
11
+ display: 'grid',
15
12
  position: 'relative',
16
13
  padding: "var(--ds-space-200, 16px)",
17
14
  paddingBottom: 0,
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  /** @jsx jsx */
3
3
  import { useCallback, useEffect, useMemo, useState } from 'react';
4
4
  import { css, jsx } from '@emotion/react';
5
- import { FormattedMessage, FormattedNumber, FormattedPlural, IntlProvider, useIntl } from 'react-intl-next';
5
+ import { FormattedMessage, FormattedNumber, useIntl } from 'react-intl-next';
6
6
  import Button from '@atlaskit/button/standard-button';
7
7
  import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
8
8
  import { B400, N0, N800 } from '@atlaskit/theme/colors';
@@ -209,9 +209,7 @@ export const JiraIssuesConfigModal = props => {
209
209
  }
210
210
  return issueLikeDataTableView;
211
211
  }, [status, columns.length, resolvedWithNoResults, jqlUrl, retrieveUrlForSmartCardRender, responseItems.length, issueLikeDataTableView]);
212
- return jsx(IntlProvider, {
213
- locale: "en"
214
- }, jsx(ModalTransition, null, jsx(Modal, {
212
+ return jsx(ModalTransition, null, jsx(Modal, {
215
213
  testId: 'jira-jql-datasource-modal',
216
214
  onClose: onCancel,
217
215
  width: "x-large",
@@ -249,11 +247,11 @@ export const JiraIssuesConfigModal = props => {
249
247
  css: issueCountStyles
250
248
  }, jsx(FormattedNumber, {
251
249
  value: totalCount
252
- }), ' ', jsx(FormattedPlural, {
253
- one: jsx(FormattedMessage, modalMessages.singularIssue),
254
- other: jsx(FormattedMessage, modalMessages.pluralIssues),
255
- value: totalCount
256
- })), jsx(Button, {
250
+ }), ' ', jsx(FormattedMessage, _extends({}, modalMessages.issueText, {
251
+ values: {
252
+ totalCount
253
+ }
254
+ }))), jsx(Button, {
257
255
  appearance: "default",
258
256
  onClick: onCancel
259
257
  }, jsx(FormattedMessage, modalMessages.cancelButtonText)), jsx(Button, {
@@ -261,5 +259,5 @@ export const JiraIssuesConfigModal = props => {
261
259
  onClick: onInsertPressed,
262
260
  isDisabled: isDisabled,
263
261
  testId: 'jira-jql-datasource-modal--insert-button'
264
- }, jsx(FormattedMessage, modalMessages.insertIssuesButtonText))))));
262
+ }, jsx(FormattedMessage, modalMessages.insertIssuesButtonText)))));
265
263
  };
@@ -35,14 +35,9 @@ export const modalMessages = defineMessages({
35
35
  description: 'Placeholder text that will be placed next to a count of jira issues',
36
36
  defaultMessage: '### Issues'
37
37
  },
38
- singularIssue: {
39
- id: 'linkDataSource.jira-issues.configmodal.singular.issue',
40
- description: 'Text that appears after single issue count number.',
41
- defaultMessage: 'issue'
42
- },
43
- pluralIssues: {
44
- id: 'linkDataSource.jira-issues.configmodal.plural.issues',
45
- description: 'Text that appears after plural issue count number.',
46
- defaultMessage: 'issues'
38
+ issueText: {
39
+ id: 'linkDataSource.jira-issues.configmodal.issue',
40
+ description: 'Text that appears after issue count number.',
41
+ defaultMessage: '{totalCount, plural, one {issue} other {issues}}'
47
42
  }
48
43
  });
@@ -1,8 +1,9 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
1
2
  /** @jsx jsx */
2
3
  import { Fragment, useEffect, useState } from 'react';
3
4
  import { jsx } from '@emotion/react';
4
5
  import styled from '@emotion/styled';
5
- import { FormattedMessage, FormattedNumber, FormattedPlural, useIntl } from 'react-intl-next';
6
+ import { FormattedMessage, FormattedNumber, useIntl } from 'react-intl-next';
6
7
  import Button from '@atlaskit/button';
7
8
  import Heading from '@atlaskit/heading';
8
9
  import RefreshIcon from '@atlaskit/icon/glyph/refresh';
@@ -59,11 +60,11 @@ export const TableFooter = ({
59
60
  level: "h400"
60
61
  }, jsx(FormattedNumber, {
61
62
  value: issueCount
62
- }), ' ', jsx(FormattedPlural, {
63
- one: jsx(FormattedMessage, footerMessages.singularIssue),
64
- other: jsx(FormattedMessage, footerMessages.pluralIssues),
65
- value: issueCount
66
- }))), jsx(SyncWrapper, null, onRefresh && jsx(Fragment, null, jsx(SyncTextWrapper, {
63
+ }), ' ', jsx(FormattedMessage, _extends({}, footerMessages.issueText, {
64
+ values: {
65
+ issueCount
66
+ }
67
+ })))), jsx(SyncWrapper, null, onRefresh && jsx(Fragment, null, jsx(SyncTextWrapper, {
67
68
  "data-testid": "sync-text"
68
69
  }, isLoading ? jsx(FormattedMessage, footerMessages.loadingText) : jsx(SyncInfo, {
69
70
  lastSyncTime: lastSyncTime
@@ -1,14 +1,9 @@
1
1
  import { defineMessages } from 'react-intl-next';
2
2
  export const footerMessages = defineMessages({
3
- singularIssue: {
3
+ issueText: {
4
4
  id: 'linkDataSource.table-footer.issue',
5
- description: 'Text that appears after single issue count number.',
6
- defaultMessage: 'issue'
7
- },
8
- pluralIssues: {
9
- id: 'linkDataSource.table-footer.issues',
10
- description: 'Text that appears after plural issue count number.',
11
- defaultMessage: 'issues'
5
+ description: 'Text that appears after issue count number.',
6
+ defaultMessage: '{issueCount, plural, one {issue} other {issues}}'
12
7
  },
13
8
  loadingText: {
14
9
  id: 'linkDataSource.table-footer.loading',
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/link-datasource",
3
- "version": "0.24.4",
3
+ "version": "0.25.1",
4
4
  "sideEffects": false
5
5
  }
@@ -66,7 +66,7 @@ export var useDatasourceTableState = function useDatasourceTableState(_ref) {
66
66
  return column.key === col.key;
67
67
  });
68
68
  };
69
- allColumns = result.schema.properties;
69
+ allColumns = result.data.schema.properties;
70
70
  newColumns = allColumns.filter(isColumnNotPresentInCurrentColumnsList);
71
71
  newColumns.length > 0 && setColumns([].concat(_toConsumableArray(columns), _toConsumableArray(newColumns)));
72
72
  case 9:
@@ -99,7 +99,8 @@ export var useDatasourceTableState = function useDatasourceTableState(_ref) {
99
99
  shouldRequestFirstPage,
100
100
  datasourceDataRequest,
101
101
  _yield$getDatasourceD,
102
- data,
102
+ _yield$getDatasourceD2,
103
+ items,
103
104
  nextPageCursor,
104
105
  _totalCount,
105
106
  schema,
@@ -128,17 +129,18 @@ export var useDatasourceTableState = function useDatasourceTableState(_ref) {
128
129
  return getDatasourceData(datasourceId, datasourceDataRequest);
129
130
  case 9:
130
131
  _yield$getDatasourceD = _context2.sent;
131
- data = _yield$getDatasourceD.data;
132
- nextPageCursor = _yield$getDatasourceD.nextPageCursor;
133
- _totalCount = _yield$getDatasourceD.totalCount;
134
- schema = _yield$getDatasourceD.schema;
132
+ _yield$getDatasourceD2 = _yield$getDatasourceD.data;
133
+ items = _yield$getDatasourceD2.items;
134
+ nextPageCursor = _yield$getDatasourceD2.nextPageCursor;
135
+ _totalCount = _yield$getDatasourceD2.totalCount;
136
+ schema = _yield$getDatasourceD2.schema;
135
137
  setTotalCount(_totalCount);
136
138
  setNextCursor(nextPageCursor);
137
139
  setResponseItems(function (currentResponseItems) {
138
140
  if (shouldRequestFirstPage) {
139
- return data;
141
+ return items;
140
142
  }
141
- return [].concat(_toConsumableArray(currentResponseItems), _toConsumableArray(data));
143
+ return [].concat(_toConsumableArray(currentResponseItems), _toConsumableArray(items));
142
144
  });
143
145
  setStatus('resolved');
144
146
  setHasNextPage(Boolean(nextPageCursor));
@@ -148,17 +150,17 @@ export var useDatasourceTableState = function useDatasourceTableState(_ref) {
148
150
  if (isSchemaFromData && schema) {
149
151
  applySchemaProperties(schema.properties);
150
152
  }
151
- _context2.next = 26;
153
+ _context2.next = 27;
152
154
  break;
153
- case 23:
154
- _context2.prev = 23;
155
+ case 24:
156
+ _context2.prev = 24;
155
157
  _context2.t0 = _context2["catch"](6);
156
158
  setStatus('rejected');
157
- case 26:
159
+ case 27:
158
160
  case "end":
159
161
  return _context2.stop();
160
162
  }
161
- }, _callee2, null, [[6, 23]]);
163
+ }, _callee2, null, [[6, 24]]);
162
164
  })), [parameters, fieldKeys, getDatasourceData, datasourceId, nextCursor, applySchemaProperties]);
163
165
  var reset = useCallback(function () {
164
166
  setStatus('empty');
@@ -8,10 +8,7 @@ import { NoResults } from '../common/error-state/no-results';
8
8
  import { IssueLikeDataTableView } from '../issue-like-table';
9
9
  import { TableFooter } from '../table-footer';
10
10
  var TableViewWrapperStyles = css({
11
- display: 'flex',
12
- flexDirection: 'column',
13
- width: '100%',
14
- height: '100%',
11
+ display: 'grid',
15
12
  position: 'relative',
16
13
  padding: "var(--ds-space-200, 16px)",
17
14
  paddingBottom: 0,
@@ -5,7 +5,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
5
5
  /** @jsx jsx */
6
6
  import { useCallback, useEffect, useMemo, useState } from 'react';
7
7
  import { css, jsx } from '@emotion/react';
8
- import { FormattedMessage, FormattedNumber, FormattedPlural, IntlProvider, useIntl } from 'react-intl-next';
8
+ import { FormattedMessage, FormattedNumber, useIntl } from 'react-intl-next';
9
9
  import Button from '@atlaskit/button/standard-button';
10
10
  import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
11
11
  import { B400, N0, N800 } from '@atlaskit/theme/colors';
@@ -251,9 +251,7 @@ export var JiraIssuesConfigModal = function JiraIssuesConfigModal(props) {
251
251
  }
252
252
  return issueLikeDataTableView;
253
253
  }, [status, columns.length, resolvedWithNoResults, jqlUrl, retrieveUrlForSmartCardRender, responseItems.length, issueLikeDataTableView]);
254
- return jsx(IntlProvider, {
255
- locale: "en"
256
- }, jsx(ModalTransition, null, jsx(Modal, {
254
+ return jsx(ModalTransition, null, jsx(Modal, {
257
255
  testId: 'jira-jql-datasource-modal',
258
256
  onClose: onCancel,
259
257
  width: "x-large",
@@ -291,11 +289,11 @@ export var JiraIssuesConfigModal = function JiraIssuesConfigModal(props) {
291
289
  css: issueCountStyles
292
290
  }, jsx(FormattedNumber, {
293
291
  value: totalCount
294
- }), ' ', jsx(FormattedPlural, {
295
- one: jsx(FormattedMessage, modalMessages.singularIssue),
296
- other: jsx(FormattedMessage, modalMessages.pluralIssues),
297
- value: totalCount
298
- })), jsx(Button, {
292
+ }), ' ', jsx(FormattedMessage, _extends({}, modalMessages.issueText, {
293
+ values: {
294
+ totalCount: totalCount
295
+ }
296
+ }))), jsx(Button, {
299
297
  appearance: "default",
300
298
  onClick: onCancel
301
299
  }, jsx(FormattedMessage, modalMessages.cancelButtonText)), jsx(Button, {
@@ -303,5 +301,5 @@ export var JiraIssuesConfigModal = function JiraIssuesConfigModal(props) {
303
301
  onClick: onInsertPressed,
304
302
  isDisabled: isDisabled,
305
303
  testId: 'jira-jql-datasource-modal--insert-button'
306
- }, jsx(FormattedMessage, modalMessages.insertIssuesButtonText))))));
304
+ }, jsx(FormattedMessage, modalMessages.insertIssuesButtonText)))));
307
305
  };
@@ -35,14 +35,9 @@ export var modalMessages = defineMessages({
35
35
  description: 'Placeholder text that will be placed next to a count of jira issues',
36
36
  defaultMessage: '### Issues'
37
37
  },
38
- singularIssue: {
39
- id: 'linkDataSource.jira-issues.configmodal.singular.issue',
40
- description: 'Text that appears after single issue count number.',
41
- defaultMessage: 'issue'
42
- },
43
- pluralIssues: {
44
- id: 'linkDataSource.jira-issues.configmodal.plural.issues',
45
- description: 'Text that appears after plural issue count number.',
46
- defaultMessage: 'issues'
38
+ issueText: {
39
+ id: 'linkDataSource.jira-issues.configmodal.issue',
40
+ description: 'Text that appears after issue count number.',
41
+ defaultMessage: '{totalCount, plural, one {issue} other {issues}}'
47
42
  }
48
43
  });
@@ -1,3 +1,4 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
1
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
3
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
3
4
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
@@ -5,7 +6,7 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
5
6
  import { Fragment, useEffect, useState } from 'react';
6
7
  import { jsx } from '@emotion/react';
7
8
  import styled from '@emotion/styled';
8
- import { FormattedMessage, FormattedNumber, FormattedPlural, useIntl } from 'react-intl-next';
9
+ import { FormattedMessage, FormattedNumber, useIntl } from 'react-intl-next';
9
10
  import Button from '@atlaskit/button';
10
11
  import Heading from '@atlaskit/heading';
11
12
  import RefreshIcon from '@atlaskit/icon/glyph/refresh';
@@ -41,11 +42,11 @@ export var TableFooter = function TableFooter(_ref) {
41
42
  level: "h400"
42
43
  }, jsx(FormattedNumber, {
43
44
  value: issueCount
44
- }), ' ', jsx(FormattedPlural, {
45
- one: jsx(FormattedMessage, footerMessages.singularIssue),
46
- other: jsx(FormattedMessage, footerMessages.pluralIssues),
47
- value: issueCount
48
- }))), jsx(SyncWrapper, null, onRefresh && jsx(Fragment, null, jsx(SyncTextWrapper, {
45
+ }), ' ', jsx(FormattedMessage, _extends({}, footerMessages.issueText, {
46
+ values: {
47
+ issueCount: issueCount
48
+ }
49
+ })))), jsx(SyncWrapper, null, onRefresh && jsx(Fragment, null, jsx(SyncTextWrapper, {
49
50
  "data-testid": "sync-text"
50
51
  }, isLoading ? jsx(FormattedMessage, footerMessages.loadingText) : jsx(SyncInfo, {
51
52
  lastSyncTime: lastSyncTime
@@ -1,14 +1,9 @@
1
1
  import { defineMessages } from 'react-intl-next';
2
2
  export var footerMessages = defineMessages({
3
- singularIssue: {
3
+ issueText: {
4
4
  id: 'linkDataSource.table-footer.issue',
5
- description: 'Text that appears after single issue count number.',
6
- defaultMessage: 'issue'
7
- },
8
- pluralIssues: {
9
- id: 'linkDataSource.table-footer.issues',
10
- description: 'Text that appears after plural issue count number.',
11
- defaultMessage: 'issues'
5
+ description: 'Text that appears after issue count number.',
6
+ defaultMessage: '{issueCount, plural, one {issue} other {issues}}'
12
7
  },
13
8
  loadingText: {
14
9
  id: 'linkDataSource.table-footer.loading',
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/link-datasource",
3
- "version": "0.24.4",
3
+ "version": "0.25.1",
4
4
  "sideEffects": false
5
5
  }
@@ -34,12 +34,7 @@ export declare const modalMessages: {
34
34
  description: string;
35
35
  defaultMessage: string;
36
36
  };
37
- singularIssue: {
38
- id: string;
39
- description: string;
40
- defaultMessage: string;
41
- };
42
- pluralIssues: {
37
+ issueText: {
43
38
  id: string;
44
39
  description: string;
45
40
  defaultMessage: string;
@@ -1,10 +1,5 @@
1
1
  export declare const footerMessages: {
2
- singularIssue: {
3
- id: string;
4
- description: string;
5
- defaultMessage: string;
6
- };
7
- pluralIssues: {
2
+ issueText: {
8
3
  id: string;
9
4
  description: string;
10
5
  defaultMessage: string;
@@ -34,12 +34,7 @@ export declare const modalMessages: {
34
34
  description: string;
35
35
  defaultMessage: string;
36
36
  };
37
- singularIssue: {
38
- id: string;
39
- description: string;
40
- defaultMessage: string;
41
- };
42
- pluralIssues: {
37
+ issueText: {
43
38
  id: string;
44
39
  description: string;
45
40
  defaultMessage: string;
@@ -1,10 +1,5 @@
1
1
  export declare const footerMessages: {
2
- singularIssue: {
3
- id: string;
4
- description: string;
5
- defaultMessage: string;
6
- };
7
- pluralIssues: {
2
+ issueText: {
8
3
  id: string;
9
4
  description: string;
10
5
  defaultMessage: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-datasource",
3
- "version": "0.24.4",
3
+ "version": "0.25.1",
4
4
  "description": "UI Components to support linking platform dataset feature",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -34,9 +34,9 @@
34
34
  "@atlaskit/icon": "^21.12.0",
35
35
  "@atlaskit/icon-object": "^6.3.0",
36
36
  "@atlaskit/image": "^1.1.0",
37
- "@atlaskit/link-client-extension": "^1.2.1",
37
+ "@atlaskit/link-client-extension": "^1.3.0",
38
38
  "@atlaskit/linking-common": "^3.0.0",
39
- "@atlaskit/linking-types": "^6.0.0",
39
+ "@atlaskit/linking-types": "^7.0.0",
40
40
  "@atlaskit/lozenge": "^11.4.0",
41
41
  "@atlaskit/modal-dialog": "^12.6.0",
42
42
  "@atlaskit/pragmatic-drag-and-drop": "^0.19.0",
@@ -64,7 +64,7 @@
64
64
  },
65
65
  "devDependencies": {
66
66
  "@atlaskit/link-provider": "^1.6.0",
67
- "@atlaskit/link-test-helpers": "^4.0.0",
67
+ "@atlaskit/link-test-helpers": "^4.1.0",
68
68
  "@atlaskit/ssr": "*",
69
69
  "@atlaskit/visual-regression": "*",
70
70
  "@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",