@atlaskit/editor-toolbar 1.4.1 → 1.5.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 +20 -0
- package/dist/cjs/index.js +42 -0
- package/dist/cjs/ui/ToolbarDropdownItem.js +5 -2
- package/dist/cjs/ui/ToolbarNestedDropdownMenu.js +5 -2
- package/dist/cjs/ui/icons/ArrowDownIcon.js +13 -0
- package/dist/cjs/ui/icons/ArrowUpIcon.js +13 -0
- package/dist/cjs/ui/icons/TableColumnAddLeftIcon.js +13 -0
- package/dist/cjs/ui/icons/TableColumnAddRightIcon.js +13 -0
- package/dist/cjs/ui/icons/TableColumnMoveRightIcon.js +13 -0
- package/dist/cjs/ui/icons/TableColumnsDistributeIcon.js +13 -0
- package/dist/es2019/index.js +6 -0
- package/dist/es2019/ui/ToolbarDropdownItem.js +5 -2
- package/dist/es2019/ui/ToolbarNestedDropdownMenu.js +5 -2
- package/dist/es2019/ui/icons/ArrowDownIcon.js +2 -0
- package/dist/es2019/ui/icons/ArrowUpIcon.js +2 -0
- package/dist/es2019/ui/icons/TableColumnAddLeftIcon.js +2 -0
- package/dist/es2019/ui/icons/TableColumnAddRightIcon.js +2 -0
- package/dist/es2019/ui/icons/TableColumnMoveRightIcon.js +2 -0
- package/dist/es2019/ui/icons/TableColumnsDistributeIcon.js +2 -0
- package/dist/esm/index.js +6 -0
- package/dist/esm/ui/ToolbarDropdownItem.js +5 -2
- package/dist/esm/ui/ToolbarNestedDropdownMenu.js +5 -2
- package/dist/esm/ui/icons/ArrowDownIcon.js +2 -0
- package/dist/esm/ui/icons/ArrowUpIcon.js +2 -0
- package/dist/esm/ui/icons/TableColumnAddLeftIcon.js +2 -0
- package/dist/esm/ui/icons/TableColumnAddRightIcon.js +2 -0
- package/dist/esm/ui/icons/TableColumnMoveRightIcon.js +2 -0
- package/dist/esm/ui/icons/TableColumnsDistributeIcon.js +2 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/ui/ToolbarDropdownItem.d.ts +1 -0
- package/dist/types/ui/ToolbarMenuContainer.d.ts +1 -1
- package/dist/types/ui/ToolbarNestedDropdownMenu.d.ts +2 -1
- package/dist/types/ui/icons/ArrowDownIcon.d.ts +1 -0
- package/dist/types/ui/icons/ArrowUpIcon.d.ts +1 -0
- package/dist/types/ui/icons/TableColumnAddLeftIcon.d.ts +1 -0
- package/dist/types/ui/icons/TableColumnAddRightIcon.d.ts +1 -0
- package/dist/types/ui/icons/TableColumnMoveRightIcon.d.ts +1 -0
- package/dist/types/ui/icons/TableColumnsDistributeIcon.d.ts +1 -0
- package/dist/types-ts4.5/index.d.ts +6 -0
- package/dist/types-ts4.5/ui/ToolbarDropdownItem.d.ts +1 -0
- package/dist/types-ts4.5/ui/ToolbarMenuContainer.d.ts +1 -1
- package/dist/types-ts4.5/ui/ToolbarNestedDropdownMenu.d.ts +2 -1
- package/dist/types-ts4.5/ui/icons/ArrowDownIcon.d.ts +1 -0
- package/dist/types-ts4.5/ui/icons/ArrowUpIcon.d.ts +1 -0
- package/dist/types-ts4.5/ui/icons/TableColumnAddLeftIcon.d.ts +1 -0
- package/dist/types-ts4.5/ui/icons/TableColumnAddRightIcon.d.ts +1 -0
- package/dist/types-ts4.5/ui/icons/TableColumnMoveRightIcon.d.ts +1 -0
- package/dist/types-ts4.5/ui/icons/TableColumnsDistributeIcon.d.ts +1 -0
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/editor-toolbar
|
|
2
2
|
|
|
3
|
+
## 1.5.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`6aa28179246c9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6aa28179246c9) -
|
|
8
|
+
Support data-extension-item-key to identify the selection extension menu items.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 1.5.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [`593f5ee15ac0d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/593f5ee15ac0d) -
|
|
16
|
+
Add experiment-gated column handle menu surface and expose column menu icons through
|
|
17
|
+
editor-toolbar.
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
3
23
|
## 1.4.1
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -112,6 +112,18 @@ Object.defineProperty(exports, "AppsIcon", {
|
|
|
112
112
|
return _AppsIcon.AppsIcon;
|
|
113
113
|
}
|
|
114
114
|
});
|
|
115
|
+
Object.defineProperty(exports, "ArrowDownIcon", {
|
|
116
|
+
enumerable: true,
|
|
117
|
+
get: function get() {
|
|
118
|
+
return _ArrowDownIcon.ArrowDownIcon;
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
Object.defineProperty(exports, "ArrowUpIcon", {
|
|
122
|
+
enumerable: true,
|
|
123
|
+
get: function get() {
|
|
124
|
+
return _ArrowUpIcon.ArrowUpIcon;
|
|
125
|
+
}
|
|
126
|
+
});
|
|
115
127
|
Object.defineProperty(exports, "BoldIcon", {
|
|
116
128
|
enumerable: true,
|
|
117
129
|
get: function get() {
|
|
@@ -370,6 +382,30 @@ Object.defineProperty(exports, "SyncBlocksIcon", {
|
|
|
370
382
|
return _SyncBlocksIcon.SyncBlocksIcon;
|
|
371
383
|
}
|
|
372
384
|
});
|
|
385
|
+
Object.defineProperty(exports, "TableColumnAddLeftIcon", {
|
|
386
|
+
enumerable: true,
|
|
387
|
+
get: function get() {
|
|
388
|
+
return _TableColumnAddLeftIcon.TableColumnAddLeftIcon;
|
|
389
|
+
}
|
|
390
|
+
});
|
|
391
|
+
Object.defineProperty(exports, "TableColumnAddRightIcon", {
|
|
392
|
+
enumerable: true,
|
|
393
|
+
get: function get() {
|
|
394
|
+
return _TableColumnAddRightIcon.TableColumnAddRightIcon;
|
|
395
|
+
}
|
|
396
|
+
});
|
|
397
|
+
Object.defineProperty(exports, "TableColumnMoveRightIcon", {
|
|
398
|
+
enumerable: true,
|
|
399
|
+
get: function get() {
|
|
400
|
+
return _TableColumnMoveRightIcon.TableColumnMoveRightIcon;
|
|
401
|
+
}
|
|
402
|
+
});
|
|
403
|
+
Object.defineProperty(exports, "TableColumnsDistributeIcon", {
|
|
404
|
+
enumerable: true,
|
|
405
|
+
get: function get() {
|
|
406
|
+
return _TableColumnsDistributeIcon.TableColumnsDistributeIcon;
|
|
407
|
+
}
|
|
408
|
+
});
|
|
373
409
|
Object.defineProperty(exports, "TableIcon", {
|
|
374
410
|
enumerable: true,
|
|
375
411
|
get: function get() {
|
|
@@ -621,7 +657,13 @@ var _EmojiIcon = require("./ui/icons/EmojiIcon");
|
|
|
621
657
|
var _LayoutIcon = require("./ui/icons/LayoutIcon");
|
|
622
658
|
var _ImageIcon = require("./ui/icons/ImageIcon");
|
|
623
659
|
var _MentionIcon = require("./ui/icons/MentionIcon");
|
|
660
|
+
var _ArrowDownIcon = require("./ui/icons/ArrowDownIcon");
|
|
661
|
+
var _ArrowUpIcon = require("./ui/icons/ArrowUpIcon");
|
|
624
662
|
var _TableIcon = require("./ui/icons/TableIcon");
|
|
663
|
+
var _TableColumnAddLeftIcon = require("./ui/icons/TableColumnAddLeftIcon");
|
|
664
|
+
var _TableColumnAddRightIcon = require("./ui/icons/TableColumnAddRightIcon");
|
|
665
|
+
var _TableColumnMoveRightIcon = require("./ui/icons/TableColumnMoveRightIcon");
|
|
666
|
+
var _TableColumnsDistributeIcon = require("./ui/icons/TableColumnsDistributeIcon");
|
|
625
667
|
var _TableRowAddAboveIcon = require("./ui/icons/TableRowAddAboveIcon");
|
|
626
668
|
var _TableRowAddBelowIcon = require("./ui/icons/TableRowAddBelowIcon");
|
|
627
669
|
var _TableRowMoveDownIcon = require("./ui/icons/TableRowMoveDownIcon");
|
|
@@ -15,6 +15,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
15
15
|
var _react = _interopRequireWildcard(require("react"));
|
|
16
16
|
var _css = require("@atlaskit/css");
|
|
17
17
|
var _dropdownMenu = require("@atlaskit/dropdown-menu");
|
|
18
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
19
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
19
20
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
20
21
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
@@ -41,7 +42,8 @@ var CustomDropdownMenuItemButton = /*#__PURE__*/(0, _react.forwardRef)(function
|
|
|
41
42
|
ariaKeyshortcuts = _ref['aria-keyshortcuts'],
|
|
42
43
|
onClick = _ref.onClick,
|
|
43
44
|
tabIndex = _ref.tabIndex,
|
|
44
|
-
title = _ref.title
|
|
45
|
+
title = _ref.title,
|
|
46
|
+
dataExtensionItemKey = _ref['data-extension-item-key'];
|
|
45
47
|
return /*#__PURE__*/_react.default.createElement(_compiled.Pressable, {
|
|
46
48
|
role: (0, _expValEquals.expValEquals)('platform_editor_enghealth_a11y_jan_fixes', 'isEnabled', true) ? 'menuitem' : undefined,
|
|
47
49
|
testId: testId,
|
|
@@ -57,7 +59,8 @@ var CustomDropdownMenuItemButton = /*#__PURE__*/(0, _react.forwardRef)(function
|
|
|
57
59
|
"aria-keyshortcuts": ariaKeyshortcuts,
|
|
58
60
|
"data-toolbar-component": (0, _experiments.editorExperiment)('platform_synced_block', true) ? 'menu-item' : undefined,
|
|
59
61
|
ref: ref,
|
|
60
|
-
title: (0, _expValEquals.expValEquals)('platform_editor_renderer_toolbar_updates', 'isEnabled', true) ? title : undefined
|
|
62
|
+
title: (0, _expValEquals.expValEquals)('platform_editor_renderer_toolbar_updates', 'isEnabled', true) ? title : undefined,
|
|
63
|
+
"data-extension-item-key": (0, _platformFeatureFlags.fg)('cc_blocks_changeboarding') ? dataExtensionItemKey : undefined
|
|
61
64
|
}, children);
|
|
62
65
|
});
|
|
63
66
|
var CustomDropdownMenuItemAnchor = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
|
|
@@ -13,6 +13,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
13
13
|
var _runtime = require("@compiled/react/runtime");
|
|
14
14
|
var _react2 = require("@compiled/react");
|
|
15
15
|
var _dropdownMenu = _interopRequireDefault(require("@atlaskit/dropdown-menu"));
|
|
16
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
17
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
17
18
|
var _ToolbarDropdownItem = require("./ToolbarDropdownItem");
|
|
18
19
|
var _ToolbarTooltip = require("./ToolbarTooltip");
|
|
@@ -35,7 +36,8 @@ var ToolbarNestedDropdownMenu = exports.ToolbarNestedDropdownMenu = function Too
|
|
|
35
36
|
_ref$shouldFitContain = _ref.shouldFitContainer,
|
|
36
37
|
shouldFitContainer = _ref$shouldFitContain === void 0 ? false : _ref$shouldFitContain,
|
|
37
38
|
shouldTitleWrap = _ref.shouldTitleWrap,
|
|
38
|
-
tooltipContent = _ref.tooltipContent
|
|
39
|
+
tooltipContent = _ref.tooltipContent,
|
|
40
|
+
dataExtensionItemKey = _ref['data-extension-item-key'];
|
|
39
41
|
return /*#__PURE__*/React.createElement(_dropdownMenu.default, {
|
|
40
42
|
shouldFitContainer: shouldFitContainer,
|
|
41
43
|
placement: "right-start",
|
|
@@ -57,7 +59,8 @@ var ToolbarNestedDropdownMenu = exports.ToolbarNestedDropdownMenu = function Too
|
|
|
57
59
|
triggerRef: triggerProps.triggerRef,
|
|
58
60
|
hasNestedDropdownMenu: true,
|
|
59
61
|
isDisabled: isDisabled,
|
|
60
|
-
shouldTitleWrap: shouldTitleWrap
|
|
62
|
+
shouldTitleWrap: shouldTitleWrap,
|
|
63
|
+
"data-extension-item-key": (0, _platformFeatureFlags.fg)('cc_blocks_changeboarding') ? dataExtensionItemKey : undefined
|
|
61
64
|
}, text, elemAfterText);
|
|
62
65
|
if (tooltipContent) {
|
|
63
66
|
return /*#__PURE__*/React.createElement(_ToolbarTooltip.ToolbarTooltip, {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "ArrowDownIcon", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _arrowDown.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _arrowDown = _interopRequireDefault(require("@atlaskit/icon/core/arrow-down"));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "ArrowUpIcon", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _arrowUp.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _arrowUp = _interopRequireDefault(require("@atlaskit/icon/core/arrow-up"));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "TableColumnAddLeftIcon", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _tableColumnAddLeft.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _tableColumnAddLeft = _interopRequireDefault(require("@atlaskit/icon/core/table-column-add-left"));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "TableColumnAddRightIcon", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _tableColumnAddRight.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _tableColumnAddRight = _interopRequireDefault(require("@atlaskit/icon/core/table-column-add-right"));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "TableColumnMoveRightIcon", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _tableColumnMoveRight.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _tableColumnMoveRight = _interopRequireDefault(require("@atlaskit/icon/core/table-column-move-right"));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "TableColumnsDistributeIcon", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _tableColumnsDistribute.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _tableColumnsDistribute = _interopRequireDefault(require("@atlaskit/icon/core/table-columns-distribute"));
|
package/dist/es2019/index.js
CHANGED
|
@@ -70,7 +70,13 @@ export { EmojiIcon } from './ui/icons/EmojiIcon';
|
|
|
70
70
|
export { LayoutIcon } from './ui/icons/LayoutIcon';
|
|
71
71
|
export { ImageIcon } from './ui/icons/ImageIcon';
|
|
72
72
|
export { MentionIcon } from './ui/icons/MentionIcon';
|
|
73
|
+
export { ArrowDownIcon } from './ui/icons/ArrowDownIcon';
|
|
74
|
+
export { ArrowUpIcon } from './ui/icons/ArrowUpIcon';
|
|
73
75
|
export { TableIcon } from './ui/icons/TableIcon';
|
|
76
|
+
export { TableColumnAddLeftIcon } from './ui/icons/TableColumnAddLeftIcon';
|
|
77
|
+
export { TableColumnAddRightIcon } from './ui/icons/TableColumnAddRightIcon';
|
|
78
|
+
export { TableColumnMoveRightIcon } from './ui/icons/TableColumnMoveRightIcon';
|
|
79
|
+
export { TableColumnsDistributeIcon } from './ui/icons/TableColumnsDistributeIcon';
|
|
74
80
|
export { TableRowAddAboveIcon } from './ui/icons/TableRowAddAboveIcon';
|
|
75
81
|
export { TableRowAddBelowIcon } from './ui/icons/TableRowAddBelowIcon';
|
|
76
82
|
export { TableRowMoveDownIcon } from './ui/icons/TableRowMoveDownIcon';
|
|
@@ -5,6 +5,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
5
5
|
import React, { forwardRef, isValidElement, cloneElement } from 'react';
|
|
6
6
|
import { cx } from '@atlaskit/css';
|
|
7
7
|
import { DropdownItem } from '@atlaskit/dropdown-menu';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
9
|
import { Anchor, Box, Pressable } from '@atlaskit/primitives/compiled';
|
|
9
10
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
10
11
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
@@ -26,7 +27,8 @@ const CustomDropdownMenuItemButton = /*#__PURE__*/forwardRef(({
|
|
|
26
27
|
'aria-keyshortcuts': ariaKeyshortcuts,
|
|
27
28
|
onClick,
|
|
28
29
|
tabIndex,
|
|
29
|
-
title
|
|
30
|
+
title,
|
|
31
|
+
'data-extension-item-key': dataExtensionItemKey
|
|
30
32
|
}, ref) => /*#__PURE__*/React.createElement(Pressable, {
|
|
31
33
|
role: expValEquals('platform_editor_enghealth_a11y_jan_fixes', 'isEnabled', true) ? 'menuitem' : undefined,
|
|
32
34
|
testId: testId,
|
|
@@ -42,7 +44,8 @@ const CustomDropdownMenuItemButton = /*#__PURE__*/forwardRef(({
|
|
|
42
44
|
"aria-keyshortcuts": ariaKeyshortcuts,
|
|
43
45
|
"data-toolbar-component": editorExperiment('platform_synced_block', true) ? 'menu-item' : undefined,
|
|
44
46
|
ref: ref,
|
|
45
|
-
title: expValEquals('platform_editor_renderer_toolbar_updates', 'isEnabled', true) ? title : undefined
|
|
47
|
+
title: expValEquals('platform_editor_renderer_toolbar_updates', 'isEnabled', true) ? title : undefined,
|
|
48
|
+
"data-extension-item-key": fg('cc_blocks_changeboarding') ? dataExtensionItemKey : undefined
|
|
46
49
|
}, children));
|
|
47
50
|
const CustomDropdownMenuItemAnchor = /*#__PURE__*/forwardRef(({
|
|
48
51
|
children,
|
|
@@ -5,6 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { cx } from '@compiled/react';
|
|
7
7
|
import DropdownMenu from '@atlaskit/dropdown-menu';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
9
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
9
10
|
import { ToolbarDropdownItem } from './ToolbarDropdownItem';
|
|
10
11
|
import { ToolbarTooltip } from './ToolbarTooltip';
|
|
@@ -24,7 +25,8 @@ export const ToolbarNestedDropdownMenu = ({
|
|
|
24
25
|
onClick,
|
|
25
26
|
shouldFitContainer = false,
|
|
26
27
|
shouldTitleWrap,
|
|
27
|
-
tooltipContent
|
|
28
|
+
tooltipContent,
|
|
29
|
+
'data-extension-item-key': dataExtensionItemKey
|
|
28
30
|
}) => {
|
|
29
31
|
return /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
30
32
|
shouldFitContainer: shouldFitContainer,
|
|
@@ -47,7 +49,8 @@ export const ToolbarNestedDropdownMenu = ({
|
|
|
47
49
|
triggerRef: triggerProps.triggerRef,
|
|
48
50
|
hasNestedDropdownMenu: true,
|
|
49
51
|
isDisabled: isDisabled,
|
|
50
|
-
shouldTitleWrap: shouldTitleWrap
|
|
52
|
+
shouldTitleWrap: shouldTitleWrap,
|
|
53
|
+
"data-extension-item-key": fg('cc_blocks_changeboarding') ? dataExtensionItemKey : undefined
|
|
51
54
|
}, text, elemAfterText);
|
|
52
55
|
if (tooltipContent) {
|
|
53
56
|
return /*#__PURE__*/React.createElement(ToolbarTooltip, {
|
package/dist/esm/index.js
CHANGED
|
@@ -70,7 +70,13 @@ export { EmojiIcon } from './ui/icons/EmojiIcon';
|
|
|
70
70
|
export { LayoutIcon } from './ui/icons/LayoutIcon';
|
|
71
71
|
export { ImageIcon } from './ui/icons/ImageIcon';
|
|
72
72
|
export { MentionIcon } from './ui/icons/MentionIcon';
|
|
73
|
+
export { ArrowDownIcon } from './ui/icons/ArrowDownIcon';
|
|
74
|
+
export { ArrowUpIcon } from './ui/icons/ArrowUpIcon';
|
|
73
75
|
export { TableIcon } from './ui/icons/TableIcon';
|
|
76
|
+
export { TableColumnAddLeftIcon } from './ui/icons/TableColumnAddLeftIcon';
|
|
77
|
+
export { TableColumnAddRightIcon } from './ui/icons/TableColumnAddRightIcon';
|
|
78
|
+
export { TableColumnMoveRightIcon } from './ui/icons/TableColumnMoveRightIcon';
|
|
79
|
+
export { TableColumnsDistributeIcon } from './ui/icons/TableColumnsDistributeIcon';
|
|
74
80
|
export { TableRowAddAboveIcon } from './ui/icons/TableRowAddAboveIcon';
|
|
75
81
|
export { TableRowAddBelowIcon } from './ui/icons/TableRowAddBelowIcon';
|
|
76
82
|
export { TableRowMoveDownIcon } from './ui/icons/TableRowMoveDownIcon';
|
|
@@ -11,6 +11,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
11
11
|
import React, { forwardRef, isValidElement, cloneElement } from 'react';
|
|
12
12
|
import { cx } from '@atlaskit/css';
|
|
13
13
|
import { DropdownItem } from '@atlaskit/dropdown-menu';
|
|
14
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
15
|
import { Anchor, Box, Pressable } from '@atlaskit/primitives/compiled';
|
|
15
16
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
16
17
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
@@ -32,7 +33,8 @@ var CustomDropdownMenuItemButton = /*#__PURE__*/forwardRef(function (_ref, ref)
|
|
|
32
33
|
ariaKeyshortcuts = _ref['aria-keyshortcuts'],
|
|
33
34
|
onClick = _ref.onClick,
|
|
34
35
|
tabIndex = _ref.tabIndex,
|
|
35
|
-
title = _ref.title
|
|
36
|
+
title = _ref.title,
|
|
37
|
+
dataExtensionItemKey = _ref['data-extension-item-key'];
|
|
36
38
|
return /*#__PURE__*/React.createElement(Pressable, {
|
|
37
39
|
role: expValEquals('platform_editor_enghealth_a11y_jan_fixes', 'isEnabled', true) ? 'menuitem' : undefined,
|
|
38
40
|
testId: testId,
|
|
@@ -48,7 +50,8 @@ var CustomDropdownMenuItemButton = /*#__PURE__*/forwardRef(function (_ref, ref)
|
|
|
48
50
|
"aria-keyshortcuts": ariaKeyshortcuts,
|
|
49
51
|
"data-toolbar-component": editorExperiment('platform_synced_block', true) ? 'menu-item' : undefined,
|
|
50
52
|
ref: ref,
|
|
51
|
-
title: expValEquals('platform_editor_renderer_toolbar_updates', 'isEnabled', true) ? title : undefined
|
|
53
|
+
title: expValEquals('platform_editor_renderer_toolbar_updates', 'isEnabled', true) ? title : undefined,
|
|
54
|
+
"data-extension-item-key": fg('cc_blocks_changeboarding') ? dataExtensionItemKey : undefined
|
|
52
55
|
}, children);
|
|
53
56
|
});
|
|
54
57
|
var CustomDropdownMenuItemAnchor = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
@@ -5,6 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { cx } from '@compiled/react';
|
|
7
7
|
import DropdownMenu from '@atlaskit/dropdown-menu';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
9
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
9
10
|
import { ToolbarDropdownItem } from './ToolbarDropdownItem';
|
|
10
11
|
import { ToolbarTooltip } from './ToolbarTooltip';
|
|
@@ -26,7 +27,8 @@ export var ToolbarNestedDropdownMenu = function ToolbarNestedDropdownMenu(_ref)
|
|
|
26
27
|
_ref$shouldFitContain = _ref.shouldFitContainer,
|
|
27
28
|
shouldFitContainer = _ref$shouldFitContain === void 0 ? false : _ref$shouldFitContain,
|
|
28
29
|
shouldTitleWrap = _ref.shouldTitleWrap,
|
|
29
|
-
tooltipContent = _ref.tooltipContent
|
|
30
|
+
tooltipContent = _ref.tooltipContent,
|
|
31
|
+
dataExtensionItemKey = _ref['data-extension-item-key'];
|
|
30
32
|
return /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
31
33
|
shouldFitContainer: shouldFitContainer,
|
|
32
34
|
placement: "right-start",
|
|
@@ -48,7 +50,8 @@ export var ToolbarNestedDropdownMenu = function ToolbarNestedDropdownMenu(_ref)
|
|
|
48
50
|
triggerRef: triggerProps.triggerRef,
|
|
49
51
|
hasNestedDropdownMenu: true,
|
|
50
52
|
isDisabled: isDisabled,
|
|
51
|
-
shouldTitleWrap: shouldTitleWrap
|
|
53
|
+
shouldTitleWrap: shouldTitleWrap,
|
|
54
|
+
"data-extension-item-key": fg('cc_blocks_changeboarding') ? dataExtensionItemKey : undefined
|
|
52
55
|
}, text, elemAfterText);
|
|
53
56
|
if (tooltipContent) {
|
|
54
57
|
return /*#__PURE__*/React.createElement(ToolbarTooltip, {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -69,7 +69,13 @@ export { EmojiIcon } from './ui/icons/EmojiIcon';
|
|
|
69
69
|
export { LayoutIcon } from './ui/icons/LayoutIcon';
|
|
70
70
|
export { ImageIcon } from './ui/icons/ImageIcon';
|
|
71
71
|
export { MentionIcon } from './ui/icons/MentionIcon';
|
|
72
|
+
export { ArrowDownIcon } from './ui/icons/ArrowDownIcon';
|
|
73
|
+
export { ArrowUpIcon } from './ui/icons/ArrowUpIcon';
|
|
72
74
|
export { TableIcon } from './ui/icons/TableIcon';
|
|
75
|
+
export { TableColumnAddLeftIcon } from './ui/icons/TableColumnAddLeftIcon';
|
|
76
|
+
export { TableColumnAddRightIcon } from './ui/icons/TableColumnAddRightIcon';
|
|
77
|
+
export { TableColumnMoveRightIcon } from './ui/icons/TableColumnMoveRightIcon';
|
|
78
|
+
export { TableColumnsDistributeIcon } from './ui/icons/TableColumnsDistributeIcon';
|
|
73
79
|
export { TableRowAddAboveIcon } from './ui/icons/TableRowAddAboveIcon';
|
|
74
80
|
export { TableRowAddBelowIcon } from './ui/icons/TableRowAddBelowIcon';
|
|
75
81
|
export { TableRowMoveDownIcon } from './ui/icons/TableRowMoveDownIcon';
|
|
@@ -8,6 +8,7 @@ export type CustomDropdownMenuItemButtonProps = CustomItemComponentProps & {
|
|
|
8
8
|
'aria-haspopup'?: boolean;
|
|
9
9
|
'aria-keyshortcuts'?: string;
|
|
10
10
|
'aria-pressed'?: boolean;
|
|
11
|
+
'data-extension-item-key'?: string;
|
|
11
12
|
title?: string;
|
|
12
13
|
};
|
|
13
14
|
type ToolbarDropdownItemProps = {
|
|
@@ -12,5 +12,5 @@ type ToolbarMenuContainerProps = {
|
|
|
12
12
|
*
|
|
13
13
|
* This intentionally does not provide a trigger or popup positioning; callers own those concerns.
|
|
14
14
|
*/
|
|
15
|
-
export declare const ToolbarMenuContainer: ({ children }: ToolbarMenuContainerProps) => React.JSX.Element;
|
|
15
|
+
export declare const ToolbarMenuContainer: ({ children, }: ToolbarMenuContainerProps) => React.JSX.Element;
|
|
16
16
|
export {};
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import type { ReactNode } from 'react';
|
|
6
6
|
type ToolbarNestedDropdownMenuProps = {
|
|
7
7
|
children?: ReactNode;
|
|
8
|
+
'data-extension-item-key'?: string;
|
|
8
9
|
dropdownTestId?: string;
|
|
9
10
|
elemAfter: ReactNode;
|
|
10
11
|
elemAfterText?: ReactNode;
|
|
@@ -21,5 +22,5 @@ type ToolbarNestedDropdownMenuProps = {
|
|
|
21
22
|
text?: string;
|
|
22
23
|
tooltipContent?: ReactNode;
|
|
23
24
|
};
|
|
24
|
-
export declare const ToolbarNestedDropdownMenu: ({ elemBefore, text, elemAfterText, elemAfter, children, isDisabled, testId, dropdownTestId, enableMaxHeight, onClick, shouldFitContainer, shouldTitleWrap, tooltipContent, }: ToolbarNestedDropdownMenuProps) => JSX.Element;
|
|
25
|
+
export declare const ToolbarNestedDropdownMenu: ({ elemBefore, text, elemAfterText, elemAfter, children, isDisabled, testId, dropdownTestId, enableMaxHeight, onClick, shouldFitContainer, shouldTitleWrap, tooltipContent, "data-extension-item-key": dataExtensionItemKey, }: ToolbarNestedDropdownMenuProps) => JSX.Element;
|
|
25
26
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ArrowDownIcon } from '@atlaskit/icon/core/arrow-down';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ArrowUpIcon } from '@atlaskit/icon/core/arrow-up';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as TableColumnAddLeftIcon } from '@atlaskit/icon/core/table-column-add-left';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as TableColumnAddRightIcon } from '@atlaskit/icon/core/table-column-add-right';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as TableColumnMoveRightIcon } from '@atlaskit/icon/core/table-column-move-right';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as TableColumnsDistributeIcon } from '@atlaskit/icon/core/table-columns-distribute';
|
|
@@ -69,7 +69,13 @@ export { EmojiIcon } from './ui/icons/EmojiIcon';
|
|
|
69
69
|
export { LayoutIcon } from './ui/icons/LayoutIcon';
|
|
70
70
|
export { ImageIcon } from './ui/icons/ImageIcon';
|
|
71
71
|
export { MentionIcon } from './ui/icons/MentionIcon';
|
|
72
|
+
export { ArrowDownIcon } from './ui/icons/ArrowDownIcon';
|
|
73
|
+
export { ArrowUpIcon } from './ui/icons/ArrowUpIcon';
|
|
72
74
|
export { TableIcon } from './ui/icons/TableIcon';
|
|
75
|
+
export { TableColumnAddLeftIcon } from './ui/icons/TableColumnAddLeftIcon';
|
|
76
|
+
export { TableColumnAddRightIcon } from './ui/icons/TableColumnAddRightIcon';
|
|
77
|
+
export { TableColumnMoveRightIcon } from './ui/icons/TableColumnMoveRightIcon';
|
|
78
|
+
export { TableColumnsDistributeIcon } from './ui/icons/TableColumnsDistributeIcon';
|
|
73
79
|
export { TableRowAddAboveIcon } from './ui/icons/TableRowAddAboveIcon';
|
|
74
80
|
export { TableRowAddBelowIcon } from './ui/icons/TableRowAddBelowIcon';
|
|
75
81
|
export { TableRowMoveDownIcon } from './ui/icons/TableRowMoveDownIcon';
|
|
@@ -8,6 +8,7 @@ export type CustomDropdownMenuItemButtonProps = CustomItemComponentProps & {
|
|
|
8
8
|
'aria-haspopup'?: boolean;
|
|
9
9
|
'aria-keyshortcuts'?: string;
|
|
10
10
|
'aria-pressed'?: boolean;
|
|
11
|
+
'data-extension-item-key'?: string;
|
|
11
12
|
title?: string;
|
|
12
13
|
};
|
|
13
14
|
type ToolbarDropdownItemProps = {
|
|
@@ -12,5 +12,5 @@ type ToolbarMenuContainerProps = {
|
|
|
12
12
|
*
|
|
13
13
|
* This intentionally does not provide a trigger or popup positioning; callers own those concerns.
|
|
14
14
|
*/
|
|
15
|
-
export declare const ToolbarMenuContainer: ({ children }: ToolbarMenuContainerProps) => React.JSX.Element;
|
|
15
|
+
export declare const ToolbarMenuContainer: ({ children, }: ToolbarMenuContainerProps) => React.JSX.Element;
|
|
16
16
|
export {};
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import type { ReactNode } from 'react';
|
|
6
6
|
type ToolbarNestedDropdownMenuProps = {
|
|
7
7
|
children?: ReactNode;
|
|
8
|
+
'data-extension-item-key'?: string;
|
|
8
9
|
dropdownTestId?: string;
|
|
9
10
|
elemAfter: ReactNode;
|
|
10
11
|
elemAfterText?: ReactNode;
|
|
@@ -21,5 +22,5 @@ type ToolbarNestedDropdownMenuProps = {
|
|
|
21
22
|
text?: string;
|
|
22
23
|
tooltipContent?: ReactNode;
|
|
23
24
|
};
|
|
24
|
-
export declare const ToolbarNestedDropdownMenu: ({ elemBefore, text, elemAfterText, elemAfter, children, isDisabled, testId, dropdownTestId, enableMaxHeight, onClick, shouldFitContainer, shouldTitleWrap, tooltipContent, }: ToolbarNestedDropdownMenuProps) => JSX.Element;
|
|
25
|
+
export declare const ToolbarNestedDropdownMenu: ({ elemBefore, text, elemAfterText, elemAfter, children, isDisabled, testId, dropdownTestId, enableMaxHeight, onClick, shouldFitContainer, shouldTitleWrap, tooltipContent, "data-extension-item-key": dataExtensionItemKey, }: ToolbarNestedDropdownMenuProps) => JSX.Element;
|
|
25
26
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ArrowDownIcon } from '@atlaskit/icon/core/arrow-down';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ArrowUpIcon } from '@atlaskit/icon/core/arrow-up';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as TableColumnAddLeftIcon } from '@atlaskit/icon/core/table-column-add-left';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as TableColumnAddRightIcon } from '@atlaskit/icon/core/table-column-add-right';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as TableColumnMoveRightIcon } from '@atlaskit/icon/core/table-column-move-right';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as TableColumnsDistributeIcon } from '@atlaskit/icon/core/table-columns-distribute';
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"registry": "https://registry.npmjs.org/"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.
|
|
6
|
+
"version": "1.5.1",
|
|
7
7
|
"description": "Common UI for Toolbars across the platform",
|
|
8
8
|
"atlassian": {
|
|
9
9
|
"react-compiler": {
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"@atlaskit/browser-apis": "^0.0.1",
|
|
33
33
|
"@atlaskit/css": "^0.19.0",
|
|
34
34
|
"@atlaskit/dropdown-menu": "^16.8.0",
|
|
35
|
-
"@atlaskit/icon": "^34.
|
|
35
|
+
"@atlaskit/icon": "^34.6.0",
|
|
36
36
|
"@atlaskit/icon-lab": "^6.9.0",
|
|
37
37
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
38
38
|
"@atlaskit/popup": "^4.19.0",
|
|
39
39
|
"@atlaskit/primitives": "^19.0.0",
|
|
40
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
40
|
+
"@atlaskit/tmp-editor-statsig": "^81.0.0",
|
|
41
41
|
"@atlaskit/tokens": "^13.0.0",
|
|
42
42
|
"@atlaskit/tooltip": "^22.2.0",
|
|
43
43
|
"@babel/runtime": "^7.0.0",
|
|
@@ -92,6 +92,9 @@
|
|
|
92
92
|
"platform-feature-flags": {
|
|
93
93
|
"platform_editor_fix_t_at_is_not_a_function": {
|
|
94
94
|
"type": "boolean"
|
|
95
|
+
},
|
|
96
|
+
"cc_blocks_changeboarding": {
|
|
97
|
+
"type": "boolean"
|
|
95
98
|
}
|
|
96
99
|
}
|
|
97
100
|
}
|