@atlaskit/smart-card 34.10.2 → 34.10.4

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 (30) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/extractors/common/icon/extractIconFromDocument.js +61 -7
  3. package/dist/cjs/utils/analytics/analytics.js +1 -1
  4. package/dist/cjs/view/EmbedCard/components/ExpandedFrame.compiled.css +50 -0
  5. package/dist/cjs/view/EmbedCard/components/ExpandedFrame.js +70 -7
  6. package/dist/cjs/view/EmbedCard/components/styled.js +22 -15
  7. package/dist/cjs/view/InlineCard/common/action-button/index.js +4 -1
  8. package/dist/cjs/view/LinkUrl/index.js +1 -1
  9. package/dist/cjs/view/common/UnauthorisedViewContent.js +8 -1
  10. package/dist/es2019/extractors/common/icon/extractIconFromDocument.js +61 -6
  11. package/dist/es2019/utils/analytics/analytics.js +1 -1
  12. package/dist/es2019/view/EmbedCard/components/ExpandedFrame.compiled.css +50 -0
  13. package/dist/es2019/view/EmbedCard/components/ExpandedFrame.js +71 -8
  14. package/dist/es2019/view/EmbedCard/components/styled.js +21 -14
  15. package/dist/es2019/view/InlineCard/common/action-button/index.js +6 -1
  16. package/dist/es2019/view/LinkUrl/index.js +1 -1
  17. package/dist/es2019/view/common/UnauthorisedViewContent.js +8 -1
  18. package/dist/esm/extractors/common/icon/extractIconFromDocument.js +61 -6
  19. package/dist/esm/utils/analytics/analytics.js +1 -1
  20. package/dist/esm/view/EmbedCard/components/ExpandedFrame.compiled.css +50 -0
  21. package/dist/esm/view/EmbedCard/components/ExpandedFrame.js +71 -8
  22. package/dist/esm/view/EmbedCard/components/styled.js +21 -14
  23. package/dist/esm/view/InlineCard/common/action-button/index.js +4 -1
  24. package/dist/esm/view/LinkUrl/index.js +1 -1
  25. package/dist/esm/view/common/UnauthorisedViewContent.js +8 -1
  26. package/dist/types/view/EmbedCard/components/styled.d.ts +7 -7
  27. package/dist/types/view/InlineCard/common/action-button/index.d.ts +1 -0
  28. package/dist/types-ts4.5/view/EmbedCard/components/styled.d.ts +7 -7
  29. package/dist/types-ts4.5/view/InlineCard/common/action-button/index.d.ts +1 -0
  30. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 34.10.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#110251](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/110251)
