@atlaskit/editor-common 96.4.0 → 96.4.1
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 +9 -0
- package/dist/cjs/analytics/analytics-queue.js +4 -5
- package/dist/cjs/annotation/index.js +9 -10
- package/dist/cjs/element-browser/ElementBrowser.js +11 -14
- package/dist/cjs/event-dispatcher/index.js +1 -2
- package/dist/cjs/extensibility/Extension/Lozenge/index.js +7 -10
- package/dist/cjs/extensibility/Extension.js +6 -9
- package/dist/cjs/extensibility/ExtensionComponent.js +25 -30
- package/dist/cjs/extensibility/extensionNodeView.js +5 -7
- package/dist/cjs/extensions/default-extension-provider.js +1 -2
- package/dist/cjs/lazy-node-view/lazy-scheduler.js +1 -1
- package/dist/cjs/lazy-node-view/node-view.js +1 -2
- package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +39 -45
- package/dist/cjs/link/LinkSearch/LinkSearchList.js +5 -7
- package/dist/cjs/link/LinkSearch/LinkSearchListItem.js +9 -12
- package/dist/cjs/link/LinkSearch/index.js +13 -16
- package/dist/cjs/link/LinkSearch/withActivityProvider.js +6 -9
- package/dist/cjs/media-inline/inline-image-wrapper.js +1 -2
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/portal/PortalManager.js +1 -2
- package/dist/cjs/preset/builder.js +2 -4
- package/dist/cjs/preset/editor-commands.js +4 -5
- package/dist/cjs/preset/plugin-injection-api.js +4 -8
- package/dist/cjs/provider-factory/provider-factory.js +1 -2
- package/dist/cjs/provider-factory/with-providers.js +8 -11
- package/dist/cjs/react-node-view/index.js +1 -2
- package/dist/cjs/safe-plugin/index.js +4 -5
- package/dist/cjs/selection/gap-cursor/selection.js +7 -11
- package/dist/cjs/selection-based-node-view/SelectionBasedNodeView.js +10 -13
- package/dist/cjs/styles/shared/media-single.js +21 -20
- package/dist/cjs/styles/shared/paragraph.js +1 -1
- package/dist/cjs/styles/shared/shadow.js +9 -8
- package/dist/cjs/styles/shared/table.js +1 -1
- package/dist/cjs/types/annotation/emitter.js +1 -2
- package/dist/cjs/ui/Caption/index.js +5 -7
- package/dist/cjs/ui/ContextPanel/context.js +8 -11
- package/dist/cjs/ui/DropList/index.js +22 -25
- package/dist/cjs/ui/ErrorBoundary/index.js +6 -9
- package/dist/cjs/ui/Expand/sharedStyles.js +1 -1
- package/dist/cjs/ui/IntlErrorBoundary/index.js +6 -9
- package/dist/cjs/ui/Layer/index.js +9 -12
- package/dist/cjs/ui/Mention/index.js +6 -9
- package/dist/cjs/ui/Mention/mention-with-providers.js +6 -9
- package/dist/cjs/ui/Messages/index.js +1 -1
- package/dist/cjs/ui/OverflowShadow/index.js +13 -16
- package/dist/cjs/ui/OverflowShadow/shadowObserver.js +3 -5
- package/dist/cjs/ui/PanelTextInput/index.js +10 -13
- package/dist/cjs/ui/Popup/index.js +14 -17
- package/dist/cjs/ui/ResizerLegacy/index.js +12 -16
- package/dist/cjs/ui/WithCreateAnalyticsEvent/index.js +5 -7
- package/dist/cjs/ui/with-outer-listeners.js +10 -13
- package/dist/cjs/ui-menu/Dropdown/index.js +9 -12
- package/dist/cjs/ui-menu/DropdownMenu/index.js +11 -14
- package/dist/cjs/ui-react/with-react-editor-view-outer-listeners.js +8 -11
- package/dist/cjs/utils/error-reporter.js +1 -2
- package/dist/cjs/utils/hyperlink.js +2 -4
- package/dist/cjs/utils/imageLoader.js +14 -19
- package/dist/cjs/utils/profiler/render-count.js +1 -2
- package/dist/cjs/utils/traversor.js +1 -2
- package/dist/cjs/with-plugin-state/index.js +28 -35
- package/dist/es2019/analytics/analytics-queue.js +3 -3
- package/dist/es2019/lazy-node-view/lazy-scheduler.js +1 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/styles/shared/paragraph.js +1 -1
- package/dist/es2019/styles/shared/table.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/Expand/sharedStyles.js +1 -1
- package/dist/es2019/ui/Messages/index.js +1 -1
- package/dist/esm/analytics/analytics-queue.js +4 -5
- package/dist/esm/annotation/index.js +9 -10
- package/dist/esm/element-browser/ElementBrowser.js +11 -14
- package/dist/esm/event-dispatcher/index.js +1 -2
- package/dist/esm/extensibility/Extension/Lozenge/index.js +7 -10
- package/dist/esm/extensibility/Extension.js +6 -9
- package/dist/esm/extensibility/ExtensionComponent.js +25 -30
- package/dist/esm/extensibility/extensionNodeView.js +5 -7
- package/dist/esm/extensions/default-extension-provider.js +1 -2
- package/dist/esm/lazy-node-view/lazy-scheduler.js +1 -1
- package/dist/esm/lazy-node-view/node-view.js +1 -2
- package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +39 -45
- package/dist/esm/link/LinkSearch/LinkSearchList.js +5 -7
- package/dist/esm/link/LinkSearch/LinkSearchListItem.js +9 -12
- package/dist/esm/link/LinkSearch/index.js +13 -16
- package/dist/esm/link/LinkSearch/withActivityProvider.js +6 -9
- package/dist/esm/media-inline/inline-image-wrapper.js +1 -2
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/portal/PortalManager.js +1 -2
- package/dist/esm/preset/builder.js +2 -4
- package/dist/esm/preset/editor-commands.js +4 -5
- package/dist/esm/preset/plugin-injection-api.js +4 -8
- package/dist/esm/provider-factory/provider-factory.js +1 -2
- package/dist/esm/provider-factory/with-providers.js +8 -11
- package/dist/esm/react-node-view/index.js +1 -2
- package/dist/esm/safe-plugin/index.js +4 -5
- package/dist/esm/selection/gap-cursor/selection.js +7 -11
- package/dist/esm/selection-based-node-view/SelectionBasedNodeView.js +10 -13
- package/dist/esm/styles/shared/media-single.js +19 -20
- package/dist/esm/styles/shared/paragraph.js +1 -1
- package/dist/esm/styles/shared/shadow.js +7 -8
- package/dist/esm/styles/shared/table.js +1 -1
- package/dist/esm/types/annotation/emitter.js +1 -2
- package/dist/esm/ui/Caption/index.js +5 -7
- package/dist/esm/ui/ContextPanel/context.js +8 -11
- package/dist/esm/ui/DropList/index.js +22 -25
- package/dist/esm/ui/ErrorBoundary/index.js +6 -9
- package/dist/esm/ui/Expand/sharedStyles.js +1 -1
- package/dist/esm/ui/IntlErrorBoundary/index.js +6 -9
- package/dist/esm/ui/Layer/index.js +9 -12
- package/dist/esm/ui/Mention/index.js +6 -9
- package/dist/esm/ui/Mention/mention-with-providers.js +6 -9
- package/dist/esm/ui/Messages/index.js +1 -1
- package/dist/esm/ui/OverflowShadow/index.js +13 -16
- package/dist/esm/ui/OverflowShadow/shadowObserver.js +3 -5
- package/dist/esm/ui/PanelTextInput/index.js +10 -13
- package/dist/esm/ui/Popup/index.js +14 -17
- package/dist/esm/ui/ResizerLegacy/index.js +12 -16
- package/dist/esm/ui/WithCreateAnalyticsEvent/index.js +5 -7
- package/dist/esm/ui/with-outer-listeners.js +10 -13
- package/dist/esm/ui-menu/Dropdown/index.js +9 -12
- package/dist/esm/ui-menu/DropdownMenu/index.js +11 -14
- package/dist/esm/ui-react/with-react-editor-view-outer-listeners.js +8 -11
- package/dist/esm/utils/error-reporter.js +1 -2
- package/dist/esm/utils/hyperlink.js +2 -4
- package/dist/esm/utils/imageLoader.js +14 -19
- package/dist/esm/utils/profiler/render-count.js +1 -2
- package/dist/esm/utils/traversor.js +1 -2
- package/dist/esm/with-plugin-state/index.js +28 -35
- package/package.json +3 -3
|
@@ -1,30 +1,27 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
8
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
-
function
|
|
8
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10
9
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
10
|
import React, { Component } from 'react';
|
|
12
11
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
12
|
export var withImageLoaderOld = function withImageLoaderOld(Wrapped) {
|
|
14
13
|
return /*#__PURE__*/function (_Component) {
|
|
15
|
-
_inherits(WithImageLoader, _Component);
|
|
16
|
-
var _super = _createSuper(WithImageLoader);
|
|
17
14
|
function WithImageLoader() {
|
|
18
15
|
var _this;
|
|
19
16
|
_classCallCheck(this, WithImageLoader);
|
|
20
17
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
21
18
|
args[_key] = arguments[_key];
|
|
22
19
|
}
|
|
23
|
-
_this =
|
|
24
|
-
_defineProperty(
|
|
20
|
+
_this = _callSuper(this, WithImageLoader, [].concat(args));
|
|
21
|
+
_defineProperty(_this, "state", {
|
|
25
22
|
imageStatus: 'loading'
|
|
26
23
|
});
|
|
27
|
-
_defineProperty(
|
|
24
|
+
_defineProperty(_this, "onLoad", function () {
|
|
28
25
|
_this.setState({
|
|
29
26
|
imageStatus: 'complete'
|
|
30
27
|
});
|
|
@@ -36,14 +33,15 @@ export var withImageLoaderOld = function withImageLoaderOld(Wrapped) {
|
|
|
36
33
|
});
|
|
37
34
|
}
|
|
38
35
|
});
|
|
39
|
-
_defineProperty(
|
|
36
|
+
_defineProperty(_this, "onError", function () {
|
|
40
37
|
_this.setState({
|
|
41
38
|
imageStatus: 'error'
|
|
42
39
|
});
|
|
43
40
|
});
|
|
44
41
|
return _this;
|
|
45
42
|
}
|
|
46
|
-
|
|
43
|
+
_inherits(WithImageLoader, _Component);
|
|
44
|
+
return _createClass(WithImageLoader, [{
|
|
47
45
|
key: "componentDidMount",
|
|
48
46
|
value: function componentDidMount() {
|
|
49
47
|
this.fetchImage(this.props);
|
|
@@ -89,24 +87,21 @@ export var withImageLoaderOld = function withImageLoaderOld(Wrapped) {
|
|
|
89
87
|
}));
|
|
90
88
|
}
|
|
91
89
|
}]);
|
|
92
|
-
return WithImageLoader;
|
|
93
90
|
}(Component);
|
|
94
91
|
};
|
|
95
92
|
var withImageLoaderNew = function withImageLoaderNew(Wrapped) {
|
|
96
93
|
return /*#__PURE__*/function (_Component2) {
|
|
97
|
-
_inherits(WithImageLoader, _Component2);
|
|
98
|
-
var _super2 = _createSuper(WithImageLoader);
|
|
99
94
|
function WithImageLoader() {
|
|
100
95
|
var _this2;
|
|
101
96
|
_classCallCheck(this, WithImageLoader);
|
|
102
97
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
103
98
|
args[_key2] = arguments[_key2];
|
|
104
99
|
}
|
|
105
|
-
_this2 =
|
|
106
|
-
_defineProperty(
|
|
100
|
+
_this2 = _callSuper(this, WithImageLoader, [].concat(args));
|
|
101
|
+
_defineProperty(_this2, "state", {
|
|
107
102
|
imageStatus: 'loading'
|
|
108
103
|
});
|
|
109
|
-
_defineProperty(
|
|
104
|
+
_defineProperty(_this2, "onLoad", function () {
|
|
110
105
|
_this2.setState({
|
|
111
106
|
imageStatus: 'complete'
|
|
112
107
|
});
|
|
@@ -118,14 +113,15 @@ var withImageLoaderNew = function withImageLoaderNew(Wrapped) {
|
|
|
118
113
|
});
|
|
119
114
|
}
|
|
120
115
|
});
|
|
121
|
-
_defineProperty(
|
|
116
|
+
_defineProperty(_this2, "onError", function () {
|
|
122
117
|
_this2.setState({
|
|
123
118
|
imageStatus: 'error'
|
|
124
119
|
});
|
|
125
120
|
});
|
|
126
121
|
return _this2;
|
|
127
122
|
}
|
|
128
|
-
|
|
123
|
+
_inherits(WithImageLoader, _Component2);
|
|
124
|
+
return _createClass(WithImageLoader, [{
|
|
129
125
|
key: "componentDidMount",
|
|
130
126
|
value: function componentDidMount() {
|
|
131
127
|
this.fetchImage(this.props);
|
|
@@ -171,7 +167,6 @@ var withImageLoaderNew = function withImageLoaderNew(Wrapped) {
|
|
|
171
167
|
}));
|
|
172
168
|
}
|
|
173
169
|
}]);
|
|
174
|
-
return WithImageLoader;
|
|
175
170
|
}(Component);
|
|
176
171
|
};
|
|
177
172
|
export var withImageLoader = function withImageLoader(Wrapped) {
|
|
@@ -22,7 +22,7 @@ export var RenderCountProfiler = /*#__PURE__*/function () {
|
|
|
22
22
|
* instance will be created using the given params. Returns the latest
|
|
23
23
|
* singleton/instance.
|
|
24
24
|
*/
|
|
25
|
-
_createClass(RenderCountProfiler, [{
|
|
25
|
+
return _createClass(RenderCountProfiler, [{
|
|
26
26
|
key: "getData",
|
|
27
27
|
value: function getData(profilerKey) {
|
|
28
28
|
var _this$store;
|
|
@@ -102,5 +102,4 @@ export var RenderCountProfiler = /*#__PURE__*/function () {
|
|
|
102
102
|
return RenderCountProfiler.instance;
|
|
103
103
|
}
|
|
104
104
|
}]);
|
|
105
|
-
return RenderCountProfiler;
|
|
106
105
|
}();
|
|
@@ -7,7 +7,7 @@ var ADFTraversor = /*#__PURE__*/function () {
|
|
|
7
7
|
_defineProperty(this, "subscribers", new Map());
|
|
8
8
|
this.doc = doc;
|
|
9
9
|
}
|
|
10
|
-
_createClass(ADFTraversor, [{
|
|
10
|
+
return _createClass(ADFTraversor, [{
|
|
11
11
|
key: "subscribe",
|
|
12
12
|
value: function subscribe(type, callback) {
|
|
13
13
|
var callbacks = this.subscribers.get(type);
|
|
@@ -39,6 +39,5 @@ var ADFTraversor = /*#__PURE__*/function () {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
}]);
|
|
42
|
-
return ADFTraversor;
|
|
43
42
|
}();
|
|
44
43
|
export default ADFTraversor;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
2
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
4
3
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
5
4
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
6
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
5
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
8
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
9
8
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10
9
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11
|
-
function
|
|
10
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
12
11
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
13
12
|
import React from 'react';
|
|
14
13
|
import PropTypes from 'prop-types';
|
|
@@ -62,13 +61,12 @@ var DEFAULT_SLOW_THRESHOLD = 4;
|
|
|
62
61
|
*
|
|
63
62
|
*/
|
|
64
63
|
var WithPluginState = /*#__PURE__*/function (_React$Component) {
|
|
65
|
-
_inherits(WithPluginState, _React$Component);
|
|
66
|
-
var _super = _createSuper(WithPluginState);
|
|
67
64
|
function WithPluginState(props) {
|
|
68
65
|
_classCallCheck(this, WithPluginState);
|
|
69
|
-
return
|
|
66
|
+
return _callSuper(this, WithPluginState, [props]);
|
|
70
67
|
}
|
|
71
|
-
|
|
68
|
+
_inherits(WithPluginState, _React$Component);
|
|
69
|
+
return _createClass(WithPluginState, [{
|
|
72
70
|
key: "render",
|
|
73
71
|
value: function render() {
|
|
74
72
|
if (fg('platform_editor_react18_phase2_v2')) {
|
|
@@ -77,7 +75,6 @@ var WithPluginState = /*#__PURE__*/function (_React$Component) {
|
|
|
77
75
|
return /*#__PURE__*/React.createElement(WithPluginStateOld, this.props);
|
|
78
76
|
}
|
|
79
77
|
}]);
|
|
80
|
-
return WithPluginState;
|
|
81
78
|
}(React.Component);
|
|
82
79
|
function WithPluginStateNew(props) {
|
|
83
80
|
var context = React.useContext(EditorContext);
|
|
@@ -86,18 +83,16 @@ function WithPluginStateNew(props) {
|
|
|
86
83
|
}));
|
|
87
84
|
}
|
|
88
85
|
export var WithPluginStateInner = /*#__PURE__*/function (_React$Component2) {
|
|
89
|
-
_inherits(WithPluginStateInner, _React$Component2);
|
|
90
|
-
var _super2 = _createSuper(WithPluginStateInner);
|
|
91
86
|
function WithPluginStateInner(props) {
|
|
92
87
|
var _this;
|
|
93
88
|
_classCallCheck(this, WithPluginStateInner);
|
|
94
|
-
_this =
|
|
95
|
-
_defineProperty(
|
|
96
|
-
_defineProperty(
|
|
97
|
-
_defineProperty(
|
|
98
|
-
_defineProperty(
|
|
99
|
-
_defineProperty(
|
|
100
|
-
_defineProperty(
|
|
89
|
+
_this = _callSuper(this, WithPluginStateInner, [props]);
|
|
90
|
+
_defineProperty(_this, "listeners", {});
|
|
91
|
+
_defineProperty(_this, "debounce", null);
|
|
92
|
+
_defineProperty(_this, "notAppliedState", {});
|
|
93
|
+
_defineProperty(_this, "isSubscribed", false);
|
|
94
|
+
_defineProperty(_this, "callsCount", 0);
|
|
95
|
+
_defineProperty(_this, "handlePluginStateChange", function (propName, pluginName, performanceOptions, skipEqualityCheck) {
|
|
101
96
|
return function (pluginState) {
|
|
102
97
|
// skipEqualityCheck is being used for old plugins since they are mutating plugin state instead of creating a new one
|
|
103
98
|
if (_this.state[propName] !== pluginState || skipEqualityCheck) {
|
|
@@ -112,7 +107,7 @@ export var WithPluginStateInner = /*#__PURE__*/function (_React$Component2) {
|
|
|
112
107
|
/**
|
|
113
108
|
* Debounces setState calls in order to reduce number of re-renders caused by several plugin state changes.
|
|
114
109
|
*/
|
|
115
|
-
_defineProperty(
|
|
110
|
+
_defineProperty(_this, "updateState", function (_ref) {
|
|
116
111
|
var stateSubset = _ref.stateSubset,
|
|
117
112
|
pluginName = _ref.pluginName,
|
|
118
113
|
performanceOptions = _ref.performanceOptions;
|
|
@@ -148,7 +143,7 @@ export var WithPluginStateInner = /*#__PURE__*/function (_React$Component2) {
|
|
|
148
143
|
_this.notAppliedState = {};
|
|
149
144
|
});
|
|
150
145
|
});
|
|
151
|
-
_defineProperty(
|
|
146
|
+
_defineProperty(_this, "dispatchAnalyticsEvent", function (payload) {
|
|
152
147
|
var eventDispatcher = _this.getEventDispatcher();
|
|
153
148
|
if (eventDispatcher) {
|
|
154
149
|
var dispatch = createDispatch(eventDispatcher);
|
|
@@ -160,7 +155,8 @@ export var WithPluginStateInner = /*#__PURE__*/function (_React$Component2) {
|
|
|
160
155
|
_this.state = _this.getPluginsStates(_this.props.plugins, _this.getEditorView(props));
|
|
161
156
|
return _this;
|
|
162
157
|
}
|
|
163
|
-
|
|
158
|
+
_inherits(WithPluginStateInner, _React$Component2);
|
|
159
|
+
return _createClass(WithPluginStateInner, [{
|
|
164
160
|
key: "getEditorView",
|
|
165
161
|
value: function getEditorView(maybeProps) {
|
|
166
162
|
var props = maybeProps || this.props;
|
|
@@ -310,22 +306,19 @@ export var WithPluginStateInner = /*#__PURE__*/function (_React$Component2) {
|
|
|
310
306
|
return render(this.state);
|
|
311
307
|
}
|
|
312
308
|
}]);
|
|
313
|
-
return WithPluginStateInner;
|
|
314
309
|
}(React.Component);
|
|
315
310
|
_defineProperty(WithPluginStateInner, "displayName", 'WithPluginState');
|
|
316
311
|
export var WithPluginStateOld = /*#__PURE__*/function (_React$Component3) {
|
|
317
|
-
_inherits(WithPluginStateOld, _React$Component3);
|
|
318
|
-
var _super3 = _createSuper(WithPluginStateOld);
|
|
319
312
|
function WithPluginStateOld(props, context) {
|
|
320
313
|
var _this6;
|
|
321
314
|
_classCallCheck(this, WithPluginStateOld);
|
|
322
|
-
_this6 =
|
|
323
|
-
_defineProperty(
|
|
324
|
-
_defineProperty(
|
|
325
|
-
_defineProperty(
|
|
326
|
-
_defineProperty(
|
|
327
|
-
_defineProperty(
|
|
328
|
-
_defineProperty(
|
|
315
|
+
_this6 = _callSuper(this, WithPluginStateOld, [props, context]);
|
|
316
|
+
_defineProperty(_this6, "listeners", {});
|
|
317
|
+
_defineProperty(_this6, "debounce", null);
|
|
318
|
+
_defineProperty(_this6, "notAppliedState", {});
|
|
319
|
+
_defineProperty(_this6, "isSubscribed", false);
|
|
320
|
+
_defineProperty(_this6, "callsCount", 0);
|
|
321
|
+
_defineProperty(_this6, "handlePluginStateChange", function (propName, pluginName, performanceOptions, skipEqualityCheck) {
|
|
329
322
|
return function (pluginState) {
|
|
330
323
|
// skipEqualityCheck is being used for old plugins since they are mutating plugin state instead of creating a new one
|
|
331
324
|
if (_this6.state[propName] !== pluginState || skipEqualityCheck) {
|
|
@@ -340,7 +333,7 @@ export var WithPluginStateOld = /*#__PURE__*/function (_React$Component3) {
|
|
|
340
333
|
/**
|
|
341
334
|
* Debounces setState calls in order to reduce number of re-renders caused by several plugin state changes.
|
|
342
335
|
*/
|
|
343
|
-
_defineProperty(
|
|
336
|
+
_defineProperty(_this6, "updateState", function (_ref2) {
|
|
344
337
|
var stateSubset = _ref2.stateSubset,
|
|
345
338
|
pluginName = _ref2.pluginName,
|
|
346
339
|
performanceOptions = _ref2.performanceOptions;
|
|
@@ -376,7 +369,7 @@ export var WithPluginStateOld = /*#__PURE__*/function (_React$Component3) {
|
|
|
376
369
|
_this6.notAppliedState = {};
|
|
377
370
|
});
|
|
378
371
|
});
|
|
379
|
-
_defineProperty(
|
|
372
|
+
_defineProperty(_this6, "dispatchAnalyticsEvent", function (payload) {
|
|
380
373
|
var eventDispatcher = _this6.getEventDispatcher();
|
|
381
374
|
if (eventDispatcher) {
|
|
382
375
|
var dispatch = createDispatch(eventDispatcher);
|
|
@@ -385,13 +378,14 @@ export var WithPluginStateOld = /*#__PURE__*/function (_React$Component3) {
|
|
|
385
378
|
});
|
|
386
379
|
}
|
|
387
380
|
});
|
|
388
|
-
_defineProperty(
|
|
381
|
+
_defineProperty(_this6, "onContextUpdate", function () {
|
|
389
382
|
_this6.subscribe(_this6.props);
|
|
390
383
|
});
|
|
391
384
|
_this6.state = _this6.getPluginsStates(_this6.props.plugins, _this6.getEditorView(props, context));
|
|
392
385
|
return _this6;
|
|
393
386
|
}
|
|
394
|
-
|
|
387
|
+
_inherits(WithPluginStateOld, _React$Component3);
|
|
388
|
+
return _createClass(WithPluginStateOld, [{
|
|
395
389
|
key: "getEditorView",
|
|
396
390
|
value: function getEditorView(maybeProps, maybeContext) {
|
|
397
391
|
var props = maybeProps || this.props;
|
|
@@ -536,7 +530,6 @@ export var WithPluginStateOld = /*#__PURE__*/function (_React$Component3) {
|
|
|
536
530
|
return render(this.state);
|
|
537
531
|
}
|
|
538
532
|
}]);
|
|
539
|
-
return WithPluginStateOld;
|
|
540
533
|
}(React.Component);
|
|
541
534
|
_defineProperty(WithPluginStateOld, "displayName", 'WithPluginState');
|
|
542
535
|
_defineProperty(WithPluginStateOld, "contextTypes", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "96.4.
|
|
3
|
+
"version": "96.4.1",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"@atlaskit/media-file-preview": "^0.9.0",
|
|
140
140
|
"@atlaskit/media-picker": "^67.0.0",
|
|
141
141
|
"@atlaskit/media-ui": "^27.0.0",
|
|
142
|
-
"@atlaskit/media-viewer": "49.4.
|
|
142
|
+
"@atlaskit/media-viewer": "49.4.5",
|
|
143
143
|
"@atlaskit/mention": "^23.4.0",
|
|
144
144
|
"@atlaskit/menu": "^2.13.0",
|
|
145
145
|
"@atlaskit/onboarding": "^12.2.0",
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
"@atlaskit/spinner": "^16.3.0",
|
|
154
154
|
"@atlaskit/task-decision": "^17.11.0",
|
|
155
155
|
"@atlaskit/textfield": "^6.7.0",
|
|
156
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
156
|
+
"@atlaskit/tmp-editor-statsig": "^2.26.0",
|
|
157
157
|
"@atlaskit/tokens": "^2.4.0",
|
|
158
158
|
"@atlaskit/tooltip": "^19.0.0",
|
|
159
159
|
"@atlaskit/width-detector": "^4.3.0",
|