@atlaskit/editor-common 103.9.0 → 103.9.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,23 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 103.9.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#139698](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/139698)
8
+ [`cf8ea53ed0264`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/cf8ea53ed0264) -
9
+ Clean-up nested expand feature gate
10
+ - Updated dependencies
11
+
12
+ ## 103.9.1
13
+
14
+ ### Patch Changes
15
+
16
+ - [#140231](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/140231)
17
+ [`c00bd6c36816f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c00bd6c36816f) -
18
+ Editor annotation plugin will now hook into the annotation manager and disable standard behaviour
19
+ when the FG platform_editor_comments_api_manager is enabled.
20
+
3
21
  ## 103.9.0
4
22
 
5
23
  ### 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
- return this.preemptiveGate();
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
- var result = fn();
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.0";
20
+ var packageVersion = "103.9.2";
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.0";
26
+ var packageVersion = "103.9.2";
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
- return this.preemptiveGate();
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
- const result = fn();
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.0";
4
+ const packageVersion = "103.9.2";
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.0";
16
+ const packageVersion = "103.9.2";
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
- return this.preemptiveGate();
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
- var result = fn();
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.0";
10
+ var packageVersion = "103.9.2";
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.0";
23
+ var packageVersion = "103.9.2";
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;
@@ -240,14 +240,6 @@ export type FeatureFlags = {
240
240
 
241
241
  */
242
242
  moreElementsInQuickInsertView?: boolean;
243
- /**
244
- * @description
245
- * Enables nesting nested expands in expands
246
- *
247
- * @see https://hello.jira.atlassian.cloud/browse/FD-72082
248
- * @default false
249
- */
250
- nestedExpandInExpandEx?: boolean;
251
243
  /**
252
244
  * @description
253
245
  * Used by the legacy content macro to disable render tracking due to excessive logs.
@@ -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;
@@ -240,14 +240,6 @@ export type FeatureFlags = {
240
240
 
241
241
  */
242
242
  moreElementsInQuickInsertView?: boolean;
243
- /**
244
- * @description
245
- * Enables nesting nested expands in expands
246
- *
247
- * @see https://hello.jira.atlassian.cloud/browse/FD-72082
248
- * @default false
249
- */
250
- nestedExpandInExpandEx?: boolean;
251
243
  /**
252
244
  * @description
253
245
  * Used by the legacy content macro to disable render tracking due to excessive logs.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "103.9.0",
3
+ "version": "103.9.2",
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/"
@@ -154,14 +154,14 @@
154
154
  "@atlaskit/platform-feature-flags": "^1.1.0",
155
155
  "@atlaskit/popper": "^7.0.0",
156
156
  "@atlaskit/primitives": "^14.4.0",
157
- "@atlaskit/profilecard": "^23.7.0",
157
+ "@atlaskit/profilecard": "^23.8.0",
158
158
  "@atlaskit/section-message": "^8.2.0",
159
159
  "@atlaskit/smart-card": "^36.8.0",
160
160
  "@atlaskit/smart-user-picker": "^8.0.0",
161
161
  "@atlaskit/spinner": "^18.0.0",
162
162
  "@atlaskit/task-decision": "^19.1.0",
163
163
  "@atlaskit/textfield": "^8.0.0",
164
- "@atlaskit/tmp-editor-statsig": "^4.11.0",
164
+ "@atlaskit/tmp-editor-statsig": "^4.12.0",
165
165
  "@atlaskit/tokens": "^4.8.0",
166
166
  "@atlaskit/tooltip": "^20.0.0",
167
167
  "@atlaskit/width-detector": "^5.0.0",