@atlaskit/editor-core 189.1.12 → 189.1.13
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 +7 -0
- package/dist/cjs/plugins/index.js +0 -7
- package/dist/cjs/plugins/insert-block/index.js +6 -10
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +40 -38
- package/dist/cjs/presets/universal.js +2 -1
- package/dist/cjs/ui/ContentStyles/index.js +1 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/plugins/index.js +0 -1
- package/dist/es2019/plugins/insert-block/index.js +5 -9
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +4 -3
- package/dist/es2019/presets/universal.js +2 -1
- package/dist/es2019/ui/ContentStyles/index.js +1 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/plugins/index.js +0 -1
- package/dist/esm/plugins/insert-block/index.js +5 -9
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +40 -38
- package/dist/esm/presets/universal.js +2 -1
- package/dist/esm/ui/ContentStyles/index.js +1 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/plugins/index.d.ts +0 -1
- package/dist/types/plugins/insert-block/types.d.ts +3 -1
- package/dist/types/types/editor-props.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
- package/dist/types-ts4.5/plugins/index.d.ts +0 -1
- package/dist/types-ts4.5/plugins/insert-block/types.d.ts +3 -1
- package/dist/types-ts4.5/types/editor-props.d.ts +1 -1
- package/dist/types-ts4.5/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
- package/package.json +3 -2
- package/report.api.md +1 -6
- package/tmp/api-report-tmp.d.ts +1 -6
- package/dist/cjs/plugins/placeholder-text/actions.js +0 -35
- package/dist/cjs/plugins/placeholder-text/fake-text-cursor/cursor.js +0 -107
- package/dist/cjs/plugins/placeholder-text/index.js +0 -20
- package/dist/cjs/plugins/placeholder-text/placeholder-text-nodeview.js +0 -89
- package/dist/cjs/plugins/placeholder-text/plugin-key.js +0 -8
- package/dist/cjs/plugins/placeholder-text/plugin.js +0 -267
- package/dist/cjs/plugins/placeholder-text/selection-utils.js +0 -14
- package/dist/cjs/plugins/placeholder-text/styles.js +0 -13
- package/dist/cjs/plugins/placeholder-text/types.js +0 -5
- package/dist/cjs/plugins/placeholder-text/ui/FloatingToolbar/index.js +0 -86
- package/dist/cjs/plugins/placeholder-text/ui/FloatingToolbar/styles.js +0 -15
- package/dist/cjs/plugins/placeholder-text/ui/FloatingToolbar/utils.js +0 -54
- package/dist/cjs/plugins/placeholder-text/ui/PlaceholderFloatingToolbar/index.js +0 -89
- package/dist/es2019/plugins/placeholder-text/actions.js +0 -27
- package/dist/es2019/plugins/placeholder-text/fake-text-cursor/cursor.js +0 -77
- package/dist/es2019/plugins/placeholder-text/index.js +0 -2
- package/dist/es2019/plugins/placeholder-text/placeholder-text-nodeview.js +0 -77
- package/dist/es2019/plugins/placeholder-text/plugin-key.js +0 -2
- package/dist/es2019/plugins/placeholder-text/plugin.js +0 -247
- package/dist/es2019/plugins/placeholder-text/selection-utils.js +0 -8
- package/dist/es2019/plugins/placeholder-text/styles.js +0 -52
- package/dist/es2019/plugins/placeholder-text/types.js +0 -1
- package/dist/es2019/plugins/placeholder-text/ui/FloatingToolbar/index.js +0 -45
- package/dist/es2019/plugins/placeholder-text/ui/FloatingToolbar/styles.js +0 -15
- package/dist/es2019/plugins/placeholder-text/ui/FloatingToolbar/utils.js +0 -41
- package/dist/es2019/plugins/placeholder-text/ui/PlaceholderFloatingToolbar/index.js +0 -60
- package/dist/esm/plugins/placeholder-text/actions.js +0 -29
- package/dist/esm/plugins/placeholder-text/fake-text-cursor/cursor.js +0 -100
- package/dist/esm/plugins/placeholder-text/index.js +0 -2
- package/dist/esm/plugins/placeholder-text/placeholder-text-nodeview.js +0 -82
- package/dist/esm/plugins/placeholder-text/plugin-key.js +0 -2
- package/dist/esm/plugins/placeholder-text/plugin.js +0 -259
- package/dist/esm/plugins/placeholder-text/selection-utils.js +0 -8
- package/dist/esm/plugins/placeholder-text/styles.js +0 -6
- package/dist/esm/plugins/placeholder-text/types.js +0 -1
- package/dist/esm/plugins/placeholder-text/ui/FloatingToolbar/index.js +0 -63
- package/dist/esm/plugins/placeholder-text/ui/FloatingToolbar/styles.js +0 -8
- package/dist/esm/plugins/placeholder-text/ui/FloatingToolbar/utils.js +0 -48
- package/dist/esm/plugins/placeholder-text/ui/PlaceholderFloatingToolbar/index.js +0 -79
- package/dist/types/plugins/placeholder-text/actions.d.ts +0 -4
- package/dist/types/plugins/placeholder-text/fake-text-cursor/cursor.d.ts +0 -30
- package/dist/types/plugins/placeholder-text/index.d.ts +0 -3
- package/dist/types/plugins/placeholder-text/placeholder-text-nodeview.d.ts +0 -17
- package/dist/types/plugins/placeholder-text/plugin-key.d.ts +0 -3
- package/dist/types/plugins/placeholder-text/plugin.d.ts +0 -7
- package/dist/types/plugins/placeholder-text/selection-utils.d.ts +0 -2
- package/dist/types/plugins/placeholder-text/styles.d.ts +0 -1
- package/dist/types/plugins/placeholder-text/types.d.ts +0 -18
- package/dist/types/plugins/placeholder-text/ui/FloatingToolbar/index.d.ts +0 -28
- package/dist/types/plugins/placeholder-text/ui/FloatingToolbar/styles.d.ts +0 -1
- package/dist/types/plugins/placeholder-text/ui/FloatingToolbar/utils.d.ts +0 -13
- package/dist/types/plugins/placeholder-text/ui/PlaceholderFloatingToolbar/index.d.ts +0 -25
- package/dist/types-ts4.5/plugins/placeholder-text/actions.d.ts +0 -4
- package/dist/types-ts4.5/plugins/placeholder-text/fake-text-cursor/cursor.d.ts +0 -30
- package/dist/types-ts4.5/plugins/placeholder-text/index.d.ts +0 -3
- package/dist/types-ts4.5/plugins/placeholder-text/placeholder-text-nodeview.d.ts +0 -17
- package/dist/types-ts4.5/plugins/placeholder-text/plugin-key.d.ts +0 -3
- package/dist/types-ts4.5/plugins/placeholder-text/plugin.d.ts +0 -7
- package/dist/types-ts4.5/plugins/placeholder-text/selection-utils.d.ts +0 -2
- package/dist/types-ts4.5/plugins/placeholder-text/styles.d.ts +0 -1
- package/dist/types-ts4.5/plugins/placeholder-text/types.d.ts +0 -18
- package/dist/types-ts4.5/plugins/placeholder-text/ui/FloatingToolbar/index.d.ts +0 -28
- package/dist/types-ts4.5/plugins/placeholder-text/ui/FloatingToolbar/styles.d.ts +0 -1
- package/dist/types-ts4.5/plugins/placeholder-text/ui/FloatingToolbar/utils.d.ts +0 -13
- package/dist/types-ts4.5/plugins/placeholder-text/ui/PlaceholderFloatingToolbar/index.d.ts +0 -25
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 189.1.13
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#42391](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42391) [`f46e9fd8b00`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f46e9fd8b00) - [ux] ED-20479: Extracts placeholder-test editor plugin from editor-core
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
3
10
|
## 189.1.12
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -161,12 +161,6 @@ Object.defineProperty(exports, "pastePlugin", {
|
|
|
161
161
|
return _paste.default;
|
|
162
162
|
}
|
|
163
163
|
});
|
|
164
|
-
Object.defineProperty(exports, "placeholderTextPlugin", {
|
|
165
|
-
enumerable: true,
|
|
166
|
-
get: function get() {
|
|
167
|
-
return _placeholderText.placeholderTextPlugin;
|
|
168
|
-
}
|
|
169
|
-
});
|
|
170
164
|
Object.defineProperty(exports, "tasksAndDecisionsPlugin", {
|
|
171
165
|
enumerable: true,
|
|
172
166
|
get: function get() {
|
|
@@ -202,7 +196,6 @@ var _macro = _interopRequireDefault(require("./macro"));
|
|
|
202
196
|
var _maxContentSize = _interopRequireDefault(require("./max-content-size"));
|
|
203
197
|
var _panel = _interopRequireDefault(require("./panel"));
|
|
204
198
|
var _paste = _interopRequireDefault(require("./paste"));
|
|
205
|
-
var _placeholderText = require("./placeholder-text");
|
|
206
199
|
var _tasksAndDecisions = _interopRequireDefault(require("./tasks-and-decisions"));
|
|
207
200
|
var _breakout = _interopRequireDefault(require("./breakout"));
|
|
208
201
|
var _alignment = _interopRequireDefault(require("./alignment"));
|
|
@@ -12,8 +12,7 @@ var _WithPluginState = _interopRequireDefault(require("../../ui/WithPluginState"
|
|
|
12
12
|
var _ToolbarInsertBlock = _interopRequireDefault(require("./ui/ToolbarInsertBlock"));
|
|
13
13
|
var _consts = require("@atlaskit/editor-plugin-block-type/consts");
|
|
14
14
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
15
|
-
var _pluginKey = require("../
|
|
16
|
-
var _pluginKey2 = require("../macro/plugin-key");
|
|
15
|
+
var _pluginKey = require("../macro/plugin-key");
|
|
17
16
|
var _types = require("../../ui/Toolbar/types");
|
|
18
17
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
19
18
|
var toolbarSizeToButtons = function toolbarSizeToButtons(toolbarSize) {
|
|
@@ -74,13 +73,11 @@ var insertBlockPlugin = function insertBlockPlugin(_ref) {
|
|
|
74
73
|
// `ToolbarInsertBlockWithInjectionApi` and remove `WithPluginState`
|
|
75
74
|
return /*#__PURE__*/_react.default.createElement(_WithPluginState.default, {
|
|
76
75
|
plugins: {
|
|
77
|
-
macroState:
|
|
78
|
-
placeholderTextState: _pluginKey.pluginKey
|
|
76
|
+
macroState: _pluginKey.pluginKey
|
|
79
77
|
},
|
|
80
78
|
render: function render(_ref3) {
|
|
81
79
|
var _ref3$macroState = _ref3.macroState,
|
|
82
|
-
macroState = _ref3$macroState === void 0 ? {} : _ref3$macroState
|
|
83
|
-
placeholderTextState = _ref3.placeholderTextState;
|
|
80
|
+
macroState = _ref3$macroState === void 0 ? {} : _ref3$macroState;
|
|
84
81
|
return /*#__PURE__*/_react.default.createElement(ToolbarInsertBlockWithInjectionApi, {
|
|
85
82
|
pluginInjectionApi: api,
|
|
86
83
|
editorView: editorView,
|
|
@@ -96,7 +93,6 @@ var insertBlockPlugin = function insertBlockPlugin(_ref) {
|
|
|
96
93
|
isLastItem: isLastItem,
|
|
97
94
|
featureFlags: featureFlags,
|
|
98
95
|
macroState: macroState,
|
|
99
|
-
placeholderTextState: placeholderTextState,
|
|
100
96
|
providers: providers,
|
|
101
97
|
options: options
|
|
102
98
|
});
|
|
@@ -127,10 +123,9 @@ function ToolbarInsertBlockWithInjectionApi(_ref4) {
|
|
|
127
123
|
pluginInjectionApi = _ref4.pluginInjectionApi,
|
|
128
124
|
options = _ref4.options,
|
|
129
125
|
macroState = _ref4.macroState,
|
|
130
|
-
placeholderTextState = _ref4.placeholderTextState,
|
|
131
126
|
featureFlags = _ref4.featureFlags;
|
|
132
127
|
var buttons = toolbarSizeToButtons(toolbarSize);
|
|
133
|
-
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(pluginInjectionApi, ['hyperlink', 'date', 'imageUpload', 'mention', 'emoji', 'blockType', 'media', 'typeAhead']),
|
|
128
|
+
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(pluginInjectionApi, ['hyperlink', 'date', 'imageUpload', 'mention', 'emoji', 'blockType', 'media', 'typeAhead', 'placeholderText']),
|
|
134
129
|
dateState = _useSharedPluginState.dateState,
|
|
135
130
|
hyperlinkState = _useSharedPluginState.hyperlinkState,
|
|
136
131
|
imageUploadState = _useSharedPluginState.imageUploadState,
|
|
@@ -138,7 +133,8 @@ function ToolbarInsertBlockWithInjectionApi(_ref4) {
|
|
|
138
133
|
emojiState = _useSharedPluginState.emojiState,
|
|
139
134
|
blockTypeState = _useSharedPluginState.blockTypeState,
|
|
140
135
|
mediaState = _useSharedPluginState.mediaState,
|
|
141
|
-
typeAheadState = _useSharedPluginState.typeAheadState
|
|
136
|
+
typeAheadState = _useSharedPluginState.typeAheadState,
|
|
137
|
+
placeholderTextState = _useSharedPluginState.placeholderTextState;
|
|
142
138
|
return /*#__PURE__*/_react.default.createElement(_ToolbarInsertBlock.default, {
|
|
143
139
|
pluginInjectionApi: pluginInjectionApi,
|
|
144
140
|
buttons: buttons,
|
|
@@ -22,7 +22,6 @@ var _ui = require("@atlaskit/editor-common/ui");
|
|
|
22
22
|
var _ToolbarButton = _interopRequireDefault(require("../../../../ui/ToolbarButton"));
|
|
23
23
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
24
24
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
25
|
-
var _actions = require("../../../placeholder-text/actions");
|
|
26
25
|
var _commands = require("../../../tasks-and-decisions/commands");
|
|
27
26
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
28
27
|
var _messages = require("./messages");
|
|
@@ -208,29 +207,32 @@ var ToolbarInsertBlock = exports.ToolbarInsertBlock = /*#__PURE__*/function (_Re
|
|
|
208
207
|
return true;
|
|
209
208
|
});
|
|
210
209
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "createPlaceholderText", function () {
|
|
211
|
-
var
|
|
212
|
-
|
|
210
|
+
var _pluginInjectionApi$p;
|
|
211
|
+
var _this$props3 = _this.props,
|
|
212
|
+
editorView = _this$props3.editorView,
|
|
213
|
+
pluginInjectionApi = _this$props3.pluginInjectionApi;
|
|
214
|
+
pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$p = pluginInjectionApi.placeholderText) === null || _pluginInjectionApi$p === void 0 || _pluginInjectionApi$p.actions.showPlaceholderFloatingToolbar(editorView.state, editorView.dispatch);
|
|
213
215
|
return true;
|
|
214
216
|
});
|
|
215
217
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "insertLayoutColumns", function (inputMethod) {
|
|
216
218
|
var _pluginInjectionApi$l;
|
|
217
|
-
var _this$
|
|
218
|
-
editorView = _this$
|
|
219
|
-
pluginInjectionApi = _this$
|
|
219
|
+
var _this$props4 = _this.props,
|
|
220
|
+
editorView = _this$props4.editorView,
|
|
221
|
+
pluginInjectionApi = _this$props4.pluginInjectionApi;
|
|
220
222
|
pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$l = pluginInjectionApi.layout) === null || _pluginInjectionApi$l === void 0 || _pluginInjectionApi$l.actions.insertLayoutColumns(inputMethod)(editorView.state, editorView.dispatch);
|
|
221
223
|
return true;
|
|
222
224
|
});
|
|
223
225
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "createStatus", function (inputMethod) {
|
|
224
226
|
var _pluginInjectionApi$s, _pluginInjectionApi$s2;
|
|
225
|
-
var _this$
|
|
226
|
-
pluginInjectionApi = _this$
|
|
227
|
-
editorView = _this$
|
|
227
|
+
var _this$props5 = _this.props,
|
|
228
|
+
pluginInjectionApi = _this$props5.pluginInjectionApi,
|
|
229
|
+
editorView = _this$props5.editorView;
|
|
228
230
|
return (_pluginInjectionApi$s = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$s2 = pluginInjectionApi.status) === null || _pluginInjectionApi$s2 === void 0 || (_pluginInjectionApi$s2 = _pluginInjectionApi$s2.actions) === null || _pluginInjectionApi$s2 === void 0 ? void 0 : _pluginInjectionApi$s2.updateStatus(inputMethod)(editorView.state, editorView.dispatch)) !== null && _pluginInjectionApi$s !== void 0 ? _pluginInjectionApi$s : false;
|
|
229
231
|
});
|
|
230
232
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "openMediaPicker", function (inputMethod) {
|
|
231
|
-
var _this$
|
|
232
|
-
onShowMediaPicker = _this$
|
|
233
|
-
dispatchAnalyticsEvent = _this$
|
|
233
|
+
var _this$props6 = _this.props,
|
|
234
|
+
onShowMediaPicker = _this$props6.onShowMediaPicker,
|
|
235
|
+
dispatchAnalyticsEvent = _this$props6.dispatchAnalyticsEvent;
|
|
234
236
|
if (onShowMediaPicker) {
|
|
235
237
|
onShowMediaPicker();
|
|
236
238
|
if (dispatchAnalyticsEvent) {
|
|
@@ -260,27 +262,27 @@ var ToolbarInsertBlock = exports.ToolbarInsertBlock = /*#__PURE__*/function (_Re
|
|
|
260
262
|
});
|
|
261
263
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "insertHorizontalRule", function (inputMethod) {
|
|
262
264
|
var _pluginInjectionApi$r, _pluginInjectionApi$r2;
|
|
263
|
-
var _this$props6 = _this.props,
|
|
264
|
-
_this$props6$editorVi = _this$props6.editorView,
|
|
265
|
-
state = _this$props6$editorVi.state,
|
|
266
|
-
dispatch = _this$props6$editorVi.dispatch,
|
|
267
|
-
pluginInjectionApi = _this$props6.pluginInjectionApi;
|
|
268
|
-
return (_pluginInjectionApi$r = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$r2 = pluginInjectionApi.rule) === null || _pluginInjectionApi$r2 === void 0 ? void 0 : _pluginInjectionApi$r2.actions.insertHorizontalRule(inputMethod)(state, dispatch)) !== null && _pluginInjectionApi$r !== void 0 ? _pluginInjectionApi$r : false;
|
|
269
|
-
});
|
|
270
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "insertExpand", function () {
|
|
271
|
-
var _pluginInjectionApi$e, _pluginInjectionApi$e2;
|
|
272
265
|
var _this$props7 = _this.props,
|
|
273
266
|
_this$props7$editorVi = _this$props7.editorView,
|
|
274
267
|
state = _this$props7$editorVi.state,
|
|
275
268
|
dispatch = _this$props7$editorVi.dispatch,
|
|
276
269
|
pluginInjectionApi = _this$props7.pluginInjectionApi;
|
|
270
|
+
return (_pluginInjectionApi$r = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$r2 = pluginInjectionApi.rule) === null || _pluginInjectionApi$r2 === void 0 ? void 0 : _pluginInjectionApi$r2.actions.insertHorizontalRule(inputMethod)(state, dispatch)) !== null && _pluginInjectionApi$r !== void 0 ? _pluginInjectionApi$r : false;
|
|
271
|
+
});
|
|
272
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "insertExpand", function () {
|
|
273
|
+
var _pluginInjectionApi$e, _pluginInjectionApi$e2;
|
|
274
|
+
var _this$props8 = _this.props,
|
|
275
|
+
_this$props8$editorVi = _this$props8.editorView,
|
|
276
|
+
state = _this$props8$editorVi.state,
|
|
277
|
+
dispatch = _this$props8$editorVi.dispatch,
|
|
278
|
+
pluginInjectionApi = _this$props8.pluginInjectionApi;
|
|
277
279
|
return (_pluginInjectionApi$e = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$e2 = pluginInjectionApi.expand) === null || _pluginInjectionApi$e2 === void 0 ? void 0 : _pluginInjectionApi$e2.actions.insertExpand(state, dispatch)) !== null && _pluginInjectionApi$e !== void 0 ? _pluginInjectionApi$e : false;
|
|
278
280
|
});
|
|
279
281
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "insertBlockType", function (itemName) {
|
|
280
282
|
return function () {
|
|
281
|
-
var _this$
|
|
282
|
-
editorView = _this$
|
|
283
|
-
onInsertBlockType = _this$
|
|
283
|
+
var _this$props9 = _this.props,
|
|
284
|
+
editorView = _this$props9.editorView,
|
|
285
|
+
onInsertBlockType = _this$props9.onInsertBlockType;
|
|
284
286
|
var state = editorView.state,
|
|
285
287
|
dispatch = editorView.dispatch;
|
|
286
288
|
onInsertBlockType(itemName)(state, dispatch);
|
|
@@ -304,11 +306,11 @@ var ToolbarInsertBlock = exports.ToolbarInsertBlock = /*#__PURE__*/function (_Re
|
|
|
304
306
|
var _this$props$pluginInj;
|
|
305
307
|
var item = _ref2.item,
|
|
306
308
|
inputMethod = _ref2.inputMethod;
|
|
307
|
-
var _this$
|
|
308
|
-
editorView = _this$
|
|
309
|
-
editorActions = _this$
|
|
310
|
-
handleImageUpload = _this$
|
|
311
|
-
expandEnabled = _this$
|
|
309
|
+
var _this$props10 = _this.props,
|
|
310
|
+
editorView = _this$props10.editorView,
|
|
311
|
+
editorActions = _this$props10.editorActions,
|
|
312
|
+
handleImageUpload = _this$props10.handleImageUpload,
|
|
313
|
+
expandEnabled = _this$props10.expandEnabled;
|
|
312
314
|
|
|
313
315
|
// need to do this before inserting nodes so scrollIntoView works properly
|
|
314
316
|
if (!editorView.hasFocus()) {
|
|
@@ -424,12 +426,12 @@ var ToolbarInsertBlock = exports.ToolbarInsertBlock = /*#__PURE__*/function (_Re
|
|
|
424
426
|
key: "renderPopup",
|
|
425
427
|
value: function renderPopup() {
|
|
426
428
|
var emojiPickerOpen = this.state.emojiPickerOpen;
|
|
427
|
-
var _this$
|
|
428
|
-
popupsMountPoint = _this$
|
|
429
|
-
popupsBoundariesElement = _this$
|
|
430
|
-
popupsScrollableElement = _this$
|
|
431
|
-
emojiProvider = _this$
|
|
432
|
-
replacePlusMenuWithElementBrowser = _this$
|
|
429
|
+
var _this$props11 = this.props,
|
|
430
|
+
popupsMountPoint = _this$props11.popupsMountPoint,
|
|
431
|
+
popupsBoundariesElement = _this$props11.popupsBoundariesElement,
|
|
432
|
+
popupsScrollableElement = _this$props11.popupsScrollableElement,
|
|
433
|
+
emojiProvider = _this$props11.emojiProvider,
|
|
434
|
+
replacePlusMenuWithElementBrowser = _this$props11.replacePlusMenuWithElementBrowser;
|
|
433
435
|
var dropdownEmoji = this.state.dropdownItems.some(function (_ref4) {
|
|
434
436
|
var name = _ref4.value.name;
|
|
435
437
|
return name === 'emoji';
|
|
@@ -466,9 +468,9 @@ var ToolbarInsertBlock = exports.ToolbarInsertBlock = /*#__PURE__*/function (_Re
|
|
|
466
468
|
buttons = _this$state.buttons,
|
|
467
469
|
dropdownItems = _this$state.dropdownItems,
|
|
468
470
|
emojiPickerOpen = _this$state.emojiPickerOpen;
|
|
469
|
-
var _this$
|
|
470
|
-
isDisabled = _this$
|
|
471
|
-
isReducedSpacing = _this$
|
|
471
|
+
var _this$props12 = this.props,
|
|
472
|
+
isDisabled = _this$props12.isDisabled,
|
|
473
|
+
isReducedSpacing = _this$props12.isReducedSpacing;
|
|
472
474
|
if (buttons.length === 0 && dropdownItems.length === 0) {
|
|
473
475
|
return null;
|
|
474
476
|
}
|
|
@@ -33,6 +33,7 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
|
33
33
|
var _editorPluginSaveOnEnter = require("@atlaskit/editor-plugin-save-on-enter");
|
|
34
34
|
var _editorPluginScrollIntoView = require("@atlaskit/editor-plugin-scroll-into-view");
|
|
35
35
|
var _editorPluginMentions = require("@atlaskit/editor-plugin-mentions");
|
|
36
|
+
var _editorPluginPlaceholderText = require("@atlaskit/editor-plugin-placeholder-text");
|
|
36
37
|
var _isFullPage = require("../utils/is-full-page");
|
|
37
38
|
var _mediaCommon = require("@atlaskit/media-common");
|
|
38
39
|
var _default = require("./default");
|
|
@@ -288,7 +289,7 @@ function createUniversalPreset(appearance, props, featureFlags, prevAppearance,
|
|
|
288
289
|
}]);
|
|
289
290
|
}
|
|
290
291
|
return builder;
|
|
291
|
-
}).maybeAdd(
|
|
292
|
+
}).maybeAdd(_editorPluginPlaceholderText.placeholderTextPlugin, function (plugin, builder) {
|
|
292
293
|
if (props.allowTemplatePlaceholders) {
|
|
293
294
|
var options = props.allowTemplatePlaceholders !== true ? props.allowTemplatePlaceholders : {};
|
|
294
295
|
return builder.add([plugin, options]);
|
|
@@ -20,7 +20,7 @@ var _styles5 = require("../../plugins/code-block/styles");
|
|
|
20
20
|
var _media = require("./media");
|
|
21
21
|
var _layout = require("./layout");
|
|
22
22
|
var _styles6 = require("../../plugins/panel/styles");
|
|
23
|
-
var _styles7 = require("
|
|
23
|
+
var _styles7 = require("@atlaskit/editor-plugin-placeholder-text/styles");
|
|
24
24
|
var _styles8 = require("../../plugins/extension/ui/styles");
|
|
25
25
|
var _styles9 = require("../../plugins/expand/ui/styles");
|
|
26
26
|
var _styles10 = require("../../plugins/find-replace/styles");
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.version = exports.nextMajorVersion = exports.name = void 0;
|
|
7
7
|
var name = exports.name = "@atlaskit/editor-core";
|
|
8
|
-
var version = exports.version = "189.1.
|
|
8
|
+
var version = exports.version = "189.1.13";
|
|
9
9
|
var nextMajorVersion = exports.nextMajorVersion = function nextMajorVersion() {
|
|
10
10
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
|
11
11
|
};
|
|
@@ -9,7 +9,6 @@ export { default as macroPlugin } from './macro';
|
|
|
9
9
|
export { default as maxContentSizePlugin } from './max-content-size';
|
|
10
10
|
export { default as panelPlugin } from './panel';
|
|
11
11
|
export { default as pastePlugin } from './paste';
|
|
12
|
-
export { placeholderTextPlugin } from './placeholder-text';
|
|
13
12
|
export { default as tasksAndDecisionsPlugin } from './tasks-and-decisions';
|
|
14
13
|
export { default as breakoutPlugin } from './breakout';
|
|
15
14
|
export { default as alignmentPlugin } from './alignment';
|
|
@@ -5,7 +5,6 @@ import WithPluginState from '../../ui/WithPluginState';
|
|
|
5
5
|
import ToolbarInsertBlock from './ui/ToolbarInsertBlock';
|
|
6
6
|
import { BLOCK_QUOTE, CODE_BLOCK, PANEL } from '@atlaskit/editor-plugin-block-type/consts';
|
|
7
7
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
8
|
-
import { pluginKey as placeholderTextStateKey } from '../placeholder-text/plugin-key';
|
|
9
8
|
import { pluginKey as macroStateKey } from '../macro/plugin-key';
|
|
10
9
|
import { ToolbarSize } from '../../ui/Toolbar/types';
|
|
11
10
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
@@ -66,12 +65,10 @@ const insertBlockPlugin = ({
|
|
|
66
65
|
// `ToolbarInsertBlockWithInjectionApi` and remove `WithPluginState`
|
|
67
66
|
return /*#__PURE__*/React.createElement(WithPluginState, {
|
|
68
67
|
plugins: {
|
|
69
|
-
macroState: macroStateKey
|
|
70
|
-
placeholderTextState: placeholderTextStateKey
|
|
68
|
+
macroState: macroStateKey
|
|
71
69
|
},
|
|
72
70
|
render: ({
|
|
73
|
-
macroState = {}
|
|
74
|
-
placeholderTextState
|
|
71
|
+
macroState = {}
|
|
75
72
|
}) => {
|
|
76
73
|
return /*#__PURE__*/React.createElement(ToolbarInsertBlockWithInjectionApi, {
|
|
77
74
|
pluginInjectionApi: api,
|
|
@@ -88,7 +85,6 @@ const insertBlockPlugin = ({
|
|
|
88
85
|
isLastItem: isLastItem,
|
|
89
86
|
featureFlags: featureFlags,
|
|
90
87
|
macroState: macroState,
|
|
91
|
-
placeholderTextState: placeholderTextState,
|
|
92
88
|
providers: providers,
|
|
93
89
|
options: options
|
|
94
90
|
});
|
|
@@ -118,7 +114,6 @@ function ToolbarInsertBlockWithInjectionApi({
|
|
|
118
114
|
pluginInjectionApi,
|
|
119
115
|
options,
|
|
120
116
|
macroState,
|
|
121
|
-
placeholderTextState,
|
|
122
117
|
featureFlags
|
|
123
118
|
}) {
|
|
124
119
|
var _ref, _ref2, _pluginInjectionApi$i, _pluginInjectionApi$c, _pluginInjectionApi$p, _pluginInjectionApi$b;
|
|
@@ -131,8 +126,9 @@ function ToolbarInsertBlockWithInjectionApi({
|
|
|
131
126
|
emojiState,
|
|
132
127
|
blockTypeState,
|
|
133
128
|
mediaState,
|
|
134
|
-
typeAheadState
|
|
135
|
-
|
|
129
|
+
typeAheadState,
|
|
130
|
+
placeholderTextState
|
|
131
|
+
} = useSharedPluginState(pluginInjectionApi, ['hyperlink', 'date', 'imageUpload', 'mention', 'emoji', 'blockType', 'media', 'typeAhead', 'placeholderText']);
|
|
136
132
|
return /*#__PURE__*/React.createElement(ToolbarInsertBlock, {
|
|
137
133
|
pluginInjectionApi: pluginInjectionApi,
|
|
138
134
|
buttons: buttons,
|
|
@@ -9,7 +9,6 @@ import { Popup } from '@atlaskit/editor-common/ui';
|
|
|
9
9
|
import ToolbarButton from '../../../../ui/ToolbarButton';
|
|
10
10
|
import { separatorStyles, buttonGroupStyle, wrapperStyle } from '@atlaskit/editor-common/styles';
|
|
11
11
|
import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
|
|
12
|
-
import { showPlaceholderFloatingToolbar } from '../../../placeholder-text/actions';
|
|
13
12
|
import { insertTaskDecisionCommand } from '../../../tasks-and-decisions/commands';
|
|
14
13
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
15
14
|
import { messages } from './messages';
|
|
@@ -197,10 +196,12 @@ export class ToolbarInsertBlock extends React.PureComponent {
|
|
|
197
196
|
return true;
|
|
198
197
|
});
|
|
199
198
|
_defineProperty(this, "createPlaceholderText", () => {
|
|
199
|
+
var _pluginInjectionApi$p;
|
|
200
200
|
const {
|
|
201
|
-
editorView
|
|
201
|
+
editorView,
|
|
202
|
+
pluginInjectionApi
|
|
202
203
|
} = this.props;
|
|
203
|
-
showPlaceholderFloatingToolbar(editorView.state, editorView.dispatch);
|
|
204
|
+
pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$p = pluginInjectionApi.placeholderText) === null || _pluginInjectionApi$p === void 0 ? void 0 : _pluginInjectionApi$p.actions.showPlaceholderFloatingToolbar(editorView.state, editorView.dispatch);
|
|
204
205
|
return true;
|
|
205
206
|
});
|
|
206
207
|
_defineProperty(this, "insertLayoutColumns", inputMethod => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, insertBlockPlugin, jiraIssuePlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, panelPlugin,
|
|
1
|
+
import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, insertBlockPlugin, jiraIssuePlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, panelPlugin, tasksAndDecisionsPlugin, alignmentPlugin, indentationPlugin, customAutoformatPlugin, feedbackDialogPlugin, expandPlugin, isExpandInsertionEnabled, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin } from '../plugins';
|
|
2
2
|
import { textColorPlugin } from '@atlaskit/editor-plugin-text-color';
|
|
3
3
|
import { historyPlugin } from '@atlaskit/editor-plugin-history';
|
|
4
4
|
import { statusPlugin } from '@atlaskit/editor-plugin-status';
|
|
@@ -24,6 +24,7 @@ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
|
24
24
|
import { saveOnEnterPlugin } from '@atlaskit/editor-plugin-save-on-enter';
|
|
25
25
|
import { scrollIntoViewPlugin } from '@atlaskit/editor-plugin-scroll-into-view';
|
|
26
26
|
import { mentionsPlugin } from '@atlaskit/editor-plugin-mentions';
|
|
27
|
+
import { placeholderTextPlugin } from '@atlaskit/editor-plugin-placeholder-text';
|
|
27
28
|
import { isFullPage as fullPageCheck } from '../utils/is-full-page';
|
|
28
29
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
29
30
|
import { createDefaultPreset } from './default';
|
|
@@ -12,7 +12,7 @@ import { codeBlockStyles } from '../../plugins/code-block/styles';
|
|
|
12
12
|
import { mediaStyles } from './media';
|
|
13
13
|
import { layoutStyles } from './layout';
|
|
14
14
|
import { panelStyles } from '../../plugins/panel/styles';
|
|
15
|
-
import { placeholderTextStyles } from '
|
|
15
|
+
import { placeholderTextStyles } from '@atlaskit/editor-plugin-placeholder-text/styles';
|
|
16
16
|
import { extensionStyles } from '../../plugins/extension/ui/styles';
|
|
17
17
|
import { expandStyles } from '../../plugins/expand/ui/styles';
|
|
18
18
|
import { MediaSharedClassNames } from '@atlaskit/editor-common/styles';
|
|
@@ -9,7 +9,6 @@ export { default as macroPlugin } from './macro';
|
|
|
9
9
|
export { default as maxContentSizePlugin } from './max-content-size';
|
|
10
10
|
export { default as panelPlugin } from './panel';
|
|
11
11
|
export { default as pastePlugin } from './paste';
|
|
12
|
-
export { placeholderTextPlugin } from './placeholder-text';
|
|
13
12
|
export { default as tasksAndDecisionsPlugin } from './tasks-and-decisions';
|
|
14
13
|
export { default as breakoutPlugin } from './breakout';
|
|
15
14
|
export { default as alignmentPlugin } from './alignment';
|
|
@@ -5,7 +5,6 @@ import WithPluginState from '../../ui/WithPluginState';
|
|
|
5
5
|
import ToolbarInsertBlock from './ui/ToolbarInsertBlock';
|
|
6
6
|
import { BLOCK_QUOTE, CODE_BLOCK, PANEL } from '@atlaskit/editor-plugin-block-type/consts';
|
|
7
7
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
8
|
-
import { pluginKey as placeholderTextStateKey } from '../placeholder-text/plugin-key';
|
|
9
8
|
import { pluginKey as macroStateKey } from '../macro/plugin-key';
|
|
10
9
|
import { ToolbarSize } from '../../ui/Toolbar/types';
|
|
11
10
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
@@ -67,13 +66,11 @@ var insertBlockPlugin = function insertBlockPlugin(_ref) {
|
|
|
67
66
|
// `ToolbarInsertBlockWithInjectionApi` and remove `WithPluginState`
|
|
68
67
|
return /*#__PURE__*/React.createElement(WithPluginState, {
|
|
69
68
|
plugins: {
|
|
70
|
-
macroState: macroStateKey
|
|
71
|
-
placeholderTextState: placeholderTextStateKey
|
|
69
|
+
macroState: macroStateKey
|
|
72
70
|
},
|
|
73
71
|
render: function render(_ref3) {
|
|
74
72
|
var _ref3$macroState = _ref3.macroState,
|
|
75
|
-
macroState = _ref3$macroState === void 0 ? {} : _ref3$macroState
|
|
76
|
-
placeholderTextState = _ref3.placeholderTextState;
|
|
73
|
+
macroState = _ref3$macroState === void 0 ? {} : _ref3$macroState;
|
|
77
74
|
return /*#__PURE__*/React.createElement(ToolbarInsertBlockWithInjectionApi, {
|
|
78
75
|
pluginInjectionApi: api,
|
|
79
76
|
editorView: editorView,
|
|
@@ -89,7 +86,6 @@ var insertBlockPlugin = function insertBlockPlugin(_ref) {
|
|
|
89
86
|
isLastItem: isLastItem,
|
|
90
87
|
featureFlags: featureFlags,
|
|
91
88
|
macroState: macroState,
|
|
92
|
-
placeholderTextState: placeholderTextState,
|
|
93
89
|
providers: providers,
|
|
94
90
|
options: options
|
|
95
91
|
});
|
|
@@ -120,10 +116,9 @@ function ToolbarInsertBlockWithInjectionApi(_ref4) {
|
|
|
120
116
|
pluginInjectionApi = _ref4.pluginInjectionApi,
|
|
121
117
|
options = _ref4.options,
|
|
122
118
|
macroState = _ref4.macroState,
|
|
123
|
-
placeholderTextState = _ref4.placeholderTextState,
|
|
124
119
|
featureFlags = _ref4.featureFlags;
|
|
125
120
|
var buttons = toolbarSizeToButtons(toolbarSize);
|
|
126
|
-
var _useSharedPluginState = useSharedPluginState(pluginInjectionApi, ['hyperlink', 'date', 'imageUpload', 'mention', 'emoji', 'blockType', 'media', 'typeAhead']),
|
|
121
|
+
var _useSharedPluginState = useSharedPluginState(pluginInjectionApi, ['hyperlink', 'date', 'imageUpload', 'mention', 'emoji', 'blockType', 'media', 'typeAhead', 'placeholderText']),
|
|
127
122
|
dateState = _useSharedPluginState.dateState,
|
|
128
123
|
hyperlinkState = _useSharedPluginState.hyperlinkState,
|
|
129
124
|
imageUploadState = _useSharedPluginState.imageUploadState,
|
|
@@ -131,7 +126,8 @@ function ToolbarInsertBlockWithInjectionApi(_ref4) {
|
|
|
131
126
|
emojiState = _useSharedPluginState.emojiState,
|
|
132
127
|
blockTypeState = _useSharedPluginState.blockTypeState,
|
|
133
128
|
mediaState = _useSharedPluginState.mediaState,
|
|
134
|
-
typeAheadState = _useSharedPluginState.typeAheadState
|
|
129
|
+
typeAheadState = _useSharedPluginState.typeAheadState,
|
|
130
|
+
placeholderTextState = _useSharedPluginState.placeholderTextState;
|
|
135
131
|
return /*#__PURE__*/React.createElement(ToolbarInsertBlock, {
|
|
136
132
|
pluginInjectionApi: pluginInjectionApi,
|
|
137
133
|
buttons: buttons,
|
|
@@ -20,7 +20,6 @@ import { Popup } from '@atlaskit/editor-common/ui';
|
|
|
20
20
|
import ToolbarButton from '../../../../ui/ToolbarButton';
|
|
21
21
|
import { separatorStyles, buttonGroupStyle, wrapperStyle } from '@atlaskit/editor-common/styles';
|
|
22
22
|
import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
|
|
23
|
-
import { showPlaceholderFloatingToolbar } from '../../../placeholder-text/actions';
|
|
24
23
|
import { insertTaskDecisionCommand } from '../../../tasks-and-decisions/commands';
|
|
25
24
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
26
25
|
import { messages } from './messages';
|
|
@@ -203,29 +202,32 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
203
202
|
return true;
|
|
204
203
|
});
|
|
205
204
|
_defineProperty(_assertThisInitialized(_this), "createPlaceholderText", function () {
|
|
206
|
-
var
|
|
207
|
-
|
|
205
|
+
var _pluginInjectionApi$p;
|
|
206
|
+
var _this$props3 = _this.props,
|
|
207
|
+
editorView = _this$props3.editorView,
|
|
208
|
+
pluginInjectionApi = _this$props3.pluginInjectionApi;
|
|
209
|
+
pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$p = pluginInjectionApi.placeholderText) === null || _pluginInjectionApi$p === void 0 || _pluginInjectionApi$p.actions.showPlaceholderFloatingToolbar(editorView.state, editorView.dispatch);
|
|
208
210
|
return true;
|
|
209
211
|
});
|
|
210
212
|
_defineProperty(_assertThisInitialized(_this), "insertLayoutColumns", function (inputMethod) {
|
|
211
213
|
var _pluginInjectionApi$l;
|
|
212
|
-
var _this$
|
|
213
|
-
editorView = _this$
|
|
214
|
-
pluginInjectionApi = _this$
|
|
214
|
+
var _this$props4 = _this.props,
|
|
215
|
+
editorView = _this$props4.editorView,
|
|
216
|
+
pluginInjectionApi = _this$props4.pluginInjectionApi;
|
|
215
217
|
pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$l = pluginInjectionApi.layout) === null || _pluginInjectionApi$l === void 0 || _pluginInjectionApi$l.actions.insertLayoutColumns(inputMethod)(editorView.state, editorView.dispatch);
|
|
216
218
|
return true;
|
|
217
219
|
});
|
|
218
220
|
_defineProperty(_assertThisInitialized(_this), "createStatus", function (inputMethod) {
|
|
219
221
|
var _pluginInjectionApi$s, _pluginInjectionApi$s2;
|
|
220
|
-
var _this$
|
|
221
|
-
pluginInjectionApi = _this$
|
|
222
|
-
editorView = _this$
|
|
222
|
+
var _this$props5 = _this.props,
|
|
223
|
+
pluginInjectionApi = _this$props5.pluginInjectionApi,
|
|
224
|
+
editorView = _this$props5.editorView;
|
|
223
225
|
return (_pluginInjectionApi$s = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$s2 = pluginInjectionApi.status) === null || _pluginInjectionApi$s2 === void 0 || (_pluginInjectionApi$s2 = _pluginInjectionApi$s2.actions) === null || _pluginInjectionApi$s2 === void 0 ? void 0 : _pluginInjectionApi$s2.updateStatus(inputMethod)(editorView.state, editorView.dispatch)) !== null && _pluginInjectionApi$s !== void 0 ? _pluginInjectionApi$s : false;
|
|
224
226
|
});
|
|
225
227
|
_defineProperty(_assertThisInitialized(_this), "openMediaPicker", function (inputMethod) {
|
|
226
|
-
var _this$
|
|
227
|
-
onShowMediaPicker = _this$
|
|
228
|
-
dispatchAnalyticsEvent = _this$
|
|
228
|
+
var _this$props6 = _this.props,
|
|
229
|
+
onShowMediaPicker = _this$props6.onShowMediaPicker,
|
|
230
|
+
dispatchAnalyticsEvent = _this$props6.dispatchAnalyticsEvent;
|
|
229
231
|
if (onShowMediaPicker) {
|
|
230
232
|
onShowMediaPicker();
|
|
231
233
|
if (dispatchAnalyticsEvent) {
|
|
@@ -255,27 +257,27 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
255
257
|
});
|
|
256
258
|
_defineProperty(_assertThisInitialized(_this), "insertHorizontalRule", function (inputMethod) {
|
|
257
259
|
var _pluginInjectionApi$r, _pluginInjectionApi$r2;
|
|
258
|
-
var _this$props6 = _this.props,
|
|
259
|
-
_this$props6$editorVi = _this$props6.editorView,
|
|
260
|
-
state = _this$props6$editorVi.state,
|
|
261
|
-
dispatch = _this$props6$editorVi.dispatch,
|
|
262
|
-
pluginInjectionApi = _this$props6.pluginInjectionApi;
|
|
263
|
-
return (_pluginInjectionApi$r = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$r2 = pluginInjectionApi.rule) === null || _pluginInjectionApi$r2 === void 0 ? void 0 : _pluginInjectionApi$r2.actions.insertHorizontalRule(inputMethod)(state, dispatch)) !== null && _pluginInjectionApi$r !== void 0 ? _pluginInjectionApi$r : false;
|
|
264
|
-
});
|
|
265
|
-
_defineProperty(_assertThisInitialized(_this), "insertExpand", function () {
|
|
266
|
-
var _pluginInjectionApi$e, _pluginInjectionApi$e2;
|
|
267
260
|
var _this$props7 = _this.props,
|
|
268
261
|
_this$props7$editorVi = _this$props7.editorView,
|
|
269
262
|
state = _this$props7$editorVi.state,
|
|
270
263
|
dispatch = _this$props7$editorVi.dispatch,
|
|
271
264
|
pluginInjectionApi = _this$props7.pluginInjectionApi;
|
|
265
|
+
return (_pluginInjectionApi$r = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$r2 = pluginInjectionApi.rule) === null || _pluginInjectionApi$r2 === void 0 ? void 0 : _pluginInjectionApi$r2.actions.insertHorizontalRule(inputMethod)(state, dispatch)) !== null && _pluginInjectionApi$r !== void 0 ? _pluginInjectionApi$r : false;
|
|
266
|
+
});
|
|
267
|
+
_defineProperty(_assertThisInitialized(_this), "insertExpand", function () {
|
|
268
|
+
var _pluginInjectionApi$e, _pluginInjectionApi$e2;
|
|
269
|
+
var _this$props8 = _this.props,
|
|
270
|
+
_this$props8$editorVi = _this$props8.editorView,
|
|
271
|
+
state = _this$props8$editorVi.state,
|
|
272
|
+
dispatch = _this$props8$editorVi.dispatch,
|
|
273
|
+
pluginInjectionApi = _this$props8.pluginInjectionApi;
|
|
272
274
|
return (_pluginInjectionApi$e = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$e2 = pluginInjectionApi.expand) === null || _pluginInjectionApi$e2 === void 0 ? void 0 : _pluginInjectionApi$e2.actions.insertExpand(state, dispatch)) !== null && _pluginInjectionApi$e !== void 0 ? _pluginInjectionApi$e : false;
|
|
273
275
|
});
|
|
274
276
|
_defineProperty(_assertThisInitialized(_this), "insertBlockType", function (itemName) {
|
|
275
277
|
return function () {
|
|
276
|
-
var _this$
|
|
277
|
-
editorView = _this$
|
|
278
|
-
onInsertBlockType = _this$
|
|
278
|
+
var _this$props9 = _this.props,
|
|
279
|
+
editorView = _this$props9.editorView,
|
|
280
|
+
onInsertBlockType = _this$props9.onInsertBlockType;
|
|
279
281
|
var state = editorView.state,
|
|
280
282
|
dispatch = editorView.dispatch;
|
|
281
283
|
onInsertBlockType(itemName)(state, dispatch);
|
|
@@ -299,11 +301,11 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
299
301
|
var _this$props$pluginInj;
|
|
300
302
|
var item = _ref2.item,
|
|
301
303
|
inputMethod = _ref2.inputMethod;
|
|
302
|
-
var _this$
|
|
303
|
-
editorView = _this$
|
|
304
|
-
editorActions = _this$
|
|
305
|
-
handleImageUpload = _this$
|
|
306
|
-
expandEnabled = _this$
|
|
304
|
+
var _this$props10 = _this.props,
|
|
305
|
+
editorView = _this$props10.editorView,
|
|
306
|
+
editorActions = _this$props10.editorActions,
|
|
307
|
+
handleImageUpload = _this$props10.handleImageUpload,
|
|
308
|
+
expandEnabled = _this$props10.expandEnabled;
|
|
307
309
|
|
|
308
310
|
// need to do this before inserting nodes so scrollIntoView works properly
|
|
309
311
|
if (!editorView.hasFocus()) {
|
|
@@ -419,12 +421,12 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
419
421
|
key: "renderPopup",
|
|
420
422
|
value: function renderPopup() {
|
|
421
423
|
var emojiPickerOpen = this.state.emojiPickerOpen;
|
|
422
|
-
var _this$
|
|
423
|
-
popupsMountPoint = _this$
|
|
424
|
-
popupsBoundariesElement = _this$
|
|
425
|
-
popupsScrollableElement = _this$
|
|
426
|
-
emojiProvider = _this$
|
|
427
|
-
replacePlusMenuWithElementBrowser = _this$
|
|
424
|
+
var _this$props11 = this.props,
|
|
425
|
+
popupsMountPoint = _this$props11.popupsMountPoint,
|
|
426
|
+
popupsBoundariesElement = _this$props11.popupsBoundariesElement,
|
|
427
|
+
popupsScrollableElement = _this$props11.popupsScrollableElement,
|
|
428
|
+
emojiProvider = _this$props11.emojiProvider,
|
|
429
|
+
replacePlusMenuWithElementBrowser = _this$props11.replacePlusMenuWithElementBrowser;
|
|
428
430
|
var dropdownEmoji = this.state.dropdownItems.some(function (_ref4) {
|
|
429
431
|
var name = _ref4.value.name;
|
|
430
432
|
return name === 'emoji';
|
|
@@ -461,9 +463,9 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
461
463
|
buttons = _this$state.buttons,
|
|
462
464
|
dropdownItems = _this$state.dropdownItems,
|
|
463
465
|
emojiPickerOpen = _this$state.emojiPickerOpen;
|
|
464
|
-
var _this$
|
|
465
|
-
isDisabled = _this$
|
|
466
|
-
isReducedSpacing = _this$
|
|
466
|
+
var _this$props12 = this.props,
|
|
467
|
+
isDisabled = _this$props12.isDisabled,
|
|
468
|
+
isReducedSpacing = _this$props12.isReducedSpacing;
|
|
467
469
|
if (buttons.length === 0 && dropdownItems.length === 0) {
|
|
468
470
|
return null;
|
|
469
471
|
}
|
|
@@ -2,7 +2,7 @@ import _typeof from "@babel/runtime/helpers/typeof";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
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; }
|
|
4
4
|
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; }
|
|
5
|
-
import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, insertBlockPlugin, jiraIssuePlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, panelPlugin,
|
|
5
|
+
import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, insertBlockPlugin, jiraIssuePlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, panelPlugin, tasksAndDecisionsPlugin, alignmentPlugin, indentationPlugin, customAutoformatPlugin, feedbackDialogPlugin, expandPlugin, isExpandInsertionEnabled, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin } from '../plugins';
|
|
6
6
|
import { textColorPlugin } from '@atlaskit/editor-plugin-text-color';
|
|
7
7
|
import { historyPlugin } from '@atlaskit/editor-plugin-history';
|
|
8
8
|
import { statusPlugin } from '@atlaskit/editor-plugin-status';
|
|
@@ -28,6 +28,7 @@ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
|
28
28
|
import { saveOnEnterPlugin } from '@atlaskit/editor-plugin-save-on-enter';
|
|
29
29
|
import { scrollIntoViewPlugin } from '@atlaskit/editor-plugin-scroll-into-view';
|
|
30
30
|
import { mentionsPlugin } from '@atlaskit/editor-plugin-mentions';
|
|
31
|
+
import { placeholderTextPlugin } from '@atlaskit/editor-plugin-placeholder-text';
|
|
31
32
|
import { isFullPage as fullPageCheck } from '../utils/is-full-page';
|
|
32
33
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
33
34
|
import { createDefaultPreset } from './default';
|
|
@@ -14,7 +14,7 @@ import { codeBlockStyles } from '../../plugins/code-block/styles';
|
|
|
14
14
|
import { mediaStyles } from './media';
|
|
15
15
|
import { layoutStyles } from './layout';
|
|
16
16
|
import { panelStyles } from '../../plugins/panel/styles';
|
|
17
|
-
import { placeholderTextStyles } from '
|
|
17
|
+
import { placeholderTextStyles } from '@atlaskit/editor-plugin-placeholder-text/styles';
|
|
18
18
|
import { extensionStyles } from '../../plugins/extension/ui/styles';
|
|
19
19
|
import { expandStyles } from '../../plugins/expand/ui/styles';
|
|
20
20
|
import { MediaSharedClassNames } from '@atlaskit/editor-common/styles';
|