@atlaskit/editor-core 203.11.4 → 203.11.5
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 +8 -0
- package/dist/cjs/ui/PluginSlot/index.js +9 -196
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/PluginSlot/index.js +3 -172
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/PluginSlot/index.js +3 -194
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/ui/PluginSlot/index.d.ts +7 -1
- package/dist/types-ts4.5/ui/PluginSlot/index.d.ts +7 -1
- package/package.json +9 -16
- package/dist/cjs/utils/whichTransitionEvent.js +0 -29
- package/dist/es2019/utils/whichTransitionEvent.js +0 -23
- package/dist/esm/utils/whichTransitionEvent.js +0 -23
- package/dist/types/utils/whichTransitionEvent.d.ts +0 -1
- package/dist/types-ts4.5/utils/whichTransitionEvent.d.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 203.11.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#103674](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/103674)
|
|
8
|
+
[`5cd5e35c2e27c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5cd5e35c2e27c) -
|
|
9
|
+
Cleanup flag that gated change to PluginSlot using a React18 compatible component
|
|
10
|
+
|
|
3
11
|
## 203.11.4
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -4,159 +4,23 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.default =
|
|
8
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
11
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
12
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
7
|
+
exports.default = void 0;
|
|
14
8
|
var _react = _interopRequireDefault(require("react"));
|
|
15
9
|
var _react2 = require("@emotion/react");
|
|
16
10
|
var _isEqual = _interopRequireDefault(require("lodash/isEqual"));
|
|
17
11
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
18
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
19
|
-
var _whichTransitionEvent = require("../../utils/whichTransitionEvent");
|
|
20
12
|
var _ErrorBoundary = require("../ErrorBoundary");
|
|
21
13
|
var _mountPluginHooks = require("./mount-plugin-hooks");
|
|
22
|
-
|
|
23
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
|
|
14
|
+
/**
|
|
24
15
|
* @jsxRuntime classic
|
|
25
16
|
* @jsx jsx
|
|
26
|
-
*/
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
20
|
+
|
|
27
21
|
var pluginsComponentsWrapper = (0, _react2.css)({
|
|
28
22
|
display: 'flex'
|
|
29
23
|
});
|
|
30
|
-
// Ignored via go/ees005
|
|
31
|
-
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
32
|
-
var PluginSlotLegacy = /*#__PURE__*/function (_React$Component) {
|
|
33
|
-
function PluginSlotLegacy() {
|
|
34
|
-
var _this;
|
|
35
|
-
(0, _classCallCheck2.default)(this, PluginSlotLegacy);
|
|
36
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
37
|
-
args[_key] = arguments[_key];
|
|
38
|
-
}
|
|
39
|
-
_this = _callSuper(this, PluginSlotLegacy, [].concat(args));
|
|
40
|
-
(0, _defineProperty2.default)(_this, "transitionEvent", (0, _whichTransitionEvent.whichTransitionEvent)());
|
|
41
|
-
(0, _defineProperty2.default)(_this, "forceComponentUpdate", function (event) {
|
|
42
|
-
// Only trigger an update if the transition is on a property containing `width`
|
|
43
|
-
// This will cater for media and the content area itself currently.
|
|
44
|
-
if (event.propertyName.includes('width')) {
|
|
45
|
-
_this.forceUpdate();
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
(0, _defineProperty2.default)(_this, "removeModeChangeListener", function (contentArea) {
|
|
49
|
-
if (contentArea && _this.transitionEvent) {
|
|
50
|
-
// Ignored via go/ees005
|
|
51
|
-
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
52
|
-
contentArea.removeEventListener(_this.transitionEvent, _this.forceComponentUpdate);
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
(0, _defineProperty2.default)(_this, "addModeChangeListener", function (contentArea) {
|
|
56
|
-
if (contentArea && _this.transitionEvent) {
|
|
57
|
-
/**
|
|
58
|
-
* Update the plugin components once the transition
|
|
59
|
-
* to full width / default mode completes
|
|
60
|
-
*/
|
|
61
|
-
// Ignored via go/ees005
|
|
62
|
-
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
63
|
-
contentArea.addEventListener(_this.transitionEvent, _this.forceComponentUpdate);
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
return _this;
|
|
67
|
-
}
|
|
68
|
-
(0, _inherits2.default)(PluginSlotLegacy, _React$Component);
|
|
69
|
-
return (0, _createClass2.default)(PluginSlotLegacy, [{
|
|
70
|
-
key: "shouldComponentUpdate",
|
|
71
|
-
value: function shouldComponentUpdate(nextProps) {
|
|
72
|
-
var _this$props = this.props,
|
|
73
|
-
editorView = _this$props.editorView,
|
|
74
|
-
editorActions = _this$props.editorActions,
|
|
75
|
-
items = _this$props.items,
|
|
76
|
-
providerFactory = _this$props.providerFactory,
|
|
77
|
-
eventDispatcher = _this$props.eventDispatcher,
|
|
78
|
-
popupsMountPoint = _this$props.popupsMountPoint,
|
|
79
|
-
popupsBoundariesElement = _this$props.popupsBoundariesElement,
|
|
80
|
-
popupsScrollableElement = _this$props.popupsScrollableElement,
|
|
81
|
-
containerElement = _this$props.containerElement,
|
|
82
|
-
disabled = _this$props.disabled,
|
|
83
|
-
wrapperElement = _this$props.wrapperElement;
|
|
84
|
-
return !(nextProps.editorView === editorView && nextProps.editorActions === editorActions && nextProps.items === items && nextProps.providerFactory === providerFactory && nextProps.eventDispatcher === eventDispatcher && nextProps.popupsMountPoint === popupsMountPoint && nextProps.popupsBoundariesElement === popupsBoundariesElement && nextProps.popupsScrollableElement === popupsScrollableElement && nextProps.containerElement === containerElement && nextProps.disabled === disabled && nextProps.wrapperElement === wrapperElement);
|
|
85
|
-
}
|
|
86
|
-
}, {
|
|
87
|
-
key: "componentDidMount",
|
|
88
|
-
value: function componentDidMount() {
|
|
89
|
-
this.addModeChangeListener(this.props.contentArea);
|
|
90
|
-
}
|
|
91
|
-
}, {
|
|
92
|
-
key: "UNSAFE_componentWillReceiveProps",
|
|
93
|
-
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
94
|
-
if (this.props.contentArea !== nextProps.contentArea) {
|
|
95
|
-
this.removeModeChangeListener(this.props.contentArea);
|
|
96
|
-
this.addModeChangeListener(nextProps.contentArea);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}, {
|
|
100
|
-
key: "componentWillUnmount",
|
|
101
|
-
value: function componentWillUnmount() {
|
|
102
|
-
this.removeModeChangeListener(this.props.contentArea);
|
|
103
|
-
}
|
|
104
|
-
}, {
|
|
105
|
-
key: "render",
|
|
106
|
-
value: function render() {
|
|
107
|
-
var _this$props2 = this.props,
|
|
108
|
-
items = _this$props2.items,
|
|
109
|
-
editorView = _this$props2.editorView,
|
|
110
|
-
editorActions = _this$props2.editorActions,
|
|
111
|
-
eventDispatcher = _this$props2.eventDispatcher,
|
|
112
|
-
providerFactory = _this$props2.providerFactory,
|
|
113
|
-
appearance = _this$props2.appearance,
|
|
114
|
-
popupsMountPoint = _this$props2.popupsMountPoint,
|
|
115
|
-
popupsBoundariesElement = _this$props2.popupsBoundariesElement,
|
|
116
|
-
popupsScrollableElement = _this$props2.popupsScrollableElement,
|
|
117
|
-
containerElement = _this$props2.containerElement,
|
|
118
|
-
disabled = _this$props2.disabled,
|
|
119
|
-
dispatchAnalyticsEvent = _this$props2.dispatchAnalyticsEvent,
|
|
120
|
-
wrapperElement = _this$props2.wrapperElement,
|
|
121
|
-
pluginHooks = _this$props2.pluginHooks;
|
|
122
|
-
if (!items && !pluginHooks || !editorView) {
|
|
123
|
-
return null;
|
|
124
|
-
}
|
|
125
|
-
return (0, _react2.jsx)(_ErrorBoundary.ErrorBoundary, {
|
|
126
|
-
component: _analytics.ACTION_SUBJECT.PLUGIN_SLOT,
|
|
127
|
-
fallbackComponent: null
|
|
128
|
-
}, (0, _react2.jsx)(_mountPluginHooks.MountPluginHooks, {
|
|
129
|
-
editorView: editorView,
|
|
130
|
-
pluginHooks: pluginHooks,
|
|
131
|
-
containerElement: containerElement
|
|
132
|
-
}), (0, _react2.jsx)("div", {
|
|
133
|
-
css: pluginsComponentsWrapper
|
|
134
|
-
}, items === null || items === void 0 ? void 0 : items.map(function (component, key) {
|
|
135
|
-
var props = {
|
|
136
|
-
key: key
|
|
137
|
-
};
|
|
138
|
-
var element = component({
|
|
139
|
-
editorView: editorView,
|
|
140
|
-
editorActions: editorActions,
|
|
141
|
-
eventDispatcher: eventDispatcher,
|
|
142
|
-
providerFactory: providerFactory,
|
|
143
|
-
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
144
|
-
// Ignored via go/ees005
|
|
145
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
146
|
-
appearance: appearance,
|
|
147
|
-
popupsMountPoint: popupsMountPoint,
|
|
148
|
-
popupsBoundariesElement: popupsBoundariesElement,
|
|
149
|
-
popupsScrollableElement: popupsScrollableElement,
|
|
150
|
-
containerElement: containerElement,
|
|
151
|
-
disabled: disabled,
|
|
152
|
-
wrapperElement: wrapperElement
|
|
153
|
-
});
|
|
154
|
-
return element && /*#__PURE__*/_react.default.cloneElement(element, props);
|
|
155
|
-
})));
|
|
156
|
-
}
|
|
157
|
-
}]);
|
|
158
|
-
}(_react.default.Component);
|
|
159
|
-
(0, _defineProperty2.default)(PluginSlotLegacy, "displayName", 'PluginSlot');
|
|
160
24
|
var PluginSlot = function PluginSlot(_ref) {
|
|
161
25
|
var items = _ref.items,
|
|
162
26
|
editorView = _ref.editorView,
|
|
@@ -207,57 +71,6 @@ var PluginSlot = function PluginSlot(_ref) {
|
|
|
207
71
|
return element && /*#__PURE__*/_react.default.cloneElement(element, props);
|
|
208
72
|
})));
|
|
209
73
|
};
|
|
210
|
-
var
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
var items = _ref2.items,
|
|
214
|
-
editorView = _ref2.editorView,
|
|
215
|
-
editorActions = _ref2.editorActions,
|
|
216
|
-
eventDispatcher = _ref2.eventDispatcher,
|
|
217
|
-
providerFactory = _ref2.providerFactory,
|
|
218
|
-
appearance = _ref2.appearance,
|
|
219
|
-
popupsMountPoint = _ref2.popupsMountPoint,
|
|
220
|
-
popupsBoundariesElement = _ref2.popupsBoundariesElement,
|
|
221
|
-
popupsScrollableElement = _ref2.popupsScrollableElement,
|
|
222
|
-
containerElement = _ref2.containerElement,
|
|
223
|
-
disabled = _ref2.disabled,
|
|
224
|
-
dispatchAnalyticsEvent = _ref2.dispatchAnalyticsEvent,
|
|
225
|
-
wrapperElement = _ref2.wrapperElement,
|
|
226
|
-
pluginHooks = _ref2.pluginHooks,
|
|
227
|
-
contentArea = _ref2.contentArea;
|
|
228
|
-
if ((0, _platformFeatureFlags.fg)('platform_editor_react_18_plugin_slot')) {
|
|
229
|
-
return (0, _react2.jsx)(PluginSlotNew, {
|
|
230
|
-
items: items,
|
|
231
|
-
editorView: editorView,
|
|
232
|
-
editorActions: editorActions,
|
|
233
|
-
eventDispatcher: eventDispatcher,
|
|
234
|
-
providerFactory: providerFactory,
|
|
235
|
-
appearance: appearance,
|
|
236
|
-
popupsMountPoint: popupsMountPoint,
|
|
237
|
-
popupsBoundariesElement: popupsBoundariesElement,
|
|
238
|
-
popupsScrollableElement: popupsScrollableElement,
|
|
239
|
-
containerElement: containerElement,
|
|
240
|
-
disabled: disabled,
|
|
241
|
-
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
242
|
-
wrapperElement: wrapperElement,
|
|
243
|
-
pluginHooks: pluginHooks
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
|
-
return (0, _react2.jsx)(PluginSlotLegacy, {
|
|
247
|
-
contentArea: contentArea,
|
|
248
|
-
items: items,
|
|
249
|
-
editorView: editorView,
|
|
250
|
-
editorActions: editorActions,
|
|
251
|
-
eventDispatcher: eventDispatcher,
|
|
252
|
-
providerFactory: providerFactory,
|
|
253
|
-
appearance: appearance,
|
|
254
|
-
popupsMountPoint: popupsMountPoint,
|
|
255
|
-
popupsBoundariesElement: popupsBoundariesElement,
|
|
256
|
-
popupsScrollableElement: popupsScrollableElement,
|
|
257
|
-
containerElement: containerElement,
|
|
258
|
-
disabled: disabled,
|
|
259
|
-
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
260
|
-
wrapperElement: wrapperElement,
|
|
261
|
-
pluginHooks: pluginHooks
|
|
262
|
-
});
|
|
263
|
-
}
|
|
74
|
+
var PluginSlotComponent = /*#__PURE__*/_react.default.memo(PluginSlot, _isEqual.default);
|
|
75
|
+
PluginSlotComponent.displayName = 'PluginSlot';
|
|
76
|
+
var _default = exports.default = PluginSlotComponent;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
1
|
/**
|
|
3
2
|
* @jsxRuntime classic
|
|
4
3
|
* @jsx jsx
|
|
@@ -9,127 +8,11 @@ import React from 'react';
|
|
|
9
8
|
import { css, jsx } from '@emotion/react';
|
|
10
9
|
import isEqual from 'lodash/isEqual';
|
|
11
10
|
import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
|
|
12
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
|
-
import { whichTransitionEvent } from '../../utils/whichTransitionEvent';
|
|
14
11
|
import { ErrorBoundary } from '../ErrorBoundary';
|
|
15
12
|
import { MountPluginHooks } from './mount-plugin-hooks';
|
|
16
13
|
const pluginsComponentsWrapper = css({
|
|
17
14
|
display: 'flex'
|
|
18
15
|
});
|
|
19
|
-
// Ignored via go/ees005
|
|
20
|
-
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
21
|
-
class PluginSlotLegacy extends React.Component {
|
|
22
|
-
constructor(...args) {
|
|
23
|
-
super(...args);
|
|
24
|
-
_defineProperty(this, "transitionEvent", whichTransitionEvent());
|
|
25
|
-
_defineProperty(this, "forceComponentUpdate", event => {
|
|
26
|
-
// Only trigger an update if the transition is on a property containing `width`
|
|
27
|
-
// This will cater for media and the content area itself currently.
|
|
28
|
-
if (event.propertyName.includes('width')) {
|
|
29
|
-
this.forceUpdate();
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
_defineProperty(this, "removeModeChangeListener", contentArea => {
|
|
33
|
-
if (contentArea && this.transitionEvent) {
|
|
34
|
-
// Ignored via go/ees005
|
|
35
|
-
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
36
|
-
contentArea.removeEventListener(this.transitionEvent, this.forceComponentUpdate);
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
_defineProperty(this, "addModeChangeListener", contentArea => {
|
|
40
|
-
if (contentArea && this.transitionEvent) {
|
|
41
|
-
/**
|
|
42
|
-
* Update the plugin components once the transition
|
|
43
|
-
* to full width / default mode completes
|
|
44
|
-
*/
|
|
45
|
-
// Ignored via go/ees005
|
|
46
|
-
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
47
|
-
contentArea.addEventListener(this.transitionEvent, this.forceComponentUpdate);
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
shouldComponentUpdate(nextProps) {
|
|
52
|
-
const {
|
|
53
|
-
editorView,
|
|
54
|
-
editorActions,
|
|
55
|
-
items,
|
|
56
|
-
providerFactory,
|
|
57
|
-
eventDispatcher,
|
|
58
|
-
popupsMountPoint,
|
|
59
|
-
popupsBoundariesElement,
|
|
60
|
-
popupsScrollableElement,
|
|
61
|
-
containerElement,
|
|
62
|
-
disabled,
|
|
63
|
-
wrapperElement
|
|
64
|
-
} = this.props;
|
|
65
|
-
return !(nextProps.editorView === editorView && nextProps.editorActions === editorActions && nextProps.items === items && nextProps.providerFactory === providerFactory && nextProps.eventDispatcher === eventDispatcher && nextProps.popupsMountPoint === popupsMountPoint && nextProps.popupsBoundariesElement === popupsBoundariesElement && nextProps.popupsScrollableElement === popupsScrollableElement && nextProps.containerElement === containerElement && nextProps.disabled === disabled && nextProps.wrapperElement === wrapperElement);
|
|
66
|
-
}
|
|
67
|
-
componentDidMount() {
|
|
68
|
-
this.addModeChangeListener(this.props.contentArea);
|
|
69
|
-
}
|
|
70
|
-
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
71
|
-
if (this.props.contentArea !== nextProps.contentArea) {
|
|
72
|
-
this.removeModeChangeListener(this.props.contentArea);
|
|
73
|
-
this.addModeChangeListener(nextProps.contentArea);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
componentWillUnmount() {
|
|
77
|
-
this.removeModeChangeListener(this.props.contentArea);
|
|
78
|
-
}
|
|
79
|
-
render() {
|
|
80
|
-
const {
|
|
81
|
-
items,
|
|
82
|
-
editorView,
|
|
83
|
-
editorActions,
|
|
84
|
-
eventDispatcher,
|
|
85
|
-
providerFactory,
|
|
86
|
-
appearance,
|
|
87
|
-
popupsMountPoint,
|
|
88
|
-
popupsBoundariesElement,
|
|
89
|
-
popupsScrollableElement,
|
|
90
|
-
containerElement,
|
|
91
|
-
disabled,
|
|
92
|
-
dispatchAnalyticsEvent,
|
|
93
|
-
wrapperElement,
|
|
94
|
-
pluginHooks
|
|
95
|
-
} = this.props;
|
|
96
|
-
if (!items && !pluginHooks || !editorView) {
|
|
97
|
-
return null;
|
|
98
|
-
}
|
|
99
|
-
return jsx(ErrorBoundary, {
|
|
100
|
-
component: ACTION_SUBJECT.PLUGIN_SLOT,
|
|
101
|
-
fallbackComponent: null
|
|
102
|
-
}, jsx(MountPluginHooks, {
|
|
103
|
-
editorView: editorView,
|
|
104
|
-
pluginHooks: pluginHooks,
|
|
105
|
-
containerElement: containerElement
|
|
106
|
-
}), jsx("div", {
|
|
107
|
-
css: pluginsComponentsWrapper
|
|
108
|
-
}, items === null || items === void 0 ? void 0 : items.map((component, key) => {
|
|
109
|
-
const props = {
|
|
110
|
-
key
|
|
111
|
-
};
|
|
112
|
-
const element = component({
|
|
113
|
-
editorView: editorView,
|
|
114
|
-
editorActions: editorActions,
|
|
115
|
-
eventDispatcher: eventDispatcher,
|
|
116
|
-
providerFactory,
|
|
117
|
-
dispatchAnalyticsEvent,
|
|
118
|
-
// Ignored via go/ees005
|
|
119
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
120
|
-
appearance: appearance,
|
|
121
|
-
popupsMountPoint,
|
|
122
|
-
popupsBoundariesElement,
|
|
123
|
-
popupsScrollableElement,
|
|
124
|
-
containerElement,
|
|
125
|
-
disabled,
|
|
126
|
-
wrapperElement
|
|
127
|
-
});
|
|
128
|
-
return element && /*#__PURE__*/React.cloneElement(element, props);
|
|
129
|
-
})));
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
_defineProperty(PluginSlotLegacy, "displayName", 'PluginSlot');
|
|
133
16
|
const PluginSlot = ({
|
|
134
17
|
items,
|
|
135
18
|
editorView,
|
|
@@ -181,58 +64,6 @@ const PluginSlot = ({
|
|
|
181
64
|
return element && /*#__PURE__*/React.cloneElement(element, props);
|
|
182
65
|
})));
|
|
183
66
|
};
|
|
184
|
-
const
|
|
185
|
-
|
|
186
|
-
export default
|
|
187
|
-
items,
|
|
188
|
-
editorView,
|
|
189
|
-
editorActions,
|
|
190
|
-
eventDispatcher,
|
|
191
|
-
providerFactory,
|
|
192
|
-
appearance,
|
|
193
|
-
popupsMountPoint,
|
|
194
|
-
popupsBoundariesElement,
|
|
195
|
-
popupsScrollableElement,
|
|
196
|
-
containerElement,
|
|
197
|
-
disabled,
|
|
198
|
-
dispatchAnalyticsEvent,
|
|
199
|
-
wrapperElement,
|
|
200
|
-
pluginHooks,
|
|
201
|
-
contentArea
|
|
202
|
-
}) {
|
|
203
|
-
if (fg('platform_editor_react_18_plugin_slot')) {
|
|
204
|
-
return jsx(PluginSlotNew, {
|
|
205
|
-
items: items,
|
|
206
|
-
editorView: editorView,
|
|
207
|
-
editorActions: editorActions,
|
|
208
|
-
eventDispatcher: eventDispatcher,
|
|
209
|
-
providerFactory: providerFactory,
|
|
210
|
-
appearance: appearance,
|
|
211
|
-
popupsMountPoint: popupsMountPoint,
|
|
212
|
-
popupsBoundariesElement: popupsBoundariesElement,
|
|
213
|
-
popupsScrollableElement: popupsScrollableElement,
|
|
214
|
-
containerElement: containerElement,
|
|
215
|
-
disabled: disabled,
|
|
216
|
-
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
217
|
-
wrapperElement: wrapperElement,
|
|
218
|
-
pluginHooks: pluginHooks
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
return jsx(PluginSlotLegacy, {
|
|
222
|
-
contentArea: contentArea,
|
|
223
|
-
items: items,
|
|
224
|
-
editorView: editorView,
|
|
225
|
-
editorActions: editorActions,
|
|
226
|
-
eventDispatcher: eventDispatcher,
|
|
227
|
-
providerFactory: providerFactory,
|
|
228
|
-
appearance: appearance,
|
|
229
|
-
popupsMountPoint: popupsMountPoint,
|
|
230
|
-
popupsBoundariesElement: popupsBoundariesElement,
|
|
231
|
-
popupsScrollableElement: popupsScrollableElement,
|
|
232
|
-
containerElement: containerElement,
|
|
233
|
-
disabled: disabled,
|
|
234
|
-
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
235
|
-
wrapperElement: wrapperElement,
|
|
236
|
-
pluginHooks: pluginHooks
|
|
237
|
-
});
|
|
238
|
-
}
|
|
67
|
+
const PluginSlotComponent = /*#__PURE__*/React.memo(PluginSlot, isEqual);
|
|
68
|
+
PluginSlotComponent.displayName = 'PluginSlot';
|
|
69
|
+
export default PluginSlotComponent;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "203.11.
|
|
2
|
+
export const version = "203.11.5";
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
4
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
8
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
1
|
/**
|
|
10
2
|
* @jsxRuntime classic
|
|
11
3
|
* @jsx jsx
|
|
@@ -16,143 +8,11 @@ import React from 'react';
|
|
|
16
8
|
import { css, jsx } from '@emotion/react';
|
|
17
9
|
import isEqual from 'lodash/isEqual';
|
|
18
10
|
import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
|
|
19
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
|
-
import { whichTransitionEvent } from '../../utils/whichTransitionEvent';
|
|
21
11
|
import { ErrorBoundary } from '../ErrorBoundary';
|
|
22
12
|
import { MountPluginHooks } from './mount-plugin-hooks';
|
|
23
13
|
var pluginsComponentsWrapper = css({
|
|
24
14
|
display: 'flex'
|
|
25
15
|
});
|
|
26
|
-
// Ignored via go/ees005
|
|
27
|
-
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
28
|
-
var PluginSlotLegacy = /*#__PURE__*/function (_React$Component) {
|
|
29
|
-
function PluginSlotLegacy() {
|
|
30
|
-
var _this;
|
|
31
|
-
_classCallCheck(this, PluginSlotLegacy);
|
|
32
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
33
|
-
args[_key] = arguments[_key];
|
|
34
|
-
}
|
|
35
|
-
_this = _callSuper(this, PluginSlotLegacy, [].concat(args));
|
|
36
|
-
_defineProperty(_this, "transitionEvent", whichTransitionEvent());
|
|
37
|
-
_defineProperty(_this, "forceComponentUpdate", function (event) {
|
|
38
|
-
// Only trigger an update if the transition is on a property containing `width`
|
|
39
|
-
// This will cater for media and the content area itself currently.
|
|
40
|
-
if (event.propertyName.includes('width')) {
|
|
41
|
-
_this.forceUpdate();
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
_defineProperty(_this, "removeModeChangeListener", function (contentArea) {
|
|
45
|
-
if (contentArea && _this.transitionEvent) {
|
|
46
|
-
// Ignored via go/ees005
|
|
47
|
-
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
48
|
-
contentArea.removeEventListener(_this.transitionEvent, _this.forceComponentUpdate);
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
_defineProperty(_this, "addModeChangeListener", function (contentArea) {
|
|
52
|
-
if (contentArea && _this.transitionEvent) {
|
|
53
|
-
/**
|
|
54
|
-
* Update the plugin components once the transition
|
|
55
|
-
* to full width / default mode completes
|
|
56
|
-
*/
|
|
57
|
-
// Ignored via go/ees005
|
|
58
|
-
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
59
|
-
contentArea.addEventListener(_this.transitionEvent, _this.forceComponentUpdate);
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
return _this;
|
|
63
|
-
}
|
|
64
|
-
_inherits(PluginSlotLegacy, _React$Component);
|
|
65
|
-
return _createClass(PluginSlotLegacy, [{
|
|
66
|
-
key: "shouldComponentUpdate",
|
|
67
|
-
value: function shouldComponentUpdate(nextProps) {
|
|
68
|
-
var _this$props = this.props,
|
|
69
|
-
editorView = _this$props.editorView,
|
|
70
|
-
editorActions = _this$props.editorActions,
|
|
71
|
-
items = _this$props.items,
|
|
72
|
-
providerFactory = _this$props.providerFactory,
|
|
73
|
-
eventDispatcher = _this$props.eventDispatcher,
|
|
74
|
-
popupsMountPoint = _this$props.popupsMountPoint,
|
|
75
|
-
popupsBoundariesElement = _this$props.popupsBoundariesElement,
|
|
76
|
-
popupsScrollableElement = _this$props.popupsScrollableElement,
|
|
77
|
-
containerElement = _this$props.containerElement,
|
|
78
|
-
disabled = _this$props.disabled,
|
|
79
|
-
wrapperElement = _this$props.wrapperElement;
|
|
80
|
-
return !(nextProps.editorView === editorView && nextProps.editorActions === editorActions && nextProps.items === items && nextProps.providerFactory === providerFactory && nextProps.eventDispatcher === eventDispatcher && nextProps.popupsMountPoint === popupsMountPoint && nextProps.popupsBoundariesElement === popupsBoundariesElement && nextProps.popupsScrollableElement === popupsScrollableElement && nextProps.containerElement === containerElement && nextProps.disabled === disabled && nextProps.wrapperElement === wrapperElement);
|
|
81
|
-
}
|
|
82
|
-
}, {
|
|
83
|
-
key: "componentDidMount",
|
|
84
|
-
value: function componentDidMount() {
|
|
85
|
-
this.addModeChangeListener(this.props.contentArea);
|
|
86
|
-
}
|
|
87
|
-
}, {
|
|
88
|
-
key: "UNSAFE_componentWillReceiveProps",
|
|
89
|
-
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
90
|
-
if (this.props.contentArea !== nextProps.contentArea) {
|
|
91
|
-
this.removeModeChangeListener(this.props.contentArea);
|
|
92
|
-
this.addModeChangeListener(nextProps.contentArea);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}, {
|
|
96
|
-
key: "componentWillUnmount",
|
|
97
|
-
value: function componentWillUnmount() {
|
|
98
|
-
this.removeModeChangeListener(this.props.contentArea);
|
|
99
|
-
}
|
|
100
|
-
}, {
|
|
101
|
-
key: "render",
|
|
102
|
-
value: function render() {
|
|
103
|
-
var _this$props2 = this.props,
|
|
104
|
-
items = _this$props2.items,
|
|
105
|
-
editorView = _this$props2.editorView,
|
|
106
|
-
editorActions = _this$props2.editorActions,
|
|
107
|
-
eventDispatcher = _this$props2.eventDispatcher,
|
|
108
|
-
providerFactory = _this$props2.providerFactory,
|
|
109
|
-
appearance = _this$props2.appearance,
|
|
110
|
-
popupsMountPoint = _this$props2.popupsMountPoint,
|
|
111
|
-
popupsBoundariesElement = _this$props2.popupsBoundariesElement,
|
|
112
|
-
popupsScrollableElement = _this$props2.popupsScrollableElement,
|
|
113
|
-
containerElement = _this$props2.containerElement,
|
|
114
|
-
disabled = _this$props2.disabled,
|
|
115
|
-
dispatchAnalyticsEvent = _this$props2.dispatchAnalyticsEvent,
|
|
116
|
-
wrapperElement = _this$props2.wrapperElement,
|
|
117
|
-
pluginHooks = _this$props2.pluginHooks;
|
|
118
|
-
if (!items && !pluginHooks || !editorView) {
|
|
119
|
-
return null;
|
|
120
|
-
}
|
|
121
|
-
return jsx(ErrorBoundary, {
|
|
122
|
-
component: ACTION_SUBJECT.PLUGIN_SLOT,
|
|
123
|
-
fallbackComponent: null
|
|
124
|
-
}, jsx(MountPluginHooks, {
|
|
125
|
-
editorView: editorView,
|
|
126
|
-
pluginHooks: pluginHooks,
|
|
127
|
-
containerElement: containerElement
|
|
128
|
-
}), jsx("div", {
|
|
129
|
-
css: pluginsComponentsWrapper
|
|
130
|
-
}, items === null || items === void 0 ? void 0 : items.map(function (component, key) {
|
|
131
|
-
var props = {
|
|
132
|
-
key: key
|
|
133
|
-
};
|
|
134
|
-
var element = component({
|
|
135
|
-
editorView: editorView,
|
|
136
|
-
editorActions: editorActions,
|
|
137
|
-
eventDispatcher: eventDispatcher,
|
|
138
|
-
providerFactory: providerFactory,
|
|
139
|
-
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
140
|
-
// Ignored via go/ees005
|
|
141
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
142
|
-
appearance: appearance,
|
|
143
|
-
popupsMountPoint: popupsMountPoint,
|
|
144
|
-
popupsBoundariesElement: popupsBoundariesElement,
|
|
145
|
-
popupsScrollableElement: popupsScrollableElement,
|
|
146
|
-
containerElement: containerElement,
|
|
147
|
-
disabled: disabled,
|
|
148
|
-
wrapperElement: wrapperElement
|
|
149
|
-
});
|
|
150
|
-
return element && /*#__PURE__*/React.cloneElement(element, props);
|
|
151
|
-
})));
|
|
152
|
-
}
|
|
153
|
-
}]);
|
|
154
|
-
}(React.Component);
|
|
155
|
-
_defineProperty(PluginSlotLegacy, "displayName", 'PluginSlot');
|
|
156
16
|
var PluginSlot = function PluginSlot(_ref) {
|
|
157
17
|
var items = _ref.items,
|
|
158
18
|
editorView = _ref.editorView,
|
|
@@ -203,57 +63,6 @@ var PluginSlot = function PluginSlot(_ref) {
|
|
|
203
63
|
return element && /*#__PURE__*/React.cloneElement(element, props);
|
|
204
64
|
})));
|
|
205
65
|
};
|
|
206
|
-
var
|
|
207
|
-
|
|
208
|
-
export default
|
|
209
|
-
var items = _ref2.items,
|
|
210
|
-
editorView = _ref2.editorView,
|
|
211
|
-
editorActions = _ref2.editorActions,
|
|
212
|
-
eventDispatcher = _ref2.eventDispatcher,
|
|
213
|
-
providerFactory = _ref2.providerFactory,
|
|
214
|
-
appearance = _ref2.appearance,
|
|
215
|
-
popupsMountPoint = _ref2.popupsMountPoint,
|
|
216
|
-
popupsBoundariesElement = _ref2.popupsBoundariesElement,
|
|
217
|
-
popupsScrollableElement = _ref2.popupsScrollableElement,
|
|
218
|
-
containerElement = _ref2.containerElement,
|
|
219
|
-
disabled = _ref2.disabled,
|
|
220
|
-
dispatchAnalyticsEvent = _ref2.dispatchAnalyticsEvent,
|
|
221
|
-
wrapperElement = _ref2.wrapperElement,
|
|
222
|
-
pluginHooks = _ref2.pluginHooks,
|
|
223
|
-
contentArea = _ref2.contentArea;
|
|
224
|
-
if (fg('platform_editor_react_18_plugin_slot')) {
|
|
225
|
-
return jsx(PluginSlotNew, {
|
|
226
|
-
items: items,
|
|
227
|
-
editorView: editorView,
|
|
228
|
-
editorActions: editorActions,
|
|
229
|
-
eventDispatcher: eventDispatcher,
|
|
230
|
-
providerFactory: providerFactory,
|
|
231
|
-
appearance: appearance,
|
|
232
|
-
popupsMountPoint: popupsMountPoint,
|
|
233
|
-
popupsBoundariesElement: popupsBoundariesElement,
|
|
234
|
-
popupsScrollableElement: popupsScrollableElement,
|
|
235
|
-
containerElement: containerElement,
|
|
236
|
-
disabled: disabled,
|
|
237
|
-
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
238
|
-
wrapperElement: wrapperElement,
|
|
239
|
-
pluginHooks: pluginHooks
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
return jsx(PluginSlotLegacy, {
|
|
243
|
-
contentArea: contentArea,
|
|
244
|
-
items: items,
|
|
245
|
-
editorView: editorView,
|
|
246
|
-
editorActions: editorActions,
|
|
247
|
-
eventDispatcher: eventDispatcher,
|
|
248
|
-
providerFactory: providerFactory,
|
|
249
|
-
appearance: appearance,
|
|
250
|
-
popupsMountPoint: popupsMountPoint,
|
|
251
|
-
popupsBoundariesElement: popupsBoundariesElement,
|
|
252
|
-
popupsScrollableElement: popupsScrollableElement,
|
|
253
|
-
containerElement: containerElement,
|
|
254
|
-
disabled: disabled,
|
|
255
|
-
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
256
|
-
wrapperElement: wrapperElement,
|
|
257
|
-
pluginHooks: pluginHooks
|
|
258
|
-
});
|
|
259
|
-
}
|
|
66
|
+
var PluginSlotComponent = /*#__PURE__*/React.memo(PluginSlot, isEqual);
|
|
67
|
+
PluginSlotComponent.displayName = 'PluginSlot';
|
|
68
|
+
export default PluginSlotComponent;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "203.11.
|
|
2
|
+
export var version = "203.11.5";
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
1
6
|
import { jsx } from '@emotion/react';
|
|
2
7
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
3
8
|
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
@@ -22,4 +27,5 @@ export interface Props {
|
|
|
22
27
|
contentArea?: HTMLElement;
|
|
23
28
|
wrapperElement: HTMLElement | null;
|
|
24
29
|
}
|
|
25
|
-
|
|
30
|
+
declare const PluginSlotComponent: React.MemoExoticComponent<({ items, editorView, editorActions, eventDispatcher, providerFactory, appearance, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, containerElement, disabled, dispatchAnalyticsEvent, wrapperElement, pluginHooks, }: Props) => jsx.JSX.Element | null>;
|
|
31
|
+
export default PluginSlotComponent;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
1
6
|
import { jsx } from '@emotion/react';
|
|
2
7
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
3
8
|
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
@@ -22,4 +27,5 @@ export interface Props {
|
|
|
22
27
|
contentArea?: HTMLElement;
|
|
23
28
|
wrapperElement: HTMLElement | null;
|
|
24
29
|
}
|
|
25
|
-
|
|
30
|
+
declare const PluginSlotComponent: React.MemoExoticComponent<({ items, editorView, editorActions, eventDispatcher, providerFactory, appearance, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, containerElement, disabled, dispatchAnalyticsEvent, wrapperElement, pluginHooks, }: Props) => jsx.JSX.Element | null>;
|
|
31
|
+
export default PluginSlotComponent;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "203.11.
|
|
3
|
+
"version": "203.11.5",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
"@atlaskit/emoji": "^67.12.0",
|
|
53
53
|
"@atlaskit/icon": "^23.4.0",
|
|
54
54
|
"@atlaskit/media-card": "^78.18.0",
|
|
55
|
-
"@atlaskit/mention": "^23.
|
|
55
|
+
"@atlaskit/mention": "^23.9.0",
|
|
56
56
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
57
57
|
"@atlaskit/task-decision": "^17.11.0",
|
|
58
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
58
|
+
"@atlaskit/tmp-editor-statsig": "^2.37.0",
|
|
59
59
|
"@atlaskit/tokens": "^3.1.0",
|
|
60
60
|
"@atlaskit/tooltip": "^19.0.0",
|
|
61
61
|
"@atlaskit/width-detector": "^4.3.0",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"@atlaskit/adf-utils": "^19.17.0",
|
|
85
85
|
"@atlaskit/analytics-listeners": "^8.13.0",
|
|
86
86
|
"@atlaskit/collab-provider": "10.4.0",
|
|
87
|
-
"@atlaskit/editor-plugin-annotation": "1.26.
|
|
87
|
+
"@atlaskit/editor-plugin-annotation": "1.26.12",
|
|
88
88
|
"@atlaskit/editor-plugin-card": "^4.5.0",
|
|
89
89
|
"@atlaskit/editor-plugin-list": "^3.9.0",
|
|
90
90
|
"@atlaskit/editor-plugin-paste": "^2.0.0",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"@atlaskit/modal-dialog": "^12.19.0",
|
|
97
97
|
"@atlaskit/primitives": "^13.3.0",
|
|
98
98
|
"@atlaskit/renderer": "^112.8.0",
|
|
99
|
-
"@atlaskit/smart-card": "^34.
|
|
99
|
+
"@atlaskit/smart-card": "^34.4.0",
|
|
100
100
|
"@atlaskit/synchrony-test-helpers": "^3.0.0",
|
|
101
101
|
"@atlaskit/toggle": "^14.0.0",
|
|
102
102
|
"@atlaskit/util-data-test": "^17.13.0",
|
|
@@ -185,9 +185,6 @@
|
|
|
185
185
|
"type": "boolean",
|
|
186
186
|
"referenceOnly": true
|
|
187
187
|
},
|
|
188
|
-
"platform_editor_react_18_plugin_slot": {
|
|
189
|
-
"type": "boolean"
|
|
190
|
-
},
|
|
191
188
|
"platform_editor_disable_instrumented_plugin": {
|
|
192
189
|
"type": "boolean"
|
|
193
190
|
},
|
|
@@ -225,6 +222,10 @@
|
|
|
225
222
|
"type": "boolean",
|
|
226
223
|
"referenceOnly": true
|
|
227
224
|
},
|
|
225
|
+
"platform_editor_annotation_react_18_mem_leak": {
|
|
226
|
+
"type": "boolean",
|
|
227
|
+
"referenceOnly": true
|
|
228
|
+
},
|
|
228
229
|
"platform_editor_ssr_fix_block_controls": {
|
|
229
230
|
"type": "boolean"
|
|
230
231
|
},
|
|
@@ -286,14 +287,6 @@
|
|
|
286
287
|
"platform_editor_add_extension_api_to_quick_insert": {
|
|
287
288
|
"type": "boolean"
|
|
288
289
|
},
|
|
289
|
-
"platform_editor_ed-25557_lnv_add_ssr_placeholder": {
|
|
290
|
-
"type": "boolean",
|
|
291
|
-
"referenceOnly": true
|
|
292
|
-
},
|
|
293
|
-
"platform_editor_replace_finddomnode_in_common": {
|
|
294
|
-
"type": "boolean",
|
|
295
|
-
"referenceOnly": true
|
|
296
|
-
},
|
|
297
290
|
"platform-component-visual-refresh": {
|
|
298
291
|
"type": "boolean",
|
|
299
292
|
"referenceOnly": true
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.whichTransitionEvent = whichTransitionEvent;
|
|
7
|
-
/*
|
|
8
|
-
* From Modernizr
|
|
9
|
-
* Returns the kind of transitionevent available for the element
|
|
10
|
-
*/
|
|
11
|
-
function whichTransitionEvent() {
|
|
12
|
-
var el = document.createElement('fakeelement');
|
|
13
|
-
var transitions = {
|
|
14
|
-
transition: 'transitionend',
|
|
15
|
-
MozTransition: 'transitionend',
|
|
16
|
-
OTransition: 'oTransitionEnd',
|
|
17
|
-
WebkitTransition: 'webkitTransitionEnd'
|
|
18
|
-
};
|
|
19
|
-
for (var t in transitions) {
|
|
20
|
-
if (el.style[t] !== undefined) {
|
|
21
|
-
// Use a generic as the return type because TypeScript doesnt know
|
|
22
|
-
// about cross browser features, so we cast here to align to the
|
|
23
|
-
// standard Event spec and propagate the type properly to the callbacks
|
|
24
|
-
// of `addEventListener` and `removeEventListener`.
|
|
25
|
-
return transitions[t];
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* From Modernizr
|
|
3
|
-
* Returns the kind of transitionevent available for the element
|
|
4
|
-
*/
|
|
5
|
-
export function whichTransitionEvent() {
|
|
6
|
-
const el = document.createElement('fakeelement');
|
|
7
|
-
const transitions = {
|
|
8
|
-
transition: 'transitionend',
|
|
9
|
-
MozTransition: 'transitionend',
|
|
10
|
-
OTransition: 'oTransitionEnd',
|
|
11
|
-
WebkitTransition: 'webkitTransitionEnd'
|
|
12
|
-
};
|
|
13
|
-
for (const t in transitions) {
|
|
14
|
-
if (el.style[t] !== undefined) {
|
|
15
|
-
// Use a generic as the return type because TypeScript doesnt know
|
|
16
|
-
// about cross browser features, so we cast here to align to the
|
|
17
|
-
// standard Event spec and propagate the type properly to the callbacks
|
|
18
|
-
// of `addEventListener` and `removeEventListener`.
|
|
19
|
-
return transitions[t];
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* From Modernizr
|
|
3
|
-
* Returns the kind of transitionevent available for the element
|
|
4
|
-
*/
|
|
5
|
-
export function whichTransitionEvent() {
|
|
6
|
-
var el = document.createElement('fakeelement');
|
|
7
|
-
var transitions = {
|
|
8
|
-
transition: 'transitionend',
|
|
9
|
-
MozTransition: 'transitionend',
|
|
10
|
-
OTransition: 'oTransitionEnd',
|
|
11
|
-
WebkitTransition: 'webkitTransitionEnd'
|
|
12
|
-
};
|
|
13
|
-
for (var t in transitions) {
|
|
14
|
-
if (el.style[t] !== undefined) {
|
|
15
|
-
// Use a generic as the return type because TypeScript doesnt know
|
|
16
|
-
// about cross browser features, so we cast here to align to the
|
|
17
|
-
// standard Event spec and propagate the type properly to the callbacks
|
|
18
|
-
// of `addEventListener` and `removeEventListener`.
|
|
19
|
-
return transitions[t];
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function whichTransitionEvent<TransitionEventName extends string>(): TransitionEventName | undefined;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function whichTransitionEvent<TransitionEventName extends string>(): TransitionEventName | undefined;
|