@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,11 +1,10 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
9
|
import React from 'react';
|
|
11
10
|
|
|
@@ -31,24 +30,22 @@ export var ContextPanel = /*#__PURE__*/React.createContext({
|
|
|
31
30
|
broadcastPosition: function broadcastPosition() {}
|
|
32
31
|
});
|
|
33
32
|
export var ContextPanelWidthProvider = /*#__PURE__*/function (_React$Component) {
|
|
34
|
-
_inherits(ContextPanelWidthProvider, _React$Component);
|
|
35
|
-
var _super = _createSuper(ContextPanelWidthProvider);
|
|
36
33
|
function ContextPanelWidthProvider(props) {
|
|
37
34
|
var _this;
|
|
38
35
|
_classCallCheck(this, ContextPanelWidthProvider);
|
|
39
|
-
_this =
|
|
40
|
-
_defineProperty(
|
|
36
|
+
_this = _callSuper(this, ContextPanelWidthProvider, [props]);
|
|
37
|
+
_defineProperty(_this, "state", {
|
|
41
38
|
width: 0,
|
|
42
39
|
positionedOverEditor: false
|
|
43
40
|
});
|
|
44
|
-
_defineProperty(
|
|
41
|
+
_defineProperty(_this, "broadcastSidebarWidth", function (width) {
|
|
45
42
|
if (width !== _this.state.width) {
|
|
46
43
|
_this.setState({
|
|
47
44
|
width: width
|
|
48
45
|
});
|
|
49
46
|
}
|
|
50
47
|
});
|
|
51
|
-
_defineProperty(
|
|
48
|
+
_defineProperty(_this, "broadcastPosition", function (positionedOverEditor) {
|
|
52
49
|
if (positionedOverEditor !== _this.state.positionedOverEditor) {
|
|
53
50
|
_this.setState({
|
|
54
51
|
positionedOverEditor: positionedOverEditor
|
|
@@ -57,7 +54,8 @@ export var ContextPanelWidthProvider = /*#__PURE__*/function (_React$Component)
|
|
|
57
54
|
});
|
|
58
55
|
return _this;
|
|
59
56
|
}
|
|
60
|
-
|
|
57
|
+
_inherits(ContextPanelWidthProvider, _React$Component);
|
|
58
|
+
return _createClass(ContextPanelWidthProvider, [{
|
|
61
59
|
key: "render",
|
|
62
60
|
value: function render() {
|
|
63
61
|
var _this$state = this.state,
|
|
@@ -73,7 +71,6 @@ export var ContextPanelWidthProvider = /*#__PURE__*/function (_React$Component)
|
|
|
73
71
|
}, this.props.children);
|
|
74
72
|
}
|
|
75
73
|
}]);
|
|
76
|
-
return ContextPanelWidthProvider;
|
|
77
74
|
}(React.Component);
|
|
78
75
|
var Provider = ContextPanel.Provider,
|
|
79
76
|
Consumer = ContextPanel.Consumer;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
9
|
/**
|
|
11
10
|
* @jsxRuntime classic
|
|
@@ -21,20 +20,18 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
21
20
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
22
21
|
import Layer from '../Layer';
|
|
23
22
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "96.4.
|
|
23
|
+
var packageVersion = "96.4.1";
|
|
25
24
|
var halfFocusRing = 1;
|
|
26
25
|
var dropOffset = '0, 8';
|
|
27
26
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
28
|
-
_inherits(DropList, _Component);
|
|
29
|
-
var _super = _createSuper(DropList);
|
|
30
27
|
function DropList() {
|
|
31
28
|
var _this;
|
|
32
29
|
_classCallCheck(this, DropList);
|
|
33
30
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
34
31
|
args[_key] = arguments[_key];
|
|
35
32
|
}
|
|
36
|
-
_this =
|
|
37
|
-
_defineProperty(
|
|
33
|
+
_this = _callSuper(this, DropList, [].concat(args));
|
|
34
|
+
_defineProperty(_this, "wrapperStyles", css({
|
|
38
35
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
39
36
|
display: _this.props.shouldFitContainer ? 'block' : 'inline-flex',
|
|
40
37
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
@@ -42,7 +39,7 @@ var DropList = /*#__PURE__*/function (_Component) {
|
|
|
42
39
|
transitionDuration: '0.2s',
|
|
43
40
|
transition: 'box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38)'
|
|
44
41
|
}));
|
|
45
|
-
_defineProperty(
|
|
42
|
+
_defineProperty(_this, "triggerStyles", css({
|
|
46
43
|
transitionDuration: '0.2s',
|
|
47
44
|
transition: 'box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38)',
|
|
48
45
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
@@ -51,7 +48,7 @@ var DropList = /*#__PURE__*/function (_Component) {
|
|
|
51
48
|
boxSizing: _this.props.shouldFitContainer ? 'border-box' : undefined
|
|
52
49
|
}));
|
|
53
50
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
54
|
-
_defineProperty(
|
|
51
|
+
_defineProperty(_this, "menuWrapper", function () {
|
|
55
52
|
return css({
|
|
56
53
|
color: "var(--ds-text, #172B4D)",
|
|
57
54
|
backgroundColor: "var(--ds-surface-overlay, #FFFFFF)",
|
|
@@ -64,7 +61,7 @@ var DropList = /*#__PURE__*/function (_Component) {
|
|
|
64
61
|
});
|
|
65
62
|
});
|
|
66
63
|
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
67
|
-
_defineProperty(
|
|
64
|
+
_defineProperty(_this, "componentDidMount", function () {
|
|
68
65
|
_this.setContentWidth();
|
|
69
66
|
// We use a captured event here to avoid a radio or checkbox dropdown item firing its
|
|
70
67
|
// click event first, which would cause a re-render of the element and prevent DropList
|
|
@@ -72,19 +69,19 @@ var DropList = /*#__PURE__*/function (_Component) {
|
|
|
72
69
|
document.addEventListener('click', _this.handleClickOutside, true);
|
|
73
70
|
document.addEventListener('keydown', _this.handleEsc);
|
|
74
71
|
});
|
|
75
|
-
_defineProperty(
|
|
72
|
+
_defineProperty(_this, "componentDidUpdate", function () {
|
|
76
73
|
if (_this.props.isOpen) {
|
|
77
74
|
_this.setContentWidth();
|
|
78
75
|
}
|
|
79
76
|
});
|
|
80
|
-
_defineProperty(
|
|
77
|
+
_defineProperty(_this, "componentWillUnmount", function () {
|
|
81
78
|
document.removeEventListener('click', _this.handleClickOutside, true);
|
|
82
79
|
document.removeEventListener('keydown', _this.handleEsc);
|
|
83
80
|
});
|
|
84
|
-
_defineProperty(
|
|
85
|
-
var
|
|
86
|
-
dropContentRef =
|
|
87
|
-
triggerRef =
|
|
81
|
+
_defineProperty(_this, "setContentWidth", function () {
|
|
82
|
+
var _this2 = _this,
|
|
83
|
+
dropContentRef = _this2.dropContentRef,
|
|
84
|
+
triggerRef = _this2.triggerRef;
|
|
88
85
|
var shouldFitContainer = _this.props.shouldFitContainer;
|
|
89
86
|
|
|
90
87
|
// We need to manually set the content width to match the trigger width
|
|
@@ -92,12 +89,12 @@ var DropList = /*#__PURE__*/function (_Component) {
|
|
|
92
89
|
dropContentRef.style.width = "".concat(triggerRef.offsetWidth - halfFocusRing * 2, "px");
|
|
93
90
|
}
|
|
94
91
|
});
|
|
95
|
-
_defineProperty(
|
|
92
|
+
_defineProperty(_this, "handleEsc", function (event) {
|
|
96
93
|
if ((event.key === 'Escape' || event.key === 'Esc') && _this.props.isOpen) {
|
|
97
94
|
_this.close(event);
|
|
98
95
|
}
|
|
99
96
|
});
|
|
100
|
-
_defineProperty(
|
|
97
|
+
_defineProperty(_this, "handleClickOutside", function (event) {
|
|
101
98
|
if (_this.props.isOpen) {
|
|
102
99
|
if (event.target instanceof Node) {
|
|
103
100
|
// Rather than check for the target within the entire DropList, we specify the trigger/content.
|
|
@@ -111,7 +108,7 @@ var DropList = /*#__PURE__*/function (_Component) {
|
|
|
111
108
|
}
|
|
112
109
|
}
|
|
113
110
|
});
|
|
114
|
-
_defineProperty(
|
|
111
|
+
_defineProperty(_this, "close", function (event) {
|
|
115
112
|
if (_this.props.onOpenChange) {
|
|
116
113
|
_this.props.onOpenChange({
|
|
117
114
|
isOpen: false,
|
|
@@ -119,7 +116,7 @@ var DropList = /*#__PURE__*/function (_Component) {
|
|
|
119
116
|
});
|
|
120
117
|
}
|
|
121
118
|
});
|
|
122
|
-
_defineProperty(
|
|
119
|
+
_defineProperty(_this, "handleContentRef", function (ref) {
|
|
123
120
|
_this.dropContentRef = ref;
|
|
124
121
|
|
|
125
122
|
// If the dropdown has just been opened, we focus on the containing element so the
|
|
@@ -129,16 +126,17 @@ var DropList = /*#__PURE__*/function (_Component) {
|
|
|
129
126
|
ref.focus();
|
|
130
127
|
}
|
|
131
128
|
});
|
|
132
|
-
_defineProperty(
|
|
129
|
+
_defineProperty(_this, "handleDroplistRef", function (ref) {
|
|
133
130
|
var _this$props$onDroplis, _this$props;
|
|
134
131
|
(_this$props$onDroplis = (_this$props = _this.props).onDroplistRef) === null || _this$props$onDroplis === void 0 || _this$props$onDroplis.call(_this$props, ref);
|
|
135
132
|
});
|
|
136
|
-
_defineProperty(
|
|
133
|
+
_defineProperty(_this, "handleTriggerRef", function (ref) {
|
|
137
134
|
_this.triggerRef = ref;
|
|
138
135
|
});
|
|
139
136
|
return _this;
|
|
140
137
|
}
|
|
141
|
-
|
|
138
|
+
_inherits(DropList, _Component);
|
|
139
|
+
return _createClass(DropList, [{
|
|
142
140
|
key: "render",
|
|
143
141
|
value: function render() {
|
|
144
142
|
var _this$props2 = this.props,
|
|
@@ -171,7 +169,6 @@ var DropList = /*#__PURE__*/function (_Component) {
|
|
|
171
169
|
}, trigger)));
|
|
172
170
|
}
|
|
173
171
|
}]);
|
|
174
|
-
return DropList;
|
|
175
172
|
}(Component);
|
|
176
173
|
var createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
|
|
177
174
|
export default withAnalyticsContext({
|
|
@@ -1,31 +1,29 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
9
|
import React from 'react';
|
|
11
10
|
import { ACTION, EVENT_TYPE } from '../../analytics';
|
|
12
11
|
import { logException } from '../../monitoring/error';
|
|
13
12
|
export var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
14
|
-
_inherits(ErrorBoundary, _React$Component);
|
|
15
|
-
var _super = _createSuper(ErrorBoundary);
|
|
16
13
|
function ErrorBoundary() {
|
|
17
14
|
var _this;
|
|
18
15
|
_classCallCheck(this, ErrorBoundary);
|
|
19
16
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
20
17
|
args[_key] = arguments[_key];
|
|
21
18
|
}
|
|
22
|
-
_this =
|
|
23
|
-
_defineProperty(
|
|
19
|
+
_this = _callSuper(this, ErrorBoundary, [].concat(args));
|
|
20
|
+
_defineProperty(_this, "state", {
|
|
24
21
|
errorCaptured: false
|
|
25
22
|
});
|
|
26
23
|
return _this;
|
|
27
24
|
}
|
|
28
|
-
|
|
25
|
+
_inherits(ErrorBoundary, _React$Component);
|
|
26
|
+
return _createClass(ErrorBoundary, [{
|
|
29
27
|
key: "hasFallback",
|
|
30
28
|
value: function hasFallback() {
|
|
31
29
|
return typeof this.props.fallbackComponent !== 'undefined';
|
|
@@ -69,5 +67,4 @@ export var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
69
67
|
return this.props.children;
|
|
70
68
|
}
|
|
71
69
|
}]);
|
|
72
|
-
return ErrorBoundary;
|
|
73
70
|
}(React.Component);
|
|
@@ -56,7 +56,7 @@ var titleInputStyles = function titleInputStyles() {
|
|
|
56
56
|
fontSize: relativeFontSizeToBase16(14),
|
|
57
57
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
58
58
|
lineHeight: fg('platform-visual-refresh-icons') ? 1 : akEditorLineHeight,
|
|
59
|
-
fontWeight:
|
|
59
|
+
fontWeight: "var(--ds-font-weight-regular, 400)",
|
|
60
60
|
color: "var(--ds-text-subtlest, #626F86)",
|
|
61
61
|
background: 'transparent',
|
|
62
62
|
display: 'flex',
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
9
|
import React from 'react';
|
|
11
10
|
import { IntlProvider } from 'react-intl-next';
|
|
@@ -15,21 +14,20 @@ var isMissingIntlProviderInAncestryError = function isMissingIntlProviderInAnces
|
|
|
15
14
|
return err === null || err === void 0 || (_err$toString = err.toString()) === null || _err$toString === void 0 ? void 0 : _err$toString.includes('<IntlProvider> needs to exist in the component ancestry');
|
|
16
15
|
};
|
|
17
16
|
export var IntlErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
18
|
-
_inherits(IntlErrorBoundary, _React$Component);
|
|
19
|
-
var _super = _createSuper(IntlErrorBoundary);
|
|
20
17
|
function IntlErrorBoundary() {
|
|
21
18
|
var _this;
|
|
22
19
|
_classCallCheck(this, IntlErrorBoundary);
|
|
23
20
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
24
21
|
args[_key] = arguments[_key];
|
|
25
22
|
}
|
|
26
|
-
_this =
|
|
27
|
-
_defineProperty(
|
|
23
|
+
_this = _callSuper(this, IntlErrorBoundary, [].concat(args));
|
|
24
|
+
_defineProperty(_this, "state", {
|
|
28
25
|
missingIntlProviderInAncestry: false
|
|
29
26
|
});
|
|
30
27
|
return _this;
|
|
31
28
|
}
|
|
32
|
-
|
|
29
|
+
_inherits(IntlErrorBoundary, _React$Component);
|
|
30
|
+
return _createClass(IntlErrorBoundary, [{
|
|
33
31
|
key: "componentDidCatch",
|
|
34
32
|
value: function componentDidCatch(error, errorInfo) {
|
|
35
33
|
// if missing IntlProvider in ancestry, we setup a fallback IntlProvider ourselves
|
|
@@ -53,5 +51,4 @@ export var IntlErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
53
51
|
return this.props.children;
|
|
54
52
|
}
|
|
55
53
|
}]);
|
|
56
|
-
return IntlErrorBoundary;
|
|
57
54
|
}(React.Component);
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
7
|
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; }
|
|
9
8
|
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; }
|
|
10
|
-
function
|
|
9
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
11
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12
11
|
import React, { Component } from 'react';
|
|
13
12
|
import Popper from 'popper.js'; // eslint-disable-line import/extensions
|
|
@@ -31,15 +30,13 @@ var defaultState = {
|
|
|
31
30
|
maxHeight: null
|
|
32
31
|
};
|
|
33
32
|
var Layer = /*#__PURE__*/function (_Component) {
|
|
34
|
-
_inherits(Layer, _Component);
|
|
35
|
-
var _super = _createSuper(Layer);
|
|
36
33
|
function Layer(props) {
|
|
37
34
|
var _this;
|
|
38
35
|
_classCallCheck(this, Layer);
|
|
39
|
-
_this =
|
|
40
|
-
_defineProperty(
|
|
41
|
-
_defineProperty(
|
|
42
|
-
_defineProperty(
|
|
36
|
+
_this = _callSuper(this, Layer, [props]);
|
|
37
|
+
_defineProperty(_this, "targetRef", /*#__PURE__*/React.createRef());
|
|
38
|
+
_defineProperty(_this, "contentRef", /*#__PURE__*/React.createRef());
|
|
39
|
+
_defineProperty(_this, "extractStyles", function (state) {
|
|
43
40
|
if (state) {
|
|
44
41
|
var popperHeight = state.offsets.popper.height;
|
|
45
42
|
var left = Math.round(state.offsets.popper.left);
|
|
@@ -58,10 +55,11 @@ var Layer = /*#__PURE__*/function (_Component) {
|
|
|
58
55
|
}
|
|
59
56
|
});
|
|
60
57
|
_this.state = defaultState;
|
|
61
|
-
_this.extractStyles = rafSchedule(_this.extractStyles.bind(
|
|
58
|
+
_this.extractStyles = rafSchedule(_this.extractStyles.bind(_this));
|
|
62
59
|
return _this;
|
|
63
60
|
}
|
|
64
|
-
|
|
61
|
+
_inherits(Layer, _Component);
|
|
62
|
+
return _createClass(Layer, [{
|
|
65
63
|
key: "componentDidMount",
|
|
66
64
|
value: function componentDidMount() {
|
|
67
65
|
this.applyPopper(this.props);
|
|
@@ -196,7 +194,6 @@ var Layer = /*#__PURE__*/function (_Component) {
|
|
|
196
194
|
}, this.props.content));
|
|
197
195
|
}
|
|
198
196
|
}]);
|
|
199
|
-
return Layer;
|
|
200
197
|
}(Component);
|
|
201
198
|
// working with extract-react-types
|
|
202
199
|
_defineProperty(Layer, "defaultProps", {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
9
|
/* eslint-disable @repo/internal/react/no-class-components */
|
|
11
10
|
import React, { PureComponent } from 'react';
|
|
@@ -13,13 +12,11 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
13
12
|
import { ProviderFactory, WithProviders } from '../../provider-factory';
|
|
14
13
|
import { MentionWithProviders, MentionWithProvidersOld } from './mention-with-providers';
|
|
15
14
|
var Mention = /*#__PURE__*/function (_PureComponent) {
|
|
16
|
-
_inherits(Mention, _PureComponent);
|
|
17
|
-
var _super = _createSuper(Mention);
|
|
18
15
|
function Mention(props) {
|
|
19
16
|
var _this;
|
|
20
17
|
_classCallCheck(this, Mention);
|
|
21
|
-
_this =
|
|
22
|
-
_defineProperty(
|
|
18
|
+
_this = _callSuper(this, Mention, [props]);
|
|
19
|
+
_defineProperty(_this, "renderWithProvider", function (providers) {
|
|
23
20
|
var _this$props = _this.props,
|
|
24
21
|
accessLevel = _this$props.accessLevel,
|
|
25
22
|
eventHandlers = _this$props.eventHandlers,
|
|
@@ -52,7 +49,8 @@ var Mention = /*#__PURE__*/function (_PureComponent) {
|
|
|
52
49
|
_this.providerFactory = props.providers || new ProviderFactory();
|
|
53
50
|
return _this;
|
|
54
51
|
}
|
|
55
|
-
|
|
52
|
+
_inherits(Mention, _PureComponent);
|
|
53
|
+
return _createClass(Mention, [{
|
|
56
54
|
key: "componentWillUnmount",
|
|
57
55
|
value: function componentWillUnmount() {
|
|
58
56
|
if (!this.props.providers) {
|
|
@@ -71,6 +69,5 @@ var Mention = /*#__PURE__*/function (_PureComponent) {
|
|
|
71
69
|
});
|
|
72
70
|
}
|
|
73
71
|
}]);
|
|
74
|
-
return Mention;
|
|
75
72
|
}(PureComponent);
|
|
76
73
|
export { Mention as default };
|
|
@@ -1,13 +1,12 @@
|
|
|
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
8
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
10
|
-
function
|
|
9
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
11
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12
11
|
import React, { PureComponent, useLayoutEffect, useRef, useState } from 'react';
|
|
13
12
|
import { ResourcedMention } from '@atlaskit/mention/element';
|
|
@@ -64,21 +63,20 @@ export var MentionWithProviders = function MentionWithProviders(_ref) {
|
|
|
64
63
|
|
|
65
64
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
66
65
|
export var MentionWithProvidersOld = /*#__PURE__*/function (_PureComponent) {
|
|
67
|
-
_inherits(MentionWithProvidersOld, _PureComponent);
|
|
68
|
-
var _super = _createSuper(MentionWithProvidersOld);
|
|
69
66
|
function MentionWithProvidersOld() {
|
|
70
67
|
var _this;
|
|
71
68
|
_classCallCheck(this, MentionWithProvidersOld);
|
|
72
69
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
73
70
|
args[_key] = arguments[_key];
|
|
74
71
|
}
|
|
75
|
-
_this =
|
|
76
|
-
_defineProperty(
|
|
72
|
+
_this = _callSuper(this, MentionWithProvidersOld, [].concat(args));
|
|
73
|
+
_defineProperty(_this, "state", {
|
|
77
74
|
profilecardProvider: null
|
|
78
75
|
});
|
|
79
76
|
return _this;
|
|
80
77
|
}
|
|
81
|
-
|
|
78
|
+
_inherits(MentionWithProvidersOld, _PureComponent);
|
|
79
|
+
return _createClass(MentionWithProvidersOld, [{
|
|
82
80
|
key: "UNSAFE_componentWillMount",
|
|
83
81
|
value: function UNSAFE_componentWillMount() {
|
|
84
82
|
this.updateProfilecardProvider(this.props);
|
|
@@ -140,5 +138,4 @@ export var MentionWithProvidersOld = /*#__PURE__*/function (_PureComponent) {
|
|
|
140
138
|
}, actionHandlers));
|
|
141
139
|
}
|
|
142
140
|
}]);
|
|
143
|
-
return MentionWithProvidersOld;
|
|
144
141
|
}(PureComponent);
|
|
@@ -23,7 +23,7 @@ var messageStyle = function messageStyle() {
|
|
|
23
23
|
fontSize: "".concat(12 / 14, "em"),
|
|
24
24
|
fontStyle: 'inherit',
|
|
25
25
|
lineHeight: 16 / 12,
|
|
26
|
-
fontWeight:
|
|
26
|
+
fontWeight: "var(--ds-font-weight-regular, 400)",
|
|
27
27
|
color: "var(--ds-text-subtlest, #626F86)",
|
|
28
28
|
marginTop: "var(--ds-space-050, 4px)",
|
|
29
29
|
display: 'flex',
|
|
@@ -1,12 +1,11 @@
|
|
|
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 from 'react';
|
|
12
11
|
import { ShadowObserver, shadowObserverClassNames } from './shadowObserver';
|
|
@@ -16,27 +15,25 @@ export var shadowClassNames = {
|
|
|
16
15
|
};
|
|
17
16
|
export default function overflowShadow(Component, options) {
|
|
18
17
|
return /*#__PURE__*/function (_React$Component) {
|
|
19
|
-
_inherits(OverflowShadow, _React$Component);
|
|
20
|
-
var _super = _createSuper(OverflowShadow);
|
|
21
18
|
function OverflowShadow() {
|
|
22
19
|
var _this;
|
|
23
20
|
_classCallCheck(this, OverflowShadow);
|
|
24
21
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
25
22
|
args[_key] = arguments[_key];
|
|
26
23
|
}
|
|
27
|
-
_this =
|
|
28
|
-
_defineProperty(
|
|
29
|
-
_defineProperty(
|
|
24
|
+
_this = _callSuper(this, OverflowShadow, [].concat(args));
|
|
25
|
+
_defineProperty(_this, "overflowContainerWidth", 0);
|
|
26
|
+
_defineProperty(_this, "state", {
|
|
30
27
|
showLeftShadow: false,
|
|
31
28
|
showRightShadow: false
|
|
32
29
|
});
|
|
33
|
-
_defineProperty(
|
|
30
|
+
_defineProperty(_this, "handleScroll", function (event) {
|
|
34
31
|
if (!_this.overflowContainer || event.target !== _this.overflowContainer || options.useShadowObserver) {
|
|
35
32
|
return;
|
|
36
33
|
}
|
|
37
34
|
_this.updateShadows();
|
|
38
35
|
});
|
|
39
|
-
_defineProperty(
|
|
36
|
+
_defineProperty(_this, "updateShadows", function () {
|
|
40
37
|
if (options.useShadowObserver) {
|
|
41
38
|
return;
|
|
42
39
|
}
|
|
@@ -56,17 +53,17 @@ export default function overflowShadow(Component, options) {
|
|
|
56
53
|
return null;
|
|
57
54
|
});
|
|
58
55
|
});
|
|
59
|
-
_defineProperty(
|
|
56
|
+
_defineProperty(_this, "showLeftShadow", function (overflowContainer) {
|
|
60
57
|
return !!overflowContainer && overflowContainer.scrollLeft > 0;
|
|
61
58
|
});
|
|
62
|
-
_defineProperty(
|
|
59
|
+
_defineProperty(_this, "calcOverflowDiff", function () {
|
|
63
60
|
if (!_this.overflowContainer) {
|
|
64
61
|
return 0;
|
|
65
62
|
}
|
|
66
63
|
_this.diff = _this.calcScrollableWidth();
|
|
67
64
|
return _this.diff - _this.overflowContainer.offsetWidth;
|
|
68
65
|
});
|
|
69
|
-
_defineProperty(
|
|
66
|
+
_defineProperty(_this, "calcScrollableWidth", function () {
|
|
70
67
|
if (!_this.scrollable && _this.overflowContainer) {
|
|
71
68
|
return _this.overflowContainer.scrollWidth;
|
|
72
69
|
}
|
|
@@ -80,7 +77,7 @@ export default function overflowShadow(Component, options) {
|
|
|
80
77
|
}
|
|
81
78
|
return width;
|
|
82
79
|
});
|
|
83
|
-
_defineProperty(
|
|
80
|
+
_defineProperty(_this, "handleContainer", function (container) {
|
|
84
81
|
if (!container || _this.container) {
|
|
85
82
|
return;
|
|
86
83
|
}
|
|
@@ -98,7 +95,8 @@ export default function overflowShadow(Component, options) {
|
|
|
98
95
|
});
|
|
99
96
|
return _this;
|
|
100
97
|
}
|
|
101
|
-
|
|
98
|
+
_inherits(OverflowShadow, _React$Component);
|
|
99
|
+
return _createClass(OverflowShadow, [{
|
|
102
100
|
key: "componentWillUnmount",
|
|
103
101
|
value: function componentWillUnmount() {
|
|
104
102
|
if (options.useShadowObserver) {
|
|
@@ -153,6 +151,5 @@ export default function overflowShadow(Component, options) {
|
|
|
153
151
|
}, this.props));
|
|
154
152
|
}
|
|
155
153
|
}]);
|
|
156
|
-
return OverflowShadow;
|
|
157
154
|
}(React.Component);
|
|
158
155
|
}
|
|
@@ -19,13 +19,12 @@ var cancelIdleCallback = function cancelIdleCallback(id) {
|
|
|
19
19
|
};
|
|
20
20
|
export var ShadowObserver = /*#__PURE__*/function () {
|
|
21
21
|
function ShadowObserver(_ref) {
|
|
22
|
-
var
|
|
23
|
-
_this = this;
|
|
22
|
+
var _this = this;
|
|
24
23
|
var scrollContainer = _ref.scrollContainer,
|
|
25
24
|
onUpdateShadows = _ref.onUpdateShadows;
|
|
26
25
|
_classCallCheck(this, ShadowObserver);
|
|
27
26
|
_defineProperty(this, "sentinels", {});
|
|
28
|
-
_defineProperty(this, "shadowStates", (
|
|
27
|
+
_defineProperty(this, "shadowStates", _defineProperty(_defineProperty({}, ShadowKeys.SHOW_LEFT_SHADOW, false), ShadowKeys.SHOW_RIGHT_SHADOW, false));
|
|
29
28
|
_defineProperty(this, "init", function () {
|
|
30
29
|
if (!_this.scrollContainer || _this.intersectionObserver) {
|
|
31
30
|
return;
|
|
@@ -60,7 +59,7 @@ export var ShadowObserver = /*#__PURE__*/function () {
|
|
|
60
59
|
this.onUpdateShadows = onUpdateShadows;
|
|
61
60
|
this.init();
|
|
62
61
|
}
|
|
63
|
-
_createClass(ShadowObserver, [{
|
|
62
|
+
return _createClass(ShadowObserver, [{
|
|
64
63
|
key: "dispose",
|
|
65
64
|
value: function dispose() {
|
|
66
65
|
if (this.intersectionObserver) {
|
|
@@ -70,5 +69,4 @@ export var ShadowObserver = /*#__PURE__*/function () {
|
|
|
70
69
|
}
|
|
71
70
|
}
|
|
72
71
|
}]);
|
|
73
|
-
return ShadowObserver;
|
|
74
72
|
}();
|