@atlaskit/editor-core 189.3.14 → 189.3.16
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 +17 -0
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
- package/dist/cjs/plugins/analytics/index.js +0 -6
- package/dist/cjs/plugins/analytics/utils.js +0 -29
- package/dist/cjs/plugins/breakout/index.js +3 -3
- package/dist/cjs/plugins/breakout/ui/LayoutButton.js +4 -4
- package/dist/cjs/plugins/extension/extension-api.js +3 -3
- package/dist/cjs/plugins/extension/index.js +14 -3
- package/dist/cjs/plugins/{macro → extension/pm-plugins/macro}/actions.js +3 -4
- package/dist/cjs/plugins/{macro → extension/pm-plugins/macro}/index.js +2 -18
- package/dist/cjs/plugins/extension/toolbar.js +1 -1
- package/dist/cjs/plugins/find-replace/FindReplaceToolbarButtonWithState.js +32 -30
- package/dist/cjs/plugins/find-replace/commands-with-analytics.js +85 -71
- package/dist/cjs/plugins/find-replace/index.js +5 -2
- package/dist/cjs/plugins/find-replace/keymap.js +4 -4
- package/dist/cjs/plugins/index.js +1 -24
- package/dist/cjs/plugins/insert-block/index.js +36 -53
- package/dist/cjs/{ui → plugins/insert-block/ui}/ElementBrowser/InsertMenu.js +3 -9
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +1 -1
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/create-items.js +1 -1
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +3 -3
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +4 -5
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/item.js +7 -8
- package/dist/cjs/plugins/paste/handlers.js +3 -3
- package/dist/cjs/plugins/paste/pm-plugins/main.js +4 -4
- package/dist/cjs/presets/context.js +5 -3
- package/dist/cjs/presets/universal.js +12 -8
- package/dist/cjs/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +3 -2
- package/dist/cjs/{plugins/expand/ui/styles.js → ui/ContentStyles/expand.js} +11 -8
- package/dist/cjs/ui/ContentStyles/index.js +4 -4
- package/dist/cjs/ui/ToolbarFeedback/index.js +1 -1
- package/dist/cjs/use-preset.js +0 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
- package/dist/es2019/plugins/analytics/index.js +1 -1
- package/dist/es2019/plugins/analytics/utils.js +0 -24
- package/dist/es2019/plugins/breakout/index.js +1 -1
- package/dist/es2019/plugins/breakout/ui/LayoutButton.js +1 -1
- package/dist/es2019/plugins/extension/extension-api.js +2 -2
- package/dist/es2019/plugins/extension/index.js +13 -3
- package/dist/es2019/plugins/{macro → extension/pm-plugins/macro}/actions.js +2 -2
- package/dist/es2019/plugins/{macro → extension/pm-plugins/macro}/index.js +1 -14
- package/dist/es2019/plugins/extension/toolbar.js +1 -1
- package/dist/es2019/plugins/find-replace/FindReplaceToolbarButtonWithState.js +20 -19
- package/dist/es2019/plugins/find-replace/commands-with-analytics.js +15 -15
- package/dist/es2019/plugins/find-replace/index.js +7 -2
- package/dist/es2019/plugins/find-replace/keymap.js +4 -4
- package/dist/es2019/plugins/index.js +0 -2
- package/dist/es2019/plugins/insert-block/index.js +19 -36
- package/dist/es2019/{ui → plugins/insert-block/ui}/ElementBrowser/InsertMenu.js +4 -8
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +1 -1
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/create-items.js +1 -1
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +2 -2
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +2 -3
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/item.js +2 -2
- package/dist/es2019/plugins/paste/handlers.js +4 -3
- package/dist/es2019/plugins/paste/pm-plugins/main.js +4 -4
- package/dist/es2019/presets/context.js +2 -2
- package/dist/es2019/presets/universal.js +10 -6
- package/dist/es2019/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +3 -2
- package/dist/es2019/{plugins/expand/ui/styles.js → ui/ContentStyles/expand.js} +9 -4
- package/dist/es2019/ui/ContentStyles/index.js +1 -1
- package/dist/es2019/ui/ToolbarFeedback/index.js +2 -2
- package/dist/es2019/use-preset.js +0 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
- package/dist/esm/plugins/analytics/index.js +1 -1
- package/dist/esm/plugins/analytics/utils.js +0 -28
- package/dist/esm/plugins/breakout/index.js +1 -1
- package/dist/esm/plugins/breakout/ui/LayoutButton.js +1 -1
- package/dist/esm/plugins/extension/extension-api.js +2 -2
- package/dist/esm/plugins/extension/index.js +14 -3
- package/dist/esm/plugins/{macro → extension/pm-plugins/macro}/actions.js +2 -2
- package/dist/esm/plugins/{macro → extension/pm-plugins/macro}/index.js +1 -17
- package/dist/esm/plugins/extension/toolbar.js +1 -1
- package/dist/esm/plugins/find-replace/FindReplaceToolbarButtonWithState.js +32 -30
- package/dist/esm/plugins/find-replace/commands-with-analytics.js +84 -70
- package/dist/esm/plugins/find-replace/index.js +5 -2
- package/dist/esm/plugins/find-replace/keymap.js +4 -4
- package/dist/esm/plugins/index.js +0 -2
- package/dist/esm/plugins/insert-block/index.js +36 -53
- package/dist/esm/{ui → plugins/insert-block/ui}/ElementBrowser/InsertMenu.js +4 -10
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +1 -1
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/create-items.js +1 -1
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +2 -2
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +2 -3
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/item.js +2 -2
- package/dist/esm/plugins/paste/handlers.js +4 -3
- package/dist/esm/plugins/paste/pm-plugins/main.js +4 -4
- package/dist/esm/presets/context.js +2 -2
- package/dist/esm/presets/universal.js +9 -6
- package/dist/esm/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +3 -2
- package/dist/esm/{plugins/expand/ui/styles.js → ui/ContentStyles/expand.js} +9 -4
- package/dist/esm/ui/ContentStyles/index.js +1 -1
- package/dist/esm/ui/ToolbarFeedback/index.js +1 -1
- package/dist/esm/use-preset.js +0 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/plugins/analytics/index.d.ts +1 -1
- package/dist/types/plugins/analytics/utils.d.ts +0 -11
- package/dist/types/plugins/extension/extension-api.d.ts +1 -1
- package/dist/{types-ts4.5/plugins → types/plugins/extension/pm-plugins}/macro/index.d.ts +1 -4
- package/dist/types/plugins/extension/pm-plugins/macro/types.d.ts +4 -0
- package/dist/types/plugins/find-replace/FindReplaceToolbarButtonWithState.d.ts +4 -2
- package/dist/types/plugins/find-replace/commands-with-analytics.d.ts +9 -9
- package/dist/types/plugins/find-replace/index.d.ts +5 -3
- package/dist/types/plugins/find-replace/keymap.d.ts +2 -1
- package/dist/types/plugins/index.d.ts +0 -2
- package/dist/types/plugins/insert-block/types.d.ts +4 -2
- package/dist/{types-ts4.5 → types/plugins/insert-block}/ui/ElementBrowser/types.d.ts +2 -2
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.d.ts +1 -1
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.d.ts +1 -1
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/create-items.d.ts +0 -2
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.d.ts +1 -1
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/types.d.ts +0 -1
- package/dist/types/plugins/mobile-dimensions/index.d.ts +2 -1
- package/dist/types/plugins/paste/handlers.d.ts +2 -1
- package/dist/types/presets/context.d.ts +2 -2
- package/dist/types/presets/default.d.ts +8 -0
- package/dist/types/presets/universal.d.ts +5 -0
- package/dist/types/{plugins/expand/ui/styles.d.ts → ui/ContentStyles/expand.d.ts} +1 -1
- package/dist/types-ts4.5/plugins/analytics/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/analytics/utils.d.ts +0 -11
- package/dist/types-ts4.5/plugins/extension/extension-api.d.ts +1 -1
- package/dist/{types/plugins → types-ts4.5/plugins/extension/pm-plugins}/macro/index.d.ts +1 -4
- package/dist/types-ts4.5/plugins/extension/pm-plugins/macro/types.d.ts +4 -0
- package/dist/types-ts4.5/plugins/find-replace/FindReplaceToolbarButtonWithState.d.ts +4 -2
- package/dist/types-ts4.5/plugins/find-replace/commands-with-analytics.d.ts +9 -9
- package/dist/types-ts4.5/plugins/find-replace/index.d.ts +6 -3
- package/dist/types-ts4.5/plugins/find-replace/keymap.d.ts +2 -1
- package/dist/types-ts4.5/plugins/index.d.ts +0 -2
- package/dist/types-ts4.5/plugins/insert-block/types.d.ts +4 -2
- package/dist/{types → types-ts4.5/plugins/insert-block}/ui/ElementBrowser/types.d.ts +2 -2
- package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.d.ts +1 -1
- package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.d.ts +1 -1
- package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/create-items.d.ts +0 -2
- package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.d.ts +1 -1
- package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/types.d.ts +0 -1
- package/dist/types-ts4.5/plugins/mobile-dimensions/index.d.ts +2 -1
- package/dist/types-ts4.5/plugins/paste/handlers.d.ts +2 -1
- package/dist/types-ts4.5/presets/context.d.ts +2 -2
- package/dist/types-ts4.5/presets/default.d.ts +8 -0
- package/dist/types-ts4.5/presets/universal.d.ts +5 -0
- package/dist/types-ts4.5/{plugins/expand/ui/styles.d.ts → ui/ContentStyles/expand.d.ts} +1 -1
- package/package.json +5 -9
- package/dist/cjs/plugins/breakout/constants.js +0 -10
- package/dist/cjs/plugins/expand/commands.js +0 -184
- package/dist/cjs/plugins/expand/index.js +0 -111
- package/dist/cjs/plugins/expand/nodeviews/index.js +0 -485
- package/dist/cjs/plugins/expand/pm-plugins/keymap.js +0 -171
- package/dist/cjs/plugins/expand/pm-plugins/main.js +0 -85
- package/dist/cjs/plugins/expand/pm-plugins/plugin-factory.js +0 -15
- package/dist/cjs/plugins/expand/reducer.js +0 -20
- package/dist/cjs/plugins/expand/toolbar.js +0 -59
- package/dist/cjs/plugins/expand/ui/ExpandIconButton.js +0 -104
- package/dist/cjs/plugins/expand/ui/class-names.js +0 -20
- package/dist/cjs/plugins/expand/utils.js +0 -24
- package/dist/cjs/ui/ElementBrowser/types.js +0 -5
- package/dist/es2019/plugins/breakout/constants.js +0 -4
- package/dist/es2019/plugins/expand/commands.js +0 -161
- package/dist/es2019/plugins/expand/index.js +0 -95
- package/dist/es2019/plugins/expand/nodeviews/index.js +0 -475
- package/dist/es2019/plugins/expand/pm-plugins/keymap.js +0 -197
- package/dist/es2019/plugins/expand/pm-plugins/main.js +0 -73
- package/dist/es2019/plugins/expand/pm-plugins/plugin-factory.js +0 -9
- package/dist/es2019/plugins/expand/reducer.js +0 -11
- package/dist/es2019/plugins/expand/toolbar.js +0 -52
- package/dist/es2019/plugins/expand/ui/ExpandIconButton.js +0 -85
- package/dist/es2019/plugins/expand/ui/class-names.js +0 -12
- package/dist/es2019/plugins/expand/utils.js +0 -1
- package/dist/esm/plugins/breakout/constants.js +0 -4
- package/dist/esm/plugins/expand/commands.js +0 -177
- package/dist/esm/plugins/expand/index.js +0 -97
- package/dist/esm/plugins/expand/nodeviews/index.js +0 -477
- package/dist/esm/plugins/expand/pm-plugins/keymap.js +0 -165
- package/dist/esm/plugins/expand/pm-plugins/main.js +0 -77
- package/dist/esm/plugins/expand/pm-plugins/plugin-factory.js +0 -9
- package/dist/esm/plugins/expand/reducer.js +0 -13
- package/dist/esm/plugins/expand/toolbar.js +0 -52
- package/dist/esm/plugins/expand/ui/ExpandIconButton.js +0 -95
- package/dist/esm/plugins/expand/ui/class-names.js +0 -14
- package/dist/esm/plugins/expand/utils.js +0 -1
- package/dist/esm/plugins/macro/types.js +0 -1
- package/dist/esm/ui/ElementBrowser/types.js +0 -1
- package/dist/types/plugins/breakout/constants.d.ts +0 -4
- package/dist/types/plugins/expand/commands.d.ts +0 -13
- package/dist/types/plugins/expand/index.d.ts +0 -31
- package/dist/types/plugins/expand/nodeviews/index.d.ts +0 -55
- package/dist/types/plugins/expand/pm-plugins/keymap.d.ts +0 -4
- package/dist/types/plugins/expand/pm-plugins/main.d.ts +0 -8
- package/dist/types/plugins/expand/pm-plugins/plugin-factory.d.ts +0 -3
- package/dist/types/plugins/expand/reducer.d.ts +0 -3
- package/dist/types/plugins/expand/toolbar.d.ts +0 -3
- package/dist/types/plugins/expand/types.d.ts +0 -9
- package/dist/types/plugins/expand/ui/ExpandIconButton.d.ts +0 -43
- package/dist/types/plugins/expand/ui/class-names.d.ts +0 -11
- package/dist/types/plugins/expand/utils.d.ts +0 -1
- package/dist/types/plugins/macro/types.d.ts +0 -4
- package/dist/types-ts4.5/plugins/breakout/constants.d.ts +0 -4
- package/dist/types-ts4.5/plugins/expand/commands.d.ts +0 -13
- package/dist/types-ts4.5/plugins/expand/index.d.ts +0 -31
- package/dist/types-ts4.5/plugins/expand/nodeviews/index.d.ts +0 -55
- package/dist/types-ts4.5/plugins/expand/pm-plugins/keymap.d.ts +0 -4
- package/dist/types-ts4.5/plugins/expand/pm-plugins/main.d.ts +0 -8
- package/dist/types-ts4.5/plugins/expand/pm-plugins/plugin-factory.d.ts +0 -3
- package/dist/types-ts4.5/plugins/expand/reducer.d.ts +0 -3
- package/dist/types-ts4.5/plugins/expand/toolbar.d.ts +0 -3
- package/dist/types-ts4.5/plugins/expand/types.d.ts +0 -9
- package/dist/types-ts4.5/plugins/expand/ui/ExpandIconButton.d.ts +0 -43
- package/dist/types-ts4.5/plugins/expand/ui/class-names.d.ts +0 -11
- package/dist/types-ts4.5/plugins/expand/utils.d.ts +0 -1
- package/dist/types-ts4.5/plugins/macro/types.d.ts +0 -4
- /package/dist/cjs/plugins/{macro → extension/pm-plugins/macro}/plugin-key.js +0 -0
- /package/dist/cjs/plugins/{expand → extension/pm-plugins/macro}/types.js +0 -0
- /package/dist/cjs/plugins/{macro → insert-block/ui/ElementBrowser}/types.js +0 -0
- /package/dist/es2019/plugins/{macro → extension/pm-plugins/macro}/plugin-key.js +0 -0
- /package/dist/es2019/plugins/{expand → extension/pm-plugins/macro}/types.js +0 -0
- /package/dist/es2019/plugins/{macro → insert-block/ui/ElementBrowser}/types.js +0 -0
- /package/dist/esm/plugins/{macro → extension/pm-plugins/macro}/plugin-key.js +0 -0
- /package/dist/{es2019/ui/ElementBrowser → esm/plugins/extension/pm-plugins/macro}/types.js +0 -0
- /package/dist/esm/plugins/{expand → insert-block/ui/ElementBrowser}/types.js +0 -0
- /package/dist/types/plugins/{macro → extension/pm-plugins/macro}/actions.d.ts +0 -0
- /package/dist/types/plugins/{macro → extension/pm-plugins/macro}/plugin-key.d.ts +0 -0
- /package/dist/types/{ui → plugins/insert-block/ui}/ElementBrowser/InsertMenu.d.ts +0 -0
- /package/dist/types-ts4.5/plugins/{macro → extension/pm-plugins/macro}/actions.d.ts +0 -0
- /package/dist/types-ts4.5/plugins/{macro → extension/pm-plugins/macro}/plugin-key.d.ts +0 -0
- /package/dist/types-ts4.5/{ui → plugins/insert-block/ui}/ElementBrowser/InsertMenu.d.ts +0 -0
|
@@ -22,9 +22,9 @@ var _layout = require("./layout");
|
|
|
22
22
|
var _panel = require("./panel");
|
|
23
23
|
var _styles5 = require("@atlaskit/editor-plugin-placeholder-text/styles");
|
|
24
24
|
var _styles6 = require("../../plugins/extension/ui/styles");
|
|
25
|
-
var
|
|
26
|
-
var
|
|
27
|
-
var
|
|
25
|
+
var _expand = require("./expand");
|
|
26
|
+
var _styles7 = require("../../plugins/find-replace/styles");
|
|
27
|
+
var _styles8 = require("../../plugins/tasks-and-decisions/styles");
|
|
28
28
|
var _status = require("./status");
|
|
29
29
|
var _date = require("./date");
|
|
30
30
|
var _getInlineNodeViewProducer = require("../../nodeviews/getInlineNodeViewProducer.styles");
|
|
@@ -47,7 +47,7 @@ var placeholderStyles = exports.placeholderStyles = (0, _react2.css)(_templateOb
|
|
|
47
47
|
var contentStyles = function contentStyles(props) {
|
|
48
48
|
return (0, _react2.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n outline: none;\n font-size: ", "px;\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n }\n\n .ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n pointer-events: none;\n opacity: 0.7;\n }\n\n .ProseMirror-hideselection *::selection {\n background: transparent;\n }\n\n .ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n }\n\n .ProseMirror-selectednode {\n outline: none;\n }\n\n .ProseMirror-selectednode:empty {\n outline: 2px solid ", ";\n }\n\n ", "\n ", "\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\n .panelView-content-wrap {\n box-sizing: border-box;\n }\n\n .mediaGroupView-content-wrap ul {\n padding: 0;\n }\n\n /** Needed to override any cleared floats, e.g. image wrapping */\n\n div.fabric-editor-block-mark[class^='fabric-editor-align'] {\n clear: none !important;\n }\n\n .fabric-editor-align-end {\n text-align: right;\n }\n\n .fabric-editor-align-start {\n text-align: left;\n }\n\n .fabric-editor-align-center {\n text-align: center;\n }\n\n .pm-table-header-content-wrap :not(.fabric-editor-alignment),\n .pm-table-header-content-wrap\n :not(p, .fabric-editor-block-mark)\n + div.fabric-editor-block-mark,\n .pm-table-cell-content-wrap\n :not(p, .fabric-editor-block-mark)\n + div.fabric-editor-block-mark {\n p:first-of-type {\n margin-top: 0;\n }\n }\n\n .hyperlink-floating-toolbar,\n .", " {\n padding: 0;\n }\n\n /* Link icon in the Atlaskit package\n is bigger than the others\n */\n .hyperlink-open-link {\n svg {\n max-width: 18px;\n }\n &[href] {\n padding: 0 4px;\n }\n }\n"])), (0, _editorSharedStyles.editorFontSize)({
|
|
49
49
|
theme: props.theme
|
|
50
|
-
}), _styles.whitespaceSharedStyles, _styles.paragraphSharedStyles, _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, "var(--ds-border-focused, #8cf)", _styles5.placeholderTextStyles, placeholderStyles, (0, _codeBlock.codeBlockStyles)(props), (0, _styles3.blocktypeStyles)(props), (0, _styles.codeMarkSharedStyles)(props), _styles.textColorStyles, listsStyles, ruleStyles(props), _media.mediaStyles, (0, _layout.layoutStyles)(props), _styles2.telepointerStyle, _selection.gapCursorStyles, (0, _commonStyles.tableStyles)(props), (0, _panel.panelStyles)(props), mentionsStyles, emojiStyles, _styles.tasksAndDecisionsStyles, _styles.gridStyles, linkStyles, _styles.blockMarksSharedStyles, _styles.dateSharedStyle, _styles6.extensionStyles, (0,
|
|
50
|
+
}), _styles.whitespaceSharedStyles, _styles.paragraphSharedStyles, _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, "var(--ds-border-focused, #8cf)", _styles5.placeholderTextStyles, placeholderStyles, (0, _codeBlock.codeBlockStyles)(props), (0, _styles3.blocktypeStyles)(props), (0, _styles.codeMarkSharedStyles)(props), _styles.textColorStyles, listsStyles, ruleStyles(props), _media.mediaStyles, (0, _layout.layoutStyles)(props), _styles2.telepointerStyle, _selection.gapCursorStyles, (0, _commonStyles.tableStyles)(props), (0, _panel.panelStyles)(props), mentionsStyles, emojiStyles, _styles.tasksAndDecisionsStyles, _styles.gridStyles, linkStyles, _styles.blockMarksSharedStyles, _styles.dateSharedStyle, _styles6.extensionStyles, (0, _expand.expandStyles)(props), _styles7.findReplaceStyles, _styles4.textHighlightStyle, _styles8.taskDecisionStyles, _status.statusStyles, (0, _styles.annotationSharedStyles)(props), _styles.smartCardStyles, _styles.smartCardSharedStyles, _date.dateStyles, _styles.embedCardStyles, _styles.unsupportedStyles, _styles.resizerStyles, _styles.MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT);
|
|
51
51
|
};
|
|
52
52
|
var createEditorContentStyle = exports.createEditorContentStyle = function createEditorContentStyle(styles) {
|
|
53
53
|
return /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
@@ -108,7 +108,7 @@ var ToolbarFeedbackInternal = /*#__PURE__*/function (_PureComponent) {
|
|
|
108
108
|
jiraIssueCollectorScriptLoading: true,
|
|
109
109
|
showOptOutOption: false
|
|
110
110
|
});
|
|
111
|
-
basePluginState = (_this$props$api = _this.props.api) === null || _this$props$api === void 0 ? void 0 : _this$props$api.
|
|
111
|
+
basePluginState = (_this$props$api = _this.props.api) === null || _this$props$api === void 0 || (_this$props$api = _this$props$api.base) === null || _this$props$api === void 0 ? void 0 : _this$props$api.sharedState.currentState();
|
|
112
112
|
sessionId = (_window$localStorage$ = window.localStorage.getItem('awc.session.id')) === null || _window$localStorage$ === void 0 ? void 0 : _window$localStorage$.toString();
|
|
113
113
|
contentId = basePluginState === null || basePluginState === void 0 || (_basePluginState$cont = basePluginState.contextIdentifier) === null || _basePluginState$cont === void 0 ? void 0 : _basePluginState$cont.objectId;
|
|
114
114
|
tabId = window.sessionStorage['awc.tab.id'];
|
package/dist/cjs/use-preset.js
CHANGED
|
@@ -41,7 +41,6 @@ var _context = require("./presets/context");
|
|
|
41
41
|
*/
|
|
42
42
|
function usePreset(createPreset, dependencies) {
|
|
43
43
|
var editorApi = (0, _context.usePresetContext)();
|
|
44
|
-
|
|
45
44
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
46
45
|
var preset = (0, _react.useMemo)(createPreset, dependencies);
|
|
47
46
|
return {
|
|
@@ -15,7 +15,7 @@ export const InlineNodeViewSharedStyles = css`
|
|
|
15
15
|
white-space: nowrap;
|
|
16
16
|
/* Then reset to the Editor default so we don't interfere
|
|
17
17
|
with any component styling. */
|
|
18
|
-
& > *:not(
|
|
18
|
+
& > *:not(.zeroWidthSpaceContainer) {
|
|
19
19
|
white-space: pre-wrap;
|
|
20
20
|
}
|
|
21
21
|
// Prevent visually hidden assistive text from being selected.
|
|
@@ -25,28 +25,4 @@ export function addAnalytics(state, tr, payload, channel = editorAnalyticsChanne
|
|
|
25
25
|
}
|
|
26
26
|
editorAnalyticsApi === null || editorAnalyticsApi === void 0 ? void 0 : editorAnalyticsApi.attachAnalyticsEvent(payload, channel)(tr);
|
|
27
27
|
return tr;
|
|
28
|
-
}
|
|
29
|
-
// Below function has been copied to packages/editor/editor-plugin-ai/src/utils/analytics.ts
|
|
30
|
-
// If changes are made to this function, please make the same update in the linked file.
|
|
31
|
-
/**
|
|
32
|
-
*
|
|
33
|
-
* @private
|
|
34
|
-
* @deprecated
|
|
35
|
-
*
|
|
36
|
-
* Do not use this anymore. Please use @atlaskit/editor-plugin-analytics
|
|
37
|
-
*
|
|
38
|
-
*/
|
|
39
|
-
export function withAnalytics(payload, channel) {
|
|
40
|
-
return command => (state, dispatch, view) => command(state, tr => {
|
|
41
|
-
if (dispatch) {
|
|
42
|
-
if (payload instanceof Function) {
|
|
43
|
-
const dynamicPayload = payload(state);
|
|
44
|
-
if (dynamicPayload) {
|
|
45
|
-
dispatch(addAnalytics(state, tr, dynamicPayload, channel));
|
|
46
|
-
}
|
|
47
|
-
} else {
|
|
48
|
-
dispatch(addAnalytics(state, tr, payload, channel));
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}, view);
|
|
52
28
|
}
|
|
@@ -4,10 +4,10 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
4
4
|
import { breakout } from '@atlaskit/adf-schema';
|
|
5
5
|
import { calcBreakoutWidthPx } from '@atlaskit/editor-common/utils';
|
|
6
6
|
import LayoutButton from './ui/LayoutButton';
|
|
7
|
-
import { BreakoutCssClassName } from './constants';
|
|
8
7
|
import { pluginKey } from './plugin-key';
|
|
9
8
|
import { findSupportedNodeForBreakout } from './utils/find-breakout-node';
|
|
10
9
|
import { akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
|
|
10
|
+
import { BreakoutCssClassName } from '@atlaskit/editor-common/styles';
|
|
11
11
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
12
12
|
class BreakoutView {
|
|
13
13
|
constructor(
|
|
@@ -12,7 +12,7 @@ import ToolbarButton from '../../../ui/ToolbarButton';
|
|
|
12
12
|
import { getBreakoutMode } from '../utils/get-breakout-mode';
|
|
13
13
|
import { setBreakoutMode } from '../commands/set-breakout-mode';
|
|
14
14
|
import { removeBreakout } from '../commands/remove-breakout';
|
|
15
|
-
import { BreakoutCssClassName } from '
|
|
15
|
+
import { BreakoutCssClassName } from '@atlaskit/editor-common/styles';
|
|
16
16
|
import { isBreakoutMarkAllowed } from '../utils/is-breakout-mark-allowed';
|
|
17
17
|
import { getPluginState } from '../plugin-key';
|
|
18
18
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
@@ -2,8 +2,8 @@ import { validator } from '@atlaskit/adf-utils/validator';
|
|
|
2
2
|
import { JSONTransformer } from '@atlaskit/editor-json-transformer';
|
|
3
3
|
import { Fragment, Mark } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import { NodeSelection, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
5
|
-
import { insertMacroFromMacroBrowser } from '
|
|
6
|
-
import { pluginKey as macroPluginKey } from '
|
|
5
|
+
import { insertMacroFromMacroBrowser } from './pm-plugins/macro/actions';
|
|
6
|
+
import { pluginKey as macroPluginKey } from './pm-plugins/macro/plugin-key';
|
|
7
7
|
import { nodeToJSON } from '../../utils';
|
|
8
8
|
import { setEditingContextToContextPanel } from './commands';
|
|
9
9
|
import { findNodePosWithLocalId, getDataConsumerMark, getNodeTypesReferenced, getSelectedExtension } from './utils';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { extension, bodiedExtension, inlineExtension } from '@atlaskit/adf-schema';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import { createPlugin } from './pm-plugins/main';
|
|
4
|
+
import { createPlugin as createMacroPlugin } from './pm-plugins/macro';
|
|
5
|
+
import { insertMacroFromMacroBrowser, runMacroAutoConvert } from './pm-plugins/macro/actions';
|
|
4
6
|
import keymapPlugin from './pm-plugins/keymap';
|
|
5
7
|
import { createPlugin as createUniqueIdPlugin } from './pm-plugins/unique-id';
|
|
6
8
|
import { getToolbarConfig } from './toolbar';
|
|
@@ -10,7 +12,7 @@ const extensionPlugin = ({
|
|
|
10
12
|
config: options = {},
|
|
11
13
|
api
|
|
12
14
|
}) => {
|
|
13
|
-
var _api$featureFlags, _api$contextPanel3, _api$
|
|
15
|
+
var _api$featureFlags, _api$analytics2, _api$contextPanel3, _api$analytics3, _api$contextPanel4;
|
|
14
16
|
const featureFlags = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
|
|
15
17
|
//Note: This is a hack to get the editor view reference in the plugin. Copied from table plugin.
|
|
16
18
|
//This is needed to get the current selection in the editor
|
|
@@ -68,6 +70,12 @@ const extensionPlugin = ({
|
|
|
68
70
|
}
|
|
69
71
|
});
|
|
70
72
|
}
|
|
73
|
+
}, {
|
|
74
|
+
name: 'macro',
|
|
75
|
+
plugin: ({
|
|
76
|
+
dispatch,
|
|
77
|
+
providerFactory
|
|
78
|
+
}) => createMacroPlugin(dispatch, providerFactory)
|
|
71
79
|
}];
|
|
72
80
|
},
|
|
73
81
|
actions: {
|
|
@@ -78,14 +86,16 @@ const extensionPlugin = ({
|
|
|
78
86
|
applyChange: api === null || api === void 0 ? void 0 : (_api$contextPanel2 = api.contextPanel) === null || _api$contextPanel2 === void 0 ? void 0 : _api$contextPanel2.actions.applyChange,
|
|
79
87
|
editorAnalyticsAPI: api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions
|
|
80
88
|
});
|
|
81
|
-
}
|
|
89
|
+
},
|
|
90
|
+
insertMacroFromMacroBrowser: insertMacroFromMacroBrowser(api === null || api === void 0 ? void 0 : (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions),
|
|
91
|
+
runMacroAutoConvert
|
|
82
92
|
},
|
|
83
93
|
pluginsOptions: {
|
|
84
94
|
floatingToolbar: getToolbarConfig({
|
|
85
95
|
breakoutEnabled: options.breakoutEnabled,
|
|
86
96
|
hoverDecoration: api === null || api === void 0 ? void 0 : api.decorations.actions.hoverDecoration,
|
|
87
97
|
applyChangeToContextPanel: api === null || api === void 0 ? void 0 : (_api$contextPanel3 = api.contextPanel) === null || _api$contextPanel3 === void 0 ? void 0 : _api$contextPanel3.actions.applyChange,
|
|
88
|
-
editorAnalyticsAPI: api === null || api === void 0 ? void 0 : (_api$
|
|
98
|
+
editorAnalyticsAPI: api === null || api === void 0 ? void 0 : (_api$analytics3 = api.analytics) === null || _api$analytics3 === void 0 ? void 0 : _api$analytics3.actions
|
|
89
99
|
}),
|
|
90
100
|
contextPanel: getContextPanel(options.allowAutoSave, featureFlags, api === null || api === void 0 ? void 0 : (_api$contextPanel4 = api.contextPanel) === null || _api$contextPanel4 === void 0 ? void 0 : _api$contextPanel4.actions.applyChange)
|
|
91
101
|
}
|
|
@@ -3,9 +3,9 @@ import { Selection, NodeSelection, TextSelection } from '@atlaskit/editor-prosem
|
|
|
3
3
|
import { safeInsert, replaceSelectedNode, findSelectedNodeOfType, replaceParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
4
4
|
import { getValidNode } from '@atlaskit/editor-common/validator';
|
|
5
5
|
import { normaliseNestedLayout } from '@atlaskit/editor-common/insert';
|
|
6
|
-
import { getPluginState as getExtensionPluginState } from '
|
|
6
|
+
import { getPluginState as getExtensionPluginState } from '../../plugin-factory';
|
|
7
7
|
import { ACTION, ACTION_SUBJECT, INPUT_METHOD, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
8
|
-
import { TARGET_SELECTION_SOURCE } from '
|
|
8
|
+
import { TARGET_SELECTION_SOURCE } from '@atlaskit/editor-common/analytics';
|
|
9
9
|
import { pluginKey } from './plugin-key';
|
|
10
10
|
export const insertMacroFromMacroBrowser = editorAnalyticsAPI => (macroProvider, macroNode, isEditing) => async view => {
|
|
11
11
|
if (!macroProvider) {
|
|
@@ -33,17 +33,4 @@ export const createPlugin = (dispatch, providerFactory) => new SafePlugin({
|
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
});
|
|
37
|
-
const macroPlugin = () => ({
|
|
38
|
-
name: 'macro',
|
|
39
|
-
pmPlugins() {
|
|
40
|
-
return [{
|
|
41
|
-
name: 'macro',
|
|
42
|
-
plugin: ({
|
|
43
|
-
dispatch,
|
|
44
|
-
providerFactory
|
|
45
|
-
}) => createPlugin(dispatch, providerFactory)
|
|
46
|
-
}];
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
export default macroPlugin;
|
|
36
|
+
});
|
|
@@ -10,7 +10,7 @@ import { editExtension } from './actions';
|
|
|
10
10
|
import { getPluginState } from './pm-plugins/main';
|
|
11
11
|
import { getSelectedExtension } from './utils';
|
|
12
12
|
import { updateExtensionLayout, removeExtension, removeDescendantNodes } from './commands';
|
|
13
|
-
import { pluginKey as macroPluginKey } from '
|
|
13
|
+
import { pluginKey as macroPluginKey } from './pm-plugins/macro/plugin-key';
|
|
14
14
|
import { isReferencedSource, getChildrenInfo, getNodeName } from '@atlaskit/editor-common/utils';
|
|
15
15
|
export const messages = defineMessages({
|
|
16
16
|
edit: {
|
|
@@ -5,17 +5,18 @@ import { cancelSearchWithAnalytics, replaceWithAnalytics, replaceAllWithAnalytic
|
|
|
5
5
|
import { blur, toggleMatchCase } from './commands';
|
|
6
6
|
import FindReplaceToolbarButton from './ui/FindReplaceToolbarButton';
|
|
7
7
|
import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
|
|
8
|
-
const FindReplaceToolbarButtonWithState =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
8
|
+
const FindReplaceToolbarButtonWithState = ({
|
|
9
|
+
popupsBoundariesElement,
|
|
10
|
+
popupsMountPoint,
|
|
11
|
+
popupsScrollableElement,
|
|
12
|
+
isToolbarReducedSpacing,
|
|
13
|
+
editorView,
|
|
14
|
+
containerElement,
|
|
15
|
+
dispatchAnalyticsEvent,
|
|
16
|
+
featureFlags,
|
|
17
|
+
editorAnalyticsAPI,
|
|
18
|
+
takeFullWidth
|
|
19
|
+
}) => {
|
|
19
20
|
if (!editorView) {
|
|
20
21
|
return null;
|
|
21
22
|
}
|
|
@@ -37,12 +38,12 @@ const FindReplaceToolbarButtonWithState = props => {
|
|
|
37
38
|
cmd(state, dispatch);
|
|
38
39
|
};
|
|
39
40
|
const handleActivate = () => {
|
|
40
|
-
runWithEditorFocused(() => dispatchCommand(activateWithAnalytics({
|
|
41
|
+
runWithEditorFocused(() => dispatchCommand(activateWithAnalytics(editorAnalyticsAPI)({
|
|
41
42
|
triggerMethod: TRIGGER_METHOD.TOOLBAR
|
|
42
43
|
})));
|
|
43
44
|
};
|
|
44
45
|
const handleFind = keyword => {
|
|
45
|
-
runWithEditorFocused(() => dispatchCommand(findWithAnalytics({
|
|
46
|
+
runWithEditorFocused(() => dispatchCommand(findWithAnalytics(editorAnalyticsAPI)({
|
|
46
47
|
editorView,
|
|
47
48
|
containerElement,
|
|
48
49
|
keyword
|
|
@@ -51,14 +52,14 @@ const FindReplaceToolbarButtonWithState = props => {
|
|
|
51
52
|
const handleFindNext = ({
|
|
52
53
|
triggerMethod
|
|
53
54
|
}) => {
|
|
54
|
-
runWithEditorFocused(() => dispatchCommand(findNextWithAnalytics({
|
|
55
|
+
runWithEditorFocused(() => dispatchCommand(findNextWithAnalytics(editorAnalyticsAPI)({
|
|
55
56
|
triggerMethod
|
|
56
57
|
})));
|
|
57
58
|
};
|
|
58
59
|
const handleFindPrev = ({
|
|
59
60
|
triggerMethod
|
|
60
61
|
}) => {
|
|
61
|
-
runWithEditorFocused(() => dispatchCommand(findPrevWithAnalytics({
|
|
62
|
+
runWithEditorFocused(() => dispatchCommand(findPrevWithAnalytics(editorAnalyticsAPI)({
|
|
62
63
|
triggerMethod
|
|
63
64
|
})));
|
|
64
65
|
};
|
|
@@ -66,7 +67,7 @@ const FindReplaceToolbarButtonWithState = props => {
|
|
|
66
67
|
triggerMethod,
|
|
67
68
|
replaceText
|
|
68
69
|
}) => {
|
|
69
|
-
runWithEditorFocused(() => dispatchCommand(replaceWithAnalytics({
|
|
70
|
+
runWithEditorFocused(() => dispatchCommand(replaceWithAnalytics(editorAnalyticsAPI)({
|
|
70
71
|
triggerMethod,
|
|
71
72
|
replaceText
|
|
72
73
|
})));
|
|
@@ -74,7 +75,7 @@ const FindReplaceToolbarButtonWithState = props => {
|
|
|
74
75
|
const handleReplaceAll = ({
|
|
75
76
|
replaceText
|
|
76
77
|
}) => {
|
|
77
|
-
runWithEditorFocused(() => dispatchCommand(replaceAllWithAnalytics({
|
|
78
|
+
runWithEditorFocused(() => dispatchCommand(replaceAllWithAnalytics(editorAnalyticsAPI)({
|
|
78
79
|
replaceText
|
|
79
80
|
})));
|
|
80
81
|
};
|
|
@@ -84,7 +85,7 @@ const FindReplaceToolbarButtonWithState = props => {
|
|
|
84
85
|
const handleCancel = ({
|
|
85
86
|
triggerMethod
|
|
86
87
|
}) => {
|
|
87
|
-
dispatchCommand(cancelSearchWithAnalytics({
|
|
88
|
+
dispatchCommand(cancelSearchWithAnalytics(editorAnalyticsAPI)({
|
|
88
89
|
triggerMethod
|
|
89
90
|
}));
|
|
90
91
|
editorView.focus();
|
|
@@ -129,7 +130,7 @@ const FindReplaceToolbarButtonWithState = props => {
|
|
|
129
130
|
onFindPrev: handleFindPrev,
|
|
130
131
|
onReplace: handleReplace,
|
|
131
132
|
onReplaceAll: handleReplaceAll,
|
|
132
|
-
takeFullWidth: !!
|
|
133
|
+
takeFullWidth: !!takeFullWidth
|
|
133
134
|
});
|
|
134
135
|
}
|
|
135
136
|
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import { withAnalytics } from '../analytics';
|
|
3
2
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
|
|
4
4
|
import { activate, find, findNext, findPrevious, replace, replaceAll, cancelSearch } from './commands';
|
|
5
|
-
export const activateWithAnalytics = ({
|
|
5
|
+
export const activateWithAnalytics = editorAnalyticsAPI => ({
|
|
6
6
|
triggerMethod
|
|
7
|
-
}) => withAnalytics(state => ({
|
|
7
|
+
}) => withAnalytics(editorAnalyticsAPI, state => ({
|
|
8
8
|
eventType: EVENT_TYPE.UI,
|
|
9
9
|
action: ACTION.ACTIVATED,
|
|
10
10
|
actionSubject: ACTION_SUBJECT.FIND_REPLACE_DIALOG,
|
|
@@ -13,18 +13,18 @@ export const activateWithAnalytics = ({
|
|
|
13
13
|
triggerMethod
|
|
14
14
|
}
|
|
15
15
|
}))(activate());
|
|
16
|
-
export const findWithAnalytics = ({
|
|
16
|
+
export const findWithAnalytics = editorAnalyticsAPI => ({
|
|
17
17
|
editorView,
|
|
18
18
|
containerElement,
|
|
19
19
|
keyword
|
|
20
|
-
}) => withAnalytics({
|
|
20
|
+
}) => withAnalytics(editorAnalyticsAPI, {
|
|
21
21
|
eventType: EVENT_TYPE.TRACK,
|
|
22
22
|
action: ACTION.FIND_PERFORMED,
|
|
23
23
|
actionSubject: ACTION_SUBJECT.TEXT
|
|
24
24
|
})(find(editorView, containerElement, keyword));
|
|
25
|
-
export const findNextWithAnalytics = ({
|
|
25
|
+
export const findNextWithAnalytics = editorAnalyticsAPI => ({
|
|
26
26
|
triggerMethod
|
|
27
|
-
}) => withAnalytics({
|
|
27
|
+
}) => withAnalytics(editorAnalyticsAPI, {
|
|
28
28
|
eventType: EVENT_TYPE.TRACK,
|
|
29
29
|
action: ACTION.FIND_NEXT_PERFORMED,
|
|
30
30
|
actionSubject: ACTION_SUBJECT.TEXT,
|
|
@@ -32,9 +32,9 @@ export const findNextWithAnalytics = ({
|
|
|
32
32
|
triggerMethod
|
|
33
33
|
}
|
|
34
34
|
})(findNext());
|
|
35
|
-
export const findPrevWithAnalytics = ({
|
|
35
|
+
export const findPrevWithAnalytics = editorAnalyticsAPI => ({
|
|
36
36
|
triggerMethod
|
|
37
|
-
}) => withAnalytics({
|
|
37
|
+
}) => withAnalytics(editorAnalyticsAPI, {
|
|
38
38
|
eventType: EVENT_TYPE.TRACK,
|
|
39
39
|
action: ACTION.FIND_PREV_PERFORMED,
|
|
40
40
|
actionSubject: ACTION_SUBJECT.TEXT,
|
|
@@ -42,10 +42,10 @@ export const findPrevWithAnalytics = ({
|
|
|
42
42
|
triggerMethod
|
|
43
43
|
}
|
|
44
44
|
})(findPrevious());
|
|
45
|
-
export const replaceWithAnalytics = ({
|
|
45
|
+
export const replaceWithAnalytics = editorAnalyticsAPI => ({
|
|
46
46
|
triggerMethod,
|
|
47
47
|
replaceText
|
|
48
|
-
}) => withAnalytics({
|
|
48
|
+
}) => withAnalytics(editorAnalyticsAPI, {
|
|
49
49
|
eventType: EVENT_TYPE.TRACK,
|
|
50
50
|
action: ACTION.REPLACED_ONE,
|
|
51
51
|
actionSubject: ACTION_SUBJECT.TEXT,
|
|
@@ -53,16 +53,16 @@ export const replaceWithAnalytics = ({
|
|
|
53
53
|
triggerMethod
|
|
54
54
|
}
|
|
55
55
|
})(replace(replaceText));
|
|
56
|
-
export const replaceAllWithAnalytics = ({
|
|
56
|
+
export const replaceAllWithAnalytics = editorAnalyticsAPI => ({
|
|
57
57
|
replaceText
|
|
58
|
-
}) => withAnalytics({
|
|
58
|
+
}) => withAnalytics(editorAnalyticsAPI, {
|
|
59
59
|
eventType: EVENT_TYPE.TRACK,
|
|
60
60
|
action: ACTION.REPLACED_ALL,
|
|
61
61
|
actionSubject: ACTION_SUBJECT.TEXT
|
|
62
62
|
})(replaceAll(replaceText));
|
|
63
|
-
export const cancelSearchWithAnalytics = ({
|
|
63
|
+
export const cancelSearchWithAnalytics = editorAnalyticsAPI => ({
|
|
64
64
|
triggerMethod
|
|
65
|
-
}) => withAnalytics({
|
|
65
|
+
}) => withAnalytics(editorAnalyticsAPI, {
|
|
66
66
|
eventType: EVENT_TYPE.UI,
|
|
67
67
|
action: ACTION.DEACTIVATED,
|
|
68
68
|
actionSubject: ACTION_SUBJECT.FIND_REPLACE_DIALOG,
|
|
@@ -18,7 +18,10 @@ export const findReplacePlugin = ({
|
|
|
18
18
|
}) => createPlugin(dispatch)
|
|
19
19
|
}, {
|
|
20
20
|
name: 'findReplaceKeymap',
|
|
21
|
-
plugin: () =>
|
|
21
|
+
plugin: () => {
|
|
22
|
+
var _api$analytics;
|
|
23
|
+
return keymapPlugin(api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions);
|
|
24
|
+
}
|
|
22
25
|
}];
|
|
23
26
|
},
|
|
24
27
|
primaryToolbarComponent({
|
|
@@ -33,6 +36,7 @@ export const findReplacePlugin = ({
|
|
|
33
36
|
if (props !== null && props !== void 0 && props.twoLineEditorToolbar) {
|
|
34
37
|
return null;
|
|
35
38
|
} else {
|
|
39
|
+
var _api$analytics2;
|
|
36
40
|
return /*#__PURE__*/React.createElement(FindReplaceToolbarButtonWithState, {
|
|
37
41
|
popupsBoundariesElement: popupsBoundariesElement,
|
|
38
42
|
popupsMountPoint: popupsMountPoint,
|
|
@@ -42,7 +46,8 @@ export const findReplacePlugin = ({
|
|
|
42
46
|
containerElement: containerElement,
|
|
43
47
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
44
48
|
takeFullWidth: props === null || props === void 0 ? void 0 : props.takeFullWidth,
|
|
45
|
-
featureFlags: featureFlags
|
|
49
|
+
featureFlags: featureFlags,
|
|
50
|
+
editorAnalyticsAPI: api === null || api === void 0 ? void 0 : (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions
|
|
46
51
|
});
|
|
47
52
|
}
|
|
48
53
|
}
|
|
@@ -2,15 +2,15 @@ import { keymap } from '@atlaskit/editor-prosemirror/keymap';
|
|
|
2
2
|
import { bindKeymapWithCommand, find as findKeymap } from '../../keymaps';
|
|
3
3
|
import { activateWithAnalytics } from './commands-with-analytics';
|
|
4
4
|
import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
|
|
5
|
-
const activateFindReplace =
|
|
6
|
-
activateWithAnalytics({
|
|
5
|
+
const activateFindReplace = editorAnalyticsAPI => (state, dispatch) => {
|
|
6
|
+
activateWithAnalytics(editorAnalyticsAPI)({
|
|
7
7
|
triggerMethod: TRIGGER_METHOD.SHORTCUT
|
|
8
8
|
})(state, dispatch);
|
|
9
9
|
return true;
|
|
10
10
|
};
|
|
11
|
-
const keymapPlugin =
|
|
11
|
+
const keymapPlugin = editorAnalyticsAPI => {
|
|
12
12
|
const list = {};
|
|
13
|
-
bindKeymapWithCommand(findKeymap.common, activateFindReplace(), list);
|
|
13
|
+
bindKeymapWithCommand(findKeymap.common, activateFindReplace(editorAnalyticsAPI), list);
|
|
14
14
|
return keymap(list);
|
|
15
15
|
};
|
|
16
16
|
export default keymapPlugin;
|
|
@@ -4,7 +4,6 @@ export { default as extensionPlugin } from './extension';
|
|
|
4
4
|
export { default as insertBlockPlugin } from './insert-block';
|
|
5
5
|
export { default as jiraIssuePlugin } from './jira-issue';
|
|
6
6
|
export { default as toolbarListsIndentationPlugin } from './toolbar-lists-indentation';
|
|
7
|
-
export { default as macroPlugin } from './macro';
|
|
8
7
|
export { default as pastePlugin } from './paste';
|
|
9
8
|
export { default as tasksAndDecisionsPlugin } from './tasks-and-decisions';
|
|
10
9
|
export { default as breakoutPlugin } from './breakout';
|
|
@@ -15,7 +14,6 @@ export { default as annotationPlugin } from './annotation';
|
|
|
15
14
|
export { default as analyticsPlugin } from './analytics';
|
|
16
15
|
export { default as customAutoformatPlugin } from './custom-autoformat';
|
|
17
16
|
export { default as feedbackDialogPlugin } from './feedback-dialog';
|
|
18
|
-
export { default as expandPlugin, isExpandInsertionEnabled } from './expand';
|
|
19
17
|
export { default as mobileDimensionsPlugin } from './mobile-dimensions';
|
|
20
18
|
export { default as findReplacePlugin } from './find-replace';
|
|
21
19
|
export { default as mobileSelectionPlugin } from './mobile-selection';
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
3
|
-
import { insertMacroFromMacroBrowser } from '../macro';
|
|
4
|
-
import WithPluginState from '../../ui/WithPluginState';
|
|
5
3
|
import ToolbarInsertBlock from './ui/ToolbarInsertBlock';
|
|
6
4
|
import { BLOCK_QUOTE, CODE_BLOCK, PANEL } from '@atlaskit/editor-plugin-block-type/consts';
|
|
7
5
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
8
|
-
import {
|
|
9
|
-
import { ToolbarSize } from '../../ui/Toolbar/types';
|
|
6
|
+
import { ToolbarSize } from '@atlaskit/editor-common/types';
|
|
10
7
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
11
8
|
const toolbarSizeToButtons = toolbarSize => {
|
|
12
9
|
switch (toolbarSize) {
|
|
@@ -61,34 +58,22 @@ const insertBlockPlugin = ({
|
|
|
61
58
|
isLastItem
|
|
62
59
|
}) {
|
|
63
60
|
const renderNode = providers => {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
popupsBoundariesElement: popupsBoundariesElement,
|
|
81
|
-
popupsScrollableElement: popupsScrollableElement,
|
|
82
|
-
toolbarSize: toolbarSize,
|
|
83
|
-
disabled: disabled,
|
|
84
|
-
isToolbarReducedSpacing: isToolbarReducedSpacing,
|
|
85
|
-
isLastItem: isLastItem,
|
|
86
|
-
featureFlags: featureFlags,
|
|
87
|
-
macroState: macroState,
|
|
88
|
-
providers: providers,
|
|
89
|
-
options: options
|
|
90
|
-
});
|
|
91
|
-
}
|
|
61
|
+
return /*#__PURE__*/React.createElement(ToolbarInsertBlockWithInjectionApi, {
|
|
62
|
+
pluginInjectionApi: api,
|
|
63
|
+
editorView: editorView,
|
|
64
|
+
editorActions: editorActions,
|
|
65
|
+
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
66
|
+
providerFactory: providerFactory,
|
|
67
|
+
popupsMountPoint: popupsMountPoint,
|
|
68
|
+
popupsBoundariesElement: popupsBoundariesElement,
|
|
69
|
+
popupsScrollableElement: popupsScrollableElement,
|
|
70
|
+
toolbarSize: toolbarSize,
|
|
71
|
+
disabled: disabled,
|
|
72
|
+
isToolbarReducedSpacing: isToolbarReducedSpacing,
|
|
73
|
+
isLastItem: isLastItem,
|
|
74
|
+
featureFlags: featureFlags,
|
|
75
|
+
providers: providers,
|
|
76
|
+
options: options
|
|
92
77
|
});
|
|
93
78
|
};
|
|
94
79
|
return /*#__PURE__*/React.createElement(WithProviders, {
|
|
@@ -113,10 +98,9 @@ function ToolbarInsertBlockWithInjectionApi({
|
|
|
113
98
|
providers,
|
|
114
99
|
pluginInjectionApi,
|
|
115
100
|
options,
|
|
116
|
-
macroState,
|
|
117
101
|
featureFlags
|
|
118
102
|
}) {
|
|
119
|
-
var _ref, _ref2, _pluginInjectionApi$i, _pluginInjectionApi$c, _pluginInjectionApi$p, _pluginInjectionApi$b, _pluginInjectionApi$
|
|
103
|
+
var _ref, _ref2, _pluginInjectionApi$i, _pluginInjectionApi$c, _pluginInjectionApi$p, _pluginInjectionApi$b, _pluginInjectionApi$e;
|
|
120
104
|
const buttons = toolbarSizeToButtons(toolbarSize);
|
|
121
105
|
const {
|
|
122
106
|
dateState,
|
|
@@ -159,8 +143,7 @@ function ToolbarInsertBlockWithInjectionApi({
|
|
|
159
143
|
nativeStatusSupported: options.nativeStatusSupported,
|
|
160
144
|
horizontalRuleEnabled: options.horizontalRuleEnabled,
|
|
161
145
|
onInsertBlockType: handleInsertBlockType(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$c = pluginInjectionApi.codeBlock) === null || _pluginInjectionApi$c === void 0 ? void 0 : _pluginInjectionApi$c.actions.insertCodeBlock, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$p = pluginInjectionApi.panel) === null || _pluginInjectionApi$p === void 0 ? void 0 : _pluginInjectionApi$p.actions.insertPanel, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$b = pluginInjectionApi.blockType) === null || _pluginInjectionApi$b === void 0 ? void 0 : _pluginInjectionApi$b.actions.insertBlockQuote),
|
|
162
|
-
onInsertMacroFromMacroBrowser:
|
|
163
|
-
macroProvider: macroState.macroProvider,
|
|
146
|
+
onInsertMacroFromMacroBrowser: pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$e = pluginInjectionApi.extension) === null || _pluginInjectionApi$e === void 0 ? void 0 : _pluginInjectionApi$e.actions.insertMacroFromMacroBrowser,
|
|
164
147
|
popupsMountPoint: popupsMountPoint,
|
|
165
148
|
popupsBoundariesElement: popupsBoundariesElement,
|
|
166
149
|
popupsScrollableElement: popupsScrollableElement,
|
|
@@ -6,8 +6,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
6
6
|
// AFP-2532 TODO: Fix automatic suppressions below
|
|
7
7
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
8
8
|
import { borderRadius } from '@atlaskit/theme';
|
|
9
|
-
import {
|
|
10
|
-
import { DN50, N0, N30A, N60A } from '@atlaskit/theme/colors';
|
|
9
|
+
import { N0, N30A, N60A } from '@atlaskit/theme/colors';
|
|
11
10
|
import { IconCode, IconDate, IconDecision, IconDivider, IconExpand, IconPanel, IconQuote, IconStatus } from '@atlaskit/editor-common/quick-insert';
|
|
12
11
|
import { withReactEditorViewOuterListeners as withOuterListeners } from '@atlaskit/editor-common/ui-react';
|
|
13
12
|
import { ElementBrowser, ELEMENT_ITEM_HEIGHT } from '@atlaskit/editor-common/element-browser';
|
|
@@ -73,7 +72,7 @@ const InsertMenu = ({
|
|
|
73
72
|
}, [pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q6 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q6 === void 0 ? void 0 : _pluginInjectionApi$q6.actions, quickInsertDropdownItems]);
|
|
74
73
|
const emptyStateHandler = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q7 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q7 === void 0 ? void 0 : (_pluginInjectionApi$q8 = _pluginInjectionApi$q7.sharedState.currentState()) === null || _pluginInjectionApi$q8 === void 0 ? void 0 : _pluginInjectionApi$q8.emptyStateHandler;
|
|
75
74
|
return jsx("div", {
|
|
76
|
-
css:
|
|
75
|
+
css: insertMenuWrapper(itemCount)
|
|
77
76
|
}, jsx(ElementBrowserWrapper, {
|
|
78
77
|
handleClickOutside: toggleVisiblity,
|
|
79
78
|
handleEscapeKeydown: toggleVisiblity,
|
|
@@ -119,17 +118,14 @@ const getInsertMenuHeight = ({
|
|
|
119
118
|
return 560; // For showing 6 Elements.
|
|
120
119
|
};
|
|
121
120
|
|
|
122
|
-
const insertMenuWrapper =
|
|
121
|
+
const insertMenuWrapper = itemCount => css`
|
|
123
122
|
display: flex;
|
|
124
123
|
flex-direction: column;
|
|
125
124
|
width: 320px;
|
|
126
125
|
height: ${getInsertMenuHeight({
|
|
127
126
|
itemCount
|
|
128
127
|
})}px;
|
|
129
|
-
background-color: ${
|
|
130
|
-
light: `var(--ds-surface-overlay, ${N0})`,
|
|
131
|
-
dark: `var(--ds-surface-overlay, ${DN50})`
|
|
132
|
-
})(theme)};
|
|
128
|
+
background-color: ${`var(--ds-surface-overlay, ${N0})`};
|
|
133
129
|
border-radius: ${borderRadius()}px;
|
|
134
130
|
box-shadow: ${`var(--ds-shadow-overlay, ${`0 0 0 1px ${N30A},
|
|
135
131
|
0 2px 1px ${N30A},
|
package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
3
|
-
import InsertMenu from '
|
|
3
|
+
import InsertMenu from '../ElementBrowser/InsertMenu';
|
|
4
4
|
import { DropDownButton } from './dropdown-button';
|
|
5
5
|
export const BlockInsertElementBrowser = props => {
|
|
6
6
|
return /*#__PURE__*/React.createElement(React.Fragment, null, props.open && /*#__PURE__*/React.createElement(Popup, {
|
|
@@ -3,7 +3,7 @@ import memoize from 'lodash/memoize';
|
|
|
3
3
|
import memoizeOne from 'memoize-one';
|
|
4
4
|
import { messages } from './messages';
|
|
5
5
|
import { blockTypeMessages } from '@atlaskit/editor-common/messages';
|
|
6
|
-
import { ToolTipContent } from '
|
|
6
|
+
import { ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
7
7
|
import { sortItems } from './sort-items';
|
|
8
8
|
import { action, link, media, mention, emoji, table, layout, codeblock, panel, blockquote, decision, horizontalrule, expand, date, placeholder, status, more, imageUpload } from './item';
|
|
9
9
|
import { shallowEquals } from './shallow-equals';
|