@atlaskit/smart-card 32.7.6 → 32.7.7

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 (55) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/extractors/flexible/actions/index.js +5 -7
  3. package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/index.js +1 -2
  4. package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/types.js +4 -5
  5. package/dist/cjs/utils/analytics/analytics.js +4 -6
  6. package/dist/cjs/utils/mocks.js +5 -7
  7. package/dist/cjs/view/BlockCard/views/styled.js +1 -1
  8. package/dist/cjs/view/Card/index.js +5 -7
  9. package/dist/cjs/view/EmbedCard/EmbedResizeMessageListener.js +7 -10
  10. package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +1 -1
  11. package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/test-utils.js +10 -12
  12. package/dist/cjs/view/FlexibleCard/components/blocks/utils.js +1 -1
  13. package/dist/cjs/view/FlexibleCard/components/common/atlaskit-icon/index.js +61 -61
  14. package/dist/cjs/view/FlexibleCard/components/elements/badge/index.js +1 -1
  15. package/dist/cjs/view/FlexibleCard/components/elements/utils.js +34 -34
  16. package/dist/cjs/view/FlexibleCard/components/utils.js +5 -5
  17. package/dist/cjs/view/HoverCard/styled.js +1 -1
  18. package/dist/cjs/view/InlineCard/ErroredView/index.js +8 -11
  19. package/dist/cjs/view/InlineCard/ForbiddenView/index.js +10 -13
  20. package/dist/cjs/view/InlineCard/IconAndTitleLayout/index.js +7 -10
  21. package/dist/cjs/view/InlineCard/ResolvedView/index.js +5 -7
  22. package/dist/cjs/view/InlineCard/ResolvingView/index.js +5 -7
  23. package/dist/cjs/view/LinkUrl/index.js +1 -1
  24. package/dist/cjs/view/LinkView/index.js +5 -7
  25. package/dist/es2019/utils/analytics/analytics.js +1 -1
  26. package/dist/es2019/view/BlockCard/views/styled.js +1 -1
  27. package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +1 -1
  28. package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/test-utils.js +3 -3
  29. package/dist/es2019/view/FlexibleCard/components/utils.js +3 -3
  30. package/dist/es2019/view/HoverCard/styled.js +1 -1
  31. package/dist/es2019/view/LinkUrl/index.js +1 -1
  32. package/dist/esm/extractors/flexible/actions/index.js +5 -7
  33. package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/index.js +1 -2
  34. package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/types.js +4 -5
  35. package/dist/esm/utils/analytics/analytics.js +4 -6
  36. package/dist/esm/utils/mocks.js +5 -7
  37. package/dist/esm/view/BlockCard/views/styled.js +1 -1
  38. package/dist/esm/view/Card/index.js +5 -7
  39. package/dist/esm/view/EmbedCard/EmbedResizeMessageListener.js +7 -10
  40. package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +1 -1
  41. package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/test-utils.js +10 -12
  42. package/dist/esm/view/FlexibleCard/components/blocks/utils.js +1 -1
  43. package/dist/esm/view/FlexibleCard/components/common/atlaskit-icon/index.js +61 -61
  44. package/dist/esm/view/FlexibleCard/components/elements/badge/index.js +1 -1
  45. package/dist/esm/view/FlexibleCard/components/elements/utils.js +34 -34
  46. package/dist/esm/view/FlexibleCard/components/utils.js +5 -5
  47. package/dist/esm/view/HoverCard/styled.js +1 -1
  48. package/dist/esm/view/InlineCard/ErroredView/index.js +8 -11
  49. package/dist/esm/view/InlineCard/ForbiddenView/index.js +10 -13
  50. package/dist/esm/view/InlineCard/IconAndTitleLayout/index.js +7 -10
  51. package/dist/esm/view/InlineCard/ResolvedView/index.js +5 -7
  52. package/dist/esm/view/InlineCard/ResolvingView/index.js +5 -7
  53. package/dist/esm/view/LinkUrl/index.js +1 -1
  54. package/dist/esm/view/LinkView/index.js +5 -7
  55. package/package.json +1 -1
