@atlaskit/editor-plugin-floating-toolbar 1.13.8 → 1.13.10
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/plugin.js +2 -2
- package/dist/cjs/ui/Dropdown.js +6 -3
- package/dist/cjs/ui/Toolbar.js +4 -2
- package/dist/es2019/plugin.js +2 -2
- package/dist/es2019/ui/Dropdown.js +6 -3
- package/dist/es2019/ui/Toolbar.js +4 -2
- package/dist/esm/plugin.js +2 -2
- package/dist/esm/ui/Dropdown.js +6 -3
- package/dist/esm/ui/Toolbar.js +4 -2
- package/dist/types/ui/Dropdown.d.ts +2 -0
- package/dist/types-ts4.5/ui/Dropdown.d.ts +2 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-floating-toolbar
|
|
2
2
|
|
|
3
|
+
## 1.13.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#150384](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/150384)
|
|
8
|
+
[`d3dad252dbe46`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d3dad252dbe46) -
|
|
9
|
+
[EDF-1177](https://product-fabric.atlassian.net/browse/EDF-1177) - add pulse effect support into
|
|
10
|
+
editor floating toolbar
|
|
11
|
+
|
|
12
|
+
## 1.13.9
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#150050](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/150050)
|
|
17
|
+
[`b846e550df2ac`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b846e550df2ac) -
|
|
18
|
+
update logic for supportsViewMode in floating toolbar plugin to handle all toolbar item types
|
|
19
|
+
|
|
3
20
|
## 1.13.8
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -188,7 +188,7 @@ var floatingToolbarPlugin = exports.floatingToolbarPlugin = function floatingToo
|
|
|
188
188
|
};
|
|
189
189
|
};
|
|
190
190
|
function ContentComponent(_ref5) {
|
|
191
|
-
var _configWithNodeInfo$c, _configWithNodeInfo$c2, _pluginInjectionApi$c, _pluginInjectionApi$d;
|
|
191
|
+
var _configWithNodeInfo$c, _configWithNodeInfo$c2, _items, _pluginInjectionApi$c, _pluginInjectionApi$d;
|
|
192
192
|
var pluginInjectionApi = _ref5.pluginInjectionApi,
|
|
193
193
|
editorView = _ref5.editorView,
|
|
194
194
|
popupsMountPoint = _ref5.popupsMountPoint,
|
|
@@ -252,7 +252,7 @@ function ContentComponent(_ref5) {
|
|
|
252
252
|
// TODO: MODES-3950 Update this view mode specific logic once we refactor view mode.
|
|
253
253
|
// We should inverse the responsibility here: A blacklist for toolbar items in view mode, rather than this white list.
|
|
254
254
|
// Also consider moving this logic to the more specific toolbar plugins (media and selection).
|
|
255
|
-
var iterableItems = Array.isArray(items) ? items :
|
|
255
|
+
var iterableItems = Array.isArray(items) ? items : (_items = items) === null || _items === void 0 ? void 0 : _items(node);
|
|
256
256
|
if (isInViewMode) {
|
|
257
257
|
// Typescript note: Not all toolbar item types have the `supportsViewMode` prop.
|
|
258
258
|
var toolbarItemViewModeProp = 'supportsViewMode';
|
package/dist/cjs/ui/Dropdown.js
CHANGED
|
@@ -140,7 +140,8 @@ var Dropdown = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
140
140
|
dropdownWidth = _this$props2.dropdownWidth,
|
|
141
141
|
dropdownListId = _this$props2.dropdownListId,
|
|
142
142
|
alignDropdownWithToolbar = _this$props2.alignDropdownWithToolbar,
|
|
143
|
-
footer = _this$props2.footer
|
|
143
|
+
footer = _this$props2.footer,
|
|
144
|
+
pulse = _this$props2.pulse;
|
|
144
145
|
var trigger;
|
|
145
146
|
if (icon) {
|
|
146
147
|
var TriggerIcon = hideExpandIcon ? icon : (0, _react2.jsx)(CompositeIcon, {
|
|
@@ -154,7 +155,8 @@ var Dropdown = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
154
155
|
onKeyDown: this.toggleOpenByKeyboard,
|
|
155
156
|
selected: isOpen,
|
|
156
157
|
disabled: disabled,
|
|
157
|
-
tooltipContent: tooltip
|
|
158
|
+
tooltipContent: tooltip,
|
|
159
|
+
pulse: pulse
|
|
158
160
|
});
|
|
159
161
|
} else {
|
|
160
162
|
trigger = (0, _react2.jsx)(_ui.FloatingToolbarButton, {
|
|
@@ -171,7 +173,8 @@ var Dropdown = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
171
173
|
disabled: disabled,
|
|
172
174
|
tooltipContent: tooltip,
|
|
173
175
|
ariaHasPopup: true,
|
|
174
|
-
areaControls: dropdownListId
|
|
176
|
+
areaControls: dropdownListId,
|
|
177
|
+
pulse: pulse
|
|
175
178
|
}, title);
|
|
176
179
|
}
|
|
177
180
|
|
package/dist/cjs/ui/Toolbar.js
CHANGED
|
@@ -135,7 +135,8 @@ var ToolbarItems = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
135
135
|
hideTooltipOnClick: item.hideTooltipOnClick,
|
|
136
136
|
ariaHasPopup: item.ariaHasPopup,
|
|
137
137
|
tabIndex: item.tabIndex,
|
|
138
|
-
isRadioButton: item.isRadioButton
|
|
138
|
+
isRadioButton: item.isRadioButton,
|
|
139
|
+
pulse: item.pulse
|
|
139
140
|
}, item.showTitle && item.title);
|
|
140
141
|
case 'input':
|
|
141
142
|
return (0, _react2.jsx)(_Input.default, {
|
|
@@ -183,7 +184,8 @@ var ToolbarItems = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
183
184
|
dropdownListId: (item === null || item === void 0 ? void 0 : item.id) && "".concat(item.id, "-dropdownList"),
|
|
184
185
|
alignDropdownWithToolbar: items.length === 1,
|
|
185
186
|
onToggle: item.onToggle,
|
|
186
|
-
footer: item.footer
|
|
187
|
+
footer: item.footer,
|
|
188
|
+
pulse: item.pulse
|
|
187
189
|
});
|
|
188
190
|
case 'select':
|
|
189
191
|
if (item.selectType === 'list') {
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -180,7 +180,7 @@ export function ContentComponent({
|
|
|
180
180
|
providerFactory,
|
|
181
181
|
dispatchAnalyticsEvent
|
|
182
182
|
}) {
|
|
183
|
-
var _configWithNodeInfo$c, _configWithNodeInfo$c2, _pluginInjectionApi$c, _pluginInjectionApi$d;
|
|
183
|
+
var _configWithNodeInfo$c, _configWithNodeInfo$c2, _items, _pluginInjectionApi$c, _pluginInjectionApi$d;
|
|
184
184
|
const {
|
|
185
185
|
floatingToolbarState,
|
|
186
186
|
editorDisabledState,
|
|
@@ -238,7 +238,7 @@ export function ContentComponent({
|
|
|
238
238
|
// TODO: MODES-3950 Update this view mode specific logic once we refactor view mode.
|
|
239
239
|
// We should inverse the responsibility here: A blacklist for toolbar items in view mode, rather than this white list.
|
|
240
240
|
// Also consider moving this logic to the more specific toolbar plugins (media and selection).
|
|
241
|
-
const iterableItems = Array.isArray(items) ? items :
|
|
241
|
+
const iterableItems = Array.isArray(items) ? items : (_items = items) === null || _items === void 0 ? void 0 : _items(node);
|
|
242
242
|
if (isInViewMode) {
|
|
243
243
|
// Typescript note: Not all toolbar item types have the `supportsViewMode` prop.
|
|
244
244
|
const toolbarItemViewModeProp = 'supportsViewMode';
|
|
@@ -118,7 +118,8 @@ export default class Dropdown extends Component {
|
|
|
118
118
|
dropdownWidth,
|
|
119
119
|
dropdownListId,
|
|
120
120
|
alignDropdownWithToolbar,
|
|
121
|
-
footer
|
|
121
|
+
footer,
|
|
122
|
+
pulse
|
|
122
123
|
} = this.props;
|
|
123
124
|
let trigger;
|
|
124
125
|
if (icon) {
|
|
@@ -133,7 +134,8 @@ export default class Dropdown extends Component {
|
|
|
133
134
|
onKeyDown: this.toggleOpenByKeyboard,
|
|
134
135
|
selected: isOpen,
|
|
135
136
|
disabled: disabled,
|
|
136
|
-
tooltipContent: tooltip
|
|
137
|
+
tooltipContent: tooltip,
|
|
138
|
+
pulse: pulse
|
|
137
139
|
});
|
|
138
140
|
} else {
|
|
139
141
|
trigger = jsx(Button, {
|
|
@@ -150,7 +152,8 @@ export default class Dropdown extends Component {
|
|
|
150
152
|
disabled: disabled,
|
|
151
153
|
tooltipContent: tooltip,
|
|
152
154
|
ariaHasPopup: true,
|
|
153
|
-
areaControls: dropdownListId
|
|
155
|
+
areaControls: dropdownListId,
|
|
156
|
+
pulse: pulse
|
|
154
157
|
}, title);
|
|
155
158
|
}
|
|
156
159
|
|
|
@@ -115,7 +115,8 @@ const ToolbarItems = /*#__PURE__*/React.memo(({
|
|
|
115
115
|
hideTooltipOnClick: item.hideTooltipOnClick,
|
|
116
116
|
ariaHasPopup: item.ariaHasPopup,
|
|
117
117
|
tabIndex: item.tabIndex,
|
|
118
|
-
isRadioButton: item.isRadioButton
|
|
118
|
+
isRadioButton: item.isRadioButton,
|
|
119
|
+
pulse: item.pulse
|
|
119
120
|
}, item.showTitle && item.title);
|
|
120
121
|
case 'input':
|
|
121
122
|
return jsx(Input, {
|
|
@@ -159,7 +160,8 @@ const ToolbarItems = /*#__PURE__*/React.memo(({
|
|
|
159
160
|
dropdownListId: (item === null || item === void 0 ? void 0 : item.id) && `${item.id}-dropdownList`,
|
|
160
161
|
alignDropdownWithToolbar: items.length === 1,
|
|
161
162
|
onToggle: item.onToggle,
|
|
162
|
-
footer: item.footer
|
|
163
|
+
footer: item.footer,
|
|
164
|
+
pulse: item.pulse
|
|
163
165
|
});
|
|
164
166
|
case 'select':
|
|
165
167
|
if (item.selectType === 'list') {
|
package/dist/esm/plugin.js
CHANGED
|
@@ -176,7 +176,7 @@ export var floatingToolbarPlugin = function floatingToolbarPlugin(_ref) {
|
|
|
176
176
|
};
|
|
177
177
|
};
|
|
178
178
|
export function ContentComponent(_ref5) {
|
|
179
|
-
var _configWithNodeInfo$c, _configWithNodeInfo$c2, _pluginInjectionApi$c, _pluginInjectionApi$d;
|
|
179
|
+
var _configWithNodeInfo$c, _configWithNodeInfo$c2, _items, _pluginInjectionApi$c, _pluginInjectionApi$d;
|
|
180
180
|
var pluginInjectionApi = _ref5.pluginInjectionApi,
|
|
181
181
|
editorView = _ref5.editorView,
|
|
182
182
|
popupsMountPoint = _ref5.popupsMountPoint,
|
|
@@ -240,7 +240,7 @@ export function ContentComponent(_ref5) {
|
|
|
240
240
|
// TODO: MODES-3950 Update this view mode specific logic once we refactor view mode.
|
|
241
241
|
// We should inverse the responsibility here: A blacklist for toolbar items in view mode, rather than this white list.
|
|
242
242
|
// Also consider moving this logic to the more specific toolbar plugins (media and selection).
|
|
243
|
-
var iterableItems = Array.isArray(items) ? items :
|
|
243
|
+
var iterableItems = Array.isArray(items) ? items : (_items = items) === null || _items === void 0 ? void 0 : _items(node);
|
|
244
244
|
if (isInViewMode) {
|
|
245
245
|
// Typescript note: Not all toolbar item types have the `supportsViewMode` prop.
|
|
246
246
|
var toolbarItemViewModeProp = 'supportsViewMode';
|
package/dist/esm/ui/Dropdown.js
CHANGED
|
@@ -135,7 +135,8 @@ var Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
135
135
|
dropdownWidth = _this$props2.dropdownWidth,
|
|
136
136
|
dropdownListId = _this$props2.dropdownListId,
|
|
137
137
|
alignDropdownWithToolbar = _this$props2.alignDropdownWithToolbar,
|
|
138
|
-
footer = _this$props2.footer
|
|
138
|
+
footer = _this$props2.footer,
|
|
139
|
+
pulse = _this$props2.pulse;
|
|
139
140
|
var trigger;
|
|
140
141
|
if (icon) {
|
|
141
142
|
var TriggerIcon = hideExpandIcon ? icon : jsx(CompositeIcon, {
|
|
@@ -149,7 +150,8 @@ var Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
149
150
|
onKeyDown: this.toggleOpenByKeyboard,
|
|
150
151
|
selected: isOpen,
|
|
151
152
|
disabled: disabled,
|
|
152
|
-
tooltipContent: tooltip
|
|
153
|
+
tooltipContent: tooltip,
|
|
154
|
+
pulse: pulse
|
|
153
155
|
});
|
|
154
156
|
} else {
|
|
155
157
|
trigger = jsx(Button, {
|
|
@@ -166,7 +168,8 @@ var Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
166
168
|
disabled: disabled,
|
|
167
169
|
tooltipContent: tooltip,
|
|
168
170
|
ariaHasPopup: true,
|
|
169
|
-
areaControls: dropdownListId
|
|
171
|
+
areaControls: dropdownListId,
|
|
172
|
+
pulse: pulse
|
|
170
173
|
}, title);
|
|
171
174
|
}
|
|
172
175
|
|
package/dist/esm/ui/Toolbar.js
CHANGED
|
@@ -128,7 +128,8 @@ var ToolbarItems = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
128
128
|
hideTooltipOnClick: item.hideTooltipOnClick,
|
|
129
129
|
ariaHasPopup: item.ariaHasPopup,
|
|
130
130
|
tabIndex: item.tabIndex,
|
|
131
|
-
isRadioButton: item.isRadioButton
|
|
131
|
+
isRadioButton: item.isRadioButton,
|
|
132
|
+
pulse: item.pulse
|
|
132
133
|
}, item.showTitle && item.title);
|
|
133
134
|
case 'input':
|
|
134
135
|
return jsx(Input, {
|
|
@@ -176,7 +177,8 @@ var ToolbarItems = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
176
177
|
dropdownListId: (item === null || item === void 0 ? void 0 : item.id) && "".concat(item.id, "-dropdownList"),
|
|
177
178
|
alignDropdownWithToolbar: items.length === 1,
|
|
178
179
|
onToggle: item.onToggle,
|
|
179
|
-
footer: item.footer
|
|
180
|
+
footer: item.footer,
|
|
181
|
+
pulse: item.pulse
|
|
180
182
|
});
|
|
181
183
|
case 'select':
|
|
182
184
|
if (item.selectType === 'list') {
|
|
@@ -30,6 +30,8 @@ export interface Props {
|
|
|
30
30
|
alignDropdownWithToolbar?: boolean;
|
|
31
31
|
onToggle?: (state: EditorState, dispatch: CommandDispatch | undefined) => boolean;
|
|
32
32
|
footer?: React.ReactNode;
|
|
33
|
+
/** If true, the component will have pulse onboarding effect around it. */
|
|
34
|
+
pulse?: boolean;
|
|
33
35
|
}
|
|
34
36
|
export interface State {
|
|
35
37
|
isOpen: boolean;
|
|
@@ -30,6 +30,8 @@ export interface Props {
|
|
|
30
30
|
alignDropdownWithToolbar?: boolean;
|
|
31
31
|
onToggle?: (state: EditorState, dispatch: CommandDispatch | undefined) => boolean;
|
|
32
32
|
footer?: React.ReactNode;
|
|
33
|
+
/** If true, the component will have pulse onboarding effect around it. */
|
|
34
|
+
pulse?: boolean;
|
|
33
35
|
}
|
|
34
36
|
export interface State {
|
|
35
37
|
isOpen: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-floating-toolbar",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.10",
|
|
4
4
|
"description": "Floating toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@atlaskit/editor-plugin-table": "^7.28.0",
|
|
40
40
|
"@atlaskit/editor-prosemirror": "6.0.0",
|
|
41
41
|
"@atlaskit/emoji": "^67.8.0",
|
|
42
|
-
"@atlaskit/icon": "^22.
|
|
42
|
+
"@atlaskit/icon": "^22.22.0",
|
|
43
43
|
"@atlaskit/menu": "^2.12.0",
|
|
44
44
|
"@atlaskit/modal-dialog": "^12.17.0",
|
|
45
45
|
"@atlaskit/primitives": "^12.2.0",
|