@atlaskit/editor-core 203.2.8 → 203.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/dist/cjs/CollapsedEditor/index.js +6 -9
- package/dist/cjs/actions/index.js +1 -2
- package/dist/cjs/create-editor/ErrorBoundary.js +10 -13
- package/dist/cjs/create-editor/ReactEditorView.js +25 -28
- package/dist/cjs/editor.js +5 -7
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +7 -6
- package/dist/cjs/ui/Addon/ClickAreaMobile/index.js +7 -10
- package/dist/cjs/ui/Addon/Dropdown/index.js +6 -9
- package/dist/cjs/ui/Appearance/Chromeless.js +8 -11
- package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +6 -5
- package/dist/cjs/ui/ChromeCollapsed/index.js +7 -10
- package/dist/cjs/ui/ChromeCollapsed/styles.js +1 -1
- package/dist/cjs/ui/CollapsedEditor/index.js +6 -9
- package/dist/cjs/ui/ContentStyles/ai-panels.js +6 -6
- package/dist/cjs/ui/ContentStyles/layout.js +10 -4
- package/dist/cjs/ui/ContextPanel/index.js +9 -12
- package/dist/cjs/ui/EditorContext/index.js +8 -12
- package/dist/cjs/ui/ErrorBoundary/index.js +6 -9
- package/dist/cjs/ui/PluginSlot/index.js +9 -12
- package/dist/cjs/ui/Toolbar/ToolbarInner.js +5 -7
- package/dist/cjs/ui/WithEditorActions/index.js +12 -19
- package/dist/cjs/ui/WithFlash/index.js +6 -9
- package/dist/cjs/ui/WithHelpTrigger/index.js +6 -9
- package/dist/cjs/utils/performance/plugin-performance-observer.js +1 -2
- package/dist/cjs/utils/performance/plugin-performance-report.js +1 -2
- package/dist/cjs/utils/performance/track-transactions.js +1 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/ChromeCollapsed/styles.js +1 -1
- package/dist/es2019/ui/ContentStyles/layout.js +68 -26
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/CollapsedEditor/index.js +6 -9
- package/dist/esm/actions/index.js +1 -2
- package/dist/esm/create-editor/ErrorBoundary.js +10 -13
- package/dist/esm/create-editor/ReactEditorView.js +25 -28
- package/dist/esm/editor.js +5 -7
- package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +5 -6
- package/dist/esm/ui/Addon/ClickAreaMobile/index.js +7 -10
- package/dist/esm/ui/Addon/Dropdown/index.js +6 -9
- package/dist/esm/ui/Appearance/Chromeless.js +8 -11
- package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +4 -5
- package/dist/esm/ui/ChromeCollapsed/index.js +7 -10
- package/dist/esm/ui/ChromeCollapsed/styles.js +1 -1
- package/dist/esm/ui/CollapsedEditor/index.js +6 -9
- package/dist/esm/ui/ContentStyles/ai-panels.js +6 -6
- package/dist/esm/ui/ContentStyles/layout.js +10 -4
- package/dist/esm/ui/ContextPanel/index.js +9 -12
- package/dist/esm/ui/EditorContext/index.js +8 -12
- package/dist/esm/ui/ErrorBoundary/index.js +6 -9
- package/dist/esm/ui/PluginSlot/index.js +9 -12
- package/dist/esm/ui/Toolbar/ToolbarInner.js +5 -7
- package/dist/esm/ui/WithEditorActions/index.js +12 -19
- package/dist/esm/ui/WithFlash/index.js +6 -9
- package/dist/esm/ui/WithHelpTrigger/index.js +6 -9
- package/dist/esm/utils/performance/plugin-performance-observer.js +1 -2
- package/dist/esm/utils/performance/plugin-performance-report.js +1 -2
- package/dist/esm/utils/performance/track-transactions.js +1 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/create-editor/create-universal-preset.d.ts +132 -11
- package/dist/types/presets/default.d.ts +72 -6
- package/dist/types/presets/universal.d.ts +132 -11
- package/dist/types/presets/useUniversalPreset.d.ts +132 -11
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +2 -2
- package/dist/types/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +143 -0
- package/dist/types-ts4.5/presets/default.d.ts +78 -0
- package/dist/types-ts4.5/presets/universal.d.ts +143 -0
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +143 -0
- package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +2 -2
- package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +2 -2
- package/package.json +7 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13;
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14;
|
|
3
3
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
4
|
import { css } from '@emotion/react';
|
|
5
5
|
import { columnLayoutResponsiveSharedStyle, columnLayoutSharedStyle, LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN } from '@atlaskit/editor-common/styles';
|
|
@@ -47,15 +47,21 @@ var layoutWithSeparatorBorderResponsiveStyles = function layoutWithSeparatorBord
|
|
|
47
47
|
|
|
48
48
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
49
49
|
var layoutWithSeparatorBorderStyles = function layoutWithSeparatorBorderStyles(viewMode) {
|
|
50
|
-
|
|
50
|
+
if (fg('platform_editor_advanced_layouts_post_fix_patch_1')) {
|
|
51
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
52
|
+
return css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n\t\t\t&.selected [data-layout-column]:not(:first-of-type),\n\t\t\t[data-empty-layout='true'] [data-layout-column]:not(:first-of-type),\n\t\t\t&:hover [data-layout-column]:not(:first-of-type) {\n\t\t\t\t", "\n\t\t\t}\n\n\t\t\t&.selected.danger [data-layout-section] {\n\t\t\t\tbackground-color: ", ";\n\n\t\t\t\tbox-shadow: 0 0 0 ", "px\n\t\t\t\t\t", ";\n\t\t\t\tborder-radius: 4px;\n\t\t\t\t[data-layout-column]:not(:first-of-type) {\n\t\t\t\t\t", "\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&.", ":not(.danger) [data-layout-section] {\n\t\t\t\tbox-shadow: 0 0 0 ", "px\n\t\t\t\t\t", ";\n\t\t\t\tborder-radius: 4px;\n\t\t\t\tbackground-color: ", ";\n\t\t\t\t[data-layout-column] {\n\t\t\t\t\t", "\n\t\t\t\t\tborder: 0px;\n\t\t\t\t\t::before {\n\t\t\t\t\t\tbackground-color: transparent;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t[data-layout-column]:not(:first-of-type) {\n\t\t\t\t\t", "\n\t\t\t\t}\n\t\t\t}\n\t\t"])), columnSeparatorStyles(viewMode), "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), viewMode === 'view' ? 0 : akEditorSelectedBorderSize, akEditorDeleteBorder, columnSeparatorStyles(viewMode), akEditorSelectedNodeClassName, viewMode === 'view' ? 0 : akEditorSelectedBorderSize, "var(--ds-border-selected, #0C66E4)", "var(--ds-background-selected, #E9F2FF)", getSelectionStyles([SelectionStyle.Blanket]), columnSeparatorStyles(viewMode));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
56
|
+
return css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n\t\t&.selected [data-layout-column]:not(:first-of-type),\n\t\t&:hover [data-layout-column]:not(:first-of-type) {\n\t\t\t", "\n\t\t}\n\n\t\t&.selected.danger [data-layout-section] {\n\t\t\tbackground-color: ", ";\n\n\t\t\tbox-shadow: 0 0 0 ", "px\n\t\t\t\t", ";\n\t\t\tborder-radius: 4px;\n\t\t\t[data-layout-column]:not(:first-of-type) {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t&.", ":not(.danger) [data-layout-section] {\n\t\t\tbox-shadow: 0 0 0 ", "px\n\t\t\t\t", ";\n\t\t\tborder-radius: 4px;\n\t\t\tbackground-color: ", ";\n\t\t\t[data-layout-column] {\n\t\t\t\t", "\n\t\t\t\tborder: 0px;\n\t\t\t\t::before {\n\t\t\t\t\tbackground-color: transparent;\n\t\t\t\t}\n\t\t\t}\n\t\t\t[data-layout-column]:not(:first-of-type) {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\t"])), columnSeparatorStyles(viewMode), "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), viewMode === 'view' ? 0 : akEditorSelectedBorderSize, akEditorDeleteBorder, columnSeparatorStyles(viewMode), akEditorSelectedNodeClassName, viewMode === 'view' ? 0 : akEditorSelectedBorderSize, "var(--ds-border-selected, #0C66E4)", "var(--ds-background-selected, #E9F2FF)", getSelectionStyles([SelectionStyle.Blanket]), columnSeparatorStyles(viewMode));
|
|
51
57
|
};
|
|
52
58
|
var layoutResponsiveStyles = function layoutResponsiveStyles(viewMode) {
|
|
53
59
|
return (// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
54
|
-
css(
|
|
60
|
+
css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n\t\t/* chosen breakpoints in container queries are to make sure layout responsiveness in editor aligns with renderer */\n\t\t/* not resized layout in full-width editor */\n\t\t.fabric-editor--full-width-mode .ProseMirror {\n\t\t\t> .layoutSectionView-content-wrap {\n\t\t\t\t[data-layout-section] {\n\t\t\t\t\t@container editor-area (max-width:724px) {\n\t\t\t\t\t\tflex-direction: column;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t/* not resized layout in fixed-width editor */\n\t\t.ak-editor-content-area:not(.fabric-editor--full-width-mode) .ProseMirror {\n\t\t\t> .layoutSectionView-content-wrap {\n\t\t\t\t[data-layout-section] {\n\t\t\t\t\t@container editor-area (max-width:788px) {\n\t\t\t\t\t\tflex-direction: column;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t/* resized layout in full/fixed-width editor */\n\t\t.ProseMirror .fabric-editor-breakout-mark {\n\t\t\t.layoutSectionView-content-wrap {\n\t\t\t\t[data-layout-section] {\n\t\t\t\t\t@container editor-area (max-width:820px) {\n\t\t\t\t\t\tflex-direction: column;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\t"])), layoutWithSeparatorBorderResponsiveStyles(724, viewMode), layoutWithSeparatorBorderResponsiveStyles(788, viewMode), layoutWithSeparatorBorderResponsiveStyles(820, viewMode))
|
|
55
61
|
);
|
|
56
62
|
};
|
|
57
63
|
|
|
58
64
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
59
65
|
export var layoutStyles = function layoutStyles(viewMode) {
|
|
60
|
-
return css(
|
|
66
|
+
return css(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n\t.ProseMirror {\n\t\t", "\n\t\t[data-layout-section] {\n\t\t\t// TODO: Migrate away from gridSize\n\t\t\t// Recommendation: Replace directly with 7px\n\t\t\tmargin: ", " -", "px 0;\n\t\t\ttransition: border-color 0.3s ", ";\n\t\t\tcursor: ", ";\n\n\t\t\t/* Inner cursor located 26px from left */\n\t\t\t[data-layout-column] {\n\t\t\t\tflex: 1;\n\t\t\t\t", "\n\n\t\t\t\tmin-width: 0;\n\t\t\t\t/* disable 4 borders when in view mode and advanced layouts is on */\n\t\t\t\tborder: ", "px\n\t\t\t\t\tsolid ", ";\n\t\t\t\tborder-radius: 4px;\n\t\t\t\tpadding: ", "px\n\t\t\t\t\t", "px;\n\t\t\t\tbox-sizing: border-box;\n\n\t\t\t\t> div {\n\t\t\t\t\t", "\n\n\t\t\t\t\t> .embedCardView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .mediaSingleView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-child\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor.-right\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-of-type\n\t\t\t\t\t\t+ .embedCardView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor:first-child\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Prevent first DecisionWrapper's margin-top: 8px from shifting decisions down\n and shrinking layout's node selectable area (leniency margin) */\n\t\t\t\t\t> [data-node-type='decisionList'] {\n\t\t\t\t\t\tli:first-of-type [data-decision-wrapper] {\n\t\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/* 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\t\t\t\t[data-layout-content] {\n\t\t\t\t\theight: 100%;\n\t\t\t\t\tcursor: text;\n\t\t\t\t\t.mediaGroupView-content-wrap {\n\t\t\t\t\t\tclear: both;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t", "\n\t\t}\n\n\t\t// styles to support borders for layout\n\t\t[data-layout-section],\n\t\t.layoutSectionView-content-wrap {\n\t\t\t", "\n\t\t}\n\t}\n\n\t", "\n\n\t// hide separator when element is dragging on top of a layout column\n\t[data-blocks-drop-target-container] ~ [data-layout-column] > [data-layout-content]::before {\n\t\tdisplay: none;\n\t}\n\n\t.fabric-editor--full-width-mode .ProseMirror {\n\t\t[data-layout-section] {\n\t\t\t.", " {\n\t\t\t\tmargin: 0 ", "px;\n\t\t\t}\n\t\t}\n\t}\n\n\t", "\n"])), layoutSectionStyles(), "var(--ds-space-100, 8px)", akLayoutGutterOffset, akEditorSwoopCubicBezier, viewMode === 'view' ? 'default' : 'pointer', fg('platform_editor_drag_and_drop_target_v2') ? 'position: relative;' : '', viewMode === 'view' || editorExperiment('advanced_layouts', true) ? 0 : akEditorSelectedBorderSize, "var(--ds-border, #091E4224)", LAYOUT_COLUMN_PADDING, LAYOUT_COLUMN_PADDING + (editorExperiment('nested-dnd', true) ? 8 : 0), firstNodeWithNotMarginTop(), layoutColumnStyles(), editorExperiment('advanced_layouts', true) ? layoutWithSeparatorBorderStyles(viewMode) : layoutBorderStyles(viewMode), editorExperiment('advanced_layouts', true) && layoutResponsiveStyles(viewMode), TableCssClassName.TABLE_CONTAINER, tableMarginFullWidthMode, editorExperiment('nested-dnd', true) && editorExperiment('advanced_layouts', false) && ".ak-editor-content-area.appearance-full-page .ProseMirror [data-layout-section] {\n\t\t\t\tmargin: ".concat("var(--ds-space-100, 8px)", " -", akLayoutGutterOffset + 8, "px 0;\n\t\t\t\t}"));
|
|
61
67
|
};
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
8
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
8
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10
9
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11
|
-
function
|
|
10
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
12
11
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
13
12
|
/**
|
|
14
13
|
* @jsxRuntime classic
|
|
@@ -50,27 +49,25 @@ export var content = css({
|
|
|
50
49
|
overflowY: 'auto'
|
|
51
50
|
});
|
|
52
51
|
export var SwappableContentArea = /*#__PURE__*/function (_React$PureComponent) {
|
|
53
|
-
_inherits(SwappableContentArea, _React$PureComponent);
|
|
54
|
-
var _super = _createSuper(SwappableContentArea);
|
|
55
52
|
function SwappableContentArea() {
|
|
56
53
|
var _this;
|
|
57
54
|
_classCallCheck(this, SwappableContentArea);
|
|
58
55
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
59
56
|
args[_key] = arguments[_key];
|
|
60
57
|
}
|
|
61
|
-
_this =
|
|
62
|
-
_defineProperty(
|
|
58
|
+
_this = _callSuper(this, SwappableContentArea, [].concat(args));
|
|
59
|
+
_defineProperty(_this, "state", {
|
|
63
60
|
mounted: false,
|
|
64
61
|
currentPluginContent: undefined
|
|
65
62
|
});
|
|
66
|
-
_defineProperty(
|
|
63
|
+
_defineProperty(_this, "focusEditor", function () {
|
|
67
64
|
var _editorAPI$core;
|
|
68
65
|
var editorAPI = _this.props.editorAPI;
|
|
69
66
|
editorAPI === null || editorAPI === void 0 || (_editorAPI$core = editorAPI.core) === null || _editorAPI$core === void 0 || _editorAPI$core.actions.focus({
|
|
70
67
|
scrollIntoView: false
|
|
71
68
|
});
|
|
72
69
|
});
|
|
73
|
-
_defineProperty(
|
|
70
|
+
_defineProperty(_this, "showPluginContent", function () {
|
|
74
71
|
var pluginContent = _this.props.pluginContent;
|
|
75
72
|
var currentPluginContent = _this.state.currentPluginContent;
|
|
76
73
|
if (!currentPluginContent) {
|
|
@@ -86,7 +83,7 @@ export var SwappableContentArea = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
86
83
|
}
|
|
87
84
|
}, currentPluginContent);
|
|
88
85
|
});
|
|
89
|
-
_defineProperty(
|
|
86
|
+
_defineProperty(_this, "showProvidedContent", function (isVisible) {
|
|
90
87
|
var children = _this.props.children;
|
|
91
88
|
if (!children) {
|
|
92
89
|
return;
|
|
@@ -101,7 +98,8 @@ export var SwappableContentArea = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
101
98
|
});
|
|
102
99
|
return _this;
|
|
103
100
|
}
|
|
104
|
-
|
|
101
|
+
_inherits(SwappableContentArea, _React$PureComponent);
|
|
102
|
+
return _createClass(SwappableContentArea, [{
|
|
105
103
|
key: "unsetPluginContent",
|
|
106
104
|
value: function unsetPluginContent() {
|
|
107
105
|
this.setState({
|
|
@@ -149,7 +147,6 @@ export var SwappableContentArea = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
149
147
|
return null;
|
|
150
148
|
}
|
|
151
149
|
}]);
|
|
152
|
-
return SwappableContentArea;
|
|
153
150
|
}(React.PureComponent);
|
|
154
151
|
export function ContextPanel(props) {
|
|
155
152
|
var _contextPanelState$co;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
|
-
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
8
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
@@ -15,13 +15,12 @@ export var useEditorContext = function useEditorContext() {
|
|
|
15
15
|
return React.useContext(EditorContext);
|
|
16
16
|
};
|
|
17
17
|
export var LegacyEditorContext = /*#__PURE__*/function (_React$Component) {
|
|
18
|
-
_inherits(LegacyEditorContext, _React$Component);
|
|
19
|
-
var _super = _createSuper(LegacyEditorContext);
|
|
20
18
|
function LegacyEditorContext(props) {
|
|
21
19
|
_classCallCheck(this, LegacyEditorContext);
|
|
22
|
-
return
|
|
20
|
+
return _callSuper(this, LegacyEditorContext, [props]);
|
|
23
21
|
}
|
|
24
|
-
|
|
22
|
+
_inherits(LegacyEditorContext, _React$Component);
|
|
23
|
+
return _createClass(LegacyEditorContext, [{
|
|
25
24
|
key: "render",
|
|
26
25
|
value: function render() {
|
|
27
26
|
if (fg('platform_editor_react18_phase2_v2')) {
|
|
@@ -30,7 +29,6 @@ export var LegacyEditorContext = /*#__PURE__*/function (_React$Component) {
|
|
|
30
29
|
return /*#__PURE__*/React.createElement(LegacyEditorContextOld, this.props, this.props.children);
|
|
31
30
|
}
|
|
32
31
|
}]);
|
|
33
|
-
return LegacyEditorContext;
|
|
34
32
|
}(React.Component);
|
|
35
33
|
function LegacyEditorContextNew(_ref) {
|
|
36
34
|
var children = _ref.children,
|
|
@@ -42,16 +40,15 @@ function LegacyEditorContextNew(_ref) {
|
|
|
42
40
|
}, children);
|
|
43
41
|
}
|
|
44
42
|
var LegacyEditorContextOld = /*#__PURE__*/function (_React$Component2) {
|
|
45
|
-
_inherits(LegacyEditorContextOld, _React$Component2);
|
|
46
|
-
var _super2 = _createSuper(LegacyEditorContextOld);
|
|
47
43
|
function LegacyEditorContextOld(props) {
|
|
48
44
|
var _this;
|
|
49
45
|
_classCallCheck(this, LegacyEditorContextOld);
|
|
50
|
-
_this =
|
|
46
|
+
_this = _callSuper(this, LegacyEditorContextOld, [props]);
|
|
51
47
|
_this.editorActions = props.editorActions || new EditorActions();
|
|
52
48
|
return _this;
|
|
53
49
|
}
|
|
54
|
-
|
|
50
|
+
_inherits(LegacyEditorContextOld, _React$Component2);
|
|
51
|
+
return _createClass(LegacyEditorContextOld, [{
|
|
55
52
|
key: "getChildContext",
|
|
56
53
|
value: function getChildContext() {
|
|
57
54
|
return {
|
|
@@ -66,7 +63,6 @@ var LegacyEditorContextOld = /*#__PURE__*/function (_React$Component2) {
|
|
|
66
63
|
}, this.props.children);
|
|
67
64
|
}
|
|
68
65
|
}]);
|
|
69
|
-
return LegacyEditorContextOld;
|
|
70
66
|
}(React.Component);
|
|
71
67
|
_defineProperty(LegacyEditorContextOld, "childContextTypes", {
|
|
72
68
|
editorActions: PropTypes.object
|
|
@@ -1,31 +1,29 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
9
|
import React from 'react';
|
|
11
10
|
import { ACTION, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
12
11
|
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
13
12
|
export var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
14
|
-
_inherits(ErrorBoundary, _React$Component);
|
|
15
|
-
var _super = _createSuper(ErrorBoundary);
|
|
16
13
|
function ErrorBoundary() {
|
|
17
14
|
var _this;
|
|
18
15
|
_classCallCheck(this, ErrorBoundary);
|
|
19
16
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
20
17
|
args[_key] = arguments[_key];
|
|
21
18
|
}
|
|
22
|
-
_this =
|
|
23
|
-
_defineProperty(
|
|
19
|
+
_this = _callSuper(this, ErrorBoundary, [].concat(args));
|
|
20
|
+
_defineProperty(_this, "state", {
|
|
24
21
|
errorCaptured: false
|
|
25
22
|
});
|
|
26
23
|
return _this;
|
|
27
24
|
}
|
|
28
|
-
|
|
25
|
+
_inherits(ErrorBoundary, _React$Component);
|
|
26
|
+
return _createClass(ErrorBoundary, [{
|
|
29
27
|
key: "hasFallback",
|
|
30
28
|
value: function hasFallback() {
|
|
31
29
|
return typeof this.props.fallbackComponent !== 'undefined';
|
|
@@ -69,5 +67,4 @@ export var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
69
67
|
return this.props.children;
|
|
70
68
|
}
|
|
71
69
|
}]);
|
|
72
|
-
return ErrorBoundary;
|
|
73
70
|
}(React.Component);
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
9
|
/**
|
|
11
10
|
* @jsxRuntime classic
|
|
@@ -25,29 +24,27 @@ var pluginsComponentsWrapper = css({
|
|
|
25
24
|
display: 'flex'
|
|
26
25
|
});
|
|
27
26
|
var PluginSlotLegacy = /*#__PURE__*/function (_React$Component) {
|
|
28
|
-
_inherits(PluginSlotLegacy, _React$Component);
|
|
29
|
-
var _super = _createSuper(PluginSlotLegacy);
|
|
30
27
|
function PluginSlotLegacy() {
|
|
31
28
|
var _this;
|
|
32
29
|
_classCallCheck(this, PluginSlotLegacy);
|
|
33
30
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
34
31
|
args[_key] = arguments[_key];
|
|
35
32
|
}
|
|
36
|
-
_this =
|
|
37
|
-
_defineProperty(
|
|
38
|
-
_defineProperty(
|
|
33
|
+
_this = _callSuper(this, PluginSlotLegacy, [].concat(args));
|
|
34
|
+
_defineProperty(_this, "transitionEvent", whichTransitionEvent());
|
|
35
|
+
_defineProperty(_this, "forceComponentUpdate", function (event) {
|
|
39
36
|
// Only trigger an update if the transition is on a property containing `width`
|
|
40
37
|
// This will cater for media and the content area itself currently.
|
|
41
38
|
if (event.propertyName.includes('width')) {
|
|
42
39
|
_this.forceUpdate();
|
|
43
40
|
}
|
|
44
41
|
});
|
|
45
|
-
_defineProperty(
|
|
42
|
+
_defineProperty(_this, "removeModeChangeListener", function (contentArea) {
|
|
46
43
|
if (contentArea && _this.transitionEvent) {
|
|
47
44
|
contentArea.removeEventListener(_this.transitionEvent, _this.forceComponentUpdate);
|
|
48
45
|
}
|
|
49
46
|
});
|
|
50
|
-
_defineProperty(
|
|
47
|
+
_defineProperty(_this, "addModeChangeListener", function (contentArea) {
|
|
51
48
|
if (contentArea && _this.transitionEvent) {
|
|
52
49
|
/**
|
|
53
50
|
* Update the plugin components once the transition
|
|
@@ -58,7 +55,8 @@ var PluginSlotLegacy = /*#__PURE__*/function (_React$Component) {
|
|
|
58
55
|
});
|
|
59
56
|
return _this;
|
|
60
57
|
}
|
|
61
|
-
|
|
58
|
+
_inherits(PluginSlotLegacy, _React$Component);
|
|
59
|
+
return _createClass(PluginSlotLegacy, [{
|
|
62
60
|
key: "shouldComponentUpdate",
|
|
63
61
|
value: function shouldComponentUpdate(nextProps) {
|
|
64
62
|
var _this$props = this.props,
|
|
@@ -145,7 +143,6 @@ var PluginSlotLegacy = /*#__PURE__*/function (_React$Component) {
|
|
|
145
143
|
})));
|
|
146
144
|
}
|
|
147
145
|
}]);
|
|
148
|
-
return PluginSlotLegacy;
|
|
149
146
|
}(React.Component);
|
|
150
147
|
_defineProperty(PluginSlotLegacy, "displayName", 'PluginSlot');
|
|
151
148
|
var PluginSlot = function PluginSlot(_ref) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
|
-
function
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
8
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
9
|
/**
|
|
10
10
|
* @jsxRuntime classic
|
|
@@ -23,13 +23,12 @@ var toolbarComponentsWrapper = css(_defineProperty({
|
|
|
23
23
|
justifyContent: 'space-between'
|
|
24
24
|
}));
|
|
25
25
|
export var ToolbarInner = /*#__PURE__*/function (_React$Component) {
|
|
26
|
-
_inherits(ToolbarInner, _React$Component);
|
|
27
|
-
var _super = _createSuper(ToolbarInner);
|
|
28
26
|
function ToolbarInner() {
|
|
29
27
|
_classCallCheck(this, ToolbarInner);
|
|
30
|
-
return
|
|
28
|
+
return _callSuper(this, ToolbarInner, arguments);
|
|
31
29
|
}
|
|
32
|
-
|
|
30
|
+
_inherits(ToolbarInner, _React$Component);
|
|
31
|
+
return _createClass(ToolbarInner, [{
|
|
33
32
|
key: "shouldComponentUpdate",
|
|
34
33
|
value: function shouldComponentUpdate(nextProps) {
|
|
35
34
|
return !isEqual(nextProps, this.props);
|
|
@@ -87,5 +86,4 @@ export var ToolbarInner = /*#__PURE__*/function (_React$Component) {
|
|
|
87
86
|
}));
|
|
88
87
|
}
|
|
89
88
|
}]);
|
|
90
|
-
return ToolbarInner;
|
|
91
89
|
}(React.Component);
|
|
@@ -1,24 +1,22 @@
|
|
|
1
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
2
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
|
-
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
9
|
import React from 'react';
|
|
11
10
|
import PropTypes from 'prop-types';
|
|
12
11
|
import { EditorContext } from '@atlaskit/editor-common/UNSAFE_do_not_use_editor_context';
|
|
13
12
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
13
|
var WithEditorActions = /*#__PURE__*/function (_React$Component) {
|
|
15
|
-
_inherits(WithEditorActions, _React$Component);
|
|
16
|
-
var _super = _createSuper(WithEditorActions);
|
|
17
14
|
function WithEditorActions(props) {
|
|
18
15
|
_classCallCheck(this, WithEditorActions);
|
|
19
|
-
return
|
|
16
|
+
return _callSuper(this, WithEditorActions, [props]);
|
|
20
17
|
}
|
|
21
|
-
|
|
18
|
+
_inherits(WithEditorActions, _React$Component);
|
|
19
|
+
return _createClass(WithEditorActions, [{
|
|
22
20
|
key: "render",
|
|
23
21
|
value: function render() {
|
|
24
22
|
if (fg('platform_editor_react18_phase2_v2')) {
|
|
@@ -27,7 +25,6 @@ var WithEditorActions = /*#__PURE__*/function (_React$Component) {
|
|
|
27
25
|
return /*#__PURE__*/React.createElement(WithEditorActionsOld, this.props);
|
|
28
26
|
}
|
|
29
27
|
}]);
|
|
30
|
-
return WithEditorActions;
|
|
31
28
|
}(React.Component);
|
|
32
29
|
export { WithEditorActions as default };
|
|
33
30
|
function WithEditorActionsNew(props) {
|
|
@@ -39,13 +36,12 @@ function WithEditorActionsNew(props) {
|
|
|
39
36
|
});
|
|
40
37
|
}
|
|
41
38
|
var WithEditorActionsInner = /*#__PURE__*/function (_React$Component2) {
|
|
42
|
-
_inherits(WithEditorActionsInner, _React$Component2);
|
|
43
|
-
var _super2 = _createSuper(WithEditorActionsInner);
|
|
44
39
|
function WithEditorActionsInner() {
|
|
45
40
|
_classCallCheck(this, WithEditorActionsInner);
|
|
46
|
-
return
|
|
41
|
+
return _callSuper(this, WithEditorActionsInner, arguments);
|
|
47
42
|
}
|
|
48
|
-
|
|
43
|
+
_inherits(WithEditorActionsInner, _React$Component2);
|
|
44
|
+
return _createClass(WithEditorActionsInner, [{
|
|
49
45
|
key: "componentDidMount",
|
|
50
46
|
value: function componentDidMount() {
|
|
51
47
|
var _this = this;
|
|
@@ -67,25 +63,23 @@ var WithEditorActionsInner = /*#__PURE__*/function (_React$Component2) {
|
|
|
67
63
|
return this.props.render(this.props.editorActions);
|
|
68
64
|
}
|
|
69
65
|
}]);
|
|
70
|
-
return WithEditorActionsInner;
|
|
71
66
|
}(React.Component);
|
|
72
67
|
var WithEditorActionsOld = /*#__PURE__*/function (_React$Component3) {
|
|
73
|
-
_inherits(WithEditorActionsOld, _React$Component3);
|
|
74
|
-
var _super3 = _createSuper(WithEditorActionsOld);
|
|
75
68
|
function WithEditorActionsOld() {
|
|
76
69
|
var _this3;
|
|
77
70
|
_classCallCheck(this, WithEditorActionsOld);
|
|
78
71
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
79
72
|
args[_key] = arguments[_key];
|
|
80
73
|
}
|
|
81
|
-
_this3 =
|
|
82
|
-
_defineProperty(
|
|
74
|
+
_this3 = _callSuper(this, WithEditorActionsOld, [].concat(args));
|
|
75
|
+
_defineProperty(_this3, "onContextUpdate", function () {
|
|
83
76
|
// Re-render actions when editorActions changes...
|
|
84
77
|
_this3.forceUpdate();
|
|
85
78
|
});
|
|
86
79
|
return _this3;
|
|
87
80
|
}
|
|
88
|
-
|
|
81
|
+
_inherits(WithEditorActionsOld, _React$Component3);
|
|
82
|
+
return _createClass(WithEditorActionsOld, [{
|
|
89
83
|
key: "componentDidMount",
|
|
90
84
|
value: function componentDidMount() {
|
|
91
85
|
this.context.editorActions._privateSubscribe(this.onContextUpdate);
|
|
@@ -101,7 +95,6 @@ var WithEditorActionsOld = /*#__PURE__*/function (_React$Component3) {
|
|
|
101
95
|
return this.props.render(this.context.editorActions);
|
|
102
96
|
}
|
|
103
97
|
}]);
|
|
104
|
-
return WithEditorActionsOld;
|
|
105
98
|
}(React.Component);
|
|
106
99
|
_defineProperty(WithEditorActionsOld, "contextTypes", {
|
|
107
100
|
editorActions: PropTypes.object.isRequired
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
9
|
/**
|
|
11
10
|
* @jsxRuntime classic
|
|
@@ -45,19 +44,18 @@ var flashWrapperAnimated = css(_defineProperty({}, "".concat(flashWrapper, " & >
|
|
|
45
44
|
animation: "0.25s ease-in-out ".concat(pulseBackground)
|
|
46
45
|
}));
|
|
47
46
|
var WithFlash = /*#__PURE__*/function (_React$Component) {
|
|
48
|
-
_inherits(WithFlash, _React$Component);
|
|
49
|
-
var _super = _createSuper(WithFlash);
|
|
50
47
|
function WithFlash() {
|
|
51
48
|
var _this;
|
|
52
49
|
_classCallCheck(this, WithFlash);
|
|
53
50
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
54
51
|
args[_key] = arguments[_key];
|
|
55
52
|
}
|
|
56
|
-
_this =
|
|
57
|
-
_defineProperty(
|
|
53
|
+
_this = _callSuper(this, WithFlash, [].concat(args));
|
|
54
|
+
_defineProperty(_this, "toggle", false);
|
|
58
55
|
return _this;
|
|
59
56
|
}
|
|
60
|
-
|
|
57
|
+
_inherits(WithFlash, _React$Component);
|
|
58
|
+
return _createClass(WithFlash, [{
|
|
61
59
|
key: "render",
|
|
62
60
|
value: function render() {
|
|
63
61
|
var _this$props = this.props,
|
|
@@ -75,6 +73,5 @@ var WithFlash = /*#__PURE__*/function (_React$Component) {
|
|
|
75
73
|
);
|
|
76
74
|
}
|
|
77
75
|
}]);
|
|
78
|
-
return WithFlash;
|
|
79
76
|
}(React.Component);
|
|
80
77
|
export { WithFlash as default };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
9
|
import React from 'react';
|
|
11
10
|
import PropTypes from 'prop-types';
|
|
@@ -14,16 +13,14 @@ import { createDispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
|
14
13
|
import { analyticsEventKey } from '@atlaskit/editor-common/utils/analytics';
|
|
15
14
|
import { deprecatedOpenHelpCommand } from '@atlaskit/editor-plugins/help-dialog';
|
|
16
15
|
var WithHelpTrigger = /*#__PURE__*/function (_React$Component) {
|
|
17
|
-
_inherits(WithHelpTrigger, _React$Component);
|
|
18
|
-
var _super = _createSuper(WithHelpTrigger);
|
|
19
16
|
function WithHelpTrigger() {
|
|
20
17
|
var _this;
|
|
21
18
|
_classCallCheck(this, WithHelpTrigger);
|
|
22
19
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23
20
|
args[_key] = arguments[_key];
|
|
24
21
|
}
|
|
25
|
-
_this =
|
|
26
|
-
_defineProperty(
|
|
22
|
+
_this = _callSuper(this, WithHelpTrigger, [].concat(args));
|
|
23
|
+
_defineProperty(_this, "openHelp", function () {
|
|
27
24
|
var _ref = _this.context,
|
|
28
25
|
editorActions = _ref.editorActions;
|
|
29
26
|
|
|
@@ -47,13 +44,13 @@ var WithHelpTrigger = /*#__PURE__*/function (_React$Component) {
|
|
|
47
44
|
});
|
|
48
45
|
return _this;
|
|
49
46
|
}
|
|
50
|
-
|
|
47
|
+
_inherits(WithHelpTrigger, _React$Component);
|
|
48
|
+
return _createClass(WithHelpTrigger, [{
|
|
51
49
|
key: "render",
|
|
52
50
|
value: function render() {
|
|
53
51
|
return this.props.render(this.openHelp);
|
|
54
52
|
}
|
|
55
53
|
}]);
|
|
56
|
-
return WithHelpTrigger;
|
|
57
54
|
}(React.Component);
|
|
58
55
|
_defineProperty(WithHelpTrigger, "contextTypes", {
|
|
59
56
|
editorActions: PropTypes.object.isRequired
|
|
@@ -43,7 +43,7 @@ export var PluginPerformanceObserver = /*#__PURE__*/function () {
|
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
-
_createClass(PluginPerformanceObserver, [{
|
|
46
|
+
return _createClass(PluginPerformanceObserver, [{
|
|
47
47
|
key: "isSimpleTracking",
|
|
48
48
|
get: function get() {
|
|
49
49
|
var _this$getOptions = this.getOptions(),
|
|
@@ -121,5 +121,4 @@ export var PluginPerformanceObserver = /*#__PURE__*/function () {
|
|
|
121
121
|
return this.observer.takeRecords();
|
|
122
122
|
}
|
|
123
123
|
}]);
|
|
124
|
-
return PluginPerformanceObserver;
|
|
125
124
|
}();
|
|
@@ -28,7 +28,7 @@ export var PluginPerformanceReport = /*#__PURE__*/function () {
|
|
|
28
28
|
});
|
|
29
29
|
this.entry = entry;
|
|
30
30
|
}
|
|
31
|
-
_createClass(PluginPerformanceReport, [{
|
|
31
|
+
return _createClass(PluginPerformanceReport, [{
|
|
32
32
|
key: "getEntryByName",
|
|
33
33
|
value: function getEntryByName(entryList, name) {
|
|
34
34
|
return entryList.getEntriesByName(name).find(this.isChild);
|
|
@@ -180,5 +180,4 @@ export var PluginPerformanceReport = /*#__PURE__*/function () {
|
|
|
180
180
|
return new PluginPerformanceReport(entry);
|
|
181
181
|
}
|
|
182
182
|
}]);
|
|
183
|
-
return PluginPerformanceReport;
|
|
184
183
|
}();
|
|
@@ -76,7 +76,7 @@ export var TransactionTracker = /*#__PURE__*/function () {
|
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
|
-
_createClass(TransactionTracker, [{
|
|
79
|
+
return _createClass(TransactionTracker, [{
|
|
80
80
|
key: "addMeasureListener",
|
|
81
81
|
value: function addMeasureListener(listener) {
|
|
82
82
|
this.measureListeners.push(listener);
|
|
@@ -98,5 +98,4 @@ export var TransactionTracker = /*#__PURE__*/function () {
|
|
|
98
98
|
return trackingEnabled && this.dispatchCallCounter === samplingRate;
|
|
99
99
|
}
|
|
100
100
|
}]);
|
|
101
|
-
return TransactionTracker;
|
|
102
101
|
}();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "203.2.
|
|
2
|
+
export var version = "203.2.10";
|