@atlaskit/smart-card 26.56.1 → 26.56.3

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,17 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 26.56.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#91582](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91582) [`a43b331b2043`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a43b331b2043) - Hide copy link button on hover card when redesign ff is on
8
+
9
+ ## 26.56.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [#91072](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91072) [`77e51a1ecca8`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/77e51a1ecca8) - Integrate AI summary and action redesign feature flags in hover card.
14
+
3
15
  ## 26.56.1
4
16
 
5
17
  ### Patch Changes
@@ -22,7 +22,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
22
22
  var context = exports.context = {
23
23
  componentName: 'smart-cards',
24
24
  packageName: "@atlaskit/smart-card",
25
- packageVersion: "26.56.1"
25
+ packageVersion: "26.56.3"
26
26
  };
27
27
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
28
28
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -8,6 +8,7 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.hoverCardClassName = exports.getCopyAction = exports.default = void 0;
9
9
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
10
10
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
11
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
11
12
  var _react = require("@emotion/react");
12
13
  var _analyticsNext = require("@atlaskit/analytics-next");
13
14
  var _copy = _interopRequireDefault(require("@atlaskit/icon/glyph/copy"));
@@ -146,7 +147,7 @@ var HoverCardContent = function HoverCardContent(_ref) {
146
147
  subtitle = _extractMetadata.subtitle;
147
148
  var titleMaxLines = subtitle && subtitle.length > 0 ? 1 : 2;
148
149
  var titleBlockProps = {
149
- actions: titleActions,
150
+ actions: (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.hover-card-action-redesign') ? undefined : titleActions,
150
151
  maxLines: titleMaxLines,
151
152
  overrideCss: _styled.titleBlockCss,
152
153
  size: _constants.SmartLinkSize.Large,
@@ -148,6 +148,7 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref2) {
148
148
  data: data,
149
149
  fallbackElementHeight: snippetHeight.current
150
150
  });
151
+ var isActionBlockEnabled = (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.hover-card-action-redesign') ? true : false;
151
152
  return /*#__PURE__*/_react.default.createElement(_FlexibleCard.default, flexibleCardProps, imagePreview, /*#__PURE__*/_react.default.createElement(_blocks.TitleBlock, (0, _extends2.default)({}, titleBlockProps, {
152
153
  metadataPosition: _constants.SmartLinkPosition.Top
153
154
  })), /*#__PURE__*/_react.default.createElement(_blocks.MetadataBlock, {
@@ -184,19 +185,25 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref2) {
184
185
  }), (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.enable-hover-card-related-urls') && /*#__PURE__*/_react.default.createElement(_blocks.RelatedUrlsBlock, {
185
186
  url: url,
186
187
  size: _constants.SmartLinkSize.Small
187
- }), isAISummaryEnabled ? /*#__PURE__*/_react.default.createElement(_blocks.AISummaryBlock, {
188
+ }), isAISummaryEnabled && /*#__PURE__*/_react.default.createElement(_blocks.AISummaryBlock, {
188
189
  metadata: [{
189
190
  name: _constants.ElementName.Provider
190
191
  }],
191
192
  actions: footerActions,
192
193
  aiSummaryMinHeight: connectedAIBlockHeight.current
193
- }) : /*#__PURE__*/_react.default.createElement(_blocks.FooterBlock, {
194
+ }), isActionBlockEnabled && /*#__PURE__*/_react.default.createElement(_blocks.ActionBlock, {
195
+ onClick: onActionClick,
196
+ spaceInline: "space.150"
197
+ }), isActionBlockEnabled && /*#__PURE__*/_react.default.createElement(_blocks.MetadataBlock, {
198
+ secondary: [{
199
+ name: _constants.ElementName.Provider,
200
+ testId: 'smart-element-provider'
201
+ }],
202
+ testId: "smart-block-action-footer"
203
+ }), !isAISummaryEnabled && !isActionBlockEnabled && /*#__PURE__*/_react.default.createElement(_blocks.FooterBlock, {
194
204
  actions: footerActions,
195
205
  size: _constants.SmartLinkSize.Large,
196
206
  overrideCss: _styled.footerBlockCss
197
- }), (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.hover-card-action-redesign') && /*#__PURE__*/_react.default.createElement(_blocks.ActionBlock, {
198
- spaceInline: "space.150",
199
- onClick: onActionClick
200
207
  }));
201
208
  };
202
209
  var _default = exports.default = HoverCardResolvedView;
@@ -17,7 +17,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId"],
17
17
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
18
18
  var PACKAGE_DATA = {
19
19
  packageName: "@atlaskit/smart-card",
20
- packageVersion: "26.56.1",
20
+ packageVersion: "26.56.3",
21
21
  componentName: 'linkUrl'
22
22
  };
23
23
  var Link = (0, _click.withLinkClickedEvent)('a');
