@atlaskit/editor-common 75.3.1 → 75.5.0
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 +20 -0
- package/dist/cjs/analytics/index.js +6 -0
- package/dist/cjs/analytics/types/index.js +6 -0
- package/dist/cjs/analytics/types/table-events.js +16 -3
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/preset/builder.js +48 -48
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.js +6 -6
- package/dist/cjs/ui-menu/Dropdown/index.js +3 -2
- package/dist/cjs/ui-menu/DropdownMenu/index.js +2 -2
- package/dist/cjs/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +8 -8
- package/dist/cjs/ui-menu/ToolbarButton/index.js +1 -1
- package/dist/cjs/ui-react/with-react-editor-view-outer-listeners.js +4 -5
- package/dist/es2019/analytics/index.js +1 -1
- package/dist/es2019/analytics/types/index.js +1 -1
- package/dist/es2019/analytics/types/table-events.js +17 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/preset/builder.js +48 -48
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.js +6 -6
- package/dist/es2019/ui-menu/Dropdown/index.js +3 -2
- package/dist/es2019/ui-menu/DropdownMenu/index.js +3 -2
- package/dist/es2019/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +8 -8
- package/dist/es2019/ui-menu/ToolbarButton/index.js +1 -1
- package/dist/es2019/ui-react/with-react-editor-view-outer-listeners.js +4 -5
- package/dist/esm/analytics/index.js +1 -1
- package/dist/esm/analytics/types/index.js +1 -1
- package/dist/esm/analytics/types/table-events.js +17 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/preset/builder.js +48 -48
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.js +6 -6
- package/dist/esm/ui-menu/Dropdown/index.js +3 -2
- package/dist/esm/ui-menu/DropdownMenu/index.js +3 -2
- package/dist/esm/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +8 -8
- package/dist/esm/ui-menu/ToolbarButton/index.js +1 -1
- package/dist/esm/ui-react/with-react-editor-view-outer-listeners.js +4 -5
- package/dist/types/analytics/index.d.ts +1 -1
- package/dist/types/analytics/types/index.d.ts +1 -1
- package/dist/types/analytics/types/inline-comment-events.d.ts +2 -2
- package/dist/types/analytics/types/table-events.d.ts +26 -2
- package/dist/types/types/floating-toolbar.d.ts +4 -3
- package/dist/types/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.d.ts +1 -1
- package/dist/types/ui-menu/Dropdown/index.d.ts +3 -2
- package/dist/types/ui-menu/DropdownMenu/index.d.ts +1 -2
- package/dist/types/ui-menu/ToolbarButton/index.d.ts +3 -3
- package/dist/types-ts4.5/analytics/index.d.ts +1 -1
- package/dist/types-ts4.5/analytics/types/index.d.ts +1 -1
- package/dist/types-ts4.5/analytics/types/inline-comment-events.d.ts +2 -2
- package/dist/types-ts4.5/analytics/types/table-events.d.ts +26 -2
- package/dist/types-ts4.5/types/floating-toolbar.d.ts +4 -3
- package/dist/types-ts4.5/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.d.ts +1 -1
- package/dist/types-ts4.5/ui-menu/Dropdown/index.d.ts +3 -2
- package/dist/types-ts4.5/ui-menu/DropdownMenu/index.d.ts +1 -2
- package/dist/types-ts4.5/ui-menu/ToolbarButton/index.d.ts +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 75.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`20d1964ba9d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/20d1964ba9d) - Adds two new table analytics events: an initialOverflowCaptured event to detect initial oveflow state when the page is with a table is loaded or a new table is inserted/pasted and an overflowChanged event used to detect overflow state changes that occur as a result of different table actions.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- [`68dc5afa8f3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/68dc5afa8f3) - Add line before test cases
|
|
12
|
+
|
|
13
|
+
## 75.4.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- [`21305ee6254`](https://bitbucket.org/atlassian/atlassian-frontend/commits/21305ee6254) - ED-19874 Align the dropdown with the floating toolbar if there is a single button in the toolbar
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- [`b092b2cb3b7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b092b2cb3b7) - Dummy change as workaround for product integrator pipeline. This change fixes comment spacing.
|
|
22
|
+
|
|
3
23
|
## 75.3.1
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -207,6 +207,12 @@ Object.defineProperty(exports, "TABLE_BREAKOUT", {
|
|
|
207
207
|
return _types.TABLE_BREAKOUT;
|
|
208
208
|
}
|
|
209
209
|
});
|
|
210
|
+
Object.defineProperty(exports, "TABLE_OVERFLOW_CHANGE_TRIGGER", {
|
|
211
|
+
enumerable: true,
|
|
212
|
+
get: function get() {
|
|
213
|
+
return _types.TABLE_OVERFLOW_CHANGE_TRIGGER;
|
|
214
|
+
}
|
|
215
|
+
});
|
|
210
216
|
Object.defineProperty(exports, "TARGET_SELECTION_SOURCE", {
|
|
211
217
|
enumerable: true,
|
|
212
218
|
get: function get() {
|
|
@@ -207,6 +207,12 @@ Object.defineProperty(exports, "TABLE_BREAKOUT", {
|
|
|
207
207
|
return _tableEvents.TABLE_BREAKOUT;
|
|
208
208
|
}
|
|
209
209
|
});
|
|
210
|
+
Object.defineProperty(exports, "TABLE_OVERFLOW_CHANGE_TRIGGER", {
|
|
211
|
+
enumerable: true,
|
|
212
|
+
get: function get() {
|
|
213
|
+
return _tableEvents.TABLE_OVERFLOW_CHANGE_TRIGGER;
|
|
214
|
+
}
|
|
215
|
+
});
|
|
210
216
|
Object.defineProperty(exports, "TARGET_SELECTION_SOURCE", {
|
|
211
217
|
enumerable: true,
|
|
212
218
|
get: function get() {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.TABLE_BREAKOUT = exports.TABLE_ACTION = void 0;
|
|
6
|
+
exports.TABLE_OVERFLOW_CHANGE_TRIGGER = exports.TABLE_BREAKOUT = exports.TABLE_ACTION = void 0;
|
|
7
7
|
//#region Constants
|
|
8
8
|
var TABLE_ACTION = /*#__PURE__*/function (TABLE_ACTION) {
|
|
9
9
|
TABLE_ACTION["DELETED"] = "deleted";
|
|
@@ -29,6 +29,8 @@ var TABLE_ACTION = /*#__PURE__*/function (TABLE_ACTION) {
|
|
|
29
29
|
TABLE_ACTION["FIXED"] = "fixed";
|
|
30
30
|
TABLE_ACTION["RESIZED"] = "resized";
|
|
31
31
|
TABLE_ACTION["RESIZE_PERF_SAMPLING"] = "resizePerfSampling";
|
|
32
|
+
TABLE_ACTION["OVERFLOW_CHANGED"] = "overflowChanged";
|
|
33
|
+
TABLE_ACTION["INITIAL_OVERFLOW_CAPTURED"] = "initialOverflowCaptured";
|
|
32
34
|
return TABLE_ACTION;
|
|
33
35
|
}({});
|
|
34
36
|
exports.TABLE_ACTION = TABLE_ACTION;
|
|
@@ -38,8 +40,19 @@ var TABLE_BREAKOUT = /*#__PURE__*/function (TABLE_BREAKOUT) {
|
|
|
38
40
|
TABLE_BREAKOUT["NORMAL"] = "normal";
|
|
39
41
|
return TABLE_BREAKOUT;
|
|
40
42
|
}({}); //#endregion
|
|
41
|
-
|
|
43
|
+
exports.TABLE_BREAKOUT = TABLE_BREAKOUT;
|
|
44
|
+
var TABLE_OVERFLOW_CHANGE_TRIGGER = /*#__PURE__*/function (TABLE_OVERFLOW_CHANGE_TRIGGER) {
|
|
45
|
+
TABLE_OVERFLOW_CHANGE_TRIGGER["EXTERNAL"] = "external";
|
|
46
|
+
TABLE_OVERFLOW_CHANGE_TRIGGER["ADDED_COLUMN"] = "addedColumn";
|
|
47
|
+
TABLE_OVERFLOW_CHANGE_TRIGGER["DELETED_COLUMN"] = "deletedColumn";
|
|
48
|
+
TABLE_OVERFLOW_CHANGE_TRIGGER["RESIZED_COLUMN"] = "resizedColumn";
|
|
49
|
+
TABLE_OVERFLOW_CHANGE_TRIGGER["ENABLED_NUMBERED_COLUMN"] = "enabledNumberedColumn";
|
|
50
|
+
TABLE_OVERFLOW_CHANGE_TRIGGER["DISABLED_NUMBERED_COLUMN"] = "disabledNumberedColumn";
|
|
51
|
+
TABLE_OVERFLOW_CHANGE_TRIGGER["DISTRIBUTED_COLUMNS"] = "distributedColumnsWidths";
|
|
52
|
+
TABLE_OVERFLOW_CHANGE_TRIGGER["RESIZED"] = "resizedTable";
|
|
53
|
+
return TABLE_OVERFLOW_CHANGE_TRIGGER;
|
|
54
|
+
}({}); //#region Type Helpers
|
|
42
55
|
//#endregion
|
|
43
56
|
//#region Analytic Event Payloads
|
|
44
57
|
//#endregion
|
|
45
|
-
exports.
|
|
58
|
+
exports.TABLE_OVERFLOW_CHANGE_TRIGGER = TABLE_OVERFLOW_CHANGE_TRIGGER;
|
|
@@ -16,7 +16,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
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 = "75.
|
|
19
|
+
var packageVersion = "75.5.0";
|
|
20
20
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
21
21
|
// Remove URL as it has UGC
|
|
22
22
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -34,21 +34,21 @@ var EditorPresetBuilder = /*#__PURE__*/function () {
|
|
|
34
34
|
nextOrTuple].concat((0, _toConsumableArray2.default)(this.data)));
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
//hasPlugin<Plugin extends NextEditorPlugin<any, any>>(
|
|
38
|
-
//
|
|
39
|
-
//): this is TryCastEditorPresetBuilderByCheckingPlugins<this, Plugin> {
|
|
40
|
-
//
|
|
41
|
-
//
|
|
42
|
-
//
|
|
43
|
-
//
|
|
44
|
-
//
|
|
45
|
-
//
|
|
37
|
+
// hasPlugin<Plugin extends NextEditorPlugin<any, any>>(
|
|
38
|
+
// pluginToAdd: Plugin,
|
|
39
|
+
// ): this is TryCastEditorPresetBuilderByCheckingPlugins<this, Plugin> {
|
|
40
|
+
// const hasPluginQueryExists = this.data.find((pluginEntry) => {
|
|
41
|
+
// const pluginFunction: NextEditorPlugin<any, any> = !Array.isArray(
|
|
42
|
+
// pluginEntry,
|
|
43
|
+
// )
|
|
44
|
+
// ? pluginEntry
|
|
45
|
+
// : pluginEntry[0];
|
|
46
46
|
|
|
47
|
-
//
|
|
48
|
-
//
|
|
47
|
+
// return pluginFunction === pluginToAdd;
|
|
48
|
+
// });
|
|
49
49
|
|
|
50
|
-
//
|
|
51
|
-
//}
|
|
50
|
+
// return Boolean(hasPluginQueryExists);
|
|
51
|
+
// }
|
|
52
52
|
}, {
|
|
53
53
|
key: "maybeAdd",
|
|
54
54
|
value: function maybeAdd(pluginToAdd, add) {
|
|
@@ -145,41 +145,41 @@ var EditorPresetBuilder = /*#__PURE__*/function () {
|
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
// TODO: ED-17023 - Bring back type safety to the EditorPresetBuilder.add preset
|
|
148
|
-
//import type {
|
|
149
|
-
//
|
|
150
|
-
//} from '../types/next-editor-plugin';
|
|
151
|
-
//type TryCastEditorPresetBuilderByCheckingDependencies<MaybeEditorPresetBuilder, Plugin> =
|
|
152
|
-
//
|
|
153
|
-
//
|
|
154
|
-
//
|
|
155
|
-
//
|
|
156
|
-
//
|
|
157
|
-
//
|
|
158
|
-
//
|
|
159
|
-
//
|
|
160
|
-
//
|
|
161
|
-
//
|
|
162
|
-
//maybeAdd<
|
|
163
|
-
//
|
|
164
|
-
//
|
|
165
|
-
//
|
|
166
|
-
//
|
|
167
|
-
//
|
|
168
|
-
//
|
|
169
|
-
//
|
|
170
|
-
|
|
171
|
-
//
|
|
172
|
-
//
|
|
173
|
-
//
|
|
174
|
-
//
|
|
175
|
-
//
|
|
176
|
-
//): MaybeEditorPresetBuilder | this {
|
|
177
|
-
//
|
|
178
|
-
//
|
|
179
|
-
//
|
|
180
|
-
//
|
|
181
|
-
//
|
|
182
|
-
//}
|
|
148
|
+
// import type {
|
|
149
|
+
// ExtractPluginDependencies,
|
|
150
|
+
// } from '../types/next-editor-plugin';
|
|
151
|
+
// type TryCastEditorPresetBuilderByCheckingDependencies<MaybeEditorPresetBuilder, Plugin> =
|
|
152
|
+
// MaybeEditorPresetBuilder extends EditorPresetBuilder<any, infer StackPlugins>
|
|
153
|
+
// ? Plugin extends NextEditorPlugin<any, any>
|
|
154
|
+
// ? ExtractPluginDependencies<Plugin>[number] extends StackPlugins[number]
|
|
155
|
+
// ? MaybeEditorPresetBuilder
|
|
156
|
+
// : never
|
|
157
|
+
// : never
|
|
158
|
+
// : never;
|
|
159
|
+
// Because how our plugins are added in the preset, we can't use the type safe system
|
|
160
|
+
// in the EditorPresetBuilder.
|
|
161
|
+
// TODO: ED-17023 - Bring back type safety to the EditorPresetBuilder.add preset
|
|
162
|
+
// maybeAdd<
|
|
163
|
+
// MaybePlugin extends NextEditorPlugin<any, any>,
|
|
164
|
+
// MaybePluginNames extends string[],
|
|
165
|
+
// MaybeStackPlugins extends AllEditorPresetPluginTypes[],
|
|
166
|
+
// MaybeEditorPresetBuilder extends EditorPresetBuilder<
|
|
167
|
+
// MaybePluginNames,
|
|
168
|
+
// MaybeStackPlugins
|
|
169
|
+
// >,
|
|
170
|
+
// >(
|
|
171
|
+
// pluginToAdd: MaybePlugin,
|
|
172
|
+
// add: (
|
|
173
|
+
// pluginToAdd: MaybePlugin,
|
|
174
|
+
// maybeEditorPresetBuilder: TryCastEditorPresetBuilderByCheckingDependencies<this, MaybePlugin>,
|
|
175
|
+
// ) => MaybeEditorPresetBuilder,
|
|
176
|
+
// ): MaybeEditorPresetBuilder | this {
|
|
177
|
+
// return add(
|
|
178
|
+
// pluginToAdd,
|
|
179
|
+
// // @ts-ignore
|
|
180
|
+
// this as any,
|
|
181
|
+
// );
|
|
182
|
+
// }
|
|
183
183
|
}]);
|
|
184
184
|
return EditorPresetBuilder;
|
|
185
185
|
}();
|
|
@@ -24,7 +24,7 @@ var _templateObject, _templateObject2, _templateObject3;
|
|
|
24
24
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
25
25
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /** @jsx jsx */
|
|
26
26
|
var packageName = "@atlaskit/editor-common";
|
|
27
|
-
var packageVersion = "75.
|
|
27
|
+
var packageVersion = "75.5.0";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -78,14 +78,14 @@ var MenuArrowKeyNavigationProvider = function MenuArrowKeyNavigationProvider(_re
|
|
|
78
78
|
var _wrapperRef$current;
|
|
79
79
|
var targetElement = event.target;
|
|
80
80
|
|
|
81
|
-
//Tab key on menu items can be handled in the parent components of dropdown menus with KeydownHandlerContext
|
|
81
|
+
// Tab key on menu items can be handled in the parent components of dropdown menus with KeydownHandlerContext
|
|
82
82
|
if (event.key === 'Tab' && closeOnTab) {
|
|
83
83
|
handleClose(event);
|
|
84
84
|
keyDownHandlerContext === null || keyDownHandlerContext === void 0 ? void 0 : keyDownHandlerContext.handleTab();
|
|
85
85
|
return;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
//To trap the focus inside the toolbar using left and right arrow keys
|
|
88
|
+
// To trap the focus inside the toolbar using left and right arrow keys
|
|
89
89
|
var focusableElements = getFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
|
|
90
90
|
if (!focusableElements || (focusableElements === null || focusableElements === void 0 ? void 0 : focusableElements.length) === 0) {
|
|
91
91
|
return;
|
|
@@ -111,10 +111,10 @@ var MenuArrowKeyNavigationProvider = function MenuArrowKeyNavigationProvider(_re
|
|
|
111
111
|
break;
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
//ArrowLeft/Right on the menu should close the menus
|
|
115
|
-
//then logic to retain the focus can be handled in the parent components with KeydownHandlerContext
|
|
114
|
+
// ArrowLeft/Right on the menu should close the menus
|
|
115
|
+
// then logic to retain the focus can be handled in the parent components with KeydownHandlerContext
|
|
116
116
|
case 'ArrowLeft':
|
|
117
|
-
//Filter out the events from outside the menu
|
|
117
|
+
// Filter out the events from outside the menu
|
|
118
118
|
if (!targetElement.closest('.custom-key-handler-wrapper')) {
|
|
119
119
|
return;
|
|
120
120
|
}
|
|
@@ -124,7 +124,7 @@ var MenuArrowKeyNavigationProvider = function MenuArrowKeyNavigationProvider(_re
|
|
|
124
124
|
}
|
|
125
125
|
break;
|
|
126
126
|
case 'ArrowRight':
|
|
127
|
-
//Filter out the events from outside the menu
|
|
127
|
+
// Filter out the events from outside the menu
|
|
128
128
|
if (!targetElement.closest('.custom-key-handler-wrapper')) {
|
|
129
129
|
return;
|
|
130
130
|
}
|
|
@@ -80,9 +80,10 @@ var Dropdown = /*#__PURE__*/function (_PureComponent) {
|
|
|
80
80
|
fitWidth = _this$props.fitWidth,
|
|
81
81
|
zIndex = _this$props.zIndex,
|
|
82
82
|
arrowKeyNavigationProviderOptions = _this$props.arrowKeyNavigationProviderOptions,
|
|
83
|
-
dropdownListId = _this$props.dropdownListId
|
|
83
|
+
dropdownListId = _this$props.dropdownListId,
|
|
84
|
+
alignDropdownWithParentElement = _this$props.alignDropdownWithParentElement;
|
|
84
85
|
return /*#__PURE__*/_react.default.createElement(_Popup.default, {
|
|
85
|
-
target: target,
|
|
86
|
+
target: alignDropdownWithParentElement ? target === null || target === void 0 ? void 0 : target.closest("[data-testid='editor-floating-toolbar'") : target,
|
|
86
87
|
mountTo: mountTo,
|
|
87
88
|
boundariesElement: boundariesElement,
|
|
88
89
|
scrollableElement: scrollableElement,
|
|
@@ -333,8 +333,8 @@ function DropdownMenuItem(_ref) {
|
|
|
333
333
|
var DropdownMenuWithKeyboardNavigation = /*#__PURE__*/_react.default.memo(function (_ref2) {
|
|
334
334
|
var props = (0, _extends2.default)({}, ((0, _objectDestructuringEmpty2.default)(_ref2), _ref2));
|
|
335
335
|
var keyDownHandlerContext = (0, _react.useContext)(_ToolbarArrowKeyNavigationProvider.KeyDownHandlerContext);
|
|
336
|
-
//This context is to handle the tab, Arrow Right/Left key events for dropdown.
|
|
337
|
-
//Default context has the void callbacks for above key events
|
|
336
|
+
// This context is to handle the tab, Arrow Right/Left key events for dropdown.
|
|
337
|
+
// Default context has the void callbacks for above key events
|
|
338
338
|
return (0, _react2.jsx)(DropdownMenuWrapper, (0, _extends2.default)({
|
|
339
339
|
arrowKeyNavigationProviderOptions: _objectSpread(_objectSpread({}, props.arrowKeyNavigationProviderOptions), {}, {
|
|
340
340
|
keyDownHandlerContext: keyDownHandlerContext
|
|
@@ -115,15 +115,15 @@ var ToolbarArrowKeyNavigationProvider = function ToolbarArrowKeyNavigationProvid
|
|
|
115
115
|
*/
|
|
116
116
|
var handleKeyDown = function handleKeyDown(event) {
|
|
117
117
|
var _document$querySelect, _document$querySelect2, _wrapperRef$current;
|
|
118
|
-
//To trap the focus inside the horizontal toolbar for left and right arrow keys
|
|
118
|
+
// To trap the focus inside the horizontal toolbar for left and right arrow keys
|
|
119
119
|
var targetElement = event.target;
|
|
120
120
|
|
|
121
|
-
//To filter out the events outside the child component
|
|
121
|
+
// To filter out the events outside the child component
|
|
122
122
|
if (!targetElement.closest("".concat(childComponentSelector))) {
|
|
123
123
|
return;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
//The key events are from child components such as dropdown menus / popups are ignored
|
|
126
|
+
// The key events are from child components such as dropdown menus / popups are ignored
|
|
127
127
|
if ((_document$querySelect = document.querySelector('[data-role="droplistContent"], [data-test-id="color-picker-menu"], [data-emoji-picker-container="true"]')) !== null && _document$querySelect !== void 0 && _document$querySelect.contains(targetElement) || (_document$querySelect2 = document.querySelector('[data-test-id="color-picker-menu"]')) !== null && _document$querySelect2 !== void 0 && _document$querySelect2.contains(targetElement) || event.key === 'ArrowUp' || event.key === 'ArrowDown' || disableArrowKeyNavigation) {
|
|
128
128
|
return;
|
|
129
129
|
}
|
|
@@ -137,15 +137,15 @@ var ToolbarArrowKeyNavigationProvider = function ToolbarArrowKeyNavigationProvid
|
|
|
137
137
|
return;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
//This is kind of hack to reset the current focused toolbar item
|
|
141
|
-
//to handle some use cases such as Tab in/out of main toolbar
|
|
140
|
+
// This is kind of hack to reset the current focused toolbar item
|
|
141
|
+
// to handle some use cases such as Tab in/out of main toolbar
|
|
142
142
|
if (!((_wrapperRef$current = wrapperRef.current) !== null && _wrapperRef$current !== void 0 && _wrapperRef$current.contains(targetElement))) {
|
|
143
143
|
selectedItemIndex.current = -1;
|
|
144
144
|
} else {
|
|
145
145
|
selectedItemIndex.current = filteredFocusableElements.indexOf(targetElement) > -1 ? filteredFocusableElements.indexOf(targetElement) : selectedItemIndex.current;
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
-
//do not scroll to focused element for sticky toolbar when navigating with arrows to avoid unnesessary scroll jump
|
|
148
|
+
// do not scroll to focused element for sticky toolbar when navigating with arrows to avoid unnesessary scroll jump
|
|
149
149
|
var allowScrollToElement = !(editorAppearance === 'comment' && !!useStickyToolbar);
|
|
150
150
|
switch (event.key) {
|
|
151
151
|
case 'ArrowRight':
|
|
@@ -168,7 +168,7 @@ var ToolbarArrowKeyNavigationProvider = function ToolbarArrowKeyNavigationProvid
|
|
|
168
168
|
}
|
|
169
169
|
};
|
|
170
170
|
var globalKeyDownHandler = function globalKeyDownHandler(event) {
|
|
171
|
-
//To focus the first element in the toolbar
|
|
171
|
+
// To focus the first element in the toolbar
|
|
172
172
|
if (isShortcutToFocusToolbar(event)) {
|
|
173
173
|
var _filteredFocusableEle4, _filteredFocusableEle5;
|
|
174
174
|
var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
|
|
@@ -212,7 +212,7 @@ function getFocusableElements(rootNode) {
|
|
|
212
212
|
return Array.from(focusableModalElements);
|
|
213
213
|
}
|
|
214
214
|
function getFilteredFocusableElements(rootNode) {
|
|
215
|
-
//The focusable elements from child components such as dropdown menus / popups are ignored
|
|
215
|
+
// The focusable elements from child components such as dropdown menus / popups are ignored
|
|
216
216
|
return getFocusableElements(rootNode).filter(function (elm) {
|
|
217
217
|
var style = window.getComputedStyle(elm);
|
|
218
218
|
// ignore invisible element to avoid losing focus
|
|
@@ -16,7 +16,7 @@ var _analytics = require("../../analytics");
|
|
|
16
16
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
17
17
|
var _templateObject; // This file is copied to `packages/editor/editor-plugin-ai/src/ui/components/AtlassianIntelligenceToolbarButton/ToolbarButton/index.tsx`
|
|
18
18
|
// If you make any change here, copy it to above file as well
|
|
19
|
-
//
|
|
19
|
+
// and notify about the change in #team-fc-editor-ai-dev channel.
|
|
20
20
|
/** @jsx jsx */
|
|
21
21
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
22
22
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -42,7 +42,7 @@ var WithOutsideClick = /*#__PURE__*/function (_PureComponent) {
|
|
|
42
42
|
if (_this.props.handleClickOutside) {
|
|
43
43
|
var _this$props$editorVie;
|
|
44
44
|
_this.props.handleClickOutside(evt);
|
|
45
|
-
//When the menus are closed by clicking outside the focus is set on editor.
|
|
45
|
+
// When the menus are closed by clicking outside the focus is set on editor.
|
|
46
46
|
if (!((_this$props$editorVie = _this.props.editorView) !== null && _this$props$editorVie !== void 0 && _this$props$editorVie.hasFocus())) {
|
|
47
47
|
var _this$props$editorVie2;
|
|
48
48
|
(_this$props$editorVie2 = _this.props.editorView) === null || _this$props$editorVie2 === void 0 ? void 0 : _this$props$editorVie2.focus();
|
|
@@ -58,12 +58,12 @@ var WithOutsideClick = /*#__PURE__*/function (_PureComponent) {
|
|
|
58
58
|
evt.preventDefault();
|
|
59
59
|
evt.stopPropagation();
|
|
60
60
|
_this.props.handleEscapeKeydown(evt);
|
|
61
|
-
//on 'Esc', Focus is handled in 'handleEscapeKeydown'.
|
|
61
|
+
// on 'Esc', Focus is handled in 'handleEscapeKeydown'.
|
|
62
62
|
return false;
|
|
63
63
|
} else if (evt.code === 'Enter' && _this.props.handleEnterKeydown) {
|
|
64
64
|
_this.props.handleEnterKeydown(evt);
|
|
65
65
|
} else if (evt.code === 'Tab' && _this.props.handleEscapeKeydown && _this.props.closeOnTab) {
|
|
66
|
-
//The menus should be closed when the tab is pressed as it takes the focus out of the menu
|
|
66
|
+
// The menus should be closed when the tab is pressed as it takes the focus out of the menu
|
|
67
67
|
_this.props.handleEscapeKeydown(evt);
|
|
68
68
|
}
|
|
69
69
|
});
|
|
@@ -77,8 +77,7 @@ var WithOutsideClick = /*#__PURE__*/function (_PureComponent) {
|
|
|
77
77
|
}
|
|
78
78
|
if (this.props.handleEscapeKeydown) {
|
|
79
79
|
var _this$props$editorRef;
|
|
80
|
-
//
|
|
81
|
-
//Attached event to the menu so that 'ESC' events from the opened menu also will be handled.
|
|
80
|
+
// Attached event to the menu so that 'ESC' events from the opened menu also will be handled.
|
|
82
81
|
(((_this$props$editorRef = this.props.editorRef) === null || _this$props$editorRef === void 0 ? void 0 : _this$props$editorRef.current) || this.props.targetRef || document).addEventListener('keydown', this.handleKeydown, false);
|
|
83
82
|
}
|
|
84
83
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, BROWSER_FREEZE_INTERACTION_TYPE, CONTENT_COMPONENT, DELETE_DIRECTION, EVENT_TYPE, FLOATING_CONTROLS_TITLE, FULL_WIDTH_MODE, GAP_CURSOR_POSITION, INDENT_DIRECTION, INDENT_TYPE, INPUT_METHOD, LAYOUT_TYPE, LINK_REPRESENTATION, LINK_RESOURCE, LINK_STATUS, LIST_TEXT_SCENARIOS, JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST, OUTDENT_SCENARIOS, MODE, PLATFORMS, PUNC, PasteContents, PasteSources, PasteTypes, RESOLVE_METHOD, SELECTION_TYPE, SELECTION_POSITION, SMART_LINK_TYPE, SYMBOL, SmartLinkNodeContexts, TABLE_ACTION, TABLE_BREAKOUT, TARGET_SELECTION_SOURCE, TOOLBAR_ACTION_SUBJECT_ID, TRIGGER_METHOD, USER_CONTEXT } from './types';
|
|
1
|
+
export { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, BROWSER_FREEZE_INTERACTION_TYPE, CONTENT_COMPONENT, DELETE_DIRECTION, EVENT_TYPE, FLOATING_CONTROLS_TITLE, FULL_WIDTH_MODE, GAP_CURSOR_POSITION, INDENT_DIRECTION, INDENT_TYPE, INPUT_METHOD, LAYOUT_TYPE, LINK_REPRESENTATION, LINK_RESOURCE, LINK_STATUS, LIST_TEXT_SCENARIOS, JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST, OUTDENT_SCENARIOS, MODE, PLATFORMS, PUNC, PasteContents, PasteSources, PasteTypes, RESOLVE_METHOD, SELECTION_TYPE, SELECTION_POSITION, SMART_LINK_TYPE, SYMBOL, SmartLinkNodeContexts, TABLE_ACTION, TABLE_BREAKOUT, TABLE_OVERFLOW_CHANGE_TRIGGER, TARGET_SELECTION_SOURCE, TOOLBAR_ACTION_SUBJECT_ID, TRIGGER_METHOD, USER_CONTEXT } from './types';
|
|
2
2
|
export { fireAnalyticsEvent } from './fire-analytics-event';
|
|
3
3
|
export { getAnalyticsEventsFromTransaction } from './utils';
|
|
4
4
|
export { buildEditLinkPayload, buildVisitedLinkPayload, buildOpenedSettingsPayload, unlinkPayload } from './linking-utils';
|
|
@@ -3,7 +3,7 @@ export { INDENT_DIRECTION, INDENT_TYPE } from './format-events';
|
|
|
3
3
|
export { PUNC, SYMBOL } from './substitute-events';
|
|
4
4
|
export { BROWSER_FREEZE_INTERACTION_TYPE, FULL_WIDTH_MODE, MODE, PLATFORMS } from './general-events';
|
|
5
5
|
export { LINK_REPRESENTATION, LINK_RESOURCE, LINK_STATUS, USER_CONTEXT } from './insert-events';
|
|
6
|
-
export { TABLE_ACTION, TABLE_BREAKOUT } from './table-events';
|
|
6
|
+
export { TABLE_ACTION, TABLE_BREAKOUT, TABLE_OVERFLOW_CHANGE_TRIGGER } from './table-events';
|
|
7
7
|
export { PasteContents, PasteSources, PasteTypes } from './paste-events';
|
|
8
8
|
export { DELETE_DIRECTION, LIST_TEXT_SCENARIOS, JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST, OUTDENT_SCENARIOS } from './list-events';
|
|
9
9
|
export { GAP_CURSOR_POSITION, TARGET_SELECTION_SOURCE } from './extension-events';
|
|
@@ -23,6 +23,8 @@ export let TABLE_ACTION = /*#__PURE__*/function (TABLE_ACTION) {
|
|
|
23
23
|
TABLE_ACTION["FIXED"] = "fixed";
|
|
24
24
|
TABLE_ACTION["RESIZED"] = "resized";
|
|
25
25
|
TABLE_ACTION["RESIZE_PERF_SAMPLING"] = "resizePerfSampling";
|
|
26
|
+
TABLE_ACTION["OVERFLOW_CHANGED"] = "overflowChanged";
|
|
27
|
+
TABLE_ACTION["INITIAL_OVERFLOW_CAPTURED"] = "initialOverflowCaptured";
|
|
26
28
|
return TABLE_ACTION;
|
|
27
29
|
}({});
|
|
28
30
|
export let TABLE_BREAKOUT = /*#__PURE__*/function (TABLE_BREAKOUT) {
|
|
@@ -33,7 +35,22 @@ export let TABLE_BREAKOUT = /*#__PURE__*/function (TABLE_BREAKOUT) {
|
|
|
33
35
|
}({});
|
|
34
36
|
//#endregion
|
|
35
37
|
|
|
38
|
+
export let TABLE_OVERFLOW_CHANGE_TRIGGER = /*#__PURE__*/function (TABLE_OVERFLOW_CHANGE_TRIGGER) {
|
|
39
|
+
TABLE_OVERFLOW_CHANGE_TRIGGER["EXTERNAL"] = "external";
|
|
40
|
+
TABLE_OVERFLOW_CHANGE_TRIGGER["ADDED_COLUMN"] = "addedColumn";
|
|
41
|
+
TABLE_OVERFLOW_CHANGE_TRIGGER["DELETED_COLUMN"] = "deletedColumn";
|
|
42
|
+
TABLE_OVERFLOW_CHANGE_TRIGGER["RESIZED_COLUMN"] = "resizedColumn";
|
|
43
|
+
TABLE_OVERFLOW_CHANGE_TRIGGER["ENABLED_NUMBERED_COLUMN"] = "enabledNumberedColumn";
|
|
44
|
+
TABLE_OVERFLOW_CHANGE_TRIGGER["DISABLED_NUMBERED_COLUMN"] = "disabledNumberedColumn";
|
|
45
|
+
TABLE_OVERFLOW_CHANGE_TRIGGER["DISTRIBUTED_COLUMNS"] = "distributedColumnsWidths";
|
|
46
|
+
TABLE_OVERFLOW_CHANGE_TRIGGER["RESIZED"] = "resizedTable";
|
|
47
|
+
return TABLE_OVERFLOW_CHANGE_TRIGGER;
|
|
48
|
+
}({});
|
|
49
|
+
|
|
36
50
|
//#region Type Helpers
|
|
51
|
+
|
|
37
52
|
//#endregion
|
|
53
|
+
|
|
38
54
|
//#region Analytic Event Payloads
|
|
55
|
+
|
|
39
56
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
2
2
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
3
|
-
const packageVersion = "75.
|
|
3
|
+
const packageVersion = "75.5.0";
|
|
4
4
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
5
5
|
// Remove URL as it has UGC
|
|
6
6
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -14,21 +14,21 @@ export class EditorPresetBuilder {
|
|
|
14
14
|
nextOrTuple, ...this.data);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
//hasPlugin<Plugin extends NextEditorPlugin<any, any>>(
|
|
18
|
-
//
|
|
19
|
-
//): this is TryCastEditorPresetBuilderByCheckingPlugins<this, Plugin> {
|
|
20
|
-
//
|
|
21
|
-
//
|
|
22
|
-
//
|
|
23
|
-
//
|
|
24
|
-
//
|
|
25
|
-
//
|
|
17
|
+
// hasPlugin<Plugin extends NextEditorPlugin<any, any>>(
|
|
18
|
+
// pluginToAdd: Plugin,
|
|
19
|
+
// ): this is TryCastEditorPresetBuilderByCheckingPlugins<this, Plugin> {
|
|
20
|
+
// const hasPluginQueryExists = this.data.find((pluginEntry) => {
|
|
21
|
+
// const pluginFunction: NextEditorPlugin<any, any> = !Array.isArray(
|
|
22
|
+
// pluginEntry,
|
|
23
|
+
// )
|
|
24
|
+
// ? pluginEntry
|
|
25
|
+
// : pluginEntry[0];
|
|
26
26
|
|
|
27
|
-
//
|
|
28
|
-
//
|
|
27
|
+
// return pluginFunction === pluginToAdd;
|
|
28
|
+
// });
|
|
29
29
|
|
|
30
|
-
//
|
|
31
|
-
//}
|
|
30
|
+
// return Boolean(hasPluginQueryExists);
|
|
31
|
+
// }
|
|
32
32
|
|
|
33
33
|
maybeAdd(pluginToAdd, add) {
|
|
34
34
|
return add(pluginToAdd,
|
|
@@ -106,39 +106,39 @@ export class EditorPresetBuilder {
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
// TODO: ED-17023 - Bring back type safety to the EditorPresetBuilder.add preset
|
|
109
|
-
//import type {
|
|
110
|
-
//
|
|
111
|
-
//} from '../types/next-editor-plugin';
|
|
112
|
-
//type TryCastEditorPresetBuilderByCheckingDependencies<MaybeEditorPresetBuilder, Plugin> =
|
|
113
|
-
//
|
|
114
|
-
//
|
|
115
|
-
//
|
|
116
|
-
//
|
|
117
|
-
//
|
|
118
|
-
//
|
|
119
|
-
//
|
|
120
|
-
//
|
|
121
|
-
//
|
|
122
|
-
//
|
|
123
|
-
//maybeAdd<
|
|
124
|
-
//
|
|
125
|
-
//
|
|
126
|
-
//
|
|
127
|
-
//
|
|
128
|
-
//
|
|
129
|
-
//
|
|
130
|
-
//
|
|
131
|
-
|
|
132
|
-
//
|
|
133
|
-
//
|
|
134
|
-
//
|
|
135
|
-
//
|
|
136
|
-
//
|
|
137
|
-
//): MaybeEditorPresetBuilder | this {
|
|
138
|
-
//
|
|
139
|
-
//
|
|
140
|
-
//
|
|
141
|
-
//
|
|
142
|
-
//
|
|
143
|
-
//}
|
|
109
|
+
// import type {
|
|
110
|
+
// ExtractPluginDependencies,
|
|
111
|
+
// } from '../types/next-editor-plugin';
|
|
112
|
+
// type TryCastEditorPresetBuilderByCheckingDependencies<MaybeEditorPresetBuilder, Plugin> =
|
|
113
|
+
// MaybeEditorPresetBuilder extends EditorPresetBuilder<any, infer StackPlugins>
|
|
114
|
+
// ? Plugin extends NextEditorPlugin<any, any>
|
|
115
|
+
// ? ExtractPluginDependencies<Plugin>[number] extends StackPlugins[number]
|
|
116
|
+
// ? MaybeEditorPresetBuilder
|
|
117
|
+
// : never
|
|
118
|
+
// : never
|
|
119
|
+
// : never;
|
|
120
|
+
// Because how our plugins are added in the preset, we can't use the type safe system
|
|
121
|
+
// in the EditorPresetBuilder.
|
|
122
|
+
// TODO: ED-17023 - Bring back type safety to the EditorPresetBuilder.add preset
|
|
123
|
+
// maybeAdd<
|
|
124
|
+
// MaybePlugin extends NextEditorPlugin<any, any>,
|
|
125
|
+
// MaybePluginNames extends string[],
|
|
126
|
+
// MaybeStackPlugins extends AllEditorPresetPluginTypes[],
|
|
127
|
+
// MaybeEditorPresetBuilder extends EditorPresetBuilder<
|
|
128
|
+
// MaybePluginNames,
|
|
129
|
+
// MaybeStackPlugins
|
|
130
|
+
// >,
|
|
131
|
+
// >(
|
|
132
|
+
// pluginToAdd: MaybePlugin,
|
|
133
|
+
// add: (
|
|
134
|
+
// pluginToAdd: MaybePlugin,
|
|
135
|
+
// maybeEditorPresetBuilder: TryCastEditorPresetBuilderByCheckingDependencies<this, MaybePlugin>,
|
|
136
|
+
// ) => MaybeEditorPresetBuilder,
|
|
137
|
+
// ): MaybeEditorPresetBuilder | this {
|
|
138
|
+
// return add(
|
|
139
|
+
// pluginToAdd,
|
|
140
|
+
// // @ts-ignore
|
|
141
|
+
// this as any,
|
|
142
|
+
// );
|
|
143
|
+
// }
|
|
144
144
|
}
|
|
@@ -9,7 +9,7 @@ import { themed } from '@atlaskit/theme/components';
|
|
|
9
9
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
10
10
|
import Layer from '../Layer';
|
|
11
11
|
const packageName = "@atlaskit/editor-common";
|
|
12
|
-
const packageVersion = "75.
|
|
12
|
+
const packageVersion = "75.5.0";
|
|
13
13
|
const halfFocusRing = 1;
|
|
14
14
|
const dropOffset = '0, 8';
|
|
15
15
|
class DropList extends Component {
|
package/dist/es2019/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.js
CHANGED
|
@@ -63,14 +63,14 @@ export const MenuArrowKeyNavigationProvider = ({
|
|
|
63
63
|
var _wrapperRef$current;
|
|
64
64
|
const targetElement = event.target;
|
|
65
65
|
|
|
66
|
-
//Tab key on menu items can be handled in the parent components of dropdown menus with KeydownHandlerContext
|
|
66
|
+
// Tab key on menu items can be handled in the parent components of dropdown menus with KeydownHandlerContext
|
|
67
67
|
if (event.key === 'Tab' && closeOnTab) {
|
|
68
68
|
handleClose(event);
|
|
69
69
|
keyDownHandlerContext === null || keyDownHandlerContext === void 0 ? void 0 : keyDownHandlerContext.handleTab();
|
|
70
70
|
return;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
//To trap the focus inside the toolbar using left and right arrow keys
|
|
73
|
+
// To trap the focus inside the toolbar using left and right arrow keys
|
|
74
74
|
const focusableElements = getFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
|
|
75
75
|
if (!focusableElements || (focusableElements === null || focusableElements === void 0 ? void 0 : focusableElements.length) === 0) {
|
|
76
76
|
return;
|
|
@@ -96,10 +96,10 @@ export const MenuArrowKeyNavigationProvider = ({
|
|
|
96
96
|
break;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
//ArrowLeft/Right on the menu should close the menus
|
|
100
|
-
//then logic to retain the focus can be handled in the parent components with KeydownHandlerContext
|
|
99
|
+
// ArrowLeft/Right on the menu should close the menus
|
|
100
|
+
// then logic to retain the focus can be handled in the parent components with KeydownHandlerContext
|
|
101
101
|
case 'ArrowLeft':
|
|
102
|
-
//Filter out the events from outside the menu
|
|
102
|
+
// Filter out the events from outside the menu
|
|
103
103
|
if (!targetElement.closest('.custom-key-handler-wrapper')) {
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
@@ -109,7 +109,7 @@ export const MenuArrowKeyNavigationProvider = ({
|
|
|
109
109
|
}
|
|
110
110
|
break;
|
|
111
111
|
case 'ArrowRight':
|
|
112
|
-
//Filter out the events from outside the menu
|
|
112
|
+
// Filter out the events from outside the menu
|
|
113
113
|
if (!targetElement.closest('.custom-key-handler-wrapper')) {
|
|
114
114
|
return;
|
|
115
115
|
}
|