@atlaskit/editor-common 93.6.1 → 93.6.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 +23 -0
- package/dist/cjs/link/LinkSearch/index.js +33 -11
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/utils/performance/hooks/use-component-render-tracking/index.js +3 -2
- package/dist/es2019/link/LinkSearch/index.js +30 -11
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/utils/performance/hooks/use-component-render-tracking/index.js +2 -2
- package/dist/esm/link/LinkSearch/index.js +33 -11
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/utils/performance/hooks/use-component-render-tracking/index.js +2 -2
- package/dist/types/collab/index.d.ts +1 -0
- package/dist/types-ts4.5/collab/index.d.ts +1 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 93.6.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#154580](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/154580)
|
|
8
|
+
[`c3075ce84c94f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c3075ce84c94f) -
|
|
9
|
+
Remediate LinkSearch for React 18
|
|
10
|
+
- [#154580](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/154580)
|
|
11
|
+
[`c3075ce84c94f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c3075ce84c94f) -
|
|
12
|
+
Remediate link search component for react 18
|
|
13
|
+
|
|
14
|
+
## 93.6.2
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [#154162](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/154162)
|
|
19
|
+
[`5982815965267`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5982815965267) -
|
|
20
|
+
Updated performanceTracking and inputSampling props to hardcoded values as we're removing this
|
|
21
|
+
feature flag
|
|
22
|
+
- [#153986](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/153986)
|
|
23
|
+
[`ce61c835c3b6a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ce61c835c3b6a) -
|
|
24
|
+
allow editorApi to be used to update state in collab plugin
|
|
25
|
+
|
|
3
26
|
## 93.6.1
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
|
@@ -16,6 +16,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
16
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
17
|
var _react = _interopRequireDefault(require("react"));
|
|
18
18
|
var _reactIntlNext = require("react-intl-next");
|
|
19
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
19
20
|
var _analytics = require("../../analytics");
|
|
20
21
|
var _LinkSearchList = _interopRequireDefault(require("./LinkSearchList"));
|
|
21
22
|
var _withActivityProvider = _interopRequireDefault(require("./withActivityProvider"));
|
|
@@ -202,17 +203,38 @@ var RecentLink = /*#__PURE__*/function (_React$Component) {
|
|
|
202
203
|
(0, _createClass2.default)(RecentLink, [{
|
|
203
204
|
key: "UNSAFE_componentWillReceiveProps",
|
|
204
205
|
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
205
|
-
if (
|
|
206
|
-
this.
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
206
|
+
if (!(0, _platformFeatureFlags.fg)('platform_editor_react18_phase2')) {
|
|
207
|
+
if (this.props.defaultUrl !== nextProps.defaultUrl) {
|
|
208
|
+
this.setState(function (state) {
|
|
209
|
+
if (state.url !== nextProps.defaultUrl) {
|
|
210
|
+
return {
|
|
211
|
+
items: [],
|
|
212
|
+
selectedIndex: -1,
|
|
213
|
+
url: nextProps.defaultUrl || ''
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
return null;
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}, {
|
|
222
|
+
key: "componentDidUpdate",
|
|
223
|
+
value: function componentDidUpdate(prevProps) {
|
|
224
|
+
var _this2 = this;
|
|
225
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_react18_phase2')) {
|
|
226
|
+
if (prevProps.defaultUrl !== this.props.defaultUrl) {
|
|
227
|
+
this.setState(function (state) {
|
|
228
|
+
if (state.url !== _this2.props.defaultUrl) {
|
|
229
|
+
return {
|
|
230
|
+
items: [],
|
|
231
|
+
selectedIndex: -1,
|
|
232
|
+
url: _this2.props.defaultUrl || ''
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
return null;
|
|
236
|
+
});
|
|
237
|
+
}
|
|
216
238
|
}
|
|
217
239
|
}
|
|
218
240
|
}, {
|
|
@@ -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 = "93.6.
|
|
20
|
+
var packageVersion = "93.6.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
|
|
@@ -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 = "93.6.
|
|
27
|
+
var packageVersion = "93.6.3";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.useComponentRenderTracking = useComponentRenderTracking;
|
|
7
8
|
var _react = require("react");
|
|
8
|
-
var
|
|
9
|
+
var _v = _interopRequireDefault(require("uuid/v4"));
|
|
9
10
|
var _compareProps = require("../../../compare-props");
|
|
10
11
|
function useComponentRenderTracking(_ref) {
|
|
11
12
|
var onRender = _ref.onRender,
|
|
@@ -14,7 +15,7 @@ function useComponentRenderTracking(_ref) {
|
|
|
14
15
|
zeroBasedCount = _ref$zeroBasedCount === void 0 ? true : _ref$zeroBasedCount;
|
|
15
16
|
var propsRef = (0, _react.useRef)();
|
|
16
17
|
var renderCountRef = (0, _react.useRef)(zeroBasedCount ? 0 : 1);
|
|
17
|
-
var _useRef = (0, _react.useRef)(
|
|
18
|
+
var _useRef = (0, _react.useRef)((0, _v.default)()),
|
|
18
19
|
componentId = _useRef.current;
|
|
19
20
|
(0, _react.useEffect)(function () {
|
|
20
21
|
var lastProps = propsRef.current;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { injectIntl } from 'react-intl-next';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
5
|
import { INPUT_METHOD } from '../../analytics';
|
|
5
6
|
import LinkSearchList from './LinkSearchList';
|
|
6
7
|
import withActivityProvider from './withActivityProvider';
|
|
@@ -139,17 +140,35 @@ class RecentLink extends React.Component {
|
|
|
139
140
|
};
|
|
140
141
|
}
|
|
141
142
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
142
|
-
if (
|
|
143
|
-
this.
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
143
|
+
if (!fg('platform_editor_react18_phase2')) {
|
|
144
|
+
if (this.props.defaultUrl !== nextProps.defaultUrl) {
|
|
145
|
+
this.setState(state => {
|
|
146
|
+
if (state.url !== nextProps.defaultUrl) {
|
|
147
|
+
return {
|
|
148
|
+
items: [],
|
|
149
|
+
selectedIndex: -1,
|
|
150
|
+
url: nextProps.defaultUrl || ''
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
return null;
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
componentDidUpdate(prevProps) {
|
|
159
|
+
if (fg('platform_editor_react18_phase2')) {
|
|
160
|
+
if (prevProps.defaultUrl !== this.props.defaultUrl) {
|
|
161
|
+
this.setState(state => {
|
|
162
|
+
if (state.url !== this.props.defaultUrl) {
|
|
163
|
+
return {
|
|
164
|
+
items: [],
|
|
165
|
+
selectedIndex: -1,
|
|
166
|
+
url: this.props.defaultUrl || ''
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
return null;
|
|
170
|
+
});
|
|
171
|
+
}
|
|
153
172
|
}
|
|
154
173
|
}
|
|
155
174
|
async componentDidMount() {
|
|
@@ -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 = "93.6.
|
|
4
|
+
const packageVersion = "93.6.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 = "93.6.
|
|
16
|
+
const packageVersion = "93.6.3";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
class DropList extends Component {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect, useRef } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import uuidv4 from 'uuid/v4';
|
|
3
3
|
import { getPropsDifference, getShallowPropsDifference } from '../../../compare-props';
|
|
4
4
|
export function useComponentRenderTracking({
|
|
5
5
|
onRender,
|
|
@@ -10,7 +10,7 @@ export function useComponentRenderTracking({
|
|
|
10
10
|
const renderCountRef = useRef(zeroBasedCount ? 0 : 1);
|
|
11
11
|
const {
|
|
12
12
|
current: componentId
|
|
13
|
-
} = useRef(
|
|
13
|
+
} = useRef(uuidv4());
|
|
14
14
|
useEffect(() => {
|
|
15
15
|
const lastProps = propsRef.current;
|
|
16
16
|
const renderCount = renderCountRef.current;
|
|
@@ -11,6 +11,7 @@ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function
|
|
|
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 from 'react';
|
|
13
13
|
import { injectIntl } from 'react-intl-next';
|
|
14
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
15
|
import { INPUT_METHOD } from '../../analytics';
|
|
15
16
|
import LinkSearchList from './LinkSearchList';
|
|
16
17
|
import withActivityProvider from './withActivityProvider';
|
|
@@ -195,17 +196,38 @@ var RecentLink = /*#__PURE__*/function (_React$Component) {
|
|
|
195
196
|
_createClass(RecentLink, [{
|
|
196
197
|
key: "UNSAFE_componentWillReceiveProps",
|
|
197
198
|
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
198
|
-
if (
|
|
199
|
-
this.
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
199
|
+
if (!fg('platform_editor_react18_phase2')) {
|
|
200
|
+
if (this.props.defaultUrl !== nextProps.defaultUrl) {
|
|
201
|
+
this.setState(function (state) {
|
|
202
|
+
if (state.url !== nextProps.defaultUrl) {
|
|
203
|
+
return {
|
|
204
|
+
items: [],
|
|
205
|
+
selectedIndex: -1,
|
|
206
|
+
url: nextProps.defaultUrl || ''
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
return null;
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}, {
|
|
215
|
+
key: "componentDidUpdate",
|
|
216
|
+
value: function componentDidUpdate(prevProps) {
|
|
217
|
+
var _this2 = this;
|
|
218
|
+
if (fg('platform_editor_react18_phase2')) {
|
|
219
|
+
if (prevProps.defaultUrl !== this.props.defaultUrl) {
|
|
220
|
+
this.setState(function (state) {
|
|
221
|
+
if (state.url !== _this2.props.defaultUrl) {
|
|
222
|
+
return {
|
|
223
|
+
items: [],
|
|
224
|
+
selectedIndex: -1,
|
|
225
|
+
url: _this2.props.defaultUrl || ''
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
return null;
|
|
229
|
+
});
|
|
230
|
+
}
|
|
209
231
|
}
|
|
210
232
|
}
|
|
211
233
|
}, {
|
|
@@ -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 = "93.6.
|
|
10
|
+
var packageVersion = "93.6.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
|
|
@@ -21,7 +21,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
21
21
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "93.6.
|
|
24
|
+
var packageVersion = "93.6.3";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect, useRef } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import uuidv4 from 'uuid/v4';
|
|
3
3
|
import { getPropsDifference, getShallowPropsDifference } from '../../../compare-props';
|
|
4
4
|
export function useComponentRenderTracking(_ref) {
|
|
5
5
|
var onRender = _ref.onRender,
|
|
@@ -8,7 +8,7 @@ export function useComponentRenderTracking(_ref) {
|
|
|
8
8
|
zeroBasedCount = _ref$zeroBasedCount === void 0 ? true : _ref$zeroBasedCount;
|
|
9
9
|
var propsRef = useRef();
|
|
10
10
|
var renderCountRef = useRef(zeroBasedCount ? 0 : 1);
|
|
11
|
-
var _useRef = useRef(
|
|
11
|
+
var _useRef = useRef(uuidv4()),
|
|
12
12
|
componentId = _useRef.current;
|
|
13
13
|
useEffect(function () {
|
|
14
14
|
var lastProps = propsRef.current;
|
|
@@ -381,6 +381,7 @@ export interface CollabEditProvider<Events extends CollabEvents = CollabEvents>
|
|
|
381
381
|
initialize(getState: () => any, createStep: (json: object) => Step): this;
|
|
382
382
|
setup(props: {
|
|
383
383
|
getState?: () => EditorState;
|
|
384
|
+
editorApi?: any;
|
|
384
385
|
onSyncUpError?: SyncUpErrorFunction;
|
|
385
386
|
}): this;
|
|
386
387
|
send(tr: Transaction, oldState: EditorState, newState: EditorState): void;
|
|
@@ -381,6 +381,7 @@ export interface CollabEditProvider<Events extends CollabEvents = CollabEvents>
|
|
|
381
381
|
initialize(getState: () => any, createStep: (json: object) => Step): this;
|
|
382
382
|
setup(props: {
|
|
383
383
|
getState?: () => EditorState;
|
|
384
|
+
editorApi?: any;
|
|
384
385
|
onSyncUpError?: SyncUpErrorFunction;
|
|
385
386
|
}): this;
|
|
386
387
|
send(tr: Transaction, oldState: EditorState, newState: EditorState): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "93.6.
|
|
3
|
+
"version": "93.6.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/"
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
"@atlaskit/spinner": "^16.3.0",
|
|
152
152
|
"@atlaskit/task-decision": "^17.11.0",
|
|
153
153
|
"@atlaskit/textfield": "^6.5.0",
|
|
154
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
154
|
+
"@atlaskit/tmp-editor-statsig": "^2.7.0",
|
|
155
155
|
"@atlaskit/tokens": "^2.0.0",
|
|
156
156
|
"@atlaskit/tooltip": "^18.8.0",
|
|
157
157
|
"@atlaskit/ufo": "^0.3.0",
|