@atlaskit/editor-plugin-card 6.1.3 → 6.3.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 +26 -0
- package/dist/cjs/nodeviews/genericCard.js +10 -1
- package/dist/cjs/ui/toolbar.js +12 -12
- package/dist/es2019/nodeviews/genericCard.js +10 -1
- package/dist/es2019/ui/toolbar.js +5 -5
- package/dist/esm/nodeviews/genericCard.js +10 -1
- package/dist/esm/ui/toolbar.js +5 -5
- package/package.json +8 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-card
|
|
2
2
|
|
|
3
|
+
## 6.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#157092](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/157092)
|
|
8
|
+
[`87491e7b53b65`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/87491e7b53b65) -
|
|
9
|
+
We are testing the migration to the ADS Link component behind a feature flag. If this fix is
|
|
10
|
+
successful it will be available in a later release.
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
16
|
+
## 6.2.0
|
|
17
|
+
|
|
18
|
+
### Minor Changes
|
|
19
|
+
|
|
20
|
+
- [#158037](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/158037)
|
|
21
|
+
[`f217faa73de90`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f217faa73de90) -
|
|
22
|
+
[ux] ENGHEALTH-30614 updating legacy icon imports for iconography uplift migration linking
|
|
23
|
+
platform
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
|
|
3
29
|
## 6.1.3
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|
|
@@ -19,6 +19,7 @@ var _analyticsNext = require("@atlaskit/analytics-next");
|
|
|
19
19
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
20
20
|
var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
|
|
21
21
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
22
|
+
var _link = _interopRequireDefault(require("@atlaskit/link"));
|
|
22
23
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
23
24
|
var _doc = require("../pm-plugins/doc");
|
|
24
25
|
var _state = require("../pm-plugins/util/state");
|
|
@@ -118,7 +119,15 @@ function Card(SmartCardComponent, UnsupportedComponent) {
|
|
|
118
119
|
}
|
|
119
120
|
if (this.state.isError) {
|
|
120
121
|
if (url) {
|
|
121
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
122
|
+
return (0, _platformFeatureFlags.fg)('dst-a11y__replace-anchor-with-link__linking-platfo') ? /*#__PURE__*/_react.default.createElement(_link.default, {
|
|
123
|
+
href: url,
|
|
124
|
+
onClick: function onClick(e) {
|
|
125
|
+
e.preventDefault();
|
|
126
|
+
}
|
|
127
|
+
}, url) :
|
|
128
|
+
/*#__PURE__*/
|
|
129
|
+
// eslint-disable-next-line @atlaskit/design-system/no-html-anchor
|
|
130
|
+
_react.default.createElement("a", {
|
|
122
131
|
href: url,
|
|
123
132
|
onClick: function onClick(e) {
|
|
124
133
|
e.preventDefault();
|
package/dist/cjs/ui/toolbar.js
CHANGED
|
@@ -25,12 +25,12 @@ var _delete = _interopRequireDefault(require("@atlaskit/icon/core/delete"));
|
|
|
25
25
|
var _edit = _interopRequireDefault(require("@atlaskit/icon/core/edit"));
|
|
26
26
|
var _linkBroken = _interopRequireDefault(require("@atlaskit/icon/core/link-broken"));
|
|
27
27
|
var _linkExternal = _interopRequireDefault(require("@atlaskit/icon/core/link-external"));
|
|
28
|
+
var _comment2 = _interopRequireDefault(require("@atlaskit/icon/core/migration/comment"));
|
|
29
|
+
var _deleteEditorRemove = _interopRequireDefault(require("@atlaskit/icon/core/migration/delete--editor-remove"));
|
|
30
|
+
var _linkBrokenEditorUnlink = _interopRequireDefault(require("@atlaskit/icon/core/migration/link-broken--editor-unlink"));
|
|
31
|
+
var _linkExternalShortcut = _interopRequireDefault(require("@atlaskit/icon/core/migration/link-external--shortcut"));
|
|
32
|
+
var _settingsEditorSettings = _interopRequireDefault(require("@atlaskit/icon/core/migration/settings--editor-settings"));
|
|
28
33
|
var _settings = _interopRequireDefault(require("@atlaskit/icon/core/settings"));
|
|
29
|
-
var _comment2 = _interopRequireDefault(require("@atlaskit/icon/glyph/comment"));
|
|
30
|
-
var _remove = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/remove"));
|
|
31
|
-
var _settings2 = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/settings"));
|
|
32
|
-
var _unlink = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/unlink"));
|
|
33
|
-
var _shortcut = _interopRequireDefault(require("@atlaskit/icon/glyph/shortcut"));
|
|
34
34
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
35
35
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
36
36
|
var _doc = require("../pm-plugins/doc");
|
|
@@ -353,7 +353,7 @@ var generateToolbarItems = function generateToolbarItems(state, intl, providerFa
|
|
|
353
353
|
id: 'editor.link.openLink',
|
|
354
354
|
type: 'button',
|
|
355
355
|
icon: _linkExternal.default,
|
|
356
|
-
iconFallback:
|
|
356
|
+
iconFallback: _linkExternalShortcut.default,
|
|
357
357
|
metadata: metadata,
|
|
358
358
|
className: 'hyperlink-open-link',
|
|
359
359
|
title: intl.formatMessage(_messages.linkMessages.openLink),
|
|
@@ -380,7 +380,7 @@ var generateToolbarItems = function generateToolbarItems(state, intl, providerFa
|
|
|
380
380
|
type: 'button',
|
|
381
381
|
appearance: 'danger',
|
|
382
382
|
icon: _delete.default,
|
|
383
|
-
iconFallback:
|
|
383
|
+
iconFallback: _deleteEditorRemove.default,
|
|
384
384
|
onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(node.type, true),
|
|
385
385
|
onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(node.type, false),
|
|
386
386
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(node.type, true),
|
|
@@ -393,7 +393,7 @@ var generateToolbarItems = function generateToolbarItems(state, intl, providerFa
|
|
|
393
393
|
id: 'editor.link.openLink',
|
|
394
394
|
type: 'button',
|
|
395
395
|
icon: _linkExternal.default,
|
|
396
|
-
iconFallback:
|
|
396
|
+
iconFallback: _linkExternalShortcut.default,
|
|
397
397
|
metadata: metadata,
|
|
398
398
|
className: 'hyperlink-open-link',
|
|
399
399
|
title: intl.formatMessage(_messages.linkMessages.openLink),
|
|
@@ -519,7 +519,7 @@ var getUnlinkButtonGroup = function getUnlinkButtonGroup(state, intl, node, inli
|
|
|
519
519
|
type: 'button',
|
|
520
520
|
title: intl.formatMessage(_messages.linkToolbarMessages.unlink),
|
|
521
521
|
icon: _linkBroken.default,
|
|
522
|
-
iconFallback:
|
|
522
|
+
iconFallback: _linkBrokenEditorUnlink.default,
|
|
523
523
|
onClick: withToolbarMetadata(unlinkCard(node, state, editorAnalyticsApi))
|
|
524
524
|
}].concat((0, _toConsumableArray2.default)((0, _platformFeatureFlags.fg)('platform_editor_controls_patch_6') ? [] : [{
|
|
525
525
|
type: 'separator'
|
|
@@ -530,7 +530,7 @@ var getSettingsButton = exports.getSettingsButton = function getSettingsButton(i
|
|
|
530
530
|
id: 'editor.link.settings',
|
|
531
531
|
type: 'button',
|
|
532
532
|
icon: _settings.default,
|
|
533
|
-
iconFallback:
|
|
533
|
+
iconFallback: _settingsEditorSettings.default,
|
|
534
534
|
title: intl.formatMessage(_messages.linkToolbarMessages.settingsLink),
|
|
535
535
|
onClick: openLinkSettings(editorAnalyticsApi),
|
|
536
536
|
href: userPreferencesLink || (0, _link.getLinkPreferencesURLFromENV)(),
|
|
@@ -629,7 +629,7 @@ var getDatasourceButtonGroup = function getDatasourceButtonGroup(metadata, intl,
|
|
|
629
629
|
id: 'editor.link.openLink',
|
|
630
630
|
type: 'button',
|
|
631
631
|
icon: _linkExternal.default,
|
|
632
|
-
iconFallback:
|
|
632
|
+
iconFallback: _linkExternalShortcut.default,
|
|
633
633
|
metadata: metadata,
|
|
634
634
|
className: 'hyperlink-open-link',
|
|
635
635
|
title: intl.formatMessage(_messages.linkMessages.openLink),
|
|
@@ -663,7 +663,7 @@ var getDatasourceButtonGroup = function getDatasourceButtonGroup(metadata, intl,
|
|
|
663
663
|
type: 'button',
|
|
664
664
|
appearance: 'danger',
|
|
665
665
|
icon: _delete.default,
|
|
666
|
-
iconFallback:
|
|
666
|
+
iconFallback: _deleteEditorRemove.default,
|
|
667
667
|
onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(node.type, true),
|
|
668
668
|
onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(node.type, false),
|
|
669
669
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(node.type, true),
|
|
@@ -6,6 +6,7 @@ import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
|
6
6
|
import { sharedPluginStateHookMigratorFactory, useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
7
7
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
8
8
|
import { getAnalyticsEditorAppearance } from '@atlaskit/editor-common/utils';
|
|
9
|
+
import Link from '@atlaskit/link';
|
|
9
10
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
11
|
import { changeSelectedCardToLinkFallback } from '../pm-plugins/doc';
|
|
11
12
|
import { getPluginState } from '../pm-plugins/util/state';
|
|
@@ -96,7 +97,15 @@ export function Card(SmartCardComponent, UnsupportedComponent) {
|
|
|
96
97
|
}
|
|
97
98
|
if (this.state.isError) {
|
|
98
99
|
if (url) {
|
|
99
|
-
return /*#__PURE__*/React.createElement(
|
|
100
|
+
return fg('dst-a11y__replace-anchor-with-link__linking-platfo') ? /*#__PURE__*/React.createElement(Link, {
|
|
101
|
+
href: url,
|
|
102
|
+
onClick: e => {
|
|
103
|
+
e.preventDefault();
|
|
104
|
+
}
|
|
105
|
+
}, url) :
|
|
106
|
+
/*#__PURE__*/
|
|
107
|
+
// eslint-disable-next-line @atlaskit/design-system/no-html-anchor
|
|
108
|
+
React.createElement("a", {
|
|
100
109
|
href: url,
|
|
101
110
|
onClick: e => {
|
|
102
111
|
e.preventDefault();
|
|
@@ -15,12 +15,12 @@ import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
|
15
15
|
import EditIcon from '@atlaskit/icon/core/edit';
|
|
16
16
|
import LinkBrokenIcon from '@atlaskit/icon/core/link-broken';
|
|
17
17
|
import LinkExternalIcon from '@atlaskit/icon/core/link-external';
|
|
18
|
+
import LegacyCommentIcon from '@atlaskit/icon/core/migration/comment';
|
|
19
|
+
import RemoveIcon from '@atlaskit/icon/core/migration/delete--editor-remove';
|
|
20
|
+
import UnlinkIcon from '@atlaskit/icon/core/migration/link-broken--editor-unlink';
|
|
21
|
+
import OpenIcon from '@atlaskit/icon/core/migration/link-external--shortcut';
|
|
22
|
+
import CogIcon from '@atlaskit/icon/core/migration/settings--editor-settings';
|
|
18
23
|
import SettingsIcon from '@atlaskit/icon/core/settings';
|
|
19
|
-
import LegacyCommentIcon from '@atlaskit/icon/glyph/comment';
|
|
20
|
-
import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
21
|
-
import CogIcon from '@atlaskit/icon/glyph/editor/settings';
|
|
22
|
-
import UnlinkIcon from '@atlaskit/icon/glyph/editor/unlink';
|
|
23
|
-
import OpenIcon from '@atlaskit/icon/glyph/shortcut';
|
|
24
24
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
25
25
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
26
26
|
import { changeSelectedCardToText } from '../pm-plugins/doc';
|
|
@@ -13,6 +13,7 @@ import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
|
13
13
|
import { sharedPluginStateHookMigratorFactory, useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
14
14
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
15
15
|
import { getAnalyticsEditorAppearance } from '@atlaskit/editor-common/utils';
|
|
16
|
+
import Link from '@atlaskit/link';
|
|
16
17
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
18
|
import { changeSelectedCardToLinkFallback } from '../pm-plugins/doc';
|
|
18
19
|
import { getPluginState } from '../pm-plugins/util/state';
|
|
@@ -108,7 +109,15 @@ export function Card(SmartCardComponent, UnsupportedComponent) {
|
|
|
108
109
|
}
|
|
109
110
|
if (this.state.isError) {
|
|
110
111
|
if (url) {
|
|
111
|
-
return /*#__PURE__*/React.createElement(
|
|
112
|
+
return fg('dst-a11y__replace-anchor-with-link__linking-platfo') ? /*#__PURE__*/React.createElement(Link, {
|
|
113
|
+
href: url,
|
|
114
|
+
onClick: function onClick(e) {
|
|
115
|
+
e.preventDefault();
|
|
116
|
+
}
|
|
117
|
+
}, url) :
|
|
118
|
+
/*#__PURE__*/
|
|
119
|
+
// eslint-disable-next-line @atlaskit/design-system/no-html-anchor
|
|
120
|
+
React.createElement("a", {
|
|
112
121
|
href: url,
|
|
113
122
|
onClick: function onClick(e) {
|
|
114
123
|
e.preventDefault();
|
package/dist/esm/ui/toolbar.js
CHANGED
|
@@ -19,12 +19,12 @@ import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
|
19
19
|
import EditIcon from '@atlaskit/icon/core/edit';
|
|
20
20
|
import LinkBrokenIcon from '@atlaskit/icon/core/link-broken';
|
|
21
21
|
import LinkExternalIcon from '@atlaskit/icon/core/link-external';
|
|
22
|
+
import LegacyCommentIcon from '@atlaskit/icon/core/migration/comment';
|
|
23
|
+
import RemoveIcon from '@atlaskit/icon/core/migration/delete--editor-remove';
|
|
24
|
+
import UnlinkIcon from '@atlaskit/icon/core/migration/link-broken--editor-unlink';
|
|
25
|
+
import OpenIcon from '@atlaskit/icon/core/migration/link-external--shortcut';
|
|
26
|
+
import CogIcon from '@atlaskit/icon/core/migration/settings--editor-settings';
|
|
22
27
|
import SettingsIcon from '@atlaskit/icon/core/settings';
|
|
23
|
-
import LegacyCommentIcon from '@atlaskit/icon/glyph/comment';
|
|
24
|
-
import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
25
|
-
import CogIcon from '@atlaskit/icon/glyph/editor/settings';
|
|
26
|
-
import UnlinkIcon from '@atlaskit/icon/glyph/editor/unlink';
|
|
27
|
-
import OpenIcon from '@atlaskit/icon/glyph/shortcut';
|
|
28
28
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
29
29
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
30
30
|
import { changeSelectedCardToText } from '../pm-plugins/doc';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.3.0",
|
|
4
4
|
"description": "Card plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@atlaskit/analytics-next": "^11.0.0",
|
|
38
38
|
"@atlaskit/button": "^23.2.0",
|
|
39
39
|
"@atlaskit/custom-steps": "^0.11.0",
|
|
40
|
-
"@atlaskit/editor-common": "^105.
|
|
40
|
+
"@atlaskit/editor-common": "^105.7.0",
|
|
41
41
|
"@atlaskit/editor-plugin-analytics": "^2.3.0",
|
|
42
42
|
"@atlaskit/editor-plugin-base": "^3.0.0",
|
|
43
43
|
"@atlaskit/editor-plugin-connectivity": "^2.0.0",
|
|
@@ -52,15 +52,16 @@
|
|
|
52
52
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
53
53
|
"@atlaskit/frontend-utilities": "^3.0.0",
|
|
54
54
|
"@atlaskit/icon": "^26.1.0",
|
|
55
|
+
"@atlaskit/link": "^3.2.0",
|
|
55
56
|
"@atlaskit/link-analytics": "^10.0.0",
|
|
56
57
|
"@atlaskit/link-client-extension": "^5.0.0",
|
|
57
|
-
"@atlaskit/link-datasource": "^4.
|
|
58
|
+
"@atlaskit/link-datasource": "^4.11.0",
|
|
58
59
|
"@atlaskit/linking-common": "^9.0.0",
|
|
59
60
|
"@atlaskit/linking-types": "^9.10.0",
|
|
60
61
|
"@atlaskit/menu": "^7.1.0",
|
|
61
62
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
62
63
|
"@atlaskit/primitives": "^14.8.0",
|
|
63
|
-
"@atlaskit/smart-card": "^38.
|
|
64
|
+
"@atlaskit/smart-card": "^38.3.0",
|
|
64
65
|
"@atlaskit/theme": "^18.0.0",
|
|
65
66
|
"@atlaskit/tmp-editor-statsig": "^4.22.0",
|
|
66
67
|
"@atlaskit/tokens": "^4.9.0",
|
|
@@ -158,6 +159,9 @@
|
|
|
158
159
|
"prompt_whiteboard_competitor_link_gate": {
|
|
159
160
|
"type": "boolean"
|
|
160
161
|
},
|
|
162
|
+
"dst-a11y__replace-anchor-with-link__linking-platfo": {
|
|
163
|
+
"type": "boolean"
|
|
164
|
+
},
|
|
161
165
|
"platform_editor_cards_maxcallstackfix": {
|
|
162
166
|
"type": "boolean"
|
|
163
167
|
}
|