@atlaskit/editor-common 110.18.3 → 110.18.5
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 +21 -0
- package/dist/cjs/experiences/Experience.js +63 -23
- package/dist/cjs/experiences/ExperienceCheck.js +5 -1
- package/dist/cjs/experiences/ExperienceCheckDomMutation.js +6 -2
- package/dist/cjs/experiences/ExperienceCheckTimeout.js +24 -8
- package/dist/cjs/extensions/module-helpers.js +10 -6
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/provider-factory/with-providers.js +1 -2
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/Popup/index.js +12 -1
- package/dist/es2019/experiences/Experience.js +63 -22
- package/dist/es2019/experiences/ExperienceCheck.js +1 -0
- package/dist/es2019/experiences/ExperienceCheckDomMutation.js +6 -2
- package/dist/es2019/experiences/ExperienceCheckTimeout.js +21 -8
- package/dist/es2019/extensions/module-helpers.js +4 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/provider-factory/with-providers.js +1 -2
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/Popup/index.js +10 -0
- package/dist/esm/experiences/Experience.js +63 -23
- package/dist/esm/experiences/ExperienceCheck.js +1 -0
- package/dist/esm/experiences/ExperienceCheckDomMutation.js +6 -2
- package/dist/esm/experiences/ExperienceCheckTimeout.js +24 -8
- package/dist/esm/extensions/module-helpers.js +10 -6
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/provider-factory/with-providers.js +1 -2
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/Popup/index.js +12 -1
- package/dist/types/analytics/types/general-events.d.ts +4 -1
- package/dist/types/experiences/Experience.d.ts +43 -12
- package/dist/types/experiences/ExperienceCheck.d.ts +5 -7
- package/dist/types/experiences/ExperienceCheckDomMutation.d.ts +16 -6
- package/dist/types/experiences/ExperienceCheckTimeout.d.ts +19 -4
- package/dist/types/extensions/types/utils.d.ts +1 -0
- package/dist/types/ui/Popup/index.d.ts +1 -0
- package/dist/types-ts4.5/analytics/types/general-events.d.ts +4 -1
- package/dist/types-ts4.5/experiences/Experience.d.ts +43 -12
- package/dist/types-ts4.5/experiences/ExperienceCheck.d.ts +5 -7
- package/dist/types-ts4.5/experiences/ExperienceCheckDomMutation.d.ts +16 -6
- package/dist/types-ts4.5/experiences/ExperienceCheckTimeout.d.ts +19 -4
- package/dist/types-ts4.5/extensions/types/utils.d.ts +1 -0
- package/dist/types-ts4.5/ui/Popup/index.d.ts +1 -0
- package/package.json +9 -3
- package/afm-dev-agents/tsconfig.json +0 -195
- package/afm-passionfruit/tsconfig.json +0 -195
- package/afm-rovo-extension/tsconfig.json +0 -195
- package/afm-volt/tsconfig.json +0 -183
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 110.18.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`822ed20eeca65`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/822ed20eeca65) -
|
|
8
|
+
Clean up platform_editor_fix_unsubscribe_of_provider
|
|
9
|
+
- [`7aff1e36b43e1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7aff1e36b43e1) -
|
|
10
|
+
Improve editor selection toolbar experience tracking
|
|
11
|
+
- [`3cbddf575e48e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3cbddf575e48e) -
|
|
12
|
+
platform_editor_ai_open_chat_general_ai_fg clean up
|
|
13
|
+
|
|
14
|
+
## 110.18.4
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [`9842848622554`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9842848622554) -
|
|
19
|
+
ENGHEALTH-23797:Fixed aria prohibited attr from selection marker
|
|
20
|
+
- [`e27eb4901d2c1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e27eb4901d2c1) -
|
|
21
|
+
EDITOR-1794 Added ask rovo button click analytics
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
|
|
3
24
|
## 110.18.3
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -5,10 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.Experience = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
8
9
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
10
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
11
|
var _ufo = require("@atlaskit/ufo");
|
|
11
12
|
var _ExperienceCheckComposite = require("./ExperienceCheckComposite");
|
|
13
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
15
|
var PROGRESS_STATES = [_ufo.UFOExperienceState.STARTED.id, _ufo.UFOExperienceState.IN_PROGRESS.id];
|
|
13
16
|
var Experience = exports.Experience = /*#__PURE__*/function () {
|
|
14
17
|
function Experience(id) {
|
|
@@ -38,11 +41,18 @@ var Experience = exports.Experience = /*#__PURE__*/function () {
|
|
|
38
41
|
var _this = this;
|
|
39
42
|
this.stopCheck();
|
|
40
43
|
this.check.start(function (result) {
|
|
44
|
+
var metadata = result.metadata;
|
|
41
45
|
if (result.status === 'success') {
|
|
42
|
-
_this.success(
|
|
43
|
-
|
|
46
|
+
_this.success({
|
|
47
|
+
metadata: metadata
|
|
48
|
+
});
|
|
49
|
+
} else if (result.status === 'abort') {
|
|
50
|
+
_this.abort({
|
|
51
|
+
metadata: metadata
|
|
52
|
+
});
|
|
53
|
+
} else if (result.status === 'failure') {
|
|
44
54
|
_this.failure({
|
|
45
|
-
|
|
55
|
+
metadata: metadata
|
|
46
56
|
});
|
|
47
57
|
}
|
|
48
58
|
});
|
|
@@ -57,13 +67,28 @@ var Experience = exports.Experience = /*#__PURE__*/function () {
|
|
|
57
67
|
value: function isInProgress() {
|
|
58
68
|
return PROGRESS_STATES.includes(this.ufoExperience.state.id);
|
|
59
69
|
}
|
|
70
|
+
}, {
|
|
71
|
+
key: "getEndStateConfig",
|
|
72
|
+
value: function getEndStateConfig(options) {
|
|
73
|
+
var _this$startOptions, _this$startOptions2;
|
|
74
|
+
return {
|
|
75
|
+
metadata: options !== null && options !== void 0 && options.metadata || (_this$startOptions = this.startOptions) !== null && _this$startOptions !== void 0 && _this$startOptions.metadata ? _objectSpread(_objectSpread({}, (_this$startOptions2 = this.startOptions) === null || _this$startOptions2 === void 0 ? void 0 : _this$startOptions2.metadata), options === null || options === void 0 ? void 0 : options.metadata) : undefined
|
|
76
|
+
};
|
|
77
|
+
}
|
|
60
78
|
|
|
61
79
|
/**
|
|
62
|
-
* Starts
|
|
80
|
+
* Starts tracking the experience and all checks which monitor for completion.
|
|
81
|
+
*
|
|
82
|
+
* If the experience is already in progress, this will restart the checks.
|
|
83
|
+
* Metadata from options will be merged with any end state metadata.
|
|
84
|
+
*
|
|
85
|
+
* @param options - Configuration for starting the experience
|
|
86
|
+
* @param options.metadata - Optional metadata attached to all subsequent events for this started experience
|
|
63
87
|
*/
|
|
64
88
|
}, {
|
|
65
89
|
key: "start",
|
|
66
|
-
value: function start() {
|
|
90
|
+
value: function start(options) {
|
|
91
|
+
this.startOptions = options === null || options === void 0 ? void 0 : options.metadata;
|
|
67
92
|
this.ufoExperience.start();
|
|
68
93
|
if (this.isInProgress()) {
|
|
69
94
|
this.startCheck();
|
|
@@ -71,43 +96,58 @@ var Experience = exports.Experience = /*#__PURE__*/function () {
|
|
|
71
96
|
}
|
|
72
97
|
|
|
73
98
|
/**
|
|
74
|
-
*
|
|
99
|
+
* Marks the experience as successful and stops any ongoing checks.
|
|
100
|
+
*
|
|
101
|
+
* Use this when the experience completes as expected.
|
|
102
|
+
*
|
|
103
|
+
* @param options - Configuration for the success event
|
|
104
|
+
* @param options.metadata - Optional metadata attached to the success event
|
|
75
105
|
*/
|
|
76
106
|
}, {
|
|
77
107
|
key: "success",
|
|
78
|
-
value: function success() {
|
|
108
|
+
value: function success(options) {
|
|
79
109
|
this.stopCheck();
|
|
80
|
-
this.ufoExperience.success();
|
|
110
|
+
this.ufoExperience.success(this.getEndStateConfig(options));
|
|
111
|
+
this.startOptions = undefined;
|
|
81
112
|
}
|
|
82
113
|
|
|
83
114
|
/**
|
|
84
|
-
*
|
|
115
|
+
* Aborts the experience and stops any ongoing checks.
|
|
116
|
+
*
|
|
117
|
+
* Use this when a started experience terminates early due to user action or context change
|
|
118
|
+
* (e.g., component unmount, navigation). This is neither success nor failure.
|
|
85
119
|
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
120
|
+
* @param options - Configuration for the abort event
|
|
121
|
+
* @param options.metadata - Optional metadata attached to the abort event
|
|
122
|
+
*
|
|
123
|
+
* @example
|
|
124
|
+
* // Abort on component unmount
|
|
125
|
+
* useEffect(() => {
|
|
126
|
+
* return () => experience.abort({ metadata: { reason: 'unmount' } });
|
|
127
|
+
* }, []);
|
|
88
128
|
*/
|
|
89
129
|
}, {
|
|
90
130
|
key: "abort",
|
|
91
|
-
value: function abort() {
|
|
131
|
+
value: function abort(options) {
|
|
92
132
|
this.stopCheck();
|
|
93
|
-
this.ufoExperience.abort();
|
|
133
|
+
this.ufoExperience.abort(this.getEndStateConfig(options));
|
|
134
|
+
this.startOptions = undefined;
|
|
94
135
|
}
|
|
95
136
|
|
|
96
137
|
/**
|
|
97
|
-
* Manually
|
|
138
|
+
* Manually marks the experience as failed and stops any ongoing checks.
|
|
139
|
+
*
|
|
140
|
+
* Use this for actual failures in the experience flow (e.g., timeout, error conditions).
|
|
141
|
+
*
|
|
142
|
+
* @param options - Configuration for the failure event
|
|
143
|
+
* @param options.metadata - Optional metadata attached to the failure event
|
|
98
144
|
*/
|
|
99
145
|
}, {
|
|
100
146
|
key: "failure",
|
|
101
|
-
value: function failure() {
|
|
102
|
-
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
103
|
-
_ref$reason = _ref.reason,
|
|
104
|
-
reason = _ref$reason === void 0 ? 'error' : _ref$reason;
|
|
147
|
+
value: function failure(options) {
|
|
105
148
|
this.stopCheck();
|
|
106
|
-
this.ufoExperience.failure(
|
|
107
|
-
|
|
108
|
-
reason: reason
|
|
109
|
-
}
|
|
110
|
-
});
|
|
149
|
+
this.ufoExperience.failure(this.getEndStateConfig(options));
|
|
150
|
+
this.startOptions = undefined;
|
|
111
151
|
}
|
|
112
152
|
}]);
|
|
113
153
|
}();
|
|
@@ -33,7 +33,9 @@ var ExperienceCheckDomMutation = exports.ExperienceCheckDomMutation = /*#__PURE_
|
|
|
33
33
|
if (!(config !== null && config !== void 0 && config.target)) {
|
|
34
34
|
callback({
|
|
35
35
|
status: 'failure',
|
|
36
|
-
|
|
36
|
+
metadata: {
|
|
37
|
+
reason: _consts.EXPERIENCE_FAILURE_REASON.DOM_MUTATION_TARGET_NOT_FOUND
|
|
38
|
+
}
|
|
37
39
|
});
|
|
38
40
|
return;
|
|
39
41
|
}
|
|
@@ -48,7 +50,9 @@ var ExperienceCheckDomMutation = exports.ExperienceCheckDomMutation = /*#__PURE_
|
|
|
48
50
|
} catch (error) {
|
|
49
51
|
callback({
|
|
50
52
|
status: 'failure',
|
|
51
|
-
|
|
53
|
+
metadata: {
|
|
54
|
+
reason: _consts.EXPERIENCE_FAILURE_REASON.DOM_MUTATION_CHECK_ERROR
|
|
55
|
+
}
|
|
52
56
|
});
|
|
53
57
|
}
|
|
54
58
|
});
|
|
@@ -7,27 +7,43 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.ExperienceCheckTimeout = void 0;
|
|
8
8
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
9
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
11
|
var _consts = require("./consts");
|
|
12
|
+
var DEFAULT_FAILURE_RESULT = {
|
|
13
|
+
status: 'failure',
|
|
14
|
+
metadata: {
|
|
15
|
+
reason: _consts.EXPERIENCE_FAILURE_REASON.TIMEOUT
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
|
|
11
19
|
/**
|
|
12
20
|
* Check for the completion of an experience based on a timeout
|
|
13
21
|
*
|
|
14
|
-
*
|
|
22
|
+
* By default, will result in failure with reason 'timeout' after the specified duration.
|
|
23
|
+
*
|
|
24
|
+
* Can be customized for different results on timeout via the onTimeout callback.
|
|
15
25
|
*/
|
|
16
26
|
var ExperienceCheckTimeout = exports.ExperienceCheckTimeout = /*#__PURE__*/function () {
|
|
17
|
-
function ExperienceCheckTimeout(
|
|
27
|
+
function ExperienceCheckTimeout(_ref) {
|
|
28
|
+
var durationMs = _ref.durationMs,
|
|
29
|
+
_ref$onTimeout = _ref.onTimeout,
|
|
30
|
+
onTimeout = _ref$onTimeout === void 0 ? function () {
|
|
31
|
+
return DEFAULT_FAILURE_RESULT;
|
|
32
|
+
} : _ref$onTimeout;
|
|
18
33
|
(0, _classCallCheck2.default)(this, ExperienceCheckTimeout);
|
|
19
|
-
this
|
|
34
|
+
(0, _defineProperty2.default)(this, "durationMs", 0);
|
|
35
|
+
this.durationMs = durationMs;
|
|
36
|
+
this.onTimeout = onTimeout;
|
|
20
37
|
}
|
|
21
38
|
return (0, _createClass2.default)(ExperienceCheckTimeout, [{
|
|
22
39
|
key: "start",
|
|
23
40
|
value: function start(callback) {
|
|
41
|
+
var _this = this;
|
|
24
42
|
this.stop();
|
|
25
43
|
this.timeoutId = setTimeout(function () {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
});
|
|
30
|
-
}, this.maxDurationMs);
|
|
44
|
+
var result = _this.onTimeout() || DEFAULT_FAILURE_RESULT;
|
|
45
|
+
callback(result);
|
|
46
|
+
}, this.durationMs);
|
|
31
47
|
}
|
|
32
48
|
}, {
|
|
33
49
|
key: "stop",
|
|
@@ -11,15 +11,16 @@ exports.getContextualToolbarItemsFromModule = void 0;
|
|
|
11
11
|
exports.getExtensionAutoConvertersFromProvider = getExtensionAutoConvertersFromProvider;
|
|
12
12
|
exports.groupBy = exports.getQuickInsertItemsFromModule = void 0;
|
|
13
13
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
14
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
14
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
16
15
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
16
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
18
|
var _manifestHelpers = require("./manifest-helpers");
|
|
18
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20
19
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
21
20
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
22
21
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
22
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23
24
|
var groupBy = exports.groupBy = function groupBy(arr, attr, keyRenamer) {
|
|
24
25
|
return (
|
|
25
26
|
// Ignored via go/ees005
|
|
@@ -37,7 +38,7 @@ function buildMenuItem(manifest, extensionModule) {
|
|
|
37
38
|
if (!node) {
|
|
38
39
|
throw new Error("Couldn't find any action for ".concat(title, " (").concat(key, ")"));
|
|
39
40
|
}
|
|
40
|
-
return {
|
|
41
|
+
return _objectSpread(_objectSpread({
|
|
41
42
|
key: key,
|
|
42
43
|
title: title,
|
|
43
44
|
extensionType: manifest.type,
|
|
@@ -47,10 +48,13 @@ function buildMenuItem(manifest, extensionModule) {
|
|
|
47
48
|
categories: extensionModule.categories || manifest.categories || [],
|
|
48
49
|
description: extensionModule.description || manifest.description,
|
|
49
50
|
summary: manifest.summary,
|
|
50
|
-
documentationUrl: manifest.documentationUrl
|
|
51
|
+
documentationUrl: manifest.documentationUrl
|
|
52
|
+
}, (0, _platformFeatureFlags.fg)('cc_fd_wb_create_priority_in_slash_menu_enabled') && {
|
|
53
|
+
priority: extensionModule.priority
|
|
54
|
+
}), {}, {
|
|
51
55
|
icon: extensionModule.icon || manifest.icons['48'],
|
|
52
56
|
node: node
|
|
53
|
-
};
|
|
57
|
+
});
|
|
54
58
|
}
|
|
55
59
|
var getQuickInsertItemsFromModule = exports.getQuickInsertItemsFromModule = function getQuickInsertItemsFromModule(extensions, transformFunction) {
|
|
56
60
|
var _ref;
|
|
@@ -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 = "
|
|
19
|
+
var packageVersion = "110.18.4";
|
|
20
20
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
21
21
|
// Remove URL as it has UGC
|
|
22
22
|
// Ignored via go/ees007
|
|
@@ -12,7 +12,6 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
12
12
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
14
|
var _react = require("react");
|
|
15
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
15
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
16
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18
17
|
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)); }
|
|
@@ -71,7 +70,7 @@ var WithProviders = exports.WithProviders = /*#__PURE__*/function (_PureComponen
|
|
|
71
70
|
providers = _this$props.providers,
|
|
72
71
|
providerFactory = _this$props.providerFactory;
|
|
73
72
|
providers.forEach(function (name) {
|
|
74
|
-
providerFactory.unsubscribe(name,
|
|
73
|
+
providerFactory.unsubscribe(name, _this2.handleProviderIfMounted);
|
|
75
74
|
});
|
|
76
75
|
}
|
|
77
76
|
}, {
|
|
@@ -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 = "
|
|
27
|
+
var packageVersion = "110.18.4";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -310,7 +310,8 @@ var Popup = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
310
310
|
}, {
|
|
311
311
|
key: "renderPopup",
|
|
312
312
|
value: function renderPopup() {
|
|
313
|
-
var _this$props$ariaLabel
|
|
313
|
+
var _this$props$ariaLabel,
|
|
314
|
+
_this3 = this;
|
|
314
315
|
var position = this.state.position;
|
|
315
316
|
var shouldRenderPopup = this.props.shouldRenderPopup;
|
|
316
317
|
if (shouldRenderPopup && !shouldRenderPopup(position || {})) {
|
|
@@ -323,6 +324,15 @@ var Popup = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
323
324
|
* It is meaningless for screen readers and causes confusion.
|
|
324
325
|
*/
|
|
325
326
|
var ariaLabel = (0, _platformFeatureFlags.fg)('editor_a11y_aria_label_removal_popup') ? (_this$props$ariaLabel = this.props.ariaLabel) !== null && _this$props$ariaLabel !== void 0 ? _this$props$ariaLabel : undefined : this.props.ariaLabel === null ? undefined : this.props.ariaLabel || 'Popup';
|
|
327
|
+
var getRole = function getRole() {
|
|
328
|
+
// Provide a valid role only when aria-label is present to satisfy a11y rules, as when aria-label is present, role is required
|
|
329
|
+
// use role = dialog as default role, as dialog role itself is not a parent role that requires specific children to function as some other ARIA roles(menu) do
|
|
330
|
+
// if set default role to menu, tons of integration tests will fail as many of our popup usages do not have children that satisfy menu role requirements
|
|
331
|
+
if (ariaLabel && (0, _platformFeatureFlags.fg)('platform_editor_a11y_add_role_to_popup')) {
|
|
332
|
+
return _this3.props.role || 'dialog';
|
|
333
|
+
}
|
|
334
|
+
return undefined;
|
|
335
|
+
};
|
|
326
336
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
327
337
|
ref: this.handleRef,
|
|
328
338
|
style: _objectSpread(_objectSpread({
|
|
@@ -331,6 +341,7 @@ var Popup = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
331
341
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
332
342
|
zIndex: this.props.zIndex || _editorSharedStyles.akEditorFloatingPanelZIndex
|
|
333
343
|
}, position), this.props.style),
|
|
344
|
+
role: getRole(),
|
|
334
345
|
"aria-label": ariaLabel,
|
|
335
346
|
"data-testid": "popup-wrapper"
|
|
336
347
|
// Indicates component is an editor pop. Required for focus handling in Message.tsx
|
|
@@ -22,11 +22,20 @@ export class Experience {
|
|
|
22
22
|
startCheck() {
|
|
23
23
|
this.stopCheck();
|
|
24
24
|
this.check.start(result => {
|
|
25
|
+
const {
|
|
26
|
+
metadata
|
|
27
|
+
} = result;
|
|
25
28
|
if (result.status === 'success') {
|
|
26
|
-
this.success(
|
|
27
|
-
|
|
29
|
+
this.success({
|
|
30
|
+
metadata
|
|
31
|
+
});
|
|
32
|
+
} else if (result.status === 'abort') {
|
|
33
|
+
this.abort({
|
|
34
|
+
metadata
|
|
35
|
+
});
|
|
36
|
+
} else if (result.status === 'failure') {
|
|
28
37
|
this.failure({
|
|
29
|
-
|
|
38
|
+
metadata
|
|
30
39
|
});
|
|
31
40
|
}
|
|
32
41
|
});
|
|
@@ -37,11 +46,27 @@ export class Experience {
|
|
|
37
46
|
isInProgress() {
|
|
38
47
|
return PROGRESS_STATES.includes(this.ufoExperience.state.id);
|
|
39
48
|
}
|
|
49
|
+
getEndStateConfig(options) {
|
|
50
|
+
var _this$startOptions, _this$startOptions2;
|
|
51
|
+
return {
|
|
52
|
+
metadata: options !== null && options !== void 0 && options.metadata || (_this$startOptions = this.startOptions) !== null && _this$startOptions !== void 0 && _this$startOptions.metadata ? {
|
|
53
|
+
...((_this$startOptions2 = this.startOptions) === null || _this$startOptions2 === void 0 ? void 0 : _this$startOptions2.metadata),
|
|
54
|
+
...(options === null || options === void 0 ? void 0 : options.metadata)
|
|
55
|
+
} : undefined
|
|
56
|
+
};
|
|
57
|
+
}
|
|
40
58
|
|
|
41
59
|
/**
|
|
42
|
-
* Starts
|
|
60
|
+
* Starts tracking the experience and all checks which monitor for completion.
|
|
61
|
+
*
|
|
62
|
+
* If the experience is already in progress, this will restart the checks.
|
|
63
|
+
* Metadata from options will be merged with any end state metadata.
|
|
64
|
+
*
|
|
65
|
+
* @param options - Configuration for starting the experience
|
|
66
|
+
* @param options.metadata - Optional metadata attached to all subsequent events for this started experience
|
|
43
67
|
*/
|
|
44
|
-
start() {
|
|
68
|
+
start(options) {
|
|
69
|
+
this.startOptions = options === null || options === void 0 ? void 0 : options.metadata;
|
|
45
70
|
this.ufoExperience.start();
|
|
46
71
|
if (this.isInProgress()) {
|
|
47
72
|
this.startCheck();
|
|
@@ -49,35 +74,51 @@ export class Experience {
|
|
|
49
74
|
}
|
|
50
75
|
|
|
51
76
|
/**
|
|
52
|
-
*
|
|
77
|
+
* Marks the experience as successful and stops any ongoing checks.
|
|
78
|
+
*
|
|
79
|
+
* Use this when the experience completes as expected.
|
|
80
|
+
*
|
|
81
|
+
* @param options - Configuration for the success event
|
|
82
|
+
* @param options.metadata - Optional metadata attached to the success event
|
|
53
83
|
*/
|
|
54
|
-
success() {
|
|
84
|
+
success(options) {
|
|
55
85
|
this.stopCheck();
|
|
56
|
-
this.ufoExperience.success();
|
|
86
|
+
this.ufoExperience.success(this.getEndStateConfig(options));
|
|
87
|
+
this.startOptions = undefined;
|
|
57
88
|
}
|
|
58
89
|
|
|
59
90
|
/**
|
|
60
|
-
*
|
|
91
|
+
* Aborts the experience and stops any ongoing checks.
|
|
61
92
|
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
93
|
+
* Use this when a started experience terminates early due to user action or context change
|
|
94
|
+
* (e.g., component unmount, navigation). This is neither success nor failure.
|
|
95
|
+
*
|
|
96
|
+
* @param options - Configuration for the abort event
|
|
97
|
+
* @param options.metadata - Optional metadata attached to the abort event
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* // Abort on component unmount
|
|
101
|
+
* useEffect(() => {
|
|
102
|
+
* return () => experience.abort({ metadata: { reason: 'unmount' } });
|
|
103
|
+
* }, []);
|
|
64
104
|
*/
|
|
65
|
-
abort() {
|
|
105
|
+
abort(options) {
|
|
66
106
|
this.stopCheck();
|
|
67
|
-
this.ufoExperience.abort();
|
|
107
|
+
this.ufoExperience.abort(this.getEndStateConfig(options));
|
|
108
|
+
this.startOptions = undefined;
|
|
68
109
|
}
|
|
69
110
|
|
|
70
111
|
/**
|
|
71
|
-
* Manually
|
|
112
|
+
* Manually marks the experience as failed and stops any ongoing checks.
|
|
113
|
+
*
|
|
114
|
+
* Use this for actual failures in the experience flow (e.g., timeout, error conditions).
|
|
115
|
+
*
|
|
116
|
+
* @param options - Configuration for the failure event
|
|
117
|
+
* @param options.metadata - Optional metadata attached to the failure event
|
|
72
118
|
*/
|
|
73
|
-
failure({
|
|
74
|
-
reason = 'error'
|
|
75
|
-
} = {}) {
|
|
119
|
+
failure(options) {
|
|
76
120
|
this.stopCheck();
|
|
77
|
-
this.ufoExperience.failure(
|
|
78
|
-
|
|
79
|
-
reason
|
|
80
|
-
}
|
|
81
|
-
});
|
|
121
|
+
this.ufoExperience.failure(this.getEndStateConfig(options));
|
|
122
|
+
this.startOptions = undefined;
|
|
82
123
|
}
|
|
83
124
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -21,7 +21,9 @@ export class ExperienceCheckDomMutation {
|
|
|
21
21
|
if (!(config !== null && config !== void 0 && config.target)) {
|
|
22
22
|
callback({
|
|
23
23
|
status: 'failure',
|
|
24
|
-
|
|
24
|
+
metadata: {
|
|
25
|
+
reason: EXPERIENCE_FAILURE_REASON.DOM_MUTATION_TARGET_NOT_FOUND
|
|
26
|
+
}
|
|
25
27
|
});
|
|
26
28
|
return;
|
|
27
29
|
}
|
|
@@ -36,7 +38,9 @@ export class ExperienceCheckDomMutation {
|
|
|
36
38
|
} catch (error) {
|
|
37
39
|
callback({
|
|
38
40
|
status: 'failure',
|
|
39
|
-
|
|
41
|
+
metadata: {
|
|
42
|
+
reason: EXPERIENCE_FAILURE_REASON.DOM_MUTATION_CHECK_ERROR
|
|
43
|
+
}
|
|
40
44
|
});
|
|
41
45
|
}
|
|
42
46
|
});
|
|
@@ -1,21 +1,34 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
1
2
|
import { EXPERIENCE_FAILURE_REASON } from './consts';
|
|
3
|
+
const DEFAULT_FAILURE_RESULT = {
|
|
4
|
+
status: 'failure',
|
|
5
|
+
metadata: {
|
|
6
|
+
reason: EXPERIENCE_FAILURE_REASON.TIMEOUT
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
|
|
2
10
|
/**
|
|
3
11
|
* Check for the completion of an experience based on a timeout
|
|
4
12
|
*
|
|
5
|
-
*
|
|
13
|
+
* By default, will result in failure with reason 'timeout' after the specified duration.
|
|
14
|
+
*
|
|
15
|
+
* Can be customized for different results on timeout via the onTimeout callback.
|
|
6
16
|
*/
|
|
7
17
|
export class ExperienceCheckTimeout {
|
|
8
|
-
constructor(
|
|
9
|
-
|
|
18
|
+
constructor({
|
|
19
|
+
durationMs,
|
|
20
|
+
onTimeout = () => DEFAULT_FAILURE_RESULT
|
|
21
|
+
}) {
|
|
22
|
+
_defineProperty(this, "durationMs", 0);
|
|
23
|
+
this.durationMs = durationMs;
|
|
24
|
+
this.onTimeout = onTimeout;
|
|
10
25
|
}
|
|
11
26
|
start(callback) {
|
|
12
27
|
this.stop();
|
|
13
28
|
this.timeoutId = setTimeout(() => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
});
|
|
18
|
-
}, this.maxDurationMs);
|
|
29
|
+
const result = this.onTimeout() || DEFAULT_FAILURE_RESULT;
|
|
30
|
+
callback(result);
|
|
31
|
+
}, this.durationMs);
|
|
19
32
|
}
|
|
20
33
|
stop() {
|
|
21
34
|
if (this.timeoutId) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
1
2
|
import { buildAction } from './manifest-helpers';
|
|
2
3
|
export const groupBy = (arr, attr, keyRenamer) =>
|
|
3
4
|
// Ignored via go/ees005
|
|
@@ -24,6 +25,9 @@ export function buildMenuItem(manifest, extensionModule) {
|
|
|
24
25
|
description: extensionModule.description || manifest.description,
|
|
25
26
|
summary: manifest.summary,
|
|
26
27
|
documentationUrl: manifest.documentationUrl,
|
|
28
|
+
...(fg('cc_fd_wb_create_priority_in_slash_menu_enabled') && {
|
|
29
|
+
priority: extensionModule.priority
|
|
30
|
+
}),
|
|
27
31
|
icon: extensionModule.icon || manifest.icons['48'],
|
|
28
32
|
node
|
|
29
33
|
};
|
|
@@ -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 = "
|
|
4
|
+
const packageVersion = "110.18.4";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// Ignored via go/ees007
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
/* eslint-disable @repo/internal/react/no-class-components */
|
|
3
3
|
import { PureComponent } from 'react';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
// Ignored via go/ees005
|
|
6
5
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7
6
|
export class WithProviders extends PureComponent {
|
|
@@ -52,7 +51,7 @@ export class WithProviders extends PureComponent {
|
|
|
52
51
|
providerFactory
|
|
53
52
|
} = this.props;
|
|
54
53
|
providers.forEach(name => {
|
|
55
|
-
providerFactory.unsubscribe(name,
|
|
54
|
+
providerFactory.unsubscribe(name, this.handleProviderIfMounted);
|
|
56
55
|
});
|
|
57
56
|
}
|
|
58
57
|
render() {
|
|
@@ -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 = "
|
|
17
|
+
const packageVersion = "110.18.4";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -291,6 +291,15 @@ export default class Popup extends React.Component {
|
|
|
291
291
|
* It is meaningless for screen readers and causes confusion.
|
|
292
292
|
*/
|
|
293
293
|
const ariaLabel = fg('editor_a11y_aria_label_removal_popup') ? (_this$props$ariaLabel = this.props.ariaLabel) !== null && _this$props$ariaLabel !== void 0 ? _this$props$ariaLabel : undefined : this.props.ariaLabel === null ? undefined : this.props.ariaLabel || 'Popup';
|
|
294
|
+
const getRole = () => {
|
|
295
|
+
// Provide a valid role only when aria-label is present to satisfy a11y rules, as when aria-label is present, role is required
|
|
296
|
+
// use role = dialog as default role, as dialog role itself is not a parent role that requires specific children to function as some other ARIA roles(menu) do
|
|
297
|
+
// if set default role to menu, tons of integration tests will fail as many of our popup usages do not have children that satisfy menu role requirements
|
|
298
|
+
if (ariaLabel && fg('platform_editor_a11y_add_role_to_popup')) {
|
|
299
|
+
return this.props.role || 'dialog';
|
|
300
|
+
}
|
|
301
|
+
return undefined;
|
|
302
|
+
};
|
|
294
303
|
return /*#__PURE__*/React.createElement("div", {
|
|
295
304
|
ref: this.handleRef,
|
|
296
305
|
style: {
|
|
@@ -303,6 +312,7 @@ export default class Popup extends React.Component {
|
|
|
303
312
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
304
313
|
...this.props.style
|
|
305
314
|
},
|
|
315
|
+
role: getRole(),
|
|
306
316
|
"aria-label": ariaLabel,
|
|
307
317
|
"data-testid": "popup-wrapper"
|
|
308
318
|
// Indicates component is an editor pop. Required for focus handling in Message.tsx
|