@atlaskit/editor-plugin-toolbar-lists-indentation 3.2.11 → 3.3.0
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 +12 -0
- package/dist/cjs/toolbarListsIndentationPlugin.js +4 -2
- package/dist/es2019/toolbarListsIndentationPlugin.js +4 -2
- package/dist/esm/toolbarListsIndentationPlugin.js +4 -2
- package/dist/types/toolbarListsIndentationPluginType.d.ts +3 -1
- package/dist/types-ts4.5/toolbarListsIndentationPluginType.d.ts +3 -1
- package/package.json +9 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-toolbar-lists-indentation
|
|
2
2
|
|
|
3
|
+
## 3.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#158546](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/158546)
|
|
8
|
+
[`b7fe4e6f226f3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b7fe4e6f226f3) -
|
|
9
|
+
ED-27284 use user preferences plugin in editor preset.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 3.2.11
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -13,6 +13,7 @@ var _hooks = require("@atlaskit/editor-common/hooks");
|
|
|
13
13
|
var _types = require("@atlaskit/editor-common/types");
|
|
14
14
|
var _usePluginStateEffect = require("@atlaskit/editor-common/use-plugin-state-effect");
|
|
15
15
|
var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
|
|
16
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
17
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
17
18
|
var _indentationButtons = require("./pm-plugins/indentation-buttons");
|
|
18
19
|
var _types2 = require("./types");
|
|
@@ -59,8 +60,9 @@ var toolbarListsIndentationPlugin = exports.toolbarListsIndentationPlugin = func
|
|
|
59
60
|
name: 'toolbarListsIndentation',
|
|
60
61
|
pluginsOptions: {
|
|
61
62
|
selectionToolbar: function selectionToolbar() {
|
|
62
|
-
var _api$selectionToolbar;
|
|
63
|
-
|
|
63
|
+
var _api$userPreferences, _api$selectionToolbar;
|
|
64
|
+
var toolbarDocking = (0, _platformFeatureFlags.fg)('platform_editor_use_preferences_plugin') ? api === null || api === void 0 || (_api$userPreferences = api.userPreferences) === null || _api$userPreferences === void 0 || (_api$userPreferences = _api$userPreferences.sharedState.currentState()) === null || _api$userPreferences === void 0 ? void 0 : _api$userPreferences.preferences.toolbarDockingPosition : api === null || api === void 0 || (_api$selectionToolbar = api.selectionToolbar) === null || _api$selectionToolbar === void 0 || (_api$selectionToolbar = _api$selectionToolbar.sharedState) === null || _api$selectionToolbar === void 0 || (_api$selectionToolbar = _api$selectionToolbar.currentState()) === null || _api$selectionToolbar === void 0 ? void 0 : _api$selectionToolbar.toolbarDocking;
|
|
65
|
+
if (toolbarDocking === 'none' && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1', {
|
|
64
66
|
exposure: true
|
|
65
67
|
})) {
|
|
66
68
|
var toolbarCustom = {
|
|
@@ -3,6 +3,7 @@ import { useSharedPluginState, sharedPluginStateHookMigratorFactory } from '@atl
|
|
|
3
3
|
import { ToolbarSize } from '@atlaskit/editor-common/types';
|
|
4
4
|
import { usePluginStateEffect } from '@atlaskit/editor-common/use-plugin-state-effect';
|
|
5
5
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
7
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
7
8
|
import { getIndentationButtonsState } from './pm-plugins/indentation-buttons';
|
|
8
9
|
import { ToolbarType } from './types';
|
|
@@ -49,8 +50,9 @@ export const toolbarListsIndentationPlugin = ({
|
|
|
49
50
|
name: 'toolbarListsIndentation',
|
|
50
51
|
pluginsOptions: {
|
|
51
52
|
selectionToolbar() {
|
|
52
|
-
var _api$selectionToolbar, _api$selectionToolbar2, _api$selectionToolbar3;
|
|
53
|
-
|
|
53
|
+
var _api$userPreferences, _api$userPreferences$, _api$selectionToolbar, _api$selectionToolbar2, _api$selectionToolbar3;
|
|
54
|
+
const toolbarDocking = fg('platform_editor_use_preferences_plugin') ? api === null || api === void 0 ? void 0 : (_api$userPreferences = api.userPreferences) === null || _api$userPreferences === void 0 ? void 0 : (_api$userPreferences$ = _api$userPreferences.sharedState.currentState()) === null || _api$userPreferences$ === void 0 ? void 0 : _api$userPreferences$.preferences.toolbarDockingPosition : api === null || api === void 0 ? void 0 : (_api$selectionToolbar = api.selectionToolbar) === null || _api$selectionToolbar === void 0 ? void 0 : (_api$selectionToolbar2 = _api$selectionToolbar.sharedState) === null || _api$selectionToolbar2 === void 0 ? void 0 : (_api$selectionToolbar3 = _api$selectionToolbar2.currentState()) === null || _api$selectionToolbar3 === void 0 ? void 0 : _api$selectionToolbar3.toolbarDocking;
|
|
55
|
+
if (toolbarDocking === 'none' && editorExperiment('platform_editor_controls', 'variant1', {
|
|
54
56
|
exposure: true
|
|
55
57
|
})) {
|
|
56
58
|
const toolbarCustom = {
|
|
@@ -4,6 +4,7 @@ import { useSharedPluginState, sharedPluginStateHookMigratorFactory } from '@atl
|
|
|
4
4
|
import { ToolbarSize } from '@atlaskit/editor-common/types';
|
|
5
5
|
import { usePluginStateEffect } from '@atlaskit/editor-common/use-plugin-state-effect';
|
|
6
6
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
8
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
8
9
|
import { getIndentationButtonsState } from './pm-plugins/indentation-buttons';
|
|
9
10
|
import { ToolbarType } from './types';
|
|
@@ -49,8 +50,9 @@ export var toolbarListsIndentationPlugin = function toolbarListsIndentationPlugi
|
|
|
49
50
|
name: 'toolbarListsIndentation',
|
|
50
51
|
pluginsOptions: {
|
|
51
52
|
selectionToolbar: function selectionToolbar() {
|
|
52
|
-
var _api$selectionToolbar;
|
|
53
|
-
|
|
53
|
+
var _api$userPreferences, _api$selectionToolbar;
|
|
54
|
+
var toolbarDocking = fg('platform_editor_use_preferences_plugin') ? api === null || api === void 0 || (_api$userPreferences = api.userPreferences) === null || _api$userPreferences === void 0 || (_api$userPreferences = _api$userPreferences.sharedState.currentState()) === null || _api$userPreferences === void 0 ? void 0 : _api$userPreferences.preferences.toolbarDockingPosition : api === null || api === void 0 || (_api$selectionToolbar = api.selectionToolbar) === null || _api$selectionToolbar === void 0 || (_api$selectionToolbar = _api$selectionToolbar.sharedState) === null || _api$selectionToolbar === void 0 || (_api$selectionToolbar = _api$selectionToolbar.currentState()) === null || _api$selectionToolbar === void 0 ? void 0 : _api$selectionToolbar.toolbarDocking;
|
|
55
|
+
if (toolbarDocking === 'none' && editorExperiment('platform_editor_controls', 'variant1', {
|
|
54
56
|
exposure: true
|
|
55
57
|
})) {
|
|
56
58
|
var toolbarCustom = {
|
|
@@ -6,6 +6,7 @@ import type { ListPlugin } from '@atlaskit/editor-plugin-list';
|
|
|
6
6
|
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
|
|
7
7
|
import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugin-selection-toolbar';
|
|
8
8
|
import type { TasksAndDecisionsPlugin } from '@atlaskit/editor-plugin-tasks-and-decisions';
|
|
9
|
+
import type { UserPreferencesPlugin } from '@atlaskit/editor-plugin-user-preferences';
|
|
9
10
|
export type ToolbarListsIndentationPluginOptions = {
|
|
10
11
|
showIndentationButtons: boolean;
|
|
11
12
|
allowHeadingAndParagraphIndentation: boolean;
|
|
@@ -17,7 +18,8 @@ export type ToolbarListsIndentationPluginDependencies = [
|
|
|
17
18
|
OptionalPlugin<TasksAndDecisionsPlugin>,
|
|
18
19
|
OptionalPlugin<AnalyticsPlugin>,
|
|
19
20
|
OptionalPlugin<PrimaryToolbarPlugin>,
|
|
20
|
-
OptionalPlugin<SelectionToolbarPlugin
|
|
21
|
+
OptionalPlugin<SelectionToolbarPlugin>,
|
|
22
|
+
OptionalPlugin<UserPreferencesPlugin>
|
|
21
23
|
];
|
|
22
24
|
export type ToolbarListsIndentationPlugin = NextEditorPlugin<'toolbarListsIndentation', {
|
|
23
25
|
pluginConfiguration: ToolbarListsIndentationPluginOptions;
|
|
@@ -6,6 +6,7 @@ import type { ListPlugin } from '@atlaskit/editor-plugin-list';
|
|
|
6
6
|
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
|
|
7
7
|
import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugin-selection-toolbar';
|
|
8
8
|
import type { TasksAndDecisionsPlugin } from '@atlaskit/editor-plugin-tasks-and-decisions';
|
|
9
|
+
import type { UserPreferencesPlugin } from '@atlaskit/editor-plugin-user-preferences';
|
|
9
10
|
export type ToolbarListsIndentationPluginOptions = {
|
|
10
11
|
showIndentationButtons: boolean;
|
|
11
12
|
allowHeadingAndParagraphIndentation: boolean;
|
|
@@ -17,7 +18,8 @@ export type ToolbarListsIndentationPluginDependencies = [
|
|
|
17
18
|
OptionalPlugin<TasksAndDecisionsPlugin>,
|
|
18
19
|
OptionalPlugin<AnalyticsPlugin>,
|
|
19
20
|
OptionalPlugin<PrimaryToolbarPlugin>,
|
|
20
|
-
OptionalPlugin<SelectionToolbarPlugin
|
|
21
|
+
OptionalPlugin<SelectionToolbarPlugin>,
|
|
22
|
+
OptionalPlugin<UserPreferencesPlugin>
|
|
21
23
|
];
|
|
22
24
|
export type ToolbarListsIndentationPlugin = NextEditorPlugin<'toolbarListsIndentation', {
|
|
23
25
|
pluginConfiguration: ToolbarListsIndentationPluginOptions;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-toolbar-lists-indentation",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "Toolbar lists and indentation plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,21 +34,21 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@atlaskit/css": "^0.10.0",
|
|
37
|
-
"@atlaskit/editor-common": "^106.
|
|
37
|
+
"@atlaskit/editor-common": "^106.7.0",
|
|
38
38
|
"@atlaskit/editor-plugin-analytics": "^2.3.0",
|
|
39
|
-
"@atlaskit/editor-plugin-block-type": "^5.
|
|
39
|
+
"@atlaskit/editor-plugin-block-type": "^5.2.0",
|
|
40
40
|
"@atlaskit/editor-plugin-feature-flags": "^1.4.0",
|
|
41
41
|
"@atlaskit/editor-plugin-indentation": "^2.1.0",
|
|
42
42
|
"@atlaskit/editor-plugin-list": "^4.2.0",
|
|
43
43
|
"@atlaskit/editor-plugin-primary-toolbar": "^3.2.0",
|
|
44
|
-
"@atlaskit/editor-plugin-selection-toolbar": "^3.
|
|
44
|
+
"@atlaskit/editor-plugin-selection-toolbar": "^3.7.0",
|
|
45
45
|
"@atlaskit/editor-plugin-tasks-and-decisions": "^5.1.0",
|
|
46
46
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
47
47
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
48
48
|
"@atlaskit/icon": "^26.4.0",
|
|
49
49
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
50
50
|
"@atlaskit/tmp-editor-statsig": "^7.0.0",
|
|
51
|
-
"@atlaskit/tokens": "^5.
|
|
51
|
+
"@atlaskit/tokens": "^5.2.0",
|
|
52
52
|
"@babel/runtime": "^7.0.0"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@atlaskit/adf-schema": "^47.6.0",
|
|
63
63
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
64
64
|
"@atlaskit/editor-plugin-base": "^3.0.0",
|
|
65
|
-
"@atlaskit/editor-plugin-text-formatting": "^2.
|
|
65
|
+
"@atlaskit/editor-plugin-text-formatting": "^2.3.0",
|
|
66
66
|
"@atlaskit/ssr": "workspace:^",
|
|
67
67
|
"@atlaskit/visual-regression": "workspace:^",
|
|
68
68
|
"@testing-library/react": "^13.4.0",
|
|
@@ -108,6 +108,9 @@
|
|
|
108
108
|
"platform-visual-refresh-icons": {
|
|
109
109
|
"type": "boolean"
|
|
110
110
|
},
|
|
111
|
+
"platform_editor_use_preferences_plugin": {
|
|
112
|
+
"type": "boolean"
|
|
113
|
+
},
|
|
111
114
|
"platform_editor_controls_patch_6": {
|
|
112
115
|
"type": "boolean"
|
|
113
116
|
}
|