@atlaskit/editor-common 93.1.4 → 93.1.6
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 +32 -0
- package/afm-cc/tsconfig.json +3 -0
- package/dist/cjs/analytics/types/engagement-platform-events.js +5 -0
- package/dist/cjs/analytics/types/enums.js +1 -0
- package/dist/cjs/element-browser/components/StatelessElementBrowser.js +1 -2
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/prosemirror-dom-metadata/index.js +48 -0
- package/dist/cjs/react-node-view/getInlineNodeViewProducer.js +0 -5
- package/dist/cjs/react-node-view/index.js +0 -7
- package/dist/cjs/safe-plugin/index.js +35 -2
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/FloatingToolbar/Button.js +6 -2
- package/dist/cjs/ui/Mention/index.js +15 -3
- package/dist/cjs/ui/Mention/mention-with-providers.js +58 -8
- package/dist/cjs/ui/Pulse/Pulse.js +36 -0
- package/dist/cjs/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.js +2 -11
- package/dist/cjs/ui-menu/DropdownMenu/index.js +5 -20
- package/dist/cjs/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +5 -9
- package/dist/es2019/analytics/types/engagement-platform-events.js +1 -0
- package/dist/es2019/analytics/types/enums.js +1 -0
- package/dist/es2019/element-browser/components/StatelessElementBrowser.js +1 -2
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/prosemirror-dom-metadata/index.js +41 -0
- package/dist/es2019/react-node-view/getInlineNodeViewProducer.js +0 -5
- package/dist/es2019/react-node-view/index.js +0 -7
- package/dist/es2019/safe-plugin/index.js +31 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/FloatingToolbar/Button.js +6 -2
- package/dist/es2019/ui/Mention/index.js +15 -2
- package/dist/es2019/ui/Mention/mention-with-providers.js +49 -2
- package/dist/es2019/ui/Pulse/Pulse.js +29 -0
- package/dist/es2019/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.js +2 -11
- package/dist/es2019/ui-menu/DropdownMenu/index.js +5 -20
- package/dist/es2019/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +5 -9
- package/dist/esm/analytics/types/engagement-platform-events.js +1 -0
- package/dist/esm/analytics/types/enums.js +1 -0
- package/dist/esm/element-browser/components/StatelessElementBrowser.js +1 -2
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/prosemirror-dom-metadata/index.js +41 -0
- package/dist/esm/react-node-view/getInlineNodeViewProducer.js +0 -5
- package/dist/esm/react-node-view/index.js +0 -7
- package/dist/esm/safe-plugin/index.js +34 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/FloatingToolbar/Button.js +6 -2
- package/dist/esm/ui/Mention/index.js +15 -2
- package/dist/esm/ui/Mention/mention-with-providers.js +59 -10
- package/dist/esm/ui/Pulse/Pulse.js +29 -0
- package/dist/esm/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.js +2 -11
- package/dist/esm/ui-menu/DropdownMenu/index.js +5 -20
- package/dist/esm/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +5 -9
- package/dist/types/analytics/types/engagement-platform-events.d.ts +20 -0
- package/dist/types/analytics/types/enums.d.ts +2 -1
- package/dist/types/analytics/types/events.d.ts +2 -1
- package/dist/types/element-browser/components/StatelessElementBrowser.d.ts +1 -1
- package/dist/types/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.d.ts +3 -1
- package/dist/types/prosemirror-dom-metadata/index.d.ts +18 -0
- package/dist/types/safe-plugin/index.d.ts +17 -0
- package/dist/types/types/floating-toolbar.d.ts +4 -0
- package/dist/types/ui/FloatingToolbar/Button.d.ts +3 -1
- package/dist/types/ui/Mention/mention-with-providers.d.ts +2 -1
- package/dist/types/ui/Pulse/Pulse.d.ts +18 -0
- package/dist/types/ui-menu/ColorPickerButton/index.d.ts +1 -1
- package/dist/types-ts4.5/analytics/types/engagement-platform-events.d.ts +20 -0
- package/dist/types-ts4.5/analytics/types/enums.d.ts +2 -1
- package/dist/types-ts4.5/analytics/types/events.d.ts +2 -1
- package/dist/types-ts4.5/element-browser/components/StatelessElementBrowser.d.ts +1 -1
- package/dist/types-ts4.5/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.d.ts +3 -1
- package/dist/types-ts4.5/prosemirror-dom-metadata/index.d.ts +18 -0
- package/dist/types-ts4.5/safe-plugin/index.d.ts +17 -0
- package/dist/types-ts4.5/types/floating-toolbar.d.ts +4 -0
- package/dist/types-ts4.5/ui/FloatingToolbar/Button.d.ts +3 -1
- package/dist/types-ts4.5/ui/Mention/mention-with-providers.d.ts +2 -1
- package/dist/types-ts4.5/ui/Pulse/Pulse.d.ts +18 -0
- package/dist/types-ts4.5/ui-menu/ColorPickerButton/index.d.ts +1 -1
- package/package.json +10 -11
- package/prosemirror-dom-metadata/package.json +15 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 93.1.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#150384](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/150384)
|
|
8
|
+
[`d3dad252dbe46`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d3dad252dbe46) -
|
|
9
|
+
[EDF-1177](https://product-fabric.atlassian.net/browse/EDF-1177) - add pulse effect support into
|
|
10
|
+
editor floating toolbar
|
|
11
|
+
- [#150125](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/150125)
|
|
12
|
+
[`79a44707fe935`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/79a44707fe935) -
|
|
13
|
+
[ED-24001] This change is cleaning up the feature gate for the image border options dropdown a11y
|
|
14
|
+
fix.
|
|
15
|
+
- [#150606](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/150606)
|
|
16
|
+
[`7680d21f5d481`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7680d21f5d481) -
|
|
17
|
+
[ED-24257] This change cleans up the feature gate for the main toolbar navigation escape fix.
|
|
18
|
+
- [#150606](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/150606)
|
|
19
|
+
[`d4d1f4dc8f6dc`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d4d1f4dc8f6dc) -
|
|
20
|
+
ED-24117: upgrades mention with provider to fc for react 18 migration
|
|
21
|
+
- [#150384](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/150384)
|
|
22
|
+
[`704af5d7d4a1a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/704af5d7d4a1a) -
|
|
23
|
+
[EDF-1668](https://product-fabric.atlassian.net/browse/EDF-1668) - add external message API
|
|
24
|
+
support into editor-plugin-engagement-platform
|
|
25
|
+
- Updated dependencies
|
|
26
|
+
|
|
27
|
+
## 93.1.5
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- [#150189](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/150189)
|
|
32
|
+
[`7537d7c549a7b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7537d7c549a7b) -
|
|
33
|
+
[No Issue] Improve prosemirror data attributes for nodes/marks toDOM and NodeViews
|
|
34
|
+
|
|
3
35
|
## 93.1.4
|
|
4
36
|
|
|
5
37
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
|
@@ -259,6 +259,7 @@ var ACTION_SUBJECT = exports.ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJ
|
|
|
259
259
|
ACTION_SUBJECT["ELEMENT"] = "element";
|
|
260
260
|
ACTION_SUBJECT["CONTEXT_MENU"] = "contextMenu";
|
|
261
261
|
ACTION_SUBJECT["INLINE_DIALOG"] = "inlineDialog";
|
|
262
|
+
ACTION_SUBJECT["ENGAGEMENT_PLATFORM"] = "engagementPlatform";
|
|
262
263
|
return ACTION_SUBJECT;
|
|
263
264
|
}({});
|
|
264
265
|
var ACTION_SUBJECT_ID = exports.ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
|
|
@@ -13,7 +13,6 @@ var _react2 = require("@emotion/react");
|
|
|
13
13
|
var _reactIntlNext = require("react-intl-next");
|
|
14
14
|
var _withAnalyticsContext = _interopRequireDefault(require("@atlaskit/analytics-next/withAnalyticsContext"));
|
|
15
15
|
var _withAnalyticsEvents = _interopRequireDefault(require("@atlaskit/analytics-next/withAnalyticsEvents"));
|
|
16
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
16
|
var _analytics = require("../../analytics");
|
|
18
17
|
var _constants = require("../constants");
|
|
19
18
|
var _useContainerWidth2 = _interopRequireDefault(require("../hooks/use-container-width"));
|
|
@@ -226,7 +225,7 @@ function StatelessElementBrowser(props) {
|
|
|
226
225
|
return (0, _react2.jsx)("div", {
|
|
227
226
|
css: wrapper,
|
|
228
227
|
"data-testid": "element-browser",
|
|
229
|
-
id:
|
|
228
|
+
id: _constants.ELEMENT_BROWSER_ID
|
|
230
229
|
}, (0, _react2.jsx)(ContainerWidthMonitor, null), containerWidth < _constants.DEVICE_BREAKPOINT_NUMBERS.medium ? (0, _react2.jsx)(MobileBrowser, (0, _extends2.default)({}, props, {
|
|
231
230
|
selectedItemIndex: selectedItemIndex,
|
|
232
231
|
focusedItemIndex: focusedItemIndex,
|
|
@@ -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.1.
|
|
20
|
+
var packageVersion = "93.1.6";
|
|
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
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.createProseMirrorMetadata = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
10
|
+
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; }
|
|
11
|
+
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
|
+
var isPMNode = function isPMNode(nodeOrMark) {
|
|
13
|
+
return nodeOrMark instanceof _model.Node || Array.isArray(nodeOrMark.marks);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* 🧱 Internal Helper Function: Editor FE Platform
|
|
18
|
+
*
|
|
19
|
+
* Creates a set of generic metadata attributes for a ProseMirror node or mark.
|
|
20
|
+
* These attributes are used to annotate the DOM representation with information
|
|
21
|
+
* about the node or mark type.
|
|
22
|
+
*
|
|
23
|
+
* @param {PMNode | PMMark} nodeOrMark - The ProseMirror node or mark to create metadata for.
|
|
24
|
+
* @returns {Record<string, string>} An object containing metadata attributes.
|
|
25
|
+
* - `data-prosemirror-content-type`: Specifies if the content is a node or mark.
|
|
26
|
+
* - `data-prosemirror-node-name` (if applicable): The name of the node.
|
|
27
|
+
* - `data-prosemirror-node-block` (if applicable): Indicates if the node is a block.
|
|
28
|
+
* - `data-prosemirror-node-inline` (if applicable): Indicates if the node is inline.
|
|
29
|
+
* - `data-prosemirror-mark-name` (if applicable): The name of the mark.
|
|
30
|
+
*/
|
|
31
|
+
var createProseMirrorMetadata = exports.createProseMirrorMetadata = function createProseMirrorMetadata(nodeOrMark) {
|
|
32
|
+
var name = nodeOrMark.type.name;
|
|
33
|
+
var isNode = isPMNode(nodeOrMark);
|
|
34
|
+
var commonAttributes = {
|
|
35
|
+
'data-prosemirror-content-type': isNode ? 'node' : 'mark'
|
|
36
|
+
};
|
|
37
|
+
if (!isNode) {
|
|
38
|
+
return _objectSpread(_objectSpread({}, commonAttributes), {}, (0, _defineProperty2.default)({}, 'data-prosemirror-mark-name', name));
|
|
39
|
+
}
|
|
40
|
+
commonAttributes['data-prosemirror-node-name'] = name;
|
|
41
|
+
if (nodeOrMark.type.isBlock) {
|
|
42
|
+
commonAttributes['data-prosemirror-node-block'] = 'true';
|
|
43
|
+
}
|
|
44
|
+
if (nodeOrMark.type.isInline) {
|
|
45
|
+
commonAttributes['data-prosemirror-node-inline'] = 'true';
|
|
46
|
+
}
|
|
47
|
+
return commonAttributes;
|
|
48
|
+
};
|
|
@@ -10,7 +10,6 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
12
|
var _react2 = require("@emotion/react");
|
|
13
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
13
|
var _analytics = require("../analytics");
|
|
15
14
|
var _ErrorBoundary = require("../ui/ErrorBoundary");
|
|
16
15
|
var _utils = require("../utils");
|
|
@@ -47,10 +46,6 @@ function createNodeView(_ref) {
|
|
|
47
46
|
// nodeView if DOM structure has nested plain "div"s, it doesn't see the
|
|
48
47
|
// difference between them and it kills the nodeView
|
|
49
48
|
domRef.classList.add("".concat(nodeViewParams.node.type.name, "View-content-wrap"), "".concat(inlineNodeViewClassname));
|
|
50
|
-
if ((0, _platformFeatureFlags.fg)('platform_editor_breakout_use_css')) {
|
|
51
|
-
domRef.dataset.prosemirrorNodeName = nodeViewParams.node.type.name;
|
|
52
|
-
domRef.dataset.prosemirrorNodeInline = 'true';
|
|
53
|
-
}
|
|
54
49
|
|
|
55
50
|
// This util is shared for tracking rendering, and the ErrorBoundary that
|
|
56
51
|
// is setup to wrap the Component when rendering
|
|
@@ -22,7 +22,6 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/cl
|
|
|
22
22
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
23
23
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
24
24
|
var _react = _interopRequireDefault(require("react"));
|
|
25
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
26
25
|
var _analytics = require("../analytics");
|
|
27
26
|
var _eventDispatcher = require("../event-dispatcher");
|
|
28
27
|
var _ErrorBoundary = require("../ui/ErrorBoundary");
|
|
@@ -89,12 +88,6 @@ var ReactNodeView = exports.default = /*#__PURE__*/function () {
|
|
|
89
88
|
// nodeView if DOM structure has nested plain "div"s, it doesn't see the
|
|
90
89
|
// difference between them and it kills the nodeView
|
|
91
90
|
this.domRef.classList.add("".concat(this.node.type.name, "View-content-wrap"));
|
|
92
|
-
if (this.domRef && (0, _platformFeatureFlags.fg)('platform_editor_breakout_use_css')) {
|
|
93
|
-
this.domRef.dataset.prosemirrorNodeName = this.node.type.name;
|
|
94
|
-
if (this.node.type.isBlock) {
|
|
95
|
-
this.domRef.dataset.prosemirrorNodeBlock = 'true';
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
91
|
var _getPerformanceOption = (0, _utils.getPerformanceOptions)(this.view),
|
|
99
92
|
samplingRate = _getPerformanceOption.samplingRate,
|
|
100
93
|
slowThreshold = _getPerformanceOption.slowThreshold,
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.SafePlugin = void 0;
|
|
7
|
+
exports.attachGenericProseMirrorMetadata = exports.SafePlugin = void 0;
|
|
8
8
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
9
9
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
10
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
@@ -12,9 +12,35 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
12
12
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
13
13
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
14
14
|
var _toArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toArray"));
|
|
15
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
16
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
17
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
|
+
var _prosemirrorDomMetadata = require("../prosemirror-dom-metadata");
|
|
16
19
|
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
|
|
17
20
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
21
|
+
/**
|
|
22
|
+
* 🧱 Internal Helper Function: Editor FE Platform
|
|
23
|
+
*
|
|
24
|
+
* Attaches generic ProseMirror metadata attributes to a given DOM element based on the properties of a ProseMirror node.
|
|
25
|
+
* This function is useful for annotating DOM elements with metadata that describes the type and characteristics of the ProseMirror node.
|
|
26
|
+
*
|
|
27
|
+
*
|
|
28
|
+
* @param {Object} params - The parameters for the function.
|
|
29
|
+
* @param {PMNode} params.node - The ProseMirror node from which to derive metadata.
|
|
30
|
+
* @param {HTMLElement} params.dom - The DOM element to which the metadata attributes will be attached.
|
|
31
|
+
*/
|
|
32
|
+
var attachGenericProseMirrorMetadata = exports.attachGenericProseMirrorMetadata = function attachGenericProseMirrorMetadata(_ref) {
|
|
33
|
+
var nodeOrMark = _ref.nodeOrMark,
|
|
34
|
+
dom = _ref.dom;
|
|
35
|
+
var metadata = (0, _prosemirrorDomMetadata.createProseMirrorMetadata)(nodeOrMark);
|
|
36
|
+
Object.entries(metadata).forEach(function (_ref2) {
|
|
37
|
+
var _ref3 = (0, _slicedToArray2.default)(_ref2, 2),
|
|
38
|
+
name = _ref3[0],
|
|
39
|
+
value = _ref3[1];
|
|
40
|
+
dom.setAttribute(name, value);
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
|
|
18
44
|
// Wraper to avoid any exception during the get pos operation
|
|
19
45
|
// See this https://hello.atlassian.net/wiki/spaces/EDITOR/pages/2849713193/ED-19672+Extensions+Regression
|
|
20
46
|
// And this https://discuss.prosemirror.net/t/possible-bug-on-viewdesc-posbeforechild/5783
|
|
@@ -42,7 +68,14 @@ var wrapGetPosExceptions = function wrapGetPosExceptions(spec) {
|
|
|
42
68
|
return;
|
|
43
69
|
// eslint-disable-next-line no-extra-bind
|
|
44
70
|
}.bind(thisArg);
|
|
45
|
-
|
|
71
|
+
var result = Reflect.apply(target, thisArg, [node, view, safeGetPos].concat((0, _toConsumableArray2.default)(more)));
|
|
72
|
+
if ((result === null || result === void 0 ? void 0 : result.dom) instanceof HTMLElement && (0, _platformFeatureFlags.fg)('platform_editor_breakout_use_css')) {
|
|
73
|
+
attachGenericProseMirrorMetadata({
|
|
74
|
+
nodeOrMark: node,
|
|
75
|
+
dom: result.dom
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
return result;
|
|
46
79
|
}
|
|
47
80
|
});
|
|
48
81
|
return safeNodeView;
|
|
@@ -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.1.
|
|
27
|
+
var packageVersion = "93.1.6";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -11,6 +11,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
|
|
13
13
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
14
|
+
var _Pulse = require("../Pulse/Pulse");
|
|
14
15
|
var _styles = require("./styles");
|
|
15
16
|
var _excluded = ["buttonStyles"];
|
|
16
17
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
@@ -45,7 +46,8 @@ var _default = exports.default = function _default(_ref) {
|
|
|
45
46
|
tabIndex = _ref.tabIndex,
|
|
46
47
|
areaControls = _ref.areaControls,
|
|
47
48
|
ariaLabel = _ref.ariaLabel,
|
|
48
|
-
isRadioButton = _ref.isRadioButton
|
|
49
|
+
isRadioButton = _ref.isRadioButton,
|
|
50
|
+
pulse = _ref.pulse;
|
|
49
51
|
// Check if there's only an icon and add additional styles
|
|
50
52
|
var iconOnly = (icon || iconAfter) && !children;
|
|
51
53
|
var customSpacing = iconOnly ? _styles.iconOnlySpacing : {};
|
|
@@ -68,6 +70,8 @@ var _default = exports.default = function _default(_ref) {
|
|
|
68
70
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
69
71
|
onMouseEnter: onMouseEnter,
|
|
70
72
|
onMouseLeave: onMouseLeave
|
|
73
|
+
}, /*#__PURE__*/_react.default.createElement(_Pulse.Pulse, {
|
|
74
|
+
pulse: pulse
|
|
71
75
|
}, /*#__PURE__*/_react.default.createElement(_customThemeButton.default
|
|
72
76
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
73
77
|
, {
|
|
@@ -110,5 +114,5 @@ var _default = exports.default = function _default(_ref) {
|
|
|
110
114
|
// should be fixed here https://a11y-internal.atlassian.net/browse/DST-287
|
|
111
115
|
,
|
|
112
116
|
tabIndex: tabIndex
|
|
113
|
-
}, children)));
|
|
117
|
+
}, children))));
|
|
114
118
|
};
|
|
@@ -14,12 +14,13 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
14
14
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
15
15
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
18
|
var _providerFactory = require("../../provider-factory");
|
|
18
|
-
var _mentionWithProviders =
|
|
19
|
+
var _mentionWithProviders = require("./mention-with-providers");
|
|
19
20
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
20
21
|
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; }
|
|
21
22
|
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
|
|
22
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
23
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /* eslint-disable @repo/internal/react/no-class-components */
|
|
23
24
|
var Mention = exports.default = /*#__PURE__*/function (_PureComponent) {
|
|
24
25
|
(0, _inherits2.default)(Mention, _PureComponent);
|
|
25
26
|
var _super = _createSuper(Mention);
|
|
@@ -36,7 +37,18 @@ var Mention = exports.default = /*#__PURE__*/function (_PureComponent) {
|
|
|
36
37
|
localId = _this$props.localId;
|
|
37
38
|
var mentionProvider = providers.mentionProvider,
|
|
38
39
|
profilecardProvider = providers.profilecardProvider;
|
|
39
|
-
|
|
40
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_react18_mention_with_provider')) {
|
|
41
|
+
return /*#__PURE__*/_react.default.createElement(_mentionWithProviders.MentionWithProviders, {
|
|
42
|
+
id: id,
|
|
43
|
+
text: text,
|
|
44
|
+
accessLevel: accessLevel,
|
|
45
|
+
localId: localId,
|
|
46
|
+
eventHandlers: eventHandlers,
|
|
47
|
+
mentionProvider: mentionProvider,
|
|
48
|
+
profilecardProvider: profilecardProvider
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
return /*#__PURE__*/_react.default.createElement(_mentionWithProviders.MentionWithProvidersOld, {
|
|
40
52
|
id: id,
|
|
41
53
|
text: text,
|
|
42
54
|
accessLevel: accessLevel,
|
|
@@ -5,7 +5,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.MentionWithProvidersOld = exports.MentionWithProviders = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
@@ -14,6 +14,7 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
14
14
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
15
15
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
16
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
17
18
|
var _react = _interopRequireWildcard(require("react"));
|
|
18
19
|
var _element = require("@atlaskit/mention/element");
|
|
19
20
|
var _mentionWithProfilecard = _interopRequireDefault(require("./mention-with-profilecard"));
|
|
@@ -23,12 +24,61 @@ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function
|
|
|
23
24
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
24
25
|
var GENERIC_USER_IDS = ['HipChat', 'all', 'here'];
|
|
25
26
|
var noop = function noop() {};
|
|
26
|
-
var MentionWithProviders = exports.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
var MentionWithProviders = exports.MentionWithProviders = function MentionWithProviders(_ref) {
|
|
28
|
+
var accessLevel = _ref.accessLevel,
|
|
29
|
+
eventHandlers = _ref.eventHandlers,
|
|
30
|
+
id = _ref.id,
|
|
31
|
+
mentionProvider = _ref.mentionProvider,
|
|
32
|
+
profilecardProviderResolver = _ref.profilecardProvider,
|
|
33
|
+
text = _ref.text,
|
|
34
|
+
localId = _ref.localId;
|
|
35
|
+
var _useState = (0, _react.useState)(null),
|
|
36
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
37
|
+
profilecardProvider = _useState2[0],
|
|
38
|
+
setProfilecardProvider = _useState2[1];
|
|
39
|
+
var mountedRef = (0, _react.useRef)(true);
|
|
40
|
+
(0, _react.useLayoutEffect)(function () {
|
|
41
|
+
mountedRef.current = true;
|
|
42
|
+
return function () {
|
|
43
|
+
mountedRef.current = false;
|
|
44
|
+
};
|
|
45
|
+
}, []);
|
|
46
|
+
(0, _react.useLayoutEffect)(function () {
|
|
47
|
+
// We are not using async/await here to avoid having an intermediate Promise
|
|
48
|
+
// introduced by the transpiler.
|
|
49
|
+
// This will allow consumer to use a SynchronousPromise.resolve and avoid useless
|
|
50
|
+
// rerendering
|
|
51
|
+
profilecardProviderResolver === null || profilecardProviderResolver === void 0 || profilecardProviderResolver.then(function (result) {
|
|
52
|
+
if (mountedRef.current) {
|
|
53
|
+
setProfilecardProvider(result);
|
|
54
|
+
}
|
|
55
|
+
}).catch(function () {
|
|
56
|
+
if (mountedRef.current) {
|
|
57
|
+
setProfilecardProvider(null);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}, [profilecardProviderResolver]);
|
|
61
|
+
var MentionComponent = profilecardProviderResolver && GENERIC_USER_IDS.indexOf(id) === -1 ? _mentionWithProfilecard.default : _element.ResourcedMention;
|
|
62
|
+
return /*#__PURE__*/_react.default.createElement(MentionComponent, {
|
|
63
|
+
id: id,
|
|
64
|
+
text: text,
|
|
65
|
+
accessLevel: accessLevel,
|
|
66
|
+
localId: localId,
|
|
67
|
+
mentionProvider: mentionProvider,
|
|
68
|
+
profilecardProvider: profilecardProvider,
|
|
69
|
+
onClick: eventHandlers === null || eventHandlers === void 0 ? void 0 : eventHandlers.onClick,
|
|
70
|
+
onMouseEnter: eventHandlers === null || eventHandlers === void 0 ? void 0 : eventHandlers.onMouseEnter,
|
|
71
|
+
onMouseLeave: eventHandlers === null || eventHandlers === void 0 ? void 0 : eventHandlers.onMouseLeave
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
76
|
+
var MentionWithProvidersOld = exports.MentionWithProvidersOld = /*#__PURE__*/function (_PureComponent) {
|
|
77
|
+
(0, _inherits2.default)(MentionWithProvidersOld, _PureComponent);
|
|
78
|
+
var _super = _createSuper(MentionWithProvidersOld);
|
|
79
|
+
function MentionWithProvidersOld() {
|
|
30
80
|
var _this;
|
|
31
|
-
(0, _classCallCheck2.default)(this,
|
|
81
|
+
(0, _classCallCheck2.default)(this, MentionWithProvidersOld);
|
|
32
82
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
33
83
|
args[_key] = arguments[_key];
|
|
34
84
|
}
|
|
@@ -38,7 +88,7 @@ var MentionWithProviders = exports.default = /*#__PURE__*/function (_PureCompone
|
|
|
38
88
|
});
|
|
39
89
|
return _this;
|
|
40
90
|
}
|
|
41
|
-
(0, _createClass2.default)(
|
|
91
|
+
(0, _createClass2.default)(MentionWithProvidersOld, [{
|
|
42
92
|
key: "UNSAFE_componentWillMount",
|
|
43
93
|
value: function UNSAFE_componentWillMount() {
|
|
44
94
|
this.updateProfilecardProvider(this.props);
|
|
@@ -100,5 +150,5 @@ var MentionWithProviders = exports.default = /*#__PURE__*/function (_PureCompone
|
|
|
100
150
|
}, actionHandlers));
|
|
101
151
|
}
|
|
102
152
|
}]);
|
|
103
|
-
return
|
|
153
|
+
return MentionWithProvidersOld;
|
|
104
154
|
}(_react.PureComponent);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.Pulse = Pulse;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _onboarding = require("@atlaskit/onboarding");
|
|
10
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
11
|
+
/**
|
|
12
|
+
* Wraps children with {@link SpotlightPulse} component.
|
|
13
|
+
*
|
|
14
|
+
* It adds pulse effect to children if `pulse` is `true`.
|
|
15
|
+
*
|
|
16
|
+
* This custom component exists because the {@link SpotlightPulse} with `pulse={false}` renders extra `div` around `children`.
|
|
17
|
+
* We want to keep `children` as it is if there is no `pulse`.
|
|
18
|
+
*/
|
|
19
|
+
function Pulse(_ref) {
|
|
20
|
+
var pulse = _ref.pulse,
|
|
21
|
+
_ref$radius = _ref.radius,
|
|
22
|
+
radius = _ref$radius === void 0 ? 3 : _ref$radius,
|
|
23
|
+
children = _ref.children;
|
|
24
|
+
if ((0, _experiments.editorExperiment)('platform_editor_ai_onboarding', 'test') && pulse) {
|
|
25
|
+
return (
|
|
26
|
+
/*#__PURE__*/
|
|
27
|
+
// SpotlightPulse shows pulse effect if `pulse` is `undefined`.
|
|
28
|
+
// That's why we need to cast `pulse` to `false` if it's `undefined`.
|
|
29
|
+
_react.default.createElement(_onboarding.SpotlightPulse, {
|
|
30
|
+
radius: radius,
|
|
31
|
+
pulse: pulse !== null && pulse !== void 0 ? pulse : false
|
|
32
|
+
}, children)
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children);
|
|
36
|
+
}
|
|
@@ -8,7 +8,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.MenuArrowKeyNavigationProvider = void 0;
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
11
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
13
12
|
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; }
|
|
14
13
|
var hasEnabledItems = function hasEnabledItems(list) {
|
|
@@ -131,11 +130,7 @@ var MenuArrowKeyNavigationProvider = exports.MenuArrowKeyNavigationProvider = fu
|
|
|
131
130
|
if (targetElement instanceof HTMLElement && !targetElement.closest('.custom-key-handler-wrapper')) {
|
|
132
131
|
return;
|
|
133
132
|
}
|
|
134
|
-
if (
|
|
135
|
-
if (!disableCloseOnArrowClick) {
|
|
136
|
-
handleClose(event);
|
|
137
|
-
}
|
|
138
|
-
} else {
|
|
133
|
+
if (!disableCloseOnArrowClick) {
|
|
139
134
|
handleClose(event);
|
|
140
135
|
}
|
|
141
136
|
if (targetElement instanceof HTMLElement && !targetElement.closest('[data-testid="editor-floating-toolbar"]')) {
|
|
@@ -146,11 +141,7 @@ var MenuArrowKeyNavigationProvider = exports.MenuArrowKeyNavigationProvider = fu
|
|
|
146
141
|
if (targetElement instanceof HTMLElement && !targetElement.closest('.custom-key-handler-wrapper')) {
|
|
147
142
|
return;
|
|
148
143
|
}
|
|
149
|
-
if (
|
|
150
|
-
if (!disableCloseOnArrowClick) {
|
|
151
|
-
handleClose(event);
|
|
152
|
-
}
|
|
153
|
-
} else {
|
|
144
|
+
if (!disableCloseOnArrowClick) {
|
|
154
145
|
handleClose(event);
|
|
155
146
|
}
|
|
156
147
|
if (targetElement instanceof HTMLElement && !targetElement.closest('[data-testid="editor-floating-toolbar"]')) {
|
|
@@ -193,9 +193,9 @@ var DropdownMenuWrapper = exports.default = /*#__PURE__*/function (_PureComponen
|
|
|
193
193
|
shouldFitContainer: true,
|
|
194
194
|
isTriggerNotTabbable: true,
|
|
195
195
|
handleClickOutside: this.handleClose,
|
|
196
|
-
handleEscapeKeydown:
|
|
196
|
+
handleEscapeKeydown: handleEscapeKeydown || this.handleCloseAndFocus,
|
|
197
197
|
handleEnterKeydown: function handleEnterKeydown(e) {
|
|
198
|
-
if ((0, _platformFeatureFlags.fg)('platform_editor_a11y_table_context_menu')
|
|
198
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_a11y_table_context_menu')) {
|
|
199
199
|
if (!allowEnterDefaultBehavior) {
|
|
200
200
|
e.preventDefault();
|
|
201
201
|
}
|
|
@@ -309,27 +309,12 @@ function DropdownMenuItem(_ref) {
|
|
|
309
309
|
var _handleSubmenuActive = function _handleSubmenuActive(event) {
|
|
310
310
|
setSubmenuActive(Boolean(event.target instanceof HTMLElement && event.target.closest(".".concat(_styles.DropdownMenuSharedCssClassName.SUBMENU))));
|
|
311
311
|
};
|
|
312
|
-
var ariaLabel;
|
|
313
|
-
|
|
314
|
-
ariaLabel = item['aria-label'] === '' ? undefined : item['aria-label'] || String(item.content);
|
|
315
|
-
} else {
|
|
316
|
-
ariaLabel = item['aria-label'] || String(item.content);
|
|
317
|
-
}
|
|
318
|
-
var testId;
|
|
319
|
-
if ((0, _platformFeatureFlags.fg)('platform-editor-a11y-image-border-options-dropdown')) {
|
|
320
|
-
testId = item['data-testid'] || "dropdown-item__".concat(item.content);
|
|
321
|
-
} else {
|
|
322
|
-
testId = "dropdown-item__".concat(String(item.content));
|
|
323
|
-
}
|
|
312
|
+
var ariaLabel = item['aria-label'] === '' ? undefined : item['aria-label'] || String(item.content);
|
|
313
|
+
var testId = item['data-testid'] || "dropdown-item__".concat(item.content);
|
|
324
314
|
|
|
325
315
|
// From time to time we don't want to have any tabIndex on item wrapper
|
|
326
316
|
// especially when we pass any interactive element as a item.content
|
|
327
|
-
var tabIndex;
|
|
328
|
-
if ((0, _platformFeatureFlags.fg)('platform-editor-a11y-image-border-options-dropdown')) {
|
|
329
|
-
tabIndex = item.wrapperTabIndex === null ? undefined : item.wrapperTabIndex || -1;
|
|
330
|
-
} else {
|
|
331
|
-
tabIndex = -1;
|
|
332
|
-
}
|
|
317
|
+
var tabIndex = item.wrapperTabIndex === null ? undefined : item.wrapperTabIndex || -1;
|
|
333
318
|
var dropListItem = (0, _react2.jsx)("div", {
|
|
334
319
|
css: function css() {
|
|
335
320
|
return buttonStyles(item.isActive, submenuActive);
|
|
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.ToolbarArrowKeyNavigationProvider = exports.KeyDownHandlerContext = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _react2 = require("@emotion/react");
|
|
10
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
10
|
var _elementBrowser = require("../../element-browser");
|
|
12
11
|
var _messages = require("../../messages");
|
|
13
12
|
var _ui = require("../../ui");
|
|
@@ -122,7 +121,7 @@ var ToolbarArrowKeyNavigationProvider = exports.ToolbarArrowKeyNavigationProvide
|
|
|
122
121
|
* @param event
|
|
123
122
|
*/
|
|
124
123
|
var handleKeyDown = function handleKeyDown(event) {
|
|
125
|
-
var _document$querySelect, _document$querySelect2, _wrapperRef$current2;
|
|
124
|
+
var _document$querySelect, _document$querySelect2, _wrapperRef$current, _wrapperRef$current2;
|
|
126
125
|
// To trap the focus inside the horizontal toolbar for left and right arrow keys
|
|
127
126
|
var targetElement = event.target;
|
|
128
127
|
if (targetElement instanceof HTMLElement && !targetElement.closest("".concat(childComponentSelector))) {
|
|
@@ -136,13 +135,10 @@ var ToolbarArrowKeyNavigationProvider = exports.ToolbarArrowKeyNavigationProvide
|
|
|
136
135
|
// if menu wrapper exists, then a menu is open and arrow keys will be handled by MenuArrowKeyNavigationProvider
|
|
137
136
|
return;
|
|
138
137
|
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
// if element browser is open, then arrow keys will be handled by MenuArrowKeyNavigationProvider
|
|
144
|
-
return;
|
|
145
|
-
}
|
|
138
|
+
var elementBrowser = wrapperRef === null || wrapperRef === void 0 || (_wrapperRef$current = wrapperRef.current) === null || _wrapperRef$current === void 0 ? void 0 : _wrapperRef$current.querySelector("#".concat(_elementBrowser.ELEMENT_BROWSER_ID));
|
|
139
|
+
if (elementBrowser) {
|
|
140
|
+
// if element browser is open, then arrow keys will be handled by MenuArrowKeyNavigationProvider
|
|
141
|
+
return;
|
|
146
142
|
}
|
|
147
143
|
var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
|
|
148
144
|
if (!filteredFocusableElements || (filteredFocusableElements === null || filteredFocusableElements === void 0 ? void 0 : filteredFocusableElements.length) === 0) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -253,6 +253,7 @@ export let ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJECT) {
|
|
|
253
253
|
ACTION_SUBJECT["ELEMENT"] = "element";
|
|
254
254
|
ACTION_SUBJECT["CONTEXT_MENU"] = "contextMenu";
|
|
255
255
|
ACTION_SUBJECT["INLINE_DIALOG"] = "inlineDialog";
|
|
256
|
+
ACTION_SUBJECT["ENGAGEMENT_PLATFORM"] = "engagementPlatform";
|
|
256
257
|
return ACTION_SUBJECT;
|
|
257
258
|
}({});
|
|
258
259
|
export let ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
|
|
@@ -10,7 +10,6 @@ import { css, jsx } from '@emotion/react';
|
|
|
10
10
|
import { FormattedMessage } from 'react-intl-next';
|
|
11
11
|
import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext';
|
|
12
12
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
13
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
13
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent } from '../../analytics';
|
|
15
14
|
import { DEVICE_BREAKPOINT_NUMBERS, ELEMENT_BROWSER_ID, GRID_SIZE, INLINE_SIDEBAR_HEIGHT, SIDEBAR_HEADING_WRAPPER_HEIGHT, SIDEBAR_WIDTH } from '../constants';
|
|
16
15
|
import useContainerWidth from '../hooks/use-container-width';
|
|
@@ -215,7 +214,7 @@ function StatelessElementBrowser(props) {
|
|
|
215
214
|
return jsx("div", {
|
|
216
215
|
css: wrapper,
|
|
217
216
|
"data-testid": "element-browser",
|
|
218
|
-
id:
|
|
217
|
+
id: ELEMENT_BROWSER_ID
|
|
219
218
|
}, jsx(ContainerWidthMonitor, null), containerWidth < DEVICE_BREAKPOINT_NUMBERS.medium ? jsx(MobileBrowser, _extends({}, props, {
|
|
220
219
|
selectedItemIndex: selectedItemIndex,
|
|
221
220
|
focusedItemIndex: focusedItemIndex,
|
|
@@ -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.1.
|
|
4
|
+
const packageVersion = "93.1.6";
|
|
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
|