@atlaskit/editor-common 103.9.0 → 103.9.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 +9 -0
- package/dist/cjs/annotation/manager.js +15 -10
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/annotation/manager.js +14 -10
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/annotation/manager.js +15 -10
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/annotation/manager.d.ts +1 -0
- package/dist/types-ts4.5/annotation/manager.d.ts +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 103.9.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#140231](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/140231)
|
|
8
|
+
[`c00bd6c36816f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c00bd6c36816f) -
|
|
9
|
+
Editor annotation plugin will now hook into the annotation manager and disable standard behaviour
|
|
10
|
+
when the FG platform_editor_comments_api_manager is enabled.
|
|
11
|
+
|
|
3
12
|
## 103.9.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
|
@@ -25,6 +25,7 @@ var SharedAnnotationManager = exports.SharedAnnotationManager = /*#__PURE__*/fun
|
|
|
25
25
|
(0, _defineProperty2.default)(this, "preemptiveGate", function () {
|
|
26
26
|
return Promise.resolve(true);
|
|
27
27
|
});
|
|
28
|
+
(0, _defineProperty2.default)(this, "activePreemptiveGate", undefined);
|
|
28
29
|
}
|
|
29
30
|
return (0, _createClass2.default)(SharedAnnotationManager, [{
|
|
30
31
|
key: "setPreemptiveGate",
|
|
@@ -35,7 +36,19 @@ var SharedAnnotationManager = exports.SharedAnnotationManager = /*#__PURE__*/fun
|
|
|
35
36
|
}, {
|
|
36
37
|
key: "checkPreemptiveGate",
|
|
37
38
|
value: function checkPreemptiveGate() {
|
|
38
|
-
|
|
39
|
+
var _this = this;
|
|
40
|
+
if (this.activePreemptiveGate) {
|
|
41
|
+
// If the preemptive gate check already in flight then just return the promise
|
|
42
|
+
// and don't call the preemptive gate again.
|
|
43
|
+
// This is to prevent multiple calls to the preemptive gate creating multiple
|
|
44
|
+
// promises that will resolve at different times.
|
|
45
|
+
return Promise.resolve(this.activePreemptiveGate);
|
|
46
|
+
}
|
|
47
|
+
var gate = this.activePreemptiveGate = this.preemptiveGate().then(function (result) {
|
|
48
|
+
_this.activePreemptiveGate = undefined;
|
|
49
|
+
return result;
|
|
50
|
+
});
|
|
51
|
+
return gate;
|
|
39
52
|
}
|
|
40
53
|
}, {
|
|
41
54
|
key: "onDraftAnnotationStarted",
|
|
@@ -106,15 +119,7 @@ var SharedAnnotationManager = exports.SharedAnnotationManager = /*#__PURE__*/fun
|
|
|
106
119
|
};
|
|
107
120
|
}
|
|
108
121
|
try {
|
|
109
|
-
|
|
110
|
-
if (result.success) {
|
|
111
|
-
this.emitter.emit('draftAnnotationStarted', {
|
|
112
|
-
targetElement: result.targetElement,
|
|
113
|
-
inlineNodeTypes: result.inlineNodeTypes,
|
|
114
|
-
actionResult: result.actionResult
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
return result;
|
|
122
|
+
return fn();
|
|
118
123
|
} catch (error) {
|
|
119
124
|
return {
|
|
120
125
|
success: false,
|
|
@@ -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 = "103.9.
|
|
20
|
+
var packageVersion = "103.9.1";
|
|
21
21
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
22
22
|
// Remove URL as it has UGC
|
|
23
23
|
// Ignored via go/ees007
|
|
@@ -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 = "103.9.
|
|
26
|
+
var packageVersion = "103.9.1";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = '0, 8';
|
|
29
29
|
// Ignored via go/ees005
|
|
@@ -13,13 +13,25 @@ export class SharedAnnotationManager {
|
|
|
13
13
|
*/
|
|
14
14
|
_defineProperty(this, "hooks", new Map());
|
|
15
15
|
_defineProperty(this, "preemptiveGate", () => Promise.resolve(true));
|
|
16
|
+
_defineProperty(this, "activePreemptiveGate", undefined);
|
|
16
17
|
}
|
|
17
18
|
setPreemptiveGate(handler) {
|
|
18
19
|
this.preemptiveGate = handler;
|
|
19
20
|
return this;
|
|
20
21
|
}
|
|
21
22
|
checkPreemptiveGate() {
|
|
22
|
-
|
|
23
|
+
if (this.activePreemptiveGate) {
|
|
24
|
+
// If the preemptive gate check already in flight then just return the promise
|
|
25
|
+
// and don't call the preemptive gate again.
|
|
26
|
+
// This is to prevent multiple calls to the preemptive gate creating multiple
|
|
27
|
+
// promises that will resolve at different times.
|
|
28
|
+
return Promise.resolve(this.activePreemptiveGate);
|
|
29
|
+
}
|
|
30
|
+
const gate = this.activePreemptiveGate = this.preemptiveGate().then(result => {
|
|
31
|
+
this.activePreemptiveGate = undefined;
|
|
32
|
+
return result;
|
|
33
|
+
});
|
|
34
|
+
return gate;
|
|
23
35
|
}
|
|
24
36
|
onDraftAnnotationStarted(handler) {
|
|
25
37
|
this.emitter.on('draftAnnotationStarted', handler);
|
|
@@ -72,15 +84,7 @@ export class SharedAnnotationManager {
|
|
|
72
84
|
};
|
|
73
85
|
}
|
|
74
86
|
try {
|
|
75
|
-
|
|
76
|
-
if (result.success) {
|
|
77
|
-
this.emitter.emit('draftAnnotationStarted', {
|
|
78
|
-
targetElement: result.targetElement,
|
|
79
|
-
inlineNodeTypes: result.inlineNodeTypes,
|
|
80
|
-
actionResult: result.actionResult
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
return result;
|
|
87
|
+
return fn();
|
|
84
88
|
} catch (error) {
|
|
85
89
|
return {
|
|
86
90
|
success: false,
|
|
@@ -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 = "103.9.
|
|
4
|
+
const packageVersion = "103.9.1";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// Ignored via go/ees007
|
|
@@ -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 = "103.9.
|
|
16
|
+
const packageVersion = "103.9.1";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
// Ignored via go/ees005
|
|
@@ -18,6 +18,7 @@ export var SharedAnnotationManager = /*#__PURE__*/function () {
|
|
|
18
18
|
_defineProperty(this, "preemptiveGate", function () {
|
|
19
19
|
return Promise.resolve(true);
|
|
20
20
|
});
|
|
21
|
+
_defineProperty(this, "activePreemptiveGate", undefined);
|
|
21
22
|
}
|
|
22
23
|
return _createClass(SharedAnnotationManager, [{
|
|
23
24
|
key: "setPreemptiveGate",
|
|
@@ -28,7 +29,19 @@ export var SharedAnnotationManager = /*#__PURE__*/function () {
|
|
|
28
29
|
}, {
|
|
29
30
|
key: "checkPreemptiveGate",
|
|
30
31
|
value: function checkPreemptiveGate() {
|
|
31
|
-
|
|
32
|
+
var _this = this;
|
|
33
|
+
if (this.activePreemptiveGate) {
|
|
34
|
+
// If the preemptive gate check already in flight then just return the promise
|
|
35
|
+
// and don't call the preemptive gate again.
|
|
36
|
+
// This is to prevent multiple calls to the preemptive gate creating multiple
|
|
37
|
+
// promises that will resolve at different times.
|
|
38
|
+
return Promise.resolve(this.activePreemptiveGate);
|
|
39
|
+
}
|
|
40
|
+
var gate = this.activePreemptiveGate = this.preemptiveGate().then(function (result) {
|
|
41
|
+
_this.activePreemptiveGate = undefined;
|
|
42
|
+
return result;
|
|
43
|
+
});
|
|
44
|
+
return gate;
|
|
32
45
|
}
|
|
33
46
|
}, {
|
|
34
47
|
key: "onDraftAnnotationStarted",
|
|
@@ -99,15 +112,7 @@ export var SharedAnnotationManager = /*#__PURE__*/function () {
|
|
|
99
112
|
};
|
|
100
113
|
}
|
|
101
114
|
try {
|
|
102
|
-
|
|
103
|
-
if (result.success) {
|
|
104
|
-
this.emitter.emit('draftAnnotationStarted', {
|
|
105
|
-
targetElement: result.targetElement,
|
|
106
|
-
inlineNodeTypes: result.inlineNodeTypes,
|
|
107
|
-
actionResult: result.actionResult
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
return result;
|
|
115
|
+
return fn();
|
|
111
116
|
} catch (error) {
|
|
112
117
|
return {
|
|
113
118
|
success: false,
|
|
@@ -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 = "103.9.
|
|
10
|
+
var packageVersion = "103.9.1";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// Ignored via go/ees007
|
|
@@ -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 = "103.9.
|
|
23
|
+
var packageVersion = "103.9.1";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
// Ignored via go/ees005
|
|
@@ -12,6 +12,7 @@ export declare class SharedAnnotationManager implements AnnotationManager {
|
|
|
12
12
|
*/
|
|
13
13
|
private hooks;
|
|
14
14
|
private preemptiveGate;
|
|
15
|
+
private activePreemptiveGate;
|
|
15
16
|
setPreemptiveGate(handler: () => Promise<boolean>): AnnotationManager;
|
|
16
17
|
checkPreemptiveGate(): Promise<boolean>;
|
|
17
18
|
onDraftAnnotationStarted(handler: (data: AnnotationDraftStartedData) => void): AnnotationManager;
|
|
@@ -12,6 +12,7 @@ export declare class SharedAnnotationManager implements AnnotationManager {
|
|
|
12
12
|
*/
|
|
13
13
|
private hooks;
|
|
14
14
|
private preemptiveGate;
|
|
15
|
+
private activePreemptiveGate;
|
|
15
16
|
setPreemptiveGate(handler: () => Promise<boolean>): AnnotationManager;
|
|
16
17
|
checkPreemptiveGate(): Promise<boolean>;
|
|
17
18
|
onDraftAnnotationStarted(handler: (data: AnnotationDraftStartedData) => void): AnnotationManager;
|
package/package.json
CHANGED