@atlaskit/smart-card 27.21.0 → 28.0.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,33 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 28.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#138322](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/138322)
8
+ [`578855218c959`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/578855218c959) - ####
9
+ What
10
+
11
+ Linking Platform are updating block smart cards to use flexible UI internally by default, and
12
+ deprecating the `enableFlexibleBlockCard` provider feature flag.
13
+
14
+ When upgrading you'll see some visual and minor content changes to the block cards where the
15
+ legacy block card was being used.
16
+
17
+ #### Why
18
+
19
+ A majority of adopters using block smart cards are already using flexible UI by using the
20
+ `enableFlexibleBlockCard` feature flag within `SmartCardProvider`. There are very few use cases
21
+ where using the legacy block card is still required and our goal is to completely remove the
22
+ legacy block card.
23
+
24
+ #### How to upgrade
25
+
26
+ Upgrade the smart-card dependency to the latest major version. If breaking changes are introduced,
27
+ there is a `useLegacyBlockCard` prop to allow existing usages of the standalone block card to
28
+ persist the legacy version. Linking Platform discourage the use of the prop, please reach out to
29
+ #help-linking-platform for further help if its use is required.
30
+
3
31
  ## 27.21.0
4
32
 
5
33
  ### Minor 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: "27.21.0"
25
+ packageVersion: "28.0.0"
26
26
  };
27
27
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
28
28
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -8,7 +8,6 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.CardWithUrlContent = void 0;
9
9
  var _react = _interopRequireWildcard(require("react"));
10
10
  var _analyticsNext = require("@atlaskit/analytics-next");
11
- var _linkProvider = require("@atlaskit/link-provider");
12
11
  var _modal = require("../../state/modal");
13
12
  var _utils = require("../../utils");
14
13
  var measure = _interopRequireWildcard(require("../../utils/performance"));
@@ -77,7 +76,6 @@ function Component(_ref) {
77
76
  var isFlexibleUi = (0, _react.useMemo)(function () {
78
77
  return (0, _flexible.isFlexibleUiCard)(children);
79
78
  }, [children]);
80
- var enableFlexibleBlockCardFlag = Boolean((0, _linkProvider.useFeatureFlag)('enableFlexibleBlockCard'));
81
79
  var actionOptions = (0, _combineActionOptions.combineActionOptions)(actionOptionsProp, showServerActions, showActions, platform);
82
80
  var frameStyle = (0, _utils.combineFrameStyle)(frameStyleProp, isFrameVisible);
83
81
 
@@ -257,7 +255,7 @@ function Component(_ref) {
257
255
  testId: testId,
258
256
  actionOptions: actionOptions,
259
257
  platform: platform,
260
- enableFlexibleBlockCard: enableFlexibleBlockCardFlag && useLegacyBlockCard !== true
258
+ enableFlexibleBlockCard: useLegacyBlockCard !== true
261
259
  });
262
260
  case 'embed':
263
261
  return /*#__PURE__*/_react.default.createElement(_EmbedCard.EmbedCard, {
@@ -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: "27.21.0",
20
+ packageVersion: "28.0.0",
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: "27.21.0"
7
+ packageVersion: "28.0.0"
8
8
  };
9
9
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -1,6 +1,5 @@
1
1
  import React, { useEffect, useCallback, useMemo } from 'react';
2
2
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
3
- import { useFeatureFlag } from '@atlaskit/link-provider';
4
3
  import { SmartLinkModalProvider } from '../../state/modal';
5
4
  import { combineFrameStyle, isSpecialEvent } from '../../utils';
6
5
  import * as measure from '../../utils/performance';
@@ -68,7 +67,6 @@ function Component({
68
67
  const services = getServices(state.details);
69
68
  const canBeDatasource = getCanBeDatasource(state.details);
70
69
  let isFlexibleUi = useMemo(() => isFlexibleUiCard(children), [children]);
71
- const enableFlexibleBlockCardFlag = Boolean(useFeatureFlag('enableFlexibleBlockCard'));
72
70
  const actionOptions = combineActionOptions(actionOptionsProp, showServerActions, showActions, platform);
73
71
  const frameStyle = combineFrameStyle(frameStyleProp, isFrameVisible);
74
72
 
@@ -244,7 +242,7 @@ function Component({
244
242
  testId: testId,
245
243
  actionOptions: actionOptions,
246
244
  platform: platform,
247
- enableFlexibleBlockCard: enableFlexibleBlockCardFlag && useLegacyBlockCard !== true
245
+ enableFlexibleBlockCard: useLegacyBlockCard !== true
248
246
  });
249
247
  case 'embed':
250
248
  return /*#__PURE__*/React.createElement(EmbedCard, {
@@ -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: "27.21.0",
10
+ packageVersion: "28.0.0",
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: "27.21.0"
18
+ packageVersion: "28.0.0"
19
19
  };
20
20
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
21
21
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -1,6 +1,5 @@
1
1
  import React, { useEffect, useCallback, useMemo } from 'react';
2
2
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
3
- import { useFeatureFlag } from '@atlaskit/link-provider';
4
3
  import { SmartLinkModalProvider } from '../../state/modal';
5
4
  import { combineFrameStyle, isSpecialEvent } from '../../utils';
6
5
  import * as measure from '../../utils/performance';
@@ -67,7 +66,6 @@ function Component(_ref) {
67
66
  var isFlexibleUi = useMemo(function () {
68
67
  return isFlexibleUiCard(children);
69
68
  }, [children]);
70
- var enableFlexibleBlockCardFlag = Boolean(useFeatureFlag('enableFlexibleBlockCard'));
71
69
  var actionOptions = combineActionOptions(actionOptionsProp, showServerActions, showActions, platform);
72
70
  var frameStyle = combineFrameStyle(frameStyleProp, isFrameVisible);
73
71
 
@@ -247,7 +245,7 @@ function Component(_ref) {
247
245
  testId: testId,
248
246
  actionOptions: actionOptions,
249
247
  platform: platform,
250
- enableFlexibleBlockCard: enableFlexibleBlockCardFlag && useLegacyBlockCard !== true
248
+ enableFlexibleBlockCard: useLegacyBlockCard !== true
251
249
  });
252
250
  case 'embed':
253
251
  return /*#__PURE__*/React.createElement(EmbedCard, {
@@ -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: "27.21.0",
13
+ packageVersion: "28.0.0",
14
14
  componentName: 'linkUrl'
15
15
  };
16
16
  var Link = withLinkClickedEvent('a');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "27.21.0",
3
+ "version": "28.0.0",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"