@atlaskit/editor-toolbar-model 0.3.0 → 0.3.2

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,18 @@
1
1
  # @atlaskit/editor-toolbar-model
2
2
 
3
+ ## 0.3.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 0.3.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [`8708f328d5db6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8708f328d5db6) -
14
+ Clean up platform_editor_toolbar_aifc_overflow_menu_update feature gate
15
+
3
16
  ## 0.3.0
4
17
 
5
18
  ### Minor Changes
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.ToolbarModelRenderer = void 0;
8
8
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
9
  var _react = _interopRequireDefault(require("react"));
10
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
11
10
  var _common = require("./common");
12
11
  var hasParents = function hasParents(component) {
13
12
  return component.type !== 'toolbar';
@@ -71,14 +70,8 @@ var _ComponentRenderer = function ComponentRenderer(_ref) {
71
70
  var children = (0, _common.getSortedChildren)(allComponents.filter(function (comp) {
72
71
  return childTypes.includes(comp.type);
73
72
  }), component.key);
74
- if ((0, _platformFeatureFlags.fg)('platform_editor_toolbar_aifc_overflow_menu_update')) {
75
- if (shouldHideEmptyComponent(component, children, allComponents)) {
76
- return null;
77
- }
78
- } else {
79
- if ((component.type === 'menu' || component.type === 'group' || component.type === 'nested-menu' || component.type === 'menu-section') && children.length === 0) {
80
- return null;
81
- }
73
+ if (shouldHideEmptyComponent(component, children, allComponents)) {
74
+ return null;
82
75
  }
83
76
  var Component = component.component || getFallbackComponent(component.type, fallbacks);
84
77
  var newParents = [].concat((0, _toConsumableArray2.default)(parents), [{
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import { fg } from '@atlaskit/platform-feature-flags';
3
2
  import { getSortedChildren, isSection, NoOp } from './common';
4
3
  const hasParents = component => {
5
4
  return component.type !== 'toolbar';
@@ -56,14 +55,8 @@ const ComponentRenderer = ({
56
55
  }) => {
57
56
  const childTypes = getChildTypesForParent(component.type);
58
57
  const children = getSortedChildren(allComponents.filter(comp => childTypes.includes(comp.type)), component.key);
59
- if (fg('platform_editor_toolbar_aifc_overflow_menu_update')) {
60
- if (shouldHideEmptyComponent(component, children, allComponents)) {
61
- return null;
62
- }
63
- } else {
64
- if ((component.type === 'menu' || component.type === 'group' || component.type === 'nested-menu' || component.type === 'menu-section') && children.length === 0) {
65
- return null;
66
- }
58
+ if (shouldHideEmptyComponent(component, children, allComponents)) {
59
+ return null;
67
60
  }
68
61
  const Component = component.component || getFallbackComponent(component.type, fallbacks);
69
62
  const newParents = [...parents, {
@@ -1,6 +1,5 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
2
  import React from 'react';
3
- import { fg } from '@atlaskit/platform-feature-flags';
4
3
  import { getSortedChildren, isSection, NoOp } from './common';
5
4
  var hasParents = function hasParents(component) {
6
5
  return component.type !== 'toolbar';
@@ -64,14 +63,8 @@ var _ComponentRenderer = function ComponentRenderer(_ref) {
64
63
  var children = getSortedChildren(allComponents.filter(function (comp) {
65
64
  return childTypes.includes(comp.type);
66
65
  }), component.key);
67
- if (fg('platform_editor_toolbar_aifc_overflow_menu_update')) {
68
- if (shouldHideEmptyComponent(component, children, allComponents)) {
69
- return null;
70
- }
71
- } else {
72
- if ((component.type === 'menu' || component.type === 'group' || component.type === 'nested-menu' || component.type === 'menu-section') && children.length === 0) {
73
- return null;
74
- }
66
+ if (shouldHideEmptyComponent(component, children, allComponents)) {
67
+ return null;
75
68
  }
76
69
  var Component = component.component || getFallbackComponent(component.type, fallbacks);
77
70
  var newParents = [].concat(_toConsumableArray(parents), [{
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
2
  import type { ToolbarProps } from './types';
3
- export declare const ToolbarModelRenderer: ({ toolbar, components, fallbacks }: ToolbarProps) => React.JSX.Element;
3
+ export declare const ToolbarModelRenderer: ({ toolbar, components, fallbacks, }: ToolbarProps) => React.JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
2
  import type { ToolbarProps } from './types';
3
- export declare const ToolbarModelRenderer: ({ toolbar, components, fallbacks }: ToolbarProps) => React.JSX.Element;
3
+ export declare const ToolbarModelRenderer: ({ toolbar, components, fallbacks, }: ToolbarProps) => React.JSX.Element;
package/package.json CHANGED
@@ -21,8 +21,7 @@
21
21
  ],
22
22
  "atlaskit:src": "src/index.ts",
23
23
  "dependencies": {
24
- "@atlaskit/platform-feature-flags": "^1.1.0",
25
- "@atlaskit/tokens": "^10.0.0",
24
+ "@atlaskit/tokens": "^11.0.0",
26
25
  "@babel/runtime": "^7.0.0",
27
26
  "@compiled/react": "^0.18.6"
28
27
  },
@@ -69,13 +68,8 @@
69
68
  ]
70
69
  }
71
70
  },
72
- "platform-feature-flags": {
73
- "platform_editor_toolbar_aifc_overflow_menu_update": {
74
- "type": "boolean"
75
- }
76
- },
77
71
  "name": "@atlaskit/editor-toolbar-model",
78
- "version": "0.3.0",
72
+ "version": "0.3.2",
79
73
  "description": "register and render toolbar component",
80
74
  "author": "Atlassian Pty Ltd",
81
75
  "license": "Apache-2.0",