@atlaskit/editor-plugin-toolbar-lists-indentation 17.0.7 → 17.0.8
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 +6 -0
- package/dist/cjs/toolbarListsIndentationPlugin.js +2 -2
- package/dist/cjs/ui/FloatingToolbarComponent.js +2 -2
- package/dist/cjs/ui/ToolbarDropdown.js +6 -6
- package/dist/cjs/ui/index.js +2 -2
- package/dist/es2019/toolbarListsIndentationPlugin.js +1 -1
- package/dist/es2019/ui/FloatingToolbarComponent.js +1 -1
- package/dist/es2019/ui/ToolbarDropdown.js +1 -1
- package/dist/es2019/ui/index.js +1 -1
- package/dist/esm/toolbarListsIndentationPlugin.js +1 -1
- package/dist/esm/ui/FloatingToolbarComponent.js +1 -1
- package/dist/esm/ui/ToolbarDropdown.js +1 -1
- package/dist/esm/ui/index.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -14,7 +14,7 @@ var _hooks = require("@atlaskit/editor-common/hooks");
|
|
|
14
14
|
var _types = require("@atlaskit/editor-common/types");
|
|
15
15
|
var _usePluginStateEffect = require("@atlaskit/editor-common/use-plugin-state-effect");
|
|
16
16
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
17
|
-
var
|
|
17
|
+
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
18
18
|
var _indentationButtons = require("./pm-plugins/indentation-buttons");
|
|
19
19
|
var _types2 = require("./types");
|
|
20
20
|
var _ui = _interopRequireDefault(require("./ui"));
|
|
@@ -79,7 +79,7 @@ var toolbarListsIndentationPlugin = exports.toolbarListsIndentationPlugin = func
|
|
|
79
79
|
selectionToolbar: function selectionToolbar() {
|
|
80
80
|
var _api$userPreferences, _api$selectionToolbar;
|
|
81
81
|
var toolbarDocking = (0, _fg.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;
|
|
82
|
-
if (toolbarDocking === 'none' && (0,
|
|
82
|
+
if (toolbarDocking === 'none' && (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1', {
|
|
83
83
|
exposure: true
|
|
84
84
|
})) {
|
|
85
85
|
var toolbarCustom = {
|
|
@@ -10,7 +10,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
12
12
|
var _usePluginStateEffect = require("@atlaskit/editor-common/use-plugin-state-effect");
|
|
13
|
-
var
|
|
13
|
+
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
14
14
|
var _indentationButtons = require("../pm-plugins/indentation-buttons");
|
|
15
15
|
var _types = require("../types");
|
|
16
16
|
var _index = _interopRequireDefault(require("./index"));
|
|
@@ -73,7 +73,7 @@ function FloatingToolbarComponent(_ref) {
|
|
|
73
73
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
74
74
|
featureFlags: featureFlags,
|
|
75
75
|
isSmall: FloatingToolbarSettings.isSmall,
|
|
76
|
-
isReducedSpacing: (0,
|
|
76
|
+
isReducedSpacing: (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') ? false : FloatingToolbarSettings.isToolbarReducedSpacing,
|
|
77
77
|
disabled: FloatingToolbarSettings.disabled,
|
|
78
78
|
editorView: editorView,
|
|
79
79
|
bulletListActive: bulletListActive,
|
|
@@ -18,7 +18,7 @@ var _listBulleted = _interopRequireDefault(require("@atlaskit/icon/core/list-bul
|
|
|
18
18
|
var _listNumbered = _interopRequireDefault(require("@atlaskit/icon/core/list-numbered"));
|
|
19
19
|
var _textIndentLeft = _interopRequireDefault(require("@atlaskit/icon/core/text-indent-left"));
|
|
20
20
|
var _textIndentRight = _interopRequireDefault(require("@atlaskit/icon/core/text-indent-right"));
|
|
21
|
-
var
|
|
21
|
+
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
22
22
|
var _types = require("../types");
|
|
23
23
|
function ToolbarDropdown(props) {
|
|
24
24
|
var _useIntl = (0, _reactIntl.useIntl)(),
|
|
@@ -73,7 +73,7 @@ function ToolbarDropdown(props) {
|
|
|
73
73
|
var reducedSpacing = props.toolbarType === _types.ToolbarType.FLOATING ? 'compact' : 'none';
|
|
74
74
|
var activeListIcon = null;
|
|
75
75
|
var isSelected = isDropdownOpen;
|
|
76
|
-
if ((0,
|
|
76
|
+
if ((0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1')) {
|
|
77
77
|
activeListIcon = orderedListActive ? /*#__PURE__*/_react.default.createElement(_listNumbered.default, {
|
|
78
78
|
spacing: "spacious",
|
|
79
79
|
label: ""
|
|
@@ -135,7 +135,7 @@ function useItems(props) {
|
|
|
135
135
|
isDisabled: props.bulletListDisabled,
|
|
136
136
|
isActive: Boolean(props.bulletListActive),
|
|
137
137
|
elemAfter: /*#__PURE__*/_react.default.createElement(_ui.Shortcut, null, (0, _keymaps.tooltip)(_keymaps.toggleBulletList)),
|
|
138
|
-
elemBefore: (0,
|
|
138
|
+
elemBefore: (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') ? /*#__PURE__*/_react.default.createElement(_listBulleted.default, {
|
|
139
139
|
label: ""
|
|
140
140
|
}) : undefined
|
|
141
141
|
}, {
|
|
@@ -147,7 +147,7 @@ function useItems(props) {
|
|
|
147
147
|
isDisabled: props.orderedListDisabled,
|
|
148
148
|
isActive: Boolean(props.orderedListActive),
|
|
149
149
|
elemAfter: /*#__PURE__*/_react.default.createElement(_ui.Shortcut, null, (0, _keymaps.tooltip)(_keymaps.toggleOrderedList)),
|
|
150
|
-
elemBefore: (0,
|
|
150
|
+
elemBefore: (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') ? /*#__PURE__*/_react.default.createElement(_listNumbered.default, {
|
|
151
151
|
label: ""
|
|
152
152
|
}) : undefined
|
|
153
153
|
}];
|
|
@@ -163,7 +163,7 @@ function useItems(props) {
|
|
|
163
163
|
isDisabled: props.outdentDisabled,
|
|
164
164
|
isActive: false,
|
|
165
165
|
elemAfter: /*#__PURE__*/_react.default.createElement(_ui.Shortcut, null, (0, _keymaps.tooltip)(_keymaps.outdent)),
|
|
166
|
-
elemBefore: (0,
|
|
166
|
+
elemBefore: (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') ? /*#__PURE__*/_react.default.createElement(_textIndentLeft.default, {
|
|
167
167
|
label: ""
|
|
168
168
|
}) : undefined
|
|
169
169
|
}, {
|
|
@@ -175,7 +175,7 @@ function useItems(props) {
|
|
|
175
175
|
isDisabled: props.indentDisabled,
|
|
176
176
|
isActive: false,
|
|
177
177
|
elemAfter: /*#__PURE__*/_react.default.createElement(_ui.Shortcut, null, (0, _keymaps.tooltip)(_keymaps.indent)),
|
|
178
|
-
elemBefore: (0,
|
|
178
|
+
elemBefore: (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') ? /*#__PURE__*/_react.default.createElement(_textIndentRight.default, {
|
|
179
179
|
label: ""
|
|
180
180
|
}) : undefined
|
|
181
181
|
});
|
package/dist/cjs/ui/index.js
CHANGED
|
@@ -9,7 +9,7 @@ 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
|
|
12
|
+
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
13
13
|
var _types = require("../types");
|
|
14
14
|
var _onItemActivated = require("./onItemActivated");
|
|
15
15
|
var _Toolbar = require("./Toolbar");
|
|
@@ -35,7 +35,7 @@ function ToolbarListsIndentation(props) {
|
|
|
35
35
|
pluginInjectionApi = props.pluginInjectionApi,
|
|
36
36
|
toolbarType = props.toolbarType;
|
|
37
37
|
var inputMethod = toolbarType ? (0, _inputMethod.getInputMethod)(toolbarType) : _analytics.INPUT_METHOD.TOOLBAR;
|
|
38
|
-
if (isSmall || toolbarType === _types.ToolbarType.FLOATING || (0,
|
|
38
|
+
if (isSmall || toolbarType === _types.ToolbarType.FLOATING || (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1')) {
|
|
39
39
|
var areAllOptionsDisabled = [bulletListDisabled, orderedListDisabled, indentDisabled, outdentDisabled].every(function (item) {
|
|
40
40
|
return Boolean(item) === true;
|
|
41
41
|
});
|
|
@@ -3,7 +3,7 @@ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks'
|
|
|
3
3
|
import { ToolbarSize } from '@atlaskit/editor-common/types';
|
|
4
4
|
import { usePluginStateEffect } from '@atlaskit/editor-common/use-plugin-state-effect';
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
6
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
6
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
7
7
|
import { getIndentationButtonsState } from './pm-plugins/indentation-buttons';
|
|
8
8
|
import { ToolbarType } from './types';
|
|
9
9
|
import ToolbarListsIndentation from './ui';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
3
3
|
import { usePluginStateEffect } from '@atlaskit/editor-common/use-plugin-state-effect';
|
|
4
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
4
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
5
5
|
import { getIndentationButtonsState } from '../pm-plugins/indentation-buttons';
|
|
6
6
|
import { ToolbarType } from '../types';
|
|
7
7
|
import ToolbarListsIndentation from './index';
|
|
@@ -10,7 +10,7 @@ import ListBulletedIcon from '@atlaskit/icon/core/list-bulleted';
|
|
|
10
10
|
import ListNumberedIcon from '@atlaskit/icon/core/list-numbered';
|
|
11
11
|
import TextIndentLeftIcon from '@atlaskit/icon/core/text-indent-left';
|
|
12
12
|
import TextIndentRightIcon from '@atlaskit/icon/core/text-indent-right';
|
|
13
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
13
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
14
14
|
import { ToolbarType } from '../types';
|
|
15
15
|
export function ToolbarDropdown(props) {
|
|
16
16
|
const {
|
package/dist/es2019/ui/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
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 { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
5
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
6
6
|
import { ToolbarType } from '../types';
|
|
7
7
|
import { onItemActivated } from './onItemActivated';
|
|
8
8
|
import { Toolbar } from './Toolbar';
|
|
@@ -7,7 +7,7 @@ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks'
|
|
|
7
7
|
import { ToolbarSize } from '@atlaskit/editor-common/types';
|
|
8
8
|
import { usePluginStateEffect } from '@atlaskit/editor-common/use-plugin-state-effect';
|
|
9
9
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
10
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
10
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
11
11
|
import { getIndentationButtonsState } from './pm-plugins/indentation-buttons';
|
|
12
12
|
import { ToolbarType } from './types';
|
|
13
13
|
import ToolbarListsIndentation from './ui';
|
|
@@ -2,7 +2,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
2
2
|
import React, { useState } from 'react';
|
|
3
3
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
4
4
|
import { usePluginStateEffect } from '@atlaskit/editor-common/use-plugin-state-effect';
|
|
5
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
5
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
6
6
|
import { getIndentationButtonsState } from '../pm-plugins/indentation-buttons';
|
|
7
7
|
import { ToolbarType } from '../types';
|
|
8
8
|
import ToolbarListsIndentation from './index';
|
|
@@ -11,7 +11,7 @@ import ListBulletedIcon from '@atlaskit/icon/core/list-bulleted';
|
|
|
11
11
|
import ListNumberedIcon from '@atlaskit/icon/core/list-numbered';
|
|
12
12
|
import TextIndentLeftIcon from '@atlaskit/icon/core/text-indent-left';
|
|
13
13
|
import TextIndentRightIcon from '@atlaskit/icon/core/text-indent-right';
|
|
14
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
14
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
15
15
|
import { ToolbarType } from '../types';
|
|
16
16
|
export function ToolbarDropdown(props) {
|
|
17
17
|
var _useIntl = useIntl(),
|
package/dist/esm/ui/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
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 { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
5
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
6
6
|
import { ToolbarType } from '../types';
|
|
7
7
|
import { onItemActivated } from './onItemActivated';
|
|
8
8
|
import { Toolbar } from './Toolbar';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-toolbar-lists-indentation",
|
|
3
|
-
"version": "17.0.
|
|
3
|
+
"version": "17.0.8",
|
|
4
4
|
"description": "Toolbar lists and indentation plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@atlaskit/icon": "^37.5.0",
|
|
39
39
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
40
40
|
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
41
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
41
|
+
"@atlaskit/tmp-editor-statsig": "^168.0.0",
|
|
42
42
|
"@atlaskit/tokens": "^16.9.0",
|
|
43
43
|
"@babel/runtime": "^7.0.0"
|
|
44
44
|
},
|