@atlaskit/editor-plugin-selection 11.0.0 → 11.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
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-selection
|
|
2
2
|
|
|
3
|
+
## 11.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 11.0.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`f3f55d3ebf702`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f3f55d3ebf702) -
|
|
14
|
+
Gate MBE style and gap cursor changes behind confluence_frontend_native_tabs_extension feature
|
|
15
|
+
flag
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 11.0.0
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.toDOM = void 0;
|
|
8
8
|
var _toArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toArray"));
|
|
9
9
|
var _selection = require("@atlaskit/editor-common/selection");
|
|
10
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
11
|
var _utils = require("../utils");
|
|
11
12
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
12
13
|
/**
|
|
@@ -22,11 +23,17 @@ var nestedCases = {
|
|
|
22
23
|
'embedCardView-content-wrap': '.rich-media-item',
|
|
23
24
|
'datasourceView-content-wrap': '.datasourceView-content-inner-wrap'
|
|
24
25
|
};
|
|
26
|
+
var getNestedSelector = function getNestedSelector(key) {
|
|
27
|
+
if (key === 'multiBodiedExtensionView-content-wrap' && (0, _platformFeatureFlags.fg)('confluence_frontend_native_tabs_extension')) {
|
|
28
|
+
return '.multiBodiedExtension--wrapper';
|
|
29
|
+
}
|
|
30
|
+
return nestedCases[key];
|
|
31
|
+
};
|
|
25
32
|
var computeNestedStyle = function computeNestedStyle(dom) {
|
|
26
33
|
var foundKey = Object.keys(nestedCases).find(function (className) {
|
|
27
34
|
return dom.classList.contains(className);
|
|
28
35
|
});
|
|
29
|
-
var nestedSelector = foundKey &&
|
|
36
|
+
var nestedSelector = foundKey && getNestedSelector(foundKey);
|
|
30
37
|
if (nestedSelector) {
|
|
31
38
|
var nestedElement = dom.querySelector(nestedSelector);
|
|
32
39
|
if (nestedElement) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Side } from '@atlaskit/editor-common/selection';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
3
|
import { getComputedStyleForLayoutMode, getLayoutModeFromTargetNode, isLeftCursor } from '../utils';
|
|
3
4
|
|
|
4
5
|
/**
|
|
@@ -14,9 +15,15 @@ const nestedCases = {
|
|
|
14
15
|
'embedCardView-content-wrap': '.rich-media-item',
|
|
15
16
|
'datasourceView-content-wrap': '.datasourceView-content-inner-wrap'
|
|
16
17
|
};
|
|
18
|
+
const getNestedSelector = key => {
|
|
19
|
+
if (key === 'multiBodiedExtensionView-content-wrap' && fg('confluence_frontend_native_tabs_extension')) {
|
|
20
|
+
return '.multiBodiedExtension--wrapper';
|
|
21
|
+
}
|
|
22
|
+
return nestedCases[key];
|
|
23
|
+
};
|
|
17
24
|
const computeNestedStyle = dom => {
|
|
18
25
|
const foundKey = Object.keys(nestedCases).find(className => dom.classList.contains(className));
|
|
19
|
-
const nestedSelector = foundKey &&
|
|
26
|
+
const nestedSelector = foundKey && getNestedSelector(foundKey);
|
|
20
27
|
if (nestedSelector) {
|
|
21
28
|
const nestedElement = dom.querySelector(nestedSelector);
|
|
22
29
|
if (nestedElement) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _toArray from "@babel/runtime/helpers/toArray";
|
|
2
2
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
3
3
|
import { Side } from '@atlaskit/editor-common/selection';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
5
|
import { getComputedStyleForLayoutMode, getLayoutModeFromTargetNode, isLeftCursor } from '../utils';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -16,11 +17,17 @@ var nestedCases = {
|
|
|
16
17
|
'embedCardView-content-wrap': '.rich-media-item',
|
|
17
18
|
'datasourceView-content-wrap': '.datasourceView-content-inner-wrap'
|
|
18
19
|
};
|
|
20
|
+
var getNestedSelector = function getNestedSelector(key) {
|
|
21
|
+
if (key === 'multiBodiedExtensionView-content-wrap' && fg('confluence_frontend_native_tabs_extension')) {
|
|
22
|
+
return '.multiBodiedExtension--wrapper';
|
|
23
|
+
}
|
|
24
|
+
return nestedCases[key];
|
|
25
|
+
};
|
|
19
26
|
var computeNestedStyle = function computeNestedStyle(dom) {
|
|
20
27
|
var foundKey = Object.keys(nestedCases).find(function (className) {
|
|
21
28
|
return dom.classList.contains(className);
|
|
22
29
|
});
|
|
23
|
-
var nestedSelector = foundKey &&
|
|
30
|
+
var nestedSelector = foundKey && getNestedSelector(foundKey);
|
|
24
31
|
if (nestedSelector) {
|
|
25
32
|
var nestedElement = dom.querySelector(nestedSelector);
|
|
26
33
|
if (nestedElement) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-selection",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.2",
|
|
4
4
|
"description": "Selection plugin for @atlaskit/editor-core",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"@atlaskit/editor-shared-styles": "^3.11.0",
|
|
26
26
|
"@atlaskit/editor-tables": "^2.10.0",
|
|
27
27
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
28
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
28
|
+
"@atlaskit/tmp-editor-statsig": "^89.0.0",
|
|
29
29
|
"@atlaskit/tokens": "^13.1.0",
|
|
30
30
|
"@babel/runtime": "^7.0.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@atlaskit/editor-common": "^115.
|
|
33
|
+
"@atlaskit/editor-common": "^115.2.0",
|
|
34
34
|
"react": "^18.2.0"
|
|
35
35
|
},
|
|
36
36
|
"techstack": {
|
|
@@ -76,5 +76,10 @@
|
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"react": "^18.2.0"
|
|
79
|
+
},
|
|
80
|
+
"platform-feature-flags": {
|
|
81
|
+
"confluence_frontend_native_tabs_extension": {
|
|
82
|
+
"type": "boolean"
|
|
83
|
+
}
|
|
79
84
|
}
|
|
80
85
|
}
|