@atlaskit/link-datasource 0.25.0 → 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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
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
+
3
9
  ## 0.25.0
4
10
 
5
11
  ### Minor Changes
@@ -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.25.0",
3
+ "version": "0.25.1",
4
4
  "sideEffects": false
5
5
  }
@@ -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.25.0",
3
+ "version": "0.25.1",
4
4
  "sideEffects": false
5
5
  }
@@ -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.25.0",
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.25.0",
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/"