@atlaskit/editor-plugin-toolbar-lists-indentation 7.0.2 → 7.0.4
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 +14 -0
- package/dist/cjs/ui/toolbar-components/ListsIndentationHeroButton.js +4 -2
- package/dist/cjs/ui/toolbar-components/ListsIndentationMenuGroup.js +3 -3
- package/dist/cjs/ui/toolbar-components.js +3 -3
- package/dist/es2019/ui/toolbar-components/ListsIndentationHeroButton.js +5 -3
- package/dist/es2019/ui/toolbar-components/ListsIndentationMenuGroup.js +2 -2
- package/dist/es2019/ui/toolbar-components.js +2 -2
- package/dist/esm/ui/toolbar-components/ListsIndentationHeroButton.js +5 -3
- package/dist/esm/ui/toolbar-components/ListsIndentationMenuGroup.js +3 -3
- package/dist/esm/ui/toolbar-components.js +3 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-toolbar-lists-indentation
|
|
2
2
|
|
|
3
|
+
## 7.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`f2edf4a20927d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f2edf4a20927d) -
|
|
8
|
+
ED-29303 Move TaskListMenuItem component to taskAndDecision plugin
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 7.0.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 7.0.2
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -35,7 +35,8 @@ function useListsIndentationHeroButtonInfo(_ref) {
|
|
|
35
35
|
orderedListActive = _useSharedPluginState.orderedListActive,
|
|
36
36
|
taskListActive = _useSharedPluginState.taskListActive;
|
|
37
37
|
var getListType = isTaskListItemEnabled && taskListActive ? 'taskList' : orderedListActive ? 'orderedList' : defaultListType;
|
|
38
|
-
var
|
|
38
|
+
var taskListKeymap = (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? _keymaps.toggleTaskList : _keymaps.toggleTaskItemCheckbox;
|
|
39
|
+
var getKeymap = getListType === 'taskList' ? taskListKeymap : getListType === 'orderedList' ? _keymaps.toggleOrderedList : _keymaps.toggleBulletList;
|
|
39
40
|
var shortcut = (0, _keymaps.formatShortcut)(getKeymap);
|
|
40
41
|
var keymap = getKeymap;
|
|
41
42
|
var message = getListType === 'taskList' ? formatMessage(_messages.tasksAndDecisionsMessages.taskList) : getListType === 'orderedList' ? formatMessage(_messages.listMessages.orderedList) : formatMessage(_messages.listMessages.bulletedList);
|
|
@@ -147,7 +148,8 @@ var ListsIndentationHeroButton = exports.ListsIndentationHeroButton = function L
|
|
|
147
148
|
bulletListDisabled = _useSharedPluginState2.bulletListDisabled,
|
|
148
149
|
orderedListActive = _useSharedPluginState2.orderedListActive,
|
|
149
150
|
taskListActive = _useSharedPluginState2.taskListActive;
|
|
150
|
-
var
|
|
151
|
+
var taskListKeymap = (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? _keymaps.toggleTaskList : _keymaps.toggleTaskItemCheckbox;
|
|
152
|
+
var shortcut = isTaskListItemEnabled && taskListActive ? (0, _keymaps.formatShortcut)(taskListKeymap) : orderedListActive ? (0, _keymaps.formatShortcut)(_keymaps.toggleOrderedList) : (0, _keymaps.formatShortcut)(_keymaps.toggleBulletList);
|
|
151
153
|
var onClick = function onClick() {
|
|
152
154
|
var inputMethod = (0, _toolbar.getInputMethodFromParentKeys)(parents);
|
|
153
155
|
if (isTaskListItemEnabled && taskListActive) {
|
|
@@ -83,7 +83,7 @@ var getListsIndentationMenu = exports.getListsIndentationMenu = function getList
|
|
|
83
83
|
parents: parents
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
|
-
}, {
|
|
86
|
+
}].concat((0, _toConsumableArray2.default)(!(0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? [{
|
|
87
87
|
type: _toolbar.TASK_LIST_MENU_ITEM.type,
|
|
88
88
|
key: _toolbar.TASK_LIST_MENU_ITEM.key,
|
|
89
89
|
parents: [{
|
|
@@ -98,7 +98,7 @@ var getListsIndentationMenu = exports.getListsIndentationMenu = function getList
|
|
|
98
98
|
parents: parents
|
|
99
99
|
});
|
|
100
100
|
} : undefined
|
|
101
|
-
}, {
|
|
101
|
+
}] : []), [{
|
|
102
102
|
type: _toolbar.OUTDENT_MENU_ITEM.type,
|
|
103
103
|
key: _toolbar.OUTDENT_MENU_ITEM.key,
|
|
104
104
|
parents: [{
|
|
@@ -132,5 +132,5 @@ var getListsIndentationMenu = exports.getListsIndentationMenu = function getList
|
|
|
132
132
|
parents: parents
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
|
-
}];
|
|
135
|
+
}]);
|
|
136
136
|
};
|
|
@@ -111,7 +111,7 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
|
|
|
111
111
|
parents: parents
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
|
-
}, {
|
|
114
|
+
}].concat((0, _toConsumableArray2.default)(!(0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? [{
|
|
115
115
|
type: _toolbar.TASK_LIST_MENU_ITEM.type,
|
|
116
116
|
key: _toolbar.TASK_LIST_MENU_ITEM.key,
|
|
117
117
|
parents: [{
|
|
@@ -126,7 +126,7 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
|
|
|
126
126
|
parents: parents
|
|
127
127
|
});
|
|
128
128
|
} : undefined
|
|
129
|
-
}, {
|
|
129
|
+
}] : []), [{
|
|
130
130
|
type: _toolbar.OUTDENT_MENU_ITEM.type,
|
|
131
131
|
key: _toolbar.OUTDENT_MENU_ITEM.key,
|
|
132
132
|
parents: [{
|
|
@@ -160,7 +160,7 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
|
|
|
160
160
|
parents: parents
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
|
-
}];
|
|
163
|
+
}]);
|
|
164
164
|
};
|
|
165
165
|
var getToolbarComponentsResponsivenessUpdate = function getToolbarComponentsResponsivenessUpdate(_ref9) {
|
|
166
166
|
var api = _ref9.api,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
3
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
4
|
-
import { toggleBulletList as toggleBulletListKeymap, toggleOrderedList as toggleOrderedListKeymap, toggleTaskItemCheckbox as toggleTaskItemCheckboxKeymap, formatShortcut, ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
4
|
+
import { toggleBulletList as toggleBulletListKeymap, toggleOrderedList as toggleOrderedListKeymap, toggleTaskItemCheckbox as toggleTaskItemCheckboxKeymap, toggleTaskList as toggleTaskListKeymap, formatShortcut, ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
5
5
|
import { listMessages, tasksAndDecisionsMessages } from '@atlaskit/editor-common/messages';
|
|
6
6
|
import { getInputMethodFromParentKeys } from '@atlaskit/editor-common/toolbar';
|
|
7
7
|
import { ListBulletedIcon, ListNumberedIcon, ToolbarButton, ToolbarTooltip } from '@atlaskit/editor-toolbar';
|
|
@@ -31,7 +31,8 @@ function useListsIndentationHeroButtonInfo({
|
|
|
31
31
|
};
|
|
32
32
|
});
|
|
33
33
|
const getListType = isTaskListItemEnabled && taskListActive ? 'taskList' : orderedListActive ? 'orderedList' : defaultListType;
|
|
34
|
-
const
|
|
34
|
+
const taskListKeymap = expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? toggleTaskListKeymap : toggleTaskItemCheckboxKeymap;
|
|
35
|
+
const getKeymap = getListType === 'taskList' ? taskListKeymap : getListType === 'orderedList' ? toggleOrderedListKeymap : toggleBulletListKeymap;
|
|
35
36
|
const shortcut = formatShortcut(getKeymap);
|
|
36
37
|
const keymap = getKeymap;
|
|
37
38
|
const message = getListType === 'taskList' ? formatMessage(tasksAndDecisionsMessages.taskList) : getListType === 'orderedList' ? formatMessage(listMessages.orderedList) : formatMessage(listMessages.bulletedList);
|
|
@@ -150,7 +151,8 @@ export const ListsIndentationHeroButton = ({
|
|
|
150
151
|
taskListActive: (_states$taskDecisionS2 = states.taskDecisionState) === null || _states$taskDecisionS2 === void 0 ? void 0 : _states$taskDecisionS2.isInsideTask
|
|
151
152
|
};
|
|
152
153
|
});
|
|
153
|
-
const
|
|
154
|
+
const taskListKeymap = expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? toggleTaskListKeymap : toggleTaskItemCheckboxKeymap;
|
|
155
|
+
const shortcut = isTaskListItemEnabled && taskListActive ? formatShortcut(taskListKeymap) : orderedListActive ? formatShortcut(toggleOrderedListKeymap) : formatShortcut(toggleBulletListKeymap);
|
|
154
156
|
const onClick = () => {
|
|
155
157
|
const inputMethod = getInputMethodFromParentKeys(parents);
|
|
156
158
|
if (isTaskListItemEnabled && taskListActive) {
|
|
@@ -72,7 +72,7 @@ export const getListsIndentationMenu = (allowHeadingAndParagraphIndentation, sho
|
|
|
72
72
|
api: api,
|
|
73
73
|
parents: parents
|
|
74
74
|
})
|
|
75
|
-
}, {
|
|
75
|
+
}, ...(!expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? [{
|
|
76
76
|
type: TASK_LIST_MENU_ITEM.type,
|
|
77
77
|
key: TASK_LIST_MENU_ITEM.key,
|
|
78
78
|
parents: [{
|
|
@@ -86,7 +86,7 @@ export const getListsIndentationMenu = (allowHeadingAndParagraphIndentation, sho
|
|
|
86
86
|
api: api,
|
|
87
87
|
parents: parents
|
|
88
88
|
}) : undefined
|
|
89
|
-
}, {
|
|
89
|
+
}] : []), {
|
|
90
90
|
type: OUTDENT_MENU_ITEM.type,
|
|
91
91
|
key: OUTDENT_MENU_ITEM.key,
|
|
92
92
|
parents: [{
|
|
@@ -100,7 +100,7 @@ export const getToolbarComponents = ({
|
|
|
100
100
|
api: api,
|
|
101
101
|
parents: parents
|
|
102
102
|
})
|
|
103
|
-
}, {
|
|
103
|
+
}, ...(!expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? [{
|
|
104
104
|
type: TASK_LIST_MENU_ITEM.type,
|
|
105
105
|
key: TASK_LIST_MENU_ITEM.key,
|
|
106
106
|
parents: [{
|
|
@@ -114,7 +114,7 @@ export const getToolbarComponents = ({
|
|
|
114
114
|
api: api,
|
|
115
115
|
parents: parents
|
|
116
116
|
}) : undefined
|
|
117
|
-
}, {
|
|
117
|
+
}] : []), {
|
|
118
118
|
type: OUTDENT_MENU_ITEM.type,
|
|
119
119
|
key: OUTDENT_MENU_ITEM.key,
|
|
120
120
|
parents: [{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
3
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
4
|
-
import { toggleBulletList as toggleBulletListKeymap, toggleOrderedList as toggleOrderedListKeymap, toggleTaskItemCheckbox as toggleTaskItemCheckboxKeymap, formatShortcut, ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
4
|
+
import { toggleBulletList as toggleBulletListKeymap, toggleOrderedList as toggleOrderedListKeymap, toggleTaskItemCheckbox as toggleTaskItemCheckboxKeymap, toggleTaskList as toggleTaskListKeymap, formatShortcut, ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
5
5
|
import { listMessages, tasksAndDecisionsMessages } from '@atlaskit/editor-common/messages';
|
|
6
6
|
import { getInputMethodFromParentKeys } from '@atlaskit/editor-common/toolbar';
|
|
7
7
|
import { ListBulletedIcon, ListNumberedIcon, ToolbarButton, ToolbarTooltip } from '@atlaskit/editor-toolbar';
|
|
@@ -28,7 +28,8 @@ function useListsIndentationHeroButtonInfo(_ref) {
|
|
|
28
28
|
orderedListActive = _useSharedPluginState.orderedListActive,
|
|
29
29
|
taskListActive = _useSharedPluginState.taskListActive;
|
|
30
30
|
var getListType = isTaskListItemEnabled && taskListActive ? 'taskList' : orderedListActive ? 'orderedList' : defaultListType;
|
|
31
|
-
var
|
|
31
|
+
var taskListKeymap = expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? toggleTaskListKeymap : toggleTaskItemCheckboxKeymap;
|
|
32
|
+
var getKeymap = getListType === 'taskList' ? taskListKeymap : getListType === 'orderedList' ? toggleOrderedListKeymap : toggleBulletListKeymap;
|
|
32
33
|
var shortcut = formatShortcut(getKeymap);
|
|
33
34
|
var keymap = getKeymap;
|
|
34
35
|
var message = getListType === 'taskList' ? formatMessage(tasksAndDecisionsMessages.taskList) : getListType === 'orderedList' ? formatMessage(listMessages.orderedList) : formatMessage(listMessages.bulletedList);
|
|
@@ -140,7 +141,8 @@ export var ListsIndentationHeroButton = function ListsIndentationHeroButton(_ref
|
|
|
140
141
|
bulletListDisabled = _useSharedPluginState2.bulletListDisabled,
|
|
141
142
|
orderedListActive = _useSharedPluginState2.orderedListActive,
|
|
142
143
|
taskListActive = _useSharedPluginState2.taskListActive;
|
|
143
|
-
var
|
|
144
|
+
var taskListKeymap = expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? toggleTaskListKeymap : toggleTaskItemCheckboxKeymap;
|
|
145
|
+
var shortcut = isTaskListItemEnabled && taskListActive ? formatShortcut(taskListKeymap) : orderedListActive ? formatShortcut(toggleOrderedListKeymap) : formatShortcut(toggleBulletListKeymap);
|
|
144
146
|
var onClick = function onClick() {
|
|
145
147
|
var inputMethod = getInputMethodFromParentKeys(parents);
|
|
146
148
|
if (isTaskListItemEnabled && taskListActive) {
|
|
@@ -76,7 +76,7 @@ export var getListsIndentationMenu = function getListsIndentationMenu(allowHeadi
|
|
|
76
76
|
parents: parents
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
|
-
}, {
|
|
79
|
+
}].concat(_toConsumableArray(!expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? [{
|
|
80
80
|
type: TASK_LIST_MENU_ITEM.type,
|
|
81
81
|
key: TASK_LIST_MENU_ITEM.key,
|
|
82
82
|
parents: [{
|
|
@@ -91,7 +91,7 @@ export var getListsIndentationMenu = function getListsIndentationMenu(allowHeadi
|
|
|
91
91
|
parents: parents
|
|
92
92
|
});
|
|
93
93
|
} : undefined
|
|
94
|
-
}, {
|
|
94
|
+
}] : []), [{
|
|
95
95
|
type: OUTDENT_MENU_ITEM.type,
|
|
96
96
|
key: OUTDENT_MENU_ITEM.key,
|
|
97
97
|
parents: [{
|
|
@@ -125,5 +125,5 @@ export var getListsIndentationMenu = function getListsIndentationMenu(allowHeadi
|
|
|
125
125
|
parents: parents
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
|
-
}];
|
|
128
|
+
}]);
|
|
129
129
|
};
|
|
@@ -104,7 +104,7 @@ export var getToolbarComponents = function getToolbarComponents(_ref) {
|
|
|
104
104
|
parents: parents
|
|
105
105
|
});
|
|
106
106
|
}
|
|
107
|
-
}, {
|
|
107
|
+
}].concat(_toConsumableArray(!expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) ? [{
|
|
108
108
|
type: TASK_LIST_MENU_ITEM.type,
|
|
109
109
|
key: TASK_LIST_MENU_ITEM.key,
|
|
110
110
|
parents: [{
|
|
@@ -119,7 +119,7 @@ export var getToolbarComponents = function getToolbarComponents(_ref) {
|
|
|
119
119
|
parents: parents
|
|
120
120
|
});
|
|
121
121
|
} : undefined
|
|
122
|
-
}, {
|
|
122
|
+
}] : []), [{
|
|
123
123
|
type: OUTDENT_MENU_ITEM.type,
|
|
124
124
|
key: OUTDENT_MENU_ITEM.key,
|
|
125
125
|
parents: [{
|
|
@@ -153,7 +153,7 @@ export var getToolbarComponents = function getToolbarComponents(_ref) {
|
|
|
153
153
|
parents: parents
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
|
-
}];
|
|
156
|
+
}]);
|
|
157
157
|
};
|
|
158
158
|
var getToolbarComponentsResponsivenessUpdate = function getToolbarComponentsResponsivenessUpdate(_ref9) {
|
|
159
159
|
var api = _ref9.api,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-toolbar-lists-indentation",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.4",
|
|
4
4
|
"description": "Toolbar lists and indentation plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@atlaskit/editor-toolbar-model": "^0.2.0",
|
|
46
46
|
"@atlaskit/icon": "^28.3.0",
|
|
47
47
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
48
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
48
|
+
"@atlaskit/tmp-editor-statsig": "^13.0.0",
|
|
49
49
|
"@atlaskit/tokens": "^6.4.0",
|
|
50
50
|
"@babel/runtime": "^7.0.0"
|
|
51
51
|
},
|