@atlaskit/link-datasource 1.24.12 → 1.25.0

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,15 @@
1
1
  # @atlaskit/link-datasource
2
2
 
3
+ ## 1.25.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#87079](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/87079) [`b3f493af070b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b3f493af070b) - [ux] Added optional `color` and `url` field to datasource-types.ts to update the possible properties of Tags (Labels) and how they are rendered.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+
3
13
  ## 1.24.12
4
14
 
5
15
  ### Patch Changes
@@ -6,9 +6,11 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.default = exports.TAG_TYPE_TEST_ID = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
9
10
  var _tag = require("@atlaskit/tag");
10
11
  var TAG_TYPE_TEST_ID = exports.TAG_TYPE_TEST_ID = 'link-datasource-render-type--tag';
11
12
  var TagRenderType = function TagRenderType(_ref) {
13
+ var _tag$color;
12
14
  var tag = _ref.tag,
13
15
  _ref$testId = _ref.testId,
14
16
  testId = _ref$testId === void 0 ? TAG_TYPE_TEST_ID : _ref$testId;
@@ -16,11 +18,16 @@ var TagRenderType = function TagRenderType(_ref) {
16
18
  if (!(text && typeof text === 'string')) {
17
19
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
18
20
  }
19
- return /*#__PURE__*/_react.default.createElement(_tag.SimpleTag, {
21
+ return (0, _platformFeatureFlags.getBooleanFF)('platform.editor-update-tag-link-and-color_x6hcf') ? /*#__PURE__*/_react.default.createElement(_tag.SimpleTag, {
20
22
  text: text,
21
23
  testId: testId,
22
24
  appearance: 'default',
23
- color: 'standard'
25
+ color: (_tag$color = tag === null || tag === void 0 ? void 0 : tag.color) !== null && _tag$color !== void 0 ? _tag$color : 'standard',
26
+ href: tag === null || tag === void 0 ? void 0 : tag.url
27
+ }) : /*#__PURE__*/_react.default.createElement(_tag.SimpleTag, {
28
+ text: text,
29
+ testId: testId,
30
+ appearance: 'default'
24
31
  });
25
32
  };
26
33
  var _default = exports.default = TagRenderType;
@@ -1,19 +1,26 @@
1
1
  import React from 'react';
2
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
2
3
  import { SimpleTag as Tag } from '@atlaskit/tag';
3
4
  export const TAG_TYPE_TEST_ID = 'link-datasource-render-type--tag';
4
5
  const TagRenderType = ({
5
6
  tag,
6
7
  testId = TAG_TYPE_TEST_ID
7
8
  }) => {
9
+ var _tag$color;
8
10
  const text = tag === null || tag === void 0 ? void 0 : tag.text;
9
11
  if (!(text && typeof text === 'string')) {
10
12
  return /*#__PURE__*/React.createElement(React.Fragment, null);
11
13
  }
12
- return /*#__PURE__*/React.createElement(Tag, {
14
+ return getBooleanFF('platform.editor-update-tag-link-and-color_x6hcf') ? /*#__PURE__*/React.createElement(Tag, {
13
15
  text: text,
14
16
  testId: testId,
15
17
  appearance: 'default',
16
- color: 'standard'
18
+ color: (_tag$color = tag === null || tag === void 0 ? void 0 : tag.color) !== null && _tag$color !== void 0 ? _tag$color : 'standard',
19
+ href: tag === null || tag === void 0 ? void 0 : tag.url
20
+ }) : /*#__PURE__*/React.createElement(Tag, {
21
+ text: text,
22
+ testId: testId,
23
+ appearance: 'default'
17
24
  });
18
25
  };
19
26
  export default TagRenderType;
@@ -1,7 +1,9 @@
1
1
  import React from 'react';
2
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
2
3
  import { SimpleTag as Tag } from '@atlaskit/tag';
3
4
  export var TAG_TYPE_TEST_ID = 'link-datasource-render-type--tag';
4
5
  var TagRenderType = function TagRenderType(_ref) {
6
+ var _tag$color;
5
7
  var tag = _ref.tag,
6
8
  _ref$testId = _ref.testId,
7
9
  testId = _ref$testId === void 0 ? TAG_TYPE_TEST_ID : _ref$testId;
@@ -9,11 +11,16 @@ var TagRenderType = function TagRenderType(_ref) {
9
11
  if (!(text && typeof text === 'string')) {
10
12
  return /*#__PURE__*/React.createElement(React.Fragment, null);
11
13
  }
12
- return /*#__PURE__*/React.createElement(Tag, {
14
+ return getBooleanFF('platform.editor-update-tag-link-and-color_x6hcf') ? /*#__PURE__*/React.createElement(Tag, {
13
15
  text: text,
14
16
  testId: testId,
15
17
  appearance: 'default',
16
- color: 'standard'
18
+ color: (_tag$color = tag === null || tag === void 0 ? void 0 : tag.color) !== null && _tag$color !== void 0 ? _tag$color : 'standard',
19
+ href: tag === null || tag === void 0 ? void 0 : tag.url
20
+ }) : /*#__PURE__*/React.createElement(Tag, {
21
+ text: text,
22
+ testId: testId,
23
+ appearance: 'default'
17
24
  });
18
25
  };
19
26
  export default TagRenderType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-datasource",
3
- "version": "1.24.12",
3
+ "version": "1.25.0",
4
4
  "description": "UI Components to support linking platform dataset feature",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -51,7 +51,7 @@
51
51
  "@atlaskit/jql-editor-autocomplete-rest": "^2.0.0",
52
52
  "@atlaskit/link-client-extension": "^1.8.0",
53
53
  "@atlaskit/linking-common": "^5.6.0",
54
- "@atlaskit/linking-types": "^8.7.0",
54
+ "@atlaskit/linking-types": "^8.8.0",
55
55
  "@atlaskit/lozenge": "^11.6.0",
56
56
  "@atlaskit/modal-dialog": "^12.10.0",
57
57
  "@atlaskit/outbound-auth-flow-client": "^3.4.5",
@@ -61,8 +61,8 @@
61
61
  "@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll": "^1.0.0",
62
62
  "@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^1.0.0",
63
63
  "@atlaskit/primitives": "^5.5.0",
64
- "@atlaskit/select": "^17.4.0",
65
- "@atlaskit/smart-card": "^26.51.0",
64
+ "@atlaskit/select": "^17.5.0",
65
+ "@atlaskit/smart-card": "^26.52.0",
66
66
  "@atlaskit/spinner": "^16.0.0",
67
67
  "@atlaskit/tag": "^12.0.0",
68
68
  "@atlaskit/textfield": "6.1.3",
@@ -155,6 +155,9 @@
155
155
  },
156
156
  "platform.linking-platform.datasource.enable-stricter-jql-encoding": {
157
157
  "type": "boolean"
158
+ },
159
+ "platform.editor-update-tag-link-and-color_x6hcf": {
160
+ "type": "boolean"
158
161
  }
159
162
  }
160
163
  }