@atlaskit/editor-common 107.28.0 → 107.28.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 +7 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/utils/calculate-toolbar-position.js +19 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/utils/calculate-toolbar-position.js +19 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/utils/calculate-toolbar-position.js +19 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 107.28.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`562520e7d0e73`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/562520e7d0e73) -
|
|
8
|
+
[ux] [EDITOR-1329] fix shifting selection toolbar on rovo menu button click
|
|
9
|
+
|
|
3
10
|
## 107.28.0
|
|
4
11
|
|
|
5
12
|
### Minor Changes
|
|
@@ -16,7 +16,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
16
16
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
17
17
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
18
18
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
19
|
-
var packageVersion = "107.
|
|
19
|
+
var packageVersion = "107.28.1";
|
|
20
20
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
21
21
|
// Remove URL as it has UGC
|
|
22
22
|
// Ignored via go/ees007
|
|
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
24
24
|
* @jsx jsx
|
|
25
25
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
26
|
var packageName = "@atlaskit/editor-common";
|
|
27
|
-
var packageVersion = "107.
|
|
27
|
+
var packageVersion = "107.28.1";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.calculateToolbarPositionTrackHead = exports.calculateToolbarPositionOnCellSelection = exports.calculateToolbarPositionAboveSelection = void 0;
|
|
7
7
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
8
8
|
var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
9
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
9
10
|
var MAXIMUM_BROWSER_SCROLLBAR_WIDTH = 20;
|
|
10
11
|
|
|
11
12
|
/*
|
|
@@ -109,7 +110,24 @@ var calculateToolbarPositionTrackHead = exports.calculateToolbarPositionTrackHea
|
|
|
109
110
|
var scrollWrapper = editorView.dom.closest('.fabric-editor-popup-scroll-parent') || document.body;
|
|
110
111
|
var wrapperBounds = scrollWrapper.getBoundingClientRect();
|
|
111
112
|
var selection = window && window.getSelection();
|
|
112
|
-
var
|
|
113
|
+
var moreRovoOptionsButton = document.querySelector('button[aria-label="More Rovo options"], [aria-label="More Rovo options"]');
|
|
114
|
+
var isMoreRovoOptionsButtonVisible = !!moreRovoOptionsButton && moreRovoOptionsButton instanceof HTMLElement && !!moreRovoOptionsButton.offsetParent;
|
|
115
|
+
var range = null;
|
|
116
|
+
if ((0, _experiments.editorExperiment)('platform_editor_ai_aifc', true) && isMoreRovoOptionsButtonVisible) {
|
|
117
|
+
if (selection && selection.getRangeAt && selection.rangeCount > 0) {
|
|
118
|
+
var maybeRange = selection.getRangeAt(0);
|
|
119
|
+
if (maybeRange instanceof Range) {
|
|
120
|
+
range = maybeRange;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
} else {
|
|
124
|
+
if (selection && !selection.isCollapsed && selection.getRangeAt && selection.rangeCount > 0) {
|
|
125
|
+
var _maybeRange = selection.getRangeAt(0);
|
|
126
|
+
if (_maybeRange instanceof Range) {
|
|
127
|
+
range = _maybeRange;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
113
131
|
if (!range) {
|
|
114
132
|
return nextPos;
|
|
115
133
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isFedRamp } from './environment';
|
|
2
2
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
3
3
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
4
|
-
const packageVersion = "107.
|
|
4
|
+
const packageVersion = "107.28.1";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// Ignored via go/ees007
|
|
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
15
|
import Layer from '../Layer';
|
|
16
16
|
const packageName = "@atlaskit/editor-common";
|
|
17
|
-
const packageVersion = "107.
|
|
17
|
+
const packageVersion = "107.28.1";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
2
2
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
3
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
3
4
|
const MAXIMUM_BROWSER_SCROLLBAR_WIDTH = 20;
|
|
4
5
|
|
|
5
6
|
/*
|
|
@@ -102,7 +103,24 @@ export const calculateToolbarPositionTrackHead = toolbarTitle => (editorView, ne
|
|
|
102
103
|
const scrollWrapper = editorView.dom.closest('.fabric-editor-popup-scroll-parent') || document.body;
|
|
103
104
|
const wrapperBounds = scrollWrapper.getBoundingClientRect();
|
|
104
105
|
const selection = window && window.getSelection();
|
|
105
|
-
const
|
|
106
|
+
const moreRovoOptionsButton = document.querySelector('button[aria-label="More Rovo options"], [aria-label="More Rovo options"]');
|
|
107
|
+
const isMoreRovoOptionsButtonVisible = !!moreRovoOptionsButton && moreRovoOptionsButton instanceof HTMLElement && !!moreRovoOptionsButton.offsetParent;
|
|
108
|
+
let range = null;
|
|
109
|
+
if (editorExperiment('platform_editor_ai_aifc', true) && isMoreRovoOptionsButtonVisible) {
|
|
110
|
+
if (selection && selection.getRangeAt && selection.rangeCount > 0) {
|
|
111
|
+
const maybeRange = selection.getRangeAt(0);
|
|
112
|
+
if (maybeRange instanceof Range) {
|
|
113
|
+
range = maybeRange;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
} else {
|
|
117
|
+
if (selection && !selection.isCollapsed && selection.getRangeAt && selection.rangeCount > 0) {
|
|
118
|
+
const maybeRange = selection.getRangeAt(0);
|
|
119
|
+
if (maybeRange instanceof Range) {
|
|
120
|
+
range = maybeRange;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
106
124
|
if (!range) {
|
|
107
125
|
return nextPos;
|
|
108
126
|
}
|
|
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
import { isFedRamp } from './environment';
|
|
8
8
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
9
9
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
10
|
-
var packageVersion = "107.
|
|
10
|
+
var packageVersion = "107.28.1";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// Ignored via go/ees007
|
|
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "107.
|
|
24
|
+
var packageVersion = "107.28.1";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
2
2
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
3
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
3
4
|
var MAXIMUM_BROWSER_SCROLLBAR_WIDTH = 20;
|
|
4
5
|
|
|
5
6
|
/*
|
|
@@ -103,7 +104,24 @@ export var calculateToolbarPositionTrackHead = function calculateToolbarPosition
|
|
|
103
104
|
var scrollWrapper = editorView.dom.closest('.fabric-editor-popup-scroll-parent') || document.body;
|
|
104
105
|
var wrapperBounds = scrollWrapper.getBoundingClientRect();
|
|
105
106
|
var selection = window && window.getSelection();
|
|
106
|
-
var
|
|
107
|
+
var moreRovoOptionsButton = document.querySelector('button[aria-label="More Rovo options"], [aria-label="More Rovo options"]');
|
|
108
|
+
var isMoreRovoOptionsButtonVisible = !!moreRovoOptionsButton && moreRovoOptionsButton instanceof HTMLElement && !!moreRovoOptionsButton.offsetParent;
|
|
109
|
+
var range = null;
|
|
110
|
+
if (editorExperiment('platform_editor_ai_aifc', true) && isMoreRovoOptionsButtonVisible) {
|
|
111
|
+
if (selection && selection.getRangeAt && selection.rangeCount > 0) {
|
|
112
|
+
var maybeRange = selection.getRangeAt(0);
|
|
113
|
+
if (maybeRange instanceof Range) {
|
|
114
|
+
range = maybeRange;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
} else {
|
|
118
|
+
if (selection && !selection.isCollapsed && selection.getRangeAt && selection.rangeCount > 0) {
|
|
119
|
+
var _maybeRange = selection.getRangeAt(0);
|
|
120
|
+
if (_maybeRange instanceof Range) {
|
|
121
|
+
range = _maybeRange;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
107
125
|
if (!range) {
|
|
108
126
|
return nextPos;
|
|
109
127
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "107.28.
|
|
3
|
+
"version": "107.28.1",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
"@atlaskit/task-decision": "^19.2.0",
|
|
177
177
|
"@atlaskit/textfield": "^8.0.0",
|
|
178
178
|
"@atlaskit/theme": "^19.0.0",
|
|
179
|
-
"@atlaskit/tmp-editor-statsig": "^11.
|
|
179
|
+
"@atlaskit/tmp-editor-statsig": "^11.5.0",
|
|
180
180
|
"@atlaskit/tokens": "^6.0.0",
|
|
181
181
|
"@atlaskit/tooltip": "^20.4.0",
|
|
182
182
|
"@atlaskit/width-detector": "^5.0.0",
|