@@ -1,12 +1,11 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
3
  import _createClass from "@babel/runtime/helpers/createClass";
4
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
5
- import _inherits from "@babel/runtime/helpers/inherits";
6
4
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
7
5
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
+ import _inherits from "@babel/runtime/helpers/inherits";
8
7
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
8
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
10
9
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
11
10
  import React from 'react';
12
11
  import { FormattedMessage } from 'react-intl-next';
@@ -29,8 +28,6 @@ var FallbackForbiddenIcon = /*#__PURE__*/React.createElement(AKIconWrapper, null
29
28
  testId: "forbidden-view-fallback-icon"
30
29
  }));
31
30
  export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
32
- _inherits(InlineCardForbiddenView, _React$Component);
33
- var _super = _createSuper(InlineCardForbiddenView);
34
31
  function InlineCardForbiddenView() {
35
32
  var _this$props;
36
33
  var _this;
@@ -38,12 +35,12 @@ export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
38
35
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
39
36
  args[_key] = arguments[_key];
40
37
  }
41
- _this = _super.call.apply(_super, [this].concat(args));
42
- _defineProperty(_assertThisInitialized(_this), "frameRef", /*#__PURE__*/React.createRef());
43
- _defineProperty(_assertThisInitialized(_this), "state", {
38
+ _this = _callSuper(this, InlineCardForbiddenView, [].concat(args));
39
+ _defineProperty(_this, "frameRef", /*#__PURE__*/React.createRef());
40
+ _defineProperty(_this, "state", {
44
41
  hasRequestAccessContextMessage: !!((_this$props = _this.props) !== null && _this$props !== void 0 && (_this$props = _this$props.requestAccessContext) !== null && _this$props !== void 0 && _this$props.callToActionMessageKey)
45
42
  });
46
- _defineProperty(_assertThisInitialized(_this), "handleRetry", function (event) {
43
+ _defineProperty(_this, "handleRetry", function (event) {
47
44
  var onAuthorise = _this.props.onAuthorise;
48
45
  event.preventDefault();
49
46
  event.stopPropagation();
@@ -54,7 +51,7 @@ export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
54
51
  (_this$props2 = _this.props) === null || _this$props2 === void 0 || (_this$props2 = _this$props2.requestAccessContext) === null || _this$props2 === void 0 || (_this$props2 = _this$props2.action) === null || _this$props2 === void 0 || _this$props2.promise();
55
52
  }
56
53
  });
57
- _defineProperty(_assertThisInitialized(_this), "renderForbiddenAccessMessage", function () {
54
+ _defineProperty(_this, "renderForbiddenAccessMessage", function () {
58
55
  var _this$props3;
59
56
  if ((_this$props3 = _this.props) !== null && _this$props3 !== void 0 && (_this$props3 = _this$props3.requestAccessContext) !== null && _this$props3 !== void 0 && _this$props3.callToActionMessageKey) {
60
57
  var callToActionMessageKey = _this.props.requestAccessContext.callToActionMessageKey;
@@ -68,7 +65,7 @@ export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
68
65
  return /*#__PURE__*/React.createElement(React.Fragment, null, formattedMessage);
69
66
  }));
70
67
  });
71
- _defineProperty(_assertThisInitialized(_this), "renderActionButton", function () {
68
+ _defineProperty(_this, "renderActionButton", function () {
72
69
  var _this$props$requestAc;
73
70
  var onAuthorise = _this.props.onAuthorise;
74
71
  var ActionButton = withFrameStyleControl(Button, _this.frameRef);
@@ -98,7 +95,8 @@ export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
98
95
  });
99
96
  return _this;
100
97
  }
101
- _createClass(InlineCardForbiddenView, [{
98
+ _inherits(InlineCardForbiddenView, _React$Component);
99
+ return _createClass(InlineCardForbiddenView, [{
102
100
  key: "render",
103
101
  value: function render() {
104
102
  var _this$props4 = this.props,
@@ -129,5 +127,4 @@ export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
129
127
  return content;
130
128
  }
131
129
  }]);
132
- return InlineCardForbiddenView;
133
130
  }(React.Component);
@@ -1,11 +1,10 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
4
- import _inherits from "@babel/runtime/helpers/inherits";
5
3
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
4
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
5
+ import _inherits from "@babel/runtime/helpers/inherits";
7
6
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
7
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
9
8
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
10
9
  import React from 'react';
11
10
  import ImageLoader from 'react-render-image';
@@ -14,16 +13,14 @@ import { Icon, Shimmer } from '../Icon';
14
13
  import { LinkAppearance, NoLinkAppearance } from '../styled';
15
14
  import { EmojiWrapper, IconEmptyWrapper, IconPositionWrapper, IconTitleWrapper, IconWrapper, TitleWrapper, TitleWrapperClassName } from './styled';
16
15
  export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
17
- _inherits(IconAndTitleLayout, _React$Component);
18
- var _super = _createSuper(IconAndTitleLayout);
19
16
  function IconAndTitleLayout() {
20
17
  var _this;
21
18
  _classCallCheck(this, IconAndTitleLayout);
22
19
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
23
20
  args[_key] = arguments[_key];
24
21
  }
25
- _this = _super.call.apply(_super, [this].concat(args));
26
- _defineProperty(_assertThisInitialized(_this), "handleClick", function (event) {
22
+ _this = _callSuper(this, IconAndTitleLayout, [].concat(args));
23
+ _defineProperty(_this, "handleClick", function (event) {
27
24
  var onClick = _this.props.onClick;
28
25
  if (onClick) {
29
26
  event.preventDefault();
@@ -31,7 +28,7 @@ export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
31
28
  onClick(event);
32
29
  }
33
30
  });
34
- _defineProperty(_assertThisInitialized(_this), "handleKeyPress", function (event) {
31
+ _defineProperty(_this, "handleKeyPress", function (event) {
35
32
  var onClick = _this.props.onClick;
36
33
  if (event.key !== ' ' && event.key !== 'Enter') {
37
34
  return;
@@ -44,7 +41,8 @@ export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
44
41
  });
45
42
  return _this;
46
43
  }
47
- _createClass(IconAndTitleLayout, [{
44
+ _inherits(IconAndTitleLayout, _React$Component);
45
+ return _createClass(IconAndTitleLayout, [{
48
46
  key: "renderAtlaskitIcon",
49
47
  value: function renderAtlaskitIcon() {
50
48
  var _this$props = this.props,
@@ -151,7 +149,6 @@ export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
151
149
  );
152
150
  }
153
151
  }]);
154
- return IconAndTitleLayout;
155
152
  }(React.Component);
156
153
  _defineProperty(IconAndTitleLayout, "defaultProps", {
157
154
  rightSideSpacer: true
@@ -1,9 +1,9 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
- import _inherits from "@babel/runtime/helpers/inherits";
4
3
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
4
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
5
+ import _inherits from "@babel/runtime/helpers/inherits";
6
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
7
7
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
8
8
  import React from 'react';
9
9
  import Lozenge from '@atlaskit/lozenge';
@@ -12,13 +12,12 @@ import { Frame } from '../Frame';
12
12
  import { IconAndTitleLayout } from '../IconAndTitleLayout';
13
13
  import { LozengeWrapper } from '../IconAndTitleLayout/styled';
14
14
  export var InlineCardResolvedView = /*#__PURE__*/function (_React$Component) {
15
- _inherits(InlineCardResolvedView, _React$Component);
16
- var _super = _createSuper(InlineCardResolvedView);
17
15
  function InlineCardResolvedView() {
18
16
  _classCallCheck(this, InlineCardResolvedView);
19
- return _super.apply(this, arguments);
17
+ return _callSuper(this, InlineCardResolvedView, arguments);
20
18
  }
21
- _createClass(InlineCardResolvedView, [{
19
+ _inherits(InlineCardResolvedView, _React$Component);
20
+ return _createClass(InlineCardResolvedView, [{
22
21
  key: "renderLozenge",
23
22
  value: function renderLozenge() {
24
23
  var lozenge = this.props.lozenge;
@@ -80,5 +79,4 @@ export var InlineCardResolvedView = /*#__PURE__*/function (_React$Component) {
80
79
  return inlineCardResolvedView;
81
80
  }
82
81
  }]);
83
- return InlineCardResolvedView;
84
82
  }(React.Component);
@@ -1,9 +1,9 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
- import _inherits from "@babel/runtime/helpers/inherits";
4
3
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
4
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
5
+ import _inherits from "@babel/runtime/helpers/inherits";
6
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
7
7
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
8
8
  import React from 'react';
9
9
  import Spinner from '@atlaskit/spinner';
@@ -12,13 +12,12 @@ import { IconAndTitleLayout } from '../IconAndTitleLayout';
12
12
  import { IconTitleWrapper, RightIconPositionWrapper } from '../IconAndTitleLayout/styled';
13
13
  import { SpinnerWrapper } from './styled';
14
14
  export var InlineCardResolvingView = /*#__PURE__*/function (_React$Component) {
15
- _inherits(InlineCardResolvingView, _React$Component);
16
- var _super = _createSuper(InlineCardResolvingView);
17
15
  function InlineCardResolvingView() {
18
16
  _classCallCheck(this, InlineCardResolvingView);
19
- return _super.apply(this, arguments);
17
+ return _callSuper(this, InlineCardResolvingView, arguments);
20
18
  }
21
- _createClass(InlineCardResolvingView, [{
19
+ _inherits(InlineCardResolvingView, _React$Component);
20
+ return _createClass(InlineCardResolvingView, [{
22
21
  key: "render",
23
22
  value: function render() {
24
23
  var _this$props = this.props,
@@ -61,5 +60,4 @@ export var InlineCardResolvingView = /*#__PURE__*/function (_React$Component) {
61
60
  }
62
61
  }
63
62
  }]);
64
- return InlineCardResolvingView;
65
63
  }(React.Component);
@@ -13,7 +13,7 @@ import LinkWarningModal from './LinkWarningModal';
13
13
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
14
14
  var PACKAGE_DATA = {
15
15
  packageName: "@atlaskit/smart-card",
16
- packageVersion: "32.7.6",
16
+ packageVersion: "32.7.7",
17
17
  componentName: 'linkUrl'
18
18
  };
19
19
  var Anchor = withLinkClickedEvent('a');
@@ -1,21 +1,20 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
3
  import _createClass from "@babel/runtime/helpers/createClass";
4
- import _inherits from "@babel/runtime/helpers/inherits";
5
4
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
5
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
6
+ import _inherits from "@babel/runtime/helpers/inherits";
7
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
8
8
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
9
9
  import React from 'react';
10
10
  import { Frame } from '../InlineCard/Frame';
11
11
  export var CardLinkView = /*#__PURE__*/function (_React$PureComponent) {
12
- _inherits(CardLinkView, _React$PureComponent);
13
- var _super = _createSuper(CardLinkView);
14
12
  function CardLinkView() {
15
13
  _classCallCheck(this, CardLinkView);
16
- return _super.apply(this, arguments);
14
+ return _callSuper(this, CardLinkView, arguments);
17
15
  }
18
- _createClass(CardLinkView, [{
16
+ _inherits(CardLinkView, _React$PureComponent);
17
+ return _createClass(CardLinkView, [{
19
18
  key: "render",
20
19
  value: function render() {
21
20
  return /*#__PURE__*/React.createElement(Frame, _extends({
@@ -23,5 +22,4 @@ export var CardLinkView = /*#__PURE__*/function (_React$PureComponent) {
23
22
  }, this.props), this.props.placeholder || this.props.link);
24
23
  }
25
24
  }]);
26
- return CardLinkView;
27
25
  }(React.PureComponent);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "32.7.6",
3
+ "version": "32.7.7",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"