@atlaskit/editor-plugin-toolbar 4.0.10 → 4.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 +20 -0
- package/afm-cc/tsconfig.json +0 -3
- package/afm-jira/tsconfig.json +0 -3
- package/afm-products/tsconfig.json +0 -3
- package/dist/cjs/ui/Section.js +2 -16
- package/dist/cjs/ui/SelectionToolbar/index.js +2 -29
- package/dist/es2019/ui/Section.js +2 -15
- package/dist/es2019/ui/SelectionToolbar/index.js +2 -28
- package/dist/esm/ui/Section.js +2 -16
- package/dist/esm/ui/SelectionToolbar/index.js +2 -29
- package/package.json +2 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-toolbar
|
|
2
2
|
|
|
3
|
+
## 4.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`9041ec452a104`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9041ec452a104) -
|
|
8
|
+
[EDITOR-4515] clean up fg platform_editor_toolbar_aifc_patch_7
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 4.1.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [`6e8029473620b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6e8029473620b) -
|
|
16
|
+
[EDITOR-4496] clean up experiment platform_editor_toolbar_aifc_patch_3 and remove view-mode plugin
|
|
17
|
+
dependency from loom plugin
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
3
23
|
## 4.0.10
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
package/afm-jira/tsconfig.json
CHANGED
package/dist/cjs/ui/Section.js
CHANGED
|
@@ -7,10 +7,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.Section = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _toolbar = require("@atlaskit/editor-common/toolbar");
|
|
10
|
-
var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
|
|
11
10
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
12
11
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
|
-
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
14
12
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
15
13
|
var shouldShowSection = function shouldShowSection(editMode, toolbar, toolbarDocking, contextualFormattingEnabled) {
|
|
16
14
|
if (editMode === 'view') {
|
|
@@ -33,9 +31,7 @@ var shouldShowSection = function shouldShowSection(editMode, toolbar, toolbarDoc
|
|
|
33
31
|
}
|
|
34
32
|
return false;
|
|
35
33
|
};
|
|
36
|
-
var usePluginState =
|
|
37
|
-
return (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_3', 'isEnabled', true);
|
|
38
|
-
}, function (_api) {
|
|
34
|
+
var usePluginState = function usePluginState(_api) {
|
|
39
35
|
var _useEditorToolbar = (0, _toolbar.useEditorToolbar)(),
|
|
40
36
|
editorViewMode = _useEditorToolbar.editorViewMode,
|
|
41
37
|
editorToolbarDockingPreference = _useEditorToolbar.editorToolbarDockingPreference,
|
|
@@ -45,17 +41,7 @@ var usePluginState = (0, _platformFeatureFlagsReact.conditionalHooksFactory)(fun
|
|
|
45
41
|
editorToolbarDockingPreference: editorToolbarDockingPreference,
|
|
46
42
|
editorAppearance: editorAppearance
|
|
47
43
|
};
|
|
48
|
-
}
|
|
49
|
-
var editorViewMode = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'editorViewMode.mode');
|
|
50
|
-
var editorToolbarDockingPreference = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'userPreferences.preferences.toolbarDockingPosition');
|
|
51
|
-
var _useEditorToolbar2 = (0, _toolbar.useEditorToolbar)(),
|
|
52
|
-
editorAppearance = _useEditorToolbar2.editorAppearance;
|
|
53
|
-
return {
|
|
54
|
-
editorViewMode: editorViewMode,
|
|
55
|
-
editorToolbarDockingPreference: editorToolbarDockingPreference,
|
|
56
|
-
editorAppearance: editorAppearance
|
|
57
|
-
};
|
|
58
|
-
});
|
|
44
|
+
};
|
|
59
45
|
var Section = exports.Section = function Section(_ref) {
|
|
60
46
|
var _api$toolbar$actions$, _api$toolbar;
|
|
61
47
|
var children = _ref.children,
|
|
@@ -14,14 +14,12 @@ var _hooks = require("@atlaskit/editor-common/hooks");
|
|
|
14
14
|
var _monitoring = require("@atlaskit/editor-common/monitoring");
|
|
15
15
|
var _toolbar = require("@atlaskit/editor-common/toolbar");
|
|
16
16
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
17
|
-
var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
|
|
18
17
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
19
18
|
var _editorPluginConnectivity = require("@atlaskit/editor-plugin-connectivity");
|
|
20
19
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
21
20
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
22
21
|
var _editorToolbarModel = require("@atlaskit/editor-toolbar-model");
|
|
23
22
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
24
|
-
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
25
23
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
26
24
|
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
27
25
|
var _consts = require("../consts");
|
|
@@ -31,9 +29,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
31
29
|
var isToolbarComponent = function isToolbarComponent(component) {
|
|
32
30
|
return component.type === 'toolbar' && component.key === 'inline-text-toolbar';
|
|
33
31
|
};
|
|
34
|
-
var usePluginState =
|
|
35
|
-
return (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_3', 'isEnabled', true);
|
|
36
|
-
}, function (api) {
|
|
32
|
+
var usePluginState = function usePluginState(api) {
|
|
37
33
|
return (0, _hooks.useSharedPluginStateWithSelector)(api, ['connectivity', 'userPreferences', 'toolbar', 'selection', 'userIntent', 'editorViewMode'], function (state) {
|
|
38
34
|
var _state$connectivitySt, _state$userPreference, _state$toolbarState, _state$toolbarState2, _state$selectionState, _state$userIntentStat, _state$editorViewMode;
|
|
39
35
|
return {
|
|
@@ -46,30 +42,7 @@ var usePluginState = (0, _platformFeatureFlagsReact.conditionalHooksFactory)(fun
|
|
|
46
42
|
editorViewMode: (_state$editorViewMode = state.editorViewModeState) === null || _state$editorViewMode === void 0 ? void 0 : _state$editorViewMode.mode
|
|
47
43
|
};
|
|
48
44
|
});
|
|
49
|
-
}
|
|
50
|
-
var connectivityStateMode = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'connectivity.mode');
|
|
51
|
-
var editorToolbarDockingPreference = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'userPreferences.preferences.toolbarDockingPosition');
|
|
52
|
-
var currentUserIntent = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'userIntent.currentUserIntent');
|
|
53
|
-
var selection = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'selection.selection');
|
|
54
|
-
var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(api, ['toolbar'], function (state) {
|
|
55
|
-
var _state$toolbarState3, _state$toolbarState4;
|
|
56
|
-
return {
|
|
57
|
-
shouldShowToolbar: (_state$toolbarState3 = state.toolbarState) === null || _state$toolbarState3 === void 0 ? void 0 : _state$toolbarState3.shouldShowToolbar,
|
|
58
|
-
selectedNode: (_state$toolbarState4 = state.toolbarState) === null || _state$toolbarState4 === void 0 ? void 0 : _state$toolbarState4.selectedNode
|
|
59
|
-
};
|
|
60
|
-
}),
|
|
61
|
-
shouldShowToolbar = _useSharedPluginState.shouldShowToolbar,
|
|
62
|
-
selectedNode = _useSharedPluginState.selectedNode;
|
|
63
|
-
return {
|
|
64
|
-
connectivityStateMode: connectivityStateMode,
|
|
65
|
-
editorToolbarDockingPreference: editorToolbarDockingPreference,
|
|
66
|
-
currentUserIntent: currentUserIntent,
|
|
67
|
-
shouldShowToolbar: shouldShowToolbar,
|
|
68
|
-
selection: selection,
|
|
69
|
-
editorViewMode: undefined,
|
|
70
|
-
selectedNode: selectedNode
|
|
71
|
-
};
|
|
72
|
-
});
|
|
45
|
+
};
|
|
73
46
|
var useOnPositionCalculated = function useOnPositionCalculated(editorView, cachedCalculateToolbarPosition) {
|
|
74
47
|
var onPositionCalculated = (0, _react.useCallback)(function (position) {
|
|
75
48
|
try {
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TOOLBARS, useEditorToolbar } from '@atlaskit/editor-common/toolbar';
|
|
3
|
-
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
4
3
|
import { ToolbarSection, SeparatorPosition } from '@atlaskit/editor-toolbar';
|
|
5
4
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
|
-
import { conditionalHooksFactory } from '@atlaskit/platform-feature-flags-react';
|
|
7
5
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
6
|
const shouldShowSection = (editMode, toolbar, toolbarDocking, contextualFormattingEnabled) => {
|
|
9
7
|
if (editMode === 'view') {
|
|
@@ -26,7 +24,7 @@ const shouldShowSection = (editMode, toolbar, toolbarDocking, contextualFormatti
|
|
|
26
24
|
}
|
|
27
25
|
return false;
|
|
28
26
|
};
|
|
29
|
-
const usePluginState =
|
|
27
|
+
const usePluginState = _api => {
|
|
30
28
|
const {
|
|
31
29
|
editorViewMode,
|
|
32
30
|
editorToolbarDockingPreference,
|
|
@@ -37,18 +35,7 @@ const usePluginState = conditionalHooksFactory(() => expValEquals('platform_edit
|
|
|
37
35
|
editorToolbarDockingPreference,
|
|
38
36
|
editorAppearance
|
|
39
37
|
};
|
|
40
|
-
}
|
|
41
|
-
const editorViewMode = useSharedPluginStateSelector(api, 'editorViewMode.mode');
|
|
42
|
-
const editorToolbarDockingPreference = useSharedPluginStateSelector(api, 'userPreferences.preferences.toolbarDockingPosition');
|
|
43
|
-
const {
|
|
44
|
-
editorAppearance
|
|
45
|
-
} = useEditorToolbar();
|
|
46
|
-
return {
|
|
47
|
-
editorViewMode,
|
|
48
|
-
editorToolbarDockingPreference,
|
|
49
|
-
editorAppearance
|
|
50
|
-
};
|
|
51
|
-
});
|
|
38
|
+
};
|
|
52
39
|
export const Section = ({
|
|
53
40
|
children,
|
|
54
41
|
parents,
|
|
@@ -7,14 +7,12 @@ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks'
|
|
|
7
7
|
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
8
8
|
import { EditorToolbarProvider, EditorToolbarUIProvider, shouldShowSelectionToolbar } from '@atlaskit/editor-common/toolbar';
|
|
9
9
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
10
|
-
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
11
10
|
import { calculateToolbarPositionTrackHead, calculateToolbarPositionOnCellSelection } from '@atlaskit/editor-common/utils';
|
|
12
11
|
import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
|
|
13
12
|
import { AllSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
14
13
|
import { ToolbarSection, ToolbarButtonGroup, ToolbarDropdownItemSection, useToolbarUI } from '@atlaskit/editor-toolbar';
|
|
15
14
|
import { ToolbarModelRenderer } from '@atlaskit/editor-toolbar-model';
|
|
16
15
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
|
-
import { conditionalHooksFactory } from '@atlaskit/platform-feature-flags-react';
|
|
18
16
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
19
17
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
20
18
|
import { SELECTION_TOOLBAR_LABEL } from '../consts';
|
|
@@ -23,7 +21,7 @@ import { getDomRefFromSelection } from './utils';
|
|
|
23
21
|
const isToolbarComponent = component => {
|
|
24
22
|
return component.type === 'toolbar' && component.key === 'inline-text-toolbar';
|
|
25
23
|
};
|
|
26
|
-
const usePluginState =
|
|
24
|
+
const usePluginState = api => {
|
|
27
25
|
return useSharedPluginStateWithSelector(api, ['connectivity', 'userPreferences', 'toolbar', 'selection', 'userIntent', 'editorViewMode'], state => {
|
|
28
26
|
var _state$connectivitySt, _state$userPreference, _state$userPreference2, _state$toolbarState, _state$toolbarState2, _state$selectionState, _state$userIntentStat, _state$editorViewMode;
|
|
29
27
|
return {
|
|
@@ -36,31 +34,7 @@ const usePluginState = conditionalHooksFactory(() => expValEquals('platform_edit
|
|
|
36
34
|
editorViewMode: (_state$editorViewMode = state.editorViewModeState) === null || _state$editorViewMode === void 0 ? void 0 : _state$editorViewMode.mode
|
|
37
35
|
};
|
|
38
36
|
});
|
|
39
|
-
}
|
|
40
|
-
const connectivityStateMode = useSharedPluginStateSelector(api, 'connectivity.mode');
|
|
41
|
-
const editorToolbarDockingPreference = useSharedPluginStateSelector(api, 'userPreferences.preferences.toolbarDockingPosition');
|
|
42
|
-
const currentUserIntent = useSharedPluginStateSelector(api, 'userIntent.currentUserIntent');
|
|
43
|
-
const selection = useSharedPluginStateSelector(api, 'selection.selection');
|
|
44
|
-
const {
|
|
45
|
-
shouldShowToolbar,
|
|
46
|
-
selectedNode
|
|
47
|
-
} = useSharedPluginStateWithSelector(api, ['toolbar'], state => {
|
|
48
|
-
var _state$toolbarState3, _state$toolbarState4;
|
|
49
|
-
return {
|
|
50
|
-
shouldShowToolbar: (_state$toolbarState3 = state.toolbarState) === null || _state$toolbarState3 === void 0 ? void 0 : _state$toolbarState3.shouldShowToolbar,
|
|
51
|
-
selectedNode: (_state$toolbarState4 = state.toolbarState) === null || _state$toolbarState4 === void 0 ? void 0 : _state$toolbarState4.selectedNode
|
|
52
|
-
};
|
|
53
|
-
});
|
|
54
|
-
return {
|
|
55
|
-
connectivityStateMode,
|
|
56
|
-
editorToolbarDockingPreference,
|
|
57
|
-
currentUserIntent,
|
|
58
|
-
shouldShowToolbar,
|
|
59
|
-
selection,
|
|
60
|
-
editorViewMode: undefined,
|
|
61
|
-
selectedNode
|
|
62
|
-
};
|
|
63
|
-
});
|
|
37
|
+
};
|
|
64
38
|
const useOnPositionCalculated = (editorView, cachedCalculateToolbarPosition) => {
|
|
65
39
|
const onPositionCalculated = useCallback(position => {
|
|
66
40
|
try {
|
package/dist/esm/ui/Section.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TOOLBARS, useEditorToolbar } from '@atlaskit/editor-common/toolbar';
|
|
3
|
-
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
4
3
|
import { ToolbarSection, SeparatorPosition } from '@atlaskit/editor-toolbar';
|
|
5
4
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
|
-
import { conditionalHooksFactory } from '@atlaskit/platform-feature-flags-react';
|
|
7
5
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
6
|
var shouldShowSection = function shouldShowSection(editMode, toolbar, toolbarDocking, contextualFormattingEnabled) {
|
|
9
7
|
if (editMode === 'view') {
|
|
@@ -26,9 +24,7 @@ var shouldShowSection = function shouldShowSection(editMode, toolbar, toolbarDoc
|
|
|
26
24
|
}
|
|
27
25
|
return false;
|
|
28
26
|
};
|
|
29
|
-
var usePluginState =
|
|
30
|
-
return expValEquals('platform_editor_toolbar_aifc_patch_3', 'isEnabled', true);
|
|
31
|
-
}, function (_api) {
|
|
27
|
+
var usePluginState = function usePluginState(_api) {
|
|
32
28
|
var _useEditorToolbar = useEditorToolbar(),
|
|
33
29
|
editorViewMode = _useEditorToolbar.editorViewMode,
|
|
34
30
|
editorToolbarDockingPreference = _useEditorToolbar.editorToolbarDockingPreference,
|
|
@@ -38,17 +34,7 @@ var usePluginState = conditionalHooksFactory(function () {
|
|
|
38
34
|
editorToolbarDockingPreference: editorToolbarDockingPreference,
|
|
39
35
|
editorAppearance: editorAppearance
|
|
40
36
|
};
|
|
41
|
-
}
|
|
42
|
-
var editorViewMode = useSharedPluginStateSelector(api, 'editorViewMode.mode');
|
|
43
|
-
var editorToolbarDockingPreference = useSharedPluginStateSelector(api, 'userPreferences.preferences.toolbarDockingPosition');
|
|
44
|
-
var _useEditorToolbar2 = useEditorToolbar(),
|
|
45
|
-
editorAppearance = _useEditorToolbar2.editorAppearance;
|
|
46
|
-
return {
|
|
47
|
-
editorViewMode: editorViewMode,
|
|
48
|
-
editorToolbarDockingPreference: editorToolbarDockingPreference,
|
|
49
|
-
editorAppearance: editorAppearance
|
|
50
|
-
};
|
|
51
|
-
});
|
|
37
|
+
};
|
|
52
38
|
export var Section = function Section(_ref) {
|
|
53
39
|
var _api$toolbar$actions$, _api$toolbar;
|
|
54
40
|
var children = _ref.children,
|
|
@@ -7,14 +7,12 @@ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks'
|
|
|
7
7
|
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
8
8
|
import { EditorToolbarProvider, EditorToolbarUIProvider, shouldShowSelectionToolbar } from '@atlaskit/editor-common/toolbar';
|
|
9
9
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
10
|
-
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
11
10
|
import { calculateToolbarPositionTrackHead, calculateToolbarPositionOnCellSelection } from '@atlaskit/editor-common/utils';
|
|
12
11
|
import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
|
|
13
12
|
import { AllSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
14
13
|
import { ToolbarSection, ToolbarButtonGroup, ToolbarDropdownItemSection, useToolbarUI } from '@atlaskit/editor-toolbar';
|
|
15
14
|
import { ToolbarModelRenderer } from '@atlaskit/editor-toolbar-model';
|
|
16
15
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
|
-
import { conditionalHooksFactory } from '@atlaskit/platform-feature-flags-react';
|
|
18
16
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
19
17
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
20
18
|
import { SELECTION_TOOLBAR_LABEL } from '../consts';
|
|
@@ -23,9 +21,7 @@ import { getDomRefFromSelection } from './utils';
|
|
|
23
21
|
var isToolbarComponent = function isToolbarComponent(component) {
|
|
24
22
|
return component.type === 'toolbar' && component.key === 'inline-text-toolbar';
|
|
25
23
|
};
|
|
26
|
-
var usePluginState =
|
|
27
|
-
return expValEquals('platform_editor_toolbar_aifc_patch_3', 'isEnabled', true);
|
|
28
|
-
}, function (api) {
|
|
24
|
+
var usePluginState = function usePluginState(api) {
|
|
29
25
|
return useSharedPluginStateWithSelector(api, ['connectivity', 'userPreferences', 'toolbar', 'selection', 'userIntent', 'editorViewMode'], function (state) {
|
|
30
26
|
var _state$connectivitySt, _state$userPreference, _state$toolbarState, _state$toolbarState2, _state$selectionState, _state$userIntentStat, _state$editorViewMode;
|
|
31
27
|
return {
|
|
@@ -38,30 +34,7 @@ var usePluginState = conditionalHooksFactory(function () {
|
|
|
38
34
|
editorViewMode: (_state$editorViewMode = state.editorViewModeState) === null || _state$editorViewMode === void 0 ? void 0 : _state$editorViewMode.mode
|
|
39
35
|
};
|
|
40
36
|
});
|
|
41
|
-
}
|
|
42
|
-
var connectivityStateMode = useSharedPluginStateSelector(api, 'connectivity.mode');
|
|
43
|
-
var editorToolbarDockingPreference = useSharedPluginStateSelector(api, 'userPreferences.preferences.toolbarDockingPosition');
|
|
44
|
-
var currentUserIntent = useSharedPluginStateSelector(api, 'userIntent.currentUserIntent');
|
|
45
|
-
var selection = useSharedPluginStateSelector(api, 'selection.selection');
|
|
46
|
-
var _useSharedPluginState = useSharedPluginStateWithSelector(api, ['toolbar'], function (state) {
|
|
47
|
-
var _state$toolbarState3, _state$toolbarState4;
|
|
48
|
-
return {
|
|
49
|
-
shouldShowToolbar: (_state$toolbarState3 = state.toolbarState) === null || _state$toolbarState3 === void 0 ? void 0 : _state$toolbarState3.shouldShowToolbar,
|
|
50
|
-
selectedNode: (_state$toolbarState4 = state.toolbarState) === null || _state$toolbarState4 === void 0 ? void 0 : _state$toolbarState4.selectedNode
|
|
51
|
-
};
|
|
52
|
-
}),
|
|
53
|
-
shouldShowToolbar = _useSharedPluginState.shouldShowToolbar,
|
|
54
|
-
selectedNode = _useSharedPluginState.selectedNode;
|
|
55
|
-
return {
|
|
56
|
-
connectivityStateMode: connectivityStateMode,
|
|
57
|
-
editorToolbarDockingPreference: editorToolbarDockingPreference,
|
|
58
|
-
currentUserIntent: currentUserIntent,
|
|
59
|
-
shouldShowToolbar: shouldShowToolbar,
|
|
60
|
-
selection: selection,
|
|
61
|
-
editorViewMode: undefined,
|
|
62
|
-
selectedNode: selectedNode
|
|
63
|
-
};
|
|
64
|
-
});
|
|
37
|
+
};
|
|
65
38
|
var useOnPositionCalculated = function useOnPositionCalculated(editorView, cachedCalculateToolbarPosition) {
|
|
66
39
|
var onPositionCalculated = useCallback(function (position) {
|
|
67
40
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-toolbar",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.1",
|
|
4
4
|
"description": "Toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -39,8 +39,7 @@
|
|
|
39
39
|
"@atlaskit/editor-toolbar": "^0.19.0",
|
|
40
40
|
"@atlaskit/editor-toolbar-model": "^0.3.0",
|
|
41
41
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
42
|
-
"@atlaskit/
|
|
43
|
-
"@atlaskit/tmp-editor-statsig": "^16.28.0",
|
|
42
|
+
"@atlaskit/tmp-editor-statsig": "^16.30.0",
|
|
44
43
|
"@babel/runtime": "^7.0.0",
|
|
45
44
|
"bind-event-listener": "^3.0.0",
|
|
46
45
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
@@ -50,9 +49,6 @@
|
|
|
50
49
|
"react": "^18.2.0"
|
|
51
50
|
},
|
|
52
51
|
"platform-feature-flags": {
|
|
53
|
-
"platform_editor_toolbar_aifc_patch_7": {
|
|
54
|
-
"type": "boolean"
|
|
55
|
-
},
|
|
56
52
|
"platform_editor_toolbar_aifc_user_intent_fix": {
|
|
57
53
|
"type": "boolean"
|
|
58
54
|
},
|