@atlaskit/editor-plugin-card 12.4.1 → 12.4.2
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
|
+
## 12.4.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`1d6c102310afb`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1d6c102310afb) -
|
|
8
|
+
[ux] Use editor-smart-link-draggable package ti implement React-based drag preview, and design
|
|
9
|
+
system compliance. Updated editor-plugin-card to reference the new package.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 12.4.1
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -15,6 +15,7 @@ var _v = _interopRequireDefault(require("uuid/v4"));
|
|
|
15
15
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
16
16
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
17
17
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
18
|
+
var _editorSmartLinkDraggable = require("@atlaskit/editor-smart-link-draggable");
|
|
18
19
|
var _smartCard = require("@atlaskit/smart-card");
|
|
19
20
|
var _ssr = require("@atlaskit/smart-card/ssr");
|
|
20
21
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
@@ -193,7 +194,7 @@ function InlineCardNodeView(props) {
|
|
|
193
194
|
sourceUrl: url,
|
|
194
195
|
linkType: "inline"
|
|
195
196
|
}) : null;
|
|
196
|
-
|
|
197
|
+
var inlineCardContent = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(WrappedInlineCardWithAwareness, (0, _extends2.default)({
|
|
197
198
|
node: node,
|
|
198
199
|
view: view,
|
|
199
200
|
getPos: getPos,
|
|
@@ -207,6 +208,11 @@ function InlineCardNodeView(props) {
|
|
|
207
208
|
// Ignored via go/ees005
|
|
208
209
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
209
210
|
}, enableInlineUpgradeFeatures && (0, _utils.getAwarenessProps)(view.state, getPos, allowEmbeds, allowBlockCards, mode === 'view'))), CompetitorPromptComponent);
|
|
211
|
+
return (0, _expValEquals.expValEquals)('cc_drag_and_drop_smart_link_from_content_to_tree', 'isEnabled', true) ? /*#__PURE__*/_react.default.createElement(_editorSmartLinkDraggable.SmartLinkDraggable, {
|
|
212
|
+
url: url,
|
|
213
|
+
appearance: _editorSmartLinkDraggable.SMART_LINK_APPERANCE.INLINE,
|
|
214
|
+
source: _editorSmartLinkDraggable.SMART_LINK_DRAG_TYPES.EDITOR
|
|
215
|
+
}, inlineCardContent) : inlineCardContent;
|
|
210
216
|
}
|
|
211
217
|
var inlineCardNodeView = exports.inlineCardNodeView = function inlineCardNodeView(_ref4) {
|
|
212
218
|
var inlineCardViewProducer = _ref4.inlineCardViewProducer;
|
|
@@ -6,6 +6,7 @@ import uuid from 'uuid/v4';
|
|
|
6
6
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
7
7
|
import { useSharedPluginStateWithSelector, useSmartCardReloadAfterCache } from '@atlaskit/editor-common/hooks';
|
|
8
8
|
import { UnsupportedInline, findOverflowScrollParent } from '@atlaskit/editor-common/ui';
|
|
9
|
+
import { SmartLinkDraggable, SMART_LINK_DRAG_TYPES, SMART_LINK_APPERANCE } from '@atlaskit/editor-smart-link-draggable';
|
|
9
10
|
import { Card as SmartCard } from '@atlaskit/smart-card';
|
|
10
11
|
import { CardSSR } from '@atlaskit/smart-card/ssr';
|
|
11
12
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
@@ -192,7 +193,7 @@ export function InlineCardNodeView(props) {
|
|
|
192
193
|
sourceUrl: url,
|
|
193
194
|
linkType: "inline"
|
|
194
195
|
}) : null;
|
|
195
|
-
|
|
196
|
+
const inlineCardContent = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(WrappedInlineCardWithAwareness, _extends({
|
|
196
197
|
node: node,
|
|
197
198
|
view: view,
|
|
198
199
|
getPos: getPos,
|
|
@@ -206,6 +207,11 @@ export function InlineCardNodeView(props) {
|
|
|
206
207
|
// Ignored via go/ees005
|
|
207
208
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
208
209
|
}, enableInlineUpgradeFeatures && getAwarenessProps(view.state, getPos, allowEmbeds, allowBlockCards, mode === 'view'))), CompetitorPromptComponent);
|
|
210
|
+
return expValEquals('cc_drag_and_drop_smart_link_from_content_to_tree', 'isEnabled', true) ? /*#__PURE__*/React.createElement(SmartLinkDraggable, {
|
|
211
|
+
url: url,
|
|
212
|
+
appearance: SMART_LINK_APPERANCE.INLINE,
|
|
213
|
+
source: SMART_LINK_DRAG_TYPES.EDITOR
|
|
214
|
+
}, inlineCardContent) : inlineCardContent;
|
|
209
215
|
}
|
|
210
216
|
export const inlineCardNodeView = ({
|
|
211
217
|
inlineCardViewProducer
|
|
@@ -6,6 +6,7 @@ import uuid from 'uuid/v4';
|
|
|
6
6
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
7
7
|
import { useSharedPluginStateWithSelector, useSmartCardReloadAfterCache } from '@atlaskit/editor-common/hooks';
|
|
8
8
|
import { UnsupportedInline, findOverflowScrollParent } from '@atlaskit/editor-common/ui';
|
|
9
|
+
import { SmartLinkDraggable, SMART_LINK_DRAG_TYPES, SMART_LINK_APPERANCE } from '@atlaskit/editor-smart-link-draggable';
|
|
9
10
|
import { Card as SmartCard } from '@atlaskit/smart-card';
|
|
10
11
|
import { CardSSR } from '@atlaskit/smart-card/ssr';
|
|
11
12
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
@@ -181,7 +182,7 @@ export function InlineCardNodeView(props) {
|
|
|
181
182
|
sourceUrl: url,
|
|
182
183
|
linkType: "inline"
|
|
183
184
|
}) : null;
|
|
184
|
-
|
|
185
|
+
var inlineCardContent = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(WrappedInlineCardWithAwareness, _extends({
|
|
185
186
|
node: node,
|
|
186
187
|
view: view,
|
|
187
188
|
getPos: getPos,
|
|
@@ -195,6 +196,11 @@ export function InlineCardNodeView(props) {
|
|
|
195
196
|
// Ignored via go/ees005
|
|
196
197
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
197
198
|
}, enableInlineUpgradeFeatures && getAwarenessProps(view.state, getPos, allowEmbeds, allowBlockCards, mode === 'view'))), CompetitorPromptComponent);
|
|
199
|
+
return expValEquals('cc_drag_and_drop_smart_link_from_content_to_tree', 'isEnabled', true) ? /*#__PURE__*/React.createElement(SmartLinkDraggable, {
|
|
200
|
+
url: url,
|
|
201
|
+
appearance: SMART_LINK_APPERANCE.INLINE,
|
|
202
|
+
source: SMART_LINK_DRAG_TYPES.EDITOR
|
|
203
|
+
}, inlineCardContent) : inlineCardContent;
|
|
198
204
|
}
|
|
199
205
|
export var inlineCardNodeView = function inlineCardNodeView(_ref4) {
|
|
200
206
|
var inlineCardViewProducer = _ref4.inlineCardViewProducer;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "12.4.
|
|
3
|
+
"version": "12.4.2",
|
|
4
4
|
"description": "Card plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"@atlaskit/editor-plugin-width": "^8.1.0",
|
|
46
46
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
47
47
|
"@atlaskit/editor-shared-styles": "^3.10.0",
|
|
48
|
+
"@atlaskit/editor-smart-link-draggable": "^0.1.0",
|
|
48
49
|
"@atlaskit/frontend-utilities": "^3.2.0",
|
|
49
50
|
"@atlaskit/icon": "^32.0.0",
|
|
50
51
|
"@atlaskit/link": "^3.3.0",
|
|
@@ -61,7 +62,7 @@
|
|
|
61
62
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
62
63
|
"@atlaskit/smart-card": "^43.25.0",
|
|
63
64
|
"@atlaskit/theme": "^22.0.0",
|
|
64
|
-
"@atlaskit/tmp-editor-statsig": "^34.
|
|
65
|
+
"@atlaskit/tmp-editor-statsig": "^34.4.0",
|
|
65
66
|
"@atlaskit/tokens": "^11.0.0",
|
|
66
67
|
"@babel/runtime": "^7.0.0",
|
|
67
68
|
"@emotion/react": "^11.7.1",
|
|
@@ -71,7 +72,7 @@
|
|
|
71
72
|
"uuid": "^3.1.0"
|
|
72
73
|
},
|
|
73
74
|
"peerDependencies": {
|
|
74
|
-
"@atlaskit/editor-common": "^111.
|
|
75
|
+
"@atlaskit/editor-common": "^111.29.0",
|
|
75
76
|
"@atlaskit/link-provider": "^4.2.0",
|
|
76
77
|
"react": "^18.2.0",
|
|
77
78
|
"react-intl-next": "npm:react-intl@^5.18.1"
|