@atlaskit/editor-common 107.0.1 → 107.0.3
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/extensibility/ExtensionNodeWrapper.js +8 -17
- package/dist/cjs/extensibility/extensionNodeView.js +3 -4
- package/dist/cjs/link/ConfigureLinkOverlay/Dropdown.js +1 -3
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/TableSelector/index.js +2 -3
- package/dist/cjs/ui/TableSelector/table-selector.js +1 -2
- package/dist/cjs/utils/calculate-toolbar-position.js +1 -2
- package/dist/es2019/extensibility/ExtensionNodeWrapper.js +8 -17
- package/dist/es2019/extensibility/extensionNodeView.js +3 -4
- package/dist/es2019/link/ConfigureLinkOverlay/Dropdown.js +1 -3
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/TableSelector/index.js +2 -3
- package/dist/es2019/ui/TableSelector/table-selector.js +1 -2
- package/dist/es2019/utils/calculate-toolbar-position.js +1 -2
- package/dist/esm/extensibility/ExtensionNodeWrapper.js +8 -17
- package/dist/esm/extensibility/extensionNodeView.js +3 -4
- package/dist/esm/link/ConfigureLinkOverlay/Dropdown.js +1 -3
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/TableSelector/index.js +2 -3
- package/dist/esm/ui/TableSelector/table-selector.js +1 -2
- package/dist/esm/utils/calculate-toolbar-position.js +1 -2
- package/dist/types/extensibility/ExtensionNodeWrapper.d.ts +1 -2
- package/dist/types/utils/breakout.d.ts +1 -1
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types-ts4.5/extensibility/ExtensionNodeWrapper.d.ts +1 -2
- package/dist/types-ts4.5/utils/breakout.d.ts +1 -1
- package/dist/types-ts4.5/utils/index.d.ts +1 -0
- package/package.json +2 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 107.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#173656](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/173656)
|
|
8
|
+
[`006a6e5d1bb9d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/006a6e5d1bb9d) -
|
|
9
|
+
remove node wrapper extension height reservation
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 107.0.2
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#172640](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/172640)
|
|
17
|
+
[`903534ec3c2df`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/903534ec3c2df) -
|
|
18
|
+
Clean up platform_editor_controls_table_picker
|
|
19
|
+
- [#172583](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/172583)
|
|
20
|
+
[`40f387a0c0962`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/40f387a0c0962) -
|
|
21
|
+
Clean up platform_editor_controls_patch_2
|
|
22
|
+
|
|
3
23
|
## 107.0.1
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -38,27 +38,18 @@ var styles = (0, _react2.css)({
|
|
|
38
38
|
var ExtensionNodeWrapper = exports.ExtensionNodeWrapper = function ExtensionNodeWrapper(_ref) {
|
|
39
39
|
var children = _ref.children,
|
|
40
40
|
nodeType = _ref.nodeType,
|
|
41
|
-
macroInteractionDesignFeatureFlags = _ref.macroInteractionDesignFeatureFlags
|
|
42
|
-
nodeHeight = _ref.nodeHeight;
|
|
41
|
+
macroInteractionDesignFeatureFlags = _ref.macroInteractionDesignFeatureFlags;
|
|
43
42
|
var _ref2 = macroInteractionDesignFeatureFlags || {},
|
|
44
43
|
showMacroInteractionDesignUpdates = _ref2.showMacroInteractionDesignUpdates;
|
|
45
44
|
var wrapperClassNames = (0, _classnames.default)({
|
|
46
45
|
'inline-extension': nodeType === 'inlineExtension' && showMacroInteractionDesignUpdates,
|
|
47
46
|
relative: showMacroInteractionDesignUpdates
|
|
48
47
|
});
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
var extensionStyles = {
|
|
57
|
-
minHeight: "".concat(nodeHeight, "px")
|
|
58
|
-
};
|
|
59
|
-
return (0, _react2.jsx)("div", {
|
|
60
|
-
style: extensionStyles
|
|
61
|
-
}, content);
|
|
62
|
-
}
|
|
63
|
-
return content;
|
|
48
|
+
return (
|
|
49
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
50
|
+
(0, _react2.jsx)("span", {
|
|
51
|
+
className: wrapperClassNames,
|
|
52
|
+
css: styles
|
|
53
|
+
}, children, nodeType === 'inlineExtension' && _whitespace.ZERO_WIDTH_SPACE)
|
|
54
|
+
);
|
|
64
55
|
};
|
|
@@ -91,11 +91,10 @@ var ExtensionNode = exports.ExtensionNode = /*#__PURE__*/function (_ReactNodeVie
|
|
|
91
91
|
}, {
|
|
92
92
|
key: "render",
|
|
93
93
|
value: function render(props, forwardRef) {
|
|
94
|
-
var _props$extensionNodeV
|
|
94
|
+
var _props$extensionNodeV;
|
|
95
95
|
return /*#__PURE__*/_react.default.createElement(_ExtensionNodeWrapper.ExtensionNodeWrapper, {
|
|
96
96
|
nodeType: this.node.type.name,
|
|
97
|
-
macroInteractionDesignFeatureFlags: props.macroInteractionDesignFeatureFlags
|
|
98
|
-
nodeHeight: (_props$extensionNodeV = props.extensionNodeViewOptions) === null || _props$extensionNodeV === void 0 || (_props$extensionNodeV2 = _props$extensionNodeV.getExtensionHeight) === null || _props$extensionNodeV2 === void 0 ? void 0 : _props$extensionNodeV2.call(_props$extensionNodeV, this.node)
|
|
97
|
+
macroInteractionDesignFeatureFlags: props.macroInteractionDesignFeatureFlags
|
|
99
98
|
}, /*#__PURE__*/_react.default.createElement(_Extension.Extension, {
|
|
100
99
|
editorView: this.view,
|
|
101
100
|
node: this.node,
|
|
@@ -111,7 +110,7 @@ var ExtensionNode = exports.ExtensionNode = /*#__PURE__*/function (_ReactNodeVie
|
|
|
111
110
|
providerFactory: props.providerFactory,
|
|
112
111
|
handleContentDOMRef: forwardRef,
|
|
113
112
|
extensionHandlers: props.extensionHandlers,
|
|
114
|
-
editorAppearance: (_props$
|
|
113
|
+
editorAppearance: (_props$extensionNodeV = props.extensionNodeViewOptions) === null || _props$extensionNodeV === void 0 ? void 0 : _props$extensionNodeV.appearance,
|
|
115
114
|
pluginInjectionApi: props.pluginInjectionApi,
|
|
116
115
|
macroInteractionDesignFeatureFlags: props.macroInteractionDesignFeatureFlags,
|
|
117
116
|
showLivePagesBodiedMacrosRendererView: props.showLivePagesBodiedMacrosRendererView,
|
|
@@ -16,7 +16,6 @@ var _dropdownMenu = _interopRequireWildcard(require("@atlaskit/dropdown-menu"));
|
|
|
16
16
|
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/core/migration/chevron-down"));
|
|
17
17
|
var _customizePreferences = _interopRequireDefault(require("@atlaskit/icon/core/migration/customize--preferences"));
|
|
18
18
|
var _linkExternalShortcut = _interopRequireDefault(require("@atlaskit/icon/core/migration/link-external--shortcut"));
|
|
19
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
19
|
var _messages = require("../../messages");
|
|
21
20
|
var _StyledButton = require("./StyledButton");
|
|
22
21
|
var _useLinkOverlayAnalyticsEvents = require("./useLinkOverlayAnalyticsEvents");
|
|
@@ -93,8 +92,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
93
92
|
}));
|
|
94
93
|
},
|
|
95
94
|
testId: "".concat(testId, "-dropdown"),
|
|
96
|
-
onOpenChange: onOpenChange
|
|
97
|
-
shouldRenderToParent: (0, _platformFeatureFlags.fg)('should-render-to-parent-should-be-true-editor')
|
|
95
|
+
onOpenChange: onOpenChange
|
|
98
96
|
}, (0, _react2.jsx)(_dropdownMenu.DropdownItemGroup, null, (0, _react2.jsx)(_dropdownMenu.DropdownItem, {
|
|
99
97
|
elemBefore: (0, _react2.jsx)(_linkExternalShortcut.default, {
|
|
100
98
|
label: goToLinkLabel,
|
|
@@ -16,7 +16,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
16
16
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
17
17
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
18
18
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
19
|
-
var packageVersion = "107.0.
|
|
19
|
+
var packageVersion = "107.0.2";
|
|
20
20
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
21
21
|
// Remove URL as it has UGC
|
|
22
22
|
// Ignored via go/ees007
|
|
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
23
23
|
* @jsx jsx
|
|
24
24
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
25
25
|
var packageName = "@atlaskit/editor-common";
|
|
26
|
-
var packageVersion = "107.0.
|
|
26
|
+
var packageVersion = "107.0.2";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = '0, 8';
|
|
29
29
|
// Ignored via go/ees005
|
|
@@ -12,7 +12,6 @@ var _react = require("react");
|
|
|
12
12
|
var _react2 = require("@emotion/react");
|
|
13
13
|
var _bindEventListener = require("bind-event-listener");
|
|
14
14
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
15
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
15
|
var _colors = require("@atlaskit/theme/colors");
|
|
17
16
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
18
17
|
var _uiReact = require("../../ui-react");
|
|
@@ -180,7 +179,7 @@ var TableSelectorPopup = exports.TableSelectorPopup = function TableSelectorPopu
|
|
|
180
179
|
maxRow: getMaxRow(prevSize, event.key)
|
|
181
180
|
});
|
|
182
181
|
});
|
|
183
|
-
if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')
|
|
182
|
+
if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')) {
|
|
184
183
|
event.preventDefault();
|
|
185
184
|
}
|
|
186
185
|
}
|
|
@@ -225,7 +224,7 @@ var TableSelectorPopup = exports.TableSelectorPopup = function TableSelectorPopu
|
|
|
225
224
|
maxRow: getMaxRow(prevSize, event.key)
|
|
226
225
|
});
|
|
227
226
|
});
|
|
228
|
-
if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')
|
|
227
|
+
if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')) {
|
|
229
228
|
event.preventDefault();
|
|
230
229
|
}
|
|
231
230
|
}
|
|
@@ -7,7 +7,6 @@ exports.default = exports.TABLE_SELECTOR_BUTTON_SIZE = exports.TABLE_SELECTOR_BU
|
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _react2 = require("@emotion/react");
|
|
9
9
|
var _reactIntlNext = require("react-intl-next");
|
|
10
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
10
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
12
11
|
var _colors = require("@atlaskit/theme/colors");
|
|
13
12
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
@@ -62,7 +61,7 @@ var TableSelectorButton = function TableSelectorButton(_ref) {
|
|
|
62
61
|
if (btnRef.current) {
|
|
63
62
|
if (isFocused) {
|
|
64
63
|
btnRef.current.focus({
|
|
65
|
-
preventScroll: (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')
|
|
64
|
+
preventScroll: (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? true : undefined
|
|
66
65
|
});
|
|
67
66
|
} else {
|
|
68
67
|
btnRef.current.blur();
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.calculateToolbarPositionTrackHead = exports.calculateToolbarPositionOnCellSelection = exports.calculateToolbarPositionAboveSelection = void 0;
|
|
7
7
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
8
8
|
var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
9
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
9
|
var MAXIMUM_BROWSER_SCROLLBAR_WIDTH = 20;
|
|
11
10
|
|
|
12
11
|
/*
|
|
@@ -239,7 +238,7 @@ var calculateToolbarPositionOnCellSelection = exports.calculateToolbarPositionOn
|
|
|
239
238
|
// If the toolbar is to be placed at the bottom of the selection (it happens when
|
|
240
239
|
// there is no sufficient space above) and the bottom of the selection is not in the view,
|
|
241
240
|
// place the toolbar at the bottom of the visible part of selection
|
|
242
|
-
if (selection.isColSelection() && top + toolbarRect.height > wrapperBounds.bottom
|
|
241
|
+
if (selection.isColSelection() && top + toolbarRect.height > wrapperBounds.bottom) {
|
|
243
242
|
top = top - (top - wrapperBounds.bottom) - (toolbarRect.height + 2 * cellSelectionToolbarOffsetTop);
|
|
244
243
|
}
|
|
245
244
|
return {
|
|
@@ -30,8 +30,7 @@ const styles = css({
|
|
|
30
30
|
export const ExtensionNodeWrapper = ({
|
|
31
31
|
children,
|
|
32
32
|
nodeType,
|
|
33
|
-
macroInteractionDesignFeatureFlags
|
|
34
|
-
nodeHeight
|
|
33
|
+
macroInteractionDesignFeatureFlags
|
|
35
34
|
}) => {
|
|
36
35
|
const {
|
|
37
36
|
showMacroInteractionDesignUpdates
|
|
@@ -40,19 +39,11 @@ export const ExtensionNodeWrapper = ({
|
|
|
40
39
|
'inline-extension': nodeType === 'inlineExtension' && showMacroInteractionDesignUpdates,
|
|
41
40
|
relative: showMacroInteractionDesignUpdates
|
|
42
41
|
});
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
const extensionStyles = {
|
|
51
|
-
minHeight: `${nodeHeight}px`
|
|
52
|
-
};
|
|
53
|
-
return jsx("div", {
|
|
54
|
-
style: extensionStyles
|
|
55
|
-
}, content);
|
|
56
|
-
}
|
|
57
|
-
return content;
|
|
42
|
+
return (
|
|
43
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
44
|
+
jsx("span", {
|
|
45
|
+
className: wrapperClassNames,
|
|
46
|
+
css: styles
|
|
47
|
+
}, children, nodeType === 'inlineExtension' && ZERO_WIDTH_SPACE)
|
|
48
|
+
);
|
|
58
49
|
};
|
|
@@ -59,11 +59,10 @@ export class ExtensionNode extends ReactNodeView {
|
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
61
|
render(props, forwardRef) {
|
|
62
|
-
var _props$extensionNodeV
|
|
62
|
+
var _props$extensionNodeV;
|
|
63
63
|
return /*#__PURE__*/React.createElement(ExtensionNodeWrapper, {
|
|
64
64
|
nodeType: this.node.type.name,
|
|
65
|
-
macroInteractionDesignFeatureFlags: props.macroInteractionDesignFeatureFlags
|
|
66
|
-
nodeHeight: (_props$extensionNodeV = props.extensionNodeViewOptions) === null || _props$extensionNodeV === void 0 ? void 0 : (_props$extensionNodeV2 = _props$extensionNodeV.getExtensionHeight) === null || _props$extensionNodeV2 === void 0 ? void 0 : _props$extensionNodeV2.call(_props$extensionNodeV, this.node)
|
|
65
|
+
macroInteractionDesignFeatureFlags: props.macroInteractionDesignFeatureFlags
|
|
67
66
|
}, /*#__PURE__*/React.createElement(Extension, {
|
|
68
67
|
editorView: this.view,
|
|
69
68
|
node: this.node,
|
|
@@ -79,7 +78,7 @@ export class ExtensionNode extends ReactNodeView {
|
|
|
79
78
|
providerFactory: props.providerFactory,
|
|
80
79
|
handleContentDOMRef: forwardRef,
|
|
81
80
|
extensionHandlers: props.extensionHandlers,
|
|
82
|
-
editorAppearance: (_props$
|
|
81
|
+
editorAppearance: (_props$extensionNodeV = props.extensionNodeViewOptions) === null || _props$extensionNodeV === void 0 ? void 0 : _props$extensionNodeV.appearance,
|
|
83
82
|
pluginInjectionApi: props.pluginInjectionApi,
|
|
84
83
|
macroInteractionDesignFeatureFlags: props.macroInteractionDesignFeatureFlags,
|
|
85
84
|
showLivePagesBodiedMacrosRendererView: props.showLivePagesBodiedMacrosRendererView,
|
|
@@ -13,7 +13,6 @@ import DropdownMenu, { DropdownItem, DropdownItemGroup } from '@atlaskit/dropdow
|
|
|
13
13
|
import ChevronDownIcon from '@atlaskit/icon/core/migration/chevron-down';
|
|
14
14
|
import PreferencesIcon from '@atlaskit/icon/core/migration/customize--preferences';
|
|
15
15
|
import LinkExternalIcon from '@atlaskit/icon/core/migration/link-external--shortcut';
|
|
16
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
16
|
import { cardMessages as messages } from '../../messages';
|
|
18
17
|
import { StyledButton } from './StyledButton';
|
|
19
18
|
import { useLinkOverlayAnalyticsEvents } from './useLinkOverlayAnalyticsEvents';
|
|
@@ -84,8 +83,7 @@ const Dropdown = ({
|
|
|
84
83
|
}
|
|
85
84
|
})),
|
|
86
85
|
testId: `${testId}-dropdown`,
|
|
87
|
-
onOpenChange: onOpenChange
|
|
88
|
-
shouldRenderToParent: fg('should-render-to-parent-should-be-true-editor')
|
|
86
|
+
onOpenChange: onOpenChange
|
|
89
87
|
}, jsx(DropdownItemGroup, null, jsx(DropdownItem, {
|
|
90
88
|
elemBefore: jsx(LinkExternalIcon, {
|
|
91
89
|
label: goToLinkLabel,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isFedRamp } from './environment';
|
|
2
2
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
3
3
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
4
|
-
const packageVersion = "107.0.
|
|
4
|
+
const packageVersion = "107.0.2";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// Ignored via go/ees007
|
|
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
13
13
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
14
14
|
import Layer from '../Layer';
|
|
15
15
|
const packageName = "@atlaskit/editor-common";
|
|
16
|
-
const packageVersion = "107.0.
|
|
16
|
+
const packageVersion = "107.0.2";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
// Ignored via go/ees005
|
|
@@ -9,7 +9,6 @@ import { useCallback, useEffect, useRef, useState } from 'react';
|
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
10
|
import { bind } from 'bind-event-listener';
|
|
11
11
|
import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
|
|
12
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
12
|
import { N0, N30A, N60A } from '@atlaskit/theme/colors';
|
|
14
13
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
15
14
|
import { withReactEditorViewOuterListeners as withOuterListeners } from '../../ui-react';
|
|
@@ -173,7 +172,7 @@ export const TableSelectorPopup = props => {
|
|
|
173
172
|
maxRow: getMaxRow(prevSize, event.key)
|
|
174
173
|
};
|
|
175
174
|
});
|
|
176
|
-
if (editorExperiment('platform_editor_controls', 'variant1')
|
|
175
|
+
if (editorExperiment('platform_editor_controls', 'variant1')) {
|
|
177
176
|
event.preventDefault();
|
|
178
177
|
}
|
|
179
178
|
}
|
|
@@ -221,7 +220,7 @@ export const TableSelectorPopup = props => {
|
|
|
221
220
|
maxRow: getMaxRow(prevSize, event.key)
|
|
222
221
|
};
|
|
223
222
|
});
|
|
224
|
-
if (editorExperiment('platform_editor_controls', 'variant1')
|
|
223
|
+
if (editorExperiment('platform_editor_controls', 'variant1')) {
|
|
225
224
|
event.preventDefault();
|
|
226
225
|
}
|
|
227
226
|
}
|
|
@@ -6,7 +6,6 @@ import { useContext, useEffect, useMemo, useRef } from 'react';
|
|
|
6
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
7
|
import { css, jsx } from '@emotion/react';
|
|
8
8
|
import { injectIntl } from 'react-intl-next';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { Stack } from '@atlaskit/primitives/compiled';
|
|
11
10
|
import { B100 } from '@atlaskit/theme/colors';
|
|
12
11
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
@@ -55,7 +54,7 @@ const TableSelectorButton = ({
|
|
|
55
54
|
if (btnRef.current) {
|
|
56
55
|
if (isFocused) {
|
|
57
56
|
btnRef.current.focus({
|
|
58
|
-
preventScroll: editorExperiment('platform_editor_controls', 'variant1')
|
|
57
|
+
preventScroll: editorExperiment('platform_editor_controls', 'variant1') ? true : undefined
|
|
59
58
|
});
|
|
60
59
|
} else {
|
|
61
60
|
btnRef.current.blur();
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
2
2
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
const MAXIMUM_BROWSER_SCROLLBAR_WIDTH = 20;
|
|
5
4
|
|
|
6
5
|
/*
|
|
@@ -236,7 +235,7 @@ export const calculateToolbarPositionOnCellSelection = toolbarTitle => (editorVi
|
|
|
236
235
|
// If the toolbar is to be placed at the bottom of the selection (it happens when
|
|
237
236
|
// there is no sufficient space above) and the bottom of the selection is not in the view,
|
|
238
237
|
// place the toolbar at the bottom of the visible part of selection
|
|
239
|
-
if (selection.isColSelection() && top + toolbarRect.height > wrapperBounds.bottom
|
|
238
|
+
if (selection.isColSelection() && top + toolbarRect.height > wrapperBounds.bottom) {
|
|
240
239
|
top = top - (top - wrapperBounds.bottom) - (toolbarRect.height + 2 * cellSelectionToolbarOffsetTop);
|
|
241
240
|
}
|
|
242
241
|
return {
|
|
@@ -30,27 +30,18 @@ var styles = css({
|
|
|
30
30
|
export var ExtensionNodeWrapper = function ExtensionNodeWrapper(_ref) {
|
|
31
31
|
var children = _ref.children,
|
|
32
32
|
nodeType = _ref.nodeType,
|
|
33
|
-
macroInteractionDesignFeatureFlags = _ref.macroInteractionDesignFeatureFlags
|
|
34
|
-
nodeHeight = _ref.nodeHeight;
|
|
33
|
+
macroInteractionDesignFeatureFlags = _ref.macroInteractionDesignFeatureFlags;
|
|
35
34
|
var _ref2 = macroInteractionDesignFeatureFlags || {},
|
|
36
35
|
showMacroInteractionDesignUpdates = _ref2.showMacroInteractionDesignUpdates;
|
|
37
36
|
var wrapperClassNames = classnames({
|
|
38
37
|
'inline-extension': nodeType === 'inlineExtension' && showMacroInteractionDesignUpdates,
|
|
39
38
|
relative: showMacroInteractionDesignUpdates
|
|
40
39
|
});
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
var extensionStyles = {
|
|
49
|
-
minHeight: "".concat(nodeHeight, "px")
|
|
50
|
-
};
|
|
51
|
-
return jsx("div", {
|
|
52
|
-
style: extensionStyles
|
|
53
|
-
}, content);
|
|
54
|
-
}
|
|
55
|
-
return content;
|
|
40
|
+
return (
|
|
41
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
42
|
+
jsx("span", {
|
|
43
|
+
className: wrapperClassNames,
|
|
44
|
+
css: styles
|
|
45
|
+
}, children, nodeType === 'inlineExtension' && ZERO_WIDTH_SPACE)
|
|
46
|
+
);
|
|
56
47
|
};
|
|
@@ -83,11 +83,10 @@ export var ExtensionNode = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
83
83
|
}, {
|
|
84
84
|
key: "render",
|
|
85
85
|
value: function render(props, forwardRef) {
|
|
86
|
-
var _props$extensionNodeV
|
|
86
|
+
var _props$extensionNodeV;
|
|
87
87
|
return /*#__PURE__*/React.createElement(ExtensionNodeWrapper, {
|
|
88
88
|
nodeType: this.node.type.name,
|
|
89
|
-
macroInteractionDesignFeatureFlags: props.macroInteractionDesignFeatureFlags
|
|
90
|
-
nodeHeight: (_props$extensionNodeV = props.extensionNodeViewOptions) === null || _props$extensionNodeV === void 0 || (_props$extensionNodeV2 = _props$extensionNodeV.getExtensionHeight) === null || _props$extensionNodeV2 === void 0 ? void 0 : _props$extensionNodeV2.call(_props$extensionNodeV, this.node)
|
|
89
|
+
macroInteractionDesignFeatureFlags: props.macroInteractionDesignFeatureFlags
|
|
91
90
|
}, /*#__PURE__*/React.createElement(Extension, {
|
|
92
91
|
editorView: this.view,
|
|
93
92
|
node: this.node,
|
|
@@ -103,7 +102,7 @@ export var ExtensionNode = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
103
102
|
providerFactory: props.providerFactory,
|
|
104
103
|
handleContentDOMRef: forwardRef,
|
|
105
104
|
extensionHandlers: props.extensionHandlers,
|
|
106
|
-
editorAppearance: (_props$
|
|
105
|
+
editorAppearance: (_props$extensionNodeV = props.extensionNodeViewOptions) === null || _props$extensionNodeV === void 0 ? void 0 : _props$extensionNodeV.appearance,
|
|
107
106
|
pluginInjectionApi: props.pluginInjectionApi,
|
|
108
107
|
macroInteractionDesignFeatureFlags: props.macroInteractionDesignFeatureFlags,
|
|
109
108
|
showLivePagesBodiedMacrosRendererView: props.showLivePagesBodiedMacrosRendererView,
|
|
@@ -15,7 +15,6 @@ import DropdownMenu, { DropdownItem, DropdownItemGroup } from '@atlaskit/dropdow
|
|
|
15
15
|
import ChevronDownIcon from '@atlaskit/icon/core/migration/chevron-down';
|
|
16
16
|
import PreferencesIcon from '@atlaskit/icon/core/migration/customize--preferences';
|
|
17
17
|
import LinkExternalIcon from '@atlaskit/icon/core/migration/link-external--shortcut';
|
|
18
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
19
18
|
import { cardMessages as messages } from '../../messages';
|
|
20
19
|
import { StyledButton } from './StyledButton';
|
|
21
20
|
import { useLinkOverlayAnalyticsEvents } from './useLinkOverlayAnalyticsEvents';
|
|
@@ -85,8 +84,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
85
84
|
}));
|
|
86
85
|
},
|
|
87
86
|
testId: "".concat(testId, "-dropdown"),
|
|
88
|
-
onOpenChange: onOpenChange
|
|
89
|
-
shouldRenderToParent: fg('should-render-to-parent-should-be-true-editor')
|
|
87
|
+
onOpenChange: onOpenChange
|
|
90
88
|
}, jsx(DropdownItemGroup, null, jsx(DropdownItem, {
|
|
91
89
|
elemBefore: jsx(LinkExternalIcon, {
|
|
92
90
|
label: goToLinkLabel,
|
|
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
import { isFedRamp } from './environment';
|
|
8
8
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
9
9
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
10
|
-
var packageVersion = "107.0.
|
|
10
|
+
var packageVersion = "107.0.2";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// Ignored via go/ees007
|
|
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
20
20
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
21
21
|
import Layer from '../Layer';
|
|
22
22
|
var packageName = "@atlaskit/editor-common";
|
|
23
|
-
var packageVersion = "107.0.
|
|
23
|
+
var packageVersion = "107.0.2";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
// Ignored via go/ees005
|
|
@@ -13,7 +13,6 @@ import { useCallback, useEffect, useRef, useState } from 'react';
|
|
|
13
13
|
import { css, jsx } from '@emotion/react';
|
|
14
14
|
import { bind } from 'bind-event-listener';
|
|
15
15
|
import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
|
|
16
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
16
|
import { N0, N30A, N60A } from '@atlaskit/theme/colors';
|
|
18
17
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
19
18
|
import { withReactEditorViewOuterListeners as withOuterListeners } from '../../ui-react';
|
|
@@ -175,7 +174,7 @@ export var TableSelectorPopup = function TableSelectorPopup(props) {
|
|
|
175
174
|
maxRow: getMaxRow(prevSize, event.key)
|
|
176
175
|
});
|
|
177
176
|
});
|
|
178
|
-
if (editorExperiment('platform_editor_controls', 'variant1')
|
|
177
|
+
if (editorExperiment('platform_editor_controls', 'variant1')) {
|
|
179
178
|
event.preventDefault();
|
|
180
179
|
}
|
|
181
180
|
}
|
|
@@ -220,7 +219,7 @@ export var TableSelectorPopup = function TableSelectorPopup(props) {
|
|
|
220
219
|
maxRow: getMaxRow(prevSize, event.key)
|
|
221
220
|
});
|
|
222
221
|
});
|
|
223
|
-
if (editorExperiment('platform_editor_controls', 'variant1')
|
|
222
|
+
if (editorExperiment('platform_editor_controls', 'variant1')) {
|
|
224
223
|
event.preventDefault();
|
|
225
224
|
}
|
|
226
225
|
}
|
|
@@ -6,7 +6,6 @@ import { useContext, useEffect, useMemo, useRef } from 'react';
|
|
|
6
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
7
|
import { css, jsx } from '@emotion/react';
|
|
8
8
|
import { injectIntl } from 'react-intl-next';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { Stack } from '@atlaskit/primitives/compiled';
|
|
11
10
|
import { B100 } from '@atlaskit/theme/colors';
|
|
12
11
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
@@ -54,7 +53,7 @@ var TableSelectorButton = function TableSelectorButton(_ref) {
|
|
|
54
53
|
if (btnRef.current) {
|
|
55
54
|
if (isFocused) {
|
|
56
55
|
btnRef.current.focus({
|
|
57
|
-
preventScroll: editorExperiment('platform_editor_controls', 'variant1')
|
|
56
|
+
preventScroll: editorExperiment('platform_editor_controls', 'variant1') ? true : undefined
|
|
58
57
|
});
|
|
59
58
|
} else {
|
|
60
59
|
btnRef.current.blur();
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
2
2
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
var MAXIMUM_BROWSER_SCROLLBAR_WIDTH = 20;
|
|
5
4
|
|
|
6
5
|
/*
|
|
@@ -233,7 +232,7 @@ export var calculateToolbarPositionOnCellSelection = function calculateToolbarPo
|
|
|
233
232
|
// If the toolbar is to be placed at the bottom of the selection (it happens when
|
|
234
233
|
// there is no sufficient space above) and the bottom of the selection is not in the view,
|
|
235
234
|
// place the toolbar at the bottom of the visible part of selection
|
|
236
|
-
if (selection.isColSelection() && top + toolbarRect.height > wrapperBounds.bottom
|
|
235
|
+
if (selection.isColSelection() && top + toolbarRect.height > wrapperBounds.bottom) {
|
|
237
236
|
top = top - (top - wrapperBounds.bottom) - (toolbarRect.height + 2 * cellSelectionToolbarOffsetTop);
|
|
238
237
|
}
|
|
239
238
|
return {
|
|
@@ -10,7 +10,6 @@ type Props = {
|
|
|
10
10
|
children: React.ReactNode;
|
|
11
11
|
nodeType: string;
|
|
12
12
|
macroInteractionDesignFeatureFlags?: MacroInteractionDesignFeatureFlags;
|
|
13
|
-
nodeHeight?: string;
|
|
14
13
|
};
|
|
15
14
|
/**
|
|
16
15
|
* If inlineExtension, add zero width space to the end of the nodes and wrap with span;
|
|
@@ -20,5 +19,5 @@ type Props = {
|
|
|
20
19
|
* @param param0
|
|
21
20
|
* @returns
|
|
22
21
|
*/
|
|
23
|
-
export declare const ExtensionNodeWrapper: ({ children, nodeType, macroInteractionDesignFeatureFlags,
|
|
22
|
+
export declare const ExtensionNodeWrapper: ({ children, nodeType, macroInteractionDesignFeatureFlags, }: Props) => jsx.JSX.Element;
|
|
24
23
|
export {};
|
|
@@ -8,7 +8,7 @@ import { getBreakpoint } from '../ui/WidthProvider';
|
|
|
8
8
|
* TODO: Clean this up after: https://product-fabric.atlassian.net/browse/ED-8942
|
|
9
9
|
*
|
|
10
10
|
*/
|
|
11
|
-
type BreakoutConstsType = {
|
|
11
|
+
export type BreakoutConstsType = {
|
|
12
12
|
padding: number;
|
|
13
13
|
defaultLayoutWidth: number;
|
|
14
14
|
wideScaleRatio: number;
|
|
@@ -28,6 +28,7 @@ export { isElementInTableCell, isTextSelection, isLastItemMediaGroup, setNodeSel
|
|
|
28
28
|
export { withImageLoader } from './imageLoader';
|
|
29
29
|
export type { ImageLoaderProps, ImageLoaderState, ImageStatus } from './imageLoader';
|
|
30
30
|
export { absoluteBreakoutWidth, calcBreakoutWidth, calcWideWidth, breakoutConsts, calculateBreakoutStyles, calcBreakoutWidthPx, getNextBreakoutMode, getTitle, calcBreakoutWithCustomWidth, } from './breakout';
|
|
31
|
+
export type { BreakoutConstsType } from './breakout';
|
|
31
32
|
export {
|
|
32
33
|
/**
|
|
33
34
|
* @private
|
|
@@ -10,7 +10,6 @@ type Props = {
|
|
|
10
10
|
children: React.ReactNode;
|
|
11
11
|
nodeType: string;
|
|
12
12
|
macroInteractionDesignFeatureFlags?: MacroInteractionDesignFeatureFlags;
|
|
13
|
-
nodeHeight?: string;
|
|
14
13
|
};
|
|
15
14
|
/**
|
|
16
15
|
* If inlineExtension, add zero width space to the end of the nodes and wrap with span;
|
|
@@ -20,5 +19,5 @@ type Props = {
|
|
|
20
19
|
* @param param0
|
|
21
20
|
* @returns
|
|
22
21
|
*/
|
|
23
|
-
export declare const ExtensionNodeWrapper: ({ children, nodeType, macroInteractionDesignFeatureFlags,
|
|
22
|
+
export declare const ExtensionNodeWrapper: ({ children, nodeType, macroInteractionDesignFeatureFlags, }: Props) => jsx.JSX.Element;
|
|
24
23
|
export {};
|
|
@@ -8,7 +8,7 @@ import { getBreakpoint } from '../ui/WidthProvider';
|
|
|
8
8
|
* TODO: Clean this up after: https://product-fabric.atlassian.net/browse/ED-8942
|
|
9
9
|
*
|
|
10
10
|
*/
|
|
11
|
-
type BreakoutConstsType = {
|
|
11
|
+
export type BreakoutConstsType = {
|
|
12
12
|
padding: number;
|
|
13
13
|
defaultLayoutWidth: number;
|
|
14
14
|
wideScaleRatio: number;
|
|
@@ -28,6 +28,7 @@ export { isElementInTableCell, isTextSelection, isLastItemMediaGroup, setNodeSel
|
|
|
28
28
|
export { withImageLoader } from './imageLoader';
|
|
29
29
|
export type { ImageLoaderProps, ImageLoaderState, ImageStatus } from './imageLoader';
|
|
30
30
|
export { absoluteBreakoutWidth, calcBreakoutWidth, calcWideWidth, breakoutConsts, calculateBreakoutStyles, calcBreakoutWidthPx, getNextBreakoutMode, getTitle, calcBreakoutWithCustomWidth, } from './breakout';
|
|
31
|
+
export type { BreakoutConstsType } from './breakout';
|
|
31
32
|
export {
|
|
32
33
|
/**
|
|
33
34
|
* @private
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "107.0.
|
|
3
|
+
"version": "107.0.3",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
"@atlaskit/profilecard": "^23.19.0",
|
|
165
165
|
"@atlaskit/react-ufo": "^3.13.0",
|
|
166
166
|
"@atlaskit/section-message": "^8.2.0",
|
|
167
|
-
"@atlaskit/smart-card": "^38.
|
|
167
|
+
"@atlaskit/smart-card": "^38.12.0",
|
|
168
168
|
"@atlaskit/smart-user-picker": "^8.0.0",
|
|
169
169
|
"@atlaskit/spinner": "^18.0.0",
|
|
170
170
|
"@atlaskit/task-decision": "^19.2.0",
|
|
@@ -314,9 +314,6 @@
|
|
|
314
314
|
"platform_editor_nested_dnd_styles_changes": {
|
|
315
315
|
"type": "boolean"
|
|
316
316
|
},
|
|
317
|
-
"platform_editor_controls_patch_2": {
|
|
318
|
-
"type": "boolean"
|
|
319
|
-
},
|
|
320
317
|
"platform_editor_controls_patch_3": {
|
|
321
318
|
"type": "boolean"
|
|
322
319
|
},
|
|
@@ -329,9 +326,6 @@
|
|
|
329
326
|
"platform_fix_media_image_resizing": {
|
|
330
327
|
"type": "boolean"
|
|
331
328
|
},
|
|
332
|
-
"platform_editor_controls_table_picker": {
|
|
333
|
-
"type": "boolean"
|
|
334
|
-
},
|
|
335
329
|
"platform_editor_fix_image_size_diff_during_ssr": {
|
|
336
330
|
"type": "boolean"
|
|
337
331
|
},
|