@atlaskit/link-datasource 0.33.10 → 0.33.11

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.33.11
4
+
5
+ ### Patch Changes
6
+
7
+ - [`d6c7bae4615`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d6c7bae4615) - [ux] Insert button correctly displays without plural for single object
8
+
3
9
  ## 0.33.10
4
10
 
5
11
  ### Patch Changes
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.AssetsConfigModal = void 0;
9
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
10
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
11
  var _react = require("react");
11
12
  var _react2 = require("@emotion/react");
@@ -127,7 +128,7 @@ var AssetsConfigModal = function AssetsConfigModal(props) {
127
128
  }
128
129
  });
129
130
  }
130
- }, [aql, datasourceId, onInsert, responseItems.length, retrieveUrlForSmartCardRender, schemaId, workspaceId, visibleColumnKeys]);
131
+ }, [aql, schemaId, workspaceId, retrieveUrlForSmartCardRender, responseItems.length, onInsert, datasourceId, visibleColumnKeys]);
131
132
  var handleOnSearch = (0, _react.useCallback)(function (aql, schemaId) {
132
133
  reset();
133
134
  setAql(aql);
@@ -184,6 +185,10 @@ var AssetsConfigModal = function AssetsConfigModal(props) {
184
185
  onClick: onInsertPressed,
185
186
  isDisabled: isDisabled,
186
187
  testId: 'asset-datasource-modal--insert-button'
187
- }, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _messages.modalMessages.insertIssuesButtonText)))));
188
+ }, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _messages.modalMessages.insertIssuesButtonText, {
189
+ values: {
190
+ objectsCount: responseItems.length
191
+ }
192
+ }))))));
188
193
  };
189
194
  exports.AssetsConfigModal = AssetsConfigModal;
@@ -14,7 +14,7 @@ var modalMessages = (0, _reactIntlNext.defineMessages)({
14
14
  insertIssuesButtonText: {
15
15
  id: 'linkDataSource.assets.configmodal.insertIssuesButtonText',
16
16
  description: 'Button text to insert the displayed content',
17
- defaultMessage: 'Insert objects'
17
+ defaultMessage: 'Insert {objectsCount, plural, one {object} other {objects}}'
18
18
  },
19
19
  insertObjectsTitle: {
20
20
  id: 'linkDataSource.assets.configmodal.insertObjectsTitle',
@@ -344,7 +344,7 @@ var analyticsContextAttributes = {
344
344
  };
345
345
  var analyticsContextData = {
346
346
  packageName: "@atlaskit/link-datasource",
347
- packageVersion: "0.33.10",
347
+ packageVersion: "0.33.11",
348
348
  source: 'datasourceConfigModal'
349
349
  };
350
350
  var contextData = _objectSpread(_objectSpread({}, analyticsContextData), {}, {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/link-datasource",
3
- "version": "0.33.10",
3
+ "version": "0.33.11",
4
4
  "sideEffects": false
5
5
  }
@@ -1,3 +1,4 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
1
2
  /** @jsx jsx */
2
3
  import { useCallback, useEffect, useMemo, useState } from 'react';
3
4
  import { css, jsx } from '@emotion/react';
@@ -105,7 +106,7 @@ export const AssetsConfigModal = props => {
105
106
  }
106
107
  });
107
108
  }
108
- }, [aql, datasourceId, onInsert, responseItems.length, retrieveUrlForSmartCardRender, schemaId, workspaceId, visibleColumnKeys]);
109
+ }, [aql, schemaId, workspaceId, retrieveUrlForSmartCardRender, responseItems.length, onInsert, datasourceId, visibleColumnKeys]);
109
110
  const handleOnSearch = useCallback((aql, schemaId) => {
110
111
  reset();
111
112
  setAql(aql);
@@ -162,5 +163,9 @@ export const AssetsConfigModal = props => {
162
163
  onClick: onInsertPressed,
163
164
  isDisabled: isDisabled,
164
165
  testId: 'asset-datasource-modal--insert-button'
165
- }, jsx(FormattedMessage, modalMessages.insertIssuesButtonText)))));
166
+ }, jsx(FormattedMessage, _extends({}, modalMessages.insertIssuesButtonText, {
167
+ values: {
168
+ objectsCount: responseItems.length
169
+ }
170
+ }))))));
166
171
  };
