@atlaskit/editor-plugin-selection-toolbar 6.1.0 → 6.1.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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/editor-plugin-selection-toolbar
2
2
 
3
+ ## 6.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`7e4750e649998`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7e4750e649998) -
8
+ Hide Menu section for loom and pinning when in view mode
9
+ - Updated dependencies
10
+
3
11
  ## 6.1.0
4
12
 
5
13
  ### Minor Changes
@@ -31,6 +31,9 @@ var MenuSection = exports.MenuSection = function MenuSection(_ref) {
31
31
  var _usePluginState = usePluginState(api),
32
32
  editorViewMode = _usePluginState.editorViewMode;
33
33
  var isEdit = editorViewMode === 'edit';
34
+ if (!isEdit) {
35
+ return null;
36
+ }
34
37
  return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItemSection, {
35
38
  hasSeparator: isEdit
36
39
  }, children);
@@ -25,6 +25,9 @@ export const MenuSection = ({
25
25
  editorViewMode
26
26
  } = usePluginState(api);
27
27
  const isEdit = editorViewMode === 'edit';
28
+ if (!isEdit) {
29
+ return null;
30
+ }
28
31
  return /*#__PURE__*/React.createElement(ToolbarDropdownItemSection, {
29
32
  hasSeparator: isEdit
30
33
  }, children);
@@ -24,6 +24,9 @@ export var MenuSection = function MenuSection(_ref) {
24
24
  var _usePluginState = usePluginState(api),
25
25
  editorViewMode = _usePluginState.editorViewMode;
26
26
  var isEdit = editorViewMode === 'edit';
27
+ if (!isEdit) {
28
+ return null;
29
+ }
27
30
  return /*#__PURE__*/React.createElement(ToolbarDropdownItemSection, {
28
31
  hasSeparator: isEdit
29
32
  }, children);
@@ -5,5 +5,5 @@ type MenuSectionProps = {
5
5
  api: ExtractInjectionAPI<SelectionToolbarPlugin> | undefined;
6
6
  children: React.ReactNode;
7
7
  };
8
- export declare const MenuSection: ({ children, api }: MenuSectionProps) => React.JSX.Element;
8
+ export declare const MenuSection: ({ children, api }: MenuSectionProps) => React.JSX.Element | null;
9
9
  export {};
@@ -5,5 +5,5 @@ type MenuSectionProps = {
5
5
  api: ExtractInjectionAPI<SelectionToolbarPlugin> | undefined;
6
6
  children: React.ReactNode;
7
7
  };
8
- export declare const MenuSection: ({ children, api }: MenuSectionProps) => React.JSX.Element;
8
+ export declare const MenuSection: ({ children, api }: MenuSectionProps) => React.JSX.Element | null;
9
9
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-selection-toolbar",
3
- "version": "6.1.0",
3
+ "version": "6.1.1",
4
4
  "description": "@atlaskit/editor-plugin-selection-toolbar for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -30,8 +30,8 @@
30
30
  "atlaskit:src": "src/index.ts",
31
31
  "dependencies": {
32
32
  "@atlaskit/css": "^0.14.0",
33
- "@atlaskit/editor-plugin-analytics": "^5.0.0",
34
- "@atlaskit/editor-plugin-block-controls": "^6.0.0",
33
+ "@atlaskit/editor-plugin-analytics": "^5.1.0",
34
+ "@atlaskit/editor-plugin-block-controls": "^6.1.0",
35
35
  "@atlaskit/editor-plugin-connectivity": "^5.0.0",
36
36
  "@atlaskit/editor-plugin-editor-viewmode": "^7.0.0",
37
37
  "@atlaskit/editor-plugin-primary-toolbar": "^6.0.0",
@@ -46,13 +46,13 @@
46
46
  "@atlaskit/menu": "^8.4.0",
47
47
  "@atlaskit/platform-feature-flags": "^1.1.0",
48
48
  "@atlaskit/platform-feature-flags-react": "^0.3.0",
49
- "@atlaskit/tmp-editor-statsig": "^12.10.0",
49
+ "@atlaskit/tmp-editor-statsig": "^12.17.0",
50
50
  "@atlaskit/tokens": "^6.3.0",
51
51
  "@babel/runtime": "^7.0.0",
52
52
  "bind-event-listener": "^3.0.0"
53
53
  },
54
54
  "peerDependencies": {
55
- "@atlaskit/editor-common": "^109.1.0",
55
+ "@atlaskit/editor-common": "^109.3.0",
56
56
  "react": "^18.2.0",
57
57
  "react-dom": "^18.2.0",
58
58
  "react-intl-next": "npm:react-intl@^5.18.1"