@atlaskit/editor-core 187.15.0 → 187.15.1
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 +6 -0
- package/dist/cjs/create-editor/create-plugins-list.js +2 -7
- package/dist/cjs/create-editor/feature-flags-from-props.js +23 -28
- package/dist/cjs/plugins/type-ahead/index.js +1 -4
- package/dist/cjs/plugins/type-ahead/pm-plugins/decorations.js +2 -4
- package/dist/cjs/plugins/type-ahead/pm-plugins/main.js +2 -4
- package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +21 -40
- package/dist/cjs/plugins/type-ahead/ui/WrapperTypeAhead.js +5 -9
- package/dist/cjs/plugins/type-ahead/utils.js +15 -19
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/create-editor/create-plugins-list.js +2 -7
- package/dist/es2019/create-editor/feature-flags-from-props.js +23 -28
- package/dist/es2019/plugins/type-ahead/index.js +1 -4
- package/dist/es2019/plugins/type-ahead/pm-plugins/decorations.js +2 -4
- package/dist/es2019/plugins/type-ahead/pm-plugins/main.js +2 -4
- package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +21 -40
- package/dist/es2019/plugins/type-ahead/ui/WrapperTypeAhead.js +5 -9
- package/dist/es2019/plugins/type-ahead/utils.js +15 -19
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/create-editor/create-plugins-list.js +2 -7
- package/dist/esm/create-editor/feature-flags-from-props.js +23 -28
- package/dist/esm/plugins/type-ahead/index.js +1 -4
- package/dist/esm/plugins/type-ahead/pm-plugins/decorations.js +2 -4
- package/dist/esm/plugins/type-ahead/pm-plugins/main.js +2 -4
- package/dist/esm/plugins/type-ahead/ui/InputQuery.js +21 -40
- package/dist/esm/plugins/type-ahead/ui/WrapperTypeAhead.js +5 -9
- package/dist/esm/plugins/type-ahead/utils.js +15 -19
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/create-editor/create-plugins-list.d.ts +6 -6
- package/dist/types/plugins/type-ahead/index.d.ts +0 -1
- package/dist/types/plugins/type-ahead/pm-plugins/decorations.d.ts +1 -2
- package/dist/types/plugins/type-ahead/pm-plugins/main.d.ts +1 -2
- package/dist/types/plugins/type-ahead/ui/InputQuery.d.ts +0 -1
- package/dist/types/plugins/type-ahead/ui/WrapperTypeAhead.d.ts +0 -1
- package/dist/types/plugins/type-ahead/utils.d.ts +1 -2
- package/dist/types-ts4.5/create-editor/create-plugins-list.d.ts +6 -6
- package/dist/types-ts4.5/plugins/type-ahead/index.d.ts +0 -1
- package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/decorations.d.ts +1 -2
- package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/main.d.ts +1 -2
- package/dist/types-ts4.5/plugins/type-ahead/ui/InputQuery.d.ts +0 -1
- package/dist/types-ts4.5/plugins/type-ahead/ui/WrapperTypeAhead.d.ts +0 -1
- package/dist/types-ts4.5/plugins/type-ahead/utils.d.ts +1 -2
- package/package.json +1 -1
- package/report.api.md +1 -2
- package/tmp/api-report-tmp.d.ts +1 -2
package/CHANGELOG.md
CHANGED
|
@@ -44,21 +44,16 @@ function getScrollGutterOptions(props) {
|
|
|
44
44
|
return undefined;
|
|
45
45
|
}
|
|
46
46
|
function getDefaultPresetOptionsFromEditorProps(props, createAnalyticsEvent) {
|
|
47
|
-
var _props$performanceTra, _props$linking,
|
|
47
|
+
var _props$performanceTra, _props$linking, _props$performanceTra2, _props$textFormatting, _props$linking2;
|
|
48
48
|
var appearance = props.appearance;
|
|
49
49
|
var isMobile = appearance === 'mobile';
|
|
50
50
|
var inputTracking = (_props$performanceTra = props.performanceTracking) === null || _props$performanceTra === void 0 ? void 0 : _props$performanceTra.inputTracking;
|
|
51
51
|
var cardOptions = ((_props$linking = props.linking) === null || _props$linking === void 0 ? void 0 : _props$linking.smartLinks) || props.smartLinks || props.UNSAFE_cards;
|
|
52
|
-
|
|
53
|
-
// duplicated logic from `feature-flags-from-props.ts` due to presets not being finalised
|
|
54
|
-
var pseudoNormalisedUseBetterTypeaheadNavigation = (_ref = (_props$featureFlags$u = (_props$featureFlags = props.featureFlags) === null || _props$featureFlags === void 0 ? void 0 : _props$featureFlags['use-better-typeahead-navigation']) !== null && _props$featureFlags$u !== void 0 ? _props$featureFlags$u : (_props$featureFlags2 = props.featureFlags) === null || _props$featureFlags2 === void 0 ? void 0 : _props$featureFlags2.useBetterTypeaheadNavigation) !== null && _ref !== void 0 ? _ref : null;
|
|
55
|
-
var useBetterTypeaheadNavigation = Boolean(typeof pseudoNormalisedUseBetterTypeaheadNavigation === 'boolean' ? !!pseudoNormalisedUseBetterTypeaheadNavigation : true);
|
|
56
52
|
return _objectSpread(_objectSpread({}, props), {}, {
|
|
57
53
|
createAnalyticsEvent: createAnalyticsEvent,
|
|
58
54
|
typeAhead: {
|
|
59
55
|
createAnalyticsEvent: createAnalyticsEvent,
|
|
60
|
-
isMobile: isMobile
|
|
61
|
-
useBetterTypeaheadNavigation: useBetterTypeaheadNavigation
|
|
56
|
+
isMobile: isMobile
|
|
62
57
|
},
|
|
63
58
|
featureFlags: (0, _featureFlagsFromProps.createFeatureFlagsFromProps)(props),
|
|
64
59
|
paste: {
|
|
@@ -32,12 +32,9 @@ function getSpellCheck(featureFlags) {
|
|
|
32
32
|
* which is used by both current and archv3 editors.
|
|
33
33
|
*/
|
|
34
34
|
function createFeatureFlagsFromProps(props) {
|
|
35
|
-
var _props$featureFlags,
|
|
35
|
+
var _props$featureFlags, _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$featureFlags2, _props$featureFlags3, _props$allowTables, _props$featureFlags4, _props$featureFlags5, _props$allowTables2, _props$featureFlags6, _props$featureFlags7, _props$allowTables3, _props$featureFlags8, _props$featureFlags9, _props$allowTables4, _props$allowTables5, _props$featureFlags10, _props$featureFlags11, _props$allowTables6, _props$allowExtension, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$featureFlags28, _props$featureFlags29, _props$collabEdit, _props$collabEdit2, _props$featureFlags30, _props$featureFlags31, _props$featureFlags32, _props$featureFlags33, _props$featureFlags34, _props$featureFlags35, _props$featureFlags36, _props$featureFlags37, _props$featureFlags38, _props$featureFlags39, _props$featureFlags40, _props$featureFlags41, _props$featureFlags42;
|
|
36
36
|
var normalizedFeatureFlags = (0, _normalizeFeatureFlags.normalizeFeatureFlags)(props.featureFlags);
|
|
37
37
|
var tableCellOptionsInFloatingToolbar = normalizedFeatureFlags.tableCellOptionsInFloatingToolbar || ((_props$featureFlags = props.featureFlags) === null || _props$featureFlags === void 0 ? void 0 : _props$featureFlags.tableCellOptionsInFloatingToolbar) || undefined;
|
|
38
|
-
|
|
39
|
-
// duplicated logic from `feature-flags-from-props.ts` due to presets not being finalised
|
|
40
|
-
var pseudoNormalisedUseBetterTypeaheadNavigation = (_ref = (_props$featureFlags$u = (_props$featureFlags2 = props.featureFlags) === null || _props$featureFlags2 === void 0 ? void 0 : _props$featureFlags2['use-better-typeahead-navigation']) !== null && _props$featureFlags$u !== void 0 ? _props$featureFlags$u : (_props$featureFlags3 = props.featureFlags) === null || _props$featureFlags3 === void 0 ? void 0 : _props$featureFlags3.useBetterTypeaheadNavigation) !== null && _ref !== void 0 ? _ref : null;
|
|
41
38
|
return _objectSpread(_objectSpread({}, normalizedFeatureFlags), {}, {
|
|
42
39
|
newInsertionBehaviour: props.allowNewInsertionBehaviour,
|
|
43
40
|
interactiveExpand: typeof props.allowExpand === 'boolean' ? props.allowExpand : Boolean(props.allowExpand && props.allowExpand.allowInteractiveExpand !== false),
|
|
@@ -48,36 +45,34 @@ function createFeatureFlagsFromProps(props) {
|
|
|
48
45
|
singleLayout: (0, _typeof2.default)(props.allowLayouts) === 'object' && !!((_props$allowLayouts = props.allowLayouts) !== null && _props$allowLayouts !== void 0 && _props$allowLayouts.UNSAFE_allowSingleColumnLayout),
|
|
49
46
|
undoRedoButtons: props.allowUndoRedoButtons,
|
|
50
47
|
catchAllTracking: (_props$performanceTra = props.performanceTracking) === null || _props$performanceTra === void 0 ? void 0 : (_props$performanceTra2 = _props$performanceTra.catchAllTracking) === null || _props$performanceTra2 === void 0 ? void 0 : _props$performanceTra2.enabled,
|
|
51
|
-
stickyHeadersOptimization: typeof ((_props$
|
|
52
|
-
initialRenderOptimization: typeof ((_props$
|
|
53
|
-
mouseMoveOptimization: typeof ((_props$
|
|
54
|
-
tableRenderOptimization: typeof ((_props$
|
|
55
|
-
tableOverflowShadowsOptimization: typeof ((_props$
|
|
48
|
+
stickyHeadersOptimization: typeof ((_props$featureFlags2 = props.featureFlags) === null || _props$featureFlags2 === void 0 ? void 0 : _props$featureFlags2.stickyHeadersOptimization) === 'boolean' ? !!((_props$featureFlags3 = props.featureFlags) !== null && _props$featureFlags3 !== void 0 && _props$featureFlags3.stickyHeadersOptimization) : (0, _typeof2.default)(props.allowTables) === 'object' && !!((_props$allowTables = props.allowTables) !== null && _props$allowTables !== void 0 && _props$allowTables.stickyHeadersOptimization),
|
|
49
|
+
initialRenderOptimization: typeof ((_props$featureFlags4 = props.featureFlags) === null || _props$featureFlags4 === void 0 ? void 0 : _props$featureFlags4.initialRenderOptimization) === 'boolean' ? !!((_props$featureFlags5 = props.featureFlags) !== null && _props$featureFlags5 !== void 0 && _props$featureFlags5.initialRenderOptimization) : (0, _typeof2.default)(props.allowTables) === 'object' && !!((_props$allowTables2 = props.allowTables) !== null && _props$allowTables2 !== void 0 && _props$allowTables2.initialRenderOptimization),
|
|
50
|
+
mouseMoveOptimization: typeof ((_props$featureFlags6 = props.featureFlags) === null || _props$featureFlags6 === void 0 ? void 0 : _props$featureFlags6.mouseMoveOptimization) === 'boolean' ? !!((_props$featureFlags7 = props.featureFlags) !== null && _props$featureFlags7 !== void 0 && _props$featureFlags7.mouseMoveOptimization) : (0, _typeof2.default)(props.allowTables) === 'object' && !!((_props$allowTables3 = props.allowTables) !== null && _props$allowTables3 !== void 0 && _props$allowTables3.mouseMoveOptimization),
|
|
51
|
+
tableRenderOptimization: typeof ((_props$featureFlags8 = props.featureFlags) === null || _props$featureFlags8 === void 0 ? void 0 : _props$featureFlags8.tableRenderOptimization) === 'boolean' ? !!((_props$featureFlags9 = props.featureFlags) !== null && _props$featureFlags9 !== void 0 && _props$featureFlags9.tableRenderOptimization) : (0, _typeof2.default)(props.allowTables) === 'object' && typeof ((_props$allowTables4 = props.allowTables) === null || _props$allowTables4 === void 0 ? void 0 : _props$allowTables4.tableRenderOptimization) === 'boolean' ? (_props$allowTables5 = props.allowTables) === null || _props$allowTables5 === void 0 ? void 0 : _props$allowTables5.tableRenderOptimization : true,
|
|
52
|
+
tableOverflowShadowsOptimization: typeof ((_props$featureFlags10 = props.featureFlags) === null || _props$featureFlags10 === void 0 ? void 0 : _props$featureFlags10.tableOverflowShadowsOptimization) === 'boolean' ? !!((_props$featureFlags11 = props.featureFlags) !== null && _props$featureFlags11 !== void 0 && _props$featureFlags11.tableOverflowShadowsOptimization) : (0, _typeof2.default)(props.allowTables) === 'object' && !!((_props$allowTables6 = props.allowTables) !== null && _props$allowTables6 !== void 0 && _props$allowTables6.tableOverflowShadowsOptimization),
|
|
56
53
|
extendFloatingToolbar: Boolean((0, _typeof2.default)(props.allowExtension) === 'object' && ((_props$allowExtension = props.allowExtension) === null || _props$allowExtension === void 0 ? void 0 : _props$allowExtension.allowExtendFloatingToolbars)),
|
|
57
|
-
showAvatarGroupAsPlugin: Boolean(typeof ((_props$
|
|
58
|
-
errorBoundaryDocStructure: Boolean(typeof ((_props$
|
|
59
|
-
synchronyErrorDocStructure: Boolean(typeof ((_props$
|
|
60
|
-
enableViewUpdateSubscription: Boolean(typeof ((_props$
|
|
61
|
-
collabAvatarScroll: Boolean(typeof ((_props$
|
|
62
|
-
ufo: Boolean(typeof ((_props$
|
|
63
|
-
twoLineEditorToolbar: Boolean(typeof ((_props$
|
|
64
|
-
saferDispatchedTransactions: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactions === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactions || (typeof ((_props$
|
|
65
|
-
saferDispatchedTransactionsAnalyticsOnly: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactionsAnalyticsOnly === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactionsAnalyticsOnly || (typeof ((_props$
|
|
54
|
+
showAvatarGroupAsPlugin: Boolean(typeof ((_props$featureFlags12 = props.featureFlags) === null || _props$featureFlags12 === void 0 ? void 0 : _props$featureFlags12.showAvatarGroupAsPlugin) === 'boolean' ? !!((_props$featureFlags13 = props.featureFlags) !== null && _props$featureFlags13 !== void 0 && _props$featureFlags13.showAvatarGroupAsPlugin) : false),
|
|
55
|
+
errorBoundaryDocStructure: Boolean(typeof ((_props$featureFlags14 = props.featureFlags) === null || _props$featureFlags14 === void 0 ? void 0 : _props$featureFlags14.useErrorBoundaryDocStructure) === 'boolean' ? !!((_props$featureFlags15 = props.featureFlags) !== null && _props$featureFlags15 !== void 0 && _props$featureFlags15.useErrorBoundaryDocStructure) : false),
|
|
56
|
+
synchronyErrorDocStructure: Boolean(typeof ((_props$featureFlags16 = props.featureFlags) === null || _props$featureFlags16 === void 0 ? void 0 : _props$featureFlags16.synchronyErrorDocStructure) === 'boolean' ? !!((_props$featureFlags17 = props.featureFlags) !== null && _props$featureFlags17 !== void 0 && _props$featureFlags17.synchronyErrorDocStructure) : false),
|
|
57
|
+
enableViewUpdateSubscription: Boolean(typeof ((_props$featureFlags18 = props.featureFlags) === null || _props$featureFlags18 === void 0 ? void 0 : _props$featureFlags18.enableViewUpdateSubscription) === 'boolean' ? !!((_props$featureFlags19 = props.featureFlags) !== null && _props$featureFlags19 !== void 0 && _props$featureFlags19.enableViewUpdateSubscription) : false),
|
|
58
|
+
collabAvatarScroll: Boolean(typeof ((_props$featureFlags20 = props.featureFlags) === null || _props$featureFlags20 === void 0 ? void 0 : _props$featureFlags20.collabAvatarScroll) === 'boolean' ? !!((_props$featureFlags21 = props.featureFlags) !== null && _props$featureFlags21 !== void 0 && _props$featureFlags21.collabAvatarScroll) : false),
|
|
59
|
+
ufo: Boolean(typeof ((_props$featureFlags22 = props.featureFlags) === null || _props$featureFlags22 === void 0 ? void 0 : _props$featureFlags22.ufo) === 'boolean' ? !!((_props$featureFlags23 = props.featureFlags) !== null && _props$featureFlags23 !== void 0 && _props$featureFlags23.ufo) : false),
|
|
60
|
+
twoLineEditorToolbar: Boolean(typeof ((_props$featureFlags24 = props.featureFlags) === null || _props$featureFlags24 === void 0 ? void 0 : _props$featureFlags24.twoLineEditorToolbar) === 'boolean' ? !!((_props$featureFlags25 = props.featureFlags) !== null && _props$featureFlags25 !== void 0 && _props$featureFlags25.twoLineEditorToolbar) : false),
|
|
61
|
+
saferDispatchedTransactions: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactions === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactions || (typeof ((_props$featureFlags26 = props.featureFlags) === null || _props$featureFlags26 === void 0 ? void 0 : _props$featureFlags26.saferDispatchedTransactions) === 'boolean' ? !!((_props$featureFlags27 = props.featureFlags) !== null && _props$featureFlags27 !== void 0 && _props$featureFlags27.saferDispatchedTransactions) : false)),
|
|
62
|
+
saferDispatchedTransactionsAnalyticsOnly: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactionsAnalyticsOnly === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactionsAnalyticsOnly || (typeof ((_props$featureFlags28 = props.featureFlags) === null || _props$featureFlags28 === void 0 ? void 0 : _props$featureFlags28.saferDispatchedTransactionsAnalyticsOnly) === 'boolean' ? !!((_props$featureFlags29 = props.featureFlags) !== null && _props$featureFlags29 !== void 0 && _props$featureFlags29.saferDispatchedTransactionsAnalyticsOnly) : false)),
|
|
66
63
|
useNativeCollabPlugin: Boolean(typeof ((_props$collabEdit = props.collabEdit) === null || _props$collabEdit === void 0 ? void 0 : _props$collabEdit.useNativePlugin) === 'boolean' ? !!((_props$collabEdit2 = props.collabEdit) !== null && _props$collabEdit2 !== void 0 && _props$collabEdit2.useNativePlugin) : false),
|
|
67
|
-
chromeCursorHandlerFixedVersion: typeof ((_props$
|
|
64
|
+
chromeCursorHandlerFixedVersion: typeof ((_props$featureFlags30 = props.featureFlags) === null || _props$featureFlags30 === void 0 ? void 0 : _props$featureFlags30.chromeCursorHandlerFixedVersion) === 'string' ? Number(props.featureFlags.chromeCursorHandlerFixedVersion) || undefined : undefined,
|
|
68
65
|
tableCellOptionsInFloatingToolbar: typeof tableCellOptionsInFloatingToolbar === 'boolean' ? tableCellOptionsInFloatingToolbar : false,
|
|
69
|
-
showHoverPreview: Boolean(typeof ((_props$
|
|
70
|
-
indentationButtonsInTheToolbar: Boolean(typeof normalizedFeatureFlags.indentationButtonsInTheToolbar === 'boolean' && !!normalizedFeatureFlags.indentationButtonsInTheToolbar || (typeof ((_props$
|
|
71
|
-
floatingToolbarCopyButton: Boolean(typeof normalizedFeatureFlags.floatingToolbarCopyButton === 'boolean' && !!normalizedFeatureFlags.floatingToolbarCopyButton || (typeof ((_props$
|
|
72
|
-
floatingToolbarLinkSettingsButton: typeof ((_props$
|
|
66
|
+
showHoverPreview: Boolean(typeof ((_props$featureFlags31 = props.featureFlags) === null || _props$featureFlags31 === void 0 ? void 0 : _props$featureFlags31.showHoverPreview) === 'boolean' ? !!((_props$featureFlags32 = props.featureFlags) !== null && _props$featureFlags32 !== void 0 && _props$featureFlags32.showHoverPreview) : false),
|
|
67
|
+
indentationButtonsInTheToolbar: Boolean(typeof normalizedFeatureFlags.indentationButtonsInTheToolbar === 'boolean' && !!normalizedFeatureFlags.indentationButtonsInTheToolbar || (typeof ((_props$featureFlags33 = props.featureFlags) === null || _props$featureFlags33 === void 0 ? void 0 : _props$featureFlags33.indentationButtonsInTheToolbar) === 'boolean' ? !!((_props$featureFlags34 = props.featureFlags) !== null && _props$featureFlags34 !== void 0 && _props$featureFlags34.indentationButtonsInTheToolbar) : false)),
|
|
68
|
+
floatingToolbarCopyButton: Boolean(typeof normalizedFeatureFlags.floatingToolbarCopyButton === 'boolean' && !!normalizedFeatureFlags.floatingToolbarCopyButton || (typeof ((_props$featureFlags35 = props.featureFlags) === null || _props$featureFlags35 === void 0 ? void 0 : _props$featureFlags35.floatingToolbarCopyButton) === 'boolean' ? !!((_props$featureFlags36 = props.featureFlags) !== null && _props$featureFlags36 !== void 0 && _props$featureFlags36.floatingToolbarCopyButton) : false)),
|
|
69
|
+
floatingToolbarLinkSettingsButton: typeof ((_props$featureFlags37 = props.featureFlags) === null || _props$featureFlags37 === void 0 ? void 0 : _props$featureFlags37['floating-toolbar-link-settings-button']) === 'string' ? props.featureFlags['floating-toolbar-link-settings-button'] || undefined : undefined,
|
|
73
70
|
disableSpellcheckByBrowser: getSpellCheck(props.featureFlags),
|
|
74
71
|
// Including fallback to props.featureFlags so that mobile feature flags
|
|
75
72
|
// are included (they are not kebab cased)
|
|
76
|
-
restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$
|
|
77
|
-
useSomewhatSemanticTextColorNames: Boolean(typeof normalizedFeatureFlags.useSomewhatSemanticTextColorNames === 'boolean' && !!normalizedFeatureFlags.useSomewhatSemanticTextColorNames || (typeof ((_props$
|
|
73
|
+
restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags38 = props.featureFlags) === null || _props$featureFlags38 === void 0 ? void 0 : _props$featureFlags38.restartNumberedLists) === true,
|
|
74
|
+
useSomewhatSemanticTextColorNames: Boolean(typeof normalizedFeatureFlags.useSomewhatSemanticTextColorNames === 'boolean' && !!normalizedFeatureFlags.useSomewhatSemanticTextColorNames || (typeof ((_props$featureFlags39 = props.featureFlags) === null || _props$featureFlags39 === void 0 ? void 0 : _props$featureFlags39.useSomewhatSemanticTextColorNames) === 'boolean' ? !!((_props$featureFlags40 = props.featureFlags) !== null && _props$featureFlags40 !== void 0 && _props$featureFlags40.useSomewhatSemanticTextColorNames) : false)),
|
|
78
75
|
lpLinkPickerFocusTrap: Boolean(normalizedFeatureFlags.lpLinkPickerFocusTrap),
|
|
79
|
-
preventPopupOverflow: Boolean(typeof ((_props$
|
|
80
|
-
// duplicated logic from `create-plugins-list.ts` due to presets not being finalised
|
|
81
|
-
useBetterTypeaheadNavigation: Boolean(typeof pseudoNormalisedUseBetterTypeaheadNavigation === 'boolean' ? !!pseudoNormalisedUseBetterTypeaheadNavigation : true)
|
|
76
|
+
preventPopupOverflow: Boolean(typeof ((_props$featureFlags41 = props.featureFlags) === null || _props$featureFlags41 === void 0 ? void 0 : _props$featureFlags41['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags42 = props.featureFlags) !== null && _props$featureFlags42 !== void 0 && _props$featureFlags42['prevent-popup-overflow']) : false)
|
|
82
77
|
});
|
|
83
78
|
}
|
|
@@ -127,8 +127,6 @@ var TypeAheadMenu = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
127
127
|
*
|
|
128
128
|
*/
|
|
129
129
|
var typeAheadPlugin = function typeAheadPlugin(options) {
|
|
130
|
-
var _options$useBetterTyp;
|
|
131
|
-
var useBetterTypeaheadNavigation = (_options$useBetterTyp = options === null || options === void 0 ? void 0 : options.useBetterTypeaheadNavigation) !== null && _options$useBetterTyp !== void 0 ? _options$useBetterTyp : true;
|
|
132
130
|
var fireAnalyticsCallback = (0, _analytics.fireAnalyticsEvent)(options === null || options === void 0 ? void 0 : options.createAnalyticsEvent);
|
|
133
131
|
var popupMountRef = {
|
|
134
132
|
current: null
|
|
@@ -155,8 +153,7 @@ var typeAheadPlugin = function typeAheadPlugin(options) {
|
|
|
155
153
|
popupMountRef: popupMountRef,
|
|
156
154
|
reactDispatch: dispatch,
|
|
157
155
|
typeAheadHandlers: typeAhead,
|
|
158
|
-
createAnalyticsEvent: options === null || options === void 0 ? void 0 : options.createAnalyticsEvent
|
|
159
|
-
useBetterTypeaheadNavigation: useBetterTypeaheadNavigation
|
|
156
|
+
createAnalyticsEvent: options === null || options === void 0 ? void 0 : options.createAnalyticsEvent
|
|
160
157
|
});
|
|
161
158
|
}
|
|
162
159
|
}, {
|
|
@@ -22,8 +22,7 @@ var _closeTypeAhead = require("../transforms/close-type-ahead");
|
|
|
22
22
|
var factoryDecorations = function factoryDecorations(_ref) {
|
|
23
23
|
var intl = _ref.intl,
|
|
24
24
|
popupMountRef = _ref.popupMountRef,
|
|
25
|
-
createAnalyticsEvent = _ref.createAnalyticsEvent
|
|
26
|
-
useBetterTypeaheadNavigation = _ref.useBetterTypeaheadNavigation;
|
|
25
|
+
createAnalyticsEvent = _ref.createAnalyticsEvent;
|
|
27
26
|
var createDecorations = function createDecorations(tr, _ref2) {
|
|
28
27
|
var triggerHandler = _ref2.triggerHandler,
|
|
29
28
|
inputMethod = _ref2.inputMethod,
|
|
@@ -95,8 +94,7 @@ var factoryDecorations = function factoryDecorations(_ref) {
|
|
|
95
94
|
popupsBoundariesElement: (_popupMountRef$curren2 = popupMountRef.current) === null || _popupMountRef$curren2 === void 0 ? void 0 : _popupMountRef$curren2.popupsBoundariesElement,
|
|
96
95
|
popupsScrollableElement: (_popupMountRef$curren3 = popupMountRef.current) === null || _popupMountRef$curren3 === void 0 ? void 0 : _popupMountRef$curren3.popupsScrollableElement,
|
|
97
96
|
onUndoRedo: onUndoRedo,
|
|
98
|
-
reopenQuery: reopenQuery
|
|
99
|
-
useBetterTypeaheadNavigation: useBetterTypeaheadNavigation
|
|
97
|
+
reopenQuery: reopenQuery
|
|
100
98
|
})), typeaheadComponent);
|
|
101
99
|
shouldFocusCursorInsideQuery = false;
|
|
102
100
|
return typeaheadComponent;
|
|
@@ -31,14 +31,12 @@ function createPlugin(_ref) {
|
|
|
31
31
|
popupMountRef = _ref.popupMountRef,
|
|
32
32
|
createAnalyticsEvent = _ref.createAnalyticsEvent,
|
|
33
33
|
typeAheadHandlers = _ref.typeAheadHandlers,
|
|
34
|
-
getIntl = _ref.getIntl
|
|
35
|
-
useBetterTypeaheadNavigation = _ref.useBetterTypeaheadNavigation;
|
|
34
|
+
getIntl = _ref.getIntl;
|
|
36
35
|
var intl = getIntl();
|
|
37
36
|
var _factoryDecorations = (0, _decorations.factoryDecorations)({
|
|
38
37
|
intl: intl,
|
|
39
38
|
popupMountRef: popupMountRef,
|
|
40
|
-
createAnalyticsEvent: createAnalyticsEvent
|
|
41
|
-
useBetterTypeaheadNavigation: useBetterTypeaheadNavigation
|
|
39
|
+
createAnalyticsEvent: createAnalyticsEvent
|
|
42
40
|
}),
|
|
43
41
|
createDecorations = _factoryDecorations.createDecorations,
|
|
44
42
|
removeDecorations = _factoryDecorations.removeDecorations;
|
|
@@ -76,8 +76,7 @@ var InputQuery = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
76
76
|
onQueryFocus = _ref.onQueryFocus,
|
|
77
77
|
onUndoRedo = _ref.onUndoRedo,
|
|
78
78
|
editorView = _ref.editorView,
|
|
79
|
-
items = _ref.items
|
|
80
|
-
useBetterTypeaheadNavigation = _ref.useBetterTypeaheadNavigation;
|
|
79
|
+
items = _ref.items;
|
|
81
80
|
var ref = (0, _react.useRef)(document.createElement('span'));
|
|
82
81
|
var inputRef = (0, _react.useRef)(null);
|
|
83
82
|
var _useState = (0, _react.useState)(null),
|
|
@@ -150,27 +149,6 @@ var InputQuery = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
150
149
|
// Some suggested the other workaround maybe listen on`keypress` instead of `keydown`
|
|
151
150
|
if (!event.isComposing && event.which !== 229 && event.keyCode !== 229) {
|
|
152
151
|
if (selectedIndex === -1) {
|
|
153
|
-
if (useBetterTypeaheadNavigation) {
|
|
154
|
-
/**
|
|
155
|
-
* TODO DTR-1401: (also see ED-17200) There are two options
|
|
156
|
-
* here, either
|
|
157
|
-
* - set the index directly to 1 in WrapperTypeAhead.tsx's
|
|
158
|
-
* `insertSelectedItem` at the cost of breaking some of the a11y
|
|
159
|
-
* focus changes,
|
|
160
|
-
* - or do this jank at the cost of some small analytics noise.
|
|
161
|
-
*
|
|
162
|
-
* The focus behaviour still needs cleanup
|
|
163
|
-
*/
|
|
164
|
-
selectPreviousItem();
|
|
165
|
-
}
|
|
166
|
-
selectNextItem();
|
|
167
|
-
}
|
|
168
|
-
onItemSelect(event.shiftKey ? _typeAhead.SelectItemMode.SHIFT_ENTER : _typeAhead.SelectItemMode.ENTER);
|
|
169
|
-
}
|
|
170
|
-
break;
|
|
171
|
-
case 'Tab':
|
|
172
|
-
if (selectedIndex === -1) {
|
|
173
|
-
if (useBetterTypeaheadNavigation) {
|
|
174
152
|
/**
|
|
175
153
|
* TODO DTR-1401: (also see ED-17200) There are two options
|
|
176
154
|
* here, either
|
|
@@ -179,33 +157,36 @@ var InputQuery = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
179
157
|
* focus changes,
|
|
180
158
|
* - or do this jank at the cost of some small analytics noise.
|
|
181
159
|
*
|
|
160
|
+
* The focus behaviour still needs cleanup
|
|
182
161
|
*/
|
|
183
162
|
selectPreviousItem();
|
|
163
|
+
selectNextItem();
|
|
184
164
|
}
|
|
165
|
+
onItemSelect(event.shiftKey ? _typeAhead.SelectItemMode.SHIFT_ENTER : _typeAhead.SelectItemMode.ENTER);
|
|
166
|
+
}
|
|
167
|
+
break;
|
|
168
|
+
case 'Tab':
|
|
169
|
+
if (selectedIndex === -1) {
|
|
170
|
+
/**
|
|
171
|
+
* TODO DTR-1401: (also see ED-17200) There are two options
|
|
172
|
+
* here, either
|
|
173
|
+
* - set the index directly to 1 in WrapperTypeAhead.tsx's
|
|
174
|
+
* `insertSelectedItem` at the cost of breaking some of the a11y
|
|
175
|
+
* focus changes,
|
|
176
|
+
* - or do this jank at the cost of some small analytics noise.
|
|
177
|
+
*
|
|
178
|
+
*/
|
|
179
|
+
selectPreviousItem();
|
|
185
180
|
selectNextItem();
|
|
186
181
|
}
|
|
187
182
|
// TODO DTR-1401: why is this calling select item when hitting tab? fix this in DTR-1401
|
|
188
183
|
onItemSelect(_typeAhead.SelectItemMode.TAB);
|
|
189
184
|
break;
|
|
190
185
|
case 'ArrowDown':
|
|
191
|
-
|
|
192
|
-
selectNextItem();
|
|
193
|
-
} else {
|
|
194
|
-
// TODO DTR-1401: why were we preventing selection?
|
|
195
|
-
if (selectedIndex === -1) {
|
|
196
|
-
selectNextItem();
|
|
197
|
-
}
|
|
198
|
-
}
|
|
186
|
+
selectNextItem();
|
|
199
187
|
break;
|
|
200
188
|
case 'ArrowUp':
|
|
201
|
-
|
|
202
|
-
selectPreviousItem();
|
|
203
|
-
} else {
|
|
204
|
-
// TODO DTR-1401: why were we preventing selection?
|
|
205
|
-
if (selectedIndex === -1) {
|
|
206
|
-
selectPreviousItem();
|
|
207
|
-
}
|
|
208
|
-
}
|
|
189
|
+
selectPreviousItem();
|
|
209
190
|
break;
|
|
210
191
|
}
|
|
211
192
|
var undoRedoType = isUndoRedoShortcut(event);
|
|
@@ -217,7 +198,7 @@ var InputQuery = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
217
198
|
event.preventDefault();
|
|
218
199
|
return false;
|
|
219
200
|
}
|
|
220
|
-
}, [
|
|
201
|
+
}, [onUndoRedo, onItemSelect, selectNextItem, selectPreviousItem, cancel, cleanedInputContent, editorView.state]);
|
|
221
202
|
var onClick = (0, _react.useCallback)(function (event) {
|
|
222
203
|
var _inputRef$current;
|
|
223
204
|
event.stopPropagation();
|
|
@@ -29,8 +29,7 @@ var WrapperTypeAhead = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
29
29
|
inputMethod = _ref.inputMethod,
|
|
30
30
|
getDecorationPosition = _ref.getDecorationPosition,
|
|
31
31
|
reopenQuery = _ref.reopenQuery,
|
|
32
|
-
onUndoRedo = _ref.onUndoRedo
|
|
33
|
-
useBetterTypeaheadNavigation = _ref.useBetterTypeaheadNavigation;
|
|
32
|
+
onUndoRedo = _ref.onUndoRedo;
|
|
34
33
|
var _useState = (0, _react.useState)(false),
|
|
35
34
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
36
35
|
closed = _useState2[0],
|
|
@@ -52,17 +51,15 @@ var WrapperTypeAhead = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
52
51
|
var selectNextItem = (0, _react.useMemo)(function () {
|
|
53
52
|
return (0, _utils.moveSelectedIndex)({
|
|
54
53
|
editorView: editorView,
|
|
55
|
-
direction: 'next'
|
|
56
|
-
useBetterTypeaheadNavigation: useBetterTypeaheadNavigation
|
|
54
|
+
direction: 'next'
|
|
57
55
|
});
|
|
58
|
-
}, [editorView
|
|
56
|
+
}, [editorView]);
|
|
59
57
|
var selectPreviousItem = (0, _react.useMemo)(function () {
|
|
60
58
|
return (0, _utils.moveSelectedIndex)({
|
|
61
59
|
editorView: editorView,
|
|
62
|
-
direction: 'previous'
|
|
63
|
-
useBetterTypeaheadNavigation: useBetterTypeaheadNavigation
|
|
60
|
+
direction: 'previous'
|
|
64
61
|
});
|
|
65
|
-
}, [editorView
|
|
62
|
+
}, [editorView]);
|
|
66
63
|
var cancel = (0, _react.useCallback)(function (_ref2) {
|
|
67
64
|
var setSelectionAt = _ref2.setSelectionAt,
|
|
68
65
|
addPrefixTrigger = _ref2.addPrefixTrigger,
|
|
@@ -113,7 +110,6 @@ var WrapperTypeAhead = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
113
110
|
return null;
|
|
114
111
|
}
|
|
115
112
|
return /*#__PURE__*/_react.default.createElement(_InputQuery.InputQuery, {
|
|
116
|
-
useBetterTypeaheadNavigation: useBetterTypeaheadNavigation,
|
|
117
113
|
triggerQueryPrefix: triggerHandler.trigger,
|
|
118
114
|
onQueryChange: setQuery,
|
|
119
115
|
onItemSelect: insertSelectedItem,
|
|
@@ -67,8 +67,7 @@ var findHandlerByTrigger = function findHandlerByTrigger(_ref) {
|
|
|
67
67
|
exports.findHandlerByTrigger = findHandlerByTrigger;
|
|
68
68
|
var moveSelectedIndex = function moveSelectedIndex(_ref2) {
|
|
69
69
|
var editorView = _ref2.editorView,
|
|
70
|
-
direction = _ref2.direction
|
|
71
|
-
useBetterTypeaheadNavigation = _ref2.useBetterTypeaheadNavigation;
|
|
70
|
+
direction = _ref2.direction;
|
|
72
71
|
return function () {
|
|
73
72
|
var typeAheadState = getPluginState(editorView.state);
|
|
74
73
|
if (!typeAheadState) {
|
|
@@ -80,23 +79,20 @@ var moveSelectedIndex = function moveSelectedIndex(_ref2) {
|
|
|
80
79
|
var nextIndex;
|
|
81
80
|
if (direction === 'next') {
|
|
82
81
|
stats.increaseArrowDown();
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
} else {
|
|
98
|
-
nextIndex = selectedIndex >= items.length - 1 ? 0 : selectedIndex + 1;
|
|
99
|
-
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* See: https://product-fabric.atlassian.net/browse/ED-17200
|
|
85
|
+
* `selectedIndex` is forced to -1 now to not immediately focus the typeahead
|
|
86
|
+
* and only do so when there is explicit logic to focus into the typeahead
|
|
87
|
+
* options.
|
|
88
|
+
*
|
|
89
|
+
* This check for "set index to 1 when -1"
|
|
90
|
+
* - is a temporary workaround to get back the previous behaviour without
|
|
91
|
+
* entirely reverting the a11y improvements
|
|
92
|
+
*
|
|
93
|
+
*/
|
|
94
|
+
if (selectedIndex === -1 && items.length > 1) {
|
|
95
|
+
nextIndex = 1;
|
|
100
96
|
} else {
|
|
101
97
|
nextIndex = selectedIndex >= items.length - 1 ? 0 : selectedIndex + 1;
|
|
102
98
|
}
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.version = exports.nextMajorVersion = exports.name = void 0;
|
|
7
7
|
var name = "@atlaskit/editor-core";
|
|
8
8
|
exports.name = name;
|
|
9
|
-
var version = "187.15.
|
|
9
|
+
var version = "187.15.1";
|
|
10
10
|
exports.version = version;
|
|
11
11
|
var nextMajorVersion = function nextMajorVersion() {
|
|
12
12
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
package/dist/cjs/version.json
CHANGED
|
@@ -29,22 +29,17 @@ export function getScrollGutterOptions(props) {
|
|
|
29
29
|
return undefined;
|
|
30
30
|
}
|
|
31
31
|
export function getDefaultPresetOptionsFromEditorProps(props, createAnalyticsEvent) {
|
|
32
|
-
var _props$performanceTra, _props$linking,
|
|
32
|
+
var _props$performanceTra, _props$linking, _props$performanceTra2, _props$textFormatting, _props$linking2;
|
|
33
33
|
const appearance = props.appearance;
|
|
34
34
|
const isMobile = appearance === 'mobile';
|
|
35
35
|
const inputTracking = (_props$performanceTra = props.performanceTracking) === null || _props$performanceTra === void 0 ? void 0 : _props$performanceTra.inputTracking;
|
|
36
36
|
const cardOptions = ((_props$linking = props.linking) === null || _props$linking === void 0 ? void 0 : _props$linking.smartLinks) || props.smartLinks || props.UNSAFE_cards;
|
|
37
|
-
|
|
38
|
-
// duplicated logic from `feature-flags-from-props.ts` due to presets not being finalised
|
|
39
|
-
const pseudoNormalisedUseBetterTypeaheadNavigation = (_ref = (_props$featureFlags$u = (_props$featureFlags = props.featureFlags) === null || _props$featureFlags === void 0 ? void 0 : _props$featureFlags['use-better-typeahead-navigation']) !== null && _props$featureFlags$u !== void 0 ? _props$featureFlags$u : (_props$featureFlags2 = props.featureFlags) === null || _props$featureFlags2 === void 0 ? void 0 : _props$featureFlags2.useBetterTypeaheadNavigation) !== null && _ref !== void 0 ? _ref : null;
|
|
40
|
-
const useBetterTypeaheadNavigation = Boolean(typeof pseudoNormalisedUseBetterTypeaheadNavigation === 'boolean' ? !!pseudoNormalisedUseBetterTypeaheadNavigation : true);
|
|
41
37
|
return {
|
|
42
38
|
...props,
|
|
43
39
|
createAnalyticsEvent,
|
|
44
40
|
typeAhead: {
|
|
45
41
|
createAnalyticsEvent,
|
|
46
|
-
isMobile
|
|
47
|
-
useBetterTypeaheadNavigation: useBetterTypeaheadNavigation
|
|
42
|
+
isMobile
|
|
48
43
|
},
|
|
49
44
|
featureFlags: createFeatureFlagsFromProps(props),
|
|
50
45
|
paste: {
|
|
@@ -21,12 +21,9 @@ function getSpellCheck(featureFlags) {
|
|
|
21
21
|
* which is used by both current and archv3 editors.
|
|
22
22
|
*/
|
|
23
23
|
export function createFeatureFlagsFromProps(props) {
|
|
24
|
-
var _props$featureFlags,
|
|
24
|
+
var _props$featureFlags, _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$featureFlags2, _props$featureFlags3, _props$allowTables, _props$featureFlags4, _props$featureFlags5, _props$allowTables2, _props$featureFlags6, _props$featureFlags7, _props$allowTables3, _props$featureFlags8, _props$featureFlags9, _props$allowTables4, _props$allowTables5, _props$featureFlags10, _props$featureFlags11, _props$allowTables6, _props$allowExtension, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$featureFlags28, _props$featureFlags29, _props$collabEdit, _props$collabEdit2, _props$featureFlags30, _props$featureFlags31, _props$featureFlags32, _props$featureFlags33, _props$featureFlags34, _props$featureFlags35, _props$featureFlags36, _props$featureFlags37, _props$featureFlags38, _props$featureFlags39, _props$featureFlags40, _props$featureFlags41, _props$featureFlags42;
|
|
25
25
|
const normalizedFeatureFlags = normalizeFeatureFlags(props.featureFlags);
|
|
26
26
|
const tableCellOptionsInFloatingToolbar = normalizedFeatureFlags.tableCellOptionsInFloatingToolbar || ((_props$featureFlags = props.featureFlags) === null || _props$featureFlags === void 0 ? void 0 : _props$featureFlags.tableCellOptionsInFloatingToolbar) || undefined;
|
|
27
|
-
|
|
28
|
-
// duplicated logic from `feature-flags-from-props.ts` due to presets not being finalised
|
|
29
|
-
const pseudoNormalisedUseBetterTypeaheadNavigation = (_ref = (_props$featureFlags$u = (_props$featureFlags2 = props.featureFlags) === null || _props$featureFlags2 === void 0 ? void 0 : _props$featureFlags2['use-better-typeahead-navigation']) !== null && _props$featureFlags$u !== void 0 ? _props$featureFlags$u : (_props$featureFlags3 = props.featureFlags) === null || _props$featureFlags3 === void 0 ? void 0 : _props$featureFlags3.useBetterTypeaheadNavigation) !== null && _ref !== void 0 ? _ref : null;
|
|
30
27
|
return {
|
|
31
28
|
...normalizedFeatureFlags,
|
|
32
29
|
newInsertionBehaviour: props.allowNewInsertionBehaviour,
|
|
@@ -38,36 +35,34 @@ export function createFeatureFlagsFromProps(props) {
|
|
|
38
35
|
singleLayout: typeof props.allowLayouts === 'object' && !!((_props$allowLayouts = props.allowLayouts) !== null && _props$allowLayouts !== void 0 && _props$allowLayouts.UNSAFE_allowSingleColumnLayout),
|
|
39
36
|
undoRedoButtons: props.allowUndoRedoButtons,
|
|
40
37
|
catchAllTracking: (_props$performanceTra = props.performanceTracking) === null || _props$performanceTra === void 0 ? void 0 : (_props$performanceTra2 = _props$performanceTra.catchAllTracking) === null || _props$performanceTra2 === void 0 ? void 0 : _props$performanceTra2.enabled,
|
|
41
|
-
stickyHeadersOptimization: typeof ((_props$
|
|
42
|
-
initialRenderOptimization: typeof ((_props$
|
|
43
|
-
mouseMoveOptimization: typeof ((_props$
|
|
44
|
-
tableRenderOptimization: typeof ((_props$
|
|
45
|
-
tableOverflowShadowsOptimization: typeof ((_props$
|
|
38
|
+
stickyHeadersOptimization: typeof ((_props$featureFlags2 = props.featureFlags) === null || _props$featureFlags2 === void 0 ? void 0 : _props$featureFlags2.stickyHeadersOptimization) === 'boolean' ? !!((_props$featureFlags3 = props.featureFlags) !== null && _props$featureFlags3 !== void 0 && _props$featureFlags3.stickyHeadersOptimization) : typeof props.allowTables === 'object' && !!((_props$allowTables = props.allowTables) !== null && _props$allowTables !== void 0 && _props$allowTables.stickyHeadersOptimization),
|
|
39
|
+
initialRenderOptimization: typeof ((_props$featureFlags4 = props.featureFlags) === null || _props$featureFlags4 === void 0 ? void 0 : _props$featureFlags4.initialRenderOptimization) === 'boolean' ? !!((_props$featureFlags5 = props.featureFlags) !== null && _props$featureFlags5 !== void 0 && _props$featureFlags5.initialRenderOptimization) : typeof props.allowTables === 'object' && !!((_props$allowTables2 = props.allowTables) !== null && _props$allowTables2 !== void 0 && _props$allowTables2.initialRenderOptimization),
|
|
40
|
+
mouseMoveOptimization: typeof ((_props$featureFlags6 = props.featureFlags) === null || _props$featureFlags6 === void 0 ? void 0 : _props$featureFlags6.mouseMoveOptimization) === 'boolean' ? !!((_props$featureFlags7 = props.featureFlags) !== null && _props$featureFlags7 !== void 0 && _props$featureFlags7.mouseMoveOptimization) : typeof props.allowTables === 'object' && !!((_props$allowTables3 = props.allowTables) !== null && _props$allowTables3 !== void 0 && _props$allowTables3.mouseMoveOptimization),
|
|
41
|
+
tableRenderOptimization: typeof ((_props$featureFlags8 = props.featureFlags) === null || _props$featureFlags8 === void 0 ? void 0 : _props$featureFlags8.tableRenderOptimization) === 'boolean' ? !!((_props$featureFlags9 = props.featureFlags) !== null && _props$featureFlags9 !== void 0 && _props$featureFlags9.tableRenderOptimization) : typeof props.allowTables === 'object' && typeof ((_props$allowTables4 = props.allowTables) === null || _props$allowTables4 === void 0 ? void 0 : _props$allowTables4.tableRenderOptimization) === 'boolean' ? (_props$allowTables5 = props.allowTables) === null || _props$allowTables5 === void 0 ? void 0 : _props$allowTables5.tableRenderOptimization : true,
|
|
42
|
+
tableOverflowShadowsOptimization: typeof ((_props$featureFlags10 = props.featureFlags) === null || _props$featureFlags10 === void 0 ? void 0 : _props$featureFlags10.tableOverflowShadowsOptimization) === 'boolean' ? !!((_props$featureFlags11 = props.featureFlags) !== null && _props$featureFlags11 !== void 0 && _props$featureFlags11.tableOverflowShadowsOptimization) : typeof props.allowTables === 'object' && !!((_props$allowTables6 = props.allowTables) !== null && _props$allowTables6 !== void 0 && _props$allowTables6.tableOverflowShadowsOptimization),
|
|
46
43
|
extendFloatingToolbar: Boolean(typeof props.allowExtension === 'object' && ((_props$allowExtension = props.allowExtension) === null || _props$allowExtension === void 0 ? void 0 : _props$allowExtension.allowExtendFloatingToolbars)),
|
|
47
|
-
showAvatarGroupAsPlugin: Boolean(typeof ((_props$
|
|
48
|
-
errorBoundaryDocStructure: Boolean(typeof ((_props$
|
|
49
|
-
synchronyErrorDocStructure: Boolean(typeof ((_props$
|
|
50
|
-
enableViewUpdateSubscription: Boolean(typeof ((_props$
|
|
51
|
-
collabAvatarScroll: Boolean(typeof ((_props$
|
|
52
|
-
ufo: Boolean(typeof ((_props$
|
|
53
|
-
twoLineEditorToolbar: Boolean(typeof ((_props$
|
|
54
|
-
saferDispatchedTransactions: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactions === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactions || (typeof ((_props$
|
|
55
|
-
saferDispatchedTransactionsAnalyticsOnly: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactionsAnalyticsOnly === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactionsAnalyticsOnly || (typeof ((_props$
|
|
44
|
+
showAvatarGroupAsPlugin: Boolean(typeof ((_props$featureFlags12 = props.featureFlags) === null || _props$featureFlags12 === void 0 ? void 0 : _props$featureFlags12.showAvatarGroupAsPlugin) === 'boolean' ? !!((_props$featureFlags13 = props.featureFlags) !== null && _props$featureFlags13 !== void 0 && _props$featureFlags13.showAvatarGroupAsPlugin) : false),
|
|
45
|
+
errorBoundaryDocStructure: Boolean(typeof ((_props$featureFlags14 = props.featureFlags) === null || _props$featureFlags14 === void 0 ? void 0 : _props$featureFlags14.useErrorBoundaryDocStructure) === 'boolean' ? !!((_props$featureFlags15 = props.featureFlags) !== null && _props$featureFlags15 !== void 0 && _props$featureFlags15.useErrorBoundaryDocStructure) : false),
|
|
46
|
+
synchronyErrorDocStructure: Boolean(typeof ((_props$featureFlags16 = props.featureFlags) === null || _props$featureFlags16 === void 0 ? void 0 : _props$featureFlags16.synchronyErrorDocStructure) === 'boolean' ? !!((_props$featureFlags17 = props.featureFlags) !== null && _props$featureFlags17 !== void 0 && _props$featureFlags17.synchronyErrorDocStructure) : false),
|
|
47
|
+
enableViewUpdateSubscription: Boolean(typeof ((_props$featureFlags18 = props.featureFlags) === null || _props$featureFlags18 === void 0 ? void 0 : _props$featureFlags18.enableViewUpdateSubscription) === 'boolean' ? !!((_props$featureFlags19 = props.featureFlags) !== null && _props$featureFlags19 !== void 0 && _props$featureFlags19.enableViewUpdateSubscription) : false),
|
|
48
|
+
collabAvatarScroll: Boolean(typeof ((_props$featureFlags20 = props.featureFlags) === null || _props$featureFlags20 === void 0 ? void 0 : _props$featureFlags20.collabAvatarScroll) === 'boolean' ? !!((_props$featureFlags21 = props.featureFlags) !== null && _props$featureFlags21 !== void 0 && _props$featureFlags21.collabAvatarScroll) : false),
|
|
49
|
+
ufo: Boolean(typeof ((_props$featureFlags22 = props.featureFlags) === null || _props$featureFlags22 === void 0 ? void 0 : _props$featureFlags22.ufo) === 'boolean' ? !!((_props$featureFlags23 = props.featureFlags) !== null && _props$featureFlags23 !== void 0 && _props$featureFlags23.ufo) : false),
|
|
50
|
+
twoLineEditorToolbar: Boolean(typeof ((_props$featureFlags24 = props.featureFlags) === null || _props$featureFlags24 === void 0 ? void 0 : _props$featureFlags24.twoLineEditorToolbar) === 'boolean' ? !!((_props$featureFlags25 = props.featureFlags) !== null && _props$featureFlags25 !== void 0 && _props$featureFlags25.twoLineEditorToolbar) : false),
|
|
51
|
+
saferDispatchedTransactions: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactions === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactions || (typeof ((_props$featureFlags26 = props.featureFlags) === null || _props$featureFlags26 === void 0 ? void 0 : _props$featureFlags26.saferDispatchedTransactions) === 'boolean' ? !!((_props$featureFlags27 = props.featureFlags) !== null && _props$featureFlags27 !== void 0 && _props$featureFlags27.saferDispatchedTransactions) : false)),
|
|
52
|
+
saferDispatchedTransactionsAnalyticsOnly: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactionsAnalyticsOnly === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactionsAnalyticsOnly || (typeof ((_props$featureFlags28 = props.featureFlags) === null || _props$featureFlags28 === void 0 ? void 0 : _props$featureFlags28.saferDispatchedTransactionsAnalyticsOnly) === 'boolean' ? !!((_props$featureFlags29 = props.featureFlags) !== null && _props$featureFlags29 !== void 0 && _props$featureFlags29.saferDispatchedTransactionsAnalyticsOnly) : false)),
|
|
56
53
|
useNativeCollabPlugin: Boolean(typeof ((_props$collabEdit = props.collabEdit) === null || _props$collabEdit === void 0 ? void 0 : _props$collabEdit.useNativePlugin) === 'boolean' ? !!((_props$collabEdit2 = props.collabEdit) !== null && _props$collabEdit2 !== void 0 && _props$collabEdit2.useNativePlugin) : false),
|
|
57
|
-
chromeCursorHandlerFixedVersion: typeof ((_props$
|
|
54
|
+
chromeCursorHandlerFixedVersion: typeof ((_props$featureFlags30 = props.featureFlags) === null || _props$featureFlags30 === void 0 ? void 0 : _props$featureFlags30.chromeCursorHandlerFixedVersion) === 'string' ? Number(props.featureFlags.chromeCursorHandlerFixedVersion) || undefined : undefined,
|
|
58
55
|
tableCellOptionsInFloatingToolbar: typeof tableCellOptionsInFloatingToolbar === 'boolean' ? tableCellOptionsInFloatingToolbar : false,
|
|
59
|
-
showHoverPreview: Boolean(typeof ((_props$
|
|
60
|
-
indentationButtonsInTheToolbar: Boolean(typeof normalizedFeatureFlags.indentationButtonsInTheToolbar === 'boolean' && !!normalizedFeatureFlags.indentationButtonsInTheToolbar || (typeof ((_props$
|
|
61
|
-
floatingToolbarCopyButton: Boolean(typeof normalizedFeatureFlags.floatingToolbarCopyButton === 'boolean' && !!normalizedFeatureFlags.floatingToolbarCopyButton || (typeof ((_props$
|
|
62
|
-
floatingToolbarLinkSettingsButton: typeof ((_props$
|
|
56
|
+
showHoverPreview: Boolean(typeof ((_props$featureFlags31 = props.featureFlags) === null || _props$featureFlags31 === void 0 ? void 0 : _props$featureFlags31.showHoverPreview) === 'boolean' ? !!((_props$featureFlags32 = props.featureFlags) !== null && _props$featureFlags32 !== void 0 && _props$featureFlags32.showHoverPreview) : false),
|
|
57
|
+
indentationButtonsInTheToolbar: Boolean(typeof normalizedFeatureFlags.indentationButtonsInTheToolbar === 'boolean' && !!normalizedFeatureFlags.indentationButtonsInTheToolbar || (typeof ((_props$featureFlags33 = props.featureFlags) === null || _props$featureFlags33 === void 0 ? void 0 : _props$featureFlags33.indentationButtonsInTheToolbar) === 'boolean' ? !!((_props$featureFlags34 = props.featureFlags) !== null && _props$featureFlags34 !== void 0 && _props$featureFlags34.indentationButtonsInTheToolbar) : false)),
|
|
58
|
+
floatingToolbarCopyButton: Boolean(typeof normalizedFeatureFlags.floatingToolbarCopyButton === 'boolean' && !!normalizedFeatureFlags.floatingToolbarCopyButton || (typeof ((_props$featureFlags35 = props.featureFlags) === null || _props$featureFlags35 === void 0 ? void 0 : _props$featureFlags35.floatingToolbarCopyButton) === 'boolean' ? !!((_props$featureFlags36 = props.featureFlags) !== null && _props$featureFlags36 !== void 0 && _props$featureFlags36.floatingToolbarCopyButton) : false)),
|
|
59
|
+
floatingToolbarLinkSettingsButton: typeof ((_props$featureFlags37 = props.featureFlags) === null || _props$featureFlags37 === void 0 ? void 0 : _props$featureFlags37['floating-toolbar-link-settings-button']) === 'string' ? props.featureFlags['floating-toolbar-link-settings-button'] || undefined : undefined,
|
|
63
60
|
disableSpellcheckByBrowser: getSpellCheck(props.featureFlags),
|
|
64
61
|
// Including fallback to props.featureFlags so that mobile feature flags
|
|
65
62
|
// are included (they are not kebab cased)
|
|
66
|
-
restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$
|
|
67
|
-
useSomewhatSemanticTextColorNames: Boolean(typeof normalizedFeatureFlags.useSomewhatSemanticTextColorNames === 'boolean' && !!normalizedFeatureFlags.useSomewhatSemanticTextColorNames || (typeof ((_props$
|
|
63
|
+
restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags38 = props.featureFlags) === null || _props$featureFlags38 === void 0 ? void 0 : _props$featureFlags38.restartNumberedLists) === true,
|
|
64
|
+
useSomewhatSemanticTextColorNames: Boolean(typeof normalizedFeatureFlags.useSomewhatSemanticTextColorNames === 'boolean' && !!normalizedFeatureFlags.useSomewhatSemanticTextColorNames || (typeof ((_props$featureFlags39 = props.featureFlags) === null || _props$featureFlags39 === void 0 ? void 0 : _props$featureFlags39.useSomewhatSemanticTextColorNames) === 'boolean' ? !!((_props$featureFlags40 = props.featureFlags) !== null && _props$featureFlags40 !== void 0 && _props$featureFlags40.useSomewhatSemanticTextColorNames) : false)),
|
|
68
65
|
lpLinkPickerFocusTrap: Boolean(normalizedFeatureFlags.lpLinkPickerFocusTrap),
|
|
69
|
-
preventPopupOverflow: Boolean(typeof ((_props$
|
|
70
|
-
// duplicated logic from `create-plugins-list.ts` due to presets not being finalised
|
|
71
|
-
useBetterTypeaheadNavigation: Boolean(typeof pseudoNormalisedUseBetterTypeaheadNavigation === 'boolean' ? !!pseudoNormalisedUseBetterTypeaheadNavigation : true)
|
|
66
|
+
preventPopupOverflow: Boolean(typeof ((_props$featureFlags41 = props.featureFlags) === null || _props$featureFlags41 === void 0 ? void 0 : _props$featureFlags41['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags42 = props.featureFlags) !== null && _props$featureFlags42 !== void 0 && _props$featureFlags42['prevent-popup-overflow']) : false)
|
|
72
67
|
};
|
|
73
68
|
}
|
|
@@ -111,8 +111,6 @@ const TypeAheadMenu = /*#__PURE__*/React.memo(({
|
|
|
111
111
|
*
|
|
112
112
|
*/
|
|
113
113
|
const typeAheadPlugin = options => {
|
|
114
|
-
var _options$useBetterTyp;
|
|
115
|
-
const useBetterTypeaheadNavigation = (_options$useBetterTyp = options === null || options === void 0 ? void 0 : options.useBetterTypeaheadNavigation) !== null && _options$useBetterTyp !== void 0 ? _options$useBetterTyp : true;
|
|
116
114
|
const fireAnalyticsCallback = fireAnalyticsEvent(options === null || options === void 0 ? void 0 : options.createAnalyticsEvent);
|
|
117
115
|
const popupMountRef = {
|
|
118
116
|
current: null
|
|
@@ -138,8 +136,7 @@ const typeAheadPlugin = options => {
|
|
|
138
136
|
popupMountRef,
|
|
139
137
|
reactDispatch: dispatch,
|
|
140
138
|
typeAheadHandlers: typeAhead,
|
|
141
|
-
createAnalyticsEvent: options === null || options === void 0 ? void 0 : options.createAnalyticsEvent
|
|
142
|
-
useBetterTypeaheadNavigation
|
|
139
|
+
createAnalyticsEvent: options === null || options === void 0 ? void 0 : options.createAnalyticsEvent
|
|
143
140
|
})
|
|
144
141
|
}, {
|
|
145
142
|
name: 'typeAheadInsertItem',
|
|
@@ -15,8 +15,7 @@ import { closeTypeAhead } from '../transforms/close-type-ahead';
|
|
|
15
15
|
export const factoryDecorations = ({
|
|
16
16
|
intl,
|
|
17
17
|
popupMountRef,
|
|
18
|
-
createAnalyticsEvent
|
|
19
|
-
useBetterTypeaheadNavigation
|
|
18
|
+
createAnalyticsEvent
|
|
20
19
|
}) => {
|
|
21
20
|
const createDecorations = (tr, {
|
|
22
21
|
triggerHandler,
|
|
@@ -94,8 +93,7 @@ export const factoryDecorations = ({
|
|
|
94
93
|
popupsBoundariesElement: (_popupMountRef$curren2 = popupMountRef.current) === null || _popupMountRef$curren2 === void 0 ? void 0 : _popupMountRef$curren2.popupsBoundariesElement,
|
|
95
94
|
popupsScrollableElement: (_popupMountRef$curren3 = popupMountRef.current) === null || _popupMountRef$curren3 === void 0 ? void 0 : _popupMountRef$curren3.popupsScrollableElement,
|
|
96
95
|
onUndoRedo: onUndoRedo,
|
|
97
|
-
reopenQuery: reopenQuery
|
|
98
|
-
useBetterTypeaheadNavigation: useBetterTypeaheadNavigation
|
|
96
|
+
reopenQuery: reopenQuery
|
|
99
97
|
})), typeaheadComponent);
|
|
100
98
|
shouldFocusCursorInsideQuery = false;
|
|
101
99
|
return typeaheadComponent;
|