@@ -8,7 +8,7 @@ export const modalMessages = defineMessages({
8
8
  insertIssuesButtonText: {
9
9
  id: 'linkDataSource.assets.configmodal.insertIssuesButtonText',
10
10
  description: 'Button text to insert the displayed content',
11
- defaultMessage: 'Insert objects'
11
+ defaultMessage: 'Insert {objectsCount, plural, one {object} other {objects}}'
12
12
  },
13
13
  insertObjectsTitle: {
14
14
  id: 'linkDataSource.assets.configmodal.insertObjectsTitle',
@@ -290,7 +290,7 @@ const analyticsContextAttributes = {
290
290
  };
291
291
  const analyticsContextData = {
292
292
  packageName: "@atlaskit/link-datasource",
293
- packageVersion: "0.33.10",
293
+ packageVersion: "0.33.11",
294
294
  source: 'datasourceConfigModal'
295
295
  };
296
296
  const contextData = {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/link-datasource",
3
- "version": "0.33.10",
3
+ "version": "0.33.11",
4
4
  "sideEffects": false
5
5
  }
@@ -1,3 +1,4 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
1
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
3
  /** @jsx jsx */
3
4
  import { useCallback, useEffect, useMemo, useState } from 'react';
@@ -116,7 +117,7 @@ export var AssetsConfigModal = function AssetsConfigModal(props) {
116
117
  }
117
118
  });
118
119
  }
119
- }, [aql, datasourceId, onInsert, responseItems.length, retrieveUrlForSmartCardRender, schemaId, workspaceId, visibleColumnKeys]);
120
+ }, [aql, schemaId, workspaceId, retrieveUrlForSmartCardRender, responseItems.length, onInsert, datasourceId, visibleColumnKeys]);
120
121
  var handleOnSearch = useCallback(function (aql, schemaId) {
121
122
  reset();
122
123
  setAql(aql);
@@ -173,5 +174,9 @@ export var AssetsConfigModal = function AssetsConfigModal(props) {
173
174
  onClick: onInsertPressed,
174
175
  isDisabled: isDisabled,
175
176
  testId: 'asset-datasource-modal--insert-button'
176
- }, jsx(FormattedMessage, modalMessages.insertIssuesButtonText)))));
177
+ }, jsx(FormattedMessage, _extends({}, modalMessages.insertIssuesButtonText, {
178
+ values: {
179
+ objectsCount: responseItems.length
180
+ }
181
+ }))))));
177
182
  };
@@ -8,7 +8,7 @@ export var modalMessages = defineMessages({
8
8
  insertIssuesButtonText: {
9
9
  id: 'linkDataSource.assets.configmodal.insertIssuesButtonText',
10
10
  description: 'Button text to insert the displayed content',
11
- defaultMessage: 'Insert objects'
11
+ defaultMessage: 'Insert {objectsCount, plural, one {object} other {objects}}'
12
12
  },
13
13
  insertObjectsTitle: {
14
14
  id: 'linkDataSource.assets.configmodal.insertObjectsTitle',
@@ -334,7 +334,7 @@ var analyticsContextAttributes = {
334
334
  };
335
335
  var analyticsContextData = {
336
336
  packageName: "@atlaskit/link-datasource",
337
- packageVersion: "0.33.10",
337
+ packageVersion: "0.33.11",
338
338
  source: 'datasourceConfigModal'
339
339
  };
340
340
  var contextData = _objectSpread(_objectSpread({}, analyticsContextData), {}, {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/link-datasource",
3
- "version": "0.33.10",
3
+ "version": "0.33.11",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-datasource",
3
- "version": "0.33.10",
3
+ "version": "0.33.11",
4
4
  "description": "UI Components to support linking platform dataset feature",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"