@atlaskit/editor-plugin-toolbar-lists-indentation 3.3.0 → 3.3.2
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/ui/ToolbarDropdown.js +5 -6
- package/dist/cjs/ui/index.js +1 -2
- package/dist/es2019/ui/ToolbarDropdown.js +5 -6
- package/dist/es2019/ui/index.js +1 -2
- package/dist/esm/ui/ToolbarDropdown.js +5 -6
- package/dist/esm/ui/index.js +1 -2
- package/package.json +4 -7
package/CHANGELOG.md
CHANGED
|
@@ -19,7 +19,6 @@ var _listNumbered = _interopRequireDefault(require("@atlaskit/icon/core/list-num
|
|
|
19
19
|
var _listBulletedEditorBulletList = _interopRequireDefault(require("@atlaskit/icon/core/migration/list-bulleted--editor-bullet-list"));
|
|
20
20
|
var _textIndentLeft = _interopRequireDefault(require("@atlaskit/icon/core/text-indent-left"));
|
|
21
21
|
var _textIndentRight = _interopRequireDefault(require("@atlaskit/icon/core/text-indent-right"));
|
|
22
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
23
22
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
24
23
|
var _types = require("../types");
|
|
25
24
|
function ToolbarDropdown(props) {
|
|
@@ -75,7 +74,7 @@ function ToolbarDropdown(props) {
|
|
|
75
74
|
var reducedSpacing = props.toolbarType === _types.ToolbarType.FLOATING ? 'compact' : 'none';
|
|
76
75
|
var activeListIcon = null;
|
|
77
76
|
var isSelected = isDropdownOpen;
|
|
78
|
-
if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')
|
|
77
|
+
if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')) {
|
|
79
78
|
activeListIcon = orderedListActive ? /*#__PURE__*/_react.default.createElement(_listNumbered.default, {
|
|
80
79
|
spacing: "spacious",
|
|
81
80
|
label: ""
|
|
@@ -135,7 +134,7 @@ function useItems(props) {
|
|
|
135
134
|
isDisabled: props.bulletListDisabled,
|
|
136
135
|
isActive: Boolean(props.bulletListActive),
|
|
137
136
|
elemAfter: /*#__PURE__*/_react.default.createElement(_ui.Shortcut, null, (0, _keymaps.tooltip)(_keymaps.toggleBulletList)),
|
|
138
|
-
elemBefore: (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')
|
|
137
|
+
elemBefore: (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? /*#__PURE__*/_react.default.createElement(_listBulleted.default, {
|
|
139
138
|
label: ""
|
|
140
139
|
}) : undefined
|
|
141
140
|
}, {
|
|
@@ -147,7 +146,7 @@ function useItems(props) {
|
|
|
147
146
|
isDisabled: props.orderedListDisabled,
|
|
148
147
|
isActive: Boolean(props.orderedListActive),
|
|
149
148
|
elemAfter: /*#__PURE__*/_react.default.createElement(_ui.Shortcut, null, (0, _keymaps.tooltip)(_keymaps.toggleOrderedList)),
|
|
150
|
-
elemBefore: (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')
|
|
149
|
+
elemBefore: (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? /*#__PURE__*/_react.default.createElement(_listNumbered.default, {
|
|
151
150
|
label: ""
|
|
152
151
|
}) : undefined
|
|
153
152
|
}];
|
|
@@ -163,7 +162,7 @@ function useItems(props) {
|
|
|
163
162
|
isDisabled: props.outdentDisabled,
|
|
164
163
|
isActive: false,
|
|
165
164
|
elemAfter: /*#__PURE__*/_react.default.createElement(_ui.Shortcut, null, (0, _keymaps.tooltip)(_keymaps.outdent)),
|
|
166
|
-
elemBefore: (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')
|
|
165
|
+
elemBefore: (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? /*#__PURE__*/_react.default.createElement(_textIndentLeft.default, {
|
|
167
166
|
label: ""
|
|
168
167
|
}) : undefined
|
|
169
168
|
}, {
|
|
@@ -175,7 +174,7 @@ function useItems(props) {
|
|
|
175
174
|
isDisabled: props.indentDisabled,
|
|
176
175
|
isActive: false,
|
|
177
176
|
elemAfter: /*#__PURE__*/_react.default.createElement(_ui.Shortcut, null, (0, _keymaps.tooltip)(_keymaps.indent)),
|
|
178
|
-
elemBefore: (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')
|
|
177
|
+
elemBefore: (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? /*#__PURE__*/_react.default.createElement(_textIndentRight.default, {
|
|
179
178
|
label: ""
|
|
180
179
|
}) : undefined
|
|
181
180
|
});
|
package/dist/cjs/ui/index.js
CHANGED
|
@@ -9,7 +9,6 @@ exports.default = ToolbarListsIndentation;
|
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _runtime = require("@compiled/react/runtime");
|
|
11
11
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
12
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
12
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
14
13
|
var _types = require("../types");
|
|
15
14
|
var _onItemActivated = require("./onItemActivated");
|
|
@@ -36,7 +35,7 @@ function ToolbarListsIndentation(props) {
|
|
|
36
35
|
pluginInjectionApi = props.pluginInjectionApi,
|
|
37
36
|
toolbarType = props.toolbarType;
|
|
38
37
|
var inputMethod = toolbarType ? (0, _inputMethod.getInputMethod)(toolbarType) : _analytics.INPUT_METHOD.TOOLBAR;
|
|
39
|
-
if (isSmall || toolbarType === _types.ToolbarType.FLOATING || (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')
|
|
38
|
+
if (isSmall || toolbarType === _types.ToolbarType.FLOATING || (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')) {
|
|
40
39
|
var areAllOptionsDisabled = [bulletListDisabled, orderedListDisabled, indentDisabled, outdentDisabled].every(function (item) {
|
|
41
40
|
return Boolean(item) === true;
|
|
42
41
|
});
|
|
@@ -11,7 +11,6 @@ import ListNumberedIcon from '@atlaskit/icon/core/list-numbered';
|
|
|
11
11
|
import BulletListIcon from '@atlaskit/icon/core/migration/list-bulleted--editor-bullet-list';
|
|
12
12
|
import TextIndentLeftIcon from '@atlaskit/icon/core/text-indent-left';
|
|
13
13
|
import TextIndentRightIcon from '@atlaskit/icon/core/text-indent-right';
|
|
14
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
14
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
16
15
|
import { ToolbarType } from '../types';
|
|
17
16
|
export function ToolbarDropdown(props) {
|
|
@@ -64,7 +63,7 @@ export function ToolbarDropdown(props) {
|
|
|
64
63
|
const reducedSpacing = props.toolbarType === ToolbarType.FLOATING ? 'compact' : 'none';
|
|
65
64
|
let activeListIcon = null;
|
|
66
65
|
let isSelected = isDropdownOpen;
|
|
67
|
-
if (editorExperiment('platform_editor_controls', 'variant1')
|
|
66
|
+
if (editorExperiment('platform_editor_controls', 'variant1')) {
|
|
68
67
|
activeListIcon = orderedListActive ? /*#__PURE__*/React.createElement(ListNumberedIcon, {
|
|
69
68
|
spacing: "spacious",
|
|
70
69
|
label: ""
|
|
@@ -125,7 +124,7 @@ function useItems(props) {
|
|
|
125
124
|
isDisabled: props.bulletListDisabled,
|
|
126
125
|
isActive: Boolean(props.bulletListActive),
|
|
127
126
|
elemAfter: /*#__PURE__*/React.createElement(Shortcut, null, tooltip(toggleBulletListKeymap)),
|
|
128
|
-
elemBefore: editorExperiment('platform_editor_controls', 'variant1')
|
|
127
|
+
elemBefore: editorExperiment('platform_editor_controls', 'variant1') ? /*#__PURE__*/React.createElement(ListBulletedIcon, {
|
|
129
128
|
label: ""
|
|
130
129
|
}) : undefined
|
|
131
130
|
}, {
|
|
@@ -137,7 +136,7 @@ function useItems(props) {
|
|
|
137
136
|
isDisabled: props.orderedListDisabled,
|
|
138
137
|
isActive: Boolean(props.orderedListActive),
|
|
139
138
|
elemAfter: /*#__PURE__*/React.createElement(Shortcut, null, tooltip(toggleOrderedListKeymap)),
|
|
140
|
-
elemBefore: editorExperiment('platform_editor_controls', 'variant1')
|
|
139
|
+
elemBefore: editorExperiment('platform_editor_controls', 'variant1') ? /*#__PURE__*/React.createElement(ListNumberedIcon, {
|
|
141
140
|
label: ""
|
|
142
141
|
}) : undefined
|
|
143
142
|
}];
|
|
@@ -153,7 +152,7 @@ function useItems(props) {
|
|
|
153
152
|
isDisabled: props.outdentDisabled,
|
|
154
153
|
isActive: false,
|
|
155
154
|
elemAfter: /*#__PURE__*/React.createElement(Shortcut, null, tooltip(toggleOutdentKeymap)),
|
|
156
|
-
elemBefore: editorExperiment('platform_editor_controls', 'variant1')
|
|
155
|
+
elemBefore: editorExperiment('platform_editor_controls', 'variant1') ? /*#__PURE__*/React.createElement(TextIndentLeftIcon, {
|
|
157
156
|
label: ""
|
|
158
157
|
}) : undefined
|
|
159
158
|
}, {
|
|
@@ -165,7 +164,7 @@ function useItems(props) {
|
|
|
165
164
|
isDisabled: props.indentDisabled,
|
|
166
165
|
isActive: false,
|
|
167
166
|
elemAfter: /*#__PURE__*/React.createElement(Shortcut, null, tooltip(toggleIndentKeymap)),
|
|
168
|
-
elemBefore: editorExperiment('platform_editor_controls', 'variant1')
|
|
167
|
+
elemBefore: editorExperiment('platform_editor_controls', 'variant1') ? /*#__PURE__*/React.createElement(TextIndentRightIcon, {
|
|
169
168
|
label: ""
|
|
170
169
|
}) : undefined
|
|
171
170
|
});
|
package/dist/es2019/ui/index.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
5
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
7
6
|
import { ToolbarType } from '../types';
|
|
8
7
|
import { onItemActivated } from './onItemActivated';
|
|
@@ -30,7 +29,7 @@ export default function ToolbarListsIndentation(props) {
|
|
|
30
29
|
toolbarType
|
|
31
30
|
} = props;
|
|
32
31
|
const inputMethod = toolbarType ? getInputMethod(toolbarType) : INPUT_METHOD.TOOLBAR;
|
|
33
|
-
if (isSmall || toolbarType === ToolbarType.FLOATING || editorExperiment('platform_editor_controls', 'variant1')
|
|
32
|
+
if (isSmall || toolbarType === ToolbarType.FLOATING || editorExperiment('platform_editor_controls', 'variant1')) {
|
|
34
33
|
const areAllOptionsDisabled = [bulletListDisabled, orderedListDisabled, indentDisabled, outdentDisabled].every(item => Boolean(item) === true);
|
|
35
34
|
const isDisabled = disabled || areAllOptionsDisabled;
|
|
36
35
|
return /*#__PURE__*/React.createElement(ToolbarDropdown, {
|
|
@@ -12,7 +12,6 @@ import ListNumberedIcon from '@atlaskit/icon/core/list-numbered';
|
|
|
12
12
|
import BulletListIcon from '@atlaskit/icon/core/migration/list-bulleted--editor-bullet-list';
|
|
13
13
|
import TextIndentLeftIcon from '@atlaskit/icon/core/text-indent-left';
|
|
14
14
|
import TextIndentRightIcon from '@atlaskit/icon/core/text-indent-right';
|
|
15
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
15
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
17
16
|
import { ToolbarType } from '../types';
|
|
18
17
|
export function ToolbarDropdown(props) {
|
|
@@ -68,7 +67,7 @@ export function ToolbarDropdown(props) {
|
|
|
68
67
|
var reducedSpacing = props.toolbarType === ToolbarType.FLOATING ? 'compact' : 'none';
|
|
69
68
|
var activeListIcon = null;
|
|
70
69
|
var isSelected = isDropdownOpen;
|
|
71
|
-
if (editorExperiment('platform_editor_controls', 'variant1')
|
|
70
|
+
if (editorExperiment('platform_editor_controls', 'variant1')) {
|
|
72
71
|
activeListIcon = orderedListActive ? /*#__PURE__*/React.createElement(ListNumberedIcon, {
|
|
73
72
|
spacing: "spacious",
|
|
74
73
|
label: ""
|
|
@@ -128,7 +127,7 @@ function useItems(props) {
|
|
|
128
127
|
isDisabled: props.bulletListDisabled,
|
|
129
128
|
isActive: Boolean(props.bulletListActive),
|
|
130
129
|
elemAfter: /*#__PURE__*/React.createElement(Shortcut, null, tooltip(toggleBulletListKeymap)),
|
|
131
|
-
elemBefore: editorExperiment('platform_editor_controls', 'variant1')
|
|
130
|
+
elemBefore: editorExperiment('platform_editor_controls', 'variant1') ? /*#__PURE__*/React.createElement(ListBulletedIcon, {
|
|
132
131
|
label: ""
|
|
133
132
|
}) : undefined
|
|
134
133
|
}, {
|
|
@@ -140,7 +139,7 @@ function useItems(props) {
|
|
|
140
139
|
isDisabled: props.orderedListDisabled,
|
|
141
140
|
isActive: Boolean(props.orderedListActive),
|
|
142
141
|
elemAfter: /*#__PURE__*/React.createElement(Shortcut, null, tooltip(toggleOrderedListKeymap)),
|
|
143
|
-
elemBefore: editorExperiment('platform_editor_controls', 'variant1')
|
|
142
|
+
elemBefore: editorExperiment('platform_editor_controls', 'variant1') ? /*#__PURE__*/React.createElement(ListNumberedIcon, {
|
|
144
143
|
label: ""
|
|
145
144
|
}) : undefined
|
|
146
145
|
}];
|
|
@@ -156,7 +155,7 @@ function useItems(props) {
|
|
|
156
155
|
isDisabled: props.outdentDisabled,
|
|
157
156
|
isActive: false,
|
|
158
157
|
elemAfter: /*#__PURE__*/React.createElement(Shortcut, null, tooltip(toggleOutdentKeymap)),
|
|
159
|
-
elemBefore: editorExperiment('platform_editor_controls', 'variant1')
|
|
158
|
+
elemBefore: editorExperiment('platform_editor_controls', 'variant1') ? /*#__PURE__*/React.createElement(TextIndentLeftIcon, {
|
|
160
159
|
label: ""
|
|
161
160
|
}) : undefined
|
|
162
161
|
}, {
|
|
@@ -168,7 +167,7 @@ function useItems(props) {
|
|
|
168
167
|
isDisabled: props.indentDisabled,
|
|
169
168
|
isActive: false,
|
|
170
169
|
elemAfter: /*#__PURE__*/React.createElement(Shortcut, null, tooltip(toggleIndentKeymap)),
|
|
171
|
-
elemBefore: editorExperiment('platform_editor_controls', 'variant1')
|
|
170
|
+
elemBefore: editorExperiment('platform_editor_controls', 'variant1') ? /*#__PURE__*/React.createElement(TextIndentRightIcon, {
|
|
172
171
|
label: ""
|
|
173
172
|
}) : undefined
|
|
174
173
|
});
|
package/dist/esm/ui/index.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
5
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
7
6
|
import { ToolbarType } from '../types';
|
|
8
7
|
import { onItemActivated } from './onItemActivated';
|
|
@@ -28,7 +27,7 @@ export default function ToolbarListsIndentation(props) {
|
|
|
28
27
|
pluginInjectionApi = props.pluginInjectionApi,
|
|
29
28
|
toolbarType = props.toolbarType;
|
|
30
29
|
var inputMethod = toolbarType ? getInputMethod(toolbarType) : INPUT_METHOD.TOOLBAR;
|
|
31
|
-
if (isSmall || toolbarType === ToolbarType.FLOATING || editorExperiment('platform_editor_controls', 'variant1')
|
|
30
|
+
if (isSmall || toolbarType === ToolbarType.FLOATING || editorExperiment('platform_editor_controls', 'variant1')) {
|
|
32
31
|
var areAllOptionsDisabled = [bulletListDisabled, orderedListDisabled, indentDisabled, outdentDisabled].every(function (item) {
|
|
33
32
|
return Boolean(item) === true;
|
|
34
33
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-toolbar-lists-indentation",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.2",
|
|
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,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@atlaskit/css": "^0.10.0",
|
|
37
|
-
"@atlaskit/editor-common": "^
|
|
37
|
+
"@atlaskit/editor-common": "^107.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-analytics": "^2.3.0",
|
|
39
39
|
"@atlaskit/editor-plugin-block-type": "^5.2.0",
|
|
40
40
|
"@atlaskit/editor-plugin-feature-flags": "^1.4.0",
|
|
@@ -45,9 +45,9 @@
|
|
|
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
|
-
"@atlaskit/icon": "^
|
|
48
|
+
"@atlaskit/icon": "^27.0.0",
|
|
49
49
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
50
|
-
"@atlaskit/tmp-editor-statsig": "^7.
|
|
50
|
+
"@atlaskit/tmp-editor-statsig": "^7.1.0",
|
|
51
51
|
"@atlaskit/tokens": "^5.2.0",
|
|
52
52
|
"@babel/runtime": "^7.0.0"
|
|
53
53
|
},
|
|
@@ -110,9 +110,6 @@
|
|
|
110
110
|
},
|
|
111
111
|
"platform_editor_use_preferences_plugin": {
|
|
112
112
|
"type": "boolean"
|
|
113
|
-
},
|
|
114
|
-
"platform_editor_controls_patch_6": {
|
|
115
|
-
"type": "boolean"
|
|
116
113
|
}
|
|
117
114
|
}
|
|
118
115
|
}
|