@atlaskit/editor-plugin-type-ahead 2.0.1 → 2.0.2
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 +10 -0
- package/dist/cjs/pm-plugins/decorations.js +1 -1
- package/dist/cjs/ui/ContentComponent.js +1 -1
- package/dist/cjs/ui/InputQuery.js +1 -1
- package/dist/es2019/pm-plugins/decorations.js +1 -1
- package/dist/es2019/ui/ContentComponent.js +1 -1
- package/dist/es2019/ui/InputQuery.js +1 -1
- package/dist/esm/pm-plugins/decorations.js +1 -1
- package/dist/esm/ui/ContentComponent.js +1 -1
- package/dist/esm/ui/InputQuery.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-type-ahead
|
|
2
2
|
|
|
3
|
+
## 2.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#120426](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/120426)
|
|
8
|
+
[`1fc7b1519dbcf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1fc7b1519dbcf) -
|
|
9
|
+
Uses a separate FF for the new QuickInsert and Right rail to split them from the other Editor
|
|
10
|
+
Controls features.
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 2.0.1
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -63,7 +63,7 @@ var factoryDecorations = exports.factoryDecorations = function factoryDecoration
|
|
|
63
63
|
typeaheadComponent.dataset.typeAhead = _constants.TYPE_AHEAD_DECORATION_DATA_ATTRIBUTE;
|
|
64
64
|
typeaheadComponent.style.color = "var(--ds-text-accent-blue, ".concat(_colors.B400, ")");
|
|
65
65
|
typeaheadComponent.style.backgroundColor = 'transparent';
|
|
66
|
-
if ((0, _experiments.editorExperiment)('
|
|
66
|
+
if ((0, _experiments.editorExperiment)('platform_editor_insertion', 'variant1')) {
|
|
67
67
|
// As part of controls work, we add placeholder `Search` to quick insert command
|
|
68
68
|
// This style is to prevent `/Search` being wrapped if it's triggered at the end of the line
|
|
69
69
|
typeaheadComponent.style.whiteSpace = 'nowrap';
|
|
@@ -23,7 +23,7 @@ function ContentComponent(_ref) {
|
|
|
23
23
|
}
|
|
24
24
|
if (
|
|
25
25
|
// TODO: Also requires a check for editor appearance (needs to be enabled for full-page/full-width editor only ?)
|
|
26
|
-
!(0, _experiments.editorExperiment)('
|
|
26
|
+
!(0, _experiments.editorExperiment)('platform_editor_insertion', 'control') && ((_typeAheadState$trigg = typeAheadState.triggerHandler) === null || _typeAheadState$trigg === void 0 ? void 0 : _typeAheadState$trigg.id) === _typeAhead.TypeAheadAvailableNodes.QUICK_INSERT) {
|
|
27
27
|
return /*#__PURE__*/_react.default.createElement(_TypeAheadMenu.TypeAheadMenu, {
|
|
28
28
|
editorView: editorView,
|
|
29
29
|
popupMountRef: popupMountRef,
|
|
@@ -108,7 +108,7 @@ var InputQuery = exports.InputQuery = /*#__PURE__*/_react.default.memo(function
|
|
|
108
108
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
109
109
|
query = _useState2[0],
|
|
110
110
|
setQuery = _useState2[1];
|
|
111
|
-
var isEditorControlsEnabled = (0, _experiments.editorExperiment)('
|
|
111
|
+
var isEditorControlsEnabled = (0, _experiments.editorExperiment)('platform_editor_insertion', 'variant1');
|
|
112
112
|
var _useState3 = (0, _react.useState)(isEditorControlsEnabled && triggerQueryPrefix === '/'),
|
|
113
113
|
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
114
114
|
showPlaceholder = _useState4[0],
|
|
@@ -62,7 +62,7 @@ export const factoryDecorations = ({
|
|
|
62
62
|
typeaheadComponent.dataset.typeAhead = TYPE_AHEAD_DECORATION_DATA_ATTRIBUTE;
|
|
63
63
|
typeaheadComponent.style.color = `var(--ds-text-accent-blue, ${B400})`;
|
|
64
64
|
typeaheadComponent.style.backgroundColor = 'transparent';
|
|
65
|
-
if (editorExperiment('
|
|
65
|
+
if (editorExperiment('platform_editor_insertion', 'variant1')) {
|
|
66
66
|
// As part of controls work, we add placeholder `Search` to quick insert command
|
|
67
67
|
// This style is to prevent `/Search` being wrapped if it's triggered at the end of the line
|
|
68
68
|
typeaheadComponent.style.whiteSpace = 'nowrap';
|
|
@@ -18,7 +18,7 @@ export function ContentComponent({
|
|
|
18
18
|
}
|
|
19
19
|
if (
|
|
20
20
|
// TODO: Also requires a check for editor appearance (needs to be enabled for full-page/full-width editor only ?)
|
|
21
|
-
!editorExperiment('
|
|
21
|
+
!editorExperiment('platform_editor_insertion', 'control') && ((_typeAheadState$trigg = typeAheadState.triggerHandler) === null || _typeAheadState$trigg === void 0 ? void 0 : _typeAheadState$trigg.id) === TypeAheadAvailableNodes.QUICK_INSERT) {
|
|
22
22
|
return /*#__PURE__*/React.createElement(TypeAheadMenuModern, {
|
|
23
23
|
editorView: editorView,
|
|
24
24
|
popupMountRef: popupMountRef,
|
|
@@ -94,7 +94,7 @@ export const InputQuery = /*#__PURE__*/React.memo(({
|
|
|
94
94
|
const ref = useRef(document.createElement('span'));
|
|
95
95
|
const inputRef = useRef(null);
|
|
96
96
|
const [query, setQuery] = useState(null);
|
|
97
|
-
const isEditorControlsEnabled = editorExperiment('
|
|
97
|
+
const isEditorControlsEnabled = editorExperiment('platform_editor_insertion', 'variant1');
|
|
98
98
|
const [showPlaceholder, setShowPlaceholder] = useState(isEditorControlsEnabled && triggerQueryPrefix === '/');
|
|
99
99
|
const cleanedInputContent = useCallback(() => {
|
|
100
100
|
var _ref$current;
|
|
@@ -56,7 +56,7 @@ export var factoryDecorations = function factoryDecorations(_ref) {
|
|
|
56
56
|
typeaheadComponent.dataset.typeAhead = TYPE_AHEAD_DECORATION_DATA_ATTRIBUTE;
|
|
57
57
|
typeaheadComponent.style.color = "var(--ds-text-accent-blue, ".concat(B400, ")");
|
|
58
58
|
typeaheadComponent.style.backgroundColor = 'transparent';
|
|
59
|
-
if (editorExperiment('
|
|
59
|
+
if (editorExperiment('platform_editor_insertion', 'variant1')) {
|
|
60
60
|
// As part of controls work, we add placeholder `Search` to quick insert command
|
|
61
61
|
// This style is to prevent `/Search` being wrapped if it's triggered at the end of the line
|
|
62
62
|
typeaheadComponent.style.whiteSpace = 'nowrap';
|
|
@@ -16,7 +16,7 @@ export function ContentComponent(_ref) {
|
|
|
16
16
|
}
|
|
17
17
|
if (
|
|
18
18
|
// TODO: Also requires a check for editor appearance (needs to be enabled for full-page/full-width editor only ?)
|
|
19
|
-
!editorExperiment('
|
|
19
|
+
!editorExperiment('platform_editor_insertion', 'control') && ((_typeAheadState$trigg = typeAheadState.triggerHandler) === null || _typeAheadState$trigg === void 0 ? void 0 : _typeAheadState$trigg.id) === TypeAheadAvailableNodes.QUICK_INSERT) {
|
|
20
20
|
return /*#__PURE__*/React.createElement(TypeAheadMenuModern, {
|
|
21
21
|
editorView: editorView,
|
|
22
22
|
popupMountRef: popupMountRef,
|
|
@@ -97,7 +97,7 @@ export var InputQuery = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
97
97
|
_useState2 = _slicedToArray(_useState, 2),
|
|
98
98
|
query = _useState2[0],
|
|
99
99
|
setQuery = _useState2[1];
|
|
100
|
-
var isEditorControlsEnabled = editorExperiment('
|
|
100
|
+
var isEditorControlsEnabled = editorExperiment('platform_editor_insertion', 'variant1');
|
|
101
101
|
var _useState3 = useState(isEditorControlsEnabled && triggerQueryPrefix === '/'),
|
|
102
102
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
103
103
|
showPlaceholder = _useState4[0],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-type-ahead",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "Type-ahead plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@atlaskit/editor-plugin-connectivity": "^2.0.0",
|
|
39
39
|
"@atlaskit/editor-plugin-context-panel": "^3.0.0",
|
|
40
40
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
41
|
-
"@atlaskit/editor-shared-styles": "^3.
|
|
41
|
+
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
42
42
|
"@atlaskit/heading": "^5.1.0",
|
|
43
43
|
"@atlaskit/icon": "^24.1.0",
|
|
44
44
|
"@atlaskit/menu": "^3.1.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@atlaskit/primitives": "^14.1.0",
|
|
47
47
|
"@atlaskit/prosemirror-input-rules": "^3.3.0",
|
|
48
48
|
"@atlaskit/theme": "^17.0.0",
|
|
49
|
-
"@atlaskit/tmp-editor-statsig": "^3.
|
|
49
|
+
"@atlaskit/tmp-editor-statsig": "^3.3.0",
|
|
50
50
|
"@atlaskit/tokens": "^4.2.0",
|
|
51
51
|
"@babel/runtime": "^7.0.0",
|
|
52
52
|
"@emotion/react": "^11.7.1",
|