@atlaskit/link-datasource 3.8.4 → 3.8.6

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,22 @@
1
1
  # @atlaskit/link-datasource
2
2
 
3
+ ## 3.8.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [#161638](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/161638)
8
+ [`d2e5e5ce0053d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d2e5e5ce0053d) -
9
+ Use new API of layering without UNSAFE prefix
10
+
11
+ ## 3.8.5
12
+
13
+ ### Patch Changes
14
+
15
+ - [#158223](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/158223)
16
+ [`ab22f74a91062`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ab22f74a91062) -
17
+ The change here adds an optional `text` property for the Datasource Icon type.
18
+ - Updated dependencies
19
+
3
20
  ## 3.8.4
4
21
 
5
22
  ### Patch Changes
@@ -14,7 +14,7 @@ var toTextValue = exports.toTextValue = function toTextValue(typeWithValues) {
14
14
  return (_ref = (_typeWithValues$value = typeWithValues.values) === null || _typeWithValues$value === void 0 ? void 0 : _typeWithValues$value[0]) !== null && _ref !== void 0 ? _ref : '';
15
15
  };
16
16
  var TextEditType = function TextEditType(props) {
17
- return /*#__PURE__*/_react.default.createElement(_layering.UNSAFE_LAYERING, {
17
+ return /*#__PURE__*/_react.default.createElement(_layering.Layering, {
18
18
  isDisabled: false
19
19
  }, /*#__PURE__*/_react.default.createElement(_textfield.default, (0, _extends2.default)({}, props, {
20
20
  autoFocus: true,
@@ -4,9 +4,11 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.default = exports.ICON_TYPE_TEST_ID = void 0;
7
+ exports.default = exports.ICON_TYPE_TEXT_TEST_ID = exports.ICON_TYPE_TEST_ID = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _styled = _interopRequireDefault(require("@emotion/styled"));
10
+ var _primitives = require("@atlaskit/primitives");
11
+ var _text = _interopRequireDefault(require("../text"));
10
12
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
11
13
 
12
14
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
@@ -15,9 +17,17 @@ var IconWrapper = _styled.default.div({
15
17
  alignItems: 'center',
16
18
  justifyContent: 'left'
17
19
  });
20
+ var textWrapperStyles = (0, _primitives.xcss)({
21
+ marginLeft: 'space.100',
22
+ overflow: 'hidden',
23
+ textOverflow: 'ellipsis',
24
+ whiteSpace: 'nowrap'
25
+ });
18
26
  var ICON_TYPE_TEST_ID = exports.ICON_TYPE_TEST_ID = 'link-datasource-render-type--icon';
27
+ var ICON_TYPE_TEXT_TEST_ID = exports.ICON_TYPE_TEXT_TEST_ID = "".concat(ICON_TYPE_TEST_ID, "-text");
19
28
  var IconRenderType = function IconRenderType(_ref) {
20
29
  var label = _ref.label,
30
+ text = _ref.text,
21
31
  source = _ref.source,
22
32
  _ref$testId = _ref.testId,
23
33
  testId = _ref$testId === void 0 ? ICON_TYPE_TEST_ID : _ref$testId;
@@ -31,6 +41,11 @@ var IconRenderType = function IconRenderType(_ref) {
31
41
  minWidth: '20px',
32
42
  maxWidth: '20px'
33
43
  } // having just width: '20px' shrinks it when table width is reduced
34
- }));
44
+ }), text && /*#__PURE__*/_react.default.createElement(_primitives.Box, {
45
+ xcss: textWrapperStyles
46
+ }, /*#__PURE__*/_react.default.createElement(_text.default, {
47
+ testId: ICON_TYPE_TEXT_TEST_ID,
48
+ text: text
49
+ })));
35
50
  };
36
51
  var _default = exports.default = IconRenderType;
@@ -1,13 +1,13 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React from 'react';
3
- import { UNSAFE_LAYERING } from '@atlaskit/layering';
3
+ import { Layering } from '@atlaskit/layering';
4
4
  import Textfield from '@atlaskit/textfield';
5
5
  export const toTextValue = typeWithValues => {
6
6
  var _ref, _typeWithValues$value;
7
7
  return (_ref = (_typeWithValues$value = typeWithValues.values) === null || _typeWithValues$value === void 0 ? void 0 : _typeWithValues$value[0]) !== null && _ref !== void 0 ? _ref : '';
8
8
  };
9
9
  const TextEditType = props => {
10
- return /*#__PURE__*/React.createElement(UNSAFE_LAYERING, {
10
+ return /*#__PURE__*/React.createElement(Layering, {
11
11
  isDisabled: false
12
12
  }, /*#__PURE__*/React.createElement(Textfield, _extends({}, props, {
13
13
  autoFocus: true,
@@ -2,15 +2,25 @@ import React from 'react';
2
2
 
3
3
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
4
4
  import styled from '@emotion/styled';
5
+ import { Box, xcss } from '@atlaskit/primitives';
6
+ import TextRenderType from '../text';
5
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
6
8
  const IconWrapper = styled.div({
7
9
  display: 'flex',
8
10
  alignItems: 'center',
9
11
  justifyContent: 'left'
10
12
  });
13
+ const textWrapperStyles = xcss({
14
+ marginLeft: 'space.100',
15
+ overflow: 'hidden',
16
+ textOverflow: 'ellipsis',
17
+ whiteSpace: 'nowrap'
18
+ });
11
19
  export const ICON_TYPE_TEST_ID = 'link-datasource-render-type--icon';
20
+ export const ICON_TYPE_TEXT_TEST_ID = `${ICON_TYPE_TEST_ID}-text`;
12
21
  const IconRenderType = ({
13
22
  label,
23
+ text,
14
24
  source,
15
25
  testId = ICON_TYPE_TEST_ID
16
26
  }) => {
@@ -24,6 +34,11 @@ const IconRenderType = ({
24
34
  minWidth: '20px',
25
35
  maxWidth: '20px'
26
36
  } // having just width: '20px' shrinks it when table width is reduced
27
- }));
37
+ }), text && /*#__PURE__*/React.createElement(Box, {
38
+ xcss: textWrapperStyles
39
+ }, /*#__PURE__*/React.createElement(TextRenderType, {
40
+ testId: ICON_TYPE_TEXT_TEST_ID,
41
+ text: text
42
+ })));
28
43
  };
29
44
  export default IconRenderType;
@@ -1,13 +1,13 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React from 'react';
3
- import { UNSAFE_LAYERING } from '@atlaskit/layering';
3
+ import { Layering } from '@atlaskit/layering';
4
4
  import Textfield from '@atlaskit/textfield';
5
5
  export var toTextValue = function toTextValue(typeWithValues) {
6
6
  var _ref, _typeWithValues$value;
7
7
  return (_ref = (_typeWithValues$value = typeWithValues.values) === null || _typeWithValues$value === void 0 ? void 0 : _typeWithValues$value[0]) !== null && _ref !== void 0 ? _ref : '';
8
8
  };
9
9
  var TextEditType = function TextEditType(props) {
10
- return /*#__PURE__*/React.createElement(UNSAFE_LAYERING, {
10
+ return /*#__PURE__*/React.createElement(Layering, {
11
11
  isDisabled: false
12
12
  }, /*#__PURE__*/React.createElement(Textfield, _extends({}, props, {
13
13
  autoFocus: true,
@@ -2,15 +2,25 @@ import React from 'react';
2
2
 
3
3
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
4
4
  import styled from '@emotion/styled';
5
+ import { Box, xcss } from '@atlaskit/primitives';
6
+ import TextRenderType from '../text';
5
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
6
8
  var IconWrapper = styled.div({
7
9
  display: 'flex',
8
10
  alignItems: 'center',
9
11
  justifyContent: 'left'
10
12
  });
13
+ var textWrapperStyles = xcss({
14
+ marginLeft: 'space.100',
15
+ overflow: 'hidden',
16
+ textOverflow: 'ellipsis',
17
+ whiteSpace: 'nowrap'
18
+ });
11
19
  export var ICON_TYPE_TEST_ID = 'link-datasource-render-type--icon';
20
+ export var ICON_TYPE_TEXT_TEST_ID = "".concat(ICON_TYPE_TEST_ID, "-text");
12
21
  var IconRenderType = function IconRenderType(_ref) {
13
22
  var label = _ref.label,
23
+ text = _ref.text,
14
24
  source = _ref.source,
15
25
  _ref$testId = _ref.testId,
16
26
  testId = _ref$testId === void 0 ? ICON_TYPE_TEST_ID : _ref$testId;
@@ -24,6 +34,11 @@ var IconRenderType = function IconRenderType(_ref) {
24
34
  minWidth: '20px',
25
35
  maxWidth: '20px'
26
36
  } // having just width: '20px' shrinks it when table width is reduced
27
- }));
37
+ }), text && /*#__PURE__*/React.createElement(Box, {
38
+ xcss: textWrapperStyles
39
+ }, /*#__PURE__*/React.createElement(TextRenderType, {
40
+ testId: ICON_TYPE_TEXT_TEST_ID,
41
+ text: text
42
+ })));
28
43
  };
29
44
  export default IconRenderType;
@@ -4,5 +4,6 @@ interface IconProps extends Icon {
4
4
  testId?: string;
5
5
  }
6
6
  export declare const ICON_TYPE_TEST_ID = "link-datasource-render-type--icon";
7
- declare const IconRenderType: ({ label, source, testId }: IconProps) => JSX.Element;
7
+ export declare const ICON_TYPE_TEXT_TEST_ID = "link-datasource-render-type--icon-text";
8
+ declare const IconRenderType: ({ label, text, source, testId }: IconProps) => JSX.Element;
8
9
  export default IconRenderType;
@@ -4,5 +4,6 @@ interface IconProps extends Icon {
4
4
  testId?: string;
5
5
  }
6
6
  export declare const ICON_TYPE_TEST_ID = "link-datasource-render-type--icon";
7
- declare const IconRenderType: ({ label, source, testId }: IconProps) => JSX.Element;
7
+ export declare const ICON_TYPE_TEXT_TEST_ID = "link-datasource-render-type--icon-text";
8
+ declare const IconRenderType: ({ label, text, source, testId }: IconProps) => JSX.Element;
8
9
  export default IconRenderType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-datasource",
3
- "version": "3.8.4",
3
+ "version": "3.8.6",
4
4
  "description": "UI Components to support linking platform dataset feature",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -41,7 +41,7 @@
41
41
  "@atlaskit/avatar-group": "^10.0.0",
42
42
  "@atlaskit/badge": "^16.4.0",
43
43
  "@atlaskit/button": "^20.3.0",
44
- "@atlaskit/datetime-picker": "^15.7.0",
44
+ "@atlaskit/datetime-picker": "^15.9.0",
45
45
  "@atlaskit/dropdown-menu": "^12.22.0",
46
46
  "@atlaskit/editor-prosemirror": "6.0.0",
47
47
  "@atlaskit/empty-state": "^7.12.0",
@@ -54,12 +54,12 @@
54
54
  "@atlaskit/inline-edit": "^13.7.0",
55
55
  "@atlaskit/intl-messages-provider": "^1.0.0",
56
56
  "@atlaskit/jql-ast": "^3.3.0",
57
- "@atlaskit/jql-editor": "^4.9.0",
57
+ "@atlaskit/jql-editor": "^4.10.0",
58
58
  "@atlaskit/jql-editor-autocomplete-rest": "^2.1.0",
59
59
  "@atlaskit/layering": "^0.7.0",
60
60
  "@atlaskit/link-client-extension": "^2.4.0",
61
61
  "@atlaskit/linking-common": "^6.0.0",
62
- "@atlaskit/linking-types": "^9.4.0",
62
+ "@atlaskit/linking-types": "^9.5.0",
63
63
  "@atlaskit/logo": "^14.3.0",
64
64
  "@atlaskit/lozenge": "^11.12.0",
65
65
  "@atlaskit/modal-dialog": "^12.17.0",
@@ -70,7 +70,7 @@
70
70
  "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.0",
71
71
  "@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll": "^1.2.0",
72
72
  "@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^1.1.0",
73
- "@atlaskit/primitives": "^13.0.0",
73
+ "@atlaskit/primitives": "^13.1.0",
74
74
  "@atlaskit/select": "^18.5.0",
75
75
  "@atlaskit/smart-card": "^30.2.0",
76
76
  "@atlaskit/smart-user-picker": "6.11.1",