@atlaskit/editor-plugin-quick-insert 21.0.0 → 21.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
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-quick-insert
|
|
2
2
|
|
|
3
|
+
## 21.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 21.1.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`d13ba24ba86e8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d13ba24ba86e8) -
|
|
14
|
+
Add optional editorViewMode dependency and hide the block control quick insert button in view mode
|
|
15
|
+
when platform_editor_block_control_migration is enabled
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 21.0.0
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -23,10 +23,11 @@ var getBlockControlQuickInsertComponents = exports.getBlockControlQuickInsertCom
|
|
|
23
23
|
rank: 100
|
|
24
24
|
})],
|
|
25
25
|
isHidden: function isHidden() {
|
|
26
|
+
var _api$editorViewMode;
|
|
26
27
|
var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
27
28
|
surfaceContext = _ref2.surfaceContext;
|
|
28
29
|
var context = surfaceContext === null || surfaceContext === void 0 ? void 0 : surfaceContext.get(_blockControlUiContext.BLOCK_CONTROL_UI_CONTEXT);
|
|
29
|
-
return !(context !== null && context !== void 0 && context.activeNode) || context.targetNode.pos !== context.rootNode.pos || context.targetNode.pos !== context.activeNode.rootPos;
|
|
30
|
+
return (api === null || api === void 0 || (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 || (_api$editorViewMode = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.mode) === 'view' || !(context !== null && context !== void 0 && context.activeNode) || context.targetNode.pos !== context.rootNode.pos || context.targetNode.pos !== context.activeNode.rootPos;
|
|
30
31
|
},
|
|
31
32
|
component: function component(_ref3) {
|
|
32
33
|
var _context$activeNode;
|
|
@@ -16,8 +16,9 @@ export const getBlockControlQuickInsertComponents = ({
|
|
|
16
16
|
isHidden: ({
|
|
17
17
|
surfaceContext
|
|
18
18
|
} = {}) => {
|
|
19
|
+
var _api$editorViewMode, _api$editorViewMode$s;
|
|
19
20
|
const context = surfaceContext === null || surfaceContext === void 0 ? void 0 : surfaceContext.get(BLOCK_CONTROL_UI_CONTEXT);
|
|
20
|
-
return !(context !== null && context !== void 0 && context.activeNode) || context.targetNode.pos !== context.rootNode.pos || context.targetNode.pos !== context.activeNode.rootPos;
|
|
21
|
+
return (api === null || api === void 0 ? void 0 : (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 ? void 0 : (_api$editorViewMode$s = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode$s === void 0 ? void 0 : _api$editorViewMode$s.mode) === 'view' || !(context !== null && context !== void 0 && context.activeNode) || context.targetNode.pos !== context.rootNode.pos || context.targetNode.pos !== context.activeNode.rootPos;
|
|
21
22
|
},
|
|
22
23
|
component: ({
|
|
23
24
|
surfaceContext
|
|
@@ -16,10 +16,11 @@ export var getBlockControlQuickInsertComponents = function getBlockControlQuickI
|
|
|
16
16
|
rank: 100
|
|
17
17
|
})],
|
|
18
18
|
isHidden: function isHidden() {
|
|
19
|
+
var _api$editorViewMode;
|
|
19
20
|
var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
20
21
|
surfaceContext = _ref2.surfaceContext;
|
|
21
22
|
var context = surfaceContext === null || surfaceContext === void 0 ? void 0 : surfaceContext.get(BLOCK_CONTROL_UI_CONTEXT);
|
|
22
|
-
return !(context !== null && context !== void 0 && context.activeNode) || context.targetNode.pos !== context.rootNode.pos || context.targetNode.pos !== context.activeNode.rootPos;
|
|
23
|
+
return (api === null || api === void 0 || (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 || (_api$editorViewMode = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.mode) === 'view' || !(context !== null && context !== void 0 && context.activeNode) || context.targetNode.pos !== context.rootNode.pos || context.targetNode.pos !== context.activeNode.rootPos;
|
|
23
24
|
},
|
|
24
25
|
component: function component(_ref3) {
|
|
25
26
|
var _context$activeNode;
|
|
@@ -3,6 +3,7 @@ import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
|
|
|
3
3
|
import type { Command, QuickInsertPluginOptions as CommonQuickInsertPluginOptions, QuickInsertSharedState as CommonQuickInsertSharedState, EditorCommand, NextEditorPlugin, OptionalPlugin, QuickInsertHandler, QuickInsertSearchOptions, TypeAheadHandler } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
5
5
|
import type { ConnectivityPlugin } from '@atlaskit/editor-plugin-connectivity';
|
|
6
|
+
import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode/editorViewmodePluginType';
|
|
6
7
|
import type { MetricsPlugin } from '@atlaskit/editor-plugin-metrics';
|
|
7
8
|
import type { TypeAheadInputMethod, TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
|
|
8
9
|
import type { UiControlRegistryPlugin } from '@atlaskit/editor-plugin-ui-control-registry/ui-control-registry-plugin-type';
|
|
@@ -40,7 +41,8 @@ export type QuickInsertPlugin = NextEditorPlugin<'quickInsert', {
|
|
|
40
41
|
OptionalPlugin<ConnectivityPlugin>,
|
|
41
42
|
OptionalPlugin<MetricsPlugin>,
|
|
42
43
|
OptionalPlugin<AnalyticsPlugin>,
|
|
43
|
-
OptionalPlugin<UiControlRegistryPlugin
|
|
44
|
+
OptionalPlugin<UiControlRegistryPlugin>,
|
|
45
|
+
OptionalPlugin<EditorViewModePlugin>
|
|
44
46
|
];
|
|
45
47
|
pluginConfiguration: QuickInsertPluginOptions | undefined;
|
|
46
48
|
sharedState: QuickInsertSharedState | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-quick-insert",
|
|
3
|
-
"version": "21.
|
|
3
|
+
"version": "21.1.1",
|
|
4
4
|
"description": "Quick insert plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"@atlaskit/css": "^1.1.0",
|
|
31
31
|
"@atlaskit/editor-plugin-analytics": "^21.0.0",
|
|
32
32
|
"@atlaskit/editor-plugin-connectivity": "^21.0.0",
|
|
33
|
+
"@atlaskit/editor-plugin-editor-viewmode": "^23.0.0",
|
|
33
34
|
"@atlaskit/editor-plugin-metrics": "^22.0.0",
|
|
34
35
|
"@atlaskit/editor-plugin-type-ahead": "^22.0.0",
|
|
35
36
|
"@atlaskit/editor-plugin-ui-control-registry": "^15.0.0",
|
|
@@ -43,7 +44,7 @@
|
|
|
43
44
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
44
45
|
"@atlaskit/primitives": "^22.5.0",
|
|
45
46
|
"@atlaskit/textfield": "^10.2.0",
|
|
46
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
47
|
+
"@atlaskit/tmp-editor-statsig": "^207.0.0",
|
|
47
48
|
"@atlaskit/tokens": "^20.0.0",
|
|
48
49
|
"@atlaskit/tooltip": "^24.3.0",
|
|
49
50
|
"@babel/runtime": "^7.0.0",
|
|
@@ -51,7 +52,7 @@
|
|
|
51
52
|
"@emotion/react": "^11.7.1"
|
|
52
53
|
},
|
|
53
54
|
"peerDependencies": {
|
|
54
|
-
"@atlaskit/editor-common": "^125.
|
|
55
|
+
"@atlaskit/editor-common": "^125.2.0",
|
|
55
56
|
"react": "^18.2.0 || ^19.2.0",
|
|
56
57
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
57
58
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|