@atlaskit/editor-plugin-panel 4.3.8 → 4.4.0
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,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-panel
|
|
2
2
|
|
|
3
|
+
## 4.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#150819](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/150819)
|
|
8
|
+
[`fc0d378df7ab1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/fc0d378df7ab1) -
|
|
9
|
+
Used plugin selector conditionally behind feature flag
|
|
10
|
+
|
|
11
|
+
## 4.3.9
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 4.3.8
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -14,6 +14,7 @@ var _emoji = require("@atlaskit/editor-common/emoji");
|
|
|
14
14
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
15
15
|
var _icons = require("@atlaskit/editor-common/icons");
|
|
16
16
|
var _panel = require("@atlaskit/editor-common/panel");
|
|
17
|
+
var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
|
|
17
18
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
18
19
|
var _consts = require("@atlaskit/editor-shared-styles/consts");
|
|
19
20
|
var _lightbulbEditorHint = _interopRequireDefault(require("@atlaskit/icon/core/migration/lightbulb--editor-hint"));
|
|
@@ -31,11 +32,14 @@ var panelIcons = exports.panelIcons = {
|
|
|
31
32
|
};
|
|
32
33
|
/* eslint-enable @atlaskit/editor/no-re-export */
|
|
33
34
|
|
|
34
|
-
var useEmojiProvider = function
|
|
35
|
-
var
|
|
35
|
+
var useEmojiProvider = (0, _hooks.sharedPluginStateHookMigratorFactory)(function (api) {
|
|
36
|
+
var emojiProvider = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'emoji.emojiProvider');
|
|
37
|
+
return emojiProvider;
|
|
38
|
+
}, function (api) {
|
|
39
|
+
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(api, ['emoji']),
|
|
36
40
|
emojiState = _useSharedPluginState.emojiState;
|
|
37
41
|
return emojiState === null || emojiState === void 0 ? void 0 : emojiState.emojiProvider;
|
|
38
|
-
};
|
|
42
|
+
});
|
|
39
43
|
var PanelIcon = exports.PanelIcon = function PanelIcon(props) {
|
|
40
44
|
var allowCustomPanel = props.allowCustomPanel,
|
|
41
45
|
providerFactory = props.providerFactory,
|
|
@@ -2,9 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import uuid from 'uuid/v4';
|
|
3
3
|
import { PanelType } from '@atlaskit/adf-schema';
|
|
4
4
|
import { Emoji } from '@atlaskit/editor-common/emoji';
|
|
5
|
-
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
5
|
+
import { useSharedPluginState, sharedPluginStateHookMigratorFactory } from '@atlaskit/editor-common/hooks';
|
|
6
6
|
import { PanelErrorIcon, PanelInfoIcon, PanelNoteIcon, PanelSuccessIcon, PanelWarningIcon } from '@atlaskit/editor-common/icons';
|
|
7
7
|
import { PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
|
|
8
|
+
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
8
9
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
9
10
|
import { akEditorCustomIconSize } from '@atlaskit/editor-shared-styles/consts';
|
|
10
11
|
import LightbulbIcon from '@atlaskit/icon/core/migration/lightbulb--editor-hint';
|
|
@@ -23,12 +24,15 @@ export const panelIcons = {
|
|
|
23
24
|
};
|
|
24
25
|
/* eslint-enable @atlaskit/editor/no-re-export */
|
|
25
26
|
|
|
26
|
-
const useEmojiProvider =
|
|
27
|
+
const useEmojiProvider = sharedPluginStateHookMigratorFactory(api => {
|
|
28
|
+
const emojiProvider = useSharedPluginStateSelector(api, 'emoji.emojiProvider');
|
|
29
|
+
return emojiProvider;
|
|
30
|
+
}, api => {
|
|
27
31
|
const {
|
|
28
32
|
emojiState
|
|
29
|
-
} = useSharedPluginState(
|
|
33
|
+
} = useSharedPluginState(api, ['emoji']);
|
|
30
34
|
return emojiState === null || emojiState === void 0 ? void 0 : emojiState.emojiProvider;
|
|
31
|
-
};
|
|
35
|
+
});
|
|
32
36
|
export const PanelIcon = props => {
|
|
33
37
|
const {
|
|
34
38
|
allowCustomPanel,
|
|
@@ -4,9 +4,10 @@ import React from 'react';
|
|
|
4
4
|
import uuid from 'uuid/v4';
|
|
5
5
|
import { PanelType } from '@atlaskit/adf-schema';
|
|
6
6
|
import { Emoji } from '@atlaskit/editor-common/emoji';
|
|
7
|
-
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
7
|
+
import { useSharedPluginState, sharedPluginStateHookMigratorFactory } from '@atlaskit/editor-common/hooks';
|
|
8
8
|
import { PanelErrorIcon, PanelInfoIcon, PanelNoteIcon, PanelSuccessIcon, PanelWarningIcon } from '@atlaskit/editor-common/icons';
|
|
9
9
|
import { PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
|
|
10
|
+
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
10
11
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
11
12
|
import { akEditorCustomIconSize } from '@atlaskit/editor-shared-styles/consts';
|
|
12
13
|
import LightbulbIcon from '@atlaskit/icon/core/migration/lightbulb--editor-hint';
|
|
@@ -25,11 +26,14 @@ export var panelIcons = {
|
|
|
25
26
|
};
|
|
26
27
|
/* eslint-enable @atlaskit/editor/no-re-export */
|
|
27
28
|
|
|
28
|
-
var useEmojiProvider = function
|
|
29
|
-
var
|
|
29
|
+
var useEmojiProvider = sharedPluginStateHookMigratorFactory(function (api) {
|
|
30
|
+
var emojiProvider = useSharedPluginStateSelector(api, 'emoji.emojiProvider');
|
|
31
|
+
return emojiProvider;
|
|
32
|
+
}, function (api) {
|
|
33
|
+
var _useSharedPluginState = useSharedPluginState(api, ['emoji']),
|
|
30
34
|
emojiState = _useSharedPluginState.emojiState;
|
|
31
35
|
return emojiState === null || emojiState === void 0 ? void 0 : emojiState.emojiProvider;
|
|
32
|
-
};
|
|
36
|
+
});
|
|
33
37
|
export var PanelIcon = function PanelIcon(props) {
|
|
34
38
|
var allowCustomPanel = props.allowCustomPanel,
|
|
35
39
|
providerFactory = props.providerFactory,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-panel",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"description": "Panel plugin for @atlaskit/editor-core.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@atlaskit/adf-schema": "^47.6.0",
|
|
35
|
-
"@atlaskit/editor-common": "^104.
|
|
35
|
+
"@atlaskit/editor-common": "^104.1.0",
|
|
36
36
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
37
37
|
"@atlaskit/editor-plugin-analytics": "^2.2.0",
|
|
38
38
|
"@atlaskit/editor-plugin-decorations": "^2.0.0",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
41
41
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
42
42
|
"@atlaskit/emoji": "^69.1.0",
|
|
43
|
-
"@atlaskit/icon": "^
|
|
43
|
+
"@atlaskit/icon": "^26.0.0",
|
|
44
44
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
45
45
|
"@atlaskit/theme": "^18.0.0",
|
|
46
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
46
|
+
"@atlaskit/tmp-editor-statsig": "^4.19.0",
|
|
47
47
|
"@atlaskit/tokens": "^4.8.0",
|
|
48
48
|
"@babel/runtime": "^7.0.0",
|
|
49
49
|
"uuid": "^3.1.0"
|