@atlaskit/smart-card 26.43.0 → 26.43.1

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,11 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 26.43.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#60015](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/60015) [`7015b54914d8`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7015b54914d8) - [ux] Clean up of "platform.linking-platform.smart-card.enable-block-card-clicks-opening-in-same-tab" FF
8
+
3
9
  ## 26.43.0
4
10
 
5
11
  ### 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: "26.43.0"
25
+ packageVersion: "26.43.1"
26
26
  };
27
27
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
28
28
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -69,7 +69,7 @@ var FlexibleResolvedView = function FlexibleResolvedView(_ref) {
69
69
  testId: testId,
70
70
  ui: _utils.FlexibleCardUiOptions,
71
71
  url: url
72
- }, /*#__PURE__*/_react.default.createElement(_blocks.TitleBlock, (0, _extends2.default)({}, (0, _utils.getTitleBlockOptions)(), {
72
+ }, /*#__PURE__*/_react.default.createElement(_blocks.TitleBlock, (0, _extends2.default)({}, _utils.titleBlockOptions, {
73
73
  metadata: titleMetadata,
74
74
  subtitle: [{
75
75
  name: _constants.ElementName.Location
@@ -31,7 +31,7 @@ var UnresolvedView = function UnresolvedView(_ref) {
31
31
  testId: testId,
32
32
  ui: _utils.FlexibleCardUiOptions,
33
33
  url: url
34
- }, /*#__PURE__*/_react.default.createElement(_blocks.TitleBlock, (0, _extends2.default)({}, (0, _utils.getTitleBlockOptions)(), {
34
+ }, /*#__PURE__*/_react.default.createElement(_blocks.TitleBlock, (0, _extends2.default)({}, _utils.titleBlockOptions, {
35
35
  hideIcon: !!title,
36
36
  text: title
37
37
  })), /*#__PURE__*/_react.default.createElement(_blocks.CustomBlock, null, children), showPreview && /*#__PURE__*/_react.default.createElement(_blocks.PreviewBlock, _utils.PreviewBlockOptions), /*#__PURE__*/_react.default.createElement(_blocks.InternalFooterBlock, (0, _extends2.default)({}, _utils.FooterBlockOptions, {
@@ -3,8 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.getTitleBlockOptions = exports.getSimulatedBetterMetadata = exports.PreviewBlockOptions = exports.FooterBlockOptions = exports.FlexibleCardUiOptions = void 0;
7
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
6
+ exports.titleBlockOptions = exports.getSimulatedBetterMetadata = exports.PreviewBlockOptions = exports.FooterBlockOptions = exports.FlexibleCardUiOptions = void 0;
8
7
  var _constants = require("../../../../../constants");
9
8
  var _utils = require("../../../../../extractors/flexible/utils");
10
9
  var _helpers = require("../../../../../state/helpers");
@@ -109,17 +108,12 @@ var getSimulatedBetterMetadata = exports.getSimulatedBetterMetadata = function g
109
108
  var FlexibleCardUiOptions = exports.FlexibleCardUiOptions = {
110
109
  hideElevation: true
111
110
  };
112
-
113
- // Due to the use of getBooleanFF(), this has to be a function.
114
- // Make this a const object after ff cleanup.
115
- var getTitleBlockOptions = exports.getTitleBlockOptions = function getTitleBlockOptions() {
116
- return {
117
- anchorTarget: (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.enable-block-card-clicks-opening-in-same-tab') ? '_self' : undefined,
118
- position: _constants.SmartLinkPosition.Center,
119
- overrideCss: _styled.titleBlockCss,
120
- hideRetry: true,
121
- size: _constants.SmartLinkSize.Large
122
- };
111
+ var titleBlockOptions = exports.titleBlockOptions = {
112
+ anchorTarget: '_self',
113
+ position: _constants.SmartLinkPosition.Center,
114
+ overrideCss: _styled.titleBlockCss,
115
+ hideRetry: true,
116
+ size: _constants.SmartLinkSize.Large
123
117
  };
124
118
  var PreviewBlockOptions = exports.PreviewBlockOptions = {
125
119
  placement: _constants.MediaPlacement.Right,
@@ -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.43.0",
20
+ packageVersion: "26.43.1",
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.43.0"
7
+ packageVersion: "26.43.1"
8
8
  };
9
9
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -4,7 +4,7 @@ import FlexibleCard from '../../../FlexibleCard';
4
4
  import { FooterBlock, MetadataBlock, PreviewBlock, SnippetBlock, TitleBlock } from '../../../FlexibleCard/components/blocks';
5
5
  import { metadataBlockCss } from './styled';
6
6
  import { ActionName, ElementName, SmartLinkPosition } from '../../../../constants';
7
- import { getSimulatedBetterMetadata, getTitleBlockOptions, PreviewBlockOptions, FlexibleCardUiOptions, FooterBlockOptions } from './utils';
7
+ import { getSimulatedBetterMetadata, titleBlockOptions, PreviewBlockOptions, FlexibleCardUiOptions, FooterBlockOptions } from './utils';
8
8
  import { withFlexibleUIBlockCardStyle } from './utils/withFlexibleUIBlockCardStyle';
9
9
  /**
10
10
  * This view represents a Block card that has an 'Resolved' status.
@@ -54,7 +54,7 @@ const FlexibleResolvedView = ({
54
54
  testId: testId,
55
55
  ui: FlexibleCardUiOptions,
56
56
  url: url
57
- }, /*#__PURE__*/React.createElement(TitleBlock, _extends({}, getTitleBlockOptions(), {
57
+ }, /*#__PURE__*/React.createElement(TitleBlock, _extends({}, titleBlockOptions, {
58
58
  metadata: titleMetadata,
59
59
  subtitle: [{
60
60
  name: ElementName.Location
@@ -3,7 +3,7 @@ import { CustomBlock, PreviewBlock, TitleBlock } from '../../../../FlexibleCard/
3
3
  import React from 'react';
4
4
  import FlexibleCard from '../../../../FlexibleCard';
5
5
  import { InternalFooterBlock } from '../../../../FlexibleCard/components/blocks';
6
- import { FlexibleCardUiOptions, PreviewBlockOptions, getTitleBlockOptions, FooterBlockOptions } from '../utils';
6
+ import { FlexibleCardUiOptions, PreviewBlockOptions, titleBlockOptions, FooterBlockOptions } from '../utils';
7
7
  const UnresolvedView = ({
8
8
  actions,
9
9
  cardState,
@@ -24,7 +24,7 @@ const UnresolvedView = ({
24
24
  testId: testId,
25
25
  ui: FlexibleCardUiOptions,
26
26
  url: url
27
- }, /*#__PURE__*/React.createElement(TitleBlock, _extends({}, getTitleBlockOptions(), {
27
+ }, /*#__PURE__*/React.createElement(TitleBlock, _extends({}, titleBlockOptions, {
28
28
  hideIcon: !!title,
29
29
  text: title
30
30
  })), /*#__PURE__*/React.createElement(CustomBlock, null, children), showPreview && /*#__PURE__*/React.createElement(PreviewBlock, PreviewBlockOptions), /*#__PURE__*/React.createElement(InternalFooterBlock, _extends({}, FooterBlockOptions, {
@@ -1,4 +1,3 @@
1
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
2
1
  import { ElementName, MediaPlacement, SmartLinkPosition, SmartLinkSize } from '../../../../../constants';
3
2
  import { extractOwnedBy } from '../../../../../extractors/flexible/utils';
4
3
  import { getExtensionKey } from '../../../../../state/helpers';
@@ -103,16 +102,13 @@ export const getSimulatedBetterMetadata = cardDetails => {
103
102
  export const FlexibleCardUiOptions = {
104
103
  hideElevation: true
105
104
  };
106
-
107
- // Due to the use of getBooleanFF(), this has to be a function.
108
- // Make this a const object after ff cleanup.
109
- export const getTitleBlockOptions = () => ({
110
- anchorTarget: getBooleanFF('platform.linking-platform.smart-card.enable-block-card-clicks-opening-in-same-tab') ? '_self' : undefined,
105
+ export const titleBlockOptions = {
106
+ anchorTarget: '_self',
111
107
  position: SmartLinkPosition.Center,
112
108
  overrideCss: titleBlockCss,
113
109
  hideRetry: true,
114
110
  size: SmartLinkSize.Large
115
- });
111
+ };
116
112
  export const PreviewBlockOptions = {
117
113
  placement: MediaPlacement.Right,
118
114
  ignoreContainerPadding: true
@@ -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.43.0",
10
+ packageVersion: "26.43.1",
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.43.0"
18
+ packageVersion: "26.43.1"
19
19
  };
20
20
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
21
21
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -5,7 +5,7 @@ import FlexibleCard from '../../../FlexibleCard';
5
5
  import { FooterBlock, MetadataBlock, PreviewBlock, SnippetBlock, TitleBlock } from '../../../FlexibleCard/components/blocks';
6
6
  import { metadataBlockCss } from './styled';
7
7
  import { ActionName, ElementName, SmartLinkPosition } from '../../../../constants';
8
- import { getSimulatedBetterMetadata, getTitleBlockOptions, PreviewBlockOptions, FlexibleCardUiOptions, FooterBlockOptions } from './utils';
8
+ import { getSimulatedBetterMetadata, titleBlockOptions, PreviewBlockOptions, FlexibleCardUiOptions, FooterBlockOptions } from './utils';
9
9
  import { withFlexibleUIBlockCardStyle } from './utils/withFlexibleUIBlockCardStyle';
10
10
  /**
11
11
  * This view represents a Block card that has an 'Resolved' status.
@@ -59,7 +59,7 @@ var FlexibleResolvedView = function FlexibleResolvedView(_ref) {
59
59
  testId: testId,
60
60
  ui: FlexibleCardUiOptions,
61
61
  url: url
62
- }, /*#__PURE__*/React.createElement(TitleBlock, _extends({}, getTitleBlockOptions(), {
62
+ }, /*#__PURE__*/React.createElement(TitleBlock, _extends({}, titleBlockOptions, {
63
63
  metadata: titleMetadata,
64
64
  subtitle: [{
65
65
  name: ElementName.Location
@@ -3,7 +3,7 @@ import { CustomBlock, PreviewBlock, TitleBlock } from '../../../../FlexibleCard/
3
3
  import React from 'react';
4
4
  import FlexibleCard from '../../../../FlexibleCard';
5
5
  import { InternalFooterBlock } from '../../../../FlexibleCard/components/blocks';
6
- import { FlexibleCardUiOptions, PreviewBlockOptions, getTitleBlockOptions, FooterBlockOptions } from '../utils';
6
+ import { FlexibleCardUiOptions, PreviewBlockOptions, titleBlockOptions, FooterBlockOptions } from '../utils';
7
7
  var UnresolvedView = function UnresolvedView(_ref) {
8
8
  var actions = _ref.actions,
9
9
  cardState = _ref.cardState,
@@ -25,7 +25,7 @@ var UnresolvedView = function UnresolvedView(_ref) {
25
25
  testId: testId,
26
26
  ui: FlexibleCardUiOptions,
27
27
  url: url
28
- }, /*#__PURE__*/React.createElement(TitleBlock, _extends({}, getTitleBlockOptions(), {
28
+ }, /*#__PURE__*/React.createElement(TitleBlock, _extends({}, titleBlockOptions, {
29
29
  hideIcon: !!title,
30
30
  text: title
31
31
  })), /*#__PURE__*/React.createElement(CustomBlock, null, children), showPreview && /*#__PURE__*/React.createElement(PreviewBlock, PreviewBlockOptions), /*#__PURE__*/React.createElement(InternalFooterBlock, _extends({}, FooterBlockOptions, {
@@ -1,4 +1,3 @@
1
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
2
1
  import { ElementName, MediaPlacement, SmartLinkPosition, SmartLinkSize } from '../../../../../constants';
3
2
  import { extractOwnedBy } from '../../../../../extractors/flexible/utils';
4
3
  import { getExtensionKey } from '../../../../../state/helpers';
@@ -103,17 +102,12 @@ export var getSimulatedBetterMetadata = function getSimulatedBetterMetadata(card
103
102
  export var FlexibleCardUiOptions = {
104
103
  hideElevation: true
105
104
  };
106
-
107
- // Due to the use of getBooleanFF(), this has to be a function.
108
- // Make this a const object after ff cleanup.
109
- export var getTitleBlockOptions = function getTitleBlockOptions() {
110
- return {
111
- anchorTarget: getBooleanFF('platform.linking-platform.smart-card.enable-block-card-clicks-opening-in-same-tab') ? '_self' : undefined,
112
- position: SmartLinkPosition.Center,
113
- overrideCss: titleBlockCss,
114
- hideRetry: true,
115
- size: SmartLinkSize.Large
116
- };
105
+ export var titleBlockOptions = {
106
+ anchorTarget: '_self',
107
+ position: SmartLinkPosition.Center,
108
+ overrideCss: titleBlockCss,
109
+ hideRetry: true,
110
+ size: SmartLinkSize.Large
117
111
  };
118
112
  export var PreviewBlockOptions = {
119
113
  placement: MediaPlacement.Right,
@@ -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.43.0",
13
+ packageVersion: "26.43.1",
14
14
  componentName: 'linkUrl'
15
15
  };
16
16
  var Link = withLinkClickedEvent('a');
@@ -11,7 +11,7 @@ type SimulatedMetadata = {
11
11
  bottomMetadata?: ElementItem[];
12
12
  };
13
13
  export declare const FlexibleCardUiOptions: FlexibleUiOptions;
14
- export declare const getTitleBlockOptions: () => Partial<TitleBlockProps>;
14
+ export declare const titleBlockOptions: Partial<TitleBlockProps>;
15
15
  export declare const PreviewBlockOptions: Partial<PreviewBlockProps>;
16
16
  export declare const FooterBlockOptions: Partial<FooterBlockProps>;
17
17
  export {};
@@ -11,7 +11,7 @@ type SimulatedMetadata = {
11
11
  bottomMetadata?: ElementItem[];
12
12
  };
13
13
  export declare const FlexibleCardUiOptions: FlexibleUiOptions;
14
- export declare const getTitleBlockOptions: () => Partial<TitleBlockProps>;
14
+ export declare const titleBlockOptions: Partial<TitleBlockProps>;
15
15
  export declare const PreviewBlockOptions: Partial<PreviewBlockProps>;
16
16
  export declare const FooterBlockOptions: Partial<FooterBlockProps>;
17
17
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "26.43.0",
3
+ "version": "26.43.1",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -135,9 +135,6 @@
135
135
  ".": "./src/index.ts"
136
136
  },
137
137
  "platform-feature-flags": {
138
- "platform.linking-platform.smart-card.enable-block-card-clicks-opening-in-same-tab": {
139
- "type": "boolean"
140
- },
141
138
  "platform.linking-platform.smart-card.follow-button": {
142
139
  "type": "boolean"
143
140
  },