@atlaskit/editor-plugin-help-dialog 3.1.7 → 4.0.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 +14 -0
- package/dist/cjs/ui/index.js +4 -15
- package/dist/es2019/ui/index.js +2 -14
- package/dist/esm/ui/index.js +5 -16
- package/package.json +5 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-help-dialog
|
|
2
2
|
|
|
3
|
+
## 4.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 3.1.8
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`a024ea6d25dc1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a024ea6d25dc1) -
|
|
14
|
+
[ED-29106] cleans up usages of sharedPluginStateHookMigratorFactory
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 3.1.7
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/cjs/ui/index.js
CHANGED
|
@@ -30,26 +30,15 @@ var selector = function selector(states) {
|
|
|
30
30
|
aiEnabled: (_states$helpDialogSta3 = states.helpDialogState) === null || _states$helpDialogSta3 === void 0 ? void 0 : _states$helpDialogSta3.aiEnabled
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
|
-
var useSharedState = (0, _hooks.sharedPluginStateHookMigratorFactory)(function (api) {
|
|
34
|
-
return (0, _hooks.useSharedPluginStateWithSelector)(api, ['helpDialog'], selector);
|
|
35
|
-
}, function (api) {
|
|
36
|
-
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(api, ['helpDialog']),
|
|
37
|
-
helpDialogState = _useSharedPluginState.helpDialogState;
|
|
38
|
-
return {
|
|
39
|
-
isVisible: helpDialogState === null || helpDialogState === void 0 ? void 0 : helpDialogState.isVisible,
|
|
40
|
-
imageEnabled: helpDialogState === null || helpDialogState === void 0 ? void 0 : helpDialogState.imageEnabled,
|
|
41
|
-
aiEnabled: helpDialogState === null || helpDialogState === void 0 ? void 0 : helpDialogState.aiEnabled
|
|
42
|
-
};
|
|
43
|
-
});
|
|
44
33
|
var HelpDialog = function HelpDialog(_ref) {
|
|
45
34
|
var pluginInjectionApi = _ref.pluginInjectionApi,
|
|
46
35
|
editorView = _ref.editorView,
|
|
47
36
|
quickInsertEnabled = _ref.quickInsertEnabled,
|
|
48
37
|
intl = _ref.intl;
|
|
49
|
-
var
|
|
50
|
-
isVisible =
|
|
51
|
-
imageEnabled =
|
|
52
|
-
aiEnabled =
|
|
38
|
+
var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(pluginInjectionApi, ['helpDialog'], selector),
|
|
39
|
+
isVisible = _useSharedPluginState.isVisible,
|
|
40
|
+
imageEnabled = _useSharedPluginState.imageEnabled,
|
|
41
|
+
aiEnabled = _useSharedPluginState.aiEnabled;
|
|
53
42
|
var closeDialog = (0, _react.useCallback)(function () {
|
|
54
43
|
var tr = editorView.state.tr,
|
|
55
44
|
dispatch = editorView.dispatch;
|
package/dist/es2019/ui/index.js
CHANGED
|
@@ -7,7 +7,7 @@ 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 {
|
|
10
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
11
11
|
import AkModalDialog, { ModalTransition } from '@atlaskit/modal-dialog';
|
|
12
12
|
import { closeHelpCommand } from '../pm-plugins/commands';
|
|
13
13
|
import { getSupportedFormatting } from './formatting';
|
|
@@ -20,18 +20,6 @@ const selector = states => {
|
|
|
20
20
|
aiEnabled: (_states$helpDialogSta3 = states.helpDialogState) === null || _states$helpDialogSta3 === void 0 ? void 0 : _states$helpDialogSta3.aiEnabled
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
|
-
const useSharedState = sharedPluginStateHookMigratorFactory(api => {
|
|
24
|
-
return useSharedPluginStateWithSelector(api, ['helpDialog'], selector);
|
|
25
|
-
}, api => {
|
|
26
|
-
const {
|
|
27
|
-
helpDialogState
|
|
28
|
-
} = useSharedPluginState(api, ['helpDialog']);
|
|
29
|
-
return {
|
|
30
|
-
isVisible: helpDialogState === null || helpDialogState === void 0 ? void 0 : helpDialogState.isVisible,
|
|
31
|
-
imageEnabled: helpDialogState === null || helpDialogState === void 0 ? void 0 : helpDialogState.imageEnabled,
|
|
32
|
-
aiEnabled: helpDialogState === null || helpDialogState === void 0 ? void 0 : helpDialogState.aiEnabled
|
|
33
|
-
};
|
|
34
|
-
});
|
|
35
23
|
const HelpDialog = ({
|
|
36
24
|
pluginInjectionApi,
|
|
37
25
|
editorView,
|
|
@@ -42,7 +30,7 @@ const HelpDialog = ({
|
|
|
42
30
|
isVisible,
|
|
43
31
|
imageEnabled,
|
|
44
32
|
aiEnabled
|
|
45
|
-
} =
|
|
33
|
+
} = useSharedPluginStateWithSelector(pluginInjectionApi, ['helpDialog'], selector);
|
|
46
34
|
const closeDialog = useCallback(() => {
|
|
47
35
|
const {
|
|
48
36
|
state: {
|
package/dist/esm/ui/index.js
CHANGED
|
@@ -7,7 +7,7 @@ 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 {
|
|
10
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
11
11
|
import AkModalDialog, { ModalTransition } from '@atlaskit/modal-dialog';
|
|
12
12
|
import { closeHelpCommand } from '../pm-plugins/commands';
|
|
13
13
|
import { getSupportedFormatting } from './formatting';
|
|
@@ -20,26 +20,15 @@ var selector = function selector(states) {
|
|
|
20
20
|
aiEnabled: (_states$helpDialogSta3 = states.helpDialogState) === null || _states$helpDialogSta3 === void 0 ? void 0 : _states$helpDialogSta3.aiEnabled
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
|
-
var useSharedState = sharedPluginStateHookMigratorFactory(function (api) {
|
|
24
|
-
return useSharedPluginStateWithSelector(api, ['helpDialog'], selector);
|
|
25
|
-
}, function (api) {
|
|
26
|
-
var _useSharedPluginState = useSharedPluginState(api, ['helpDialog']),
|
|
27
|
-
helpDialogState = _useSharedPluginState.helpDialogState;
|
|
28
|
-
return {
|
|
29
|
-
isVisible: helpDialogState === null || helpDialogState === void 0 ? void 0 : helpDialogState.isVisible,
|
|
30
|
-
imageEnabled: helpDialogState === null || helpDialogState === void 0 ? void 0 : helpDialogState.imageEnabled,
|
|
31
|
-
aiEnabled: helpDialogState === null || helpDialogState === void 0 ? void 0 : helpDialogState.aiEnabled
|
|
32
|
-
};
|
|
33
|
-
});
|
|
34
23
|
var HelpDialog = function HelpDialog(_ref) {
|
|
35
24
|
var pluginInjectionApi = _ref.pluginInjectionApi,
|
|
36
25
|
editorView = _ref.editorView,
|
|
37
26
|
quickInsertEnabled = _ref.quickInsertEnabled,
|
|
38
27
|
intl = _ref.intl;
|
|
39
|
-
var
|
|
40
|
-
isVisible =
|
|
41
|
-
imageEnabled =
|
|
42
|
-
aiEnabled =
|
|
28
|
+
var _useSharedPluginState = useSharedPluginStateWithSelector(pluginInjectionApi, ['helpDialog'], selector),
|
|
29
|
+
isVisible = _useSharedPluginState.isVisible,
|
|
30
|
+
imageEnabled = _useSharedPluginState.imageEnabled,
|
|
31
|
+
aiEnabled = _useSharedPluginState.aiEnabled;
|
|
43
32
|
var closeDialog = useCallback(function () {
|
|
44
33
|
var tr = editorView.state.tr,
|
|
45
34
|
dispatch = editorView.dispatch;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-help-dialog",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Help Dialog plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -28,12 +28,9 @@
|
|
|
28
28
|
"*.compiled.css"
|
|
29
29
|
],
|
|
30
30
|
"atlaskit:src": "src/index.ts",
|
|
31
|
-
"af:exports": {
|
|
32
|
-
".": "./src/index.ts"
|
|
33
|
-
},
|
|
34
31
|
"dependencies": {
|
|
35
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
36
|
-
"@atlaskit/editor-plugin-quick-insert": "^
|
|
32
|
+
"@atlaskit/editor-plugin-analytics": "^4.0.0",
|
|
33
|
+
"@atlaskit/editor-plugin-quick-insert": "^4.0.0",
|
|
37
34
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
38
35
|
"@atlaskit/editor-shared-styles": "^3.6.0",
|
|
39
36
|
"@atlaskit/heading": "^5.2.0",
|
|
@@ -42,7 +39,7 @@
|
|
|
42
39
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
43
40
|
"@atlaskit/primitives": "^14.12.0",
|
|
44
41
|
"@atlaskit/theme": "^20.0.0",
|
|
45
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
42
|
+
"@atlaskit/tmp-editor-statsig": "^12.0.0",
|
|
46
43
|
"@atlaskit/tokens": "^6.1.0",
|
|
47
44
|
"@babel/runtime": "^7.0.0",
|
|
48
45
|
"@emotion/react": "^11.7.1",
|
|
@@ -53,7 +50,7 @@
|
|
|
53
50
|
"@testing-library/react": "^13.4.0"
|
|
54
51
|
},
|
|
55
52
|
"peerDependencies": {
|
|
56
|
-
"@atlaskit/editor-common": "^
|
|
53
|
+
"@atlaskit/editor-common": "^108.0.0",
|
|
57
54
|
"react": "^18.2.0"
|
|
58
55
|
},
|
|
59
56
|
"techstack": {
|