@atlaskit/editor-toolbar 0.19.9 → 0.19.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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/editor-toolbar
2
2
 
3
+ ## 0.19.10
4
+
5
+ ### Patch Changes
6
+
7
+ - [`e170ad8b5a383`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e170ad8b5a383) -
8
+ [EDTIOR-4501] add optional id prop to ToolbarDropdownMenu
9
+ - Updated dependencies
10
+
3
11
  ## 0.19.9
4
12
 
5
13
  ### Patch Changes
@@ -13,6 +13,7 @@ var _react = _interopRequireWildcard(require("react"));
13
13
  var _react2 = require("@compiled/react");
14
14
  var _dropdownMenu = _interopRequireDefault(require("@atlaskit/dropdown-menu"));
15
15
  var _compiled = require("@atlaskit/primitives/compiled");
16
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
16
17
  var _uiContext = require("../hooks/ui-context");
17
18
  var _ToolbarButton = require("./ToolbarButton");
18
19
  var _ToolbarDropdownMenuContext = require("./ToolbarDropdownMenuContext");
@@ -26,6 +27,7 @@ var ToolbarDropdownMenuContent = function ToolbarDropdownMenuContent(_ref) {
26
27
  var iconBefore = _ref.iconBefore,
27
28
  children = _ref.children,
28
29
  isDisabled = _ref.isDisabled,
30
+ id = _ref.id,
29
31
  testId = _ref.testId,
30
32
  label = _ref.label,
31
33
  _onClick = _ref.onClick;
@@ -60,6 +62,7 @@ var ToolbarDropdownMenuContent = function ToolbarDropdownMenuContent(_ref) {
60
62
  triggerProps.onClick && triggerProps.onClick(e);
61
63
  },
62
64
  onFocus: triggerProps.onFocus,
65
+ id: (0, _expValEquals.expValEquals)('platform_editor_renderer_toolbar_updates', 'isEnabled', true) ? id : undefined,
63
66
  testId: testId,
64
67
  iconBefore: iconBefore,
65
68
  isDisabled: isDisabled,
@@ -74,6 +77,7 @@ var ToolbarDropdownMenu = exports.ToolbarDropdownMenu = function ToolbarDropdown
74
77
  var iconBefore = _ref2.iconBefore,
75
78
  children = _ref2.children,
76
79
  isDisabled = _ref2.isDisabled,
80
+ id = _ref2.id,
77
81
  testId = _ref2.testId,
78
82
  label = _ref2.label,
79
83
  _ref2$hasSectionMargi = _ref2.hasSectionMargin,
@@ -84,6 +88,7 @@ var ToolbarDropdownMenu = exports.ToolbarDropdownMenu = function ToolbarDropdown
84
88
  return /*#__PURE__*/_react.default.createElement(ToolbarDropdownMenuContent, {
85
89
  iconBefore: iconBefore,
86
90
  isDisabled: isDisabled,
91
+ id: (0, _expValEquals.expValEquals)('platform_editor_renderer_toolbar_updates', 'isEnabled', true) ? id : undefined,
87
92
  testId: testId,
88
93
  label: label,
89
94
  onClick: onClick
@@ -5,6 +5,7 @@ import React, { useCallback } from 'react';
5
5
  import { cx } from '@compiled/react';
6
6
  import DropdownMenu from '@atlaskit/dropdown-menu';
7
7
  import { Box } from '@atlaskit/primitives/compiled';
8
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
9
  import { useToolbarUI } from '../hooks/ui-context';
9
10
  import { ToolbarButton } from './ToolbarButton';
10
11
  import { useToolbarDropdownMenu } from './ToolbarDropdownMenuContext';
@@ -17,6 +18,7 @@ const ToolbarDropdownMenuContent = ({
17
18
  iconBefore,
18
19
  children,
19
20
  isDisabled,
21
+ id,
20
22
  testId,
21
23
  label,
22
24
  onClick
@@ -52,6 +54,7 @@ const ToolbarDropdownMenuContent = ({
52
54
  triggerProps.onClick && triggerProps.onClick(e);
53
55
  },
54
56
  onFocus: triggerProps.onFocus,
57
+ id: expValEquals('platform_editor_renderer_toolbar_updates', 'isEnabled', true) ? id : undefined,
55
58
  testId: testId,
56
59
  iconBefore: iconBefore,
57
60
  isDisabled: isDisabled,
@@ -65,6 +68,7 @@ export const ToolbarDropdownMenu = ({
65
68
  iconBefore,
66
69
  children,
67
70
  isDisabled,
71
+ id,
68
72
  testId,
69
73
  label,
70
74
  hasSectionMargin = true,
@@ -74,6 +78,7 @@ export const ToolbarDropdownMenu = ({
74
78
  return /*#__PURE__*/React.createElement(ToolbarDropdownMenuContent, {
75
79
  iconBefore: iconBefore,
76
80
  isDisabled: isDisabled,
81
+ id: expValEquals('platform_editor_renderer_toolbar_updates', 'isEnabled', true) ? id : undefined,
77
82
  testId: testId,
78
83
  label: label,
79
84
  onClick: onClick
@@ -5,6 +5,7 @@ import React, { useCallback } from 'react';
5
5
  import { cx } from '@compiled/react';
6
6
  import DropdownMenu from '@atlaskit/dropdown-menu';
7
7
  import { Box } from '@atlaskit/primitives/compiled';
8
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
9
  import { useToolbarUI } from '../hooks/ui-context';
9
10
  import { ToolbarButton } from './ToolbarButton';
10
11
  import { useToolbarDropdownMenu } from './ToolbarDropdownMenuContext';
@@ -17,6 +18,7 @@ var ToolbarDropdownMenuContent = function ToolbarDropdownMenuContent(_ref) {
17
18
  var iconBefore = _ref.iconBefore,
18
19
  children = _ref.children,
19
20
  isDisabled = _ref.isDisabled,
21
+ id = _ref.id,
20
22
  testId = _ref.testId,
21
23
  label = _ref.label,
22
24
  _onClick = _ref.onClick;
@@ -51,6 +53,7 @@ var ToolbarDropdownMenuContent = function ToolbarDropdownMenuContent(_ref) {
51
53
  triggerProps.onClick && triggerProps.onClick(e);
52
54
  },
53
55
  onFocus: triggerProps.onFocus,
56
+ id: expValEquals('platform_editor_renderer_toolbar_updates', 'isEnabled', true) ? id : undefined,
54
57
  testId: testId,
55
58
  iconBefore: iconBefore,
56
59
  isDisabled: isDisabled,
@@ -65,6 +68,7 @@ export var ToolbarDropdownMenu = function ToolbarDropdownMenu(_ref2) {
65
68
  var iconBefore = _ref2.iconBefore,
66
69
  children = _ref2.children,
67
70
  isDisabled = _ref2.isDisabled,
71
+ id = _ref2.id,
68
72
  testId = _ref2.testId,
69
73
  label = _ref2.label,
70
74
  _ref2$hasSectionMargi = _ref2.hasSectionMargin,
@@ -75,6 +79,7 @@ export var ToolbarDropdownMenu = function ToolbarDropdownMenu(_ref2) {
75
79
  return /*#__PURE__*/React.createElement(ToolbarDropdownMenuContent, {
76
80
  iconBefore: iconBefore,
77
81
  isDisabled: isDisabled,
82
+ id: expValEquals('platform_editor_renderer_toolbar_updates', 'isEnabled', true) ? id : undefined,
78
83
  testId: testId,
79
84
  label: label,
80
85
  onClick: onClick
@@ -14,10 +14,11 @@ type ToolbarDropdownMenuProps = {
14
14
  */
15
15
  hasSectionMargin?: boolean;
16
16
  iconBefore: React.ReactNode;
17
+ id?: string;
17
18
  isDisabled?: boolean;
18
19
  label?: string;
19
20
  onClick?: (event: React.MouseEvent<HTMLButtonElement>, isOpen: boolean) => void;
20
21
  testId?: string;
21
22
  };
22
- export declare const ToolbarDropdownMenu: ({ iconBefore, children, isDisabled, testId, label, hasSectionMargin, enableMaxHeight, onClick, }: ToolbarDropdownMenuProps) => JSX.Element;
23
+ export declare const ToolbarDropdownMenu: ({ iconBefore, children, isDisabled, id, testId, label, hasSectionMargin, enableMaxHeight, onClick, }: ToolbarDropdownMenuProps) => JSX.Element;
23
24
  export {};
@@ -14,10 +14,11 @@ type ToolbarDropdownMenuProps = {
14
14
  */
15
15
  hasSectionMargin?: boolean;
16
16
  iconBefore: React.ReactNode;
17
+ id?: string;
17
18
  isDisabled?: boolean;
18
19
  label?: string;
19
20
  onClick?: (event: React.MouseEvent<HTMLButtonElement>, isOpen: boolean) => void;
20
21
  testId?: string;
21
22
  };
22
- export declare const ToolbarDropdownMenu: ({ iconBefore, children, isDisabled, testId, label, hasSectionMargin, enableMaxHeight, onClick, }: ToolbarDropdownMenuProps) => JSX.Element;
23
+ export declare const ToolbarDropdownMenu: ({ iconBefore, children, isDisabled, id, testId, label, hasSectionMargin, enableMaxHeight, onClick, }: ToolbarDropdownMenuProps) => JSX.Element;
23
24
  export {};
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "registry": "https://registry.npmjs.org/"
5
5
  },
6
- "version": "0.19.9",
6
+ "version": "0.19.10",
7
7
  "description": "Common UI for Toolbars across the platform",
8
8
  "atlassian": {
9
9
  "team": "Editor: Jenga",
@@ -30,7 +30,7 @@
30
30
  "@atlaskit/platform-feature-flags": "^1.1.0",
31
31
  "@atlaskit/popup": "^4.13.0",
32
32
  "@atlaskit/primitives": "^17.1.0",
33
- "@atlaskit/tmp-editor-statsig": "^17.1.0",
33
+ "@atlaskit/tmp-editor-statsig": "^17.3.0",
34
34
  "@atlaskit/tokens": "^10.1.0",
35
35
  "@atlaskit/tooltip": "^20.14.0",
36
36
  "@babel/runtime": "^7.0.0",