@atlaskit/editor-core 167.0.1 → 168.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 +26 -0
- package/dist/cjs/i18n/cs.js +1 -23
- package/dist/cjs/i18n/da.js +1 -23
- package/dist/cjs/i18n/de.js +1 -23
- package/dist/cjs/i18n/es.js +1 -23
- package/dist/cjs/i18n/et.js +1 -23
- package/dist/cjs/i18n/fr.js +1 -23
- package/dist/cjs/i18n/hu.js +1 -23
- package/dist/cjs/i18n/is.js +1 -23
- package/dist/cjs/i18n/it.js +1 -23
- package/dist/cjs/i18n/ko.js +1 -23
- package/dist/cjs/i18n/nb.js +1 -9
- package/dist/cjs/i18n/nl.js +0 -3
- package/dist/cjs/i18n/pl.js +0 -1
- package/dist/cjs/i18n/pt_BR.js +1 -8
- package/dist/cjs/i18n/pt_PT.js +1 -11
- package/dist/cjs/i18n/ro.js +1 -23
- package/dist/cjs/i18n/sk.js +1 -23
- package/dist/cjs/i18n/sv.js +0 -1
- package/dist/cjs/plugins/annotation/pm-plugins/inline-comment.js +2 -2
- package/dist/cjs/plugins/card/styles.js +1 -1
- package/dist/cjs/plugins/collab-edit/index.js +2 -2
- package/dist/cjs/plugins/collab-edit/provider/channel.js +2 -2
- package/dist/cjs/plugins/date/actions.js +1 -1
- package/dist/cjs/plugins/extension/context-panel.js +2 -2
- package/dist/cjs/plugins/extension/pm-plugins/main.js +2 -2
- package/dist/cjs/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +2 -2
- package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -2
- package/dist/cjs/plugins/layout/styles.js +1 -1
- package/dist/cjs/plugins/list/styles.js +3 -1
- package/dist/cjs/plugins/macro/actions.js +2 -2
- package/dist/cjs/plugins/media/nodeviews/mediaInline.js +2 -2
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +2 -2
- package/dist/cjs/plugins/media/ui/ResizableMediaSingle/index.js +2 -2
- package/dist/cjs/plugins/paste/handlers.js +40 -14
- package/dist/cjs/plugins/paste/pm-plugins/analytics.js +1 -1
- package/dist/cjs/plugins/paste/pm-plugins/main.js +17 -0
- package/dist/cjs/plugins/quick-insert/search.js +3 -1
- package/dist/cjs/plugins/table/ui/common-styles.js +1 -1
- package/dist/cjs/plugins/table/utils/paste.js +16 -3
- package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +7 -0
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +1 -1
- package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +2 -2
- package/dist/cjs/ui/ConfigPanel/Fields/CustomSelect.js +2 -2
- package/dist/cjs/ui/ConfigPanel/Fields/UserSelect.js +2 -2
- package/dist/cjs/ui/ConfigPanel/transformers.js +2 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/i18n/cs.js +1 -23
- package/dist/es2019/i18n/da.js +1 -23
- package/dist/es2019/i18n/de.js +1 -23
- package/dist/es2019/i18n/es.js +1 -23
- package/dist/es2019/i18n/et.js +1 -23
- package/dist/es2019/i18n/fr.js +1 -23
- package/dist/es2019/i18n/hu.js +1 -23
- package/dist/es2019/i18n/is.js +1 -23
- package/dist/es2019/i18n/it.js +1 -23
- package/dist/es2019/i18n/ko.js +1 -23
- package/dist/es2019/i18n/nb.js +1 -9
- package/dist/es2019/i18n/nl.js +0 -3
- package/dist/es2019/i18n/pl.js +0 -1
- package/dist/es2019/i18n/pt_BR.js +1 -8
- package/dist/es2019/i18n/pt_PT.js +1 -11
- package/dist/es2019/i18n/ro.js +1 -23
- package/dist/es2019/i18n/sk.js +1 -23
- package/dist/es2019/i18n/sv.js +0 -1
- package/dist/es2019/plugins/card/styles.js +3 -0
- package/dist/es2019/plugins/date/actions.js +1 -1
- package/dist/es2019/plugins/layout/styles.js +2 -1
- package/dist/es2019/plugins/list/styles.js +8 -0
- package/dist/es2019/plugins/paste/handlers.js +39 -12
- package/dist/es2019/plugins/paste/pm-plugins/analytics.js +2 -2
- package/dist/es2019/plugins/paste/pm-plugins/main.js +14 -0
- package/dist/es2019/plugins/quick-insert/search.js +1 -1
- package/dist/es2019/plugins/table/ui/common-styles.js +2 -1
- package/dist/es2019/plugins/table/utils/paste.js +16 -3
- package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +7 -0
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +5 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/actions/index.js +1 -1
- package/dist/esm/create-editor/ErrorBoundary.js +1 -1
- package/dist/esm/editor.js +2 -1
- package/dist/esm/i18n/cs.js +1 -23
- package/dist/esm/i18n/da.js +1 -23
- package/dist/esm/i18n/de.js +1 -23
- package/dist/esm/i18n/es.js +1 -23
- package/dist/esm/i18n/et.js +1 -23
- package/dist/esm/i18n/fr.js +1 -23
- package/dist/esm/i18n/hu.js +1 -23
- package/dist/esm/i18n/is.js +1 -23
- package/dist/esm/i18n/it.js +1 -23
- package/dist/esm/i18n/ko.js +1 -23
- package/dist/esm/i18n/nb.js +1 -9
- package/dist/esm/i18n/nl.js +0 -3
- package/dist/esm/i18n/pl.js +0 -1
- package/dist/esm/i18n/pt_BR.js +1 -8
- package/dist/esm/i18n/pt_PT.js +1 -11
- package/dist/esm/i18n/ro.js +1 -23
- package/dist/esm/i18n/sk.js +1 -23
- package/dist/esm/i18n/sv.js +0 -1
- package/dist/esm/plugins/annotation/pm-plugins/inline-comment.js +1 -1
- package/dist/esm/plugins/card/styles.js +1 -1
- package/dist/esm/plugins/collab-edit/index.js +1 -1
- package/dist/esm/plugins/collab-edit/provider/channel.js +1 -1
- package/dist/esm/plugins/custom-autoformat/doc.js +1 -1
- package/dist/esm/plugins/custom-autoformat/index.js +1 -1
- package/dist/esm/plugins/date/actions.js +1 -1
- package/dist/esm/plugins/extension/actions.js +1 -1
- package/dist/esm/plugins/extension/context-panel.js +1 -1
- package/dist/esm/plugins/extension/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/extension/ui/Extension/ExtensionComponent.js +1 -1
- package/dist/esm/plugins/feedback-dialog/index.js +1 -1
- package/dist/esm/plugins/feedback-dialog/loadJiraCollectorDialogScript.js +1 -1
- package/dist/esm/plugins/find-replace/utils/batch-decorations.js +1 -1
- package/dist/esm/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +1 -1
- package/dist/esm/plugins/hyperlink/HyperlinkToolbarAppearance.js +1 -1
- package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -1
- package/dist/esm/plugins/image-upload/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/layout/styles.js +1 -1
- package/dist/esm/plugins/list/styles.js +2 -1
- package/dist/esm/plugins/macro/actions.js +1 -1
- package/dist/esm/plugins/media/nodeviews/mediaGroup.js +1 -1
- package/dist/esm/plugins/media/nodeviews/mediaInline.js +2 -1
- package/dist/esm/plugins/media/nodeviews/mediaNodeUpdater.js +1 -1
- package/dist/esm/plugins/media/nodeviews/mediaNodeView/media.js +1 -1
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +1 -1
- package/dist/esm/plugins/media/picker-facade.js +1 -1
- package/dist/esm/plugins/media/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/media/toolbar/utils.js +1 -1
- package/dist/esm/plugins/media/ui/MediaPicker/PickerFacadeProvider.js +1 -1
- package/dist/esm/plugins/media/ui/ResizableMediaSingle/index.js +1 -1
- package/dist/esm/plugins/media/utils/check-media-type.js +1 -1
- package/dist/esm/plugins/paste/handlers.js +41 -14
- package/dist/esm/plugins/paste/pm-plugins/analytics.js +2 -2
- package/dist/esm/plugins/paste/pm-plugins/main.js +17 -1
- package/dist/esm/plugins/quick-insert/index.js +1 -1
- package/dist/esm/plugins/quick-insert/search.js +3 -1
- package/dist/esm/plugins/table/ui/common-styles.js +1 -1
- package/dist/esm/plugins/table/utils/paste.js +16 -3
- package/dist/esm/plugins/tasks-and-decisions/ui/Task/task-item-with-providers.js +1 -1
- package/dist/esm/plugins/type-ahead/ui/InputQuery.js +7 -0
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +1 -1
- package/dist/esm/ui/ConfigPanel/ConfigPanel.js +1 -1
- package/dist/esm/ui/ConfigPanel/Fields/CustomSelect.js +1 -1
- package/dist/esm/ui/ConfigPanel/Fields/UserSelect.js +1 -1
- package/dist/esm/ui/ConfigPanel/FormErrorBoundary.js +1 -1
- package/dist/esm/ui/ConfigPanel/transformers.js +1 -1
- package/dist/esm/ui/LinkSearch/index.js +1 -1
- package/dist/esm/ui/ToolbarFeedback/index.js +1 -1
- package/dist/esm/utils/action.js +1 -1
- package/dist/esm/utils/clipboard.js +1 -1
- package/dist/esm/utils/extensions.js +1 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/i18n/cs.d.ts +0 -22
- package/dist/types/i18n/da.d.ts +0 -22
- package/dist/types/i18n/de.d.ts +0 -22
- package/dist/types/i18n/es.d.ts +0 -22
- package/dist/types/i18n/et.d.ts +0 -22
- package/dist/types/i18n/fr.d.ts +0 -22
- package/dist/types/i18n/hu.d.ts +0 -22
- package/dist/types/i18n/is.d.ts +0 -22
- package/dist/types/i18n/it.d.ts +0 -22
- package/dist/types/i18n/ko.d.ts +0 -22
- package/dist/types/i18n/nb.d.ts +0 -8
- package/dist/types/i18n/nl.d.ts +0 -3
- package/dist/types/i18n/pl.d.ts +0 -1
- package/dist/types/i18n/pt_BR.d.ts +0 -7
- package/dist/types/i18n/pt_PT.d.ts +0 -10
- package/dist/types/i18n/ro.d.ts +0 -22
- package/dist/types/i18n/sk.d.ts +0 -22
- package/dist/types/i18n/sv.d.ts +0 -1
- package/dist/types/plugins/paste/handlers.d.ts +1 -1
- package/package.json +20 -20
- package/report.api.md +2698 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
4
|
import { collab } from 'prosemirror-collab';
|
|
5
5
|
import { createPlugin, pluginKey } from './plugin';
|
|
6
6
|
import { sendTransaction } from './events/send-transaction';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
4
3
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
5
4
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
6
5
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
6
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
7
7
|
import { utils } from '@atlaskit/util-service-support';
|
|
8
8
|
import { EventEmitter2 } from 'eventemitter2';
|
|
9
9
|
import { getVersion, sendableSteps } from 'prosemirror-collab';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
3
|
import { closeHistory } from 'prosemirror-history';
|
|
4
4
|
import { processRawValue } from '../../utils';
|
|
5
5
|
import { autoformatAction } from './utils';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
4
|
|
|
5
5
|
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; }
|
|
6
6
|
|
|
@@ -151,7 +151,7 @@ export var insertDate = function insertDate(date, inputMethod, commitMethod) {
|
|
|
151
151
|
timestamp: timestamp
|
|
152
152
|
}).setMeta(pluginKey, {
|
|
153
153
|
isNew: false
|
|
154
|
-
}).scrollIntoView();
|
|
154
|
+
}).scrollIntoView();
|
|
155
155
|
|
|
156
156
|
if (!enterPressed) {
|
|
157
157
|
tr = tr.setSelection(NodeSelection.create(tr.doc, showDatePickerAt));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
4
|
|
|
5
5
|
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; }
|
|
6
6
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
4
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
5
4
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
@@ -8,6 +7,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
8
7
|
|
|
9
8
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
10
9
|
|
|
10
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import { getExtensionKeyAndNodeKey } from '@atlaskit/editor-common/extensions';
|
|
13
13
|
import { getPluginState } from './pm-plugins/main';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
4
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
5
5
|
import { getExtensionModuleNode } from '@atlaskit/editor-common/extensions';
|
|
6
6
|
import { createSelectionClickHandler } from '../../selection/utils';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
@@ -7,6 +6,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
7
6
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
8
7
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
9
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
10
10
|
|
|
11
11
|
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); }; }
|
|
12
12
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
4
3
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
4
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
5
|
|
|
6
6
|
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; }
|
|
7
7
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
3
|
import getDeviceInfo from './getDeviceInfo';
|
|
4
4
|
import getBrowserInfo from './getBrowserInfo';
|
|
5
5
|
var JIRA_ISSUE_COLLECTOR_URL = 'https://product-fabric.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-T/-w0bwo4/b/14/e73395c53c3b10fde2303f4bf74ffbf6/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector-embededjs/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector-embededjs.js?locale=en-US&collectorId=98644b9c';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
5
|
import { createDecorations, findDecorationFromMatch } from './index';
|
|
6
6
|
import { getPluginState } from '../plugin'; // max number of decorations to apply at once
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
4
|
import React, { useEffect, useState } from 'react';
|
|
5
5
|
import Loadable from 'react-loadable';
|
|
6
6
|
import { getContextualToolbarItemsFromModule } from '@atlaskit/editor-common/extensions';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
@@ -7,6 +6,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
7
6
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
8
7
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
9
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
10
10
|
|
|
11
11
|
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); }; }
|
|
12
12
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
2
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
4
3
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
5
4
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
@@ -13,6 +12,8 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
13
12
|
|
|
14
13
|
var _templateObject, _templateObject2, _templateObject3;
|
|
15
14
|
|
|
15
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
16
|
+
|
|
16
17
|
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); }; }
|
|
17
18
|
|
|
18
19
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
4
|
|
|
5
5
|
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; }
|
|
6
6
|
|
|
@@ -12,4 +12,4 @@ import { TableCssClassName } from '../table/types';
|
|
|
12
12
|
import { tableMarginFullWidthMode } from '../table/ui/consts';
|
|
13
13
|
export var LAYOUT_SECTION_MARGIN = gridSize();
|
|
14
14
|
export var LAYOUT_COLUMN_PADDING = gridSize() * 1.5;
|
|
15
|
-
export var layoutStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n ", " [data-layout-section] {\n margin: ", "px -", "px 0;\n transition: border-color 0.3s ", ";\n cursor: pointer;\n\n /* Inner cursor located 26px from left */\n [data-layout-column] {\n flex: 1;\n min-width: 0;\n // TODO: https://product-fabric.atlassian.net/browse/DSP-4353\n border: ", "px solid\n ", ";\n border-radius: 4px;\n padding: ", "px;\n box-sizing: border-box;\n\n > div {\n >
|
|
15
|
+
export var layoutStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n ", " [data-layout-section] {\n margin: ", "px -", "px 0;\n transition: border-color 0.3s ", ";\n cursor: pointer;\n\n /* Inner cursor located 26px from left */\n [data-layout-column] {\n flex: 1;\n min-width: 0;\n // TODO: https://product-fabric.atlassian.net/browse/DSP-4353\n border: ", "px solid\n ", ";\n border-radius: 4px;\n padding: ", "px;\n box-sizing: border-box;\n\n > div {\n > :not(style):first-child,\n > style:first-child + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor.-right:first-of-type + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursord:first-of-type + span + * {\n margin-top: 0;\n }\n\n .rich-media-item {\n margin-top: 0;\n }\n\n > .mediaSingleView-content-wrap:first-of-type .rich-media-item {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor.-right:first-of-type\n + .mediaSingleView-content-wrap\n .rich-media-item {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-of-type\n + span\n + .mediaSingleView-content-wrap\n .rich-media-item {\n margin-top: 0;\n }\n\n /* Prevent first DecisionWrapper's margin-top: 8px from shifting decisions down\n and shrinking layout's node selectable area (leniency margin) */\n > [data-node-type='decisionList'] {\n li:first-of-type [data-decision-wrapper] {\n margin-top: 0;\n }\n }\n }\n\n /* Make the 'content' fill the entire height of the layout column to allow click\n handler of layout section nodeview to target only data-layout-column */\n [data-layout-content] {\n height: 100%;\n cursor: text;\n }\n }\n\n [data-layout-column] + [data-layout-column] {\n margin-left: ", "px;\n }\n\n @media screen and (max-width: ", "px) {\n [data-layout-column] + [data-layout-column] {\n margin-left: 0;\n }\n }\n\n // TODO: https://product-fabric.atlassian.net/browse/DSP-4441\n /* Shows the border when cursor is inside a layout */\n &.selected [data-layout-column],\n &:hover [data-layout-column] {\n border-color: ", ";\n }\n\n &.selected.danger > [data-layout-column] {\n background-color: ", ";\n border-color: ", ";\n }\n\n &.", ":not(.danger) {\n [data-layout-column] {\n ", "\n }\n }\n }\n }\n\n .fabric-editor--full-width-mode .ProseMirror {\n [data-layout-section] {\n .", " {\n margin: 0 ", "px;\n }\n }\n }\n"])), columnLayoutSharedStyle, gridSize() - 1, akLayoutGutterOffset, akEditorSwoopCubicBezier, akEditorSelectedBorderSize, token('color.border', N40A), LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN, gridMediumMaxWidth, token('color.border', N50A), token('color.background.danger', akEditorDeleteBackground), token('color.border.danger', akEditorDeleteBorder), akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.Border, SelectionStyle.Blanket]), TableCssClassName.TABLE_CONTAINER, tableMarginFullWidthMode);
|
|
@@ -3,4 +3,5 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
3
3
|
var _templateObject;
|
|
4
4
|
|
|
5
5
|
import { css } from '@emotion/react';
|
|
6
|
-
|
|
6
|
+
import { blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
|
|
7
|
+
export var listsStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror li {\n position: relative;\n\n > p:not(:first-child) {\n margin: 4px 0 0 0;\n }\n\n // In SSR the above rule will apply to all p tags because first-child would be a style tag.\n // The following rule resets the first p tag back to its original margin\n // defined in packages/editor/editor-common/src/styles/shared/paragraph.ts\n > style:first-child + p {\n margin-top: ", ";\n }\n }\n"])), blockNodesVerticalMargin);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
4
3
|
|
|
5
4
|
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; }
|
|
6
5
|
|
|
7
6
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8
7
|
|
|
8
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
9
9
|
import assert from 'assert';
|
|
10
10
|
import { Selection, NodeSelection, TextSelection } from 'prosemirror-state';
|
|
11
11
|
import { safeInsert, replaceSelectedNode, findSelectedNodeOfType, replaceParentNodeOfType } from 'prosemirror-utils';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
@@ -7,6 +6,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
7
6
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
8
7
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
9
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
10
10
|
|
|
11
11
|
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; }
|
|
12
12
|
|
|
@@ -5,7 +5,6 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
5
5
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
7
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
8
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
9
8
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
10
9
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
11
10
|
|
|
@@ -13,6 +12,8 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
13
12
|
|
|
14
13
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
15
14
|
|
|
15
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
16
|
+
|
|
16
17
|
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; }
|
|
17
18
|
|
|
18
19
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
5
4
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
5
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
6
6
|
import uuidV4 from 'uuid/v4';
|
|
7
7
|
import { DEFAULT_IMAGE_HEIGHT, DEFAULT_IMAGE_WIDTH } from '@atlaskit/editor-common/ui';
|
|
8
8
|
import { getMediaClient, isMediaBlobUrl as _isMediaBlobUrl, getAttrsFromUrl, isImageRepresentationReady } from '@atlaskit/media-client';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
@@ -7,6 +6,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
7
6
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
8
7
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
9
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
10
10
|
|
|
11
11
|
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); }; }
|
|
12
12
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _get from "@babel/runtime/helpers/get";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
3
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
5
4
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
6
5
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
@@ -9,6 +8,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
9
8
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
10
9
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
11
10
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
11
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
12
12
|
|
|
13
13
|
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; }
|
|
14
14
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
5
4
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
5
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
6
6
|
import { isImagePreview } from '@atlaskit/media-picker';
|
|
7
7
|
|
|
8
8
|
var PickerFacade = /*#__PURE__*/function () {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
@@ -14,6 +13,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
14
13
|
|
|
15
14
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16
15
|
|
|
16
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
17
17
|
import React from 'react';
|
|
18
18
|
import ReactDOM from 'react-dom';
|
|
19
19
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
3
|
import { getMediaClient } from '@atlaskit/media-client';
|
|
4
4
|
import { findParentNodeOfType, removeParentNodeOfType, removeSelectedNode } from 'prosemirror-utils';
|
|
5
5
|
export var getSelectedMediaContainerNodeAttrs = function getSelectedMediaContainerNodeAttrs(mediaPluginState) {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
@@ -7,6 +6,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
7
6
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
8
7
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
9
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
10
10
|
|
|
11
11
|
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); }; }
|
|
12
12
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
4
3
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
5
4
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
@@ -8,6 +7,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
8
7
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
9
8
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
10
9
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
10
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
11
11
|
|
|
12
12
|
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); }; }
|
|
13
13
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
3
|
import { getMediaClient } from '@atlaskit/media-client';
|
|
4
4
|
export var checkMediaType = /*#__PURE__*/function () {
|
|
5
5
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(mediaNode, mediaClientConfig) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
4
|
|
|
5
5
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
6
6
|
|
|
@@ -46,25 +46,39 @@ export function handleMention(slice, schema) {
|
|
|
46
46
|
return node;
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
-
export function
|
|
49
|
+
export function handlePasteIntoTaskOrDecisionOrPanel(slice) {
|
|
50
50
|
return function (state, dispatch) {
|
|
51
|
+
var _slice$content$firstC, _slice$content$firstC2, _transformedSlice$con;
|
|
52
|
+
|
|
51
53
|
var schema = state.schema,
|
|
52
54
|
selection = state.tr.selection;
|
|
53
55
|
var codeMark = schema.marks.code,
|
|
54
56
|
_schema$nodes = schema.nodes,
|
|
55
57
|
decisionItem = _schema$nodes.decisionItem,
|
|
56
|
-
decisionList = _schema$nodes.decisionList,
|
|
57
58
|
emoji = _schema$nodes.emoji,
|
|
58
59
|
hardBreak = _schema$nodes.hardBreak,
|
|
59
60
|
mention = _schema$nodes.mention,
|
|
60
61
|
paragraph = _schema$nodes.paragraph,
|
|
61
|
-
taskList = _schema$nodes.taskList,
|
|
62
62
|
taskItem = _schema$nodes.taskItem,
|
|
63
|
-
text = _schema$nodes.text
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
text = _schema$nodes.text,
|
|
64
|
+
panel = _schema$nodes.panel,
|
|
65
|
+
bulletList = _schema$nodes.bulletList,
|
|
66
|
+
orderedList = _schema$nodes.orderedList,
|
|
67
|
+
expand = _schema$nodes.expand,
|
|
68
|
+
heading = _schema$nodes.heading;
|
|
69
|
+
var selectionIsValidNode = state.selection instanceof NodeSelection && ['decisionList', 'decisionItem', 'taskList', 'taskItem'].includes(state.selection.node.type.name);
|
|
70
|
+
var selectionHasValidParentNode = hasParentNodeOfType([decisionItem, taskItem, panel])(state.selection);
|
|
71
|
+
var selectionIsPanel = hasParentNodeOfType([panel])(state.selection); // Some types of content should be handled by the default handler, not this function.
|
|
72
|
+
|
|
73
|
+
var sliceFirstNodeType = (_slice$content$firstC = slice.content.firstChild) === null || _slice$content$firstC === void 0 ? void 0 : _slice$content$firstC.type;
|
|
74
|
+
var sliceIsInvalid = sliceFirstNodeType === bulletList || sliceFirstNodeType === orderedList || sliceFirstNodeType === expand || sliceFirstNodeType === heading; // If the selection is a panel,
|
|
75
|
+
// and the slice's first node is a paragraph
|
|
76
|
+
// and it is not from a depth that would indicate it being from inside from another node (e.g. text from a decision)
|
|
77
|
+
// then we can rely on the default behaviour.
|
|
78
|
+
|
|
79
|
+
var sliceIsAPanelReceivingLowDepthText = selectionIsPanel && ((_slice$content$firstC2 = slice.content.firstChild) === null || _slice$content$firstC2 === void 0 ? void 0 : _slice$content$firstC2.type) === paragraph && slice.openEnd < 2;
|
|
80
|
+
|
|
81
|
+
if (sliceIsInvalid || sliceIsAPanelReceivingLowDepthText || !selectionIsValidNode && !selectionHasValidParentNode) {
|
|
68
82
|
return false;
|
|
69
83
|
}
|
|
70
84
|
|
|
@@ -79,11 +93,15 @@ export function handlePasteIntoTaskAndDecision(slice) {
|
|
|
79
93
|
|
|
80
94
|
var transformedSlice = compose.apply(null, filters)(slice);
|
|
81
95
|
var tr = closeHistory(state.tr);
|
|
82
|
-
var transformedSliceIsValidNode = transformedSlice.content.firstChild.type.inlineContent || ['decisionList', 'decisionItem', 'taskList', 'taskItem'].includes(transformedSlice.content.firstChild.type.name);
|
|
96
|
+
var transformedSliceIsValidNode = transformedSlice.content.firstChild.type.inlineContent || ['decisionList', 'decisionItem', 'taskList', 'taskItem', 'panel'].includes(transformedSlice.content.firstChild.type.name); // If the slice or the selection are valid nodes to handle,
|
|
97
|
+
// and the slice is not a whole node (i.e. openStart is 1 and openEnd is 0)
|
|
98
|
+
// or the slice's first node is a paragraph,
|
|
99
|
+
// then we can replace the selection with our slice.
|
|
83
100
|
|
|
84
|
-
if (transformedSliceIsValidNode ||
|
|
101
|
+
if ((transformedSliceIsValidNode || selectionIsValidNode) && !(transformedSlice.openStart === 1 && transformedSlice.openEnd === 0) || ((_transformedSlice$con = transformedSlice.content.firstChild) === null || _transformedSlice$con === void 0 ? void 0 : _transformedSlice$con.type) === paragraph) {
|
|
85
102
|
tr.replaceSelection(transformedSlice).scrollIntoView();
|
|
86
103
|
} else {
|
|
104
|
+
// This maintains both the selection (destination) and the slice (paste content).
|
|
87
105
|
safeInsert(transformedSlice.content)(tr).scrollIntoView();
|
|
88
106
|
}
|
|
89
107
|
|
|
@@ -406,13 +424,22 @@ export function handleMediaSingle(inputMethod) {
|
|
|
406
424
|
};
|
|
407
425
|
};
|
|
408
426
|
}
|
|
427
|
+
|
|
428
|
+
var checkExpand = function checkExpand(slice) {
|
|
429
|
+
var hasExpand = false;
|
|
430
|
+
slice.content.forEach(function (node) {
|
|
431
|
+
if (node.type.name === 'expand') {
|
|
432
|
+
hasExpand = true;
|
|
433
|
+
}
|
|
434
|
+
});
|
|
435
|
+
return hasExpand;
|
|
436
|
+
};
|
|
437
|
+
|
|
409
438
|
export function handleExpandPasteInTable(slice) {
|
|
410
439
|
return function (state, dispatch) {
|
|
411
|
-
var _slice$content$firstC;
|
|
412
|
-
|
|
413
440
|
// Do not handle expand if it's not being pasted into a table
|
|
414
441
|
// OR if it's nested within another node when being pasted into a table
|
|
415
|
-
if (!insideTable(state) || (
|
|
442
|
+
if (!insideTable(state) || !checkExpand(slice)) {
|
|
416
443
|
return false;
|
|
417
444
|
}
|
|
418
445
|
|
|
@@ -7,7 +7,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
7
7
|
|
|
8
8
|
import { ACTION, INPUT_METHOD, EVENT_TYPE, ACTION_SUBJECT, ACTION_SUBJECT_ID, addAnalytics, PasteTypes, PasteContents, withAnalytics } from '../../analytics';
|
|
9
9
|
import { getPasteSource } from '../util';
|
|
10
|
-
import { handlePasteAsPlainText,
|
|
10
|
+
import { handlePasteAsPlainText, handlePasteIntoTaskOrDecisionOrPanel, handleCodeBlock, handleMediaSingle, handlePastePreservingMarks, handleMarkdown, handleRichText, handleExpandPasteInTable, handleSelectedTable, handlePasteLinkOnSelectedText, handlePasteIntoCaption } from '../handlers';
|
|
11
11
|
import { pipe } from '../../../utils';
|
|
12
12
|
import { findParentNode } from 'prosemirror-utils';
|
|
13
13
|
import { mapSlice } from '../../../utils/slice';
|
|
@@ -218,7 +218,7 @@ export var handlePasteAsPlainTextWithAnalytics = function handlePasteAsPlainText
|
|
|
218
218
|
}))(slice, event);
|
|
219
219
|
};
|
|
220
220
|
export var handlePasteIntoTaskAndDecisionWithAnalytics = function handlePasteIntoTaskAndDecisionWithAnalytics(view, event, slice, type) {
|
|
221
|
-
return pipe(
|
|
221
|
+
return pipe(handlePasteIntoTaskOrDecisionOrPanel, pasteCommandWithAnalytics(view, event, slice, {
|
|
222
222
|
type: type
|
|
223
223
|
}))(slice);
|
|
224
224
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
3
|
import { Slice, Fragment } from 'prosemirror-model';
|
|
4
4
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
5
5
|
import { PluginKey } from 'prosemirror-state';
|
|
@@ -318,6 +318,22 @@ export function createPlugin(schema, dispatchAnalyticsEvent, plainTextPasteLinki
|
|
|
318
318
|
|
|
319
319
|
if (handlePastePreservingMarksWithAnalytics(view, event, slice, PasteTypes.richText)(state, dispatch)) {
|
|
320
320
|
return true;
|
|
321
|
+
} // Check that we are pasting in a location that does not accept
|
|
322
|
+
// breakout marks, if so we strip the mark and paste. Note that
|
|
323
|
+
// breakout marks are only valid in the root document.
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
if (selectionParentType !== state.schema.nodes.doc) {
|
|
327
|
+
var sliceCopy = Slice.fromJSON(state.schema, slice.toJSON() || {});
|
|
328
|
+
sliceCopy.content.descendants(function (node) {
|
|
329
|
+
node.marks = node.marks.filter(function (mark) {
|
|
330
|
+
return mark.type.name !== 'breakout';
|
|
331
|
+
}); // as breakout marks should only be on top level nodes,
|
|
332
|
+
// we don't traverse the entire document
|
|
333
|
+
|
|
334
|
+
return false;
|
|
335
|
+
});
|
|
336
|
+
slice = sliceCopy;
|
|
321
337
|
}
|
|
322
338
|
|
|
323
339
|
if (handleExpandWithAnalytics(view, event, slice)(state, dispatch)) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
4
|
|
|
5
5
|
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; }
|
|
6
6
|
|
|
@@ -31,7 +31,9 @@ export function find(query, items) {
|
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
return fuse.search(query)
|
|
34
|
+
return fuse.search(query).map(function (result) {
|
|
35
|
+
return result.item;
|
|
36
|
+
});
|
|
35
37
|
}
|
|
36
38
|
export var searchQuickInsertItems = function searchQuickInsertItems(quickInsertState, options) {
|
|
37
39
|
return function (query, category) {
|