@atlaskit/editor-plugin-card 4.3.7 → 4.3.8

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,14 @@
1
1
  # @atlaskit/editor-plugin-card
2
2
 
3
+ ## 4.3.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [#156301](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/156301)
8
+ [`da531da92568b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/da531da92568b) -
9
+ Migrating tests to use url prop from @atlaskit/smart-card instead of deprecated data prop
10
+ - Updated dependencies
11
+
3
12
  ## 4.3.7
4
13
 
5
14
  ### Patch Changes
@@ -92,7 +92,17 @@ var BlockCardComponent = exports.BlockCardComponent = /*#__PURE__*/function (_Re
92
92
  var _node$attrs = node.attrs,
93
93
  url = _node$attrs.url,
94
94
  data = _node$attrs.data;
95
- var cardInner = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_smartCard.Card, {
95
+ var cardInner = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (0, _platformFeatureFlags.fg)('linking-platform-migrate-deprecated-data-prop') ? /*#__PURE__*/_react.default.createElement(_smartCard.Card, {
96
+ key: url,
97
+ url: url !== null && url !== void 0 ? url : data.url,
98
+ container: this.scrollContainer,
99
+ appearance: "block",
100
+ onClick: onClick,
101
+ onResolve: this.onResolve,
102
+ onError: this.onError,
103
+ platform: 'web',
104
+ actionOptions: actionOptions
105
+ }) : /*#__PURE__*/_react.default.createElement(_smartCard.Card, {
96
106
  key: url,
97
107
  url: url,
98
108
  data: data,
@@ -78,7 +78,20 @@ var InlineCard = exports.InlineCard = /*#__PURE__*/(0, _react.memo)(function (_r
78
78
  });
79
79
  }, [onResolve]);
80
80
  var card = (0, _react.useMemo)(function () {
81
- return /*#__PURE__*/_react.default.createElement(_smartCard.Card, {
81
+ return (0, _platformFeatureFlags.fg)('linking-platform-migrate-deprecated-data-prop') ? /*#__PURE__*/_react.default.createElement(_smartCard.Card, {
82
+ key: url,
83
+ url: url !== null && url !== void 0 ? url : data.url,
84
+ appearance: "inline",
85
+ onClick: onClick,
86
+ container: scrollContainer,
87
+ onResolve: onResolve,
88
+ onError: onError,
89
+ inlinePreloaderStyle: useAlternativePreloader ? 'on-right-without-skeleton' : undefined,
90
+ actionOptions: actionOptions,
91
+ isHovered: isHovered,
92
+ showHoverPreview: showHoverPreview,
93
+ hoverPreviewOptions: hoverPreviewOptions
94
+ }) : /*#__PURE__*/_react.default.createElement(_smartCard.Card, {
82
95
  key: url,
83
96
  url: url,
84
97
  data: data,
@@ -76,7 +76,17 @@ export class BlockCardComponent extends React.PureComponent {
76
76
  url,
77
77
  data
78
78
  } = node.attrs;
79
- const cardInner = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SmartCard, {
79
+ const cardInner = /*#__PURE__*/React.createElement(React.Fragment, null, fg('linking-platform-migrate-deprecated-data-prop') ? /*#__PURE__*/React.createElement(SmartCard, {
80
+ key: url,
81
+ url: url !== null && url !== void 0 ? url : data.url,
82
+ container: this.scrollContainer,
83
+ appearance: "block",
84
+ onClick: onClick,
85
+ onResolve: this.onResolve,
86
+ onError: this.onError,
87
+ platform: 'web',
88
+ actionOptions: actionOptions
89
+ }) : /*#__PURE__*/React.createElement(SmartCard, {
80
90
  key: url,
81
91
  url: url,
82
92
  data: data,
@@ -68,7 +68,20 @@ export const InlineCard = /*#__PURE__*/memo(({
68
68
  url
69
69
  });
70
70
  }, [onResolve]);
71
- const card = useMemo(() => /*#__PURE__*/React.createElement(SmartCard, {
71
+ const card = useMemo(() => fg('linking-platform-migrate-deprecated-data-prop') ? /*#__PURE__*/React.createElement(SmartCard, {
72
+ key: url,
73
+ url: url !== null && url !== void 0 ? url : data.url,
74
+ appearance: "inline",
75
+ onClick: onClick,
76
+ container: scrollContainer,
77
+ onResolve: onResolve,
78
+ onError: onError,
79
+ inlinePreloaderStyle: useAlternativePreloader ? 'on-right-without-skeleton' : undefined,
80
+ actionOptions: actionOptions,
81
+ isHovered: isHovered,
82
+ showHoverPreview: showHoverPreview,
83
+ hoverPreviewOptions: hoverPreviewOptions
84
+ }) : /*#__PURE__*/React.createElement(SmartCard, {
72
85
  key: url,
73
86
  url: url,
74
87
  data: data,
@@ -86,7 +86,17 @@ export var BlockCardComponent = /*#__PURE__*/function (_React$PureComponent) {
86
86
  var _node$attrs = node.attrs,
87
87
  url = _node$attrs.url,
88
88
  data = _node$attrs.data;
89
- var cardInner = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SmartCard, {
89
+ var cardInner = /*#__PURE__*/React.createElement(React.Fragment, null, fg('linking-platform-migrate-deprecated-data-prop') ? /*#__PURE__*/React.createElement(SmartCard, {
90
+ key: url,
91
+ url: url !== null && url !== void 0 ? url : data.url,
92
+ container: this.scrollContainer,
93
+ appearance: "block",
94
+ onClick: onClick,
95
+ onResolve: this.onResolve,
96
+ onError: this.onError,
97
+ platform: 'web',
98
+ actionOptions: actionOptions
99
+ }) : /*#__PURE__*/React.createElement(SmartCard, {
90
100
  key: url,
91
101
  url: url,
92
102
  data: data,
@@ -66,7 +66,20 @@ export var InlineCard = /*#__PURE__*/memo(function (_ref) {
66
66
  });
67
67
  }, [onResolve]);
68
68
  var card = useMemo(function () {
69
- return /*#__PURE__*/React.createElement(SmartCard, {
69
+ return fg('linking-platform-migrate-deprecated-data-prop') ? /*#__PURE__*/React.createElement(SmartCard, {
70
+ key: url,
71
+ url: url !== null && url !== void 0 ? url : data.url,
72
+ appearance: "inline",
73
+ onClick: onClick,
74
+ container: scrollContainer,
75
+ onResolve: onResolve,
76
+ onError: onError,
77
+ inlinePreloaderStyle: useAlternativePreloader ? 'on-right-without-skeleton' : undefined,
78
+ actionOptions: actionOptions,
79
+ isHovered: isHovered,
80
+ showHoverPreview: showHoverPreview,
81
+ hoverPreviewOptions: hoverPreviewOptions
82
+ }) : /*#__PURE__*/React.createElement(SmartCard, {
70
83
  key: url,
71
84
  url: url,
72
85
  data: data,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-card",
3
- "version": "4.3.7",
3
+ "version": "4.3.8",
4
4
  "description": "Card plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -34,7 +34,7 @@
34
34
  "@atlaskit/adf-schema": "^42.3.1",
35
35
  "@atlaskit/analytics-next": "^10.1.0",
36
36
  "@atlaskit/custom-steps": "^0.8.0",
37
- "@atlaskit/editor-common": "^94.2.0",
37
+ "@atlaskit/editor-common": "^94.3.0",
38
38
  "@atlaskit/editor-plugin-analytics": "^1.10.0",
39
39
  "@atlaskit/editor-plugin-decorations": "^1.3.0",
40
40
  "@atlaskit/editor-plugin-editor-disabled": "^1.3.0",
@@ -46,7 +46,7 @@
46
46
  "@atlaskit/editor-prosemirror": "6.0.0",
47
47
  "@atlaskit/editor-shared-styles": "^3.0.0",
48
48
  "@atlaskit/frontend-utilities": "^2.7.0",
49
- "@atlaskit/icon": "^22.23.0",
49
+ "@atlaskit/icon": "^22.24.0",
50
50
  "@atlaskit/link-analytics": "^8.5.0",
51
51
  "@atlaskit/link-client-extension": "^2.4.0",
52
52
  "@atlaskit/link-datasource": "^3.6.0",
@@ -57,7 +57,7 @@
57
57
  "@atlaskit/primitives": "^12.2.0",
58
58
  "@atlaskit/smart-card": "^30.1.0",
59
59
  "@atlaskit/theme": "^14.0.0",
60
- "@atlaskit/tmp-editor-statsig": "^2.8.0",
60
+ "@atlaskit/tmp-editor-statsig": "^2.9.0",
61
61
  "@atlaskit/tokens": "^2.0.0",
62
62
  "@babel/runtime": "^7.0.0",
63
63
  "@emotion/react": "^11.7.1",
@@ -131,6 +131,9 @@
131
131
  },
132
132
  "platform_editor_ssr_fix_smartlinks": {
133
133
  "type": "boolean"
134
+ },
135
+ "linking-platform-migrate-deprecated-data-prop": {
136
+ "type": "boolean"
134
137
  }
135
138
  },
136
139
  "stricter": {