@atlaskit/editor-common 99.3.1 → 99.3.3
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 +17 -0
- package/dist/cjs/extensibility/Extension/Lozenge/ExtensionLabel.js +1 -1
- package/dist/cjs/lazy-node-view/index.js +3 -6
- package/dist/cjs/lazy-node-view/node-view.js +4 -7
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/with-outer-listeners.js +1 -4
- package/dist/cjs/ui-react/with-react-editor-view-outer-listeners.js +1 -5
- package/dist/es2019/extensibility/Extension/Lozenge/ExtensionLabel.js +1 -1
- package/dist/es2019/lazy-node-view/index.js +3 -6
- package/dist/es2019/lazy-node-view/node-view.js +4 -7
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/with-outer-listeners.js +1 -4
- package/dist/es2019/ui-react/with-react-editor-view-outer-listeners.js +1 -5
- package/dist/esm/extensibility/Extension/Lozenge/ExtensionLabel.js +1 -1
- package/dist/esm/lazy-node-view/index.js +3 -6
- package/dist/esm/lazy-node-view/node-view.js +4 -7
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/with-outer-listeners.js +1 -4
- package/dist/esm/ui-react/with-react-editor-view-outer-listeners.js +1 -5
- package/package.json +5 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 99.3.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#103440](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/103440)
|
|
8
|
+
[`2a34d82d95e38`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2a34d82d95e38) -
|
|
9
|
+
Cleaned up feature flag that cleans up findDOMNode usages
|
|
10
|
+
|
|
11
|
+
## 99.3.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#103452](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/103452)
|
|
16
|
+
[`0bdb0bcb26d5f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0bdb0bcb26d5f) -
|
|
17
|
+
Removed feature gate for lazy node view analytics
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 99.3.1
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -38,7 +38,7 @@ var labelStyles = (0, _react.css)({
|
|
|
38
38
|
width: 'max-content',
|
|
39
39
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
40
40
|
top: '-28px',
|
|
41
|
-
// When updating this value, make sure to also update the value in EditToggle.tsx, buttonContainerStyles
|
|
41
|
+
// When updating this value, make sure to also update the value in EditToggle.tsx, buttonContainerStyles
|
|
42
42
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
43
43
|
'&.show-label': {
|
|
44
44
|
cursor: 'pointer',
|
|
@@ -15,7 +15,6 @@ exports.testOnlyIgnoreLazyNodeView = testOnlyIgnoreLazyNodeView;
|
|
|
15
15
|
exports.withLazyLoading = void 0;
|
|
16
16
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
17
17
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
18
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
19
18
|
var _lazyScheduler = require("./lazy-scheduler");
|
|
20
19
|
var _nodeView = require("./node-view");
|
|
21
20
|
var _cssHelper = require("./css-helper");
|
|
@@ -158,11 +157,9 @@ var withLazyLoading = exports.withLazyLoading = function withLazyLoading(_ref) {
|
|
|
158
157
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
159
158
|
var dom = nodeView.dom;
|
|
160
159
|
dom.setAttribute('data-vc', "editor-lnv-loaded--".concat(node.type.name));
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
dom.setAttribute('data-editor-lnv-placeholder-replace', (0, _nodeView.makeNodePlaceholderId)(node.type.name, pos));
|
|
165
|
-
}
|
|
160
|
+
var pos = getPos();
|
|
161
|
+
if (pos !== undefined) {
|
|
162
|
+
dom.setAttribute('data-editor-lnv-placeholder-replace', (0, _nodeView.makeNodePlaceholderId)(node.type.name, pos));
|
|
166
163
|
}
|
|
167
164
|
return nodeView;
|
|
168
165
|
};
|
|
@@ -11,7 +11,6 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
|
|
|
11
11
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
12
|
var _memoize = _interopRequireDefault(require("lodash/memoize"));
|
|
13
13
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
14
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
14
|
var getEditorLineWidth = (0, _memoize.default)(function (view) {
|
|
16
15
|
var _view$dom;
|
|
17
16
|
return (_view$dom = view.dom) === null || _view$dom === void 0 ? void 0 : _view$dom.clientWidth;
|
|
@@ -89,12 +88,10 @@ var LazyNodeView = exports.LazyNodeView = /*#__PURE__*/function () {
|
|
|
89
88
|
|
|
90
89
|
// This is used by the UFO to identify the node
|
|
91
90
|
this.dom.setAttribute('data-vc', "editor-lnv-fallback--".concat(_node.type.name));
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
this.dom.setAttribute('data-editor-lnv-placeholder', makeNodePlaceholderId(_node.type.name, pos));
|
|
97
|
-
}
|
|
91
|
+
var pos = _getPos();
|
|
92
|
+
if (pos !== undefined) {
|
|
93
|
+
// Used for UFO to identify this as a placeholder
|
|
94
|
+
this.dom.setAttribute('data-editor-lnv-placeholder', makeNodePlaceholderId(_node.type.name, pos));
|
|
98
95
|
}
|
|
99
96
|
}
|
|
100
97
|
}
|
|
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
17
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
18
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
19
19
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
20
|
-
var packageVersion = "99.3.
|
|
20
|
+
var packageVersion = "99.3.3";
|
|
21
21
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
22
22
|
// Remove URL as it has UGC
|
|
23
23
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
23
23
|
* @jsx jsx
|
|
24
24
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
25
25
|
var packageName = "@atlaskit/editor-common";
|
|
26
|
-
var packageVersion = "99.3.
|
|
26
|
+
var packageVersion = "99.3.3";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = '0, 8';
|
|
29
29
|
// Ignored via go/ees005
|
|
@@ -14,8 +14,6 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
14
14
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
15
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
|
-
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
18
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
19
17
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
20
18
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
21
19
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
@@ -35,8 +33,7 @@ function withOuterListeners(Component) {
|
|
|
35
33
|
(0, _defineProperty2.default)(_this, "outsideClickTargetRef", /*#__PURE__*/_react.default.createRef());
|
|
36
34
|
(0, _defineProperty2.default)(_this, "handleClick", function (evt) {
|
|
37
35
|
var _this$outsideClickTar;
|
|
38
|
-
var domNode = (
|
|
39
|
-
|
|
36
|
+
var domNode = (_this$outsideClickTar = _this.outsideClickTargetRef.current) === null || _this$outsideClickTar === void 0 ? void 0 : _this$outsideClickTar.deref();
|
|
40
37
|
if (!domNode || evt.target instanceof Node && !domNode.contains(evt.target)) {
|
|
41
38
|
var _this$props$handleCli, _this$props;
|
|
42
39
|
(_this$props$handleCli = (_this$props = _this.props).handleClickOutside) === null || _this$props$handleCli === void 0 || _this$props$handleCli.call(_this$props, evt);
|
|
@@ -16,8 +16,6 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
16
16
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
17
17
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
18
18
|
var _react = _interopRequireWildcard(require("react"));
|
|
19
|
-
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
20
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
21
19
|
var _ReactEditorViewContext = _interopRequireDefault(require("./ReactEditorViewContext"));
|
|
22
20
|
var _excluded = ["handleClickOutside", "handleEnterKeydown", "handleEscapeKeydown", "closeOnTab"];
|
|
23
21
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
@@ -46,9 +44,7 @@ var WithOutsideClick = /*#__PURE__*/function (_PureComponent) {
|
|
|
46
44
|
if (!_this.props.isActiveComponent || !_this.props.handleClickOutside) {
|
|
47
45
|
return;
|
|
48
46
|
}
|
|
49
|
-
var domNode = (
|
|
50
|
-
// eslint-disable-next-line react/no-find-dom-node -- Ignored via go/ED-25883
|
|
51
|
-
_reactDom.default.findDOMNode(_this);
|
|
47
|
+
var domNode = (_this$props$outsideCl = _this.props.outsideClickTargetRef.current) === null || _this$props$outsideCl === void 0 ? void 0 : _this$props$outsideCl.deref();
|
|
52
48
|
if (!domNode || evt.target instanceof Node && !domNode.contains(evt.target)) {
|
|
53
49
|
var _this$props$editorVie;
|
|
54
50
|
_this.props.handleClickOutside(evt);
|
|
@@ -30,7 +30,7 @@ const labelStyles = css({
|
|
|
30
30
|
width: 'max-content',
|
|
31
31
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
32
32
|
top: '-28px',
|
|
33
|
-
// When updating this value, make sure to also update the value in EditToggle.tsx, buttonContainerStyles
|
|
33
|
+
// When updating this value, make sure to also update the value in EditToggle.tsx, buttonContainerStyles
|
|
34
34
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
35
35
|
'&.show-label': {
|
|
36
36
|
cursor: 'pointer',
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
3
3
|
|
|
4
4
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
5
|
import { cancelCallback, scheduleCallback } from './lazy-scheduler';
|
|
7
6
|
import { LazyNodeView, makeNodePlaceholderId } from './node-view';
|
|
8
7
|
export { convertToInlineCss } from './css-helper';
|
|
@@ -143,11 +142,9 @@ export const withLazyLoading = ({
|
|
|
143
142
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
144
143
|
const dom = nodeView.dom;
|
|
145
144
|
dom.setAttribute('data-vc', `editor-lnv-loaded--${node.type.name}`);
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
dom.setAttribute('data-editor-lnv-placeholder-replace', makeNodePlaceholderId(node.type.name, pos));
|
|
150
|
-
}
|
|
145
|
+
const pos = getPos();
|
|
146
|
+
if (pos !== undefined) {
|
|
147
|
+
dom.setAttribute('data-editor-lnv-placeholder-replace', makeNodePlaceholderId(node.type.name, pos));
|
|
151
148
|
}
|
|
152
149
|
return nodeView;
|
|
153
150
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import memoize from 'lodash/memoize';
|
|
3
3
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
const getEditorLineWidth = memoize(view => {
|
|
6
5
|
var _view$dom;
|
|
7
6
|
return (_view$dom = view.dom) === null || _view$dom === void 0 ? void 0 : _view$dom.clientWidth;
|
|
@@ -77,12 +76,10 @@ export class LazyNodeView {
|
|
|
77
76
|
|
|
78
77
|
// This is used by the UFO to identify the node
|
|
79
78
|
this.dom.setAttribute('data-vc', `editor-lnv-fallback--${_node.type.name}`);
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
this.dom.setAttribute('data-editor-lnv-placeholder', makeNodePlaceholderId(_node.type.name, pos));
|
|
85
|
-
}
|
|
79
|
+
const pos = _getPos();
|
|
80
|
+
if (pos !== undefined) {
|
|
81
|
+
// Used for UFO to identify this as a placeholder
|
|
82
|
+
this.dom.setAttribute('data-editor-lnv-placeholder', makeNodePlaceholderId(_node.type.name, pos));
|
|
86
83
|
}
|
|
87
84
|
}
|
|
88
85
|
}
|
|
@@ -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 = "99.3.
|
|
4
|
+
const packageVersion = "99.3.3";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
13
13
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
14
14
|
import Layer from '../Layer';
|
|
15
15
|
const packageName = "@atlaskit/editor-common";
|
|
16
|
-
const packageVersion = "99.3.
|
|
16
|
+
const packageVersion = "99.3.3";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
// Ignored via go/ees005
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React, { PureComponent } from 'react';
|
|
3
|
-
import ReactDOM from 'react-dom';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
3
|
// Use this context to pass in the reference of the element that should be considered as the outside click target
|
|
6
4
|
// The outside click target is the element that should be clicked outside of to trigger the `handleClickOutside` event
|
|
7
5
|
export const PlainOutsideClickTargetRefContext = /*#__PURE__*/React.createContext(() => {});
|
|
@@ -12,8 +10,7 @@ export default function withOuterListeners(Component) {
|
|
|
12
10
|
_defineProperty(this, "outsideClickTargetRef", /*#__PURE__*/React.createRef());
|
|
13
11
|
_defineProperty(this, "handleClick", evt => {
|
|
14
12
|
var _this$outsideClickTar;
|
|
15
|
-
const domNode =
|
|
16
|
-
|
|
13
|
+
const domNode = (_this$outsideClickTar = this.outsideClickTargetRef.current) === null || _this$outsideClickTar === void 0 ? void 0 : _this$outsideClickTar.deref();
|
|
17
14
|
if (!domNode || evt.target instanceof Node && !domNode.contains(evt.target)) {
|
|
18
15
|
var _this$props$handleCli, _this$props;
|
|
19
16
|
(_this$props$handleCli = (_this$props = this.props).handleClickOutside) === null || _this$props$handleCli === void 0 ? void 0 : _this$props$handleCli.call(_this$props, evt);
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React, { PureComponent, useCallback, useEffect, useRef, useState } from 'react';
|
|
3
|
-
import ReactDOM from 'react-dom';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
3
|
import ReactEditorViewContext from './ReactEditorViewContext';
|
|
6
4
|
// Use this context to pass in the reference of the element that should be considered as the outside click target
|
|
7
5
|
// The outside click target is the element that should be clicked outside of to trigger the `handleClickOutside` event
|
|
@@ -19,9 +17,7 @@ class WithOutsideClick extends PureComponent {
|
|
|
19
17
|
if (!this.props.isActiveComponent || !this.props.handleClickOutside) {
|
|
20
18
|
return;
|
|
21
19
|
}
|
|
22
|
-
const domNode =
|
|
23
|
-
// eslint-disable-next-line react/no-find-dom-node -- Ignored via go/ED-25883
|
|
24
|
-
ReactDOM.findDOMNode(this);
|
|
20
|
+
const domNode = (_this$props$outsideCl = this.props.outsideClickTargetRef.current) === null || _this$props$outsideCl === void 0 ? void 0 : _this$props$outsideCl.deref();
|
|
25
21
|
if (!domNode || evt.target instanceof Node && !domNode.contains(evt.target)) {
|
|
26
22
|
var _this$props$editorVie;
|
|
27
23
|
this.props.handleClickOutside(evt);
|
|
@@ -30,7 +30,7 @@ var labelStyles = css({
|
|
|
30
30
|
width: 'max-content',
|
|
31
31
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
32
32
|
top: '-28px',
|
|
33
|
-
// When updating this value, make sure to also update the value in EditToggle.tsx, buttonContainerStyles
|
|
33
|
+
// When updating this value, make sure to also update the value in EditToggle.tsx, buttonContainerStyles
|
|
34
34
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
35
35
|
'&.show-label': {
|
|
36
36
|
cursor: 'pointer',
|
|
@@ -3,7 +3,6 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
3
3
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
4
4
|
|
|
5
5
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { cancelCallback, scheduleCallback } from './lazy-scheduler';
|
|
8
7
|
import { LazyNodeView, makeNodePlaceholderId } from './node-view';
|
|
9
8
|
export { convertToInlineCss } from './css-helper';
|
|
@@ -143,11 +142,9 @@ export var withLazyLoading = function withLazyLoading(_ref) {
|
|
|
143
142
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
144
143
|
var dom = nodeView.dom;
|
|
145
144
|
dom.setAttribute('data-vc', "editor-lnv-loaded--".concat(node.type.name));
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
dom.setAttribute('data-editor-lnv-placeholder-replace', makeNodePlaceholderId(node.type.name, pos));
|
|
150
|
-
}
|
|
145
|
+
var pos = getPos();
|
|
146
|
+
if (pos !== undefined) {
|
|
147
|
+
dom.setAttribute('data-editor-lnv-placeholder-replace', makeNodePlaceholderId(node.type.name, pos));
|
|
151
148
|
}
|
|
152
149
|
return nodeView;
|
|
153
150
|
};
|
|
@@ -3,7 +3,6 @@ import _createClass from "@babel/runtime/helpers/createClass";
|
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
4
|
import memoize from 'lodash/memoize';
|
|
5
5
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
var getEditorLineWidth = memoize(function (view) {
|
|
8
7
|
var _view$dom;
|
|
9
8
|
return (_view$dom = view.dom) === null || _view$dom === void 0 ? void 0 : _view$dom.clientWidth;
|
|
@@ -81,12 +80,10 @@ export var LazyNodeView = /*#__PURE__*/function () {
|
|
|
81
80
|
|
|
82
81
|
// This is used by the UFO to identify the node
|
|
83
82
|
this.dom.setAttribute('data-vc', "editor-lnv-fallback--".concat(_node.type.name));
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
this.dom.setAttribute('data-editor-lnv-placeholder', makeNodePlaceholderId(_node.type.name, pos));
|
|
89
|
-
}
|
|
83
|
+
var pos = _getPos();
|
|
84
|
+
if (pos !== undefined) {
|
|
85
|
+
// Used for UFO to identify this as a placeholder
|
|
86
|
+
this.dom.setAttribute('data-editor-lnv-placeholder', makeNodePlaceholderId(_node.type.name, pos));
|
|
90
87
|
}
|
|
91
88
|
}
|
|
92
89
|
}
|
|
@@ -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 = "99.3.
|
|
10
|
+
var packageVersion = "99.3.3";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
20
20
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
21
21
|
import Layer from '../Layer';
|
|
22
22
|
var packageName = "@atlaskit/editor-common";
|
|
23
|
-
var packageVersion = "99.3.
|
|
23
|
+
var packageVersion = "99.3.3";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
// Ignored via go/ees005
|
|
@@ -7,8 +7,6 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
7
7
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
8
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
9
|
import React, { PureComponent } from 'react';
|
|
10
|
-
import ReactDOM from 'react-dom';
|
|
11
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
10
|
// Use this context to pass in the reference of the element that should be considered as the outside click target
|
|
13
11
|
// The outside click target is the element that should be clicked outside of to trigger the `handleClickOutside` event
|
|
14
12
|
export var PlainOutsideClickTargetRefContext = /*#__PURE__*/React.createContext(function () {});
|
|
@@ -24,8 +22,7 @@ export default function withOuterListeners(Component) {
|
|
|
24
22
|
_defineProperty(_this, "outsideClickTargetRef", /*#__PURE__*/React.createRef());
|
|
25
23
|
_defineProperty(_this, "handleClick", function (evt) {
|
|
26
24
|
var _this$outsideClickTar;
|
|
27
|
-
var domNode =
|
|
28
|
-
|
|
25
|
+
var domNode = (_this$outsideClickTar = _this.outsideClickTargetRef.current) === null || _this$outsideClickTar === void 0 ? void 0 : _this$outsideClickTar.deref();
|
|
29
26
|
if (!domNode || evt.target instanceof Node && !domNode.contains(evt.target)) {
|
|
30
27
|
var _this$props$handleCli, _this$props;
|
|
31
28
|
(_this$props$handleCli = (_this$props = _this.props).handleClickOutside) === null || _this$props$handleCli === void 0 || _this$props$handleCli.call(_this$props, evt);
|
|
@@ -10,8 +10,6 @@ var _excluded = ["handleClickOutside", "handleEnterKeydown", "handleEscapeKeydow
|
|
|
10
10
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
11
11
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12
12
|
import React, { PureComponent, useCallback, useEffect, useRef, useState } from 'react';
|
|
13
|
-
import ReactDOM from 'react-dom';
|
|
14
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
13
|
import ReactEditorViewContext from './ReactEditorViewContext';
|
|
16
14
|
// Use this context to pass in the reference of the element that should be considered as the outside click target
|
|
17
15
|
// The outside click target is the element that should be clicked outside of to trigger the `handleClickOutside` event
|
|
@@ -35,9 +33,7 @@ var WithOutsideClick = /*#__PURE__*/function (_PureComponent) {
|
|
|
35
33
|
if (!_this.props.isActiveComponent || !_this.props.handleClickOutside) {
|
|
36
34
|
return;
|
|
37
35
|
}
|
|
38
|
-
var domNode =
|
|
39
|
-
// eslint-disable-next-line react/no-find-dom-node -- Ignored via go/ED-25883
|
|
40
|
-
ReactDOM.findDOMNode(_this);
|
|
36
|
+
var domNode = (_this$props$outsideCl = _this.props.outsideClickTargetRef.current) === null || _this$props$outsideCl === void 0 ? void 0 : _this$props$outsideCl.deref();
|
|
41
37
|
if (!domNode || evt.target instanceof Node && !domNode.contains(evt.target)) {
|
|
42
38
|
var _this$props$editorVie;
|
|
43
39
|
_this.props.handleClickOutside(evt);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "99.3.
|
|
3
|
+
"version": "99.3.3",
|
|
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/"
|
|
@@ -134,14 +134,14 @@
|
|
|
134
134
|
"@atlaskit/link-datasource": "^3.15.0",
|
|
135
135
|
"@atlaskit/link-picker": "^1.47.0",
|
|
136
136
|
"@atlaskit/media-card": "^78.18.0",
|
|
137
|
-
"@atlaskit/media-client": "^29.
|
|
137
|
+
"@atlaskit/media-client": "^29.1.0",
|
|
138
138
|
"@atlaskit/media-client-react": "^2.5.0",
|
|
139
139
|
"@atlaskit/media-common": "^11.7.0",
|
|
140
140
|
"@atlaskit/media-file-preview": "^0.9.0",
|
|
141
141
|
"@atlaskit/media-picker": "^67.0.0",
|
|
142
142
|
"@atlaskit/media-ui": "^27.3.0",
|
|
143
143
|
"@atlaskit/media-viewer": "49.6.1",
|
|
144
|
-
"@atlaskit/mention": "^23.
|
|
144
|
+
"@atlaskit/mention": "^23.9.0",
|
|
145
145
|
"@atlaskit/menu": "^2.13.0",
|
|
146
146
|
"@atlaskit/onboarding": "^12.2.0",
|
|
147
147
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
@@ -149,12 +149,12 @@
|
|
|
149
149
|
"@atlaskit/primitives": "^13.3.0",
|
|
150
150
|
"@atlaskit/profilecard": "^21.1.0",
|
|
151
151
|
"@atlaskit/section-message": "^6.8.0",
|
|
152
|
-
"@atlaskit/smart-card": "^34.
|
|
152
|
+
"@atlaskit/smart-card": "^34.4.0",
|
|
153
153
|
"@atlaskit/smart-user-picker": "^6.11.0",
|
|
154
154
|
"@atlaskit/spinner": "^16.3.0",
|
|
155
155
|
"@atlaskit/task-decision": "^17.11.0",
|
|
156
156
|
"@atlaskit/textfield": "^6.7.0",
|
|
157
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
157
|
+
"@atlaskit/tmp-editor-statsig": "^2.37.0",
|
|
158
158
|
"@atlaskit/tokens": "^3.1.0",
|
|
159
159
|
"@atlaskit/tooltip": "^19.0.0",
|
|
160
160
|
"@atlaskit/width-detector": "^4.3.0",
|
|
@@ -269,12 +269,6 @@
|
|
|
269
269
|
"platform_editor_heading_margin_fix": {
|
|
270
270
|
"type": "boolean"
|
|
271
271
|
},
|
|
272
|
-
"platform_editor_replace_finddomnode_in_common": {
|
|
273
|
-
"type": "boolean"
|
|
274
|
-
},
|
|
275
|
-
"platform_editor_ed-25557_lnv_add_ssr_placeholder": {
|
|
276
|
-
"type": "boolean"
|
|
277
|
-
},
|
|
278
272
|
"platform-visual-refresh-icons": {
|
|
279
273
|
"type": "boolean"
|
|
280
274
|
},
|