@atlaskit/editor-common 110.18.8 → 110.18.9
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 +8 -0
- package/dist/cjs/experiences/Experience.js +1 -1
- package/dist/cjs/experiences/experience-utils.js +38 -0
- package/dist/cjs/experiences/index.js +14 -1
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/experiences/Experience.js +1 -1
- package/dist/es2019/experiences/experience-utils.js +32 -0
- package/dist/es2019/experiences/index.js +2 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/experiences/Experience.js +1 -1
- package/dist/esm/experiences/experience-utils.js +32 -0
- package/dist/esm/experiences/index.js +2 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/experiences/experience-utils.d.ts +15 -0
- package/dist/types/experiences/index.d.ts +1 -0
- package/dist/types-ts4.5/experiences/experience-utils.d.ts +15 -0
- package/dist/types-ts4.5/experiences/index.d.ts +1 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 110.18.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`610bf07ab4a4f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/610bf07ab4a4f) -
|
|
8
|
+
ED-29611 Editor quick insert experience tracking
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 110.18.8
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -88,7 +88,7 @@ var Experience = exports.Experience = /*#__PURE__*/function () {
|
|
|
88
88
|
}, {
|
|
89
89
|
key: "start",
|
|
90
90
|
value: function start(options) {
|
|
91
|
-
this.startOptions = options
|
|
91
|
+
this.startOptions = options;
|
|
92
92
|
this.ufoExperience.start();
|
|
93
93
|
if (this.isInProgress()) {
|
|
94
94
|
this.startCheck();
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getPopupContainerFromEditorView = exports.containsPopupWithNestedElement = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Checks if a given node contains a popup with a nested element identified by a specific test ID.
|
|
9
|
+
*
|
|
10
|
+
* @param node - The node to check.
|
|
11
|
+
* @param nestedElementQuery - The query to look for the nested element.
|
|
12
|
+
* @returns True if the node contains the popup, false otherwise.
|
|
13
|
+
*/
|
|
14
|
+
var containsPopupWithNestedElement = exports.containsPopupWithNestedElement = function containsPopupWithNestedElement(node, nestedElementQuery) {
|
|
15
|
+
if (!(node instanceof HTMLElement)) {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Check if node itself has the popup attribute and contains the element matching the nestedElementQuery
|
|
20
|
+
if (node.matches('[data-editor-popup="true"]')) {
|
|
21
|
+
return !!node.querySelector(nestedElementQuery);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Check if any direct child with popup attribute contains the element matching the nestedElementQuery
|
|
25
|
+
return !!node.querySelector(":scope > [data-editor-popup=\"true\"] ".concat(nestedElementQuery));
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Searches for the popup container element relative to the provided editor view element.
|
|
30
|
+
*
|
|
31
|
+
* @param editorViewEl - The editor view HTMLElement.
|
|
32
|
+
* @returns The popup container HTMLElement if found, otherwise undefined.
|
|
33
|
+
*/
|
|
34
|
+
var getPopupContainerFromEditorView = exports.getPopupContainerFromEditorView = function getPopupContainerFromEditorView(editorViewEl) {
|
|
35
|
+
var editorContentArea = editorViewEl === null || editorViewEl === void 0 ? void 0 : editorViewEl.closest('.ak-editor-content-area');
|
|
36
|
+
var pluginsComponentsWrapper = editorContentArea === null || editorContentArea === void 0 ? void 0 : editorContentArea.querySelector(':scope > [data-testid="plugins-components-wrapper"]');
|
|
37
|
+
return pluginsComponentsWrapper || undefined;
|
|
38
|
+
};
|
|
@@ -33,8 +33,21 @@ Object.defineProperty(exports, "ExperienceCheckTimeout", {
|
|
|
33
33
|
return _ExperienceCheckTimeout.ExperienceCheckTimeout;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
+
Object.defineProperty(exports, "containsPopupWithNestedElement", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function get() {
|
|
39
|
+
return _experienceUtils.containsPopupWithNestedElement;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "getPopupContainerFromEditorView", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function get() {
|
|
45
|
+
return _experienceUtils.getPopupContainerFromEditorView;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
36
48
|
var _Experience = require("./Experience");
|
|
37
49
|
var _consts = require("./consts");
|
|
38
50
|
var _ExperienceCheckComposite = require("./ExperienceCheckComposite");
|
|
39
51
|
var _ExperienceCheckDomMutation = require("./ExperienceCheckDomMutation");
|
|
40
|
-
var _ExperienceCheckTimeout = require("./ExperienceCheckTimeout");
|
|
52
|
+
var _ExperienceCheckTimeout = require("./ExperienceCheckTimeout");
|
|
53
|
+
var _experienceUtils = require("./experience-utils");
|
|
@@ -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 = "110.18.
|
|
19
|
+
var packageVersion = "110.18.8";
|
|
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 = "110.18.
|
|
27
|
+
var packageVersion = "110.18.8";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -66,7 +66,7 @@ export class Experience {
|
|
|
66
66
|
* @param options.metadata - Optional metadata attached to all subsequent events for this started experience
|
|
67
67
|
*/
|
|
68
68
|
start(options) {
|
|
69
|
-
this.startOptions = options
|
|
69
|
+
this.startOptions = options;
|
|
70
70
|
this.ufoExperience.start();
|
|
71
71
|
if (this.isInProgress()) {
|
|
72
72
|
this.startCheck();
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if a given node contains a popup with a nested element identified by a specific test ID.
|
|
3
|
+
*
|
|
4
|
+
* @param node - The node to check.
|
|
5
|
+
* @param nestedElementQuery - The query to look for the nested element.
|
|
6
|
+
* @returns True if the node contains the popup, false otherwise.
|
|
7
|
+
*/
|
|
8
|
+
export const containsPopupWithNestedElement = (node, nestedElementQuery) => {
|
|
9
|
+
if (!(node instanceof HTMLElement)) {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// Check if node itself has the popup attribute and contains the element matching the nestedElementQuery
|
|
14
|
+
if (node.matches('[data-editor-popup="true"]')) {
|
|
15
|
+
return !!node.querySelector(nestedElementQuery);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// Check if any direct child with popup attribute contains the element matching the nestedElementQuery
|
|
19
|
+
return !!node.querySelector(`:scope > [data-editor-popup="true"] ${nestedElementQuery}`);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Searches for the popup container element relative to the provided editor view element.
|
|
24
|
+
*
|
|
25
|
+
* @param editorViewEl - The editor view HTMLElement.
|
|
26
|
+
* @returns The popup container HTMLElement if found, otherwise undefined.
|
|
27
|
+
*/
|
|
28
|
+
export const getPopupContainerFromEditorView = editorViewEl => {
|
|
29
|
+
const editorContentArea = editorViewEl === null || editorViewEl === void 0 ? void 0 : editorViewEl.closest('.ak-editor-content-area');
|
|
30
|
+
const pluginsComponentsWrapper = editorContentArea === null || editorContentArea === void 0 ? void 0 : editorContentArea.querySelector(':scope > [data-testid="plugins-components-wrapper"]');
|
|
31
|
+
return pluginsComponentsWrapper || undefined;
|
|
32
|
+
};
|
|
@@ -5,4 +5,5 @@ export { Experience } from './Experience';
|
|
|
5
5
|
export { EXPERIENCE_FAILURE_REASON } from './consts';
|
|
6
6
|
export { ExperienceCheckComposite } from './ExperienceCheckComposite';
|
|
7
7
|
export { ExperienceCheckDomMutation } from './ExperienceCheckDomMutation';
|
|
8
|
-
export { ExperienceCheckTimeout } from './ExperienceCheckTimeout';
|
|
8
|
+
export { ExperienceCheckTimeout } from './ExperienceCheckTimeout';
|
|
9
|
+
export { containsPopupWithNestedElement, getPopupContainerFromEditorView } from './experience-utils';
|
|
@@ -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 = "110.18.
|
|
4
|
+
const packageVersion = "110.18.8";
|
|
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 = "110.18.
|
|
17
|
+
const packageVersion = "110.18.8";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -81,7 +81,7 @@ export var Experience = /*#__PURE__*/function () {
|
|
|
81
81
|
}, {
|
|
82
82
|
key: "start",
|
|
83
83
|
value: function start(options) {
|
|
84
|
-
this.startOptions = options
|
|
84
|
+
this.startOptions = options;
|
|
85
85
|
this.ufoExperience.start();
|
|
86
86
|
if (this.isInProgress()) {
|
|
87
87
|
this.startCheck();
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if a given node contains a popup with a nested element identified by a specific test ID.
|
|
3
|
+
*
|
|
4
|
+
* @param node - The node to check.
|
|
5
|
+
* @param nestedElementQuery - The query to look for the nested element.
|
|
6
|
+
* @returns True if the node contains the popup, false otherwise.
|
|
7
|
+
*/
|
|
8
|
+
export var containsPopupWithNestedElement = function containsPopupWithNestedElement(node, nestedElementQuery) {
|
|
9
|
+
if (!(node instanceof HTMLElement)) {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// Check if node itself has the popup attribute and contains the element matching the nestedElementQuery
|
|
14
|
+
if (node.matches('[data-editor-popup="true"]')) {
|
|
15
|
+
return !!node.querySelector(nestedElementQuery);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// Check if any direct child with popup attribute contains the element matching the nestedElementQuery
|
|
19
|
+
return !!node.querySelector(":scope > [data-editor-popup=\"true\"] ".concat(nestedElementQuery));
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Searches for the popup container element relative to the provided editor view element.
|
|
24
|
+
*
|
|
25
|
+
* @param editorViewEl - The editor view HTMLElement.
|
|
26
|
+
* @returns The popup container HTMLElement if found, otherwise undefined.
|
|
27
|
+
*/
|
|
28
|
+
export var getPopupContainerFromEditorView = function getPopupContainerFromEditorView(editorViewEl) {
|
|
29
|
+
var editorContentArea = editorViewEl === null || editorViewEl === void 0 ? void 0 : editorViewEl.closest('.ak-editor-content-area');
|
|
30
|
+
var pluginsComponentsWrapper = editorContentArea === null || editorContentArea === void 0 ? void 0 : editorContentArea.querySelector(':scope > [data-testid="plugins-components-wrapper"]');
|
|
31
|
+
return pluginsComponentsWrapper || undefined;
|
|
32
|
+
};
|
|
@@ -5,4 +5,5 @@ export { Experience } from './Experience';
|
|
|
5
5
|
export { EXPERIENCE_FAILURE_REASON } from './consts';
|
|
6
6
|
export { ExperienceCheckComposite } from './ExperienceCheckComposite';
|
|
7
7
|
export { ExperienceCheckDomMutation } from './ExperienceCheckDomMutation';
|
|
8
|
-
export { ExperienceCheckTimeout } from './ExperienceCheckTimeout';
|
|
8
|
+
export { ExperienceCheckTimeout } from './ExperienceCheckTimeout';
|
|
9
|
+
export { containsPopupWithNestedElement, getPopupContainerFromEditorView } from './experience-utils';
|
|
@@ -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 = "110.18.
|
|
10
|
+
var packageVersion = "110.18.8";
|
|
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 = "110.18.
|
|
24
|
+
var packageVersion = "110.18.8";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if a given node contains a popup with a nested element identified by a specific test ID.
|
|
3
|
+
*
|
|
4
|
+
* @param node - The node to check.
|
|
5
|
+
* @param nestedElementQuery - The query to look for the nested element.
|
|
6
|
+
* @returns True if the node contains the popup, false otherwise.
|
|
7
|
+
*/
|
|
8
|
+
export declare const containsPopupWithNestedElement: (node: Node | null | undefined, nestedElementQuery: string) => boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Searches for the popup container element relative to the provided editor view element.
|
|
11
|
+
*
|
|
12
|
+
* @param editorViewEl - The editor view HTMLElement.
|
|
13
|
+
* @returns The popup container HTMLElement if found, otherwise undefined.
|
|
14
|
+
*/
|
|
15
|
+
export declare const getPopupContainerFromEditorView: (editorViewEl?: HTMLElement | null) => HTMLElement | undefined;
|
|
@@ -5,3 +5,4 @@ export { ExperienceCheckDomMutation } from './ExperienceCheckDomMutation';
|
|
|
5
5
|
export { ExperienceCheckTimeout } from './ExperienceCheckTimeout';
|
|
6
6
|
export type { ExperienceCheck, ExperienceCheckCallback, ExperienceCheckResult, } from './ExperienceCheck';
|
|
7
7
|
export type { ExperienceCheckDomMutationConfig, ExperienceCheckDomMutationObserveConfig, ExperienceDomMutationCheckOptions, } from './ExperienceCheckDomMutation';
|
|
8
|
+
export { containsPopupWithNestedElement, getPopupContainerFromEditorView, } from './experience-utils';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if a given node contains a popup with a nested element identified by a specific test ID.
|
|
3
|
+
*
|
|
4
|
+
* @param node - The node to check.
|
|
5
|
+
* @param nestedElementQuery - The query to look for the nested element.
|
|
6
|
+
* @returns True if the node contains the popup, false otherwise.
|
|
7
|
+
*/
|
|
8
|
+
export declare const containsPopupWithNestedElement: (node: Node | null | undefined, nestedElementQuery: string) => boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Searches for the popup container element relative to the provided editor view element.
|
|
11
|
+
*
|
|
12
|
+
* @param editorViewEl - The editor view HTMLElement.
|
|
13
|
+
* @returns The popup container HTMLElement if found, otherwise undefined.
|
|
14
|
+
*/
|
|
15
|
+
export declare const getPopupContainerFromEditorView: (editorViewEl?: HTMLElement | null) => HTMLElement | undefined;
|
|
@@ -5,3 +5,4 @@ export { ExperienceCheckDomMutation } from './ExperienceCheckDomMutation';
|
|
|
5
5
|
export { ExperienceCheckTimeout } from './ExperienceCheckTimeout';
|
|
6
6
|
export type { ExperienceCheck, ExperienceCheckCallback, ExperienceCheckResult, } from './ExperienceCheck';
|
|
7
7
|
export type { ExperienceCheckDomMutationConfig, ExperienceCheckDomMutationObserveConfig, ExperienceDomMutationCheckOptions, } from './ExperienceCheckDomMutation';
|
|
8
|
+
export { containsPopupWithNestedElement, getPopupContainerFromEditorView, } from './experience-utils';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "110.18.
|
|
3
|
+
"version": "110.18.9",
|
|
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/"
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@atlaskit/primitives": "^16.1.0",
|
|
74
74
|
"@atlaskit/profilecard": "^24.20.0",
|
|
75
75
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
76
|
-
"@atlaskit/react-ufo": "^4.
|
|
76
|
+
"@atlaskit/react-ufo": "^4.13.0",
|
|
77
77
|
"@atlaskit/section-message": "^8.8.0",
|
|
78
78
|
"@atlaskit/smart-card": "^43.4.0",
|
|
79
79
|
"@atlaskit/smart-user-picker": "^8.4.0",
|