@atlaskit/editor-core 203.2.8 → 203.2.10
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 +20 -0
- package/dist/cjs/CollapsedEditor/index.js +6 -9
- package/dist/cjs/actions/index.js +1 -2
- package/dist/cjs/create-editor/ErrorBoundary.js +10 -13
- package/dist/cjs/create-editor/ReactEditorView.js +25 -28
- package/dist/cjs/editor.js +5 -7
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +7 -6
- package/dist/cjs/ui/Addon/ClickAreaMobile/index.js +7 -10
- package/dist/cjs/ui/Addon/Dropdown/index.js +6 -9
- package/dist/cjs/ui/Appearance/Chromeless.js +8 -11
- package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +6 -5
- package/dist/cjs/ui/ChromeCollapsed/index.js +7 -10
- package/dist/cjs/ui/ChromeCollapsed/styles.js +1 -1
- package/dist/cjs/ui/CollapsedEditor/index.js +6 -9
- package/dist/cjs/ui/ContentStyles/ai-panels.js +6 -6
- package/dist/cjs/ui/ContentStyles/layout.js +10 -4
- package/dist/cjs/ui/ContextPanel/index.js +9 -12
- package/dist/cjs/ui/EditorContext/index.js +8 -12
- package/dist/cjs/ui/ErrorBoundary/index.js +6 -9
- package/dist/cjs/ui/PluginSlot/index.js +9 -12
- package/dist/cjs/ui/Toolbar/ToolbarInner.js +5 -7
- package/dist/cjs/ui/WithEditorActions/index.js +12 -19
- package/dist/cjs/ui/WithFlash/index.js +6 -9
- package/dist/cjs/ui/WithHelpTrigger/index.js +6 -9
- package/dist/cjs/utils/performance/plugin-performance-observer.js +1 -2
- package/dist/cjs/utils/performance/plugin-performance-report.js +1 -2
- package/dist/cjs/utils/performance/track-transactions.js +1 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/ChromeCollapsed/styles.js +1 -1
- package/dist/es2019/ui/ContentStyles/layout.js +68 -26
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/CollapsedEditor/index.js +6 -9
- package/dist/esm/actions/index.js +1 -2
- package/dist/esm/create-editor/ErrorBoundary.js +10 -13
- package/dist/esm/create-editor/ReactEditorView.js +25 -28
- package/dist/esm/editor.js +5 -7
- package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +5 -6
- package/dist/esm/ui/Addon/ClickAreaMobile/index.js +7 -10
- package/dist/esm/ui/Addon/Dropdown/index.js +6 -9
- package/dist/esm/ui/Appearance/Chromeless.js +8 -11
- package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +4 -5
- package/dist/esm/ui/ChromeCollapsed/index.js +7 -10
- package/dist/esm/ui/ChromeCollapsed/styles.js +1 -1
- package/dist/esm/ui/CollapsedEditor/index.js +6 -9
- package/dist/esm/ui/ContentStyles/ai-panels.js +6 -6
- package/dist/esm/ui/ContentStyles/layout.js +10 -4
- package/dist/esm/ui/ContextPanel/index.js +9 -12
- package/dist/esm/ui/EditorContext/index.js +8 -12
- package/dist/esm/ui/ErrorBoundary/index.js +6 -9
- package/dist/esm/ui/PluginSlot/index.js +9 -12
- package/dist/esm/ui/Toolbar/ToolbarInner.js +5 -7
- package/dist/esm/ui/WithEditorActions/index.js +12 -19
- package/dist/esm/ui/WithFlash/index.js +6 -9
- package/dist/esm/ui/WithHelpTrigger/index.js +6 -9
- package/dist/esm/utils/performance/plugin-performance-observer.js +1 -2
- package/dist/esm/utils/performance/plugin-performance-report.js +1 -2
- package/dist/esm/utils/performance/track-transactions.js +1 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/create-editor/create-universal-preset.d.ts +132 -11
- package/dist/types/presets/default.d.ts +72 -6
- package/dist/types/presets/universal.d.ts +132 -11
- package/dist/types/presets/useUniversalPreset.d.ts +132 -11
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +2 -2
- package/dist/types/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +143 -0
- package/dist/types-ts4.5/presets/default.d.ts +78 -0
- package/dist/types-ts4.5/presets/universal.d.ts +143 -0
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +143 -0
- package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +2 -2
- package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +2 -2
- package/package.json +7 -3
|
@@ -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 from 'react';
|
|
13
12
|
import { injectIntl } from 'react-intl-next';
|
|
@@ -82,18 +81,16 @@ function handleEditorFocus(view) {
|
|
|
82
81
|
}, 0);
|
|
83
82
|
}
|
|
84
83
|
export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
85
|
-
_inherits(ReactEditorView, _React$Component);
|
|
86
|
-
var _super = _createSuper(ReactEditorView);
|
|
87
84
|
function ReactEditorView(props) {
|
|
88
85
|
var _this$props$editorPro3, _props$setEditorAPI;
|
|
89
86
|
var _this;
|
|
90
87
|
_classCallCheck(this, ReactEditorView);
|
|
91
|
-
_this =
|
|
92
|
-
_defineProperty(
|
|
88
|
+
_this = _callSuper(this, ReactEditorView, [props]);
|
|
89
|
+
_defineProperty(_this, "editorRef", /*#__PURE__*/React.createRef());
|
|
93
90
|
// ProseMirror is instantiated prior to the initial React render cycle,
|
|
94
91
|
// so we allow transactions by default, to avoid discarding the initial one.
|
|
95
|
-
_defineProperty(
|
|
96
|
-
_defineProperty(
|
|
92
|
+
_defineProperty(_this, "canDispatchTransactions", true);
|
|
93
|
+
_defineProperty(_this, "onPluginObservation", function (report) {
|
|
97
94
|
var _this$pluginInjection;
|
|
98
95
|
_this.dispatchAnalyticsEvent({
|
|
99
96
|
action: ACTION.TRANSACTION_DISPATCHED,
|
|
@@ -105,20 +102,20 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
105
102
|
}
|
|
106
103
|
});
|
|
107
104
|
});
|
|
108
|
-
_defineProperty(
|
|
105
|
+
_defineProperty(_this, "getEditorState", function () {
|
|
109
106
|
var _this$view;
|
|
110
107
|
return (_this$view = _this.view) === null || _this$view === void 0 ? void 0 : _this$view.state;
|
|
111
108
|
});
|
|
112
|
-
_defineProperty(
|
|
109
|
+
_defineProperty(_this, "getEditorView", function () {
|
|
113
110
|
return _this.view;
|
|
114
111
|
});
|
|
115
|
-
_defineProperty(
|
|
112
|
+
_defineProperty(_this, "formatFullWidthAppearance", function (appearance) {
|
|
116
113
|
if (appearance === 'full-width') {
|
|
117
114
|
return FULL_WIDTH_MODE.FULL_WIDTH;
|
|
118
115
|
}
|
|
119
116
|
return FULL_WIDTH_MODE.FIXED_WIDTH;
|
|
120
117
|
});
|
|
121
|
-
_defineProperty(
|
|
118
|
+
_defineProperty(_this, "resetEditorState", function (_ref) {
|
|
122
119
|
var _this$props$editorPro, _this$props$editorPro2;
|
|
123
120
|
var doc = _ref.doc,
|
|
124
121
|
shouldScrollToBottom = _ref.shouldScrollToBottom;
|
|
@@ -142,7 +139,7 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
142
139
|
source: 'local'
|
|
143
140
|
});
|
|
144
141
|
});
|
|
145
|
-
_defineProperty(
|
|
142
|
+
_defineProperty(_this, "blur", function () {
|
|
146
143
|
if (!_this.view) {
|
|
147
144
|
return;
|
|
148
145
|
}
|
|
@@ -158,11 +155,11 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
158
155
|
sel.removeAllRanges();
|
|
159
156
|
}
|
|
160
157
|
});
|
|
161
|
-
_defineProperty(
|
|
158
|
+
_defineProperty(_this, "handleAnalyticsEvent", function (payload) {
|
|
162
159
|
fireAnalyticsEvent(_this.props.createAnalyticsEvent)(payload);
|
|
163
160
|
});
|
|
164
|
-
_defineProperty(
|
|
165
|
-
_defineProperty(
|
|
161
|
+
_defineProperty(_this, "editorPlugins", []);
|
|
162
|
+
_defineProperty(_this, "createEditorState", function (options) {
|
|
166
163
|
var _api$editorViewMode;
|
|
167
164
|
var schema;
|
|
168
165
|
if (_this.view) {
|
|
@@ -245,7 +242,7 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
245
242
|
selection: patchedSelection
|
|
246
243
|
});
|
|
247
244
|
});
|
|
248
|
-
_defineProperty(
|
|
245
|
+
_defineProperty(_this, "onEditorViewStateUpdated", function (_ref2) {
|
|
249
246
|
var originalTransaction = _ref2.originalTransaction,
|
|
250
247
|
transactions = _ref2.transactions,
|
|
251
248
|
oldEditorState = _ref2.oldEditorState,
|
|
@@ -259,7 +256,7 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
259
256
|
});
|
|
260
257
|
});
|
|
261
258
|
});
|
|
262
|
-
_defineProperty(
|
|
259
|
+
_defineProperty(_this, "dispatchTransaction", function (unsafeTransaction) {
|
|
263
260
|
if (!_this.view) {
|
|
264
261
|
return;
|
|
265
262
|
}
|
|
@@ -332,7 +329,7 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
332
329
|
});
|
|
333
330
|
}
|
|
334
331
|
});
|
|
335
|
-
_defineProperty(
|
|
332
|
+
_defineProperty(_this, "getDirectEditorProps", function (state) {
|
|
336
333
|
return {
|
|
337
334
|
state: state || _this.editorState,
|
|
338
335
|
dispatchTransaction: function dispatchTransaction(tr) {
|
|
@@ -352,7 +349,7 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
352
349
|
}
|
|
353
350
|
};
|
|
354
351
|
});
|
|
355
|
-
_defineProperty(
|
|
352
|
+
_defineProperty(_this, "createEditorView", function (node) {
|
|
356
353
|
measureRender(measurements.PROSEMIRROR_RENDERED, function (_ref3) {
|
|
357
354
|
var duration = _ref3.duration,
|
|
358
355
|
startTime = _ref3.startTime,
|
|
@@ -390,7 +387,7 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
390
387
|
oldEditorState: undefined
|
|
391
388
|
});
|
|
392
389
|
});
|
|
393
|
-
_defineProperty(
|
|
390
|
+
_defineProperty(_this, "handleEditorViewRef", function (node) {
|
|
394
391
|
if (!_this.view && node) {
|
|
395
392
|
_this.createEditorView(node);
|
|
396
393
|
var view = _this.view;
|
|
@@ -430,7 +427,7 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
430
427
|
_this.view = undefined;
|
|
431
428
|
}
|
|
432
429
|
});
|
|
433
|
-
_defineProperty(
|
|
430
|
+
_defineProperty(_this, "dispatchAnalyticsEvent", function (payload) {
|
|
434
431
|
if (_this.eventDispatcher) {
|
|
435
432
|
var dispatch = createDispatch(_this.eventDispatcher);
|
|
436
433
|
dispatch(analyticsEventKey, {
|
|
@@ -438,8 +435,8 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
438
435
|
});
|
|
439
436
|
}
|
|
440
437
|
});
|
|
441
|
-
_defineProperty(
|
|
442
|
-
_defineProperty(
|
|
438
|
+
_defineProperty(_this, "editorId", uuid());
|
|
439
|
+
_defineProperty(_this, "createEditor", function (assistiveLabel, assistiveDescribedBy) {
|
|
443
440
|
return /*#__PURE__*/React.createElement("div", {
|
|
444
441
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
445
442
|
className: getUAPrefix(),
|
|
@@ -459,7 +456,7 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
459
456
|
"data-editor-id": _this.editorId
|
|
460
457
|
});
|
|
461
458
|
});
|
|
462
|
-
_defineProperty(
|
|
459
|
+
_defineProperty(_this, "editor", _this.createEditor(_this.props.editorProps.assistiveLabel, (_this$props$editorPro3 = _this.props.editorProps) === null || _this$props$editorPro3 === void 0 ? void 0 : _this$props$editorPro3.assistiveDescribedBy));
|
|
463
460
|
_this.pluginInjectionAPI = new EditorPluginInjectionAPI({
|
|
464
461
|
getEditorState: _this.getEditorState,
|
|
465
462
|
getEditorView: _this.getEditorView,
|
|
@@ -501,7 +498,8 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
501
498
|
});
|
|
502
499
|
return _this;
|
|
503
500
|
}
|
|
504
|
-
|
|
501
|
+
_inherits(ReactEditorView, _React$Component);
|
|
502
|
+
return _createClass(ReactEditorView, [{
|
|
505
503
|
key: "transactionTracking",
|
|
506
504
|
get:
|
|
507
505
|
//TODO: clean up
|
|
@@ -684,7 +682,6 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
684
682
|
})) !== null && _this$props$render !== void 0 ? _this$props$render : this.editor : this.editor);
|
|
685
683
|
}
|
|
686
684
|
}]);
|
|
687
|
-
return ReactEditorView;
|
|
688
685
|
}(React.Component);
|
|
689
686
|
function getUAPrefix() {
|
|
690
687
|
if (browser.chrome) {
|
package/dist/esm/editor.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
7
|
import _extends from "@babel/runtime/helpers/extends";
|
|
8
|
-
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)); }
|
|
9
9
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
10
|
// Disable no-re-export rule for entry point files
|
|
11
11
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
@@ -41,16 +41,15 @@ var ComposableEditorWrapper = function ComposableEditorWrapper(_ref) {
|
|
|
41
41
|
* For more information, see the documentation for the `ComposableEditor` component here: https://atlaskit.atlassian.com/packages/editor/editor-core
|
|
42
42
|
*/
|
|
43
43
|
var Editor = /*#__PURE__*/function (_React$Component) {
|
|
44
|
-
_inherits(Editor, _React$Component);
|
|
45
|
-
var _super = _createSuper(Editor);
|
|
46
44
|
function Editor(props) {
|
|
47
45
|
var _this;
|
|
48
46
|
_classCallCheck(this, Editor);
|
|
49
|
-
_this =
|
|
47
|
+
_this = _callSuper(this, Editor, [props]);
|
|
50
48
|
editorDeprecationWarnings(props);
|
|
51
49
|
return _this;
|
|
52
50
|
}
|
|
53
|
-
|
|
51
|
+
_inherits(Editor, _React$Component);
|
|
52
|
+
return _createClass(Editor, [{
|
|
54
53
|
key: "render",
|
|
55
54
|
value: function render() {
|
|
56
55
|
return jsx(ComposableEditorWrapper, {
|
|
@@ -59,7 +58,6 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
59
58
|
});
|
|
60
59
|
}
|
|
61
60
|
}]);
|
|
62
|
-
return Editor;
|
|
63
61
|
}(React.Component);
|
|
64
62
|
_defineProperty(Editor, "defaultProps", {
|
|
65
63
|
appearance: 'comment',
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
var _css;
|
|
3
2
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
3
|
import { css } from '@emotion/react';
|
|
5
4
|
import { inlineNodeViewClassname } from '@atlaskit/editor-common/react-node-view';
|
|
@@ -9,7 +8,7 @@ import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/whitespace';
|
|
|
9
8
|
// ./getInlineNodeViewProducer -> portalChildren()
|
|
10
9
|
|
|
11
10
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
12
|
-
export var InlineNodeViewSharedStyles = css((
|
|
11
|
+
export var InlineNodeViewSharedStyles = css(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ".".concat(inlineNodeViewClassname), {
|
|
13
12
|
display: 'inline',
|
|
14
13
|
userSelect: 'all',
|
|
15
14
|
whiteSpace: 'nowrap',
|
|
@@ -21,17 +20,17 @@ export var InlineNodeViewSharedStyles = css((_css = {}, _defineProperty(_css, ".
|
|
|
21
20
|
'& > .assistive': {
|
|
22
21
|
userSelect: 'none'
|
|
23
22
|
}
|
|
24
|
-
}),
|
|
23
|
+
}), '&.ua-safari', _defineProperty({}, ".".concat(inlineNodeViewClassname), {
|
|
25
24
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
26
25
|
'::selection, *::selection': {
|
|
27
26
|
background: 'transparent'
|
|
28
27
|
}
|
|
29
|
-
})),
|
|
28
|
+
})), "&.ua-chrome .".concat(inlineNodeViewClassname, " > span"), {
|
|
30
29
|
userSelect: 'none'
|
|
31
|
-
}),
|
|
30
|
+
}), ".".concat(inlineNodeViewClassname, "AddZeroWidthSpace"), {
|
|
32
31
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
33
32
|
'::after': {
|
|
34
33
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
35
34
|
content: "'".concat(ZERO_WIDTH_SPACE, "'")
|
|
36
35
|
}
|
|
37
|
-
})
|
|
36
|
+
}));
|
|
@@ -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
|
|
@@ -46,17 +45,15 @@ var clickWrapper = function clickWrapper(_ref) {
|
|
|
46
45
|
* whitespace at the end of the document when it overflows the viewport.
|
|
47
46
|
*/
|
|
48
47
|
var ClickAreaMobile = /*#__PURE__*/function (_React$Component) {
|
|
49
|
-
_inherits(ClickAreaMobile, _React$Component);
|
|
50
|
-
var _super = _createSuper(ClickAreaMobile);
|
|
51
48
|
function ClickAreaMobile() {
|
|
52
49
|
var _this;
|
|
53
50
|
_classCallCheck(this, ClickAreaMobile);
|
|
54
51
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
55
52
|
args[_key] = arguments[_key];
|
|
56
53
|
}
|
|
57
|
-
_this =
|
|
58
|
-
_defineProperty(
|
|
59
|
-
_defineProperty(
|
|
54
|
+
_this = _callSuper(this, ClickAreaMobile, [].concat(args));
|
|
55
|
+
_defineProperty(_this, "clickElementRef", /*#__PURE__*/React.createRef());
|
|
56
|
+
_defineProperty(_this, "handleClick", function (event) {
|
|
60
57
|
var _this$props = _this.props,
|
|
61
58
|
view = _this$props.editorView,
|
|
62
59
|
editorDisabled = _this$props.editorDisabled;
|
|
@@ -79,7 +76,8 @@ var ClickAreaMobile = /*#__PURE__*/function (_React$Component) {
|
|
|
79
76
|
});
|
|
80
77
|
return _this;
|
|
81
78
|
}
|
|
82
|
-
|
|
79
|
+
_inherits(ClickAreaMobile, _React$Component);
|
|
80
|
+
return _createClass(ClickAreaMobile, [{
|
|
83
81
|
key: "render",
|
|
84
82
|
value: function render() {
|
|
85
83
|
return (
|
|
@@ -99,6 +97,5 @@ var ClickAreaMobile = /*#__PURE__*/function (_React$Component) {
|
|
|
99
97
|
);
|
|
100
98
|
}
|
|
101
99
|
}]);
|
|
102
|
-
return ClickAreaMobile;
|
|
103
100
|
}(React.Component);
|
|
104
101
|
export { ClickAreaMobile as default };
|
|
@@ -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
|
|
@@ -17,16 +16,14 @@ import React from 'react';
|
|
|
17
16
|
import { jsx } from '@emotion/react';
|
|
18
17
|
import { dropdown } from './styles';
|
|
19
18
|
var DropdownWrapper = /*#__PURE__*/function (_React$Component) {
|
|
20
|
-
_inherits(DropdownWrapper, _React$Component);
|
|
21
|
-
var _super = _createSuper(DropdownWrapper);
|
|
22
19
|
function DropdownWrapper() {
|
|
23
20
|
var _this;
|
|
24
21
|
_classCallCheck(this, DropdownWrapper);
|
|
25
22
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
26
23
|
args[_key] = arguments[_key];
|
|
27
24
|
}
|
|
28
|
-
_this =
|
|
29
|
-
_defineProperty(
|
|
25
|
+
_this = _callSuper(this, DropdownWrapper, [].concat(args));
|
|
26
|
+
_defineProperty(_this, "handleClick", function (actions) {
|
|
30
27
|
var actionOnClick = actions.actionOnClick,
|
|
31
28
|
renderOnClick = actions.renderOnClick;
|
|
32
29
|
var editorActions = _this.props.editorActions;
|
|
@@ -39,7 +36,8 @@ var DropdownWrapper = /*#__PURE__*/function (_React$Component) {
|
|
|
39
36
|
});
|
|
40
37
|
return _this;
|
|
41
38
|
}
|
|
42
|
-
|
|
39
|
+
_inherits(DropdownWrapper, _React$Component);
|
|
40
|
+
return _createClass(DropdownWrapper, [{
|
|
43
41
|
key: "render",
|
|
44
42
|
value: function render() {
|
|
45
43
|
var _this2 = this;
|
|
@@ -56,6 +54,5 @@ var DropdownWrapper = /*#__PURE__*/function (_React$Component) {
|
|
|
56
54
|
}, children);
|
|
57
55
|
}
|
|
58
56
|
}]);
|
|
59
|
-
return DropdownWrapper;
|
|
60
57
|
}(React.Component);
|
|
61
58
|
export { DropdownWrapper as default };
|
|
@@ -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
|
|
@@ -46,18 +45,16 @@ scrollbarStyles, {
|
|
|
46
45
|
var ContentArea = createEditorContentStyle();
|
|
47
46
|
ContentArea.displayName = 'ContentArea';
|
|
48
47
|
var Editor = /*#__PURE__*/function (_React$Component) {
|
|
49
|
-
_inherits(Editor, _React$Component);
|
|
50
|
-
var _super = _createSuper(Editor);
|
|
51
48
|
function Editor() {
|
|
52
49
|
var _this;
|
|
53
50
|
_classCallCheck(this, Editor);
|
|
54
51
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
55
52
|
args[_key] = arguments[_key];
|
|
56
53
|
}
|
|
57
|
-
_this =
|
|
58
|
-
_defineProperty(
|
|
59
|
-
_defineProperty(
|
|
60
|
-
_defineProperty(
|
|
54
|
+
_this = _callSuper(this, Editor, [].concat(args));
|
|
55
|
+
_defineProperty(_this, "appearance", 'chromeless');
|
|
56
|
+
_defineProperty(_this, "containerElement", null);
|
|
57
|
+
_defineProperty(_this, "renderChrome", function (_ref) {
|
|
61
58
|
var maxContentSize = _ref.maxContentSize;
|
|
62
59
|
var _this$props = _this.props,
|
|
63
60
|
editorDOMElement = _this$props.editorDOMElement,
|
|
@@ -123,7 +120,8 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
123
120
|
});
|
|
124
121
|
return _this;
|
|
125
122
|
}
|
|
126
|
-
|
|
123
|
+
_inherits(Editor, _React$Component);
|
|
124
|
+
return _createClass(Editor, [{
|
|
127
125
|
key: "render",
|
|
128
126
|
value: function render() {
|
|
129
127
|
return jsx(RenderWithPluginState, {
|
|
@@ -132,7 +130,6 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
132
130
|
});
|
|
133
131
|
}
|
|
134
132
|
}]);
|
|
135
|
-
return Editor;
|
|
136
133
|
}(React.Component);
|
|
137
134
|
_defineProperty(Editor, "displayName", 'ChromelessEditorAppearance');
|
|
138
135
|
export { Editor as default };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
var _ProseMirror;
|
|
3
2
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
3
|
import { css } from '@emotion/react';
|
|
5
4
|
import { decisionListSelector, taskListSelector } from '@atlaskit/adf-schema';
|
|
@@ -154,18 +153,18 @@ var editorContentArea = css({
|
|
|
154
153
|
maxWidth: "".concat(akEditorFullWidthLayoutWidth + getTotalPadding(), "px"),
|
|
155
154
|
transition: "max-width ".concat(SWOOP_ANIMATION),
|
|
156
155
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
157
|
-
'& .ProseMirror': (
|
|
156
|
+
'& .ProseMirror': _defineProperty(_defineProperty({
|
|
158
157
|
flexGrow: 1,
|
|
159
158
|
boxSizing: 'border-box',
|
|
160
159
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
161
160
|
'& > *': {
|
|
162
161
|
clear: 'both'
|
|
163
162
|
}
|
|
164
|
-
},
|
|
163
|
+
}, "> p, > ul, > ol:not(".concat(taskListSelector, "):not(").concat(decisionListSelector, "), > h1, > h2, > h3, > h4, > h5, > h6"), {
|
|
165
164
|
clear: 'none'
|
|
166
|
-
}),
|
|
165
|
+
}), '> p:last-child', {
|
|
167
166
|
marginBottom: "var(--ds-space-300, 24px)"
|
|
168
|
-
})
|
|
167
|
+
})
|
|
169
168
|
},
|
|
170
169
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
171
170
|
tableFullPageEditorStyles, {
|
|
@@ -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
|
|
@@ -20,16 +19,14 @@ import { injectIntl } from 'react-intl-next';
|
|
|
20
19
|
import { messages } from './messages';
|
|
21
20
|
import { inputStyle } from './styles';
|
|
22
21
|
var ChromeCollapsed = /*#__PURE__*/function (_PureComponent) {
|
|
23
|
-
_inherits(ChromeCollapsed, _PureComponent);
|
|
24
|
-
var _super = _createSuper(ChromeCollapsed);
|
|
25
22
|
function ChromeCollapsed() {
|
|
26
23
|
var _this;
|
|
27
24
|
_classCallCheck(this, ChromeCollapsed);
|
|
28
25
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
29
26
|
args[_key] = arguments[_key];
|
|
30
27
|
}
|
|
31
|
-
_this =
|
|
32
|
-
_defineProperty(
|
|
28
|
+
_this = _callSuper(this, ChromeCollapsed, [].concat(args));
|
|
29
|
+
_defineProperty(_this, "focusHandler", function (evt) {
|
|
33
30
|
/**
|
|
34
31
|
* We need this magic for FireFox.
|
|
35
32
|
* The reason we need it is, when, in FireFox, we have focus inside input,
|
|
@@ -43,12 +40,13 @@ var ChromeCollapsed = /*#__PURE__*/function (_PureComponent) {
|
|
|
43
40
|
_this.props.onFocus(evt);
|
|
44
41
|
}
|
|
45
42
|
});
|
|
46
|
-
_defineProperty(
|
|
43
|
+
_defineProperty(_this, "handleInputRef", function (ref) {
|
|
47
44
|
_this.input = ref;
|
|
48
45
|
});
|
|
49
46
|
return _this;
|
|
50
47
|
}
|
|
51
|
-
|
|
48
|
+
_inherits(ChromeCollapsed, _PureComponent);
|
|
49
|
+
return _createClass(ChromeCollapsed, [{
|
|
52
50
|
key: "render",
|
|
53
51
|
value: function render() {
|
|
54
52
|
var placeholder = this.props.text || this.props.intl.formatMessage(messages.chromeCollapsedPlaceholder);
|
|
@@ -64,6 +62,5 @@ var ChromeCollapsed = /*#__PURE__*/function (_PureComponent) {
|
|
|
64
62
|
});
|
|
65
63
|
}
|
|
66
64
|
}]);
|
|
67
|
-
return ChromeCollapsed;
|
|
68
65
|
}(PureComponent);
|
|
69
66
|
export default injectIntl(ChromeCollapsed);
|
|
@@ -18,7 +18,7 @@ export var inputStyle = css({
|
|
|
18
18
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
19
19
|
fontSize: relativeFontSizeToBase16(14),
|
|
20
20
|
width: '100%',
|
|
21
|
-
fontWeight: 400,
|
|
21
|
+
fontWeight: "var(--ds-font-weight-regular, 400)",
|
|
22
22
|
lineHeight: 1.42857142857143,
|
|
23
23
|
letterSpacing: '-0.005em',
|
|
24
24
|
color: "var(--ds-text-subtlest, #626F86)",
|
|
@@ -1,26 +1,23 @@
|
|
|
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 ChromeCollapsed from '../ChromeCollapsed';
|
|
12
11
|
import { IntlProviderIfMissingWrapper } from '../IntlProviderIfMissingWrapper/IntlProviderIfMissingWrapper';
|
|
13
12
|
var CollapsedEditor = /*#__PURE__*/function (_React$Component) {
|
|
14
|
-
_inherits(CollapsedEditor, _React$Component);
|
|
15
|
-
var _super = _createSuper(CollapsedEditor);
|
|
16
13
|
function CollapsedEditor() {
|
|
17
14
|
var _this;
|
|
18
15
|
_classCallCheck(this, CollapsedEditor);
|
|
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, CollapsedEditor, [].concat(args));
|
|
20
|
+
_defineProperty(_this, "handleEditorRef", function (editorRef, editorRefCallback) {
|
|
24
21
|
if (editorRefCallback && typeof editorRefCallback === 'function') {
|
|
25
22
|
editorRefCallback(editorRef);
|
|
26
23
|
}
|
|
@@ -28,7 +25,8 @@ var CollapsedEditor = /*#__PURE__*/function (_React$Component) {
|
|
|
28
25
|
});
|
|
29
26
|
return _this;
|
|
30
27
|
}
|
|
31
|
-
|
|
28
|
+
_inherits(CollapsedEditor, _React$Component);
|
|
29
|
+
return _createClass(CollapsedEditor, [{
|
|
32
30
|
key: "componentDidUpdate",
|
|
33
31
|
value: function componentDidUpdate() {
|
|
34
32
|
if (this.props.isExpanded && (this.editorComponent || this.functionalEditor) && (!this.previouslyExpanded || this.previouslyExpanded === undefined)) {
|
|
@@ -62,6 +60,5 @@ var CollapsedEditor = /*#__PURE__*/function (_React$Component) {
|
|
|
62
60
|
});
|
|
63
61
|
}
|
|
64
62
|
}]);
|
|
65
|
-
return CollapsedEditor;
|
|
66
63
|
}(React.Component);
|
|
67
64
|
export { CollapsedEditor as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
-
var
|
|
3
|
+
var _templateObject;
|
|
4
4
|
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; }
|
|
5
5
|
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; }
|
|
6
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -18,19 +18,19 @@ var rotationAnimation = keyframes({
|
|
|
18
18
|
backgroundPosition: '-100%'
|
|
19
19
|
} : {})
|
|
20
20
|
});
|
|
21
|
-
var aiPrismColor = (
|
|
21
|
+
var aiPrismColor = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, 'prism.border.step.1', {
|
|
22
22
|
light: '#0065FF',
|
|
23
23
|
dark: '#0065FF80'
|
|
24
|
-
}),
|
|
24
|
+
}), 'prism.border.step.2', {
|
|
25
25
|
light: '#0469FF',
|
|
26
26
|
dark: '#0469FF80'
|
|
27
|
-
}),
|
|
27
|
+
}), 'prism.border.step.3', {
|
|
28
28
|
light: '#BF63F3',
|
|
29
29
|
dark: '#BF63F380'
|
|
30
|
-
}),
|
|
30
|
+
}), 'prism.border.step.4', {
|
|
31
31
|
light: '#FFA900',
|
|
32
32
|
dark: '#FFA90080'
|
|
33
|
-
})
|
|
33
|
+
});
|
|
34
34
|
var prismBorderAnimationStyles = css({
|
|
35
35
|
'&::before, &::after': _objectSpread(_objectSpread({
|
|
36
36
|
animation: "".concat(rotationAnimation, " linear 2s infinite")
|