@atlaskit/editor-plugin-toolbar-lists-indentation 1.14.3 → 1.14.5
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/index.js +2 -2
- package/dist/cjs/toolbarListsIndentationPluginType.js +5 -0
- package/dist/cjs/ui/index.js +12 -2
- package/dist/cjs/{utils → ui/utils}/input-method.js +1 -1
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/toolbarListsIndentationPluginType.js +1 -0
- package/dist/es2019/ui/index.js +10 -2
- package/dist/es2019/{utils → ui/utils}/input-method.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/toolbarListsIndentationPluginType.js +1 -0
- package/dist/esm/ui/index.js +12 -2
- package/dist/esm/{utils → ui/utils}/input-method.js +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/toolbarListsIndentationPlugin.d.ts +13 -0
- package/dist/types/toolbarListsIndentationPluginType.d.ts +23 -0
- package/dist/types/{types.d.ts → types/index.d.ts} +2 -2
- package/dist/types/ui/FloatingToolbarComponent.d.ts +1 -1
- package/dist/types/ui/index.d.ts +1 -1
- package/dist/types/ui/utils/input-method.d.ts +3 -0
- package/dist/types-ts4.5/index.d.ts +2 -2
- package/dist/types-ts4.5/toolbarListsIndentationPlugin.d.ts +13 -0
- package/dist/types-ts4.5/toolbarListsIndentationPluginType.d.ts +23 -0
- package/dist/types-ts4.5/{types.d.ts → types/index.d.ts} +2 -2
- package/dist/types-ts4.5/ui/FloatingToolbarComponent.d.ts +1 -1
- package/dist/types-ts4.5/ui/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/utils/input-method.d.ts +3 -0
- package/package.json +13 -5
- package/dist/types/plugin.d.ts +0 -33
- package/dist/types/utils/input-method.d.ts +0 -3
- package/dist/types-ts4.5/plugin.d.ts +0 -33
- package/dist/types-ts4.5/utils/input-method.d.ts +0 -3
- /package/dist/cjs/{plugin.js → toolbarListsIndentationPlugin.js} +0 -0
- /package/dist/cjs/{types.js → types/index.js} +0 -0
- /package/dist/es2019/{plugin.js → toolbarListsIndentationPlugin.js} +0 -0
- /package/dist/es2019/{types.js → types/index.js} +0 -0
- /package/dist/esm/{plugin.js → toolbarListsIndentationPlugin.js} +0 -0
- /package/dist/esm/{types.js → types/index.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-toolbar-lists-indentation
|
|
2
2
|
|
|
3
|
+
## 1.14.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#171551](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/171551)
|
|
8
|
+
[`702c918817e78`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/702c918817e78) -
|
|
9
|
+
ED-25817: refactors plugins to meet folder standards
|
|
10
|
+
|
|
11
|
+
## 1.14.4
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#176005](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/176005)
|
|
16
|
+
[`d4348ed45eed7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d4348ed45eed7) -
|
|
17
|
+
[ux] When text selection is inside media caption or decision nodes, Main and Floating toolbars
|
|
18
|
+
should have Lists and Text styles options disabled.
|
|
19
|
+
|
|
3
20
|
## 1.14.3
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
Object.defineProperty(exports, "toolbarListsIndentationPlugin", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function get() {
|
|
9
|
-
return
|
|
9
|
+
return _toolbarListsIndentationPlugin.toolbarListsIndentationPlugin;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
var
|
|
12
|
+
var _toolbarListsIndentationPlugin = require("./toolbarListsIndentationPlugin");
|
package/dist/cjs/ui/index.js
CHANGED
|
@@ -6,11 +6,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = ToolbarListsIndentation;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
9
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
9
10
|
var _types = require("../types");
|
|
10
|
-
var _inputMethod = require("../utils/input-method");
|
|
11
11
|
var _onItemActivated = require("./onItemActivated");
|
|
12
12
|
var _Toolbar = require("./Toolbar");
|
|
13
13
|
var _ToolbarDropdown = require("./ToolbarDropdown");
|
|
14
|
+
var _inputMethod = require("./utils/input-method");
|
|
14
15
|
/**
|
|
15
16
|
* @jsxRuntime classic
|
|
16
17
|
* @jsx jsx
|
|
@@ -36,7 +37,16 @@ function ToolbarListsIndentation(props) {
|
|
|
36
37
|
pluginInjectionApi = props.pluginInjectionApi,
|
|
37
38
|
toolbarType = props.toolbarType;
|
|
38
39
|
var inputMethod = toolbarType ? (0, _inputMethod.getInputMethod)(toolbarType) : _analytics.INPUT_METHOD.TOOLBAR;
|
|
40
|
+
var isDisabled;
|
|
39
41
|
if (isSmall || toolbarType === _types.ToolbarType.FLOATING) {
|
|
42
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_toolbar_fix_for_disabled_options')) {
|
|
43
|
+
var areAllOptionsDisabled = [bulletListDisabled, orderedListDisabled, indentDisabled, outdentDisabled].every(function (item) {
|
|
44
|
+
return Boolean(item) === true;
|
|
45
|
+
});
|
|
46
|
+
isDisabled = disabled || areAllOptionsDisabled;
|
|
47
|
+
} else {
|
|
48
|
+
isDisabled = disabled;
|
|
49
|
+
}
|
|
40
50
|
return (0, _react.jsx)(_ToolbarDropdown.ToolbarDropdown, {
|
|
41
51
|
editorView: props.editorView,
|
|
42
52
|
isReducedSpacing: isReducedSpacing,
|
|
@@ -50,7 +60,7 @@ function ToolbarListsIndentation(props) {
|
|
|
50
60
|
orderedListDisabled: orderedListDisabled,
|
|
51
61
|
indentDisabled: indentDisabled,
|
|
52
62
|
outdentDisabled: outdentDisabled,
|
|
53
|
-
disabled:
|
|
63
|
+
disabled: isDisabled,
|
|
54
64
|
onItemActivated: (0, _onItemActivated.onItemActivated)(pluginInjectionApi, indentationStateNode, inputMethod),
|
|
55
65
|
featureFlags: featureFlags,
|
|
56
66
|
pluginInjectionApi: pluginInjectionApi,
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.getInputMethod = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
10
|
-
var _types = require("
|
|
10
|
+
var _types = require("../../types");
|
|
11
11
|
var _toolbarTypeToInputMe;
|
|
12
12
|
var toolbarTypeToInputMethod = (_toolbarTypeToInputMe = {}, (0, _defineProperty2.default)(_toolbarTypeToInputMe, _types.ToolbarType.PRIMARY, _analytics.INPUT_METHOD.TOOLBAR), (0, _defineProperty2.default)(_toolbarTypeToInputMe, _types.ToolbarType.FLOATING, _analytics.INPUT_METHOD.FLOATING_TB), _toolbarTypeToInputMe);
|
|
13
13
|
var getInputMethod = exports.getInputMethod = function getInputMethod(toolbarType) {
|
package/dist/es2019/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { toolbarListsIndentationPlugin } from './
|
|
1
|
+
export { toolbarListsIndentationPlugin } from './toolbarListsIndentationPlugin';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/es2019/ui/index.js
CHANGED
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
7
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
9
|
import { ToolbarType } from '../types';
|
|
9
|
-
import { getInputMethod } from '../utils/input-method';
|
|
10
10
|
import { onItemActivated } from './onItemActivated';
|
|
11
11
|
import { Toolbar } from './Toolbar';
|
|
12
12
|
import { ToolbarDropdown } from './ToolbarDropdown';
|
|
13
|
+
import { getInputMethod } from './utils/input-method';
|
|
13
14
|
export default function ToolbarListsIndentation(props) {
|
|
14
15
|
const {
|
|
15
16
|
disabled,
|
|
@@ -31,7 +32,14 @@ export default function ToolbarListsIndentation(props) {
|
|
|
31
32
|
toolbarType
|
|
32
33
|
} = props;
|
|
33
34
|
const inputMethod = toolbarType ? getInputMethod(toolbarType) : INPUT_METHOD.TOOLBAR;
|
|
35
|
+
let isDisabled;
|
|
34
36
|
if (isSmall || toolbarType === ToolbarType.FLOATING) {
|
|
37
|
+
if (fg('platform_editor_toolbar_fix_for_disabled_options')) {
|
|
38
|
+
const areAllOptionsDisabled = [bulletListDisabled, orderedListDisabled, indentDisabled, outdentDisabled].every(item => Boolean(item) === true);
|
|
39
|
+
isDisabled = disabled || areAllOptionsDisabled;
|
|
40
|
+
} else {
|
|
41
|
+
isDisabled = disabled;
|
|
42
|
+
}
|
|
35
43
|
return jsx(ToolbarDropdown, {
|
|
36
44
|
editorView: props.editorView,
|
|
37
45
|
isReducedSpacing: isReducedSpacing,
|
|
@@ -45,7 +53,7 @@ export default function ToolbarListsIndentation(props) {
|
|
|
45
53
|
orderedListDisabled: orderedListDisabled,
|
|
46
54
|
indentDisabled: indentDisabled,
|
|
47
55
|
outdentDisabled: outdentDisabled,
|
|
48
|
-
disabled:
|
|
56
|
+
disabled: isDisabled,
|
|
49
57
|
onItemActivated: onItemActivated(pluginInjectionApi, indentationStateNode, inputMethod),
|
|
50
58
|
featureFlags: featureFlags,
|
|
51
59
|
pluginInjectionApi: pluginInjectionApi,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import { ToolbarType } from '
|
|
2
|
+
import { ToolbarType } from '../../types';
|
|
3
3
|
const toolbarTypeToInputMethod = {
|
|
4
4
|
[ToolbarType.PRIMARY]: INPUT_METHOD.TOOLBAR,
|
|
5
5
|
[ToolbarType.FLOATING]: INPUT_METHOD.FLOATING_TB
|
package/dist/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { toolbarListsIndentationPlugin } from './
|
|
1
|
+
export { toolbarListsIndentationPlugin } from './toolbarListsIndentationPlugin';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/esm/ui/index.js
CHANGED
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
7
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
9
|
import { ToolbarType } from '../types';
|
|
9
|
-
import { getInputMethod } from '../utils/input-method';
|
|
10
10
|
import { onItemActivated } from './onItemActivated';
|
|
11
11
|
import { Toolbar } from './Toolbar';
|
|
12
12
|
import { ToolbarDropdown } from './ToolbarDropdown';
|
|
13
|
+
import { getInputMethod } from './utils/input-method';
|
|
13
14
|
export default function ToolbarListsIndentation(props) {
|
|
14
15
|
var disabled = props.disabled,
|
|
15
16
|
isSmall = props.isSmall,
|
|
@@ -29,7 +30,16 @@ export default function ToolbarListsIndentation(props) {
|
|
|
29
30
|
pluginInjectionApi = props.pluginInjectionApi,
|
|
30
31
|
toolbarType = props.toolbarType;
|
|
31
32
|
var inputMethod = toolbarType ? getInputMethod(toolbarType) : INPUT_METHOD.TOOLBAR;
|
|
33
|
+
var isDisabled;
|
|
32
34
|
if (isSmall || toolbarType === ToolbarType.FLOATING) {
|
|
35
|
+
if (fg('platform_editor_toolbar_fix_for_disabled_options')) {
|
|
36
|
+
var areAllOptionsDisabled = [bulletListDisabled, orderedListDisabled, indentDisabled, outdentDisabled].every(function (item) {
|
|
37
|
+
return Boolean(item) === true;
|
|
38
|
+
});
|
|
39
|
+
isDisabled = disabled || areAllOptionsDisabled;
|
|
40
|
+
} else {
|
|
41
|
+
isDisabled = disabled;
|
|
42
|
+
}
|
|
33
43
|
return jsx(ToolbarDropdown, {
|
|
34
44
|
editorView: props.editorView,
|
|
35
45
|
isReducedSpacing: isReducedSpacing,
|
|
@@ -43,7 +53,7 @@ export default function ToolbarListsIndentation(props) {
|
|
|
43
53
|
orderedListDisabled: orderedListDisabled,
|
|
44
54
|
indentDisabled: indentDisabled,
|
|
45
55
|
outdentDisabled: outdentDisabled,
|
|
46
|
-
disabled:
|
|
56
|
+
disabled: isDisabled,
|
|
47
57
|
onItemActivated: onItemActivated(pluginInjectionApi, indentationStateNode, inputMethod),
|
|
48
58
|
featureFlags: featureFlags,
|
|
49
59
|
pluginInjectionApi: pluginInjectionApi,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
var _toolbarTypeToInputMe;
|
|
3
3
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import { ToolbarType } from '
|
|
4
|
+
import { ToolbarType } from '../../types';
|
|
5
5
|
var toolbarTypeToInputMethod = (_toolbarTypeToInputMe = {}, _defineProperty(_toolbarTypeToInputMe, ToolbarType.PRIMARY, INPUT_METHOD.TOOLBAR), _defineProperty(_toolbarTypeToInputMe, ToolbarType.FLOATING, INPUT_METHOD.FLOATING_TB), _toolbarTypeToInputMe);
|
|
6
6
|
export var getInputMethod = function getInputMethod(toolbarType) {
|
|
7
7
|
return toolbarTypeToInputMethod[toolbarType];
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { toolbarListsIndentationPlugin } from './
|
|
2
|
-
export type { ToolbarListsIndentationPlugin } from './
|
|
1
|
+
export { toolbarListsIndentationPlugin } from './toolbarListsIndentationPlugin';
|
|
2
|
+
export type { ToolbarListsIndentationPlugin } from './toolbarListsIndentationPluginType';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ExtractInjectionAPI, FeatureFlags, ToolbarUiComponentFactoryParams } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { ToolbarListsIndentationPlugin } from './toolbarListsIndentationPluginType';
|
|
4
|
+
export declare const toolbarListsIndentationPlugin: ToolbarListsIndentationPlugin;
|
|
5
|
+
type PrimaryToolbarComponentProps = Pick<ToolbarUiComponentFactoryParams, 'editorView' | 'popupsMountPoint' | 'popupsBoundariesElement' | 'popupsScrollableElement' | 'disabled' | 'isToolbarReducedSpacing'> & {
|
|
6
|
+
featureFlags: FeatureFlags;
|
|
7
|
+
isSmall: boolean;
|
|
8
|
+
showIndentationButtons?: boolean;
|
|
9
|
+
pluginInjectionApi: ExtractInjectionAPI<typeof toolbarListsIndentationPlugin> | undefined;
|
|
10
|
+
allowHeadingAndParagraphIndentation: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare function PrimaryToolbarComponent({ featureFlags, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, isSmall, isToolbarReducedSpacing, disabled, editorView, showIndentationButtons, pluginInjectionApi, allowHeadingAndParagraphIndentation, }: PrimaryToolbarComponentProps): JSX.Element | null;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
3
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
4
|
+
import type { IndentationPlugin } from '@atlaskit/editor-plugin-indentation';
|
|
5
|
+
import type { ListPlugin } from '@atlaskit/editor-plugin-list';
|
|
6
|
+
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
|
|
7
|
+
import type { TasksAndDecisionsPlugin } from '@atlaskit/editor-plugin-tasks-and-decisions';
|
|
8
|
+
type Config = {
|
|
9
|
+
showIndentationButtons: boolean;
|
|
10
|
+
allowHeadingAndParagraphIndentation: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type ToolbarListsIndentationPlugin = NextEditorPlugin<'toolbarListsIndentation', {
|
|
13
|
+
pluginConfiguration: Config;
|
|
14
|
+
dependencies: [
|
|
15
|
+
OptionalPlugin<FeatureFlagsPlugin>,
|
|
16
|
+
ListPlugin,
|
|
17
|
+
OptionalPlugin<IndentationPlugin>,
|
|
18
|
+
OptionalPlugin<TasksAndDecisionsPlugin>,
|
|
19
|
+
OptionalPlugin<AnalyticsPlugin>,
|
|
20
|
+
OptionalPlugin<PrimaryToolbarPlugin>
|
|
21
|
+
];
|
|
22
|
+
}>;
|
|
23
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { ExtractInjectionAPI, FeatureFlags } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
-
import type { ToolbarListsIndentationPlugin } from '
|
|
5
|
-
import type { onItemActivated } from '
|
|
4
|
+
import type { ToolbarListsIndentationPlugin } from '../toolbarListsIndentationPluginType';
|
|
5
|
+
import type { onItemActivated } from '../ui/onItemActivated';
|
|
6
6
|
export type ButtonName = 'bullet_list' | 'ordered_list' | 'indent' | 'outdent';
|
|
7
7
|
export declare enum ToolbarType {
|
|
8
8
|
PRIMARY = "primaryToolbar",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { ExtractInjectionAPI, FeatureFlags } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
-
import type { ToolbarListsIndentationPlugin } from '../
|
|
4
|
+
import type { ToolbarListsIndentationPlugin } from '../toolbarListsIndentationPluginType';
|
|
5
5
|
type FloatingToolbarComponentProps = {
|
|
6
6
|
allowHeadingAndParagraphIndentation: boolean;
|
|
7
7
|
editorView: EditorView;
|
package/dist/types/ui/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
import { jsx } from '@emotion/react';
|
|
6
6
|
import type { ExtractInjectionAPI, FeatureFlags } from '@atlaskit/editor-common/types';
|
|
7
7
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
|
-
import type { ToolbarListsIndentationPlugin } from '../plugin';
|
|
9
8
|
import type { IndentationButtonNode } from '../pm-plugins/indentation-buttons';
|
|
9
|
+
import type { ToolbarListsIndentationPlugin } from '../toolbarListsIndentationPluginType';
|
|
10
10
|
import { ToolbarType } from '../types';
|
|
11
11
|
export interface Props {
|
|
12
12
|
editorView: EditorView;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { toolbarListsIndentationPlugin } from './
|
|
2
|
-
export type { ToolbarListsIndentationPlugin } from './
|
|
1
|
+
export { toolbarListsIndentationPlugin } from './toolbarListsIndentationPlugin';
|
|
2
|
+
export type { ToolbarListsIndentationPlugin } from './toolbarListsIndentationPluginType';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ExtractInjectionAPI, FeatureFlags, ToolbarUiComponentFactoryParams } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { ToolbarListsIndentationPlugin } from './toolbarListsIndentationPluginType';
|
|
4
|
+
export declare const toolbarListsIndentationPlugin: ToolbarListsIndentationPlugin;
|
|
5
|
+
type PrimaryToolbarComponentProps = Pick<ToolbarUiComponentFactoryParams, 'editorView' | 'popupsMountPoint' | 'popupsBoundariesElement' | 'popupsScrollableElement' | 'disabled' | 'isToolbarReducedSpacing'> & {
|
|
6
|
+
featureFlags: FeatureFlags;
|
|
7
|
+
isSmall: boolean;
|
|
8
|
+
showIndentationButtons?: boolean;
|
|
9
|
+
pluginInjectionApi: ExtractInjectionAPI<typeof toolbarListsIndentationPlugin> | undefined;
|
|
10
|
+
allowHeadingAndParagraphIndentation: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare function PrimaryToolbarComponent({ featureFlags, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, isSmall, isToolbarReducedSpacing, disabled, editorView, showIndentationButtons, pluginInjectionApi, allowHeadingAndParagraphIndentation, }: PrimaryToolbarComponentProps): JSX.Element | null;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
3
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
4
|
+
import type { IndentationPlugin } from '@atlaskit/editor-plugin-indentation';
|
|
5
|
+
import type { ListPlugin } from '@atlaskit/editor-plugin-list';
|
|
6
|
+
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
|
|
7
|
+
import type { TasksAndDecisionsPlugin } from '@atlaskit/editor-plugin-tasks-and-decisions';
|
|
8
|
+
type Config = {
|
|
9
|
+
showIndentationButtons: boolean;
|
|
10
|
+
allowHeadingAndParagraphIndentation: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type ToolbarListsIndentationPlugin = NextEditorPlugin<'toolbarListsIndentation', {
|
|
13
|
+
pluginConfiguration: Config;
|
|
14
|
+
dependencies: [
|
|
15
|
+
OptionalPlugin<FeatureFlagsPlugin>,
|
|
16
|
+
ListPlugin,
|
|
17
|
+
OptionalPlugin<IndentationPlugin>,
|
|
18
|
+
OptionalPlugin<TasksAndDecisionsPlugin>,
|
|
19
|
+
OptionalPlugin<AnalyticsPlugin>,
|
|
20
|
+
OptionalPlugin<PrimaryToolbarPlugin>
|
|
21
|
+
];
|
|
22
|
+
}>;
|
|
23
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { ExtractInjectionAPI, FeatureFlags } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
-
import type { ToolbarListsIndentationPlugin } from '
|
|
5
|
-
import type { onItemActivated } from '
|
|
4
|
+
import type { ToolbarListsIndentationPlugin } from '../toolbarListsIndentationPluginType';
|
|
5
|
+
import type { onItemActivated } from '../ui/onItemActivated';
|
|
6
6
|
export type ButtonName = 'bullet_list' | 'ordered_list' | 'indent' | 'outdent';
|
|
7
7
|
export declare enum ToolbarType {
|
|
8
8
|
PRIMARY = "primaryToolbar",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { ExtractInjectionAPI, FeatureFlags } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
-
import type { ToolbarListsIndentationPlugin } from '../
|
|
4
|
+
import type { ToolbarListsIndentationPlugin } from '../toolbarListsIndentationPluginType';
|
|
5
5
|
type FloatingToolbarComponentProps = {
|
|
6
6
|
allowHeadingAndParagraphIndentation: boolean;
|
|
7
7
|
editorView: EditorView;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
import { jsx } from '@emotion/react';
|
|
6
6
|
import type { ExtractInjectionAPI, FeatureFlags } from '@atlaskit/editor-common/types';
|
|
7
7
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
|
-
import type { ToolbarListsIndentationPlugin } from '../plugin';
|
|
9
8
|
import type { IndentationButtonNode } from '../pm-plugins/indentation-buttons';
|
|
9
|
+
import type { ToolbarListsIndentationPlugin } from '../toolbarListsIndentationPluginType';
|
|
10
10
|
import { ToolbarType } from '../types';
|
|
11
11
|
export interface Props {
|
|
12
12
|
editorView: EditorView;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-toolbar-lists-indentation",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.5",
|
|
4
4
|
"description": "Toolbar lists and indentation plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
".": "./src/index.ts"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@atlaskit/editor-common": "^96.
|
|
34
|
+
"@atlaskit/editor-common": "^96.3.0",
|
|
35
35
|
"@atlaskit/editor-plugin-analytics": "^1.10.0",
|
|
36
36
|
"@atlaskit/editor-plugin-block-type": "^4.0.0",
|
|
37
37
|
"@atlaskit/editor-plugin-feature-flags": "^1.2.0",
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"@atlaskit/editor-plugin-tasks-and-decisions": "^2.12.0",
|
|
42
42
|
"@atlaskit/editor-prosemirror": "6.2.1",
|
|
43
43
|
"@atlaskit/editor-shared-styles": "^3.2.0",
|
|
44
|
-
"@atlaskit/icon": "^23.
|
|
44
|
+
"@atlaskit/icon": "^23.1.0",
|
|
45
45
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
46
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
46
|
+
"@atlaskit/tmp-editor-statsig": "^2.23.0",
|
|
47
47
|
"@babel/runtime": "^7.0.0",
|
|
48
48
|
"@emotion/react": "^11.7.1"
|
|
49
49
|
},
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@af/integration-testing": "*",
|
|
57
57
|
"@af/visual-regression": "*",
|
|
58
58
|
"@atlaskit/adf-schema": "^46.1.0",
|
|
59
|
-
"@atlaskit/analytics-next": "^10.
|
|
59
|
+
"@atlaskit/analytics-next": "^10.2.0",
|
|
60
60
|
"@atlaskit/editor-plugin-base": "^2.0.0",
|
|
61
61
|
"@atlaskit/editor-plugin-text-formatting": "^1.16.0",
|
|
62
62
|
"@atlaskit/ssr": "*",
|
|
@@ -67,6 +67,9 @@
|
|
|
67
67
|
},
|
|
68
68
|
"techstack": {
|
|
69
69
|
"@atlassian/frontend": {
|
|
70
|
+
"code-structure": [
|
|
71
|
+
"editor-plugin"
|
|
72
|
+
],
|
|
70
73
|
"import-structure": [
|
|
71
74
|
"atlassian-conventions"
|
|
72
75
|
],
|
|
@@ -97,5 +100,10 @@
|
|
|
97
100
|
"import-no-extraneous-disable-for-examples-and-docs"
|
|
98
101
|
]
|
|
99
102
|
}
|
|
103
|
+
},
|
|
104
|
+
"platform-feature-flags": {
|
|
105
|
+
"platform_editor_toolbar_fix_for_disabled_options": {
|
|
106
|
+
"type": "boolean"
|
|
107
|
+
}
|
|
100
108
|
}
|
|
101
109
|
}
|
package/dist/types/plugin.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { ExtractInjectionAPI, FeatureFlags, NextEditorPlugin, OptionalPlugin, ToolbarUiComponentFactoryParams } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
4
|
-
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
5
|
-
import type { IndentationPlugin } from '@atlaskit/editor-plugin-indentation';
|
|
6
|
-
import type { ListPlugin } from '@atlaskit/editor-plugin-list';
|
|
7
|
-
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
|
|
8
|
-
import type { TasksAndDecisionsPlugin } from '@atlaskit/editor-plugin-tasks-and-decisions';
|
|
9
|
-
type Config = {
|
|
10
|
-
showIndentationButtons: boolean;
|
|
11
|
-
allowHeadingAndParagraphIndentation: boolean;
|
|
12
|
-
};
|
|
13
|
-
export type ToolbarListsIndentationPlugin = NextEditorPlugin<'toolbarListsIndentation', {
|
|
14
|
-
pluginConfiguration: Config;
|
|
15
|
-
dependencies: [
|
|
16
|
-
OptionalPlugin<FeatureFlagsPlugin>,
|
|
17
|
-
ListPlugin,
|
|
18
|
-
OptionalPlugin<IndentationPlugin>,
|
|
19
|
-
OptionalPlugin<TasksAndDecisionsPlugin>,
|
|
20
|
-
OptionalPlugin<AnalyticsPlugin>,
|
|
21
|
-
OptionalPlugin<PrimaryToolbarPlugin>
|
|
22
|
-
];
|
|
23
|
-
}>;
|
|
24
|
-
export declare const toolbarListsIndentationPlugin: ToolbarListsIndentationPlugin;
|
|
25
|
-
type PrimaryToolbarComponentProps = Pick<ToolbarUiComponentFactoryParams, 'editorView' | 'popupsMountPoint' | 'popupsBoundariesElement' | 'popupsScrollableElement' | 'disabled' | 'isToolbarReducedSpacing'> & {
|
|
26
|
-
featureFlags: FeatureFlags;
|
|
27
|
-
isSmall: boolean;
|
|
28
|
-
showIndentationButtons?: boolean;
|
|
29
|
-
pluginInjectionApi: ExtractInjectionAPI<typeof toolbarListsIndentationPlugin> | undefined;
|
|
30
|
-
allowHeadingAndParagraphIndentation: boolean;
|
|
31
|
-
};
|
|
32
|
-
export declare function PrimaryToolbarComponent({ featureFlags, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, isSmall, isToolbarReducedSpacing, disabled, editorView, showIndentationButtons, pluginInjectionApi, allowHeadingAndParagraphIndentation, }: PrimaryToolbarComponentProps): JSX.Element | null;
|
|
33
|
-
export {};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { ExtractInjectionAPI, FeatureFlags, NextEditorPlugin, OptionalPlugin, ToolbarUiComponentFactoryParams } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
4
|
-
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
5
|
-
import type { IndentationPlugin } from '@atlaskit/editor-plugin-indentation';
|
|
6
|
-
import type { ListPlugin } from '@atlaskit/editor-plugin-list';
|
|
7
|
-
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
|
|
8
|
-
import type { TasksAndDecisionsPlugin } from '@atlaskit/editor-plugin-tasks-and-decisions';
|
|
9
|
-
type Config = {
|
|
10
|
-
showIndentationButtons: boolean;
|
|
11
|
-
allowHeadingAndParagraphIndentation: boolean;
|
|
12
|
-
};
|
|
13
|
-
export type ToolbarListsIndentationPlugin = NextEditorPlugin<'toolbarListsIndentation', {
|
|
14
|
-
pluginConfiguration: Config;
|
|
15
|
-
dependencies: [
|
|
16
|
-
OptionalPlugin<FeatureFlagsPlugin>,
|
|
17
|
-
ListPlugin,
|
|
18
|
-
OptionalPlugin<IndentationPlugin>,
|
|
19
|
-
OptionalPlugin<TasksAndDecisionsPlugin>,
|
|
20
|
-
OptionalPlugin<AnalyticsPlugin>,
|
|
21
|
-
OptionalPlugin<PrimaryToolbarPlugin>
|
|
22
|
-
];
|
|
23
|
-
}>;
|
|
24
|
-
export declare const toolbarListsIndentationPlugin: ToolbarListsIndentationPlugin;
|
|
25
|
-
type PrimaryToolbarComponentProps = Pick<ToolbarUiComponentFactoryParams, 'editorView' | 'popupsMountPoint' | 'popupsBoundariesElement' | 'popupsScrollableElement' | 'disabled' | 'isToolbarReducedSpacing'> & {
|
|
26
|
-
featureFlags: FeatureFlags;
|
|
27
|
-
isSmall: boolean;
|
|
28
|
-
showIndentationButtons?: boolean;
|
|
29
|
-
pluginInjectionApi: ExtractInjectionAPI<typeof toolbarListsIndentationPlugin> | undefined;
|
|
30
|
-
allowHeadingAndParagraphIndentation: boolean;
|
|
31
|
-
};
|
|
32
|
-
export declare function PrimaryToolbarComponent({ featureFlags, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, isSmall, isToolbarReducedSpacing, disabled, editorView, showIndentationButtons, pluginInjectionApi, allowHeadingAndParagraphIndentation, }: PrimaryToolbarComponentProps): JSX.Element | null;
|
|
33
|
-
export {};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|