@atlaskit/editor-core 189.3.23 → 189.3.25
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 +13 -0
- package/dist/cjs/plugins/index.js +0 -7
- package/dist/cjs/plugins/toolbar-lists-indentation/index.js +2 -13
- package/dist/cjs/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +0 -3
- package/dist/cjs/presets/universal.js +2 -1
- package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +3 -43
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/plugins/index.js +0 -1
- package/dist/es2019/plugins/toolbar-lists-indentation/index.js +2 -11
- package/dist/es2019/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +0 -2
- package/dist/es2019/presets/universal.js +2 -1
- package/dist/es2019/ui/ConfigPanel/ConfigPanel.js +1 -42
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/plugins/index.js +0 -1
- package/dist/esm/plugins/toolbar-lists-indentation/index.js +2 -11
- package/dist/esm/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +0 -2
- package/dist/esm/presets/universal.js +2 -1
- package/dist/esm/ui/ConfigPanel/ConfigPanel.js +2 -42
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/plugins/index.d.ts +0 -1
- package/dist/types/plugins/toolbar-lists-indentation/index.d.ts +1 -3
- package/dist/types/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.d.ts +0 -2
- package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +4 -3
- package/dist/types-ts4.5/plugins/index.d.ts +0 -1
- package/dist/types-ts4.5/plugins/toolbar-lists-indentation/index.d.ts +1 -3
- package/dist/types-ts4.5/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.d.ts +0 -2
- package/dist/types-ts4.5/ui/ConfigPanel/ConfigPanel.d.ts +4 -3
- package/package.json +2 -1
- package/dist/cjs/plugins/indentation/commands/index.js +0 -140
- package/dist/cjs/plugins/indentation/commands/utils.js +0 -92
- package/dist/cjs/plugins/indentation/getAttrsWithChangesRecorder.js +0 -38
- package/dist/cjs/plugins/indentation/index.js +0 -54
- package/dist/cjs/plugins/indentation/pm-plugins/keymap.js +0 -26
- package/dist/es2019/plugins/indentation/commands/index.js +0 -130
- package/dist/es2019/plugins/indentation/commands/utils.js +0 -89
- package/dist/es2019/plugins/indentation/getAttrsWithChangesRecorder.js +0 -32
- package/dist/es2019/plugins/indentation/index.js +0 -55
- package/dist/es2019/plugins/indentation/pm-plugins/keymap.js +0 -21
- package/dist/esm/plugins/indentation/commands/index.js +0 -133
- package/dist/esm/plugins/indentation/commands/utils.js +0 -85
- package/dist/esm/plugins/indentation/getAttrsWithChangesRecorder.js +0 -32
- package/dist/esm/plugins/indentation/index.js +0 -48
- package/dist/esm/plugins/indentation/pm-plugins/keymap.js +0 -19
- package/dist/types/plugins/indentation/commands/index.d.ts +0 -8
- package/dist/types/plugins/indentation/commands/utils.d.ts +0 -37
- package/dist/types/plugins/indentation/getAttrsWithChangesRecorder.d.ts +0 -23
- package/dist/types/plugins/indentation/index.d.ts +0 -18
- package/dist/types/plugins/indentation/pm-plugins/keymap.d.ts +0 -4
- package/dist/types-ts4.5/plugins/indentation/commands/index.d.ts +0 -8
- package/dist/types-ts4.5/plugins/indentation/commands/utils.d.ts +0 -37
- package/dist/types-ts4.5/plugins/indentation/getAttrsWithChangesRecorder.d.ts +0 -23
- package/dist/types-ts4.5/plugins/indentation/index.d.ts +0 -20
- package/dist/types-ts4.5/plugins/indentation/pm-plugins/keymap.d.ts +0 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 189.3.25
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#43274](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/43274) [`d162c359ccf`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d162c359ccf) - Move indentation plugin code from editor-core to editor-plugin-indentation.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
10
|
+
## 189.3.24
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [#42256](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42256) [`9c1a79051b6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9c1a79051b6) - Avoid submitting certain attributes for config panel analytic events
|
|
15
|
+
|
|
3
16
|
## 189.3.23
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -82,12 +82,6 @@ Object.defineProperty(exports, "findReplacePlugin", {
|
|
|
82
82
|
return _findReplace.default;
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
|
-
Object.defineProperty(exports, "indentationPlugin", {
|
|
86
|
-
enumerable: true,
|
|
87
|
-
get: function get() {
|
|
88
|
-
return _indentation.default;
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
85
|
Object.defineProperty(exports, "insertBlockPlugin", {
|
|
92
86
|
enumerable: true,
|
|
93
87
|
get: function get() {
|
|
@@ -153,7 +147,6 @@ var _tasksAndDecisions = _interopRequireDefault(require("./tasks-and-decisions")
|
|
|
153
147
|
var _breakout = _interopRequireDefault(require("./breakout"));
|
|
154
148
|
var _alignment = _interopRequireDefault(require("./alignment"));
|
|
155
149
|
var _dataConsumer = _interopRequireDefault(require("./data-consumer"));
|
|
156
|
-
var _indentation = _interopRequireDefault(require("./indentation"));
|
|
157
150
|
var _annotation = _interopRequireDefault(require("./annotation"));
|
|
158
151
|
var _customAutoformat = _interopRequireDefault(require("./custom-autoformat"));
|
|
159
152
|
var _feedbackDialog = _interopRequireDefault(require("./feedback-dialog"));
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.PrimaryToolbarComponent = PrimaryToolbarComponent;
|
|
9
8
|
exports.default = void 0;
|
|
10
|
-
var _react =
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
10
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
12
11
|
var _ui = _interopRequireDefault(require("./ui"));
|
|
13
12
|
var _types = require("../../ui/Toolbar/types");
|
|
14
13
|
var _indentationButtons = require("./pm-plugins/indentation-buttons");
|
|
15
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
14
|
var toolbarListsIndentationPlugin = function toolbarListsIndentationPlugin(_ref) {
|
|
18
15
|
var _api$featureFlags;
|
|
19
16
|
var config = _ref.config,
|
|
@@ -26,12 +23,6 @@ var toolbarListsIndentationPlugin = function toolbarListsIndentationPlugin(_ref)
|
|
|
26
23
|
var featureFlags = (api === null || api === void 0 || (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
|
|
27
24
|
return {
|
|
28
25
|
name: 'toolbarListsIndentation',
|
|
29
|
-
getSharedState: function getSharedState(editorState) {
|
|
30
|
-
if (!editorState) {
|
|
31
|
-
return undefined;
|
|
32
|
-
}
|
|
33
|
-
return _indentationButtons.pluginKey.getState(editorState);
|
|
34
|
-
},
|
|
35
26
|
primaryToolbarComponent: function primaryToolbarComponent(_ref3) {
|
|
36
27
|
var editorView = _ref3.editorView,
|
|
37
28
|
popupsMountPoint = _ref3.popupsMountPoint,
|
|
@@ -73,9 +64,7 @@ function PrimaryToolbarComponent(_ref4) {
|
|
|
73
64
|
listState = _useSharedPluginState.listState,
|
|
74
65
|
indentationState = _useSharedPluginState.indentationState,
|
|
75
66
|
taskDecisionState = _useSharedPluginState.taskDecisionState;
|
|
76
|
-
var toolbarListsIndentationState = (0,
|
|
77
|
-
return (0, _indentationButtons.getIndentationButtonsState)(editorView.state, allowHeadingAndParagraphIndentation, taskDecisionState, indentationState, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.list.actions.isInsideListItem);
|
|
78
|
-
}, [editorView.state, allowHeadingAndParagraphIndentation, taskDecisionState, indentationState, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.list.actions.isInsideListItem]);
|
|
67
|
+
var toolbarListsIndentationState = (0, _indentationButtons.getIndentationButtonsState)(editorView.state, allowHeadingAndParagraphIndentation, taskDecisionState, indentationState, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.list.actions.isInsideListItem);
|
|
79
68
|
if (!listState) {
|
|
80
69
|
return null;
|
|
81
70
|
}
|
|
@@ -4,12 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getIndentationButtonsState = getIndentationButtonsState;
|
|
7
|
-
exports.pluginKey = void 0;
|
|
8
|
-
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
9
7
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
10
8
|
var _lists = require("@atlaskit/editor-common/lists");
|
|
11
9
|
var _indentation = require("@atlaskit/editor-common/indentation");
|
|
12
|
-
var pluginKey = exports.pluginKey = new _state.PluginKey('indentationButtonsPlugin');
|
|
13
10
|
function getIndentationButtonsState(editorState, allowHeadingAndParagraphIndentation, taskDecisionState, indentationState, isInsideListItem) {
|
|
14
11
|
var _indentationState$isI;
|
|
15
12
|
var state = {
|
|
@@ -12,6 +12,7 @@ var _plugins = require("../plugins");
|
|
|
12
12
|
var _editorPluginPanel = require("@atlaskit/editor-plugin-panel");
|
|
13
13
|
var _editorPluginTextColor = require("@atlaskit/editor-plugin-text-color");
|
|
14
14
|
var _editorPluginHistory = require("@atlaskit/editor-plugin-history");
|
|
15
|
+
var _editorPluginIndentation = require("@atlaskit/editor-plugin-indentation");
|
|
15
16
|
var _editorPluginStatus = require("@atlaskit/editor-plugin-status");
|
|
16
17
|
var _editorPluginDate = require("@atlaskit/editor-plugin-date");
|
|
17
18
|
var _editorPluginMaxContentSize = require("@atlaskit/editor-plugin-max-content-size");
|
|
@@ -329,7 +330,7 @@ function createUniversalPreset(appearance, props, featureFlags, prevAppearance,
|
|
|
329
330
|
}]);
|
|
330
331
|
}
|
|
331
332
|
return builder;
|
|
332
|
-
}).maybeAdd(
|
|
333
|
+
}).maybeAdd(_editorPluginIndentation.indentationPlugin, function (plugin, builder) {
|
|
333
334
|
if (props.allowIndentation) {
|
|
334
335
|
return builder.add(plugin);
|
|
335
336
|
}
|
|
@@ -6,9 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
9
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
12
11
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
13
12
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
14
13
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
@@ -37,14 +36,10 @@ var _WithPluginState = _interopRequireDefault(require("../WithPluginState"));
|
|
|
37
36
|
var _FormContent = _interopRequireDefault(require("./FormContent"));
|
|
38
37
|
var _messages = require("./messages");
|
|
39
38
|
var _FormErrorBoundary = require("./FormErrorBoundary");
|
|
40
|
-
var _excluded = ["page", "labels", "types", "name", "width"];
|
|
41
39
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
42
40
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
43
|
-
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; }
|
|
44
|
-
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) { (0, _defineProperty2.default)(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; }
|
|
45
41
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
46
42
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
47
|
-
var LOGGED_MACRO_KEYS = ['children', 'recently-updated', 'excerpt'];
|
|
48
43
|
function ConfigForm(_ref) {
|
|
49
44
|
var canSave = _ref.canSave,
|
|
50
45
|
errorMessage = _ref.errorMessage,
|
|
@@ -342,50 +337,15 @@ var ConfigPanel = /*#__PURE__*/function (_React$Component) {
|
|
|
342
337
|
var _this$props4 = this.props,
|
|
343
338
|
createAnalyticsEvent = _this$props4.createAnalyticsEvent,
|
|
344
339
|
extensionManifest = _this$props4.extensionManifest;
|
|
345
|
-
var currentParameters = this.state.currentParameters;
|
|
346
|
-
|
|
347
|
-
// PGXT-4393 We need to collect configuration analytics for the macros in LOGGED_MACRO_KEYS.
|
|
348
|
-
// This function takes the parameters and filters out anything which might have UGC.
|
|
349
|
-
var getMacroParameters = function getMacroParameters() {
|
|
350
|
-
var page = currentParameters.page,
|
|
351
|
-
labels = currentParameters.labels,
|
|
352
|
-
types = currentParameters.types,
|
|
353
|
-
name = currentParameters.name,
|
|
354
|
-
width = currentParameters.width,
|
|
355
|
-
safeParams = (0, _objectWithoutProperties2.default)(currentParameters, _excluded);
|
|
356
|
-
var ugcFreeParams = _objectSpread({}, safeParams);
|
|
357
|
-
// Parse types field as an array of valid content types and include in the result
|
|
358
|
-
if (types) {
|
|
359
|
-
var contentTypes = ['page', 'blogpost', 'comment', 'attachment'];
|
|
360
|
-
var parsedTypes = types.split(',').map(function (type) {
|
|
361
|
-
return type.trim();
|
|
362
|
-
}).filter(function (type) {
|
|
363
|
-
return contentTypes.includes(type);
|
|
364
|
-
});
|
|
365
|
-
ugcFreeParams = _objectSpread({
|
|
366
|
-
types: parsedTypes
|
|
367
|
-
}, ugcFreeParams);
|
|
368
|
-
}
|
|
369
|
-
// Since width is a raw string input, parse then return
|
|
370
|
-
if (width) {
|
|
371
|
-
var parsedWidth = parseFloat(width);
|
|
372
|
-
ugcFreeParams = _objectSpread({
|
|
373
|
-
width: parsedWidth
|
|
374
|
-
}, ugcFreeParams);
|
|
375
|
-
}
|
|
376
|
-
return ugcFreeParams;
|
|
377
|
-
};
|
|
378
340
|
(0, _analytics.fireAnalyticsEvent)(createAnalyticsEvent)({
|
|
379
341
|
payload: {
|
|
380
342
|
action: _analytics.ACTION.CLOSED,
|
|
381
343
|
actionSubject: _analytics.ACTION_SUBJECT.CONFIG_PANEL,
|
|
382
344
|
eventType: _analytics.EVENT_TYPE.UI,
|
|
383
|
-
attributes:
|
|
345
|
+
attributes: {
|
|
384
346
|
extensionKey: extensionManifest === null || extensionManifest === void 0 ? void 0 : extensionManifest.key,
|
|
385
347
|
extensionType: extensionManifest === null || extensionManifest === void 0 ? void 0 : extensionManifest.type
|
|
386
|
-
}
|
|
387
|
-
parameters: getMacroParameters()
|
|
388
|
-
} : {})
|
|
348
|
+
}
|
|
389
349
|
}
|
|
390
350
|
});
|
|
391
351
|
}
|
|
@@ -9,7 +9,6 @@ export { default as tasksAndDecisionsPlugin } from './tasks-and-decisions';
|
|
|
9
9
|
export { default as breakoutPlugin } from './breakout';
|
|
10
10
|
export { default as alignmentPlugin } from './alignment';
|
|
11
11
|
export { default as dataConsumerMarkPlugin } from './data-consumer';
|
|
12
|
-
export { default as indentationPlugin } from './indentation';
|
|
13
12
|
export { default as annotationPlugin } from './annotation';
|
|
14
13
|
export { default as customAutoformatPlugin } from './custom-autoformat';
|
|
15
14
|
export { default as feedbackDialogPlugin } from './feedback-dialog';
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
3
3
|
import ToolbarListsIndentation from './ui';
|
|
4
4
|
import { ToolbarSize } from '../../ui/Toolbar/types';
|
|
5
5
|
import { getIndentationButtonsState } from './pm-plugins/indentation-buttons';
|
|
6
|
-
import { pluginKey as indentationButtonPluginKey } from './pm-plugins/indentation-buttons';
|
|
7
6
|
const toolbarListsIndentationPlugin = ({
|
|
8
7
|
config,
|
|
9
8
|
api
|
|
@@ -16,12 +15,6 @@ const toolbarListsIndentationPlugin = ({
|
|
|
16
15
|
const featureFlags = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
|
|
17
16
|
return {
|
|
18
17
|
name: 'toolbarListsIndentation',
|
|
19
|
-
getSharedState(editorState) {
|
|
20
|
-
if (!editorState) {
|
|
21
|
-
return undefined;
|
|
22
|
-
}
|
|
23
|
-
return indentationButtonPluginKey.getState(editorState);
|
|
24
|
-
},
|
|
25
18
|
primaryToolbarComponent({
|
|
26
19
|
editorView,
|
|
27
20
|
popupsMountPoint,
|
|
@@ -66,9 +59,7 @@ export function PrimaryToolbarComponent({
|
|
|
66
59
|
indentationState,
|
|
67
60
|
taskDecisionState
|
|
68
61
|
} = useSharedPluginState(pluginInjectionApi, ['list', 'indentation', 'taskDecision']);
|
|
69
|
-
const toolbarListsIndentationState =
|
|
70
|
-
return getIndentationButtonsState(editorView.state, allowHeadingAndParagraphIndentation, taskDecisionState, indentationState, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.list.actions.isInsideListItem);
|
|
71
|
-
}, [editorView.state, allowHeadingAndParagraphIndentation, taskDecisionState, indentationState, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.list.actions.isInsideListItem]);
|
|
62
|
+
const toolbarListsIndentationState = getIndentationButtonsState(editorView.state, allowHeadingAndParagraphIndentation, taskDecisionState, indentationState, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.list.actions.isInsideListItem);
|
|
72
63
|
if (!listState) {
|
|
73
64
|
return null;
|
|
74
65
|
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
2
1
|
import { hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
3
2
|
import { getListItemAttributes } from '@atlaskit/editor-common/lists';
|
|
4
3
|
import { MAX_INDENTATION_LEVEL } from '@atlaskit/editor-common/indentation';
|
|
5
|
-
export const pluginKey = new PluginKey('indentationButtonsPlugin');
|
|
6
4
|
export function getIndentationButtonsState(editorState, allowHeadingAndParagraphIndentation, taskDecisionState, indentationState, isInsideListItem) {
|
|
7
5
|
var _indentationState$isI;
|
|
8
6
|
const state = {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, insertBlockPlugin, jiraIssuePlugin, toolbarListsIndentationPlugin, tasksAndDecisionsPlugin, alignmentPlugin,
|
|
1
|
+
import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, insertBlockPlugin, jiraIssuePlugin, toolbarListsIndentationPlugin, tasksAndDecisionsPlugin, alignmentPlugin, customAutoformatPlugin, feedbackDialogPlugin, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin } from '../plugins';
|
|
2
2
|
import { panelPlugin } from '@atlaskit/editor-plugin-panel';
|
|
3
3
|
import { textColorPlugin } from '@atlaskit/editor-plugin-text-color';
|
|
4
4
|
import { historyPlugin } from '@atlaskit/editor-plugin-history';
|
|
5
|
+
import { indentationPlugin } from '@atlaskit/editor-plugin-indentation';
|
|
5
6
|
import { statusPlugin } from '@atlaskit/editor-plugin-status';
|
|
6
7
|
import { datePlugin } from '@atlaskit/editor-plugin-date';
|
|
7
8
|
import { maxContentSizePlugin } from '@atlaskit/editor-plugin-max-content-size';
|
|
@@ -21,7 +21,6 @@ import WithPluginState from '../WithPluginState';
|
|
|
21
21
|
import FormContent from './FormContent';
|
|
22
22
|
import { messages } from './messages';
|
|
23
23
|
import { FormErrorBoundary } from './FormErrorBoundary';
|
|
24
|
-
const LOGGED_MACRO_KEYS = ['children', 'recently-updated', 'excerpt'];
|
|
25
24
|
function ConfigForm({
|
|
26
25
|
canSave,
|
|
27
26
|
errorMessage,
|
|
@@ -279,43 +278,6 @@ class ConfigPanel extends React.Component {
|
|
|
279
278
|
createAnalyticsEvent,
|
|
280
279
|
extensionManifest
|
|
281
280
|
} = this.props;
|
|
282
|
-
const {
|
|
283
|
-
currentParameters
|
|
284
|
-
} = this.state;
|
|
285
|
-
|
|
286
|
-
// PGXT-4393 We need to collect configuration analytics for the macros in LOGGED_MACRO_KEYS.
|
|
287
|
-
// This function takes the parameters and filters out anything which might have UGC.
|
|
288
|
-
const getMacroParameters = () => {
|
|
289
|
-
const {
|
|
290
|
-
page,
|
|
291
|
-
labels,
|
|
292
|
-
types,
|
|
293
|
-
name,
|
|
294
|
-
width,
|
|
295
|
-
...safeParams
|
|
296
|
-
} = currentParameters;
|
|
297
|
-
let ugcFreeParams = {
|
|
298
|
-
...safeParams
|
|
299
|
-
};
|
|
300
|
-
// Parse types field as an array of valid content types and include in the result
|
|
301
|
-
if (types) {
|
|
302
|
-
const contentTypes = ['page', 'blogpost', 'comment', 'attachment'];
|
|
303
|
-
const parsedTypes = types.split(',').map(type => type.trim()).filter(type => contentTypes.includes(type));
|
|
304
|
-
ugcFreeParams = {
|
|
305
|
-
types: parsedTypes,
|
|
306
|
-
...ugcFreeParams
|
|
307
|
-
};
|
|
308
|
-
}
|
|
309
|
-
// Since width is a raw string input, parse then return
|
|
310
|
-
if (width) {
|
|
311
|
-
const parsedWidth = parseFloat(width);
|
|
312
|
-
ugcFreeParams = {
|
|
313
|
-
width: parsedWidth,
|
|
314
|
-
...ugcFreeParams
|
|
315
|
-
};
|
|
316
|
-
}
|
|
317
|
-
return ugcFreeParams;
|
|
318
|
-
};
|
|
319
281
|
fireAnalyticsEvent(createAnalyticsEvent)({
|
|
320
282
|
payload: {
|
|
321
283
|
action: ACTION.CLOSED,
|
|
@@ -323,10 +285,7 @@ class ConfigPanel extends React.Component {
|
|
|
323
285
|
eventType: EVENT_TYPE.UI,
|
|
324
286
|
attributes: {
|
|
325
287
|
extensionKey: extensionManifest === null || extensionManifest === void 0 ? void 0 : extensionManifest.key,
|
|
326
|
-
extensionType: extensionManifest === null || extensionManifest === void 0 ? void 0 : extensionManifest.type
|
|
327
|
-
...(extensionManifest !== null && extensionManifest !== void 0 && extensionManifest.key && LOGGED_MACRO_KEYS.includes(extensionManifest.key) ? {
|
|
328
|
-
parameters: getMacroParameters()
|
|
329
|
-
} : {})
|
|
288
|
+
extensionType: extensionManifest === null || extensionManifest === void 0 ? void 0 : extensionManifest.type
|
|
330
289
|
}
|
|
331
290
|
}
|
|
332
291
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "189.3.
|
|
2
|
+
export const version = "189.3.25";
|
|
@@ -9,7 +9,6 @@ export { default as tasksAndDecisionsPlugin } from './tasks-and-decisions';
|
|
|
9
9
|
export { default as breakoutPlugin } from './breakout';
|
|
10
10
|
export { default as alignmentPlugin } from './alignment';
|
|
11
11
|
export { default as dataConsumerMarkPlugin } from './data-consumer';
|
|
12
|
-
export { default as indentationPlugin } from './indentation';
|
|
13
12
|
export { default as annotationPlugin } from './annotation';
|
|
14
13
|
export { default as customAutoformatPlugin } from './custom-autoformat';
|
|
15
14
|
export { default as feedbackDialogPlugin } from './feedback-dialog';
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
3
3
|
import ToolbarListsIndentation from './ui';
|
|
4
4
|
import { ToolbarSize } from '../../ui/Toolbar/types';
|
|
5
5
|
import { getIndentationButtonsState } from './pm-plugins/indentation-buttons';
|
|
6
|
-
import { pluginKey as indentationButtonPluginKey } from './pm-plugins/indentation-buttons';
|
|
7
6
|
var toolbarListsIndentationPlugin = function toolbarListsIndentationPlugin(_ref) {
|
|
8
7
|
var _api$featureFlags;
|
|
9
8
|
var config = _ref.config,
|
|
@@ -16,12 +15,6 @@ var toolbarListsIndentationPlugin = function toolbarListsIndentationPlugin(_ref)
|
|
|
16
15
|
var featureFlags = (api === null || api === void 0 || (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
|
|
17
16
|
return {
|
|
18
17
|
name: 'toolbarListsIndentation',
|
|
19
|
-
getSharedState: function getSharedState(editorState) {
|
|
20
|
-
if (!editorState) {
|
|
21
|
-
return undefined;
|
|
22
|
-
}
|
|
23
|
-
return indentationButtonPluginKey.getState(editorState);
|
|
24
|
-
},
|
|
25
18
|
primaryToolbarComponent: function primaryToolbarComponent(_ref3) {
|
|
26
19
|
var editorView = _ref3.editorView,
|
|
27
20
|
popupsMountPoint = _ref3.popupsMountPoint,
|
|
@@ -63,9 +56,7 @@ export function PrimaryToolbarComponent(_ref4) {
|
|
|
63
56
|
listState = _useSharedPluginState.listState,
|
|
64
57
|
indentationState = _useSharedPluginState.indentationState,
|
|
65
58
|
taskDecisionState = _useSharedPluginState.taskDecisionState;
|
|
66
|
-
var toolbarListsIndentationState =
|
|
67
|
-
return getIndentationButtonsState(editorView.state, allowHeadingAndParagraphIndentation, taskDecisionState, indentationState, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.list.actions.isInsideListItem);
|
|
68
|
-
}, [editorView.state, allowHeadingAndParagraphIndentation, taskDecisionState, indentationState, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.list.actions.isInsideListItem]);
|
|
59
|
+
var toolbarListsIndentationState = getIndentationButtonsState(editorView.state, allowHeadingAndParagraphIndentation, taskDecisionState, indentationState, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.list.actions.isInsideListItem);
|
|
69
60
|
if (!listState) {
|
|
70
61
|
return null;
|
|
71
62
|
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
2
1
|
import { hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
3
2
|
import { getListItemAttributes } from '@atlaskit/editor-common/lists';
|
|
4
3
|
import { MAX_INDENTATION_LEVEL } from '@atlaskit/editor-common/indentation';
|
|
5
|
-
export var pluginKey = new PluginKey('indentationButtonsPlugin');
|
|
6
4
|
export function getIndentationButtonsState(editorState, allowHeadingAndParagraphIndentation, taskDecisionState, indentationState, isInsideListItem) {
|
|
7
5
|
var _indentationState$isI;
|
|
8
6
|
var state = {
|
|
@@ -2,10 +2,11 @@ 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, tasksAndDecisionsPlugin, alignmentPlugin,
|
|
5
|
+
import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, insertBlockPlugin, jiraIssuePlugin, toolbarListsIndentationPlugin, tasksAndDecisionsPlugin, alignmentPlugin, customAutoformatPlugin, feedbackDialogPlugin, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin } from '../plugins';
|
|
6
6
|
import { panelPlugin } from '@atlaskit/editor-plugin-panel';
|
|
7
7
|
import { textColorPlugin } from '@atlaskit/editor-plugin-text-color';
|
|
8
8
|
import { historyPlugin } from '@atlaskit/editor-plugin-history';
|
|
9
|
+
import { indentationPlugin } from '@atlaskit/editor-plugin-indentation';
|
|
9
10
|
import { statusPlugin } from '@atlaskit/editor-plugin-status';
|
|
10
11
|
import { datePlugin } from '@atlaskit/editor-plugin-date';
|
|
11
12
|
import { maxContentSizePlugin } from '@atlaskit/editor-plugin-max-content-size';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
4
3
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
5
4
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
@@ -8,9 +7,6 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
8
7
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
9
8
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
10
9
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
11
|
-
var _excluded = ["page", "labels", "types", "name", "width"];
|
|
12
|
-
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; }
|
|
13
|
-
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; }
|
|
14
10
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
15
11
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
16
12
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
@@ -35,7 +31,6 @@ import WithPluginState from '../WithPluginState';
|
|
|
35
31
|
import FormContent from './FormContent';
|
|
36
32
|
import { messages } from './messages';
|
|
37
33
|
import { FormErrorBoundary } from './FormErrorBoundary';
|
|
38
|
-
var LOGGED_MACRO_KEYS = ['children', 'recently-updated', 'excerpt'];
|
|
39
34
|
function ConfigForm(_ref) {
|
|
40
35
|
var canSave = _ref.canSave,
|
|
41
36
|
errorMessage = _ref.errorMessage,
|
|
@@ -333,50 +328,15 @@ var ConfigPanel = /*#__PURE__*/function (_React$Component) {
|
|
|
333
328
|
var _this$props4 = this.props,
|
|
334
329
|
createAnalyticsEvent = _this$props4.createAnalyticsEvent,
|
|
335
330
|
extensionManifest = _this$props4.extensionManifest;
|
|
336
|
-
var currentParameters = this.state.currentParameters;
|
|
337
|
-
|
|
338
|
-
// PGXT-4393 We need to collect configuration analytics for the macros in LOGGED_MACRO_KEYS.
|
|
339
|
-
// This function takes the parameters and filters out anything which might have UGC.
|
|
340
|
-
var getMacroParameters = function getMacroParameters() {
|
|
341
|
-
var page = currentParameters.page,
|
|
342
|
-
labels = currentParameters.labels,
|
|
343
|
-
types = currentParameters.types,
|
|
344
|
-
name = currentParameters.name,
|
|
345
|
-
width = currentParameters.width,
|
|
346
|
-
safeParams = _objectWithoutProperties(currentParameters, _excluded);
|
|
347
|
-
var ugcFreeParams = _objectSpread({}, safeParams);
|
|
348
|
-
// Parse types field as an array of valid content types and include in the result
|
|
349
|
-
if (types) {
|
|
350
|
-
var contentTypes = ['page', 'blogpost', 'comment', 'attachment'];
|
|
351
|
-
var parsedTypes = types.split(',').map(function (type) {
|
|
352
|
-
return type.trim();
|
|
353
|
-
}).filter(function (type) {
|
|
354
|
-
return contentTypes.includes(type);
|
|
355
|
-
});
|
|
356
|
-
ugcFreeParams = _objectSpread({
|
|
357
|
-
types: parsedTypes
|
|
358
|
-
}, ugcFreeParams);
|
|
359
|
-
}
|
|
360
|
-
// Since width is a raw string input, parse then return
|
|
361
|
-
if (width) {
|
|
362
|
-
var parsedWidth = parseFloat(width);
|
|
363
|
-
ugcFreeParams = _objectSpread({
|
|
364
|
-
width: parsedWidth
|
|
365
|
-
}, ugcFreeParams);
|
|
366
|
-
}
|
|
367
|
-
return ugcFreeParams;
|
|
368
|
-
};
|
|
369
331
|
fireAnalyticsEvent(createAnalyticsEvent)({
|
|
370
332
|
payload: {
|
|
371
333
|
action: ACTION.CLOSED,
|
|
372
334
|
actionSubject: ACTION_SUBJECT.CONFIG_PANEL,
|
|
373
335
|
eventType: EVENT_TYPE.UI,
|
|
374
|
-
attributes:
|
|
336
|
+
attributes: {
|
|
375
337
|
extensionKey: extensionManifest === null || extensionManifest === void 0 ? void 0 : extensionManifest.key,
|
|
376
338
|
extensionType: extensionManifest === null || extensionManifest === void 0 ? void 0 : extensionManifest.type
|
|
377
|
-
}
|
|
378
|
-
parameters: getMacroParameters()
|
|
379
|
-
} : {})
|
|
339
|
+
}
|
|
380
340
|
}
|
|
381
341
|
});
|
|
382
342
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "189.3.
|
|
2
|
+
export var version = "189.3.25";
|
|
@@ -9,7 +9,6 @@ export { default as tasksAndDecisionsPlugin } from './tasks-and-decisions';
|
|
|
9
9
|
export { default as breakoutPlugin } from './breakout';
|
|
10
10
|
export { default as alignmentPlugin } from './alignment';
|
|
11
11
|
export { default as dataConsumerMarkPlugin } from './data-consumer';
|
|
12
|
-
export { default as indentationPlugin } from './indentation';
|
|
13
12
|
export { default as annotationPlugin } from './annotation';
|
|
14
13
|
export { default as customAutoformatPlugin } from './custom-autoformat';
|
|
15
14
|
export { default as feedbackDialogPlugin } from './feedback-dialog';
|
|
@@ -3,10 +3,9 @@ import type { FeatureFlags, NextEditorPlugin, OptionalPlugin } from '@atlaskit/e
|
|
|
3
3
|
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
4
4
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
5
5
|
import type { ListPlugin } from '@atlaskit/editor-plugin-list';
|
|
6
|
-
import type { IndentationButtons } from './pm-plugins/indentation-buttons';
|
|
7
6
|
import type { ToolbarUiComponentFactoryParams } from '../../types';
|
|
8
7
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
9
|
-
import type { IndentationPlugin } from '
|
|
8
|
+
import type { IndentationPlugin } from '@atlaskit/editor-plugin-indentation';
|
|
10
9
|
import type { TaskAndDecisionsPlugin } from '../tasks-and-decisions/types';
|
|
11
10
|
type Config = {
|
|
12
11
|
showIndentationButtons: boolean;
|
|
@@ -21,7 +20,6 @@ type ToolbarListsIndentationPlugin = NextEditorPlugin<'toolbarListsIndentation',
|
|
|
21
20
|
OptionalPlugin<TaskAndDecisionsPlugin>,
|
|
22
21
|
OptionalPlugin<AnalyticsPlugin>
|
|
23
22
|
];
|
|
24
|
-
sharedState: IndentationButtons | undefined;
|
|
25
23
|
}>;
|
|
26
24
|
declare const toolbarListsIndentationPlugin: ToolbarListsIndentationPlugin;
|
|
27
25
|
type PrimaryToolbarComponentProps = Pick<ToolbarUiComponentFactoryParams, 'editorView' | 'popupsMountPoint' | 'popupsBoundariesElement' | 'popupsScrollableElement' | 'disabled' | 'isToolbarReducedSpacing'> & {
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
3
2
|
export type IndentationButtonNode = null | 'paragraph_heading' | 'list' | 'taskList';
|
|
4
3
|
export interface IndentationButtons {
|
|
5
4
|
indentDisabled: boolean;
|
|
6
5
|
outdentDisabled: boolean;
|
|
7
6
|
node: IndentationButtonNode;
|
|
8
7
|
}
|
|
9
|
-
export declare const pluginKey: PluginKey<IndentationButtons>;
|
|
10
8
|
interface TaskDecisionState {
|
|
11
9
|
isInsideTask: boolean;
|
|
12
10
|
indentDisabled: boolean;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
import type { ExtensionManifest
|
|
4
|
-
import
|
|
2
|
+
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
3
|
+
import type { ExtensionManifest } from '@atlaskit/editor-common/extensions';
|
|
4
|
+
import { FieldDefinition, Parameters, OnSaveCallback } from '@atlaskit/editor-common/extensions';
|
|
5
|
+
import { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
5
6
|
type Props = {
|
|
6
7
|
extensionManifest?: ExtensionManifest;
|
|
7
8
|
fields?: FieldDefinition[];
|
|
@@ -9,7 +9,6 @@ export { default as tasksAndDecisionsPlugin } from './tasks-and-decisions';
|
|
|
9
9
|
export { default as breakoutPlugin } from './breakout';
|
|
10
10
|
export { default as alignmentPlugin } from './alignment';
|
|
11
11
|
export { default as dataConsumerMarkPlugin } from './data-consumer';
|
|
12
|
-
export { default as indentationPlugin } from './indentation';
|
|
13
12
|
export { default as annotationPlugin } from './annotation';
|
|
14
13
|
export { default as customAutoformatPlugin } from './custom-autoformat';
|
|
15
14
|
export { default as feedbackDialogPlugin } from './feedback-dialog';
|
|
@@ -3,10 +3,9 @@ import type { FeatureFlags, NextEditorPlugin, OptionalPlugin } from '@atlaskit/e
|
|
|
3
3
|
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
4
4
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
5
5
|
import type { ListPlugin } from '@atlaskit/editor-plugin-list';
|
|
6
|
-
import type { IndentationButtons } from './pm-plugins/indentation-buttons';
|
|
7
6
|
import type { ToolbarUiComponentFactoryParams } from '../../types';
|
|
8
7
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
9
|
-
import type { IndentationPlugin } from '
|
|
8
|
+
import type { IndentationPlugin } from '@atlaskit/editor-plugin-indentation';
|
|
10
9
|
import type { TaskAndDecisionsPlugin } from '../tasks-and-decisions/types';
|
|
11
10
|
type Config = {
|
|
12
11
|
showIndentationButtons: boolean;
|
|
@@ -21,7 +20,6 @@ type ToolbarListsIndentationPlugin = NextEditorPlugin<'toolbarListsIndentation',
|
|
|
21
20
|
OptionalPlugin<TaskAndDecisionsPlugin>,
|
|
22
21
|
OptionalPlugin<AnalyticsPlugin>
|
|
23
22
|
];
|
|
24
|
-
sharedState: IndentationButtons | undefined;
|
|
25
23
|
}>;
|
|
26
24
|
declare const toolbarListsIndentationPlugin: ToolbarListsIndentationPlugin;
|
|
27
25
|
type PrimaryToolbarComponentProps = Pick<ToolbarUiComponentFactoryParams, 'editorView' | 'popupsMountPoint' | 'popupsBoundariesElement' | 'popupsScrollableElement' | 'disabled' | 'isToolbarReducedSpacing'> & {
|
package/dist/types-ts4.5/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.d.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
3
2
|
export type IndentationButtonNode = null | 'paragraph_heading' | 'list' | 'taskList';
|
|
4
3
|
export interface IndentationButtons {
|
|
5
4
|
indentDisabled: boolean;
|
|
6
5
|
outdentDisabled: boolean;
|
|
7
6
|
node: IndentationButtonNode;
|
|
8
7
|
}
|
|
9
|
-
export declare const pluginKey: PluginKey<IndentationButtons>;
|
|
10
8
|
interface TaskDecisionState {
|
|
11
9
|
isInsideTask: boolean;
|
|
12
10
|
indentDisabled: boolean;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
import type { ExtensionManifest
|
|
4
|
-
import
|
|
2
|
+
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
3
|
+
import type { ExtensionManifest } from '@atlaskit/editor-common/extensions';
|
|
4
|
+
import { FieldDefinition, Parameters, OnSaveCallback } from '@atlaskit/editor-common/extensions';
|
|
5
|
+
import { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
5
6
|
type Props = {
|
|
6
7
|
extensionManifest?: ExtensionManifest;
|
|
7
8
|
fields?: FieldDefinition[];
|