@atlaskit/editor-core 197.1.3 → 197.1.4
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 +10 -0
- package/dist/cjs/create-editor/ErrorBoundary.js +2 -2
- package/dist/cjs/create-editor/ReactEditorView.js +2 -2
- package/dist/cjs/ui/ContentStyles/expand.js +3 -4
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/create-editor/ErrorBoundary.js +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +1 -1
- package/dist/es2019/ui/ContentStyles/expand.js +1 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/create-editor/ErrorBoundary.js +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +1 -1
- package/dist/esm/ui/ContentStyles/expand.js +1 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +3 -5
- package/dist/cjs/EditorWithActions/index.js +0 -77
- package/dist/es2019/EditorWithActions/index.js +0 -43
- package/dist/esm/EditorWithActions/index.js +0 -71
- package/dist/types/EditorWithActions/index.d.ts +0 -21
- package/dist/types-ts4.5/EditorWithActions/index.d.ts +0 -21
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 197.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`ed9e420d175b8`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ed9e420d175b8) -
|
|
8
|
+
New entry-point for intl-error-boundary component on editor-common. Further sharedExpandStyles is
|
|
9
|
+
now available on editor-common/styles entry-point. These are to remove `editor-common/ui`
|
|
10
|
+
entry-point from the critical path in editor-core.
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 197.1.3
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -18,9 +18,9 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
18
18
|
var _uuid = _interopRequireDefault(require("uuid"));
|
|
19
19
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
20
20
|
var _coreUtils = require("@atlaskit/editor-common/core-utils");
|
|
21
|
+
var _intlErrorBoundary = require("@atlaskit/editor-common/intl-error-boundary");
|
|
21
22
|
var _monitoring = require("@atlaskit/editor-common/monitoring");
|
|
22
23
|
var _ufo = require("@atlaskit/editor-common/ufo");
|
|
23
|
-
var _ui = require("@atlaskit/editor-common/ui");
|
|
24
24
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
25
25
|
var _WithEditorView = require("./WithEditorView");
|
|
26
26
|
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; }
|
|
@@ -195,7 +195,7 @@ var ErrorBoundaryWithEditorView = exports.ErrorBoundaryWithEditorView = /*#__PUR
|
|
|
195
195
|
}, {
|
|
196
196
|
key: "render",
|
|
197
197
|
value: function render() {
|
|
198
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
198
|
+
return /*#__PURE__*/_react.default.createElement(_intlErrorBoundary.IntlErrorBoundary, null, this.props.children);
|
|
199
199
|
}
|
|
200
200
|
}]);
|
|
201
201
|
return ErrorBoundaryWithEditorView;
|
|
@@ -22,7 +22,6 @@ var _normalizeFeatureFlags = require("@atlaskit/editor-common/normalize-feature-
|
|
|
22
22
|
var _performanceMeasures = require("@atlaskit/editor-common/performance-measures");
|
|
23
23
|
var _preset = require("@atlaskit/editor-common/preset");
|
|
24
24
|
var _ufo = require("@atlaskit/editor-common/ufo");
|
|
25
|
-
var _ui = require("@atlaskit/editor-common/ui");
|
|
26
25
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
27
26
|
var _state2 = require("@atlaskit/editor-prosemirror/state");
|
|
28
27
|
var _view = require("@atlaskit/editor-prosemirror/view");
|
|
@@ -46,6 +45,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
46
45
|
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) { (0, _defineProperty2.default)(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; }
|
|
47
46
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
48
47
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
48
|
+
var EDIT_AREA_ID = 'ak-editor-textarea';
|
|
49
49
|
function handleEditorFocus(view) {
|
|
50
50
|
if (view.hasFocus()) {
|
|
51
51
|
return;
|
|
@@ -539,7 +539,7 @@ var ReactEditorView = exports.ReactEditorView = /*#__PURE__*/function (_React$Co
|
|
|
539
539
|
,
|
|
540
540
|
"aria-multiline": _this.props.editorProps.appearance !== 'mobile' ? true : false,
|
|
541
541
|
role: "textbox",
|
|
542
|
-
id:
|
|
542
|
+
id: EDIT_AREA_ID
|
|
543
543
|
});
|
|
544
544
|
});
|
|
545
545
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "editor", _this.createEditor(_this.props.editorProps.assistiveLabel));
|
|
@@ -8,7 +8,6 @@ exports.expandStyles = void 0;
|
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
11
|
-
var _ui = require("@atlaskit/editor-common/ui");
|
|
12
11
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
13
12
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
13
|
var _colors = require("@atlaskit/theme/colors");
|
|
@@ -25,11 +24,11 @@ var DANGER_STATE_BORDER_COLOR = "var(--ds-border-danger, ".concat(_colors.R300,
|
|
|
25
24
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
26
25
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
27
26
|
var expandStyles = exports.expandStyles = function expandStyles() {
|
|
28
|
-
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t.", " > div {\n\t\tdisplay: flex;\n\t}\n\n\t.", " {\n\t\t", "\n\n\t\tcursor: pointer;\n\t\tbox-sizing: border-box;\n\n\t\ttd > & {\n\t\t\tmargin-top: 0;\n\t\t}\n\n\t\t.", " svg {\n\t\t\t", ";\n\t\t\ttransform: rotate(90deg);\n\t\t}\n\n\t\t&.", ":not(.danger) {\n\t\t\t", "\n\t\t}\n\n\t\t&.danger {\n\t\t\tbackground: ", ";\n\t\t\tborder-color: ", ";\n\t\t}\n\t}\n\n\t.ProseMirror\n\t\t> .", ",\n\t\t.", "\n\t\t> .", " {\n\t\tmargin-left: -", "px;\n\t\tmargin-right: -", "px;\n\t}\n\n\t.", " {\n\t\t", "\n\t\tcursor: text;\n\t\tpadding-top: 0px;\n\t\t", "\n\t}\n\n\t.", " {\n\t\t", "\n\t}\n\n\t.", " {\n\t\t", ";\n\t\talign-items: center;\n\t\toverflow: visible;\n\t}\n\n\t.", " {\n\t\tbackground: ", ";\n\t\tborder-color: ", ";\n\n\t\t.", " {\n\t\t\tpadding-top: ", ";\n\t\t}\n\t}\n\n\t.", " {\n\t\twidth: 100%;\n\t}\n\n\t/* stylelint-disable property-no-unknown, value-keyword-case */\n\t.", ":(.", ") {\n\t\t.expand-content-wrapper {\n\t\t\theight: auto;\n\t\t}\n\t}\n\t/* stylelint-enable property-no-unknown, value-keyword-case */\n\n\t.", ":not(.", ") {\n\t\t.ak-editor-expand__content {\n\t\t\tposition: absolute;\n\t\t\theight: 1px;\n\t\t\twidth: 1px;\n\t\t\toverflow: hidden;\n\t\t\tclip: rect(1px, 1px, 1px, 1px);\n\t\t\twhite-space: nowrap;\n\t\t}\n\n\t\t.", " svg {\n\t\t\t", ";\n\t\t\ttransform: rotate(0deg);\n\t\t}\n\n\t\t&:not(.", "):not(.danger) {\n\t\t\tbackground: transparent;\n\t\t\tborder-color: transparent;\n\n\t\t\t&:hover {\n\t\t\t\tborder-color: ", ";\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\t\t}\n\t}\n"])), _styles.expandClassNames.icon, _styles.expandClassNames.prefix,
|
|
27
|
+
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t.", " > div {\n\t\tdisplay: flex;\n\t}\n\n\t.", " {\n\t\t", "\n\n\t\tcursor: pointer;\n\t\tbox-sizing: border-box;\n\n\t\ttd > & {\n\t\t\tmargin-top: 0;\n\t\t}\n\n\t\t.", " svg {\n\t\t\t", ";\n\t\t\ttransform: rotate(90deg);\n\t\t}\n\n\t\t&.", ":not(.danger) {\n\t\t\t", "\n\t\t}\n\n\t\t&.danger {\n\t\t\tbackground: ", ";\n\t\t\tborder-color: ", ";\n\t\t}\n\t}\n\n\t.ProseMirror\n\t\t> .", ",\n\t\t.", "\n\t\t> .", " {\n\t\tmargin-left: -", "px;\n\t\tmargin-right: -", "px;\n\t}\n\n\t.", " {\n\t\t", "\n\t\tcursor: text;\n\t\tpadding-top: 0px;\n\t\t", "\n\t}\n\n\t.", " {\n\t\t", "\n\t}\n\n\t.", " {\n\t\t", ";\n\t\talign-items: center;\n\t\toverflow: visible;\n\t}\n\n\t.", " {\n\t\tbackground: ", ";\n\t\tborder-color: ", ";\n\n\t\t.", " {\n\t\t\tpadding-top: ", ";\n\t\t}\n\t}\n\n\t.", " {\n\t\twidth: 100%;\n\t}\n\n\t/* stylelint-disable property-no-unknown, value-keyword-case */\n\t.", ":(.", ") {\n\t\t.expand-content-wrapper {\n\t\t\theight: auto;\n\t\t}\n\t}\n\t/* stylelint-enable property-no-unknown, value-keyword-case */\n\n\t.", ":not(.", ") {\n\t\t.ak-editor-expand__content {\n\t\t\tposition: absolute;\n\t\t\theight: 1px;\n\t\t\twidth: 1px;\n\t\t\toverflow: hidden;\n\t\t\tclip: rect(1px, 1px, 1px, 1px);\n\t\t\twhite-space: nowrap;\n\t\t}\n\n\t\t.", " svg {\n\t\t\t", ";\n\t\t\ttransform: rotate(0deg);\n\t\t}\n\n\t\t&:not(.", "):not(.danger) {\n\t\t\tbackground: transparent;\n\t\t\tborder-color: transparent;\n\n\t\t\t&:hover {\n\t\t\t\tborder-color: ", ";\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\t\t}\n\t}\n"])), _styles.expandClassNames.icon, _styles.expandClassNames.prefix, _styles.sharedExpandStyles.containerStyles({
|
|
29
28
|
expanded: false,
|
|
30
29
|
focused: false
|
|
31
|
-
})(), _styles.expandClassNames.iconContainer, EXPAND_ICON_COLOR(), _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Blanket, _editorSharedStyles.SelectionStyle.Border]), DANGER_STATE_BACKGROUND_COLOR, DANGER_STATE_BORDER_COLOR, _styles.expandClassNames.type('expand'), _styles.BreakoutCssClassName.BREAKOUT_MARK_DOM, _styles.expandClassNames.type('expand'), _editorSharedStyles.akLayoutGutterOffset, _editorSharedStyles.akLayoutGutterOffset, _styles.expandClassNames.content,
|
|
30
|
+
})(), _styles.expandClassNames.iconContainer, EXPAND_ICON_COLOR(), _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Blanket, _editorSharedStyles.SelectionStyle.Border]), DANGER_STATE_BACKGROUND_COLOR, DANGER_STATE_BORDER_COLOR, _styles.expandClassNames.type('expand'), _styles.BreakoutCssClassName.BREAKOUT_MARK_DOM, _styles.expandClassNames.type('expand'), _editorSharedStyles.akLayoutGutterOffset, _editorSharedStyles.akLayoutGutterOffset, _styles.expandClassNames.content, _styles.sharedExpandStyles.contentStyles({
|
|
32
31
|
expanded: false,
|
|
33
32
|
focused: false
|
|
34
|
-
})(), (0, _platformFeatureFlags.fg)('platform_editor_drag_and_drop_expand_style_fix') && "overflow-x: clip;", _styles.expandClassNames.titleInput,
|
|
33
|
+
})(), (0, _platformFeatureFlags.fg)('platform_editor_drag_and_drop_expand_style_fix') && "overflow-x: clip;", _styles.expandClassNames.titleInput, _styles.sharedExpandStyles.titleInputStyles(), _styles.expandClassNames.titleContainer, _styles.sharedExpandStyles.titleContainerStyles(), _styles.expandClassNames.expanded, EXPAND_SELECTED_BACKGROUND, "var(--ds-border, ".concat(_colors.N40A, ")"), _styles.expandClassNames.content, "var(--ds-space-100, 8px)", _styles.expandClassNames.inputContainer, _styles.expandClassNames.prefix, _styles.expandClassNames.expanded, _styles.expandClassNames.prefix, _styles.expandClassNames.expanded, _styles.expandClassNames.iconContainer, EXPAND_ICON_COLOR(), _editorSharedStyles.akEditorSelectedNodeClassName, "var(--ds-border, ".concat(_colors.N50A, ")"), EXPAND_SELECTED_BACKGROUND);
|
|
35
34
|
};
|
|
@@ -3,9 +3,9 @@ import React from 'react';
|
|
|
3
3
|
import uuid from 'uuid';
|
|
4
4
|
import { ACTION, ACTION_SUBJECT, editorAnalyticsChannel, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
5
5
|
import { getDocStructure } from '@atlaskit/editor-common/core-utils';
|
|
6
|
+
import { IntlErrorBoundary } from '@atlaskit/editor-common/intl-error-boundary';
|
|
6
7
|
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
7
8
|
import { ExperienceStore } from '@atlaskit/editor-common/ufo';
|
|
8
|
-
import { IntlErrorBoundary } from '@atlaskit/editor-common/ui';
|
|
9
9
|
import { isOutdatedBrowser } from '@atlaskit/editor-common/utils';
|
|
10
10
|
import { WithEditorView } from './WithEditorView';
|
|
11
11
|
export class ErrorBoundaryWithEditorView extends React.Component {
|
|
@@ -8,7 +8,6 @@ import { getEnabledFeatureFlagKeys } from '@atlaskit/editor-common/normalize-fea
|
|
|
8
8
|
import { startMeasure, stopMeasure } from '@atlaskit/editor-common/performance-measures';
|
|
9
9
|
import { EditorPluginInjectionAPI } from '@atlaskit/editor-common/preset';
|
|
10
10
|
import { EditorExperience, ExperienceStore, RELIABILITY_INTERVAL } from '@atlaskit/editor-common/ufo';
|
|
11
|
-
import { EDIT_AREA_ID } from '@atlaskit/editor-common/ui';
|
|
12
11
|
import { analyticsEventKey, browser, countNodes, findChangedNodesFromTransaction, getAnalyticsEventSeverity, getResponseEndTime, measureRender, processRawValue, shouldForceTracking, validateNodes, validNode } from '@atlaskit/editor-common/utils';
|
|
13
12
|
import { EditorState, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
14
13
|
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -28,6 +27,7 @@ import { createSchema } from './create-schema';
|
|
|
28
27
|
import { createFeatureFlagsFromProps } from './feature-flags-from-props';
|
|
29
28
|
import { editorMessages } from './messages';
|
|
30
29
|
import ReactEditorViewContext from './ReactEditorViewContext';
|
|
30
|
+
const EDIT_AREA_ID = 'ak-editor-textarea';
|
|
31
31
|
function handleEditorFocus(view) {
|
|
32
32
|
if (view.hasFocus()) {
|
|
33
33
|
return;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
|
-
import { BreakoutCssClassName, expandClassNames } from '@atlaskit/editor-common/styles';
|
|
4
|
-
import { sharedExpandStyles } from '@atlaskit/editor-common/ui';
|
|
3
|
+
import { BreakoutCssClassName, expandClassNames, sharedExpandStyles } from '@atlaskit/editor-common/styles';
|
|
5
4
|
import { akEditorSelectedNodeClassName, akLayoutGutterOffset, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
6
5
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { N100A, N40A, N50A, R300, R50 } from '@atlaskit/theme/colors';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "197.1.
|
|
2
|
+
export const version = "197.1.4";
|
|
@@ -15,9 +15,9 @@ import React from 'react';
|
|
|
15
15
|
import uuid from 'uuid';
|
|
16
16
|
import { ACTION, ACTION_SUBJECT, editorAnalyticsChannel, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
17
17
|
import { getDocStructure } from '@atlaskit/editor-common/core-utils';
|
|
18
|
+
import { IntlErrorBoundary } from '@atlaskit/editor-common/intl-error-boundary';
|
|
18
19
|
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
19
20
|
import { ExperienceStore } from '@atlaskit/editor-common/ufo';
|
|
20
|
-
import { IntlErrorBoundary } from '@atlaskit/editor-common/ui';
|
|
21
21
|
import { isOutdatedBrowser } from '@atlaskit/editor-common/utils';
|
|
22
22
|
import { WithEditorView } from './WithEditorView';
|
|
23
23
|
export var ErrorBoundaryWithEditorView = /*#__PURE__*/function (_React$Component) {
|
|
@@ -19,7 +19,6 @@ import { getEnabledFeatureFlagKeys } from '@atlaskit/editor-common/normalize-fea
|
|
|
19
19
|
import { startMeasure, stopMeasure } from '@atlaskit/editor-common/performance-measures';
|
|
20
20
|
import { EditorPluginInjectionAPI } from '@atlaskit/editor-common/preset';
|
|
21
21
|
import { EditorExperience, ExperienceStore, RELIABILITY_INTERVAL } from '@atlaskit/editor-common/ufo';
|
|
22
|
-
import { EDIT_AREA_ID } from '@atlaskit/editor-common/ui';
|
|
23
22
|
import { analyticsEventKey, browser, countNodes as _countNodes, findChangedNodesFromTransaction, getAnalyticsEventSeverity, getResponseEndTime, measureRender, processRawValue, shouldForceTracking, validateNodes, validNode } from '@atlaskit/editor-common/utils';
|
|
24
23
|
import { EditorState, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
25
24
|
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -39,6 +38,7 @@ import { createSchema } from './create-schema';
|
|
|
39
38
|
import { createFeatureFlagsFromProps } from './feature-flags-from-props';
|
|
40
39
|
import { editorMessages } from './messages';
|
|
41
40
|
import ReactEditorViewContext from './ReactEditorViewContext';
|
|
41
|
+
var EDIT_AREA_ID = 'ak-editor-textarea';
|
|
42
42
|
function handleEditorFocus(view) {
|
|
43
43
|
if (view.hasFocus()) {
|
|
44
44
|
return;
|
|
@@ -2,8 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
var _templateObject;
|
|
3
3
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
4
|
import { css } from '@emotion/react';
|
|
5
|
-
import { BreakoutCssClassName, expandClassNames } from '@atlaskit/editor-common/styles';
|
|
6
|
-
import { sharedExpandStyles } from '@atlaskit/editor-common/ui';
|
|
5
|
+
import { BreakoutCssClassName, expandClassNames, sharedExpandStyles } from '@atlaskit/editor-common/styles';
|
|
7
6
|
import { akEditorSelectedNodeClassName, akLayoutGutterOffset, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
8
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
8
|
import { N100A, N40A, N50A, R300, R50 } from '@atlaskit/theme/colors';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "197.1.
|
|
2
|
+
export var version = "197.1.4";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "197.1.
|
|
3
|
+
"version": "197.1.4",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -25,8 +25,6 @@
|
|
|
25
25
|
"atlassian": {
|
|
26
26
|
"team": "Editor",
|
|
27
27
|
"singleton": true,
|
|
28
|
-
"inPublicMirror": true,
|
|
29
|
-
"releaseModel": "continuous",
|
|
30
28
|
"website": {
|
|
31
29
|
"name": "Editor Core"
|
|
32
30
|
},
|
|
@@ -45,7 +43,7 @@
|
|
|
45
43
|
"@atlaskit/analytics-next": "^10.1.0",
|
|
46
44
|
"@atlaskit/analytics-next-stable-react-context": "1.0.1",
|
|
47
45
|
"@atlaskit/button": "^20.1.0",
|
|
48
|
-
"@atlaskit/editor-common": "^88.
|
|
46
|
+
"@atlaskit/editor-common": "^88.6.0",
|
|
49
47
|
"@atlaskit/editor-plugins": "^4.3.0",
|
|
50
48
|
"@atlaskit/editor-prosemirror": "5.0.1",
|
|
51
49
|
"@atlaskit/editor-shared-styles": "^2.13.0",
|
|
@@ -99,7 +97,7 @@
|
|
|
99
97
|
"@atlaskit/media-integration-test-helpers": "^3.1.0",
|
|
100
98
|
"@atlaskit/media-test-helpers": "^34.1.0",
|
|
101
99
|
"@atlaskit/modal-dialog": "^12.15.0",
|
|
102
|
-
"@atlaskit/primitives": "^12.
|
|
100
|
+
"@atlaskit/primitives": "^12.1.0",
|
|
103
101
|
"@atlaskit/renderer": "^109.51.0",
|
|
104
102
|
"@atlaskit/smart-card": "^27.19.0",
|
|
105
103
|
"@atlaskit/synchrony-test-helpers": "^2.5.0",
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
12
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
14
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
15
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
|
-
var _react = _interopRequireDefault(require("react"));
|
|
17
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
18
|
-
var _editor = _interopRequireDefault(require("../editor"));
|
|
19
|
-
var _EditorContext = _interopRequireDefault(require("../ui/EditorContext"));
|
|
20
|
-
var _WithEditorActions = _interopRequireDefault(require("../ui/WithEditorActions"));
|
|
21
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
22
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
23
|
-
var EditorWithActions = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
24
|
-
(0, _inherits2.default)(EditorWithActions, _React$Component);
|
|
25
|
-
var _super = _createSuper(EditorWithActions);
|
|
26
|
-
function EditorWithActions() {
|
|
27
|
-
var _this;
|
|
28
|
-
(0, _classCallCheck2.default)(this, EditorWithActions);
|
|
29
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
30
|
-
args[_key] = arguments[_key];
|
|
31
|
-
}
|
|
32
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
33
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleSave", function (actions) {
|
|
34
|
-
return function () {
|
|
35
|
-
_this.props.onSave(actions);
|
|
36
|
-
};
|
|
37
|
-
});
|
|
38
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleCancel", function (actions) {
|
|
39
|
-
return function () {
|
|
40
|
-
_this.props.onCancel(actions);
|
|
41
|
-
};
|
|
42
|
-
});
|
|
43
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleChange", function (actions) {
|
|
44
|
-
return function () {
|
|
45
|
-
_this.props.onChange(actions);
|
|
46
|
-
};
|
|
47
|
-
});
|
|
48
|
-
return _this;
|
|
49
|
-
}
|
|
50
|
-
(0, _createClass2.default)(EditorWithActions, [{
|
|
51
|
-
key: "render",
|
|
52
|
-
value: function render() {
|
|
53
|
-
var _this2 = this;
|
|
54
|
-
if (this.context.editorActions) {
|
|
55
|
-
var _actions = this.context.editorActions;
|
|
56
|
-
return /*#__PURE__*/_react.default.createElement(_editor.default, (0, _extends2.default)({}, this.props, {
|
|
57
|
-
onSave: this.props.onSave ? this.handleSave(_actions) : undefined,
|
|
58
|
-
onChange: this.props.onChange ? this.handleChange(_actions) : undefined,
|
|
59
|
-
onCancel: this.props.onCancel ? this.handleCancel(_actions) : undefined
|
|
60
|
-
}));
|
|
61
|
-
}
|
|
62
|
-
return /*#__PURE__*/_react.default.createElement(_EditorContext.default, null, /*#__PURE__*/_react.default.createElement(_WithEditorActions.default, {
|
|
63
|
-
render: function render(actions) {
|
|
64
|
-
return /*#__PURE__*/_react.default.createElement(_editor.default, (0, _extends2.default)({}, _this2.props, {
|
|
65
|
-
onSave: _this2.props.onSave ? _this2.handleSave(actions) : undefined,
|
|
66
|
-
onChange: _this2.props.onChange ? _this2.handleChange(actions) : undefined,
|
|
67
|
-
onCancel: _this2.props.onCancel ? _this2.handleCancel(actions) : undefined
|
|
68
|
-
}));
|
|
69
|
-
}
|
|
70
|
-
}));
|
|
71
|
-
}
|
|
72
|
-
}]);
|
|
73
|
-
return EditorWithActions;
|
|
74
|
-
}(_react.default.Component);
|
|
75
|
-
(0, _defineProperty2.default)(EditorWithActions, "contextTypes", {
|
|
76
|
-
editorActions: _propTypes.default.object.isRequired
|
|
77
|
-
});
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
|
-
import Editor from '../editor';
|
|
6
|
-
import EditorContext from '../ui/EditorContext';
|
|
7
|
-
import WithEditorActions from '../ui/WithEditorActions';
|
|
8
|
-
export default class EditorWithActions extends React.Component {
|
|
9
|
-
constructor(...args) {
|
|
10
|
-
super(...args);
|
|
11
|
-
_defineProperty(this, "handleSave", actions => () => {
|
|
12
|
-
this.props.onSave(actions);
|
|
13
|
-
});
|
|
14
|
-
_defineProperty(this, "handleCancel", actions => () => {
|
|
15
|
-
this.props.onCancel(actions);
|
|
16
|
-
});
|
|
17
|
-
_defineProperty(this, "handleChange", actions => () => {
|
|
18
|
-
this.props.onChange(actions);
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
render() {
|
|
22
|
-
if (this.context.editorActions) {
|
|
23
|
-
const {
|
|
24
|
-
editorActions: actions
|
|
25
|
-
} = this.context;
|
|
26
|
-
return /*#__PURE__*/React.createElement(Editor, _extends({}, this.props, {
|
|
27
|
-
onSave: this.props.onSave ? this.handleSave(actions) : undefined,
|
|
28
|
-
onChange: this.props.onChange ? this.handleChange(actions) : undefined,
|
|
29
|
-
onCancel: this.props.onCancel ? this.handleCancel(actions) : undefined
|
|
30
|
-
}));
|
|
31
|
-
}
|
|
32
|
-
return /*#__PURE__*/React.createElement(EditorContext, null, /*#__PURE__*/React.createElement(WithEditorActions, {
|
|
33
|
-
render: actions => /*#__PURE__*/React.createElement(Editor, _extends({}, this.props, {
|
|
34
|
-
onSave: this.props.onSave ? this.handleSave(actions) : undefined,
|
|
35
|
-
onChange: this.props.onChange ? this.handleChange(actions) : undefined,
|
|
36
|
-
onCancel: this.props.onCancel ? this.handleCancel(actions) : undefined
|
|
37
|
-
}))
|
|
38
|
-
}));
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
_defineProperty(EditorWithActions, "contextTypes", {
|
|
42
|
-
editorActions: PropTypes.object.isRequired
|
|
43
|
-
});
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
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
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
|
-
import React from 'react';
|
|
12
|
-
import PropTypes from 'prop-types';
|
|
13
|
-
import Editor from '../editor';
|
|
14
|
-
import EditorContext from '../ui/EditorContext';
|
|
15
|
-
import WithEditorActions from '../ui/WithEditorActions';
|
|
16
|
-
var EditorWithActions = /*#__PURE__*/function (_React$Component) {
|
|
17
|
-
_inherits(EditorWithActions, _React$Component);
|
|
18
|
-
var _super = _createSuper(EditorWithActions);
|
|
19
|
-
function EditorWithActions() {
|
|
20
|
-
var _this;
|
|
21
|
-
_classCallCheck(this, EditorWithActions);
|
|
22
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23
|
-
args[_key] = arguments[_key];
|
|
24
|
-
}
|
|
25
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
26
|
-
_defineProperty(_assertThisInitialized(_this), "handleSave", function (actions) {
|
|
27
|
-
return function () {
|
|
28
|
-
_this.props.onSave(actions);
|
|
29
|
-
};
|
|
30
|
-
});
|
|
31
|
-
_defineProperty(_assertThisInitialized(_this), "handleCancel", function (actions) {
|
|
32
|
-
return function () {
|
|
33
|
-
_this.props.onCancel(actions);
|
|
34
|
-
};
|
|
35
|
-
});
|
|
36
|
-
_defineProperty(_assertThisInitialized(_this), "handleChange", function (actions) {
|
|
37
|
-
return function () {
|
|
38
|
-
_this.props.onChange(actions);
|
|
39
|
-
};
|
|
40
|
-
});
|
|
41
|
-
return _this;
|
|
42
|
-
}
|
|
43
|
-
_createClass(EditorWithActions, [{
|
|
44
|
-
key: "render",
|
|
45
|
-
value: function render() {
|
|
46
|
-
var _this2 = this;
|
|
47
|
-
if (this.context.editorActions) {
|
|
48
|
-
var _actions = this.context.editorActions;
|
|
49
|
-
return /*#__PURE__*/React.createElement(Editor, _extends({}, this.props, {
|
|
50
|
-
onSave: this.props.onSave ? this.handleSave(_actions) : undefined,
|
|
51
|
-
onChange: this.props.onChange ? this.handleChange(_actions) : undefined,
|
|
52
|
-
onCancel: this.props.onCancel ? this.handleCancel(_actions) : undefined
|
|
53
|
-
}));
|
|
54
|
-
}
|
|
55
|
-
return /*#__PURE__*/React.createElement(EditorContext, null, /*#__PURE__*/React.createElement(WithEditorActions, {
|
|
56
|
-
render: function render(actions) {
|
|
57
|
-
return /*#__PURE__*/React.createElement(Editor, _extends({}, _this2.props, {
|
|
58
|
-
onSave: _this2.props.onSave ? _this2.handleSave(actions) : undefined,
|
|
59
|
-
onChange: _this2.props.onChange ? _this2.handleChange(actions) : undefined,
|
|
60
|
-
onCancel: _this2.props.onCancel ? _this2.handleCancel(actions) : undefined
|
|
61
|
-
}));
|
|
62
|
-
}
|
|
63
|
-
}));
|
|
64
|
-
}
|
|
65
|
-
}]);
|
|
66
|
-
return EditorWithActions;
|
|
67
|
-
}(React.Component);
|
|
68
|
-
_defineProperty(EditorWithActions, "contextTypes", {
|
|
69
|
-
editorActions: PropTypes.object.isRequired
|
|
70
|
-
});
|
|
71
|
-
export { EditorWithActions as default };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import type EditorActions from '../actions';
|
|
4
|
-
import type { EditorProps } from '../editor';
|
|
5
|
-
export interface EditorWithActionsProps extends Omit<EditorProps, 'onSave' | 'onChange' | 'onCancel'> {
|
|
6
|
-
onSave?: (actions: EditorActions) => void;
|
|
7
|
-
onChange?: (actions: EditorActions) => void;
|
|
8
|
-
onCancel?: (actions: EditorActions) => void;
|
|
9
|
-
}
|
|
10
|
-
export default class EditorWithActions extends React.Component<EditorWithActionsProps, {}> {
|
|
11
|
-
static contextTypes: {
|
|
12
|
-
editorActions: PropTypes.Validator<object>;
|
|
13
|
-
};
|
|
14
|
-
context: {
|
|
15
|
-
editorActions?: EditorActions;
|
|
16
|
-
};
|
|
17
|
-
handleSave: (actions: EditorActions) => () => void;
|
|
18
|
-
handleCancel: (actions: EditorActions) => () => void;
|
|
19
|
-
handleChange: (actions: EditorActions) => () => void;
|
|
20
|
-
render(): JSX.Element;
|
|
21
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import type EditorActions from '../actions';
|
|
4
|
-
import type { EditorProps } from '../editor';
|
|
5
|
-
export interface EditorWithActionsProps extends Omit<EditorProps, 'onSave' | 'onChange' | 'onCancel'> {
|
|
6
|
-
onSave?: (actions: EditorActions) => void;
|
|
7
|
-
onChange?: (actions: EditorActions) => void;
|
|
8
|
-
onCancel?: (actions: EditorActions) => void;
|
|
9
|
-
}
|
|
10
|
-
export default class EditorWithActions extends React.Component<EditorWithActionsProps, {}> {
|
|
11
|
-
static contextTypes: {
|
|
12
|
-
editorActions: PropTypes.Validator<object>;
|
|
13
|
-
};
|
|
14
|
-
context: {
|
|
15
|
-
editorActions?: EditorActions;
|
|
16
|
-
};
|
|
17
|
-
handleSave: (actions: EditorActions) => () => void;
|
|
18
|
-
handleCancel: (actions: EditorActions) => () => void;
|
|
19
|
-
handleChange: (actions: EditorActions) => () => void;
|
|
20
|
-
render(): JSX.Element;
|
|
21
|
-
}
|