@atlaskit/editor-plugin-card 6.2.0 → 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 CHANGED
@@ -1,5 +1,18 @@
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
+
3
16
  ## 6.2.0
4
17
 
5
18
  ### Minor 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("a", {
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();
@@ -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("a", {
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();
@@ -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("a", {
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-card",
3
- "version": "6.2.0",
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.6.0",
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.10.0",
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.2.0",
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
  }