@atlaskit/editor-plugin-card 0.14.21 → 0.14.22
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,11 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-card
|
|
2
2
|
|
|
3
|
+
## 0.14.22
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#61458](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/61458) [`f69cbc65f2ea`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f69cbc65f2ea) - Avoid mutating state directly
|
|
8
|
+
|
|
3
9
|
## 0.14.21
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -84,7 +84,7 @@ var HyperlinkToolbarAppearance = exports.HyperlinkToolbarAppearance = /*#__PURE_
|
|
|
84
84
|
})));
|
|
85
85
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "resolveUrl", /*#__PURE__*/function () {
|
|
86
86
|
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(url) {
|
|
87
|
-
var supportedUrlsMap, isUrlSupported, provider;
|
|
87
|
+
var supportedUrlsMap, isUrlSupported, provider, newMap;
|
|
88
88
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
89
89
|
while (1) switch (_context3.prev = _context3.next) {
|
|
90
90
|
case 0:
|
|
@@ -112,11 +112,12 @@ var HyperlinkToolbarAppearance = exports.HyperlinkToolbarAppearance = /*#__PURE_
|
|
|
112
112
|
_context3.t0 = _context3["catch"](4);
|
|
113
113
|
isUrlSupported = false;
|
|
114
114
|
case 16:
|
|
115
|
-
supportedUrlsMap
|
|
115
|
+
newMap = new Map(supportedUrlsMap);
|
|
116
|
+
newMap.set(url, isUrlSupported);
|
|
116
117
|
_this.setState({
|
|
117
|
-
supportedUrlsMap:
|
|
118
|
+
supportedUrlsMap: newMap
|
|
118
119
|
});
|
|
119
|
-
case
|
|
120
|
+
case 19:
|
|
120
121
|
case "end":
|
|
121
122
|
return _context3.stop();
|
|
122
123
|
}
|
|
@@ -41,9 +41,10 @@ export class HyperlinkToolbarAppearance extends Component {
|
|
|
41
41
|
} catch (error) {
|
|
42
42
|
isUrlSupported = false;
|
|
43
43
|
}
|
|
44
|
-
supportedUrlsMap
|
|
44
|
+
const newMap = new Map(supportedUrlsMap);
|
|
45
|
+
newMap.set(url, isUrlSupported);
|
|
45
46
|
this.setState({
|
|
46
|
-
supportedUrlsMap
|
|
47
|
+
supportedUrlsMap: newMap
|
|
47
48
|
});
|
|
48
49
|
});
|
|
49
50
|
_defineProperty(this, "componentDidMount", () => this.resolveUrl(this.props.url));
|
|
@@ -74,7 +74,7 @@ export var HyperlinkToolbarAppearance = /*#__PURE__*/function (_Component) {
|
|
|
74
74
|
})));
|
|
75
75
|
_defineProperty(_assertThisInitialized(_this), "resolveUrl", /*#__PURE__*/function () {
|
|
76
76
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(url) {
|
|
77
|
-
var supportedUrlsMap, isUrlSupported, provider;
|
|
77
|
+
var supportedUrlsMap, isUrlSupported, provider, newMap;
|
|
78
78
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
79
79
|
while (1) switch (_context3.prev = _context3.next) {
|
|
80
80
|
case 0:
|
|
@@ -102,11 +102,12 @@ export var HyperlinkToolbarAppearance = /*#__PURE__*/function (_Component) {
|
|
|
102
102
|
_context3.t0 = _context3["catch"](4);
|
|
103
103
|
isUrlSupported = false;
|
|
104
104
|
case 16:
|
|
105
|
-
supportedUrlsMap
|
|
105
|
+
newMap = new Map(supportedUrlsMap);
|
|
106
|
+
newMap.set(url, isUrlSupported);
|
|
106
107
|
_this.setState({
|
|
107
|
-
supportedUrlsMap:
|
|
108
|
+
supportedUrlsMap: newMap
|
|
108
109
|
});
|
|
109
|
-
case
|
|
110
|
+
case 19:
|
|
110
111
|
case "end":
|
|
111
112
|
return _context3.stop();
|
|
112
113
|
}
|