@atlaskit/editor-plugin-layout 3.2.1 → 3.2.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,13 @@
1
1
  # @atlaskit/editor-plugin-layout
2
2
 
3
+ ## 3.2.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`a024ea6d25dc1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a024ea6d25dc1) -
8
+ [ED-29106] cleans up usages of sharedPluginStateHookMigratorFactory
9
+ - Updated dependencies
10
+
3
11
  ## 3.2.1
4
12
 
5
13
  ### Patch Changes
@@ -54,15 +54,6 @@ var selector = function selector(states) {
54
54
  editorDisabled: (_states$editorDisable = states.editorDisabledState) === null || _states$editorDisable === void 0 ? void 0 : _states$editorDisable.editorDisabled
55
55
  };
56
56
  };
57
- var useSharedState = (0, _hooks.sharedPluginStateHookMigratorFactory)(function (api) {
58
- return (0, _hooks.useSharedPluginStateWithSelector)(api, ['editorDisabled'], selector);
59
- }, function (api) {
60
- var _useSharedPluginState = (0, _hooks.useSharedPluginState)(api, ['editorDisabled']),
61
- editorDisabledState = _useSharedPluginState.editorDisabledState;
62
- return {
63
- editorDisabled: editorDisabledState === null || editorDisabledState === void 0 ? void 0 : editorDisabledState.editorDisabled
64
- };
65
- });
66
57
  var LayoutBreakoutResizer = function LayoutBreakoutResizer(_ref) {
67
58
  var _pluginInjectionApi$a;
68
59
  var pluginInjectionApi = _ref.pluginInjectionApi,
@@ -70,8 +61,8 @@ var LayoutBreakoutResizer = function LayoutBreakoutResizer(_ref) {
70
61
  getPos = _ref.getPos,
71
62
  view = _ref.view,
72
63
  parentRef = _ref.parentRef;
73
- var _useSharedState = useSharedState(pluginInjectionApi),
74
- editorDisabled = _useSharedState.editorDisabled;
64
+ var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(pluginInjectionApi, ['editorDisabled'], selector),
65
+ editorDisabled = _useSharedPluginState.editorDisabled;
75
66
  var interactionState = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(pluginInjectionApi, 'interaction.interactionState');
76
67
  var getEditorWidth = function getEditorWidth() {
77
68
  var _pluginInjectionApi$w;
@@ -1,5 +1,5 @@
1
1
  import React, { useCallback } from 'react';
2
- import { useSharedPluginState, sharedPluginStateHookMigratorFactory, useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
2
+ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
3
3
  import ReactNodeView from '@atlaskit/editor-common/react-node-view';
4
4
  import { BreakoutResizer, ignoreResizerMutations } from '@atlaskit/editor-common/resizer';
5
5
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
@@ -38,16 +38,6 @@ const selector = states => {
38
38
  editorDisabled: (_states$editorDisable = states.editorDisabledState) === null || _states$editorDisable === void 0 ? void 0 : _states$editorDisable.editorDisabled
39
39
  };
40
40
  };
41
- const useSharedState = sharedPluginStateHookMigratorFactory(api => {
42
- return useSharedPluginStateWithSelector(api, ['editorDisabled'], selector);
43
- }, api => {
44
- const {
45
- editorDisabledState
46
- } = useSharedPluginState(api, ['editorDisabled']);
47
- return {
48
- editorDisabled: editorDisabledState === null || editorDisabledState === void 0 ? void 0 : editorDisabledState.editorDisabled
49
- };
50
- });
51
41
  const LayoutBreakoutResizer = ({
52
42
  pluginInjectionApi,
53
43
  forwardRef,
@@ -58,7 +48,7 @@ const LayoutBreakoutResizer = ({
58
48
  var _pluginInjectionApi$a;
59
49
  const {
60
50
  editorDisabled
61
- } = useSharedState(pluginInjectionApi);
51
+ } = useSharedPluginStateWithSelector(pluginInjectionApi, ['editorDisabled'], selector);
62
52
  const interactionState = useSharedPluginStateSelector(pluginInjectionApi, 'interaction.interactionState');
63
53
  const getEditorWidth = () => {
64
54
  var _pluginInjectionApi$w;
@@ -6,7 +6,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
6
6
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
7
7
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
8
8
  import React, { useCallback } from 'react';
9
- import { useSharedPluginState, sharedPluginStateHookMigratorFactory, useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
9
+ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
10
10
  import ReactNodeView from '@atlaskit/editor-common/react-node-view';
11
11
  import { BreakoutResizer, ignoreResizerMutations } from '@atlaskit/editor-common/resizer';
12
12
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
@@ -45,15 +45,6 @@ var selector = function selector(states) {
45
45
  editorDisabled: (_states$editorDisable = states.editorDisabledState) === null || _states$editorDisable === void 0 ? void 0 : _states$editorDisable.editorDisabled
46
46
  };
47
47
  };
48
- var useSharedState = sharedPluginStateHookMigratorFactory(function (api) {
49
- return useSharedPluginStateWithSelector(api, ['editorDisabled'], selector);
50
- }, function (api) {
51
- var _useSharedPluginState = useSharedPluginState(api, ['editorDisabled']),
52
- editorDisabledState = _useSharedPluginState.editorDisabledState;
53
- return {
54
- editorDisabled: editorDisabledState === null || editorDisabledState === void 0 ? void 0 : editorDisabledState.editorDisabled
55
- };
56
- });
57
48
  var LayoutBreakoutResizer = function LayoutBreakoutResizer(_ref) {
58
49
  var _pluginInjectionApi$a;
59
50
  var pluginInjectionApi = _ref.pluginInjectionApi,
@@ -61,8 +52,8 @@ var LayoutBreakoutResizer = function LayoutBreakoutResizer(_ref) {
61
52
  getPos = _ref.getPos,
62
53
  view = _ref.view,
63
54
  parentRef = _ref.parentRef;
64
- var _useSharedState = useSharedState(pluginInjectionApi),
65
- editorDisabled = _useSharedState.editorDisabled;
55
+ var _useSharedPluginState = useSharedPluginStateWithSelector(pluginInjectionApi, ['editorDisabled'], selector),
56
+ editorDisabled = _useSharedPluginState.editorDisabled;
66
57
  var interactionState = useSharedPluginStateSelector(pluginInjectionApi, 'interaction.interactionState');
67
58
  var getEditorWidth = function getEditorWidth() {
68
59
  var _pluginInjectionApi$w;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-layout",
3
- "version": "3.2.1",
3
+ "version": "3.2.2",
4
4
  "description": "Layout plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",