8
+ [`b6adb9244b072`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b6adb9244b072) -
9
+ [ux] Visual refresh of the EmbedCard component
10
+
11
+ ## 34.10.3
12
+
13
+ ### Patch Changes
14
+
15
+ - [#110748](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/110748)
16
+ [`a3f7f14d75b3c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a3f7f14d75b3c) -
17
+ [ux] Update inline card icons
18
+ - Updated dependencies
19
+
3
20
  ## 34.10.2
4
21
 
5
22
  ### Patch Changes
@@ -12,10 +12,64 @@ var _3 = _interopRequireDefault(require("@atlaskit/icon-file-type/glyph/presenta
12
12
  var _4 = _interopRequireDefault(require("@atlaskit/icon-file-type/glyph/spreadsheet/16"));
13
13
  var _pageLiveDoc = _interopRequireDefault(require("@atlaskit/icon-lab/core/page-live-doc"));
14
14
  var _5 = _interopRequireDefault(require("@atlaskit/icon-object/glyph/blog/16"));
15
+ var _fileDocumentFilled = _interopRequireDefault(require("@atlaskit/icon/core/migration/file--document-filled"));
15
16
  var _pageDocumentFilled = _interopRequireDefault(require("@atlaskit/icon/core/migration/page--document-filled"));
16
17
  var _linkExtractors = require("@atlaskit/link-extractors");
18
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
19
+ var _blogIcon = _interopRequireDefault(require("../../../common/ui/icons/blog-icon"));
20
+ var _chartBarIcon = _interopRequireDefault(require("../../../common/ui/icons/chart-bar-icon"));
21
+ var _fileIcon = _interopRequireDefault(require("../../../common/ui/icons/file-icon"));
22
+ var _listBulletIcon = _interopRequireDefault(require("../../../common/ui/icons/list-bullet-icon"));
23
+ var _pageIcon = _interopRequireDefault(require("../../../common/ui/icons/page-icon"));
17
24
  var _utils = require("../../../utils");
18
25
  var _prioritiseIcon = require("./prioritiseIcon");
26
+ // TODO Delete this and rename BlogIconNew to BlogIcon when cleaning platform-smart-card-icon-migration
27
+ var BlogIcon = function BlogIcon(props) {
28
+ if ((0, _platformFeatureFlags.fg)('platform-smart-card-icon-migration')) {
29
+ return /*#__PURE__*/_react.default.createElement(_blogIcon.default, props);
30
+ }
31
+ return /*#__PURE__*/_react.default.createElement(_5.default, props);
32
+ };
33
+
34
+ // TODO Delete this and rename FileIconNew to FileIcon when cleaning platform-smart-card-icon-migration
35
+ var FileIcon = function FileIcon(props) {
36
+ if ((0, _platformFeatureFlags.fg)('platform-smart-card-icon-migration')) {
37
+ return /*#__PURE__*/_react.default.createElement(_fileIcon.default, props);
38
+ }
39
+ return /*#__PURE__*/_react.default.createElement(_2.default, props);
40
+ };
41
+
42
+ // TODO Delete this and rename DocumentIconNew to DocumentIcon when cleaning platform-smart-card-icon-migration
43
+ var DocumentIcon = function DocumentIcon(props) {
44
+ if ((0, _platformFeatureFlags.fg)('platform-smart-card-icon-migration')) {
45
+ return /*#__PURE__*/_react.default.createElement(_pageIcon.default, props);
46
+ }
47
+ return /*#__PURE__*/_react.default.createElement(_.default, props);
48
+ };
49
+
50
+ // TODO Delete this and rename PresentationIconNew to PresentationIcon when cleaning platform-smart-card-icon-migration
51
+ var PresentationIcon = function PresentationIcon(props) {
52
+ if ((0, _platformFeatureFlags.fg)('platform-smart-card-icon-migration')) {
53
+ return /*#__PURE__*/_react.default.createElement(_chartBarIcon.default, props);
54
+ }
55
+ return /*#__PURE__*/_react.default.createElement(_3.default, props);
56
+ };
57
+
58
+ // TODO Delete this and rename SpreadsheetIconNew to SpreadsheetIcon when cleaning platform-smart-card-icon-migration
59
+ var SpreadsheetIcon = function SpreadsheetIcon(props) {
60
+ if ((0, _platformFeatureFlags.fg)('platform-smart-card-icon-migration')) {
61
+ return /*#__PURE__*/_react.default.createElement(_listBulletIcon.default, props);
62
+ }
63
+ return /*#__PURE__*/_react.default.createElement(_4.default, props);
64
+ };
65
+
66
+ // TODO Delete this and rename DocumentFilledIconNew to DocumentFilledIcon when cleaning platform-smart-card-icon-migration
67
+ var DocumentFilledIcon = function DocumentFilledIcon(props) {
68
+ if ((0, _platformFeatureFlags.fg)('platform-smart-card-icon-migration')) {
69
+ return /*#__PURE__*/_react.default.createElement(_fileDocumentFilled.default, props);
70
+ }
71
+ return /*#__PURE__*/_react.default.createElement(_pageDocumentFilled.default, props);
72
+ };
19
73
  /**
20
74
  * Extracts an icon for a document pbject
21
75
  *
@@ -42,35 +96,35 @@ var documentFileFormatToIcon = function documentFileFormatToIcon(opts) {
42
96
  var documentTypeToIcon = function documentTypeToIcon(type, opts) {
43
97
  switch (type) {
44
98
  case 'schema:BlogPosting':
45
- return /*#__PURE__*/_react.default.createElement(_5.default, {
99
+ return /*#__PURE__*/_react.default.createElement(BlogIcon, {
46
100
  label: opts.title || 'blog',
47
101
  testId: "blog-icon"
48
102
  });
49
103
  case 'schema:DigitalDocument':
50
104
  return digitalDocumentToIcon(opts);
51
105
  case 'schema:TextDigitalDocument':
52
- return /*#__PURE__*/_react.default.createElement(_.default, {
106
+ return /*#__PURE__*/_react.default.createElement(DocumentIcon, {
53
107
  label: opts.title || 'document',
54
108
  testId: "document-icon"
55
109
  });
56
110
  case 'schema:PresentationDigitalDocument':
57
- return /*#__PURE__*/_react.default.createElement(_3.default, {
111
+ return /*#__PURE__*/_react.default.createElement(PresentationIcon, {
58
112
  label: opts.title || 'presentation',
59
113
  testId: "presentation-icon"
60
114
  });
61
115
  case 'schema:SpreadsheetDigitalDocument':
62
- return /*#__PURE__*/_react.default.createElement(_4.default, {
116
+ return /*#__PURE__*/_react.default.createElement(SpreadsheetIcon, {
63
117
  label: opts.title || 'spreadsheet',
64
118
  testId: "spreadsheet-icon"
65
119
  });
66
120
  case 'atlassian:Template':
67
- return /*#__PURE__*/_react.default.createElement(_pageDocumentFilled.default, {
121
+ return /*#__PURE__*/_react.default.createElement(DocumentFilledIcon, {
68
122
  color: "currentColor",
69
123
  label: opts.title || 'template',
70
124
  testId: "document-filled-icon"
71
125
  });
72
126
  case 'atlassian:UndefinedLink':
73
- return /*#__PURE__*/_react.default.createElement(_.default, {
127
+ return /*#__PURE__*/_react.default.createElement(DocumentIcon, {
74
128
  label: opts.title || 'undefinedLink',
75
129
  testId: "document-icon"
76
130
  });
@@ -93,7 +147,7 @@ var digitalDocumentToIcon = function digitalDocumentToIcon(opts) {
93
147
  testId: "live-doc-icon"
94
148
  });
95
149
  } else {
96
- return /*#__PURE__*/_react.default.createElement(_2.default, {
150
+ return /*#__PURE__*/_react.default.createElement(FileIcon, {
97
151
  label: opts.title || 'file',
98
152
  testId: "file-icon"
99
153
  });
@@ -11,7 +11,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
11
11
  var context = exports.context = {
12
12
  componentName: 'smart-cards',
13
13
  packageName: "@atlaskit/smart-card",
14
- packageVersion: "34.10.2"
14
+ packageVersion: "34.10.4"
15
15
  };
16
16
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
17
17
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -0,0 +1,50 @@
1
+ ._11c81il0{font:var(--ds-font-heading-xsmall,normal 600 14px/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
2
+ ._14mj1crf:after{border-radius:9pt}
3
+ ._19it1pvm{border:solid 1px var(--ds-border,#091e4224)}
4
+ ._1tqzzgxb:after{outline:1px solid var(--ds-border,#091e4224)}
5
+ ._2rko1y44{border-radius:4px}
6
+ ._hcgvzgxb:hover:after{outline:1px solid var(--ds-border,#091e4224)}
7
+ ._qc5o94zs:after{transition:background .3s,box-shadow .3s}
8
+ ._v56414au{transition:outline .3s}
9
+ ._zulp1b66{gap:var(--ds-space-050,4px)}
10
+ ._zulpu2gc{gap:var(--ds-space-100,8px)}
11
+ ._15l2idpf:after{top:0}
12
+ ._16jlkb7n{flex-grow:1}
13
+ ._18m915vq{overflow-y:hidden}
14
+ ._18m91wug{overflow-y:auto}
15
+ ._18postnw:after{position:absolute}
16
+ ._19bvu2gc{padding-left:var(--ds-space-100,8px)}
17
+ ._19doidpf:after{left:0}
18
+ ._1bqqidpf:after{z-index:0}
19
+ ._1bsb7vkz{width:1pc}
20
+ ._1e0c1txw{display:flex}
21
+ ._1hfk18uv:after{background-color:initial}
22
+ ._1hfkhp5a:after{background-color:var(--ds-surface-raised,#fff)}
23
+ ._1ifiidpf .embed-header{opacity:0}
24
+ ._1ifikb7n .embed-header{opacity:1}
25
+ ._1pbykb7n{z-index:1}
26
+ ._1reo15vq{overflow-x:hidden}
27
+ ._1reo1wug{overflow-x:auto}
28
+ ._1x88idpf:after{bottom:0}
29
+ ._2lx21bp4{flex-direction:column}
30
+ ._32rxidpf:after{right:0}
31
+ ._4cvr1h6o{align-items:center}
32
+ ._4t3i1osq{height:100%}
33
+ ._4t3i7vkz{height:1pc}
34
+ ._4t3igktf{height:20px}
35
+ ._4t3ik5xz{height:27pc}
36
+ ._4tpuhp5a:hover:after{background-color:var(--ds-surface-raised,#fff)}
37
+ ._8x3u92p9:after{box-shadow:0 0 0 3px var(--ds-border-selected,#0c66e4)}
38
+ ._aetrb3bt:after{content:""}
39
+ ._bfhkhp5a{background-color:var(--ds-surface-raised,#fff)}
40
+ ._ca0qu2gc{padding-top:var(--ds-space-100,8px)}
41
+ ._kqswh2mm{position:relative}
42
+ ._n3tdu2gc{padding-bottom:var(--ds-space-100,8px)}
43
+ ._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
44
+ ._u94kidpf:after{flex-grow:0}
45
+ ._uiztglyw{-webkit-user-select:none;-ms-user-select:none;user-select:none}
46
+ ._x148kb7n:hover .embed-header{opacity:1}
47
+ ._1bnxglyw:hover{text-decoration-line:none}
48
+ ._9oik18uv:hover{text-decoration-color:initial}
49
+ ._jf4cnqa1:hover{text-decoration-style:solid}
50
+ ._1jhm1ips:active{outline:8px solid var(--ds-background-selected,#e9f2ff)}
@@ -7,8 +7,10 @@ Object.defineProperty(exports, "__esModule", {
7
7
  value: true
8
8
  });
9
9
  exports.ExpandedFrame = void 0;
10
+ require("./ExpandedFrame.compiled.css");
10
11
  var React = _interopRequireWildcard(require("react"));
11
12
  var _runtime = require("@compiled/react/runtime");
13
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
12
14
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
15
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
14
16
  var _useLinkClicked = require("../../../state/analytics/useLinkClicked");
@@ -45,18 +47,35 @@ var ExpandedFrameNew = function ExpandedFrameNew(_ref) {
45
47
  };
46
48
  var handleMouseDown = (0, _useLinkClicked.useMouseDownEvent)();
47
49
  var renderHeader = function renderHeader() {
50
+ if ((0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1')) {
51
+ return frameStyle !== 'hide' && /*#__PURE__*/React.createElement("div", {
52
+ className: (0, _runtime.ax)([styles.header, "embed-header"])
53
+ }, /*#__PURE__*/React.createElement("div", {
54
+ className: (0, _runtime.ax)([styles.headerIcon])
55
+ }, icon), /*#__PURE__*/React.createElement("div", {
56
+ className: (0, _runtime.ax)([styles.tooltipWrapper])
57
+ }, !isPlaceholder && /*#__PURE__*/React.createElement(_tooltip.default, {
58
+ content: text,
59
+ hideTooltipOnMouseDown: true
60
+ }, /*#__PURE__*/React.createElement("a", {
61
+ href: href,
62
+ onClick: handleClick,
63
+ onMouseDown: handleMouseDown,
64
+ className: (0, _runtime.ax)([styles.headerAnchor])
65
+ }, text))));
66
+ }
48
67
  return (
49
68
  /*#__PURE__*/
50
69
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
51
- React.createElement(_styled.Header, {
70
+ React.createElement(_styled.HeaderOldVisualRefresh, {
52
71
  className: "embed-header",
53
72
  frameStyle: frameStyle
54
- }, /*#__PURE__*/React.createElement(_styled.IconWrapper, {
73
+ }, /*#__PURE__*/React.createElement(_styled.IconWrapperOldVisualRefresh, {
55
74
  isPlaceholder: isPlaceholder
56
- }, !isPlaceholder && icon), /*#__PURE__*/React.createElement(_styled.TooltipWrapper, null, /*#__PURE__*/React.createElement(_tooltip.default, {
75
+ }, !isPlaceholder && icon), /*#__PURE__*/React.createElement(_styled.TooltipWrapperOldVisualRefresh, null, /*#__PURE__*/React.createElement(_tooltip.default, {
57
76
  content: text,
58
77
  hideTooltipOnMouseDown: true
59
- }, /*#__PURE__*/React.createElement(_styled.TextWrapper, {
78
+ }, /*#__PURE__*/React.createElement(_styled.TextWrapperOldVisualRefresh, {
60
79
  isPlaceholder: isPlaceholder
61
80
  }, !isPlaceholder && /*#__PURE__*/React.createElement("a", {
62
81
  href: href,
@@ -65,8 +84,20 @@ var ExpandedFrameNew = function ExpandedFrameNew(_ref) {
65
84
  }, text)))))
66
85
  );
67
86
  };
87
+ var interactive = isInteractive();
88
+ var showBackgroundAlways = frameStyle === 'show' || isSelected && frameStyle !== 'hide';
89
+ var showBackgroundOnHover = interactive && frameStyle !== 'hide';
68
90
  var renderContent = function renderContent() {
69
- return /*#__PURE__*/React.createElement(_styled.Content, {
91
+ if ((0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1')) {
92
+ return /*#__PURE__*/React.createElement("div", {
93
+ "data-testid": "embed-content-wrapper",
94
+ // This fixes an issue with input fields in cross domain iframes (ie. databases and jira fields from different domains)
95
+ // See: HOT-107830
96
+ contentEditable: false,
97
+ className: (0, _runtime.ax)([styles.contentStyle, setOverflow && allowScrollBar && styles.contentOverflowAuto, interactive && !showBackgroundAlways && !showBackgroundOnHover && styles.contentInteractiveActiveBorder])
98
+ }, children);
99
+ }
100
+ return /*#__PURE__*/React.createElement(_styled.ContentOldVisualRefresh, {
70
101
  "data-testid": "embed-content-wrapper",
71
102
  allowScrollBar: allowScrollBar,
72
103
  removeOverflow: !setOverflow,
@@ -79,8 +110,26 @@ var ExpandedFrameNew = function ExpandedFrameNew(_ref) {
79
110
  suppressContentEditableWarning: true
80
111
  }, children);
81
112
  };
113
+ if ((0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1')) {
114
+ return /*#__PURE__*/React.createElement("div", (0, _extends2.default)({
115
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
116
+ className: (0, _runtime.ax)([styles.linkWrapper, inheritDimensions && styles.linkWrapperInheritDimensions, isSelected && frameStyle !== 'hide' && styles.linkWrapperSelected, showBackgroundAlways && styles.linkWrapperBorderAndBackground, showBackgroundOnHover && !showBackgroundAlways && styles.linkWrapperInteractiveNotHidden, _styled.className]),
117
+ style: {
118
+ minWidth: minWidth ? "".concat(minWidth, "px") : '',
119
+ maxWidth: maxWidth ? "".concat(maxWidth, "px") : ''
120
+ },
121
+ "data-testid": testId,
122
+ "data-trello-do-not-use-override": testId
123
+ // Due to limitations of testing library, we can't assert ::after
124
+ ,
125
+ "data-is-selected": isSelected
126
+ }, (isPlaceholder || !href) && {
127
+ 'data-wrapper-type': 'default',
128
+ 'data-is-interactive': isInteractive()
129
+ }), renderHeader(), renderContent());
130
+ }
82
131
  if (!isPlaceholder && href) {
83
- return /*#__PURE__*/React.createElement(_styled.LinkWrapper
132
+ return /*#__PURE__*/React.createElement(_styled.LinkWrapperOldVisualRefresh
84
133
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
85
134
  , {
86
135
  className: _styled.className,
@@ -97,7 +146,7 @@ var ExpandedFrameNew = function ExpandedFrameNew(_ref) {
97
146
  inheritDimensions: inheritDimensions
98
147
  }, renderHeader(), renderContent());
99
148
  } else {
100
- return /*#__PURE__*/React.createElement(_styled.Wrapper
149
+ return /*#__PURE__*/React.createElement(_styled.WrapperOldVisualRefresh
101
150
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
102
151
  , {
103
152
  className: _styled.className,
@@ -120,4 +169,18 @@ var ExpandedFrame = exports.ExpandedFrame = function ExpandedFrame(props) {
120
169
  } else {
121
170
  return /*#__PURE__*/React.createElement(_ExpandedFrameOld.ExpandedFrameOld, props);
122
171
  }
172
+ };
173
+ var styles = {
174
+ linkWrapper: "_zulpu2gc _kqswh2mm _1e0c1txw _2lx21bp4 _4t3ik5xz _ca0qu2gc _u5f3u2gc _n3tdu2gc _19bvu2gc _uiztglyw _qc5o94zs _14mj1crf _aetrb3bt _18postnw _15l2idpf _32rxidpf _1x88idpf _19doidpf _1hfk18uv _1bqqidpf _u94kidpf _1ifiidpf",
175
+ linkWrapperInheritDimensions: "_4t3i1osq",
176
+ linkWrapperSelected: "_8x3u92p9",
177
+ linkWrapperBorderAndBackground: "_1tqzzgxb _1hfkhp5a _1ifikb7n",
178
+ linkWrapperInteractiveNotHidden: "_hcgvzgxb _4tpuhp5a _x148kb7n",
179
+ header: "_zulp1b66 _1e0c1txw _4cvr1h6o _4t3igktf _1pbykb7n",
180
+ tooltipWrapper: "_1reo15vq _18m915vq",
181
+ headerAnchor: "_11c81il0 _9oik18uv _1bnxglyw _jf4cnqa1",
182
+ headerIcon: "_1bsb7vkz _4t3i7vkz",
183
+ contentStyle: "_19it1pvm _2rko1y44 _1reo15vq _18m915vq _v56414au _bfhkhp5a _16jlkb7n _4t3i1osq _1pbykb7n",
184
+ contentInteractiveActiveBorder: "_1jhm1ips",
185
+ contentOverflowAuto: "_1reo1wug _18m91wug"
123
186
  };
@@ -6,7 +6,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
6
6
  Object.defineProperty(exports, "__esModule", {
7
7
  value: true
8
8
  });
9
- exports.embedHeaderHeight = exports.className = exports.Wrapper = exports.TooltipWrapper = exports.Thumbnail = exports.TextWrapper = exports.LinkWrapper = exports.Image = exports.IconWrapper = exports.Header = exports.Content = void 0;
9
+ exports.embedHeaderHeight = exports.className = exports.WrapperOldVisualRefresh = exports.TooltipWrapperOldVisualRefresh = exports.Thumbnail = exports.TextWrapperOldVisualRefresh = exports.LinkWrapperOldVisualRefresh = exports.Image = exports.IconWrapperOldVisualRefresh = exports.HeaderOldVisualRefresh = exports.ContentOldVisualRefresh = void 0;
10
10
  require("./styled.compiled.css");
11
11
  var _react = _interopRequireWildcard(require("react"));
12
12
  var React = _react;
@@ -37,8 +37,9 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
37
37
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
38
38
  var className = exports.className = 'media-card-frame';
39
39
  var embedHeaderHeight = exports.embedHeaderHeight = 32;
40
+ // TODO Delete when cleaning platform-linking-visual-refresh-v1
40
41
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled,@atlaskit/ui-styling-standard/no-exported-styles
41
- var LinkWrapper = exports.LinkWrapper = (0, _react.forwardRef)(function (_ref, __cmplr) {
42
+ var LinkWrapperOldVisualRefresh = exports.LinkWrapperOldVisualRefresh = (0, _react.forwardRef)(function (_ref, __cmplr) {
42
43
  var _ref$as = _ref.as,
43
44
  C = _ref$as === void 0 ? "div" : _ref$as,
44
45
  __cmpls = _ref.style,
@@ -60,11 +61,12 @@ var LinkWrapper = exports.LinkWrapper = (0, _react.forwardRef)(function (_ref, _
60
61
  }));
61
62
  });
62
63
 
64
+ // TODO Delete when cleaning platform-linking-visual-refresh-v1
63
65
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled,@atlaskit/ui-styling-standard/no-exported-styles
64
66
  if (process.env.NODE_ENV !== 'production') {
65
- LinkWrapper.displayName = 'LinkWrapper';
67
+ LinkWrapperOldVisualRefresh.displayName = 'LinkWrapperOldVisualRefresh';
66
68
  }
67
- var Wrapper = exports.Wrapper = (0, _react.forwardRef)(function (_ref2, __cmplr) {
69
+ var WrapperOldVisualRefresh = exports.WrapperOldVisualRefresh = (0, _react.forwardRef)(function (_ref2, __cmplr) {
68
70
  var _ref2$as = _ref2.as,
69
71
  C = _ref2$as === void 0 ? "div" : _ref2$as,
70
72
  __cmpls = _ref2.style,
@@ -86,11 +88,12 @@ var Wrapper = exports.Wrapper = (0, _react.forwardRef)(function (_ref2, __cmplr)
86
88
  }));
87
89
  });
88
90
 
91
+ // TODO Delete when cleaning platform-linking-visual-refresh-v1
89
92
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled,@atlaskit/ui-styling-standard/no-exported-styles
90
93
  if (process.env.NODE_ENV !== 'production') {
91
- Wrapper.displayName = 'Wrapper';
94
+ WrapperOldVisualRefresh.displayName = 'WrapperOldVisualRefresh';
92
95
  }
93
- var Header = exports.Header = (0, _react.forwardRef)(function (_ref3, __cmplr) {
96
+ var HeaderOldVisualRefresh = exports.HeaderOldVisualRefresh = (0, _react.forwardRef)(function (_ref3, __cmplr) {
94
97
  var _ref3$as = _ref3.as,
95
98
  C = _ref3$as === void 0 ? "div" : _ref3$as,
96
99
  __cmpls = _ref3.style,
@@ -104,11 +107,12 @@ var Header = exports.Header = (0, _react.forwardRef)(function (_ref3, __cmplr) {
104
107
  }));
105
108
  });
106
109
 
110
+ // TODO Delete when cleaning platform-linking-visual-refresh-v1
107
111
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled,@atlaskit/ui-styling-standard/no-exported-styles
108
112
  if (process.env.NODE_ENV !== 'production') {
109
- Header.displayName = 'Header';
113
+ HeaderOldVisualRefresh.displayName = 'HeaderOldVisualRefresh';
110
114
  }
111
- var IconWrapper = exports.IconWrapper = (0, _react.forwardRef)(function (_ref4, __cmplr) {
115
+ var IconWrapperOldVisualRefresh = exports.IconWrapperOldVisualRefresh = (0, _react.forwardRef)(function (_ref4, __cmplr) {
112
116
  var _ref4$as = _ref4.as,
113
117
  C = _ref4$as === void 0 ? "div" : _ref4$as,
114
118
  __cmpls = _ref4.style,
@@ -122,11 +126,12 @@ var IconWrapper = exports.IconWrapper = (0, _react.forwardRef)(function (_ref4,
122
126
  }));
123
127
  });
124
128
 
129
+ // TODO Delete when cleaning platform-linking-visual-refresh-v1
125
130
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled,@atlaskit/ui-styling-standard/no-exported-styles
126
131
  if (process.env.NODE_ENV !== 'production') {
127
- IconWrapper.displayName = 'IconWrapper';
132
+ IconWrapperOldVisualRefresh.displayName = 'IconWrapperOldVisualRefresh';
128
133
  }
129
- var TextWrapper = exports.TextWrapper = (0, _react.forwardRef)(function (_ref5, __cmplr) {
134
+ var TextWrapperOldVisualRefresh = exports.TextWrapperOldVisualRefresh = (0, _react.forwardRef)(function (_ref5, __cmplr) {
130
135
  var _ref5$as = _ref5.as,
131
136
  C = _ref5$as === void 0 ? "div" : _ref5$as,
132
137
  __cmpls = _ref5.style,
@@ -140,11 +145,12 @@ var TextWrapper = exports.TextWrapper = (0, _react.forwardRef)(function (_ref5,
140
145
  }));
141
146
  });
142
147
 
148
+ // TODO Delete when cleaning platform-linking-visual-refresh-v1
143
149
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled,@atlaskit/ui-styling-standard/no-exported-styles
144
150
  if (process.env.NODE_ENV !== 'production') {
145
- TextWrapper.displayName = 'TextWrapper';
151
+ TextWrapperOldVisualRefresh.displayName = 'TextWrapperOldVisualRefresh';
146
152
  }
147
- var TooltipWrapper = exports.TooltipWrapper = (0, _react.forwardRef)(function (_ref6, __cmplr) {
153
+ var TooltipWrapperOldVisualRefresh = exports.TooltipWrapperOldVisualRefresh = (0, _react.forwardRef)(function (_ref6, __cmplr) {
148
154
  var _ref6$as = _ref6.as,
149
155
  C = _ref6$as === void 0 ? "div" : _ref6$as,
150
156
  __cmpls = _ref6.style,
@@ -156,14 +162,15 @@ var TooltipWrapper = exports.TooltipWrapper = (0, _react.forwardRef)(function (_
156
162
  }));
157
163
  });
158
164
 
165
+ // TODO Delete when cleaning platform-linking-visual-refresh-v1
159
166
  // NB: `overflow` is kept as `hidden` since
160
167
  // the internal contents of the `iframe` should
161
168
  // manage scrolling behaviour.
162
169
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled,@atlaskit/ui-styling-standard/no-exported-styles
163
170
  if (process.env.NODE_ENV !== 'production') {
164
- TooltipWrapper.displayName = 'TooltipWrapper';
171
+ TooltipWrapperOldVisualRefresh.displayName = 'TooltipWrapperOldVisualRefresh';
165
172
  }
166
- var Content = exports.Content = (0, _react.forwardRef)(function (_ref7, __cmplr) {
173
+ var ContentOldVisualRefresh = exports.ContentOldVisualRefresh = (0, _react.forwardRef)(function (_ref7, __cmplr) {
167
174
  var _ref7$as = _ref7.as,
168
175
  C = _ref7$as === void 0 ? "div" : _ref7$as,
169
176
  __cmpls = _ref7.style,
@@ -179,7 +186,7 @@ var Content = exports.Content = (0, _react.forwardRef)(function (_ref7, __cmplr)
179
186
  }));
180
187
  });
181
188
  if (process.env.NODE_ENV !== 'production') {
182
- Content.displayName = 'Content';
189
+ ContentOldVisualRefresh.displayName = 'ContentOldVisualRefresh';
183
190
  }
184
191
  var getSizeWithUnit = function getSizeWithUnit() {
185
192
  var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '100%';
@@ -19,13 +19,16 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
19
19
  var ActionButton = exports.ActionButton = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
20
20
  var children = _ref.children,
21
21
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
22
+ // `Button transforms `testId` into `data-testid`. We need to transform it back to `testId`
23
+ var testId = props["data-testid"];
22
24
  return /*#__PURE__*/_react.default.createElement(_primitives.Box, (0, _extends2.default)({
23
25
  as: "span",
24
26
  ref: ref,
25
27
  xcss: [actionButtonStyle, !props.disabled && actionButtonNotDisabledStyle]
26
28
  }, props, {
27
29
  "aria-disabled": props.disabled,
28
- role: "button"
30
+ role: "button",
31
+ testId: testId
29
32
  }), /*#__PURE__*/_react.default.createElement(_primitives.Box, {
30
33
  as: "span",
31
34
  xcss: internalButtonStyle
@@ -20,7 +20,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
20
20
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
21
21
  var PACKAGE_DATA = {
22
22
  packageName: "@atlaskit/smart-card",
23
- packageVersion: "34.10.2",
23
+ packageVersion: "34.10.4",
24
24
  componentName: 'linkUrl'
25
25
  };
26
26
  var Anchor = (0, _click.withLinkClickedEvent)('a');
@@ -9,6 +9,8 @@ exports.default = void 0;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
  var _reactIntlNext = require("react-intl-next");
12
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
+ var _primitives = require("@atlaskit/primitives");
12
14
  var _useAnalyticsEvents2 = require("../../common/analytics/generated/use-analytics-events");
13
15
  var _constants = require("../../constants");
14
16
  var _messages = require("../../messages");
@@ -33,7 +35,12 @@ var UnauthorisedViewContent = function UnauthorisedViewContent(_ref) {
33
35
  values: {
34
36
  context: providerName
35
37
  }
36
- })) : /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.messages.connect_unauthorised_account_description_no_provider), ' ', /*#__PURE__*/_react.default.createElement("a", {
38
+ })) : /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.messages.connect_unauthorised_account_description_no_provider), ' ', (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') ? /*#__PURE__*/_react.default.createElement(_primitives.Anchor, {
39
+ href: isProductIntegrationSupported ? _constants.CONTENT_URL_3P_ACCOUNT_AUTH : _constants.CONTENT_URL_SECURITY_AND_PERMISSIONS,
40
+ target: "_blank",
41
+ testId: "".concat(testId, "-learn-more"),
42
+ onClick: handleLearnMoreClick
43
+ }, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, learnMoreMessage)) : /*#__PURE__*/_react.default.createElement("a", {
37
44
  href: isProductIntegrationSupported ? _constants.CONTENT_URL_3P_ACCOUNT_AUTH : _constants.CONTENT_URL_SECURITY_AND_PERMISSIONS,
38
45
  target: "_blank",
39
46
  "data-testid": "".concat(testId, "-learn-more"),
@@ -1,14 +1,69 @@
1
1
  import React from 'react';
2
- import DocumentIcon from '@atlaskit/icon-file-type/glyph/document/16';
3
- import FileIcon from '@atlaskit/icon-file-type/glyph/generic/16';
4
- import PresentationIcon from '@atlaskit/icon-file-type/glyph/presentation/16';
5
- import SpreadsheetIcon from '@atlaskit/icon-file-type/glyph/spreadsheet/16';
2
+ import DocumentIconOld from '@atlaskit/icon-file-type/glyph/document/16';
3
+ import FileIconOld from '@atlaskit/icon-file-type/glyph/generic/16';
4
+ import PresentationIconOld from '@atlaskit/icon-file-type/glyph/presentation/16';
5
+ import SpreadsheetIconOld from '@atlaskit/icon-file-type/glyph/spreadsheet/16';
6
6
  import LiveDocumentIcon from '@atlaskit/icon-lab/core/page-live-doc';
7
- import BlogIcon from '@atlaskit/icon-object/glyph/blog/16';
8
- import DocumentFilledIcon from '@atlaskit/icon/core/migration/page--document-filled';
7
+ import BlogIconOld from '@atlaskit/icon-object/glyph/blog/16';
8
+ import DocumentFilledIconNew from '@atlaskit/icon/core/migration/file--document-filled';
9
+ import DocumentFilledIconOld from '@atlaskit/icon/core/migration/page--document-filled';
9
10
  import { isConfluenceGenerator } from '@atlaskit/link-extractors';
11
+ import { fg } from '@atlaskit/platform-feature-flags';
12
+ import BlogIconNew from '../../../common/ui/icons/blog-icon';
13
+ import PresentationIconNew from '../../../common/ui/icons/chart-bar-icon';
14
+ import FileIconNew from '../../../common/ui/icons/file-icon';
15
+ import SpreadsheetIconNew from '../../../common/ui/icons/list-bullet-icon';
16
+ import DocumentIconNew from '../../../common/ui/icons/page-icon';
10
17
  import { getIconForFileType } from '../../../utils';
11
18
  import { prioritiseIcon } from './prioritiseIcon';
19
+
20
+ // TODO Delete this and rename BlogIconNew to BlogIcon when cleaning platform-smart-card-icon-migration
21
+ const BlogIcon = props => {
22
+ if (fg('platform-smart-card-icon-migration')) {
23
+ return /*#__PURE__*/React.createElement(BlogIconNew, props);
24
+ }
25
+ return /*#__PURE__*/React.createElement(BlogIconOld, props);
26
+ };
27
+
28
+ // TODO Delete this and rename FileIconNew to FileIcon when cleaning platform-smart-card-icon-migration
29
+ const FileIcon = props => {
30
+ if (fg('platform-smart-card-icon-migration')) {
31
+ return /*#__PURE__*/React.createElement(FileIconNew, props);
32
+ }
33
+ return /*#__PURE__*/React.createElement(FileIconOld, props);
34
+ };
35
+
36
+ // TODO Delete this and rename DocumentIconNew to DocumentIcon when cleaning platform-smart-card-icon-migration
37
+ const DocumentIcon = props => {
38
+ if (fg('platform-smart-card-icon-migration')) {
39
+ return /*#__PURE__*/React.createElement(DocumentIconNew, props);
40
+ }
41
+ return /*#__PURE__*/React.createElement(DocumentIconOld, props);
42
+ };
43
+
44
+ // TODO Delete this and rename PresentationIconNew to PresentationIcon when cleaning platform-smart-card-icon-migration
45
+ const PresentationIcon = props => {
46
+ if (fg('platform-smart-card-icon-migration')) {
47
+ return /*#__PURE__*/React.createElement(PresentationIconNew, props);
48
+ }
49
+ return /*#__PURE__*/React.createElement(PresentationIconOld, props);
50
+ };
51
+
52
+ // TODO Delete this and rename SpreadsheetIconNew to SpreadsheetIcon when cleaning platform-smart-card-icon-migration
53
+ const SpreadsheetIcon = props => {
54
+ if (fg('platform-smart-card-icon-migration')) {
55
+ return /*#__PURE__*/React.createElement(SpreadsheetIconNew, props);
56
+ }
57
+ return /*#__PURE__*/React.createElement(SpreadsheetIconOld, props);
58
+ };
59
+
60
+ // TODO Delete this and rename DocumentFilledIconNew to DocumentFilledIcon when cleaning platform-smart-card-icon-migration
61
+ const DocumentFilledIcon = props => {
62
+ if (fg('platform-smart-card-icon-migration')) {
63
+ return /*#__PURE__*/React.createElement(DocumentFilledIconNew, props);
64
+ }
65
+ return /*#__PURE__*/React.createElement(DocumentFilledIconOld, props);
66
+ };
12
67
  /**
13
68
  * Extracts an icon for a document pbject
14
69
  *
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
2
2
  export const context = {
3
3
  componentName: 'smart-cards',
4
4
  packageName: "@atlaskit/smart-card",
5
- packageVersion: "34.10.2"
5
+ packageVersion: "34.10.4"
6
6
  };
7
7
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
8
8
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -0,0 +1,50 @@
1
+ ._11c81il0{font:var(--ds-font-heading-xsmall,normal 600 14px/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
2
+ ._14mj1crf:after{border-radius:9pt}
3
+ ._19it1pvm{border:solid 1px var(--ds-border,#091e4224)}
4
+ ._1tqzzgxb:after{outline:1px solid var(--ds-border,#091e4224)}
5
+ ._2rko1y44{border-radius:4px}
6
+ ._hcgvzgxb:hover:after{outline:1px solid var(--ds-border,#091e4224)}
7
+ ._qc5o94zs:after{transition:background .3s,box-shadow .3s}
8
+ ._v56414au{transition:outline .3s}
9
+ ._zulp1b66{gap:var(--ds-space-050,4px)}
10
+ ._zulpu2gc{gap:var(--ds-space-100,8px)}
11
+ ._15l2idpf:after{top:0}
12
+ ._16jlkb7n{flex-grow:1}
13
+ ._18m915vq{overflow-y:hidden}
14
+ ._18m91wug{overflow-y:auto}
15
+ ._18postnw:after{position:absolute}
16
+ ._19bvu2gc{padding-left:var(--ds-space-100,8px)}
17
+ ._19doidpf:after{left:0}
18
+ ._1bqqidpf:after{z-index:0}
19
+ ._1bsb7vkz{width:1pc}
20
+ ._1e0c1txw{display:flex}
21
+ ._1hfk18uv:after{background-color:initial}
22
+ ._1hfkhp5a:after{background-color:var(--ds-surface-raised,#fff)}
23
+ ._1ifiidpf .embed-header{opacity:0}
24
+ ._1ifikb7n .embed-header{opacity:1}
25
+ ._1pbykb7n{z-index:1}
26
+ ._1reo15vq{overflow-x:hidden}
27
+ ._1reo1wug{overflow-x:auto}
28
+ ._1x88idpf:after{bottom:0}
29
+ ._2lx21bp4{flex-direction:column}
30
+ ._32rxidpf:after{right:0}
31
+ ._4cvr1h6o{align-items:center}
32
+ ._4t3i1osq{height:100%}
33
+ ._4t3i7vkz{height:1pc}
34
+ ._4t3igktf{height:20px}
35
+ ._4t3ik5xz{height:27pc}
36
+ ._4tpuhp5a:hover:after{background-color:var(--ds-surface-raised,#fff)}
37
+ ._8x3u92p9:after{box-shadow:0 0 0 3px var(--ds-border-selected,#0c66e4)}
38
+ ._aetrb3bt:after{content:""}
39
+ ._bfhkhp5a{background-color:var(--ds-surface-raised,#fff)}
40
+ ._ca0qu2gc{padding-top:var(--ds-space-100,8px)}
41
+ ._kqswh2mm{position:relative}
42
+ ._n3tdu2gc{padding-bottom:var(--ds-space-100,8px)}
43
+ ._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
44
+ ._u94kidpf:after{flex-grow:0}
45
+ ._uiztglyw{-webkit-user-select:none;-ms-user-select:none;user-select:none}
46
+ ._x148kb7n:hover .embed-header{opacity:1}
47
+ ._1bnxglyw:hover{text-decoration-line:none}
48
+ ._9oik18uv:hover{text-decoration-color:initial}
49
+ ._jf4cnqa1:hover{text-decoration-style:solid}
50
+ ._1jhm1ips:active{outline:8px solid var(--ds-background-selected,#e9f2ff)}