@@ -4,7 +4,7 @@ export const ANALYTICS_CHANNEL = 'media';
4
4
  export const context = {
5
5
  componentName: 'smart-cards',
6
6
  packageName: "@atlaskit/smart-card",
7
- packageVersion: "26.56.1"
7
+ packageVersion: "26.56.3"
8
8
  };
9
9
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -1,4 +1,5 @@
1
1
  /** @jsx jsx */
2
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
2
3
  import { jsx } from '@emotion/react';
3
4
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
4
5
  import CopyIcon from '@atlaskit/icon/glyph/copy';
@@ -110,7 +111,7 @@ const HoverCardContent = ({
110
111
  } = extractMetadata(getSimulatedMetadata(extensionKey, data));
111
112
  const titleMaxLines = subtitle && subtitle.length > 0 ? 1 : 2;
112
113
  const titleBlockProps = {
113
- actions: titleActions,
114
+ actions: getBooleanFF('platform.linking-platform.smart-card.hover-card-action-redesign') ? undefined : titleActions,
114
115
  maxLines: titleMaxLines,
115
116
  overrideCss: titleBlockCss,
116
117
  size: SmartLinkSize.Large,
@@ -141,6 +141,7 @@ const HoverCardResolvedView = ({
141
141
  data: data,
142
142
  fallbackElementHeight: snippetHeight.current
143
143
  });
144
+ const isActionBlockEnabled = getBooleanFF('platform.linking-platform.smart-card.hover-card-action-redesign') ? true : false;
144
145
  return /*#__PURE__*/React.createElement(FlexibleCard, flexibleCardProps, imagePreview, /*#__PURE__*/React.createElement(TitleBlock, _extends({}, titleBlockProps, {
145
146
  metadataPosition: SmartLinkPosition.Top
146
147
  })), /*#__PURE__*/React.createElement(MetadataBlock, {
@@ -177,19 +178,25 @@ const HoverCardResolvedView = ({
177
178
  }), getBooleanFF('platform.linking-platform.smart-card.enable-hover-card-related-urls') && /*#__PURE__*/React.createElement(RelatedUrlsBlock, {
178
179
  url: url,
179
180
  size: SmartLinkSize.Small
180
- }), isAISummaryEnabled ? /*#__PURE__*/React.createElement(AISummaryBlock, {
181
+ }), isAISummaryEnabled && /*#__PURE__*/React.createElement(AISummaryBlock, {
181
182
  metadata: [{
182
183
  name: ElementName.Provider
183
184
  }],
184
185
  actions: footerActions,
185
186
  aiSummaryMinHeight: connectedAIBlockHeight.current
186
- }) : /*#__PURE__*/React.createElement(FooterBlock, {
187
+ }), isActionBlockEnabled && /*#__PURE__*/React.createElement(ActionBlock, {
188
+ onClick: onActionClick,
189
+ spaceInline: "space.150"
190
+ }), isActionBlockEnabled && /*#__PURE__*/React.createElement(MetadataBlock, {
191
+ secondary: [{
192
+ name: ElementName.Provider,
193
+ testId: 'smart-element-provider'
194
+ }],
195
+ testId: "smart-block-action-footer"
196
+ }), !isAISummaryEnabled && !isActionBlockEnabled && /*#__PURE__*/React.createElement(FooterBlock, {
187
197
  actions: footerActions,
188
198
  size: SmartLinkSize.Large,
189
199
  overrideCss: footerBlockCss
190
- }), getBooleanFF('platform.linking-platform.smart-card.hover-card-action-redesign') && /*#__PURE__*/React.createElement(ActionBlock, {
191
- spaceInline: "space.150",
192
- onClick: onActionClick
193
200
  }));
194
201
  };
195
202
  export default HoverCardResolvedView;
@@ -7,7 +7,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
7
7
  import LinkWarningModal from './LinkWarningModal';
8
8
  const PACKAGE_DATA = {
9
9
  packageName: "@atlaskit/smart-card",
10
- packageVersion: "26.56.1",
10
+ packageVersion: "26.56.3",
11
11
  componentName: 'linkUrl'
12
12
  };
13
13
  const Link = withLinkClickedEvent('a');
@@ -15,7 +15,7 @@ export var ANALYTICS_CHANNEL = 'media';
15
15
  export var context = {
16
16
  componentName: 'smart-cards',
17
17
  packageName: "@atlaskit/smart-card",
18
- packageVersion: "26.56.1"
18
+ packageVersion: "26.56.3"
19
19
  };
20
20
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
21
21
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -1,6 +1,7 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
2
  import _regeneratorRuntime from "@babel/runtime/regenerator";
3
3
  /** @jsx jsx */
4
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
4
5
  import { jsx } from '@emotion/react';
5
6
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
6
7
  import CopyIcon from '@atlaskit/icon/glyph/copy';
@@ -135,7 +136,7 @@ var HoverCardContent = function HoverCardContent(_ref) {
135
136
  subtitle = _extractMetadata.subtitle;
136
137
  var titleMaxLines = subtitle && subtitle.length > 0 ? 1 : 2;
137
138
  var titleBlockProps = {
138
- actions: titleActions,
139
+ actions: getBooleanFF('platform.linking-platform.smart-card.hover-card-action-redesign') ? undefined : titleActions,
139
140
  maxLines: titleMaxLines,
140
141
  overrideCss: titleBlockCss,
141
142
  size: SmartLinkSize.Large,
@@ -139,6 +139,7 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref2) {
139
139
  data: data,
140
140
  fallbackElementHeight: snippetHeight.current
141
141
  });
142
+ var isActionBlockEnabled = getBooleanFF('platform.linking-platform.smart-card.hover-card-action-redesign') ? true : false;
142
143
  return /*#__PURE__*/React.createElement(FlexibleCard, flexibleCardProps, imagePreview, /*#__PURE__*/React.createElement(TitleBlock, _extends({}, titleBlockProps, {
143
144
  metadataPosition: SmartLinkPosition.Top
144
145
  })), /*#__PURE__*/React.createElement(MetadataBlock, {
@@ -175,19 +176,25 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref2) {
175
176
  }), getBooleanFF('platform.linking-platform.smart-card.enable-hover-card-related-urls') && /*#__PURE__*/React.createElement(RelatedUrlsBlock, {
176
177
  url: url,
177
178
  size: SmartLinkSize.Small
178
- }), isAISummaryEnabled ? /*#__PURE__*/React.createElement(AISummaryBlock, {
179
+ }), isAISummaryEnabled && /*#__PURE__*/React.createElement(AISummaryBlock, {
179
180
  metadata: [{
180
181
  name: ElementName.Provider
181
182
  }],
182
183
  actions: footerActions,
183
184
  aiSummaryMinHeight: connectedAIBlockHeight.current
184
- }) : /*#__PURE__*/React.createElement(FooterBlock, {
185
+ }), isActionBlockEnabled && /*#__PURE__*/React.createElement(ActionBlock, {
186
+ onClick: onActionClick,
187
+ spaceInline: "space.150"
188
+ }), isActionBlockEnabled && /*#__PURE__*/React.createElement(MetadataBlock, {
189
+ secondary: [{
190
+ name: ElementName.Provider,
191
+ testId: 'smart-element-provider'
192
+ }],
193
+ testId: "smart-block-action-footer"
194
+ }), !isAISummaryEnabled && !isActionBlockEnabled && /*#__PURE__*/React.createElement(FooterBlock, {
185
195
  actions: footerActions,
186
196
  size: SmartLinkSize.Large,
187
197
  overrideCss: footerBlockCss
188
- }), getBooleanFF('platform.linking-platform.smart-card.hover-card-action-redesign') && /*#__PURE__*/React.createElement(ActionBlock, {
189
- spaceInline: "space.150",
190
- onClick: onActionClick
191
198
  }));
192
199
  };
193
200
  export default HoverCardResolvedView;
@@ -10,7 +10,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
10
10
  import LinkWarningModal from './LinkWarningModal';
11
11
  var PACKAGE_DATA = {
12
12
  packageName: "@atlaskit/smart-card",
13
- packageVersion: "26.56.1",
13
+ packageVersion: "26.56.3",
14
14
  componentName: 'linkUrl'
15
15
  };
16
16
  var Link = withLinkClickedEvent('a');
@@ -1,4 +1,3 @@
1
- /** @jsx jsx */
2
1
  import { jsx } from '@emotion/react';
3
2
  import { ActionItem } from '../../FlexibleCard/components/blocks/types';
4
3
  import { HoverCardContentProps } from '../types';
@@ -1,4 +1,3 @@
1
- /** @jsx jsx */
2
1
  import { jsx } from '@emotion/react';
3
2
  import { ActionItem } from '../../FlexibleCard/components/blocks/types';
4
3
  import { HoverCardContentProps } from '../types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "26.56.1",
3
+ "version": "26.56.3",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -48,7 +48,7 @@
48
48
  "@atlaskit/linking-types": "^8.8.0",
49
49
  "@atlaskit/logo": "^13.15.0",
50
50
  "@atlaskit/lozenge": "^11.6.0",
51
- "@atlaskit/modal-dialog": "^12.10.0",
51
+ "@atlaskit/modal-dialog": "^12.11.0",
52
52
  "@atlaskit/outbound-auth-flow-client": "^3.4.0",
53
53
  "@atlaskit/platform-feature-flags": "^0.2.1",
54
54
  "@atlaskit/popup": "^1.14.0",
@@ -84,7 +84,7 @@
84
84
  "@af/integration-testing": "*",
85
85
  "@af/visual-regression": "*",
86
86
  "@atlaskit/analytics-listeners": "^8.9.0",
87
- "@atlaskit/css-reset": "^6.8.0",
87
+ "@atlaskit/css-reset": "^6.9.0",
88
88
  "@atlaskit/link-test-helpers": "^7.0.0",
89
89
  "@atlaskit/media-test-helpers": "^33.0.0",
90
90
  "@atlaskit/ssr": "*",