@atlaskit/editor-plugin-type-ahead 10.1.2 → 10.2.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-type-ahead
|
|
2
2
|
|
|
3
|
+
## 10.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 10.2.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`ad45394a4fed6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ad45394a4fed6) -
|
|
14
|
+
[ux] EDITOR-7171 add panel plugin support for new panel_c1 node variant which can have tables
|
|
15
|
+
nested inside
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 10.1.2
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -8,6 +8,7 @@ var _insert = require("@atlaskit/editor-common/insert");
|
|
|
8
8
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
9
9
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
10
10
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
11
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
11
12
|
function findInsertPoint(doc, pos, nodeToInsert) {
|
|
12
13
|
var $pos = doc.resolve(pos);
|
|
13
14
|
var createInsertPosition = function createInsertPosition(from, to) {
|
|
@@ -84,7 +85,8 @@ var insertBlockNode = exports.insertBlockNode = function insertBlockNode(_ref) {
|
|
|
84
85
|
*/
|
|
85
86
|
var grandParentNodeType = (_tr$selection$$from$n = tr.selection.$from.node(-1)) === null || _tr$selection$$from$n === void 0 ? void 0 : _tr$selection$$from$n.type;
|
|
86
87
|
var ggreatGrandParentNodeType = (_tr$selection$$from$n2 = tr.selection.$from.node(-3)) === null || _tr$selection$$from$n2 === void 0 ? void 0 : _tr$selection$$from$n2.type;
|
|
87
|
-
|
|
88
|
+
var isGGreatGrandParentOfSameType = (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? ggreatGrandParentNodeType && (0, _utils.isNodeOfSameBaseType)(ggreatGrandParentNodeType, node.type) : ggreatGrandParentNodeType === node.type;
|
|
89
|
+
if (grandParentNodeType === listItem && !isGGreatGrandParentOfSameType) {
|
|
88
90
|
return (0, _utils.transformNodeIntoListItem)(tr, nodeNormalized);
|
|
89
91
|
}
|
|
90
92
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { normaliseNestedLayout, safeInsert } from '@atlaskit/editor-common/insert';
|
|
2
|
-
import { transformNodeIntoListItem } from '@atlaskit/editor-common/utils';
|
|
2
|
+
import { isNodeOfSameBaseType, transformNodeIntoListItem } from '@atlaskit/editor-common/utils';
|
|
3
3
|
import { Fragment, Node as PMNode, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
5
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
5
6
|
function findInsertPoint(doc, pos, nodeToInsert) {
|
|
6
7
|
const $pos = doc.resolve(pos);
|
|
7
8
|
const createInsertPosition = (from, to) => ({
|
|
@@ -81,7 +82,8 @@ export const insertBlockNode = ({
|
|
|
81
82
|
*/
|
|
82
83
|
const grandParentNodeType = (_tr$selection$$from$n = tr.selection.$from.node(-1)) === null || _tr$selection$$from$n === void 0 ? void 0 : _tr$selection$$from$n.type;
|
|
83
84
|
const ggreatGrandParentNodeType = (_tr$selection$$from$n2 = tr.selection.$from.node(-3)) === null || _tr$selection$$from$n2 === void 0 ? void 0 : _tr$selection$$from$n2.type;
|
|
84
|
-
|
|
85
|
+
const isGGreatGrandParentOfSameType = expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? ggreatGrandParentNodeType && isNodeOfSameBaseType(ggreatGrandParentNodeType, node.type) : ggreatGrandParentNodeType === node.type;
|
|
86
|
+
if (grandParentNodeType === listItem && !isGGreatGrandParentOfSameType) {
|
|
85
87
|
return transformNodeIntoListItem(tr, nodeNormalized);
|
|
86
88
|
}
|
|
87
89
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { normaliseNestedLayout, safeInsert } from '@atlaskit/editor-common/insert';
|
|
2
|
-
import { transformNodeIntoListItem } from '@atlaskit/editor-common/utils';
|
|
2
|
+
import { isNodeOfSameBaseType, transformNodeIntoListItem } from '@atlaskit/editor-common/utils';
|
|
3
3
|
import { Fragment, Node as PMNode, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
5
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
5
6
|
function findInsertPoint(doc, pos, nodeToInsert) {
|
|
6
7
|
var $pos = doc.resolve(pos);
|
|
7
8
|
var createInsertPosition = function createInsertPosition(from, to) {
|
|
@@ -78,7 +79,8 @@ export var insertBlockNode = function insertBlockNode(_ref) {
|
|
|
78
79
|
*/
|
|
79
80
|
var grandParentNodeType = (_tr$selection$$from$n = tr.selection.$from.node(-1)) === null || _tr$selection$$from$n === void 0 ? void 0 : _tr$selection$$from$n.type;
|
|
80
81
|
var ggreatGrandParentNodeType = (_tr$selection$$from$n2 = tr.selection.$from.node(-3)) === null || _tr$selection$$from$n2 === void 0 ? void 0 : _tr$selection$$from$n2.type;
|
|
81
|
-
|
|
82
|
+
var isGGreatGrandParentOfSameType = expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? ggreatGrandParentNodeType && isNodeOfSameBaseType(ggreatGrandParentNodeType, node.type) : ggreatGrandParentNodeType === node.type;
|
|
83
|
+
if (grandParentNodeType === listItem && !isGGreatGrandParentOfSameType) {
|
|
82
84
|
return transformNodeIntoListItem(tr, nodeNormalized);
|
|
83
85
|
}
|
|
84
86
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-type-ahead",
|
|
3
|
-
"version": "10.1
|
|
3
|
+
"version": "10.2.1",
|
|
4
4
|
"description": "Type-ahead plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
],
|
|
30
30
|
"atlaskit:src": "src/index.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@atlaskit/adf-schema": "^52.
|
|
32
|
+
"@atlaskit/adf-schema": "^52.14.0",
|
|
33
33
|
"@atlaskit/editor-plugin-analytics": "^10.1.0",
|
|
34
34
|
"@atlaskit/editor-plugin-connectivity": "^10.1.0",
|
|
35
35
|
"@atlaskit/editor-plugin-context-panel": "^12.1.0",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@atlaskit/primitives": "^19.0.0",
|
|
45
45
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
46
46
|
"@atlaskit/prosemirror-input-rules": "^3.7.0",
|
|
47
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
47
|
+
"@atlaskit/tmp-editor-statsig": "^83.0.0",
|
|
48
48
|
"@atlaskit/tokens": "^13.0.0",
|
|
49
49
|
"@atlaskit/visually-hidden": "^3.1.0",
|
|
50
50
|
"@babel/runtime": "^7.0.0",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"w3c-keyname": "^2.1.8"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@atlaskit/editor-common": "^114.
|
|
59
|
+
"@atlaskit/editor-common": "^114.46.0",
|
|
60
60
|
"react": "^18.2.0",
|
|
61
61
|
"react-dom": "^18.2.0",
|
|
62
62
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
@@ -64,6 +64,8 @@
|
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@testing-library/react": "^16.3.0",
|
|
66
66
|
"@types/react-virtualized": "^9.18.12",
|
|
67
|
+
"react": "^18.2.0",
|
|
68
|
+
"react-dom": "^18.2.0",
|
|
67
69
|
"react-intl": "^6.6.2",
|
|
68
70
|
"wait-for-expect": "^1.2.0"
|
|
69
71
|
},
|