@atlaskit/editor-plugin-type-ahead 27.0.8 → 28.0.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,26 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-type-ahead
|
|
2
2
|
|
|
3
|
+
## 28.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 28.0.0
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`317175303ec6a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/317175303ec6a) -
|
|
14
|
+
Build the registered quick-insert menu model with `getQuickInsertMenuModel` from
|
|
15
|
+
`@atlaskit/editor-common`.
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
18
|
+
## 27.0.9
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
|
|
3
24
|
## 27.0.8
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -97,13 +97,14 @@ var RegisteredTypeAheadMenu = exports.RegisteredTypeAheadMenu = function Registe
|
|
|
97
97
|
});
|
|
98
98
|
}, [components]);
|
|
99
99
|
var menuModel = (0, _react.useMemo)(function () {
|
|
100
|
-
return
|
|
100
|
+
return (0, _registeredMenuModel.getQuickInsertMenuModel)({
|
|
101
101
|
components: components,
|
|
102
|
-
rootComponent: surface.root,
|
|
103
|
-
query: query,
|
|
104
102
|
formatMessage: formatMessage,
|
|
105
|
-
|
|
106
|
-
|
|
103
|
+
getItemRank: triggerHandler.getRegisteredItemRank,
|
|
104
|
+
query: query,
|
|
105
|
+
rootComponent: surface.root,
|
|
106
|
+
selectCategoryItems: hasSectionOverflowItems && isSlashCommandEnabled ? _registeredMenuModel.selectQuickInsertCategoryItems : undefined,
|
|
107
|
+
surfaceContext: surfaceContext
|
|
107
108
|
});
|
|
108
109
|
}, [components, formatMessage, hasSectionOverflowItems, isSlashCommandEnabled, query, surfaceContext, surface.root, triggerHandler.getRegisteredItemRank]);
|
|
109
110
|
var rows = (0, _react.useMemo)(function () {
|
|
@@ -4,7 +4,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React, { useCallback, useId, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from 'react';
|
|
5
5
|
import { useIntl } from 'react-intl';
|
|
6
6
|
import Popup from '@atlaskit/editor-common/Popup';
|
|
7
|
-
import {
|
|
7
|
+
import { getQuickInsertMenuModel, getQuickInsertMenuRows, selectQuickInsertCategoryItems } from '@atlaskit/editor-common/quick-insert/registered-menu-model';
|
|
8
8
|
import { useMenuPopupSizing } from '@atlaskit/editor-common/quick-insert/use-menu-popup-sizing';
|
|
9
9
|
import { isSectionOverflowItemKey } from '@atlaskit/editor-common/type-ahead-is-section-overflow-item-key';
|
|
10
10
|
import { TYPE_AHEAD_SURFACE_CONTEXT } from '@atlaskit/editor-common/type-ahead-surface-context';
|
|
@@ -73,13 +73,14 @@ export const RegisteredTypeAheadMenu = ({
|
|
|
73
73
|
const hasSectionOverflowItems = useMemo(() => components.some(({
|
|
74
74
|
key
|
|
75
75
|
}) => isSectionOverflowItemKey(key)), [components]);
|
|
76
|
-
const menuModel = useMemo(() =>
|
|
76
|
+
const menuModel = useMemo(() => getQuickInsertMenuModel({
|
|
77
77
|
components,
|
|
78
|
-
rootComponent: surface.root,
|
|
79
|
-
query,
|
|
80
78
|
formatMessage,
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
getItemRank: triggerHandler.getRegisteredItemRank,
|
|
80
|
+
query,
|
|
81
|
+
rootComponent: surface.root,
|
|
82
|
+
selectCategoryItems: hasSectionOverflowItems && isSlashCommandEnabled ? selectQuickInsertCategoryItems : undefined,
|
|
83
|
+
surfaceContext
|
|
83
84
|
}), [components, formatMessage, hasSectionOverflowItems, isSlashCommandEnabled, query, surfaceContext, surface.root, triggerHandler.getRegisteredItemRank]);
|
|
84
85
|
const rows = useMemo(() => getQuickInsertMenuRows(menuModel), [menuModel]);
|
|
85
86
|
const [previewActivation, setPreviewActivation] = useState();
|
|
@@ -5,7 +5,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
5
5
|
import React, { useCallback, useId, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from 'react';
|
|
6
6
|
import { useIntl } from 'react-intl';
|
|
7
7
|
import Popup from '@atlaskit/editor-common/Popup';
|
|
8
|
-
import {
|
|
8
|
+
import { getQuickInsertMenuModel, getQuickInsertMenuRows, selectQuickInsertCategoryItems } from '@atlaskit/editor-common/quick-insert/registered-menu-model';
|
|
9
9
|
import { useMenuPopupSizing } from '@atlaskit/editor-common/quick-insert/use-menu-popup-sizing';
|
|
10
10
|
import { isSectionOverflowItemKey } from '@atlaskit/editor-common/type-ahead-is-section-overflow-item-key';
|
|
11
11
|
import { TYPE_AHEAD_SURFACE_CONTEXT } from '@atlaskit/editor-common/type-ahead-surface-context';
|
|
@@ -88,13 +88,14 @@ export var RegisteredTypeAheadMenu = function RegisteredTypeAheadMenu(_ref) {
|
|
|
88
88
|
});
|
|
89
89
|
}, [components]);
|
|
90
90
|
var menuModel = useMemo(function () {
|
|
91
|
-
return
|
|
91
|
+
return getQuickInsertMenuModel({
|
|
92
92
|
components: components,
|
|
93
|
-
rootComponent: surface.root,
|
|
94
|
-
query: query,
|
|
95
93
|
formatMessage: formatMessage,
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
getItemRank: triggerHandler.getRegisteredItemRank,
|
|
95
|
+
query: query,
|
|
96
|
+
rootComponent: surface.root,
|
|
97
|
+
selectCategoryItems: hasSectionOverflowItems && isSlashCommandEnabled ? selectQuickInsertCategoryItems : undefined,
|
|
98
|
+
surfaceContext: surfaceContext
|
|
98
99
|
});
|
|
99
100
|
}, [components, formatMessage, hasSectionOverflowItems, isSlashCommandEnabled, query, surfaceContext, surface.root, triggerHandler.getRegisteredItemRank]);
|
|
100
101
|
var rows = useMemo(function () {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-type-ahead",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "28.0.1",
|
|
4
4
|
"description": "Type-ahead plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@atlaskit/adf-schema": "^57.7.0",
|
|
25
25
|
"@atlaskit/css": "^1.1.0",
|
|
26
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
27
|
-
"@atlaskit/editor-plugin-connectivity": "^
|
|
28
|
-
"@atlaskit/editor-plugin-context-panel": "^
|
|
29
|
-
"@atlaskit/editor-plugin-metrics": "^
|
|
30
|
-
"@atlaskit/editor-plugin-ui-control-registry": "^
|
|
26
|
+
"@atlaskit/editor-plugin-analytics": "^27.0.0",
|
|
27
|
+
"@atlaskit/editor-plugin-connectivity": "^27.0.0",
|
|
28
|
+
"@atlaskit/editor-plugin-context-panel": "^29.0.0",
|
|
29
|
+
"@atlaskit/editor-plugin-metrics": "^28.0.0",
|
|
30
|
+
"@atlaskit/editor-plugin-ui-control-registry": "^21.0.0",
|
|
31
31
|
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
32
32
|
"@atlaskit/editor-shared-styles": "^4.4.0",
|
|
33
33
|
"@atlaskit/editor-ui-control-model": "^2.10.0",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"@atlaskit/primitives": "^22.5.0",
|
|
43
43
|
"@atlaskit/prosemirror-history": "^1.3.0",
|
|
44
44
|
"@atlaskit/prosemirror-input-rules": "^4.1.0",
|
|
45
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
46
|
-
"@atlaskit/tokens": "^20.
|
|
45
|
+
"@atlaskit/tmp-editor-statsig": "^236.0.0",
|
|
46
|
+
"@atlaskit/tokens": "^20.5.0",
|
|
47
47
|
"@atlaskit/visually-hidden": "^4.4.0",
|
|
48
48
|
"@babel/runtime": "^7.0.0",
|
|
49
49
|
"@emotion/react": "^11.7.1",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"w3c-keyname": "^2.1.8"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@atlaskit/editor-common": "^
|
|
57
|
+
"@atlaskit/editor-common": "^131.0.0",
|
|
58
58
|
"react": "^18.2.0 || ^19.2.0",
|
|
59
59
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
60
60
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|