@atlaskit/editor-plugin-help-dialog 3.0.1 → 3.0.3
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 +14 -0
- package/dist/cjs/ui/index.js +8 -8
- package/dist/es2019/ui/index.js +9 -9
- package/dist/esm/ui/index.js +9 -9
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-help-dialog
|
|
2
2
|
|
|
3
|
+
## 3.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 3.0.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#182839](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/182839)
|
|
14
|
+
[`81f1c3383bdab`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/81f1c3383bdab) -
|
|
15
|
+
refactor: use useSharedPluginStateWithSelector instead of useSharedPluginStateSelector
|
|
16
|
+
|
|
3
17
|
## 3.0.1
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/cjs/ui/index.js
CHANGED
|
@@ -10,7 +10,6 @@ var _react = require("react");
|
|
|
10
10
|
var _react2 = require("@emotion/react");
|
|
11
11
|
var _reactIntlNext = require("react-intl-next");
|
|
12
12
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
13
|
-
var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
|
|
14
13
|
var _modalDialog = _interopRequireWildcard(require("@atlaskit/modal-dialog"));
|
|
15
14
|
var _commands = require("../pm-plugins/commands");
|
|
16
15
|
var _formatting = require("./formatting");
|
|
@@ -23,15 +22,16 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
23
22
|
|
|
24
23
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
25
24
|
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
var imageEnabled = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'helpDialog.imageEnabled');
|
|
29
|
-
var aiEnabled = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'helpDialog.aiEnabled');
|
|
25
|
+
var selector = function selector(states) {
|
|
26
|
+
var _states$helpDialogSta, _states$helpDialogSta2, _states$helpDialogSta3;
|
|
30
27
|
return {
|
|
31
|
-
isVisible: isVisible,
|
|
32
|
-
imageEnabled: imageEnabled,
|
|
33
|
-
aiEnabled: aiEnabled
|
|
28
|
+
isVisible: (_states$helpDialogSta = states.helpDialogState) === null || _states$helpDialogSta === void 0 ? void 0 : _states$helpDialogSta.isVisible,
|
|
29
|
+
imageEnabled: (_states$helpDialogSta2 = states.helpDialogState) === null || _states$helpDialogSta2 === void 0 ? void 0 : _states$helpDialogSta2.imageEnabled,
|
|
30
|
+
aiEnabled: (_states$helpDialogSta3 = states.helpDialogState) === null || _states$helpDialogSta3 === void 0 ? void 0 : _states$helpDialogSta3.aiEnabled
|
|
34
31
|
};
|
|
32
|
+
};
|
|
33
|
+
var useSharedState = (0, _hooks.sharedPluginStateHookMigratorFactory)(function (api) {
|
|
34
|
+
return (0, _hooks.useSharedPluginStateWithSelector)(api, ['helpDialog'], selector);
|
|
35
35
|
}, function (api) {
|
|
36
36
|
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(api, ['helpDialog']),
|
|
37
37
|
helpDialogState = _useSharedPluginState.helpDialogState;
|
package/dist/es2019/ui/index.js
CHANGED
|
@@ -7,21 +7,21 @@ import { useCallback, useEffect } from 'react';
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { jsx } from '@emotion/react';
|
|
9
9
|
import { injectIntl } from 'react-intl-next';
|
|
10
|
-
import { useSharedPluginState, sharedPluginStateHookMigratorFactory } from '@atlaskit/editor-common/hooks';
|
|
11
|
-
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
10
|
+
import { useSharedPluginState, sharedPluginStateHookMigratorFactory, useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
12
11
|
import AkModalDialog, { ModalTransition } from '@atlaskit/modal-dialog';
|
|
13
12
|
import { closeHelpCommand } from '../pm-plugins/commands';
|
|
14
13
|
import { getSupportedFormatting } from './formatting';
|
|
15
14
|
import Modal from './Modal';
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
const imageEnabled = useSharedPluginStateSelector(api, 'helpDialog.imageEnabled');
|
|
19
|
-
const aiEnabled = useSharedPluginStateSelector(api, 'helpDialog.aiEnabled');
|
|
15
|
+
const selector = states => {
|
|
16
|
+
var _states$helpDialogSta, _states$helpDialogSta2, _states$helpDialogSta3;
|
|
20
17
|
return {
|
|
21
|
-
isVisible,
|
|
22
|
-
imageEnabled,
|
|
23
|
-
aiEnabled
|
|
18
|
+
isVisible: (_states$helpDialogSta = states.helpDialogState) === null || _states$helpDialogSta === void 0 ? void 0 : _states$helpDialogSta.isVisible,
|
|
19
|
+
imageEnabled: (_states$helpDialogSta2 = states.helpDialogState) === null || _states$helpDialogSta2 === void 0 ? void 0 : _states$helpDialogSta2.imageEnabled,
|
|
20
|
+
aiEnabled: (_states$helpDialogSta3 = states.helpDialogState) === null || _states$helpDialogSta3 === void 0 ? void 0 : _states$helpDialogSta3.aiEnabled
|
|
24
21
|
};
|
|
22
|
+
};
|
|
23
|
+
const useSharedState = sharedPluginStateHookMigratorFactory(api => {
|
|
24
|
+
return useSharedPluginStateWithSelector(api, ['helpDialog'], selector);
|
|
25
25
|
}, api => {
|
|
26
26
|
const {
|
|
27
27
|
helpDialogState
|
package/dist/esm/ui/index.js
CHANGED
|
@@ -7,21 +7,21 @@ import { useCallback, useEffect } from 'react';
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { jsx } from '@emotion/react';
|
|
9
9
|
import { injectIntl } from 'react-intl-next';
|
|
10
|
-
import { useSharedPluginState, sharedPluginStateHookMigratorFactory } from '@atlaskit/editor-common/hooks';
|
|
11
|
-
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
10
|
+
import { useSharedPluginState, sharedPluginStateHookMigratorFactory, useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
12
11
|
import AkModalDialog, { ModalTransition } from '@atlaskit/modal-dialog';
|
|
13
12
|
import { closeHelpCommand } from '../pm-plugins/commands';
|
|
14
13
|
import { getSupportedFormatting } from './formatting';
|
|
15
14
|
import Modal from './Modal';
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
var imageEnabled = useSharedPluginStateSelector(api, 'helpDialog.imageEnabled');
|
|
19
|
-
var aiEnabled = useSharedPluginStateSelector(api, 'helpDialog.aiEnabled');
|
|
15
|
+
var selector = function selector(states) {
|
|
16
|
+
var _states$helpDialogSta, _states$helpDialogSta2, _states$helpDialogSta3;
|
|
20
17
|
return {
|
|
21
|
-
isVisible: isVisible,
|
|
22
|
-
imageEnabled: imageEnabled,
|
|
23
|
-
aiEnabled: aiEnabled
|
|
18
|
+
isVisible: (_states$helpDialogSta = states.helpDialogState) === null || _states$helpDialogSta === void 0 ? void 0 : _states$helpDialogSta.isVisible,
|
|
19
|
+
imageEnabled: (_states$helpDialogSta2 = states.helpDialogState) === null || _states$helpDialogSta2 === void 0 ? void 0 : _states$helpDialogSta2.imageEnabled,
|
|
20
|
+
aiEnabled: (_states$helpDialogSta3 = states.helpDialogState) === null || _states$helpDialogSta3 === void 0 ? void 0 : _states$helpDialogSta3.aiEnabled
|
|
24
21
|
};
|
|
22
|
+
};
|
|
23
|
+
var useSharedState = sharedPluginStateHookMigratorFactory(function (api) {
|
|
24
|
+
return useSharedPluginStateWithSelector(api, ['helpDialog'], selector);
|
|
25
25
|
}, function (api) {
|
|
26
26
|
var _useSharedPluginState = useSharedPluginState(api, ['helpDialog']),
|
|
27
27
|
helpDialogState = _useSharedPluginState.helpDialogState;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-help-dialog",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.3",
|
|
4
4
|
"description": "Help Dialog plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"@atlaskit/modal-dialog": "^14.2.0",
|
|
42
42
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
43
43
|
"@atlaskit/primitives": "^14.10.0",
|
|
44
|
-
"@atlaskit/theme": "^
|
|
45
|
-
"@atlaskit/tmp-editor-statsig": "^9.
|
|
44
|
+
"@atlaskit/theme": "^19.0.0",
|
|
45
|
+
"@atlaskit/tmp-editor-statsig": "^9.1.0",
|
|
46
46
|
"@atlaskit/tokens": "^5.4.0",
|
|
47
47
|
"@babel/runtime": "^7.0.0",
|
|
48
48
|
"@emotion/react": "^11.7.1",
|