@atlaskit/editor-plugin-floating-toolbar 1.7.7 → 1.7.9
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.js +24 -27
- package/dist/es2019/ui/Toolbar.js +18 -23
- package/dist/esm/ui/Toolbar.js +24 -27
- package/package.json +9 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-floating-toolbar
|
|
2
2
|
|
|
3
|
+
## 1.7.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 1.7.8
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#116612](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/116612)
|
|
14
|
+
[`51b4df656c8d0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/51b4df656c8d0) -
|
|
15
|
+
Floating toolbar radiogroup markup, feature flag removal
|
|
16
|
+
|
|
3
17
|
## 1.7.7
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/cjs/ui/Toolbar.js
CHANGED
|
@@ -25,7 +25,6 @@ var _uiColor = require("@atlaskit/editor-common/ui-color");
|
|
|
25
25
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
26
26
|
var _editorPalette = require("@atlaskit/editor-palette");
|
|
27
27
|
var _commands = require("@atlaskit/editor-plugin-table/commands");
|
|
28
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
29
28
|
var _forceFocus = require("../pm-plugins/force-focus");
|
|
30
29
|
var _commands2 = require("../pm-plugins/toolbar-data/commands");
|
|
31
30
|
var _Dropdown = _interopRequireDefault(require("./Dropdown"));
|
|
@@ -261,32 +260,30 @@ var ToolbarItems = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
261
260
|
});
|
|
262
261
|
}
|
|
263
262
|
};
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
return
|
|
278
|
-
})
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
return
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
}));
|
|
289
|
-
}
|
|
263
|
+
var groupedItems = groupItems(items.filter(function (item) {
|
|
264
|
+
return !item.hidden;
|
|
265
|
+
}));
|
|
266
|
+
return (0, _react2.jsx)(_buttonGroup.default, null, groupedItems.map(function (element, index) {
|
|
267
|
+
var isGroup = Array.isArray(element);
|
|
268
|
+
if (isGroup) {
|
|
269
|
+
return (0, _react2.jsx)("div", {
|
|
270
|
+
key: index,
|
|
271
|
+
css: buttonGroupStyles,
|
|
272
|
+
role: "radiogroup",
|
|
273
|
+
"aria-label": groupLabel !== null && groupLabel !== void 0 ? groupLabel : undefined
|
|
274
|
+
}, element.map(function (element) {
|
|
275
|
+
var indexInAllItems = items.findIndex(function (item) {
|
|
276
|
+
return item === element;
|
|
277
|
+
});
|
|
278
|
+
return renderItem(element, indexInAllItems);
|
|
279
|
+
}));
|
|
280
|
+
} else {
|
|
281
|
+
var indexInAllItems = items.findIndex(function (item) {
|
|
282
|
+
return item === element;
|
|
283
|
+
});
|
|
284
|
+
return renderItem(element, indexInAllItems);
|
|
285
|
+
}
|
|
286
|
+
}));
|
|
290
287
|
}, function (prevProps, nextProps) {
|
|
291
288
|
if (!nextProps.node) {
|
|
292
289
|
return false;
|
|
@@ -14,7 +14,6 @@ import { backgroundPaletteTooltipMessages } from '@atlaskit/editor-common/ui-col
|
|
|
14
14
|
import { ColorPickerButton, ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
15
15
|
import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
16
16
|
import { clearHoverSelection } from '@atlaskit/editor-plugin-table/commands';
|
|
17
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
18
17
|
import { checkShouldForceFocusAndApply, forceFocusSelector } from '../pm-plugins/force-focus';
|
|
19
18
|
import { showConfirmDialog } from '../pm-plugins/toolbar-data/commands';
|
|
20
19
|
import Dropdown from './Dropdown';
|
|
@@ -233,28 +232,24 @@ const ToolbarItems = /*#__PURE__*/React.memo(({
|
|
|
233
232
|
});
|
|
234
233
|
}
|
|
235
234
|
};
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
return jsx(ButtonGroup, null, items.filter(item => !item.hidden).map((item, index) => {
|
|
255
|
-
return renderItem(item, index);
|
|
256
|
-
}));
|
|
257
|
-
}
|
|
235
|
+
const groupedItems = groupItems(items.filter(item => !item.hidden));
|
|
236
|
+
return jsx(ButtonGroup, null, groupedItems.map((element, index) => {
|
|
237
|
+
const isGroup = Array.isArray(element);
|
|
238
|
+
if (isGroup) {
|
|
239
|
+
return jsx("div", {
|
|
240
|
+
key: index,
|
|
241
|
+
css: buttonGroupStyles,
|
|
242
|
+
role: "radiogroup",
|
|
243
|
+
"aria-label": groupLabel !== null && groupLabel !== void 0 ? groupLabel : undefined
|
|
244
|
+
}, element.map(element => {
|
|
245
|
+
const indexInAllItems = items.findIndex(item => item === element);
|
|
246
|
+
return renderItem(element, indexInAllItems);
|
|
247
|
+
}));
|
|
248
|
+
} else {
|
|
249
|
+
const indexInAllItems = items.findIndex(item => item === element);
|
|
250
|
+
return renderItem(element, indexInAllItems);
|
|
251
|
+
}
|
|
252
|
+
}));
|
|
258
253
|
}, (prevProps, nextProps) => {
|
|
259
254
|
if (!nextProps.node) {
|
|
260
255
|
return false;
|
package/dist/esm/ui/Toolbar.js
CHANGED
|
@@ -22,7 +22,6 @@ import { backgroundPaletteTooltipMessages } from '@atlaskit/editor-common/ui-col
|
|
|
22
22
|
import { ColorPickerButton, ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
23
23
|
import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
24
24
|
import { clearHoverSelection } from '@atlaskit/editor-plugin-table/commands';
|
|
25
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
26
25
|
import { checkShouldForceFocusAndApply, forceFocusSelector } from '../pm-plugins/force-focus';
|
|
27
26
|
import { showConfirmDialog } from '../pm-plugins/toolbar-data/commands';
|
|
28
27
|
import Dropdown from './Dropdown';
|
|
@@ -254,32 +253,30 @@ var ToolbarItems = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
254
253
|
});
|
|
255
254
|
}
|
|
256
255
|
};
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
return
|
|
271
|
-
})
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
return
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
}));
|
|
282
|
-
}
|
|
256
|
+
var groupedItems = groupItems(items.filter(function (item) {
|
|
257
|
+
return !item.hidden;
|
|
258
|
+
}));
|
|
259
|
+
return jsx(ButtonGroup, null, groupedItems.map(function (element, index) {
|
|
260
|
+
var isGroup = Array.isArray(element);
|
|
261
|
+
if (isGroup) {
|
|
262
|
+
return jsx("div", {
|
|
263
|
+
key: index,
|
|
264
|
+
css: buttonGroupStyles,
|
|
265
|
+
role: "radiogroup",
|
|
266
|
+
"aria-label": groupLabel !== null && groupLabel !== void 0 ? groupLabel : undefined
|
|
267
|
+
}, element.map(function (element) {
|
|
268
|
+
var indexInAllItems = items.findIndex(function (item) {
|
|
269
|
+
return item === element;
|
|
270
|
+
});
|
|
271
|
+
return renderItem(element, indexInAllItems);
|
|
272
|
+
}));
|
|
273
|
+
} else {
|
|
274
|
+
var indexInAllItems = items.findIndex(function (item) {
|
|
275
|
+
return item === element;
|
|
276
|
+
});
|
|
277
|
+
return renderItem(element, indexInAllItems);
|
|
278
|
+
}
|
|
279
|
+
}));
|
|
283
280
|
}, function (prevProps, nextProps) {
|
|
284
281
|
if (!nextProps.node) {
|
|
285
282
|
return false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-floating-toolbar",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.9",
|
|
4
4
|
"description": "Floating toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@atlaskit/adf-utils": "^19.4.0",
|
|
28
|
-
"@atlaskit/button": "^18.
|
|
28
|
+
"@atlaskit/button": "^18.4.0",
|
|
29
29
|
"@atlaskit/checkbox": "^13.5.0",
|
|
30
|
-
"@atlaskit/editor-common": "^
|
|
30
|
+
"@atlaskit/editor-common": "^85.0.0",
|
|
31
31
|
"@atlaskit/editor-palette": "1.6.0",
|
|
32
32
|
"@atlaskit/editor-plugin-block-controls": "^1.5.0",
|
|
33
33
|
"@atlaskit/editor-plugin-context-panel": "^1.1.0",
|
|
@@ -35,17 +35,17 @@
|
|
|
35
35
|
"@atlaskit/editor-plugin-decorations": "^1.1.0",
|
|
36
36
|
"@atlaskit/editor-plugin-editor-disabled": "^1.1.0",
|
|
37
37
|
"@atlaskit/editor-plugin-editor-viewmode": "^2.0.0",
|
|
38
|
-
"@atlaskit/editor-plugin-extension": "^1.
|
|
39
|
-
"@atlaskit/editor-plugin-table": "^7.
|
|
38
|
+
"@atlaskit/editor-plugin-extension": "^1.10.0",
|
|
39
|
+
"@atlaskit/editor-plugin-table": "^7.20.0",
|
|
40
40
|
"@atlaskit/editor-prosemirror": "4.0.1",
|
|
41
41
|
"@atlaskit/emoji": "^67.6.0",
|
|
42
|
-
"@atlaskit/icon": "^22.
|
|
43
|
-
"@atlaskit/menu": "^2.
|
|
42
|
+
"@atlaskit/icon": "^22.6.0",
|
|
43
|
+
"@atlaskit/menu": "^2.8.0",
|
|
44
44
|
"@atlaskit/modal-dialog": "^12.14.0",
|
|
45
45
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
46
46
|
"@atlaskit/select": "^17.11.0",
|
|
47
47
|
"@atlaskit/theme": "^12.11.0",
|
|
48
|
-
"@atlaskit/tokens": "^1.
|
|
48
|
+
"@atlaskit/tokens": "^1.54.0",
|
|
49
49
|
"@atlaskit/tooltip": "^18.5.0",
|
|
50
50
|
"@babel/runtime": "^7.0.0",
|
|
51
51
|
"@emotion/react": "^11.7.1",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@atlaskit/visual-regression": "*",
|
|
62
|
-
"@testing-library/dom": "^
|
|
62
|
+
"@testing-library/dom": "^10.1.0",
|
|
63
63
|
"@testing-library/react": "^12.1.5",
|
|
64
64
|
"@testing-library/user-event": "^14.4.3",
|
|
65
65
|
"enzyme": "^3.10.0",
|
|
@@ -104,10 +104,5 @@
|
|
|
104
104
|
"dist/types-ts4.5/index.d.ts"
|
|
105
105
|
]
|
|
106
106
|
}
|
|
107
|
-
},
|
|
108
|
-
"platform-feature-flags": {
|
|
109
|
-
"platform.editor.a11y-floating-toolbar-markup_vexmo": {
|
|
110
|
-
"type": "boolean"
|
|
111
|
-
}
|
|
112
107
|
}
|
|
113
108
|
}
|