@atlaskit/editor-core 183.1.1 → 184.0.0
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 +29 -0
- package/dist/cjs/i18n/da.js +1 -1
- package/dist/cjs/i18n/en_ZZ.js +8 -34
- package/dist/cjs/i18n/it.js +1 -1
- package/dist/cjs/i18n/nb.js +3 -3
- package/dist/cjs/i18n/nl.js +4 -4
- package/dist/cjs/i18n/pl.js +1 -1
- package/dist/cjs/i18n/pt_BR.js +1 -1
- package/dist/cjs/i18n/ru.js +1 -1
- package/dist/cjs/i18n/th.js +2 -2
- package/dist/cjs/i18n/uk.js +1 -1
- package/dist/cjs/i18n/vi.js +2 -2
- package/dist/cjs/i18n/zh.js +1 -1
- package/dist/cjs/labs/next/full-page.js +2 -6
- package/dist/cjs/labs/next/presets/create-stub-internal-apis.js +4 -2
- package/dist/cjs/labs/next/presets/default.js +2 -2
- package/dist/cjs/labs/next/presets/universal.js +2 -1
- package/dist/cjs/plugins/breakout/index.js +54 -35
- package/dist/cjs/plugins/card/toolbar.js +4 -3
- package/dist/cjs/plugins/collab-edit/plugin-state.js +2 -3
- package/dist/cjs/plugins/copy-button/commands.js +8 -1
- package/dist/cjs/plugins/extension/index.js +1 -1
- package/dist/cjs/plugins/extension/nodeviews/extension.js +5 -3
- package/dist/cjs/plugins/extension/pm-plugins/main.js +6 -6
- package/dist/cjs/plugins/extension/ui/Extension/Extension/index.js +34 -4
- package/dist/cjs/plugins/extension/ui/Extension/ExtensionComponent.js +4 -2
- package/dist/cjs/plugins/extension/ui/Extension/index.js +4 -2
- package/dist/cjs/plugins/help-dialog/index.js +12 -8
- package/dist/cjs/plugins/index.js +0 -14
- package/dist/cjs/plugins/layout/pm-plugins/main.js +0 -1
- package/dist/cjs/plugins/media/index.js +15 -5
- package/dist/cjs/plugins/media/nodeviews/mediaNodeView/index.js +22 -14
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +53 -34
- package/dist/cjs/plugins/media/styles.js +1 -1
- package/dist/cjs/plugins/media/toolbar/index.js +4 -3
- package/dist/cjs/plugins/media/ui/ImageBorder/styles.js +4 -1
- package/dist/cjs/plugins/paste/pm-plugins/main.js +7 -1
- package/dist/cjs/test-utils.js +6 -1
- package/dist/cjs/ui/Appearance/Comment/Comment.js +2 -2
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +2 -2
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +1 -2
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +2 -2
- package/dist/cjs/ui/ContentStyles/index.js +9 -10
- package/dist/cjs/ui/ContextPanel/index.js +67 -56
- package/dist/cjs/ui/MediaAndEmbedsToolbar/index.js +10 -11
- package/dist/cjs/ui/Resizer/index.js +8 -8
- package/dist/cjs/ui/WidthEmitter/index.js +10 -4
- package/dist/cjs/utils/clipboard.js +18 -11
- package/dist/cjs/utils/performance/instrumented-plugin.js +14 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/i18n/da.js +1 -1
- package/dist/es2019/i18n/en_ZZ.js +8 -34
- package/dist/es2019/i18n/it.js +1 -1
- package/dist/es2019/i18n/nb.js +3 -3
- package/dist/es2019/i18n/nl.js +4 -4
- package/dist/es2019/i18n/pl.js +1 -1
- package/dist/es2019/i18n/pt_BR.js +1 -1
- package/dist/es2019/i18n/ru.js +1 -1
- package/dist/es2019/i18n/th.js +2 -2
- package/dist/es2019/i18n/uk.js +1 -1
- package/dist/es2019/i18n/vi.js +2 -2
- package/dist/es2019/i18n/zh.js +1 -1
- package/dist/es2019/labs/next/full-page.js +2 -5
- package/dist/es2019/labs/next/presets/create-stub-internal-apis.js +4 -2
- package/dist/es2019/labs/next/presets/default.js +1 -1
- package/dist/es2019/labs/next/presets/universal.js +2 -1
- package/dist/es2019/plugins/breakout/index.js +48 -31
- package/dist/es2019/plugins/card/toolbar.js +4 -3
- package/dist/es2019/plugins/collab-edit/plugin-state.js +2 -4
- package/dist/es2019/plugins/copy-button/commands.js +9 -2
- package/dist/es2019/plugins/extension/index.js +1 -1
- package/dist/es2019/plugins/extension/nodeviews/extension.js +5 -3
- package/dist/es2019/plugins/extension/pm-plugins/main.js +4 -4
- package/dist/es2019/plugins/extension/ui/Extension/Extension/index.js +38 -2
- package/dist/es2019/plugins/extension/ui/Extension/ExtensionComponent.js +4 -2
- package/dist/es2019/plugins/extension/ui/Extension/index.js +4 -2
- package/dist/es2019/plugins/help-dialog/index.js +14 -9
- package/dist/es2019/plugins/index.js +0 -2
- package/dist/es2019/plugins/layout/pm-plugins/main.js +0 -1
- package/dist/es2019/plugins/media/index.js +15 -5
- package/dist/es2019/plugins/media/nodeviews/mediaNodeView/index.js +21 -10
- package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +53 -33
- package/dist/es2019/plugins/media/styles.js +1 -7
- package/dist/es2019/plugins/media/toolbar/index.js +4 -4
- package/dist/es2019/plugins/media/ui/ImageBorder/styles.js +9 -9
- package/dist/es2019/plugins/paste/pm-plugins/main.js +7 -1
- package/dist/es2019/test-utils.js +6 -1
- package/dist/es2019/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +1 -1
- package/dist/es2019/ui/ContentStyles/index.js +1 -2
- package/dist/es2019/ui/ContextPanel/index.js +66 -43
- package/dist/es2019/ui/MediaAndEmbedsToolbar/index.js +8 -9
- package/dist/es2019/ui/Resizer/index.js +1 -1
- package/dist/es2019/ui/WidthEmitter/index.js +10 -4
- package/dist/es2019/utils/clipboard.js +12 -7
- package/dist/es2019/utils/performance/instrumented-plugin.js +15 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/i18n/da.js +1 -1
- package/dist/esm/i18n/en_ZZ.js +8 -34
- package/dist/esm/i18n/it.js +1 -1
- package/dist/esm/i18n/nb.js +3 -3
- package/dist/esm/i18n/nl.js +4 -4
- package/dist/esm/i18n/pl.js +1 -1
- package/dist/esm/i18n/pt_BR.js +1 -1
- package/dist/esm/i18n/ru.js +1 -1
- package/dist/esm/i18n/th.js +2 -2
- package/dist/esm/i18n/uk.js +1 -1
- package/dist/esm/i18n/vi.js +2 -2
- package/dist/esm/i18n/zh.js +1 -1
- package/dist/esm/labs/next/full-page.js +2 -5
- package/dist/esm/labs/next/presets/create-stub-internal-apis.js +4 -2
- package/dist/esm/labs/next/presets/default.js +1 -1
- package/dist/esm/labs/next/presets/universal.js +2 -1
- package/dist/esm/plugins/breakout/index.js +54 -35
- package/dist/esm/plugins/card/toolbar.js +4 -3
- package/dist/esm/plugins/collab-edit/plugin-state.js +2 -3
- package/dist/esm/plugins/copy-button/commands.js +9 -2
- package/dist/esm/plugins/extension/index.js +1 -1
- package/dist/esm/plugins/extension/nodeviews/extension.js +5 -3
- package/dist/esm/plugins/extension/pm-plugins/main.js +6 -6
- package/dist/esm/plugins/extension/ui/Extension/Extension/index.js +33 -2
- package/dist/esm/plugins/extension/ui/Extension/ExtensionComponent.js +4 -2
- package/dist/esm/plugins/extension/ui/Extension/index.js +4 -2
- package/dist/esm/plugins/help-dialog/index.js +12 -8
- package/dist/esm/plugins/index.js +0 -2
- package/dist/esm/plugins/layout/pm-plugins/main.js +0 -1
- package/dist/esm/plugins/media/index.js +15 -5
- package/dist/esm/plugins/media/nodeviews/mediaNodeView/index.js +22 -14
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +54 -35
- package/dist/esm/plugins/media/styles.js +2 -2
- package/dist/esm/plugins/media/toolbar/index.js +4 -3
- package/dist/esm/plugins/media/ui/ImageBorder/styles.js +4 -1
- package/dist/esm/plugins/paste/pm-plugins/main.js +7 -1
- package/dist/esm/test-utils.js +6 -1
- package/dist/esm/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +1 -1
- package/dist/esm/ui/ContentStyles/index.js +1 -2
- package/dist/esm/ui/ContextPanel/index.js +64 -53
- package/dist/esm/ui/MediaAndEmbedsToolbar/index.js +10 -11
- package/dist/esm/ui/Resizer/index.js +1 -1
- package/dist/esm/ui/WidthEmitter/index.js +10 -4
- package/dist/esm/utils/clipboard.js +16 -10
- package/dist/esm/utils/performance/instrumented-plugin.js +14 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/actions/index.d.ts +1 -1
- package/dist/types/create-editor/get-plugins.d.ts +2 -0
- package/dist/types/i18n/en_ZZ.d.ts +2 -28
- package/dist/types/index.d.ts +0 -1
- package/dist/types/plugins/breakout/index.d.ts +4 -0
- package/dist/types/plugins/breakout/ui/LayoutButton.d.ts +1 -1
- package/dist/types/plugins/card/index.d.ts +2 -2
- package/dist/types/plugins/collab-edit/actions.d.ts +3 -2
- package/dist/types/plugins/collab-edit/events/handlers.d.ts +3 -3
- package/dist/types/plugins/collab-edit/events/initialize.d.ts +1 -1
- package/dist/types/plugins/collab-edit/events/send-transaction.d.ts +1 -1
- package/dist/types/plugins/collab-edit/index.d.ts +0 -1
- package/dist/types/plugins/collab-edit/native-collab-provider-plugin.d.ts +2 -2
- package/dist/types/plugins/collab-edit/participants.d.ts +1 -1
- package/dist/types/plugins/collab-edit/plugin.d.ts +0 -2
- package/dist/types/plugins/collab-edit/types.d.ts +1 -3
- package/dist/types/plugins/collab-edit/ui/to-avatar.d.ts +1 -1
- package/dist/types/plugins/collab-edit/utils.d.ts +2 -1
- package/dist/types/plugins/extension/index.d.ts +2 -1
- package/dist/types/plugins/extension/nodeviews/extension.d.ts +4 -1
- package/dist/types/plugins/extension/pm-plugins/main.d.ts +3 -1
- package/dist/types/plugins/extension/ui/Extension/Extension/index.d.ts +6 -0
- package/dist/types/plugins/extension/ui/Extension/ExtensionComponent.d.ts +3 -0
- package/dist/types/plugins/extension/ui/Extension/index.d.ts +3 -0
- package/dist/types/plugins/help-dialog/index.d.ts +3 -1
- package/dist/types/plugins/index.d.ts +0 -3
- package/dist/types/plugins/media/index.d.ts +12 -2
- package/dist/types/plugins/media/nodeviews/mediaNodeView/index.d.ts +4 -2
- package/dist/types/plugins/media/nodeviews/mediaSingle.d.ts +1 -1
- package/dist/types/plugins/media/nodeviews/types.d.ts +2 -1
- package/dist/types/plugins/media/toolbar/index.d.ts +3 -1
- package/dist/types/plugins/media/ui/ResizableMediaSingle/types.d.ts +2 -2
- package/dist/types/test-utils.d.ts +3 -1
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
- package/dist/types/ui/ColorPickerButton/index.d.ts +1 -1
- package/dist/types/ui/ContextPanel/index.d.ts +3 -4
- package/dist/types/ui/MediaAndEmbedsToolbar/index.d.ts +3 -1
- package/dist/types/ui/PluginSlot/index.d.ts +1 -1
- package/dist/types/ui/Resizer/types.d.ts +2 -2
- package/dist/types/utils/clipboard.d.ts +1 -0
- package/dist/types-ts4.5/actions/index.d.ts +1 -1
- package/dist/types-ts4.5/create-editor/get-plugins.d.ts +2 -0
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +2 -28
- package/dist/types-ts4.5/index.d.ts +0 -1
- package/dist/types-ts4.5/plugins/breakout/index.d.ts +6 -0
- package/dist/types-ts4.5/plugins/breakout/ui/LayoutButton.d.ts +1 -1
- package/dist/types-ts4.5/plugins/card/index.d.ts +2 -2
- package/dist/types-ts4.5/plugins/collab-edit/actions.d.ts +3 -2
- package/dist/types-ts4.5/plugins/collab-edit/events/handlers.d.ts +3 -3
- package/dist/types-ts4.5/plugins/collab-edit/events/initialize.d.ts +1 -1
- package/dist/types-ts4.5/plugins/collab-edit/events/send-transaction.d.ts +1 -1
- package/dist/types-ts4.5/plugins/collab-edit/index.d.ts +0 -1
- package/dist/types-ts4.5/plugins/collab-edit/native-collab-provider-plugin.d.ts +2 -2
- package/dist/types-ts4.5/plugins/collab-edit/participants.d.ts +1 -1
- package/dist/types-ts4.5/plugins/collab-edit/plugin.d.ts +0 -2
- package/dist/types-ts4.5/plugins/collab-edit/types.d.ts +1 -3
- package/dist/types-ts4.5/plugins/collab-edit/ui/to-avatar.d.ts +1 -1
- package/dist/types-ts4.5/plugins/collab-edit/utils.d.ts +2 -1
- package/dist/types-ts4.5/plugins/extension/index.d.ts +3 -1
- package/dist/types-ts4.5/plugins/extension/nodeviews/extension.d.ts +4 -1
- package/dist/types-ts4.5/plugins/extension/pm-plugins/main.d.ts +3 -1
- package/dist/types-ts4.5/plugins/extension/ui/Extension/Extension/index.d.ts +6 -0
- package/dist/types-ts4.5/plugins/extension/ui/Extension/ExtensionComponent.d.ts +3 -0
- package/dist/types-ts4.5/plugins/extension/ui/Extension/index.d.ts +3 -0
- package/dist/types-ts4.5/plugins/help-dialog/index.d.ts +5 -1
- package/dist/types-ts4.5/plugins/index.d.ts +0 -3
- package/dist/types-ts4.5/plugins/media/index.d.ts +9 -2
- package/dist/types-ts4.5/plugins/media/nodeviews/mediaNodeView/index.d.ts +4 -2
- package/dist/types-ts4.5/plugins/media/nodeviews/mediaSingle.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/nodeviews/types.d.ts +2 -1
- package/dist/types-ts4.5/plugins/media/toolbar/index.d.ts +3 -1
- package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/types.d.ts +2 -2
- package/dist/types-ts4.5/test-utils.d.ts +3 -1
- package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
- package/dist/types-ts4.5/ui/ColorPickerButton/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/ContextPanel/index.d.ts +3 -4
- package/dist/types-ts4.5/ui/MediaAndEmbedsToolbar/index.d.ts +3 -1
- package/dist/types-ts4.5/ui/PluginSlot/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/Resizer/types.d.ts +2 -2
- package/dist/types-ts4.5/utils/clipboard.d.ts +1 -0
- package/package.json +20 -18
- package/report.api.md +15 -63
- package/dist/cjs/plugins/collab-edit/provider/index.js +0 -5
- package/dist/cjs/plugins/collab-edit/provider/types.js +0 -5
- package/dist/cjs/plugins/grid/index.js +0 -207
- package/dist/cjs/plugins/grid/styles.js +0 -16
- package/dist/cjs/plugins/grid/types.js +0 -5
- package/dist/cjs/plugins/width/index.js +0 -88
- package/dist/cjs/ui/ContextPanel/context.js +0 -89
- package/dist/es2019/plugins/collab-edit/provider/index.js +0 -1
- package/dist/es2019/plugins/collab-edit/provider/types.js +0 -1
- package/dist/es2019/plugins/grid/index.js +0 -168
- package/dist/es2019/plugins/grid/styles.js +0 -36
- package/dist/es2019/plugins/grid/types.js +0 -1
- package/dist/es2019/plugins/width/index.js +0 -72
- package/dist/es2019/ui/ContextPanel/context.js +0 -65
- package/dist/esm/plugins/collab-edit/provider/index.js +0 -1
- package/dist/esm/plugins/collab-edit/provider/types.js +0 -1
- package/dist/esm/plugins/grid/index.js +0 -191
- package/dist/esm/plugins/grid/styles.js +0 -7
- package/dist/esm/plugins/grid/types.js +0 -1
- package/dist/esm/plugins/width/index.js +0 -78
- package/dist/esm/ui/ContextPanel/context.js +0 -79
- package/dist/types/plugins/collab-edit/provider/index.d.ts +0 -1
- package/dist/types/plugins/collab-edit/provider/types.d.ts +0 -1
- package/dist/types/plugins/grid/index.d.ts +0 -25
- package/dist/types/plugins/grid/styles.d.ts +0 -2
- package/dist/types/plugins/grid/types.d.ts +0 -7
- package/dist/types/plugins/width/index.d.ts +0 -18
- package/dist/types/ui/ContextPanel/context.d.ts +0 -24
- package/dist/types-ts4.5/plugins/collab-edit/provider/index.d.ts +0 -1
- package/dist/types-ts4.5/plugins/collab-edit/provider/types.d.ts +0 -1
- package/dist/types-ts4.5/plugins/grid/index.d.ts +0 -27
- package/dist/types-ts4.5/plugins/grid/styles.d.ts +0 -2
- package/dist/types-ts4.5/plugins/grid/types.d.ts +0 -7
- package/dist/types-ts4.5/plugins/width/index.d.ts +0 -18
- package/dist/types-ts4.5/ui/ContextPanel/context.d.ts +0 -24
|
@@ -4,8 +4,11 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
7
|
+
exports.content = exports.SwappableContentArea = void 0;
|
|
8
|
+
exports.default = ContextPanel;
|
|
9
|
+
exports.shouldPanelBePositionedOverEditor = exports.panel = void 0;
|
|
8
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
9
12
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
13
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
14
|
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
@@ -19,12 +22,12 @@ var _react2 = require("@emotion/react");
|
|
|
19
22
|
var _Transition = _interopRequireDefault(require("react-transition-group/Transition"));
|
|
20
23
|
var _colors = require("@atlaskit/theme/colors");
|
|
21
24
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
22
|
-
var
|
|
25
|
+
var _ui = require("@atlaskit/editor-common/ui");
|
|
23
26
|
var _WithPluginState = _interopRequireDefault(require("../WithPluginState"));
|
|
24
27
|
var _contextPanel = require("../../plugins/context-panel");
|
|
25
|
-
var _width = require("../../plugins/width");
|
|
26
28
|
var _WithEditorActions = _interopRequireDefault(require("../WithEditorActions"));
|
|
27
29
|
var _document = require("../../utils/document");
|
|
30
|
+
var _excluded = ["actions"];
|
|
28
31
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
29
32
|
/** @jsx jsx */
|
|
30
33
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -67,6 +70,13 @@ var SwappableContentArea = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
67
70
|
mounted: false,
|
|
68
71
|
currentPluginContent: undefined
|
|
69
72
|
});
|
|
73
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "focusEditor", function () {
|
|
74
|
+
var editorView = _this.props.editorView;
|
|
75
|
+
if (editorView && !editorView.hasFocus()) {
|
|
76
|
+
var _editorView$focus;
|
|
77
|
+
(_editorView$focus = editorView.focus) === null || _editorView$focus === void 0 ? void 0 : _editorView$focus.call(editorView);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
70
80
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "showPluginContent", function () {
|
|
71
81
|
var pluginContent = _this.props.pluginContent;
|
|
72
82
|
var currentPluginContent = _this.state.currentPluginContent;
|
|
@@ -92,7 +102,8 @@ var SwappableContentArea = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
92
102
|
timeout: _this.state.mounted ? ANIM_SPEED_MS : 0,
|
|
93
103
|
in: isVisible,
|
|
94
104
|
mountOnEnter: true,
|
|
95
|
-
unmountOnExit: true
|
|
105
|
+
unmountOnExit: true,
|
|
106
|
+
onExiting: _this.focusEditor
|
|
96
107
|
}, children);
|
|
97
108
|
});
|
|
98
109
|
return _this;
|
|
@@ -120,12 +131,13 @@ var SwappableContentArea = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
120
131
|
var width = _editorSharedStyles.akEditorContextPanelWidth;
|
|
121
132
|
var userVisible = !!this.props.visible;
|
|
122
133
|
var visible = userVisible || !!this.state.currentPluginContent;
|
|
123
|
-
return (0, _react2.jsx)(
|
|
134
|
+
return (0, _react2.jsx)(_ui.ContextPanelConsumer, null, function (_ref) {
|
|
124
135
|
var broadcastWidth = _ref.broadcastWidth,
|
|
125
136
|
broadcastPosition = _ref.broadcastPosition,
|
|
126
137
|
positionedOverEditor = _ref.positionedOverEditor;
|
|
138
|
+
var contextPanelWidth = visible ? width : 0;
|
|
127
139
|
var newPosition = editorWidth ? shouldPanelBePositionedOverEditor(editorWidth, width) : false;
|
|
128
|
-
broadcastWidth(
|
|
140
|
+
broadcastWidth(contextPanelWidth);
|
|
129
141
|
(newPosition && visible) !== positionedOverEditor && broadcastPosition(newPosition && visible);
|
|
130
142
|
return (0, _react2.jsx)("div", {
|
|
131
143
|
css: [panel, !visible && panelHidden,
|
|
@@ -155,57 +167,56 @@ var SwappableContentArea = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
155
167
|
}
|
|
156
168
|
}]);
|
|
157
169
|
return SwappableContentArea;
|
|
158
|
-
}(_react.default.PureComponent);
|
|
170
|
+
}(_react.default.PureComponent); // TODO: ED-17837 We have this workaround because we do
|
|
171
|
+
// not have access to the pluginInjectionApi at this location.
|
|
172
|
+
// It might be that we need to inject the pluginInjectionApi
|
|
173
|
+
// via context so that we can use it in this file (similar to
|
|
174
|
+
// WithEditorActions). To be investigated further.
|
|
159
175
|
exports.SwappableContentArea = SwappableContentArea;
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
function
|
|
164
|
-
|
|
165
|
-
return _super2.apply(this, arguments);
|
|
176
|
+
// @ts-ignore
|
|
177
|
+
var widthPluginKey = {
|
|
178
|
+
key: 'widthPlugin$',
|
|
179
|
+
getState: function getState(state) {
|
|
180
|
+
return state['widthPlugin$'];
|
|
166
181
|
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
width: 0,
|
|
191
|
-
containerWidth: 0,
|
|
192
|
-
lineLength: _editorSharedStyles.akEditorDefaultLayoutWidth
|
|
193
|
-
} : _ref2$widthState;
|
|
194
|
-
var firstContent = contextPanel && contextPanel.contents.find(Boolean);
|
|
195
|
-
var editorWidth = _objectSpread(_objectSpread({}, widthState), {}, {
|
|
196
|
-
contentBreakoutModes: editorView ? (0, _document.getChildBreakoutModes)(editorView.state.doc, editorView.state.schema) : []
|
|
197
|
-
});
|
|
198
|
-
return (0, _react2.jsx)(SwappableContentArea, (0, _extends2.default)({}, _this3.props, {
|
|
199
|
-
editorView: editorView,
|
|
200
|
-
pluginContent: firstContent,
|
|
201
|
-
editorWidth: editorWidth
|
|
202
|
-
}));
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
}
|
|
182
|
+
};
|
|
183
|
+
function ContextPanelWithActions(_ref2) {
|
|
184
|
+
var actions = _ref2.actions,
|
|
185
|
+
props = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
|
|
186
|
+
var eventDispatcher = actions._privateGetEventDispatcher();
|
|
187
|
+
var editorView = actions._privateGetEditorView();
|
|
188
|
+
if (!eventDispatcher) {
|
|
189
|
+
return (0, _react2.jsx)(SwappableContentArea, (0, _extends2.default)({
|
|
190
|
+
editorView: editorView
|
|
191
|
+
}, props));
|
|
192
|
+
}
|
|
193
|
+
return (0, _react2.jsx)(_WithPluginState.default, {
|
|
194
|
+
eventDispatcher: eventDispatcher,
|
|
195
|
+
plugins: {
|
|
196
|
+
contextPanel: _contextPanel.pluginKey,
|
|
197
|
+
widthState: widthPluginKey
|
|
198
|
+
},
|
|
199
|
+
render: function render(_ref3) {
|
|
200
|
+
var contextPanel = _ref3.contextPanel,
|
|
201
|
+
widthState = _ref3.widthState;
|
|
202
|
+
var firstContent = contextPanel && contextPanel.contents.find(Boolean);
|
|
203
|
+
var editorWidth = _objectSpread(_objectSpread({}, widthState), {}, {
|
|
204
|
+
contentBreakoutModes: editorView ? (0, _document.getChildBreakoutModes)(editorView.state.doc, editorView.state.schema) : []
|
|
206
205
|
});
|
|
206
|
+
return (0, _react2.jsx)(SwappableContentArea, (0, _extends2.default)({}, props, {
|
|
207
|
+
editorView: editorView,
|
|
208
|
+
pluginContent: firstContent,
|
|
209
|
+
editorWidth: editorWidth
|
|
210
|
+
}));
|
|
207
211
|
}
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
function ContextPanel(props) {
|
|
215
|
+
return (0, _react2.jsx)(_WithEditorActions.default, {
|
|
216
|
+
render: function render(actions) {
|
|
217
|
+
return (0, _react2.jsx)(ContextPanelWithActions, (0, _extends2.default)({
|
|
218
|
+
actions: actions
|
|
219
|
+
}, props));
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
}
|
|
@@ -17,7 +17,6 @@ var _alignImageLeft = _interopRequireDefault(require("@atlaskit/icon/glyph/edito
|
|
|
17
17
|
var _alignImageRight = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/align-image-right"));
|
|
18
18
|
var _alignImageCenter = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/align-image-center"));
|
|
19
19
|
var _richMediaUtils = require("../../utils/rich-media-utils");
|
|
20
|
-
var _width = require("../../plugins/width");
|
|
21
20
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
22
21
|
var _utils = require("../../plugins/analytics/utils");
|
|
23
22
|
var _analytics = require("../../plugins/analytics");
|
|
@@ -68,7 +67,7 @@ var getNodeWidth = function getNodeWidth(node, schema) {
|
|
|
68
67
|
}
|
|
69
68
|
return node.firstChild && node.firstChild.attrs.width || node.attrs.width;
|
|
70
69
|
};
|
|
71
|
-
var makeAlign = function makeAlign(layout, nodeType) {
|
|
70
|
+
var makeAlign = function makeAlign(layout, nodeType, widthPluginDependencyApi) {
|
|
72
71
|
return function (state, dispatch) {
|
|
73
72
|
var _ref = state.selection,
|
|
74
73
|
node = _ref.node;
|
|
@@ -77,7 +76,7 @@ var makeAlign = function makeAlign(layout, nodeType) {
|
|
|
77
76
|
if (!dispatch) {
|
|
78
77
|
return false;
|
|
79
78
|
}
|
|
80
|
-
var widthPluginState =
|
|
79
|
+
var widthPluginState = widthPluginDependencyApi === null || widthPluginDependencyApi === void 0 ? void 0 : widthPluginDependencyApi.sharedState.currentState();
|
|
81
80
|
if (!node || node.type !== nodeType || !widthPluginState) {
|
|
82
81
|
return false;
|
|
83
82
|
}
|
|
@@ -107,7 +106,7 @@ var makeAlign = function makeAlign(layout, nodeType) {
|
|
|
107
106
|
return true;
|
|
108
107
|
};
|
|
109
108
|
};
|
|
110
|
-
var mapIconsToToolbarItem = function mapIconsToToolbarItem(icons, layout, intl, nodeType) {
|
|
109
|
+
var mapIconsToToolbarItem = function mapIconsToToolbarItem(icons, layout, intl, nodeType, widthPluginDependencyApi) {
|
|
111
110
|
return icons.map(function (toolbarItem) {
|
|
112
111
|
var id = toolbarItem.id,
|
|
113
112
|
value = toolbarItem.value;
|
|
@@ -117,7 +116,7 @@ var mapIconsToToolbarItem = function mapIconsToToolbarItem(icons, layout, intl,
|
|
|
117
116
|
icon: toolbarItem.icon,
|
|
118
117
|
title: intl.formatMessage(layoutToMessages[value]),
|
|
119
118
|
selected: layout === value,
|
|
120
|
-
onClick: makeAlign(value, nodeType)
|
|
119
|
+
onClick: makeAlign(value, nodeType, widthPluginDependencyApi)
|
|
121
120
|
};
|
|
122
121
|
});
|
|
123
122
|
};
|
|
@@ -125,17 +124,17 @@ var shouldHideLayoutToolbar = function shouldHideLayoutToolbar(selection, _ref2,
|
|
|
125
124
|
var nodes = _ref2.nodes;
|
|
126
125
|
return (0, _prosemirrorUtils.hasParentNodeOfType)([nodes.bodiedExtension, nodes.listItem, nodes.expand, nodes.nestedExpand].concat((0, _toConsumableArray2.default)(allowResizingInTables ? [] : [nodes.table])).filter(Boolean))(selection);
|
|
127
126
|
};
|
|
128
|
-
var buildLayoutButtons = function buildLayoutButtons(state, intl, nodeType, allowResizing, allowResizingInTables) {
|
|
129
|
-
var allowWrapping = arguments.length >
|
|
130
|
-
var allowAlignment = arguments.length >
|
|
127
|
+
var buildLayoutButtons = function buildLayoutButtons(state, intl, nodeType, widthPluginDependencyApi, allowResizing, allowResizingInTables) {
|
|
128
|
+
var allowWrapping = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : true;
|
|
129
|
+
var allowAlignment = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : true;
|
|
131
130
|
var selection = state.selection;
|
|
132
131
|
if (!(selection instanceof _prosemirrorState.NodeSelection) || !selection.node || !nodeType || shouldHideLayoutToolbar(selection, state.schema, allowResizingInTables)) {
|
|
133
132
|
return [];
|
|
134
133
|
}
|
|
135
134
|
var layout = selection.node.attrs.layout;
|
|
136
|
-
var alignmentToolbarItems = allowAlignment ? mapIconsToToolbarItem(alignmentIcons, layout, intl, nodeType) : [];
|
|
137
|
-
var wrappingToolbarItems = allowWrapping ? mapIconsToToolbarItem(wrappingIcons, layout, intl, nodeType) : [];
|
|
138
|
-
var breakOutToolbarItems = !allowResizing ? mapIconsToToolbarItem(breakoutIcons, layout, intl, nodeType) : [];
|
|
135
|
+
var alignmentToolbarItems = allowAlignment ? mapIconsToToolbarItem(alignmentIcons, layout, intl, nodeType, widthPluginDependencyApi) : [];
|
|
136
|
+
var wrappingToolbarItems = allowWrapping ? mapIconsToToolbarItem(wrappingIcons, layout, intl, nodeType, widthPluginDependencyApi) : [];
|
|
137
|
+
var breakOutToolbarItems = !allowResizing ? mapIconsToToolbarItem(breakoutIcons, layout, intl, nodeType, widthPluginDependencyApi) : [];
|
|
139
138
|
var items = [].concat((0, _toConsumableArray2.default)(alignmentToolbarItems), (0, _toConsumableArray2.default)(getSeparatorBetweenAlignmentAndWrapping(allowAlignment, allowWrapping)), (0, _toConsumableArray2.default)(wrappingToolbarItems), (0, _toConsumableArray2.default)(getSeparatorBeforeBreakoutItems(allowAlignment, allowWrapping, allowResizing)), (0, _toConsumableArray2.default)(breakOutToolbarItems));
|
|
140
139
|
return items;
|
|
141
140
|
};
|
|
@@ -15,8 +15,8 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
15
15
|
var _react = _interopRequireDefault(require("react"));
|
|
16
16
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
17
|
var _reResizable = require("re-resizable");
|
|
18
|
-
var
|
|
19
|
-
var
|
|
18
|
+
var _utils = require("@atlaskit/editor-common/utils");
|
|
19
|
+
var _utils2 = require("./utils");
|
|
20
20
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
21
21
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
22
22
|
var _analytics = require("../../plugins/analytics");
|
|
@@ -71,7 +71,7 @@ var Resizer = /*#__PURE__*/function (_React$Component) {
|
|
|
71
71
|
isResizing: true
|
|
72
72
|
}, function () {
|
|
73
73
|
var newHighlights = highlights(width + innerPadding, snapPoints);
|
|
74
|
-
displayGrid === null || displayGrid === void 0 ? void 0 : displayGrid(newHighlights.length > 0, (0,
|
|
74
|
+
displayGrid === null || displayGrid === void 0 ? void 0 : displayGrid(newHighlights.length > 0, (0, _utils.gridTypeForLayout)(layout), newHighlights);
|
|
75
75
|
});
|
|
76
76
|
});
|
|
77
77
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleResize", function (_event, _direction, _elementRef, delta) {
|
|
@@ -96,7 +96,7 @@ var Resizer = /*#__PURE__*/function (_React$Component) {
|
|
|
96
96
|
updateSize(newSize.width, newSize.layout);
|
|
97
97
|
}
|
|
98
98
|
var newHighlights = highlights(newWidth, snapPoints);
|
|
99
|
-
displayGrid === null || displayGrid === void 0 ? void 0 : displayGrid(newHighlights.length > 0, (0,
|
|
99
|
+
displayGrid === null || displayGrid === void 0 ? void 0 : displayGrid(newHighlights.length > 0, (0, _utils.gridTypeForLayout)(newSize.layout), newHighlights);
|
|
100
100
|
resizable.updateSize({
|
|
101
101
|
width: newWidth,
|
|
102
102
|
height: 'auto'
|
|
@@ -121,19 +121,19 @@ var Resizer = /*#__PURE__*/function (_React$Component) {
|
|
|
121
121
|
return;
|
|
122
122
|
}
|
|
123
123
|
var newWidth = getWidthFromSnapPoints(resizable.state.original.width + delta.width, snapPoints);
|
|
124
|
-
var snapWidth = (0,
|
|
124
|
+
var snapWidth = (0, _utils2.snapTo)(newWidth, snapPoints);
|
|
125
125
|
var newSize = calcNewSize(snapWidth, true);
|
|
126
126
|
var newHighlights = highlights(newWidth, snapPoints);
|
|
127
127
|
if (dispatchAnalyticsEvent) {
|
|
128
128
|
dispatchAnalyticsEvent(getResizeAnalyticsEvent(nodeType, newSize.width, newSize.layout));
|
|
129
129
|
}
|
|
130
130
|
// show committed grid size
|
|
131
|
-
displayGrid === null || displayGrid === void 0 ? void 0 : displayGrid(newHighlights.length > 0, (0,
|
|
131
|
+
displayGrid === null || displayGrid === void 0 ? void 0 : displayGrid(newHighlights.length > 0, (0, _utils.gridTypeForLayout)(newSize.layout), newHighlights);
|
|
132
132
|
_this.setState({
|
|
133
133
|
isResizing: false
|
|
134
134
|
}, function () {
|
|
135
135
|
updateSize(newSize.width, newSize.layout);
|
|
136
|
-
displayGrid === null || displayGrid === void 0 ? void 0 : displayGrid(false, (0,
|
|
136
|
+
displayGrid === null || displayGrid === void 0 ? void 0 : displayGrid(false, (0, _utils.gridTypeForLayout)(layout), []);
|
|
137
137
|
});
|
|
138
138
|
});
|
|
139
139
|
return _this;
|
|
@@ -156,7 +156,7 @@ var Resizer = /*#__PURE__*/function (_React$Component) {
|
|
|
156
156
|
ratio = _this$props4.ratio,
|
|
157
157
|
handleComponentFunc = _this$props4.handleComponentFunc;
|
|
158
158
|
var isResizing = this.state.isResizing;
|
|
159
|
-
|
|
159
|
+
_utils2.handleSides.forEach(function (side) {
|
|
160
160
|
var _handleStyles$side;
|
|
161
161
|
handles[side] = "richMedia-resize-handle-".concat(side);
|
|
162
162
|
handleStyles[side] = (_handleStyles$side = {
|
|
@@ -8,11 +8,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
var _width = require("../../plugins/width");
|
|
12
11
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
13
|
-
var _context = require("../ContextPanel/context");
|
|
14
12
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
13
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
|
+
// TODO: ED-17870 This workaround will be removed here.
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
var widthPluginKey = {
|
|
17
|
+
key: 'widthPlugin$',
|
|
18
|
+
getState: function getState(state) {
|
|
19
|
+
return state['widthPlugin$'];
|
|
20
|
+
}
|
|
21
|
+
};
|
|
16
22
|
// Why do we need this? Why not just use the width from the context directly rather than this?
|
|
17
23
|
// Well my friend - some of the VR tests break, seemingly due to the fact that existing behaviour
|
|
18
24
|
// assumes the initial value is 0, the width from context may not start from 0 however.
|
|
@@ -30,7 +36,7 @@ var useListener = function useListener(contextValue) {
|
|
|
30
36
|
};
|
|
31
37
|
var WidthEmitter = function WidthEmitter(_ref) {
|
|
32
38
|
var editorView = _ref.editorView;
|
|
33
|
-
var _useContext = (0, _react.useContext)(
|
|
39
|
+
var _useContext = (0, _react.useContext)(_ui.ContextPanel),
|
|
34
40
|
contextPanelWidthContext = _useContext.width;
|
|
35
41
|
var _useContext2 = (0, _react.useContext)(_ui.WidthContext),
|
|
36
42
|
containerWidthContext = _useContext2.width;
|
|
@@ -44,7 +50,7 @@ var WidthEmitter = function WidthEmitter(_ref) {
|
|
|
44
50
|
var dom = editorView.dom,
|
|
45
51
|
tr = editorView.state.tr,
|
|
46
52
|
dispatch = editorView.dispatch;
|
|
47
|
-
tr.setMeta(
|
|
53
|
+
tr.setMeta(widthPluginKey, {
|
|
48
54
|
width: width,
|
|
49
55
|
containerWidth: containerWidth,
|
|
50
56
|
lineLength: dom ? dom.clientWidth : undefined
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.checkClipboardTypes = checkClipboardTypes;
|
|
9
|
-
exports.copyToClipboard = exports.copyHTMLToClipboard = void 0;
|
|
9
|
+
exports.copyToClipboard = exports.copyHTMLToClipboardPolyfill = exports.copyHTMLToClipboard = void 0;
|
|
10
10
|
exports.isPastedFile = isPastedFile;
|
|
11
11
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
12
12
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
@@ -88,7 +88,7 @@ var copyToClipboard = /*#__PURE__*/function () {
|
|
|
88
88
|
exports.copyToClipboard = copyToClipboard;
|
|
89
89
|
var copyHTMLToClipboard = /*#__PURE__*/function () {
|
|
90
90
|
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(elementToCopy, plainTextToCopy) {
|
|
91
|
-
var data
|
|
91
|
+
var data;
|
|
92
92
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
93
93
|
while (1) switch (_context2.prev = _context2.next) {
|
|
94
94
|
case 0:
|
|
@@ -115,17 +115,13 @@ var copyHTMLToClipboard = /*#__PURE__*/function () {
|
|
|
115
115
|
_context2.t0 = _context2["catch"](1);
|
|
116
116
|
throw new Error('Clipboard api is not supported');
|
|
117
117
|
case 10:
|
|
118
|
-
_context2.next =
|
|
118
|
+
_context2.next = 13;
|
|
119
119
|
break;
|
|
120
120
|
case 12:
|
|
121
|
-
//
|
|
121
|
+
// ED-17083 extension copy seems have issue with ClipboardItem API
|
|
122
122
|
// Hence of use of this polyfill
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
dt.setData('text/plain', plainTextToCopy || elementToCopy.innerText);
|
|
126
|
-
dt.setData('text/html', elementToCopy.innerHTML);
|
|
127
|
-
Clipboard.write(dt);
|
|
128
|
-
case 17:
|
|
123
|
+
copyHTMLToClipboardPolyfill(elementToCopy, plainTextToCopy);
|
|
124
|
+
case 13:
|
|
129
125
|
case "end":
|
|
130
126
|
return _context2.stop();
|
|
131
127
|
}
|
|
@@ -135,4 +131,15 @@ var copyHTMLToClipboard = /*#__PURE__*/function () {
|
|
|
135
131
|
return _ref3.apply(this, arguments);
|
|
136
132
|
};
|
|
137
133
|
}();
|
|
138
|
-
|
|
134
|
+
|
|
135
|
+
// At the time of development, Firefox doesn't support ClipboardItem API
|
|
136
|
+
// Hence of use of this polyfill
|
|
137
|
+
exports.copyHTMLToClipboard = copyHTMLToClipboard;
|
|
138
|
+
var copyHTMLToClipboardPolyfill = function copyHTMLToClipboardPolyfill(elementToCopy, plainTextToCopy) {
|
|
139
|
+
var Clipboard = clipboard;
|
|
140
|
+
var dt = new Clipboard.DT();
|
|
141
|
+
dt.setData('text/plain', plainTextToCopy || elementToCopy.innerText);
|
|
142
|
+
dt.setData('text/html', elementToCopy.innerHTML);
|
|
143
|
+
Clipboard.write(dt);
|
|
144
|
+
};
|
|
145
|
+
exports.copyHTMLToClipboardPolyfill = copyHTMLToClipboardPolyfill;
|
|
@@ -61,18 +61,30 @@ var InstrumentedPlugin = /*#__PURE__*/function (_SafePlugin) {
|
|
|
61
61
|
return result;
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
+
var _uiTracking$samplingR = uiTracking.samplingRate,
|
|
65
|
+
uiTrackingSamplingRate = _uiTracking$samplingR === void 0 ? 100 : _uiTracking$samplingR;
|
|
64
66
|
if (uiTracking.enabled && spec.view) {
|
|
65
67
|
var originalView = spec.view.bind(spec);
|
|
66
68
|
spec.view = function (editorView) {
|
|
67
69
|
var self = (0, _assertThisInitialized2.default)(_this);
|
|
68
70
|
var measure = "\uD83E\uDD89".concat(self.key, "::view::update");
|
|
69
71
|
var view = originalView(editorView);
|
|
72
|
+
var uiTrackingSamplingCounter = 0;
|
|
70
73
|
if (view.update) {
|
|
71
74
|
var originalUpdate = view.update;
|
|
72
75
|
view.update = function (view, state) {
|
|
73
|
-
|
|
76
|
+
var shouldTrack = uiTrackingSamplingRate && uiTrackingSamplingCounter === 0;
|
|
77
|
+
if (shouldTrack) {
|
|
78
|
+
(0, _utils.startMeasure)(measure);
|
|
79
|
+
}
|
|
74
80
|
originalUpdate(view, state);
|
|
75
|
-
|
|
81
|
+
if (shouldTrack) {
|
|
82
|
+
(0, _utils.stopMeasure)(measure, function () {});
|
|
83
|
+
}
|
|
84
|
+
uiTrackingSamplingCounter++;
|
|
85
|
+
if (uiTrackingSamplingRate && uiTrackingSamplingCounter >= uiTrackingSamplingRate) {
|
|
86
|
+
uiTrackingSamplingCounter = 0;
|
|
87
|
+
}
|
|
76
88
|
};
|
|
77
89
|
}
|
|
78
90
|
return view;
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.version = exports.nextMajorVersion = exports.name = void 0;
|
|
7
7
|
var name = "@atlaskit/editor-core";
|
|
8
8
|
exports.name = name;
|
|
9
|
-
var version = "
|
|
9
|
+
var version = "184.0.0";
|
|
10
10
|
exports.version = version;
|
|
11
11
|
var nextMajorVersion = function nextMajorVersion() {
|
|
12
12
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/i18n/da.js
CHANGED
|
@@ -158,7 +158,7 @@ export default {
|
|
|
158
158
|
'fabric.editor.inputQueryAssistiveTxt': 'Når resultater med automatisk udfyldning er tilgængelige, skal du bruge pil op og pil ned til at gennemse og Enter til at vælge. Brugere af touchenheder kan trykke eller stryge.',
|
|
159
159
|
'fabric.editor.invalidDateError': 'Indtast en gyldig dato',
|
|
160
160
|
'fabric.editor.invalidLink': 'Indtast et gyldigt link.',
|
|
161
|
-
'fabric.editor.inviteItem.title': '{userRole, select, admin {Inviter
|
|
161
|
+
'fabric.editor.inviteItem.title': '{userRole, select, admin {Inviter teammedlemmer til {productName}} trusted {Inviter teammedlemmer til {productName}} other {Tilføj teammedlem til {productName}}}',
|
|
162
162
|
'fabric.editor.italic': 'Kursiv',
|
|
163
163
|
'fabric.editor.keyboardShortcuts': 'Tastaturgenveje',
|
|
164
164
|
'fabric.editor.leftSidebar': 'Venstre sidebjælke',
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
//
|
|
9
9
|
export default {
|
|
10
10
|
'fabric.editor.addAltText': 'Alt text',
|
|
11
|
-
'fabric.editor.addImageBorder': 'Add border',
|
|
12
11
|
'fabric.editor.alignCenter': 'Align Center',
|
|
13
12
|
'fabric.editor.alignLeft': 'Align left',
|
|
14
13
|
'fabric.editor.alignRight': 'Align Right',
|
|
15
14
|
'fabric.editor.alignment': 'Text alignment',
|
|
16
15
|
'fabric.editor.altText': 'Alt text',
|
|
17
16
|
'fabric.editor.alttext.validation': 'Please remove any special characters in alt text.',
|
|
17
|
+
'fabric.editor.annotate': 'Annotate',
|
|
18
18
|
'fabric.editor.annotationToolbar': 'Annotation toolbar',
|
|
19
19
|
'fabric.editor.backLink': 'Go back',
|
|
20
20
|
'fabric.editor.blockCardUnavailable': 'The inline link is inside {node} and cannot have its view changed',
|
|
@@ -62,7 +62,6 @@ export default {
|
|
|
62
62
|
'fabric.editor.customPanel.description': 'Add a note with an emoji and colored background',
|
|
63
63
|
'fabric.editor.decisionPlaceholder': 'Add a decision…',
|
|
64
64
|
'fabric.editor.defaultAltText': 'List item',
|
|
65
|
-
'fabric.editor.description': 'Description',
|
|
66
65
|
'fabric.editor.displayBlock': 'Display card',
|
|
67
66
|
'fabric.editor.displayEmbed': 'Display embed',
|
|
68
67
|
'fabric.editor.displayInline': 'Display inline',
|
|
@@ -78,7 +77,6 @@ export default {
|
|
|
78
77
|
'fabric.editor.editStatusColor': 'Edit Status Color',
|
|
79
78
|
'fabric.editor.editStatusText': 'Edit Status',
|
|
80
79
|
'fabric.editor.editableContentLabel': 'Editable content',
|
|
81
|
-
'fabric.editor.editorAssistiveLabel': 'Main content area, start typing to enter text.',
|
|
82
80
|
'fabric.editor.editorHelp': 'Editor help',
|
|
83
81
|
'fabric.editor.editors': 'Editors',
|
|
84
82
|
'fabric.editor.elementBrowser.help': 'Help',
|
|
@@ -103,18 +101,14 @@ export default {
|
|
|
103
101
|
'fabric.editor.error': 'Error',
|
|
104
102
|
'fabric.editor.errorPanel': 'Error panel',
|
|
105
103
|
'fabric.editor.errorPanel.description': 'Call out errors in a colored panel',
|
|
106
|
-
'fabric.editor.extension.confirmDeleteLinkedModalMessage': '
|
|
107
|
-
'fabric.editor.extension.confirmDeleteLinkedModalOKButton': '
|
|
108
|
-
'fabric.editor.extension.deleteElementTitle': 'Delete element',
|
|
109
|
-
'fabric.editor.extension.sourceNoTitledName': 'this element',
|
|
104
|
+
'fabric.editor.extension.confirmDeleteLinkedModalMessage': 'Removing this extension will break anything connected to it.',
|
|
105
|
+
'fabric.editor.extension.confirmDeleteLinkedModalOKButton': 'Remove extension',
|
|
110
106
|
'fabric.editor.extensions.config-panel.save-indicator': 'All changes are always autosaved',
|
|
111
107
|
'fabric.editor.find': 'Find',
|
|
112
108
|
'fabric.editor.findNext': 'Find next',
|
|
113
109
|
'fabric.editor.findPrevious': 'Find previous',
|
|
114
110
|
'fabric.editor.findReplaceToolbarButton': 'Find and replace',
|
|
115
111
|
'fabric.editor.floatingToolbar.confirmModalCancel': 'Cancel',
|
|
116
|
-
'fabric.editor.floatingToolbar.confirmModalCheckboxLabel': 'Also delete connected elements',
|
|
117
|
-
'fabric.editor.floatingToolbar.confirmModalConnectedUnit': '{amount, plural, =0 {{name}} one {{name} (+1 connected element)} other {{name} (+{amount,number} connected elements)}}',
|
|
118
112
|
'fabric.editor.floatingToolbar.confirmModalHeading': 'Are you sure?',
|
|
119
113
|
'fabric.editor.floatingToolbar.confirmModalOK': 'OK',
|
|
120
114
|
'fabric.editor.floatingToolbar.floatingToolbarAnnouncer': 'Floating toolbar controls have been opened',
|
|
@@ -143,14 +137,8 @@ export default {
|
|
|
143
137
|
'fabric.editor.helpDialogTips': 'Press {keyMap} to quickly open this dialog at any time',
|
|
144
138
|
'fabric.editor.hyperlink.linkAriaLabel': 'Link label',
|
|
145
139
|
'fabric.editor.hyperlink.searchLinkAriaDescription': 'Suggestions will appear below as you type into the field',
|
|
146
|
-
'fabric.editor.hyperlink.searchLinkResults': '{count, plural, =0 {no results found
|
|
140
|
+
'fabric.editor.hyperlink.searchLinkResults': '{count, plural, =0 {no results found} one {{count,number} result found} other {{count,number} results found}}',
|
|
147
141
|
'fabric.editor.hyperlinkToolbarPlaceholder': 'Paste or search for link',
|
|
148
|
-
'fabric.editor.imageBorderBold': 'Bold',
|
|
149
|
-
'fabric.editor.imageBorderColor': 'Color',
|
|
150
|
-
'fabric.editor.imageBorderMedium': 'Medium',
|
|
151
|
-
'fabric.editor.imageBorderOptions': 'Border options',
|
|
152
|
-
'fabric.editor.imageBorderSize': 'Size',
|
|
153
|
-
'fabric.editor.imageBorderSubtle': 'Subtle',
|
|
154
142
|
'fabric.editor.improvement': 'Improvement',
|
|
155
143
|
'fabric.editor.indent': 'Indent',
|
|
156
144
|
'fabric.editor.info': 'Info',
|
|
@@ -161,7 +149,7 @@ export default {
|
|
|
161
149
|
'fabric.editor.inputQueryAssistiveTxt': 'When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures.',
|
|
162
150
|
'fabric.editor.invalidDateError': 'Enter a valid date',
|
|
163
151
|
'fabric.editor.invalidLink': 'Please enter a valid link.',
|
|
164
|
-
'fabric.editor.inviteItem.title': '{userRole, select, admin {Invite teammate to {productName}
|
|
152
|
+
'fabric.editor.inviteItem.title': '{userRole, select, admin {Invite teammate to {productName}} trusted {Invite teammate to {productName}} other {Add teammate to {productName}}}',
|
|
165
153
|
'fabric.editor.italic': 'Italic',
|
|
166
154
|
'fabric.editor.keyboardShortcuts': 'Keyboard shortcuts',
|
|
167
155
|
'fabric.editor.leftSidebar': 'Left sidebar',
|
|
@@ -172,12 +160,9 @@ export default {
|
|
|
172
160
|
'fabric.editor.matchCase': 'Match case',
|
|
173
161
|
'fabric.editor.mediaAddLink': 'Add link',
|
|
174
162
|
'fabric.editor.mediaGroupDeleteLabel': 'delete',
|
|
175
|
-
'fabric.editor.mentionNode.label': 'Tagged user',
|
|
176
163
|
'fabric.editor.mentionsAddLabel': 'add-icon',
|
|
177
164
|
'fabric.editor.mentionsIconLabel': 'Mention',
|
|
178
165
|
'fabric.editor.moreFormatting': 'More formatting',
|
|
179
|
-
'fabric.editor.navigate.toolbar.editor': 'Navigate to editor toolbar',
|
|
180
|
-
'fabric.editor.navigate.toolbar.floating': 'Navigate to floating toolbar',
|
|
181
166
|
'fabric.editor.noResultsFound': 'No results',
|
|
182
167
|
'fabric.editor.noSearchResults': 'No search results',
|
|
183
168
|
'fabric.editor.normal': 'Normal text',
|
|
@@ -198,7 +183,6 @@ export default {
|
|
|
198
183
|
'fabric.editor.placeholderTextPlaceholder': 'Add placeholder text',
|
|
199
184
|
'fabric.editor.quickInsert': 'Quick insert',
|
|
200
185
|
'fabric.editor.redo': 'Redo',
|
|
201
|
-
'fabric.editor.removeImageBorder': 'Remove border',
|
|
202
186
|
'fabric.editor.replace': 'Replace',
|
|
203
187
|
'fabric.editor.replaceAll': 'Replace all',
|
|
204
188
|
'fabric.editor.replaceWith': 'Replace with',
|
|
@@ -207,7 +191,6 @@ export default {
|
|
|
207
191
|
'fabric.editor.searchResults': '{itemsLength, plural, one {{itemsLength,number} search result available} other {{itemsLength,number} search results available}}',
|
|
208
192
|
'fabric.editor.selectLanguage': 'Select language',
|
|
209
193
|
'fabric.editor.settingsLinks': 'Go to Link Preferences',
|
|
210
|
-
'fabric.editor.shortcut': 'Text shortcut',
|
|
211
194
|
'fabric.editor.single': 'Single column',
|
|
212
195
|
'fabric.editor.statusPlaceholder': 'Set a status',
|
|
213
196
|
'fabric.editor.story': 'Story',
|
|
@@ -229,17 +212,9 @@ export default {
|
|
|
229
212
|
'fabric.editor.threeColumns': 'Three columns',
|
|
230
213
|
'fabric.editor.threeColumnsWithSidebars': 'Three columns with sidebars',
|
|
231
214
|
'fabric.editor.toolbarLabel': 'Editor toolbar',
|
|
232
|
-
'fabric.editor.toolbarMediaTitle': '
|
|
215
|
+
'fabric.editor.toolbarMediaTitle': 'Files & images',
|
|
233
216
|
'fabric.editor.twoColumns': 'Two columns',
|
|
234
|
-
'fabric.editor.
|
|
235
|
-
'fabric.editor.typeAhead.quickInsertInputLabel': 'Begin typing to search or filter shortcut options',
|
|
236
|
-
'fabric.editor.typeAhead.quickInsertPopupLabel': 'Shortcuts for inserts and formatting',
|
|
237
|
-
'fabric.editor.typeahead.emojiInputLabel': 'Begin typing to search or filter emoji options',
|
|
238
|
-
'fabric.editor.typeahead.emojiListItemLabel': 'Emoji {name} Text Shortcut {shortcut}',
|
|
239
|
-
'fabric.editor.typeahead.emojiPopupLabel': 'Emoji shortcuts',
|
|
240
|
-
'fabric.editor.typeahead.mentionInputLabel': 'Begin typing to search for users to tag',
|
|
241
|
-
'fabric.editor.typeahead.mentionPopupLabel': 'Users you can tag',
|
|
242
|
-
'fabric.editor.typeahead.metionListItemLabel': 'User {name} @{shortName}',
|
|
217
|
+
'fabric.editor.typeAheadResultLabel': 'TypeAhead results',
|
|
243
218
|
'fabric.editor.unableToOpenLink': 'Unable to open this link',
|
|
244
219
|
'fabric.editor.underline': 'Underline',
|
|
245
220
|
'fabric.editor.undo': 'Undo',
|
|
@@ -253,6 +228,5 @@ export default {
|
|
|
253
228
|
'fabric.editor.warningPanel': 'Warning panel',
|
|
254
229
|
'fabric.editor.warningPanel.description': 'Add a note of caution in a colored panel',
|
|
255
230
|
'fabric.editor.wrapLeft': 'Wrap left',
|
|
256
|
-
'fabric.editor.wrapRight': 'Wrap right'
|
|
257
|
-
'fabric.emoji.label': 'Emoji'
|
|
231
|
+
'fabric.editor.wrapRight': 'Wrap right'
|
|
258
232
|
};
|
package/dist/es2019/i18n/it.js
CHANGED
|
@@ -158,7 +158,7 @@ export default {
|
|
|
158
158
|
'fabric.editor.inputQueryAssistiveTxt': 'Una volta che i risultati del completamento automatico sono disponibili, utilizza le frecce su e giù per rivedere i dati e premi Invio per selezionarli. Gli utenti di dispositivi touch possono utilizzare i movimenti di tocco o scorrimento.',
|
|
159
159
|
'fabric.editor.invalidDateError': 'Inserisci una data valida',
|
|
160
160
|
'fabric.editor.invalidLink': 'Inserisci un link valido.',
|
|
161
|
-
'fabric.editor.inviteItem.title': '{userRole, select, admin {Invita un collega in {productName}} trusted {Invita un collega in {productName}} other {
|
|
161
|
+
'fabric.editor.inviteItem.title': '{userRole, select, admin {Invita un collega in {productName}} trusted {Invita un collega in {productName}} other {Aggiunti un collega a {productName}}}',
|
|
162
162
|
'fabric.editor.italic': 'Corsivo',
|
|
163
163
|
'fabric.editor.keyboardShortcuts': 'Scelte rapide da tastiera',
|
|
164
164
|
'fabric.editor.leftSidebar': 'Barra laterale sinistra',
|