@atlaskit/editor-plugin-floating-toolbar 24.0.9 → 25.0.1
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 +21 -0
- package/dist/cjs/ui/Toolbar.js +7 -12
- package/dist/es2019/ui/Toolbar.js +7 -12
- package/dist/esm/ui/Toolbar.js +7 -12
- package/package.json +14 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-floating-toolbar
|
|
2
2
|
|
|
3
|
+
## 25.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`457c77d8f6992`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/457c77d8f6992) -
|
|
8
|
+
Behind `platform-dst-top-layer-tooltip`: tooltips whose content changes on press (for example
|
|
9
|
+
"Copy" to "Copied!") stay open to show the new content. `@atlaskit/editor-common` floating toolbar
|
|
10
|
+
buttons and `@atlaskit/smart-card` stack-item actions add an optional
|
|
11
|
+
`hasNewContentOnTriggerClick` prop.
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 25.0.0
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [`281a2188b8d83`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/281a2188b8d83) -
|
|
19
|
+
[ux] [EDITOR-8348] this change adds a color picker to the divider floating toolbar behind
|
|
20
|
+
`platform_editor_lovability_dividers`. the selected color is applied behind
|
|
21
|
+
`platform_editor_lovability_dividers_attributes`.
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
|
|
3
24
|
## 24.0.9
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
package/dist/cjs/ui/Toolbar.js
CHANGED
|
@@ -26,6 +26,7 @@ var _uiColor = require("@atlaskit/editor-common/ui-color");
|
|
|
26
26
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
27
27
|
var _editorPalette = require("@atlaskit/editor-palette");
|
|
28
28
|
var _showMoreHorizontal = _interopRequireDefault(require("@atlaskit/icon/core/show-more-horizontal"));
|
|
29
|
+
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
29
30
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
30
31
|
var _forceFocus = require("../pm-plugins/force-focus");
|
|
31
32
|
var _commands = require("../pm-plugins/toolbar-data/commands");
|
|
@@ -174,6 +175,7 @@ var ToolbarItems = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
174
175
|
tooltipContent: item.tooltipContent,
|
|
175
176
|
testId: item.testId,
|
|
176
177
|
hideTooltipOnClick: item.hideTooltipOnClick,
|
|
178
|
+
hasNewContentOnTriggerClick: item.hasNewContentOnTriggerClick,
|
|
177
179
|
ariaHasPopup: item.ariaHasPopup,
|
|
178
180
|
tabIndex: item.tabIndex,
|
|
179
181
|
isRadioButton: item.isRadioButton,
|
|
@@ -314,10 +316,12 @@ var ToolbarItems = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
314
316
|
});
|
|
315
317
|
}
|
|
316
318
|
if (item.selectType === 'color') {
|
|
319
|
+
var _item$hexToPaletteCol, _item$paletteColorToo;
|
|
317
320
|
return (0, _react2.jsx)(_uiMenu.ColorPickerButton, {
|
|
318
321
|
skipFocusButtonAfterPick: true,
|
|
319
322
|
key: idx,
|
|
320
323
|
isAriaExpanded: item.isAriaExpanded,
|
|
324
|
+
hideExpandIcon: item.hideExpandIcon,
|
|
321
325
|
title: item.title
|
|
322
326
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
323
327
|
,
|
|
@@ -329,18 +333,9 @@ var ToolbarItems = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
329
333
|
currentColor: item.defaultValue ? item.defaultValue.value : undefined,
|
|
330
334
|
placement: "Panels",
|
|
331
335
|
mountPoint: emojiAndColourPickerMountPoint,
|
|
332
|
-
setDisableParentScroll: scrollable ? setDisableScroll : undefined
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
// Both uses same color palette.
|
|
336
|
-
// That's why hard-coding hexToEditorBackgroundPaletteColor
|
|
337
|
-
// and paletteColorTooltipMessages.
|
|
338
|
-
// When we need to support different color palette
|
|
339
|
-
// in floating toolbar, we need to set hexToPaletteColor
|
|
340
|
-
// and paletteColorTooltipMessages in item options.
|
|
341
|
-
,
|
|
342
|
-
hexToPaletteColor: _editorPalette.hexToEditorBackgroundPaletteColor,
|
|
343
|
-
paletteColorTooltipMessages: _uiColor.backgroundPaletteTooltipMessages,
|
|
336
|
+
setDisableParentScroll: scrollable ? setDisableScroll : undefined,
|
|
337
|
+
hexToPaletteColor: (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_lovability_dividers') ? (_item$hexToPaletteCol = item.hexToPaletteColor) !== null && _item$hexToPaletteCol !== void 0 ? _item$hexToPaletteCol : _editorPalette.hexToEditorBackgroundPaletteColor : _editorPalette.hexToEditorBackgroundPaletteColor,
|
|
338
|
+
paletteColorTooltipMessages: (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_lovability_dividers') ? (_item$paletteColorToo = item.paletteColorTooltipMessages) !== null && _item$paletteColorToo !== void 0 ? _item$paletteColorToo : _uiColor.backgroundPaletteTooltipMessages : _uiColor.backgroundPaletteTooltipMessages,
|
|
344
339
|
returnEscToButton: item.returnEscToButton
|
|
345
340
|
});
|
|
346
341
|
}
|
|
@@ -20,6 +20,7 @@ import { backgroundPaletteTooltipMessages } from '@atlaskit/editor-common/ui-col
|
|
|
20
20
|
import { ColorPickerButton, ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
21
21
|
import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
22
22
|
import ShowMoreHorizontalIcon from '@atlaskit/icon/core/show-more-horizontal';
|
|
23
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
23
24
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
24
25
|
import { checkShouldForceFocusAndApply, forceFocusSelector } from '../pm-plugins/force-focus';
|
|
25
26
|
import { showConfirmDialog } from '../pm-plugins/toolbar-data/commands';
|
|
@@ -155,6 +156,7 @@ const ToolbarItems = /*#__PURE__*/React.memo(({
|
|
|
155
156
|
tooltipContent: item.tooltipContent,
|
|
156
157
|
testId: item.testId,
|
|
157
158
|
hideTooltipOnClick: item.hideTooltipOnClick,
|
|
159
|
+
hasNewContentOnTriggerClick: item.hasNewContentOnTriggerClick,
|
|
158
160
|
ariaHasPopup: item.ariaHasPopup,
|
|
159
161
|
tabIndex: item.tabIndex,
|
|
160
162
|
isRadioButton: item.isRadioButton,
|
|
@@ -290,10 +292,12 @@ const ToolbarItems = /*#__PURE__*/React.memo(({
|
|
|
290
292
|
});
|
|
291
293
|
}
|
|
292
294
|
if (item.selectType === 'color') {
|
|
295
|
+
var _item$hexToPaletteCol, _item$paletteColorToo;
|
|
293
296
|
return jsx(ColorPickerButton, {
|
|
294
297
|
skipFocusButtonAfterPick: true,
|
|
295
298
|
key: idx,
|
|
296
299
|
isAriaExpanded: item.isAriaExpanded,
|
|
300
|
+
hideExpandIcon: item.hideExpandIcon,
|
|
297
301
|
title: item.title
|
|
298
302
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
299
303
|
,
|
|
@@ -305,18 +309,9 @@ const ToolbarItems = /*#__PURE__*/React.memo(({
|
|
|
305
309
|
currentColor: item.defaultValue ? item.defaultValue.value : undefined,
|
|
306
310
|
placement: "Panels",
|
|
307
311
|
mountPoint: emojiAndColourPickerMountPoint,
|
|
308
|
-
setDisableParentScroll: scrollable ? setDisableScroll : undefined
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
// Both uses same color palette.
|
|
312
|
-
// That's why hard-coding hexToEditorBackgroundPaletteColor
|
|
313
|
-
// and paletteColorTooltipMessages.
|
|
314
|
-
// When we need to support different color palette
|
|
315
|
-
// in floating toolbar, we need to set hexToPaletteColor
|
|
316
|
-
// and paletteColorTooltipMessages in item options.
|
|
317
|
-
,
|
|
318
|
-
hexToPaletteColor: hexToEditorBackgroundPaletteColor,
|
|
319
|
-
paletteColorTooltipMessages: backgroundPaletteTooltipMessages,
|
|
312
|
+
setDisableParentScroll: scrollable ? setDisableScroll : undefined,
|
|
313
|
+
hexToPaletteColor: isExperimentEnabled('platform_editor_lovability_dividers') ? (_item$hexToPaletteCol = item.hexToPaletteColor) !== null && _item$hexToPaletteCol !== void 0 ? _item$hexToPaletteCol : hexToEditorBackgroundPaletteColor : hexToEditorBackgroundPaletteColor,
|
|
314
|
+
paletteColorTooltipMessages: isExperimentEnabled('platform_editor_lovability_dividers') ? (_item$paletteColorToo = item.paletteColorTooltipMessages) !== null && _item$paletteColorToo !== void 0 ? _item$paletteColorToo : backgroundPaletteTooltipMessages : backgroundPaletteTooltipMessages,
|
|
320
315
|
returnEscToButton: item.returnEscToButton
|
|
321
316
|
});
|
|
322
317
|
}
|
package/dist/esm/ui/Toolbar.js
CHANGED
|
@@ -29,6 +29,7 @@ import { backgroundPaletteTooltipMessages } from '@atlaskit/editor-common/ui-col
|
|
|
29
29
|
import { ColorPickerButton, ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
30
30
|
import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
31
31
|
import ShowMoreHorizontalIcon from '@atlaskit/icon/core/show-more-horizontal';
|
|
32
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
32
33
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
33
34
|
import { checkShouldForceFocusAndApply, forceFocusSelector } from '../pm-plugins/force-focus';
|
|
34
35
|
import { showConfirmDialog } from '../pm-plugins/toolbar-data/commands';
|
|
@@ -169,6 +170,7 @@ var ToolbarItems = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
169
170
|
tooltipContent: item.tooltipContent,
|
|
170
171
|
testId: item.testId,
|
|
171
172
|
hideTooltipOnClick: item.hideTooltipOnClick,
|
|
173
|
+
hasNewContentOnTriggerClick: item.hasNewContentOnTriggerClick,
|
|
172
174
|
ariaHasPopup: item.ariaHasPopup,
|
|
173
175
|
tabIndex: item.tabIndex,
|
|
174
176
|
isRadioButton: item.isRadioButton,
|
|
@@ -309,10 +311,12 @@ var ToolbarItems = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
309
311
|
});
|
|
310
312
|
}
|
|
311
313
|
if (item.selectType === 'color') {
|
|
314
|
+
var _item$hexToPaletteCol, _item$paletteColorToo;
|
|
312
315
|
return jsx(ColorPickerButton, {
|
|
313
316
|
skipFocusButtonAfterPick: true,
|
|
314
317
|
key: idx,
|
|
315
318
|
isAriaExpanded: item.isAriaExpanded,
|
|
319
|
+
hideExpandIcon: item.hideExpandIcon,
|
|
316
320
|
title: item.title
|
|
317
321
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
318
322
|
,
|
|
@@ -324,18 +328,9 @@ var ToolbarItems = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
324
328
|
currentColor: item.defaultValue ? item.defaultValue.value : undefined,
|
|
325
329
|
placement: "Panels",
|
|
326
330
|
mountPoint: emojiAndColourPickerMountPoint,
|
|
327
|
-
setDisableParentScroll: scrollable ? setDisableScroll : undefined
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
// Both uses same color palette.
|
|
331
|
-
// That's why hard-coding hexToEditorBackgroundPaletteColor
|
|
332
|
-
// and paletteColorTooltipMessages.
|
|
333
|
-
// When we need to support different color palette
|
|
334
|
-
// in floating toolbar, we need to set hexToPaletteColor
|
|
335
|
-
// and paletteColorTooltipMessages in item options.
|
|
336
|
-
,
|
|
337
|
-
hexToPaletteColor: hexToEditorBackgroundPaletteColor,
|
|
338
|
-
paletteColorTooltipMessages: backgroundPaletteTooltipMessages,
|
|
331
|
+
setDisableParentScroll: scrollable ? setDisableScroll : undefined,
|
|
332
|
+
hexToPaletteColor: isExperimentEnabled('platform_editor_lovability_dividers') ? (_item$hexToPaletteCol = item.hexToPaletteColor) !== null && _item$hexToPaletteCol !== void 0 ? _item$hexToPaletteCol : hexToEditorBackgroundPaletteColor : hexToEditorBackgroundPaletteColor,
|
|
333
|
+
paletteColorTooltipMessages: isExperimentEnabled('platform_editor_lovability_dividers') ? (_item$paletteColorToo = item.paletteColorTooltipMessages) !== null && _item$paletteColorToo !== void 0 ? _item$paletteColorToo : backgroundPaletteTooltipMessages : backgroundPaletteTooltipMessages,
|
|
339
334
|
returnEscToButton: item.returnEscToButton
|
|
340
335
|
});
|
|
341
336
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-floating-toolbar",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "25.0.1",
|
|
4
4
|
"description": "Floating toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -25,16 +25,16 @@
|
|
|
25
25
|
"@atlaskit/button": "^25.4.0",
|
|
26
26
|
"@atlaskit/checkbox": "^19.2.0",
|
|
27
27
|
"@atlaskit/editor-palette": "^3.5.0",
|
|
28
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
29
|
-
"@atlaskit/editor-plugin-context-panel": "^
|
|
30
|
-
"@atlaskit/editor-plugin-copy-button": "^
|
|
31
|
-
"@atlaskit/editor-plugin-decorations": "^
|
|
32
|
-
"@atlaskit/editor-plugin-editor-disabled": "^
|
|
33
|
-
"@atlaskit/editor-plugin-editor-viewmode": "^
|
|
34
|
-
"@atlaskit/editor-plugin-emoji": "^
|
|
35
|
-
"@atlaskit/editor-plugin-extension": "^
|
|
36
|
-
"@atlaskit/editor-plugin-interaction": "^
|
|
37
|
-
"@atlaskit/editor-plugin-user-intent": "^
|
|
28
|
+
"@atlaskit/editor-plugin-analytics": "^23.0.0",
|
|
29
|
+
"@atlaskit/editor-plugin-context-panel": "^25.0.0",
|
|
30
|
+
"@atlaskit/editor-plugin-copy-button": "^23.0.0",
|
|
31
|
+
"@atlaskit/editor-plugin-decorations": "^23.0.0",
|
|
32
|
+
"@atlaskit/editor-plugin-editor-disabled": "^23.0.0",
|
|
33
|
+
"@atlaskit/editor-plugin-editor-viewmode": "^25.0.0",
|
|
34
|
+
"@atlaskit/editor-plugin-emoji": "^24.0.0",
|
|
35
|
+
"@atlaskit/editor-plugin-extension": "^26.0.0",
|
|
36
|
+
"@atlaskit/editor-plugin-interaction": "^37.0.0",
|
|
37
|
+
"@atlaskit/editor-plugin-user-intent": "^21.0.0",
|
|
38
38
|
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
39
39
|
"@atlaskit/emoji": "^72.4.0",
|
|
40
40
|
"@atlaskit/icon": "^38.0.0",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
45
45
|
"@atlaskit/primitives": "^22.5.0",
|
|
46
46
|
"@atlaskit/select": "^23.1.0",
|
|
47
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
47
|
+
"@atlaskit/tmp-editor-statsig": "^219.0.0",
|
|
48
48
|
"@atlaskit/tokens": "^20.1.0",
|
|
49
|
-
"@atlaskit/tooltip": "^24.
|
|
49
|
+
"@atlaskit/tooltip": "^24.4.0",
|
|
50
50
|
"@babel/runtime": "^7.0.0",
|
|
51
51
|
"@emotion/react": "^11.7.1",
|
|
52
52
|
"bind-event-listener": "^3.0.0",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"react-loosely-lazy": "^1.0.0"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@atlaskit/editor-common": "^
|
|
59
|
+
"@atlaskit/editor-common": "^127.1.0",
|
|
60
60
|
"react": "^18.2.0 || ^19.2.0",
|
|
61
61
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
62
62
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|