@atlaskit/editor-plugin-card 11.4.2 → 11.4.4
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,24 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-card
|
|
2
2
|
|
|
3
|
+
## 11.4.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`21fe79119fe74`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/21fe79119fe74) -
|
|
8
|
+
EDITOR-2447 Bump adf-schema to 51.3.2
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 11.4.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`9854f5d3e02e7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9854f5d3e02e7) -
|
|
16
|
+
EDITOR-2416: Add a fatal error position map to cache errors to prevent the failed link conversion
|
|
17
|
+
to run multiple times for the same links at the same positions.
|
|
18
|
+
- [`c28cd65d12c24`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c28cd65d12c24) -
|
|
19
|
+
EDITOR-2447 Bump adf-schema to 51.3.1
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 11.4.2
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -27,6 +27,7 @@ var _WithCardContext = require("../ui/WithCardContext");
|
|
|
27
27
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
28
28
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
29
29
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
30
|
+
var fatalErrorPositionMap = new Map();
|
|
30
31
|
var WithClickHandler = function WithClickHandler(_ref) {
|
|
31
32
|
var pluginInjectionApi = _ref.pluginInjectionApi,
|
|
32
33
|
url = _ref.url,
|
|
@@ -164,7 +165,19 @@ function Card(SmartCardComponent, UnsupportedComponent) {
|
|
|
164
165
|
if (!getPos || typeof getPos === 'boolean') {
|
|
165
166
|
return;
|
|
166
167
|
}
|
|
168
|
+
var pos = getPos();
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* We cache fatal errors by position to avoid retrying the same errors
|
|
172
|
+
* on the same links at the same position.
|
|
173
|
+
*/
|
|
174
|
+
if (url && pos && fatalErrorPositionMap.get(url) === pos && (0, _platformFeatureFlags.fg)('platform_editor_ai_aifc_patch_beta_2')) {
|
|
175
|
+
return null;
|
|
176
|
+
}
|
|
167
177
|
(0, _doc.changeSelectedCardToLinkFallback)(undefined, url, true, node, getPos(), pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions)(view.state, view.dispatch);
|
|
178
|
+
if (url && pos && (0, _platformFeatureFlags.fg)('platform_editor_ai_aifc_patch_beta_2')) {
|
|
179
|
+
fatalErrorPositionMap.set(url, pos);
|
|
180
|
+
}
|
|
168
181
|
return null;
|
|
169
182
|
} else {
|
|
170
183
|
// Otherwise, render a blue link as fallback (above in render()).
|
|
@@ -11,6 +11,7 @@ import { changeSelectedCardToLinkFallback } from '../pm-plugins/doc';
|
|
|
11
11
|
import { getPluginState } from '../pm-plugins/util/state';
|
|
12
12
|
import { titleUrlPairFromNode } from '../pm-plugins/utils';
|
|
13
13
|
import { WithCardContext } from '../ui/WithCardContext';
|
|
14
|
+
const fatalErrorPositionMap = new Map();
|
|
14
15
|
const WithClickHandler = ({
|
|
15
16
|
pluginInjectionApi,
|
|
16
17
|
url,
|
|
@@ -139,7 +140,19 @@ export function Card(SmartCardComponent, UnsupportedComponent) {
|
|
|
139
140
|
if (!getPos || typeof getPos === 'boolean') {
|
|
140
141
|
return;
|
|
141
142
|
}
|
|
143
|
+
const pos = getPos();
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* We cache fatal errors by position to avoid retrying the same errors
|
|
147
|
+
* on the same links at the same position.
|
|
148
|
+
*/
|
|
149
|
+
if (url && pos && fatalErrorPositionMap.get(url) === pos && fg('platform_editor_ai_aifc_patch_beta_2')) {
|
|
150
|
+
return null;
|
|
151
|
+
}
|
|
142
152
|
changeSelectedCardToLinkFallback(undefined, url, true, node, getPos(), pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions)(view.state, view.dispatch);
|
|
153
|
+
if (url && pos && fg('platform_editor_ai_aifc_patch_beta_2')) {
|
|
154
|
+
fatalErrorPositionMap.set(url, pos);
|
|
155
|
+
}
|
|
143
156
|
return null;
|
|
144
157
|
} else {
|
|
145
158
|
// Otherwise, render a blue link as fallback (above in render()).
|
|
@@ -18,6 +18,7 @@ import { changeSelectedCardToLinkFallback } from '../pm-plugins/doc';
|
|
|
18
18
|
import { getPluginState } from '../pm-plugins/util/state';
|
|
19
19
|
import { titleUrlPairFromNode } from '../pm-plugins/utils';
|
|
20
20
|
import { WithCardContext } from '../ui/WithCardContext';
|
|
21
|
+
var fatalErrorPositionMap = new Map();
|
|
21
22
|
var WithClickHandler = function WithClickHandler(_ref) {
|
|
22
23
|
var pluginInjectionApi = _ref.pluginInjectionApi,
|
|
23
24
|
url = _ref.url,
|
|
@@ -155,7 +156,19 @@ export function Card(SmartCardComponent, UnsupportedComponent) {
|
|
|
155
156
|
if (!getPos || typeof getPos === 'boolean') {
|
|
156
157
|
return;
|
|
157
158
|
}
|
|
159
|
+
var pos = getPos();
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* We cache fatal errors by position to avoid retrying the same errors
|
|
163
|
+
* on the same links at the same position.
|
|
164
|
+
*/
|
|
165
|
+
if (url && pos && fatalErrorPositionMap.get(url) === pos && fg('platform_editor_ai_aifc_patch_beta_2')) {
|
|
166
|
+
return null;
|
|
167
|
+
}
|
|
158
168
|
changeSelectedCardToLinkFallback(undefined, url, true, node, getPos(), pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions)(view.state, view.dispatch);
|
|
169
|
+
if (url && pos && fg('platform_editor_ai_aifc_patch_beta_2')) {
|
|
170
|
+
fatalErrorPositionMap.set(url, pos);
|
|
171
|
+
}
|
|
159
172
|
return null;
|
|
160
173
|
} else {
|
|
161
174
|
// Otherwise, render a blue link as fallback (above in render()).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "11.4.
|
|
3
|
+
"version": "11.4.4",
|
|
4
4
|
"description": "Card plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
],
|
|
30
30
|
"atlaskit:src": "src/index.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@atlaskit/adf-schema": "^51.3.
|
|
32
|
+
"@atlaskit/adf-schema": "^51.3.2",
|
|
33
33
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
34
34
|
"@atlaskit/button": "^23.5.0",
|
|
35
35
|
"@atlaskit/custom-steps": "^0.16.0",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@atlaskit/editor-plugin-feature-flags": "^5.0.0",
|
|
44
44
|
"@atlaskit/editor-plugin-floating-toolbar": "^8.2.0",
|
|
45
45
|
"@atlaskit/editor-plugin-grid": "^6.0.0",
|
|
46
|
-
"@atlaskit/editor-plugin-toolbar": "^3.
|
|
46
|
+
"@atlaskit/editor-plugin-toolbar": "^3.4.0",
|
|
47
47
|
"@atlaskit/editor-plugin-width": "^7.0.0",
|
|
48
48
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
49
49
|
"@atlaskit/editor-shared-styles": "^3.8.0",
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
"@atlaskit/platform-feature-flags-react": "^0.3.0",
|
|
62
62
|
"@atlaskit/primitives": "^16.0.0",
|
|
63
63
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
64
|
-
"@atlaskit/smart-card": "^43.
|
|
64
|
+
"@atlaskit/smart-card": "^43.3.0",
|
|
65
65
|
"@atlaskit/theme": "^21.0.0",
|
|
66
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
66
|
+
"@atlaskit/tmp-editor-statsig": "^13.18.0",
|
|
67
67
|
"@atlaskit/tokens": "^7.0.0",
|
|
68
68
|
"@babel/runtime": "^7.0.0",
|
|
69
69
|
"@emotion/react": "^11.7.1",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"uuid": "^3.1.0"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
|
-
"@atlaskit/editor-common": "^110.
|
|
76
|
+
"@atlaskit/editor-common": "^110.18.0",
|
|
77
77
|
"@atlaskit/link-provider": "^4.0.0",
|
|
78
78
|
"react": "^18.2.0",
|
|
79
79
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
@@ -129,6 +129,9 @@
|
|
|
129
129
|
},
|
|
130
130
|
"aifc_create_enabled": {
|
|
131
131
|
"type": "boolean"
|
|
132
|
+
},
|
|
133
|
+
"platform_editor_ai_aifc_patch_beta_2": {
|
|
134
|
+
"type": "boolean"
|
|
132
135
|
}
|
|
133
136
|
},
|
|
134
137
|
"stricter": {
|