@atlaskit/editor-common 135.1.0 → 135.3.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 +26 -0
- package/afm-products/tsconfig.json +3 -0
- package/dist/cjs/link/utils.js +2 -3
- package/dist/cjs/media-inline/media-inline-image-card.js +1 -2
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/toolbar-flag-check.js +2 -3
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/TableSelector/index.js +2 -7
- package/dist/cjs/ui/TableSelector/table-selector.js +1 -2
- package/dist/cjs/ui-menu/ColorPickerButton/index.js +1 -2
- package/dist/cjs/ui-menu/DropdownMenu/index.js +3 -12
- package/dist/cjs/ui-react/with-react-editor-view-outer-listeners.js +2 -3
- package/dist/es2019/link/utils.js +2 -3
- package/dist/es2019/media-inline/media-inline-image-card.js +1 -2
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/toolbar-flag-check.js +1 -2
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/TableSelector/index.js +2 -7
- package/dist/es2019/ui/TableSelector/table-selector.js +1 -2
- package/dist/es2019/ui-menu/ColorPickerButton/index.js +1 -2
- package/dist/es2019/ui-menu/DropdownMenu/index.js +11 -34
- package/dist/es2019/ui-react/with-react-editor-view-outer-listeners.js +2 -3
- package/dist/esm/link/utils.js +2 -3
- package/dist/esm/media-inline/media-inline-image-card.js +1 -2
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/toolbar-flag-check.js +2 -3
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/TableSelector/index.js +2 -7
- package/dist/esm/ui/TableSelector/table-selector.js +1 -2
- package/dist/esm/ui-menu/ColorPickerButton/index.js +1 -2
- package/dist/esm/ui-menu/DropdownMenu/index.js +3 -12
- package/dist/esm/ui-react/with-react-editor-view-outer-listeners.js +2 -3
- package/dist/types/analytics/types/insert-events.d.ts +17 -1
- package/dist/types/credit-guard/types.d.ts +1 -1
- package/dist/types/toolbar-flag-check.d.ts +1 -1
- package/dist/types/ui-react/with-react-editor-view-outer-listeners.d.ts +1 -1
- package/package.json +7 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 135.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`c13b574ab38d2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c13b574ab38d2) -
|
|
8
|
+
Declare the workspace dependencies used by package source and emitted types so isolated
|
|
9
|
+
installations can resolve them.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`dc4bf5ef54cd1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/dc4bf5ef54cd1) -
|
|
14
|
+
Remove the `control` branches of experiment `platform_editor_controls`; the editor controls
|
|
15
|
+
(`variant1`) experience is now permanent.
|
|
16
|
+
- [`5b44df5f1aa56`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5b44df5f1aa56) -
|
|
17
|
+
Report a `failedToInsert` analytics event (and capture the exception) when the media insertion
|
|
18
|
+
type cannot be determined, including whether the `mediaInline` flag is on while the schema has no
|
|
19
|
+
`mediaInline` node. The error is rethrown, so behaviour is unchanged.
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
22
|
+
## 135.2.0
|
|
23
|
+
|
|
24
|
+
### Minor Changes
|
|
25
|
+
|
|
26
|
+
- [`6ced81618548f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6ced81618548f) -
|
|
27
|
+
Add blockMenu-remix to the supported Editor AI credit entry points.
|
|
28
|
+
|
|
3
29
|
## 135.1.0
|
|
4
30
|
|
|
5
31
|
### Minor Changes
|
|
@@ -103,6 +103,9 @@
|
|
|
103
103
|
{
|
|
104
104
|
"path": "../../../linking-platform/link-picker/afm-products/tsconfig.json"
|
|
105
105
|
},
|
|
106
|
+
{
|
|
107
|
+
"path": "../../../linking-platform/linking-common/afm-products/tsconfig.json"
|
|
108
|
+
},
|
|
106
109
|
{
|
|
107
110
|
"path": "../../../design-system/logo/afm-products/tsconfig.json"
|
|
108
111
|
},
|
package/dist/cjs/link/utils.js
CHANGED
|
@@ -17,7 +17,6 @@ Object.defineProperty(exports, "isTextAtPos", {
|
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
19
|
var _getUrlForDomainInContext = require("@atlaskit/atlassian-context/get-url-for-domain-in-context");
|
|
20
|
-
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
21
20
|
var _constants = require("./constants");
|
|
22
21
|
var _isTextAtPos = require("./isTextAtPos");
|
|
23
22
|
var _isLinkAtPos = require("./isLinkAtPos");
|
|
@@ -64,7 +63,7 @@ var getActiveLinkMark = exports.getActiveLinkMark = function getActiveLinkMark(s
|
|
|
64
63
|
pos: pos
|
|
65
64
|
} : undefined;
|
|
66
65
|
}
|
|
67
|
-
if (isEmptySelectionBeforeLink(state)
|
|
66
|
+
if (isEmptySelectionBeforeLink(state)) {
|
|
68
67
|
// if user clicks right before the link, we want to show the toolbar for the link
|
|
69
68
|
// but only if the link is a single character
|
|
70
69
|
var _node = state.doc.nodeAt($from.pos);
|
|
@@ -73,7 +72,7 @@ var getActiveLinkMark = exports.getActiveLinkMark = function getActiveLinkMark(s
|
|
|
73
72
|
pos: $from.pos
|
|
74
73
|
} : undefined;
|
|
75
74
|
}
|
|
76
|
-
if (isEmptySelectionAfterLink(state)
|
|
75
|
+
if (isEmptySelectionAfterLink(state)) {
|
|
77
76
|
// if user clicks right after the link, we want to show the toolbar for the link
|
|
78
77
|
// but only if the link is a single character
|
|
79
78
|
// and we return the position of the link
|
|
@@ -19,7 +19,6 @@ var _mediaClient = require("@atlaskit/media-client");
|
|
|
19
19
|
var _mediaClientProvider = require("@atlaskit/media-client-react/media-client-provider");
|
|
20
20
|
var _mediaViewerLoader = _interopRequireDefault(require("@atlaskit/media-viewer/media-viewer-loader"));
|
|
21
21
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
22
|
-
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
23
22
|
var _mediaInlineCard = require("../messages/media-inline-card");
|
|
24
23
|
var _constants = require("./constants");
|
|
25
24
|
var _inlineImageCard = require("./inline-image-card");
|
|
@@ -223,7 +222,7 @@ var MediaInlineImageCardInternal = exports.MediaInlineImageCardInternal = functi
|
|
|
223
222
|
// In edit mode (node content wrapper has contenteditable set to true), link redirection is disabled by default
|
|
224
223
|
// We need to call "stopPropagation" here in order to prevent in editor view mode, the browser from navigating to
|
|
225
224
|
// another URL if the media node is wrapped in a link mark.
|
|
226
|
-
if (isViewOnly
|
|
225
|
+
if (isViewOnly) {
|
|
227
226
|
e.preventDefault();
|
|
228
227
|
}
|
|
229
228
|
}, [shouldOpenMediaViewer, isViewOnly, setMediaViewerVisible]);
|
|
@@ -27,7 +27,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
27
27
|
var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
28
28
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
29
29
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
30
|
-
var packageVersion = "135.
|
|
30
|
+
var packageVersion = "135.2.0";
|
|
31
31
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
32
32
|
// Remove URL as it has UGC
|
|
33
33
|
// Ignored via go/ees007
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.areToolbarFlagsEnabled = void 0;
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
return Boolean((0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') || isNewToolbarEnabled);
|
|
7
|
+
var areToolbarFlagsEnabled = exports.areToolbarFlagsEnabled = function areToolbarFlagsEnabled(_isNewToolbarEnabled) {
|
|
8
|
+
return true;
|
|
10
9
|
};
|
|
@@ -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 = "135.
|
|
26
|
+
var packageVersion = "135.2.0";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = '0, 8';
|
|
29
29
|
// Ignored via go/ees005
|
|
@@ -13,7 +13,6 @@ var _react2 = require("@emotion/react");
|
|
|
13
13
|
var _bindEventListener = require("bind-event-listener");
|
|
14
14
|
var _constants = require("@atlaskit/editor-shared-styles/constants");
|
|
15
15
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
16
|
-
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
17
16
|
var _uiReact = require("../../ui-react");
|
|
18
17
|
var _Popup = _interopRequireDefault(require("../Popup"));
|
|
19
18
|
var _tableSelector = _interopRequireWildcard(require("./table-selector"));
|
|
@@ -180,9 +179,7 @@ var TableSelectorPopup = exports.TableSelectorPopup = function TableSelectorPopu
|
|
|
180
179
|
maxRow: getMaxRow(prevSize, event.key)
|
|
181
180
|
});
|
|
182
181
|
});
|
|
183
|
-
|
|
184
|
-
event.preventDefault();
|
|
185
|
-
}
|
|
182
|
+
event.preventDefault();
|
|
186
183
|
}
|
|
187
184
|
if (event.key === 'ArrowRight') {
|
|
188
185
|
enableKeyboardMode();
|
|
@@ -225,9 +222,7 @@ var TableSelectorPopup = exports.TableSelectorPopup = function TableSelectorPopu
|
|
|
225
222
|
maxRow: getMaxRow(prevSize, event.key)
|
|
226
223
|
});
|
|
227
224
|
});
|
|
228
|
-
|
|
229
|
-
event.preventDefault();
|
|
230
|
-
}
|
|
225
|
+
event.preventDefault();
|
|
231
226
|
}
|
|
232
227
|
}, [enableKeyboardMode, setSize]);
|
|
233
228
|
(0, _react.useEffect)(function () {
|
|
@@ -8,7 +8,6 @@ var _react = require("react");
|
|
|
8
8
|
var _react2 = require("@emotion/react");
|
|
9
9
|
var _reactIntl = require("react-intl");
|
|
10
10
|
var _stack = require("@atlaskit/primitives/compiled/stack");
|
|
11
|
-
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
12
11
|
var _messages = require("../../messages");
|
|
13
12
|
var _uiReact = require("../../ui-react");
|
|
14
13
|
/**
|
|
@@ -63,7 +62,7 @@ var TableSelectorButton = function TableSelectorButton(_ref) {
|
|
|
63
62
|
if (btnRef.current) {
|
|
64
63
|
if (isFocused) {
|
|
65
64
|
btnRef.current.focus({
|
|
66
|
-
preventScroll:
|
|
65
|
+
preventScroll: true
|
|
67
66
|
});
|
|
68
67
|
} else {
|
|
69
68
|
btnRef.current.blur();
|
|
@@ -18,7 +18,6 @@ var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-ex
|
|
|
18
18
|
var _box = require("@atlaskit/primitives/box");
|
|
19
19
|
var _inline = require("@atlaskit/primitives/inline");
|
|
20
20
|
var _xcss = require("@atlaskit/primitives/xcss/xcss");
|
|
21
|
-
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
22
21
|
var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
|
|
23
22
|
var _analytics = require("../../analytics");
|
|
24
23
|
var _colorPickerButton = require("../../messages/color-picker-button");
|
|
@@ -280,7 +279,7 @@ var ColorPickerButton = function ColorPickerButton(props) {
|
|
|
280
279
|
ref: buttonRef,
|
|
281
280
|
"aria-label": title,
|
|
282
281
|
"aria-expanded": props.isAriaExpanded ? isPopupOpen : undefined,
|
|
283
|
-
spacing:
|
|
282
|
+
spacing: "default",
|
|
284
283
|
onClick: togglePopup,
|
|
285
284
|
onKeyDown: onKeyDown,
|
|
286
285
|
"data-selected-color": props.currentColor,
|
|
@@ -25,7 +25,6 @@ var _customItem = _interopRequireDefault(require("@atlaskit/menu/custom-item"));
|
|
|
25
25
|
var _menuGroup = _interopRequireDefault(require("@atlaskit/menu/menu-group"));
|
|
26
26
|
var _section = _interopRequireDefault(require("@atlaskit/menu/section"));
|
|
27
27
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
28
|
-
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
29
28
|
var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
|
|
30
29
|
var _styles = require("../../styles");
|
|
31
30
|
var _ToolbarArrowKeyNavigationProvider = require("../../ui-menu/ToolbarArrowKeyNavigationProvider");
|
|
@@ -35,7 +34,7 @@ var _Popup = _interopRequireDefault(require("../../ui/Popup"));
|
|
|
35
34
|
var _ArrowKeyNavigationProvider = require("../ArrowKeyNavigationProvider");
|
|
36
35
|
var _types = require("../ArrowKeyNavigationProvider/types");
|
|
37
36
|
var _excluded = ["children"];
|
|
38
|
-
var _templateObject, _templateObject2
|
|
37
|
+
var _templateObject, _templateObject2;
|
|
39
38
|
/* eslint-disable @repo/internal/react/no-class-components */
|
|
40
39
|
/**
|
|
41
40
|
* @jsxRuntime classic
|
|
@@ -60,22 +59,14 @@ var focusedMenuItemStyle = (0, _react2.css)({
|
|
|
60
59
|
});
|
|
61
60
|
var buttonStyles = function buttonStyles(isActive, submenuActive) {
|
|
62
61
|
if (isActive) {
|
|
63
|
-
if ((0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1')) {
|
|
64
|
-
/**
|
|
65
|
-
* Hack for item to imitate old dropdown-menu selected styles
|
|
66
|
-
*/
|
|
67
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
68
|
-
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\tposition: relative;\n\t\t\t\t&::before {\n\t\t\t\t\tdisplay: block;\n\t\t\t\t\theight: 100%;\n\t\t\t\t\twidth: 2px;\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\tleft: 0;\n\t\t\t\t\ttop: 0;\n\t\t\t\t\tbackground: ", ";\n\t\t\t\t\tcontent: '';\n\t\t\t\t}\n\t\t\t\t> span,\n\t\t\t\t> span:hover,\n\t\t\t\t> span:active {\n\t\t\t\t\tbackground: ", ";\n\t\t\t\t\tcolor: ", ";\n\t\t\t\t}\n\t\t\t\t:focus > span[aria-disabled='false'] {\n\t\t\t\t\t", ";\n\t\t\t\t}\n\t\t\t\t:focus-visible,\n\t\t\t\t:focus-visible > span[aria-disabled='false'] {\n\t\t\t\t\toutline: none;\n\t\t\t\t}\n\t\t\t"])), "var(--ds-border-selected, #1868DB)", "var(--ds-background-selected, #E9F2FE)", "var(--ds-text-selected, #1868DB)", focusedMenuItemStyle);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
62
|
/**
|
|
72
63
|
* Hack for item to imitate old dropdown-menu selected styles
|
|
73
64
|
*/
|
|
74
65
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
75
|
-
return (0, _react2.css)(
|
|
66
|
+
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t\t\tposition: relative;\n\t\t\t&::before {\n\t\t\t\tdisplay: block;\n\t\t\t\theight: 100%;\n\t\t\t\twidth: 2px;\n\t\t\t\tposition: absolute;\n\t\t\t\tleft: 0;\n\t\t\t\ttop: 0;\n\t\t\t\tbackground: ", ";\n\t\t\t\tcontent: '';\n\t\t\t}\n\t\t\t> span,\n\t\t\t> span:hover,\n\t\t\t> span:active {\n\t\t\t\tbackground: ", ";\n\t\t\t\tcolor: ", ";\n\t\t\t}\n\t\t\t:focus > span[aria-disabled='false'] {\n\t\t\t\t", ";\n\t\t\t}\n\t\t\t:focus-visible,\n\t\t\t:focus-visible > span[aria-disabled='false'] {\n\t\t\t\toutline: none;\n\t\t\t}\n\t\t"])), "var(--ds-border-selected, #1868DB)", "var(--ds-background-selected, #E9F2FE)", "var(--ds-text-selected, #1868DB)", focusedMenuItemStyle);
|
|
76
67
|
} else {
|
|
77
68
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
78
|
-
return (0, _react2.css)(
|
|
69
|
+
return (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t> span:hover[aria-disabled='false'] {\n\t\t\t\tcolor: ", ";\n\t\t\t\tbackground-color: ", ";\n\t\t\t}\n\t\t\t", "\n\t\t\t> span[aria-disabled='true'] {\n\t\t\t\tcolor: ", ";\n\t\t\t}\n\t\t\t:focus > span[aria-disabled='false'] {\n\t\t\t\t", ";\n\t\t\t}\n\t\t\t:focus-visible,\n\t\t\t:focus-visible > span[aria-disabled='false'] {\n\t\t\t\toutline: none;\n\t\t\t}\n\t\t"])), "var(--ds-text, #292A2E)", "var(--ds-background-neutral-subtle-hovered, #0515240F)", !submenuActive && "\n\t\t\t\t\t> span:active[aria-disabled='false'] {\n\t\t\t\t\t\tbackground-color: ".concat("var(--ds-background-neutral-subtle-pressed, #0B120E24)", ";\n\t\t\t\t\t}"), "var(--ds-text-disabled, #080F214A)", focusedMenuItemStyle); // The default focus-visible style is removed to ensure consistency across browsers
|
|
79
70
|
}
|
|
80
71
|
};
|
|
81
72
|
var DropListWithOutsideClickTargetRef = function DropListWithOutsideClickTargetRef(props) {
|
|
@@ -21,7 +21,6 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
21
21
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
22
22
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
23
23
|
var _react = _interopRequireWildcard(require("react"));
|
|
24
|
-
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
25
24
|
var _OutsideClickTargetRefContext = require("./OutsideClickTargetRefContext");
|
|
26
25
|
var _ReactEditorViewContext = _interopRequireDefault(require("./ReactEditorViewContext"));
|
|
27
26
|
var _excluded = ["captureClick", "closeOnTab", "handleBackspaceDeleteKeydown", "handleClickOutside", "handleEnterKeydown", "handleEscapeKeydown", "handleKeyDown"];
|
|
@@ -83,7 +82,7 @@ var WithOutsideClick = /*#__PURE__*/function (_PureComponent) {
|
|
|
83
82
|
key: "componentDidMount",
|
|
84
83
|
value: function componentDidMount() {
|
|
85
84
|
if (this.props.handleClickOutside) {
|
|
86
|
-
var options = this.props.captureClick
|
|
85
|
+
var options = this.props.captureClick ? {
|
|
87
86
|
capture: true
|
|
88
87
|
} : false;
|
|
89
88
|
// Ignored via go/ees005
|
|
@@ -108,7 +107,7 @@ var WithOutsideClick = /*#__PURE__*/function (_PureComponent) {
|
|
|
108
107
|
key: "componentWillUnmount",
|
|
109
108
|
value: function componentWillUnmount() {
|
|
110
109
|
if (this.props.handleClickOutside) {
|
|
111
|
-
var options = this.props.captureClick
|
|
110
|
+
var options = this.props.captureClick ? {
|
|
112
111
|
capture: true
|
|
113
112
|
} : false;
|
|
114
113
|
// Ignored via go/ees005
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { getUrlForDomainInContext } from '@atlaskit/atlassian-context/get-url-for-domain-in-context';
|
|
2
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
3
2
|
import { linkPreferencesPath } from './constants';
|
|
4
3
|
const STAGING = 'staging';
|
|
5
4
|
const PRODUCTION = 'prod';
|
|
@@ -49,7 +48,7 @@ export const getActiveLinkMark = state => {
|
|
|
49
48
|
pos
|
|
50
49
|
} : undefined;
|
|
51
50
|
}
|
|
52
|
-
if (isEmptySelectionBeforeLink(state)
|
|
51
|
+
if (isEmptySelectionBeforeLink(state)) {
|
|
53
52
|
// if user clicks right before the link, we want to show the toolbar for the link
|
|
54
53
|
// but only if the link is a single character
|
|
55
54
|
const node = state.doc.nodeAt($from.pos);
|
|
@@ -58,7 +57,7 @@ export const getActiveLinkMark = state => {
|
|
|
58
57
|
pos: $from.pos
|
|
59
58
|
} : undefined;
|
|
60
59
|
}
|
|
61
|
-
if (isEmptySelectionAfterLink(state)
|
|
60
|
+
if (isEmptySelectionAfterLink(state)) {
|
|
62
61
|
// if user clicks right after the link, we want to show the toolbar for the link
|
|
63
62
|
// but only if the link is a single character
|
|
64
63
|
// and we return the position of the link
|
|
@@ -16,7 +16,6 @@ import { FileFetcherError } from '@atlaskit/media-client';
|
|
|
16
16
|
import { MediaClientContext } from '@atlaskit/media-client-react/media-client-provider';
|
|
17
17
|
import MediaViewer from '@atlaskit/media-viewer/media-viewer-loader';
|
|
18
18
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
19
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
20
19
|
import { messages } from '../messages/media-inline-card';
|
|
21
20
|
import { referenceHeights } from './constants';
|
|
22
21
|
import { InlineImageCard } from './inline-image-card';
|
|
@@ -196,7 +195,7 @@ export const MediaInlineImageCardInternal = ({
|
|
|
196
195
|
// In edit mode (node content wrapper has contenteditable set to true), link redirection is disabled by default
|
|
197
196
|
// We need to call "stopPropagation" here in order to prevent in editor view mode, the browser from navigating to
|
|
198
197
|
// another URL if the media node is wrapped in a link mark.
|
|
199
|
-
if (isViewOnly
|
|
198
|
+
if (isViewOnly) {
|
|
200
199
|
e.preventDefault();
|
|
201
200
|
}
|
|
202
201
|
}, [shouldOpenMediaViewer, isViewOnly, setMediaViewerVisible]);
|
|
@@ -13,7 +13,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
13
13
|
const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
14
14
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
15
15
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
16
|
-
const packageVersion = "135.
|
|
16
|
+
const packageVersion = "135.2.0";
|
|
17
17
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
18
18
|
// Remove URL as it has UGC
|
|
19
19
|
// Ignored via go/ees007
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export const areToolbarFlagsEnabled = isNewToolbarEnabled => Boolean(editorExperiment('platform_editor_controls', 'variant1') || isNewToolbarEnabled);
|
|
1
|
+
export const areToolbarFlagsEnabled = _isNewToolbarEnabled => true;
|
|
@@ -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 = "135.
|
|
16
|
+
const packageVersion = "135.2.0";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
// Ignored via go/ees005
|
|
@@ -9,7 +9,6 @@ import { css, jsx } from '@emotion/react';
|
|
|
9
9
|
import { bind } from 'bind-event-listener';
|
|
10
10
|
import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles/constants';
|
|
11
11
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
12
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
13
12
|
import { withReactEditorViewOuterListeners as withOuterListeners } from '../../ui-react';
|
|
14
13
|
import Popup from '../Popup';
|
|
15
14
|
import tableSelectorPopup, { TABLE_SELECTOR_BUTTON_GAP, TABLE_SELECTOR_BUTTON_SIZE } from './table-selector';
|
|
@@ -172,9 +171,7 @@ export const TableSelectorPopup = props => {
|
|
|
172
171
|
maxRow: getMaxRow(prevSize, event.key)
|
|
173
172
|
};
|
|
174
173
|
});
|
|
175
|
-
|
|
176
|
-
event.preventDefault();
|
|
177
|
-
}
|
|
174
|
+
event.preventDefault();
|
|
178
175
|
}
|
|
179
176
|
if (event.key === 'ArrowRight') {
|
|
180
177
|
enableKeyboardMode();
|
|
@@ -220,9 +217,7 @@ export const TableSelectorPopup = props => {
|
|
|
220
217
|
maxRow: getMaxRow(prevSize, event.key)
|
|
221
218
|
};
|
|
222
219
|
});
|
|
223
|
-
|
|
224
|
-
event.preventDefault();
|
|
225
|
-
}
|
|
220
|
+
event.preventDefault();
|
|
226
221
|
}
|
|
227
222
|
}, [enableKeyboardMode, setSize]);
|
|
228
223
|
useEffect(() => {
|
|
@@ -7,7 +7,6 @@ import { useContext, useEffect, useMemo, useRef } from 'react';
|
|
|
7
7
|
import { css, jsx } from '@emotion/react';
|
|
8
8
|
import { injectIntl } from 'react-intl';
|
|
9
9
|
import { Stack } from '@atlaskit/primitives/compiled/stack';
|
|
10
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
11
10
|
import { toolbarInsertBlockMessages as messages } from '../../messages';
|
|
12
11
|
import { OutsideClickTargetRefContext } from '../../ui-react';
|
|
13
12
|
export const TABLE_SELECTOR_BUTTON_GAP = 2;
|
|
@@ -56,7 +55,7 @@ const TableSelectorButton = ({
|
|
|
56
55
|
if (btnRef.current) {
|
|
57
56
|
if (isFocused) {
|
|
58
57
|
btnRef.current.focus({
|
|
59
|
-
preventScroll:
|
|
58
|
+
preventScroll: true
|
|
60
59
|
});
|
|
61
60
|
} else {
|
|
62
61
|
btnRef.current.blur();
|
|
@@ -18,7 +18,6 @@ import { Box } from '@atlaskit/primitives/box';
|
|
|
18
18
|
import { Inline } from '@atlaskit/primitives/inline';
|
|
19
19
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
20
20
|
import { xcss } from '@atlaskit/primitives/xcss/xcss';
|
|
21
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
22
21
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
23
22
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, editorAnalyticsChannel, EVENT_TYPE } from '../../analytics';
|
|
24
23
|
import { colorPickerButtonMessages } from '../../messages/color-picker-button';
|
|
@@ -251,7 +250,7 @@ const ColorPickerButton = props => {
|
|
|
251
250
|
ref: buttonRef,
|
|
252
251
|
"aria-label": title,
|
|
253
252
|
"aria-expanded": props.isAriaExpanded ? isPopupOpen : undefined,
|
|
254
|
-
spacing:
|
|
253
|
+
spacing: "default",
|
|
255
254
|
onClick: togglePopup,
|
|
256
255
|
onKeyDown: onKeyDown,
|
|
257
256
|
"data-selected-color": props.currentColor,
|
|
@@ -15,7 +15,6 @@ import CustomItem from '@atlaskit/menu/custom-item';
|
|
|
15
15
|
import MenuGroup from '@atlaskit/menu/menu-group';
|
|
16
16
|
import Section from '@atlaskit/menu/section';
|
|
17
17
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
18
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
19
18
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
20
19
|
import { DropdownMenuSharedCssClassName } from '../../styles';
|
|
21
20
|
import { KeyDownHandlerContext } from '../../ui-menu/ToolbarArrowKeyNavigationProvider';
|
|
@@ -37,44 +36,22 @@ const focusedMenuItemStyle = css({
|
|
|
37
36
|
});
|
|
38
37
|
const buttonStyles = (isActive, submenuActive) => {
|
|
39
38
|
if (isActive) {
|
|
40
|
-
if (editorExperiment('platform_editor_controls', 'variant1')) {
|
|
41
|
-
/**
|
|
42
|
-
* Hack for item to imitate old dropdown-menu selected styles
|
|
43
|
-
*/
|
|
44
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
45
|
-
return css`
|
|
46
|
-
position: relative;
|
|
47
|
-
&::before {
|
|
48
|
-
display: block;
|
|
49
|
-
height: 100%;
|
|
50
|
-
width: 2px;
|
|
51
|
-
position: absolute;
|
|
52
|
-
left: 0;
|
|
53
|
-
top: 0;
|
|
54
|
-
background: ${"var(--ds-border-selected, #1868DB)"};
|
|
55
|
-
content: '';
|
|
56
|
-
}
|
|
57
|
-
> span,
|
|
58
|
-
> span:hover,
|
|
59
|
-
> span:active {
|
|
60
|
-
background: ${"var(--ds-background-selected, #E9F2FE)"};
|
|
61
|
-
color: ${"var(--ds-text-selected, #1868DB)"};
|
|
62
|
-
}
|
|
63
|
-
:focus > span[aria-disabled='false'] {
|
|
64
|
-
${focusedMenuItemStyle};
|
|
65
|
-
}
|
|
66
|
-
:focus-visible,
|
|
67
|
-
:focus-visible > span[aria-disabled='false'] {
|
|
68
|
-
outline: none;
|
|
69
|
-
}
|
|
70
|
-
`;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
39
|
/**
|
|
74
40
|
* Hack for item to imitate old dropdown-menu selected styles
|
|
75
41
|
*/
|
|
76
42
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
77
43
|
return css`
|
|
44
|
+
position: relative;
|
|
45
|
+
&::before {
|
|
46
|
+
display: block;
|
|
47
|
+
height: 100%;
|
|
48
|
+
width: 2px;
|
|
49
|
+
position: absolute;
|
|
50
|
+
left: 0;
|
|
51
|
+
top: 0;
|
|
52
|
+
background: ${"var(--ds-border-selected, #1868DB)"};
|
|
53
|
+
content: '';
|
|
54
|
+
}
|
|
78
55
|
> span,
|
|
79
56
|
> span:hover,
|
|
80
57
|
> span:active {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React, { PureComponent, useCallback, useEffect, useRef, useState } from 'react';
|
|
3
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
4
3
|
import { OutsideClickTargetRefContext } from './OutsideClickTargetRefContext';
|
|
5
4
|
import ReactEditorViewContext from './ReactEditorViewContext';
|
|
6
5
|
|
|
@@ -51,7 +50,7 @@ class WithOutsideClick extends PureComponent {
|
|
|
51
50
|
}
|
|
52
51
|
componentDidMount() {
|
|
53
52
|
if (this.props.handleClickOutside) {
|
|
54
|
-
const options = this.props.captureClick
|
|
53
|
+
const options = this.props.captureClick ? {
|
|
55
54
|
capture: true
|
|
56
55
|
} : false;
|
|
57
56
|
// Ignored via go/ees005
|
|
@@ -74,7 +73,7 @@ class WithOutsideClick extends PureComponent {
|
|
|
74
73
|
}
|
|
75
74
|
componentWillUnmount() {
|
|
76
75
|
if (this.props.handleClickOutside) {
|
|
77
|
-
const options = this.props.captureClick
|
|
76
|
+
const options = this.props.captureClick ? {
|
|
78
77
|
capture: true
|
|
79
78
|
} : false;
|
|
80
79
|
// Ignored via go/ees005
|
package/dist/esm/link/utils.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { getUrlForDomainInContext } from '@atlaskit/atlassian-context/get-url-for-domain-in-context';
|
|
2
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
3
2
|
import { linkPreferencesPath } from './constants';
|
|
4
3
|
var STAGING = 'staging';
|
|
5
4
|
var PRODUCTION = 'prod';
|
|
@@ -44,7 +43,7 @@ export var getActiveLinkMark = function getActiveLinkMark(state) {
|
|
|
44
43
|
pos: pos
|
|
45
44
|
} : undefined;
|
|
46
45
|
}
|
|
47
|
-
if (isEmptySelectionBeforeLink(state)
|
|
46
|
+
if (isEmptySelectionBeforeLink(state)) {
|
|
48
47
|
// if user clicks right before the link, we want to show the toolbar for the link
|
|
49
48
|
// but only if the link is a single character
|
|
50
49
|
var _node = state.doc.nodeAt($from.pos);
|
|
@@ -53,7 +52,7 @@ export var getActiveLinkMark = function getActiveLinkMark(state) {
|
|
|
53
52
|
pos: $from.pos
|
|
54
53
|
} : undefined;
|
|
55
54
|
}
|
|
56
|
-
if (isEmptySelectionAfterLink(state)
|
|
55
|
+
if (isEmptySelectionAfterLink(state)) {
|
|
57
56
|
// if user clicks right after the link, we want to show the toolbar for the link
|
|
58
57
|
// but only if the link is a single character
|
|
59
58
|
// and we return the position of the link
|
|
@@ -20,7 +20,6 @@ import { FileFetcherError } from '@atlaskit/media-client';
|
|
|
20
20
|
import { MediaClientContext } from '@atlaskit/media-client-react/media-client-provider';
|
|
21
21
|
import MediaViewer from '@atlaskit/media-viewer/media-viewer-loader';
|
|
22
22
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
23
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
24
23
|
import { messages } from '../messages/media-inline-card';
|
|
25
24
|
import { referenceHeights } from './constants';
|
|
26
25
|
import { InlineImageCard } from './inline-image-card';
|
|
@@ -219,7 +218,7 @@ export var MediaInlineImageCardInternal = function MediaInlineImageCardInternal(
|
|
|
219
218
|
// In edit mode (node content wrapper has contenteditable set to true), link redirection is disabled by default
|
|
220
219
|
// We need to call "stopPropagation" here in order to prevent in editor view mode, the browser from navigating to
|
|
221
220
|
// another URL if the media node is wrapped in a link mark.
|
|
222
|
-
if (isViewOnly
|
|
221
|
+
if (isViewOnly) {
|
|
223
222
|
e.preventDefault();
|
|
224
223
|
}
|
|
225
224
|
}, [shouldOpenMediaViewer, isViewOnly, setMediaViewerVisible]);
|
|
@@ -19,7 +19,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
19
19
|
var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
20
20
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
21
21
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
22
|
-
var packageVersion = "135.
|
|
22
|
+
var packageVersion = "135.2.0";
|
|
23
23
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
24
24
|
// Remove URL as it has UGC
|
|
25
25
|
// Ignored via go/ees007
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return Boolean(editorExperiment('platform_editor_controls', 'variant1') || isNewToolbarEnabled);
|
|
1
|
+
export var areToolbarFlagsEnabled = function areToolbarFlagsEnabled(_isNewToolbarEnabled) {
|
|
2
|
+
return true;
|
|
4
3
|
};
|
|
@@ -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 = "135.
|
|
23
|
+
var packageVersion = "135.2.0";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
// Ignored via go/ees005
|
|
@@ -13,7 +13,6 @@ import { css, jsx } from '@emotion/react';
|
|
|
13
13
|
import { bind } from 'bind-event-listener';
|
|
14
14
|
import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles/constants';
|
|
15
15
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
16
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
17
16
|
import { withReactEditorViewOuterListeners as withOuterListeners } from '../../ui-react';
|
|
18
17
|
import Popup from '../Popup';
|
|
19
18
|
import tableSelectorPopup, { TABLE_SELECTOR_BUTTON_GAP, TABLE_SELECTOR_BUTTON_SIZE } from './table-selector';
|
|
@@ -174,9 +173,7 @@ export var TableSelectorPopup = function TableSelectorPopup(props) {
|
|
|
174
173
|
maxRow: getMaxRow(prevSize, event.key)
|
|
175
174
|
});
|
|
176
175
|
});
|
|
177
|
-
|
|
178
|
-
event.preventDefault();
|
|
179
|
-
}
|
|
176
|
+
event.preventDefault();
|
|
180
177
|
}
|
|
181
178
|
if (event.key === 'ArrowRight') {
|
|
182
179
|
enableKeyboardMode();
|
|
@@ -219,9 +216,7 @@ export var TableSelectorPopup = function TableSelectorPopup(props) {
|
|
|
219
216
|
maxRow: getMaxRow(prevSize, event.key)
|
|
220
217
|
});
|
|
221
218
|
});
|
|
222
|
-
|
|
223
|
-
event.preventDefault();
|
|
224
|
-
}
|
|
219
|
+
event.preventDefault();
|
|
225
220
|
}
|
|
226
221
|
}, [enableKeyboardMode, setSize]);
|
|
227
222
|
useEffect(function () {
|
|
@@ -7,7 +7,6 @@ import { useContext, useEffect, useMemo, useRef } from 'react';
|
|
|
7
7
|
import { css, jsx } from '@emotion/react';
|
|
8
8
|
import { injectIntl } from 'react-intl';
|
|
9
9
|
import { Stack } from '@atlaskit/primitives/compiled/stack';
|
|
10
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
11
10
|
import { toolbarInsertBlockMessages as messages } from '../../messages';
|
|
12
11
|
import { OutsideClickTargetRefContext } from '../../ui-react';
|
|
13
12
|
export var TABLE_SELECTOR_BUTTON_GAP = 2;
|
|
@@ -55,7 +54,7 @@ var TableSelectorButton = function TableSelectorButton(_ref) {
|
|
|
55
54
|
if (btnRef.current) {
|
|
56
55
|
if (isFocused) {
|
|
57
56
|
btnRef.current.focus({
|
|
58
|
-
preventScroll:
|
|
57
|
+
preventScroll: true
|
|
59
58
|
});
|
|
60
59
|
} else {
|
|
61
60
|
btnRef.current.blur();
|
|
@@ -19,7 +19,6 @@ import { Box } from '@atlaskit/primitives/box';
|
|
|
19
19
|
import { Inline } from '@atlaskit/primitives/inline';
|
|
20
20
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
21
21
|
import { xcss } from '@atlaskit/primitives/xcss/xcss';
|
|
22
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
23
22
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
24
23
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, editorAnalyticsChannel, EVENT_TYPE } from '../../analytics';
|
|
25
24
|
import { colorPickerButtonMessages } from '../../messages/color-picker-button';
|
|
@@ -268,7 +267,7 @@ var ColorPickerButton = function ColorPickerButton(props) {
|
|
|
268
267
|
ref: buttonRef,
|
|
269
268
|
"aria-label": title,
|
|
270
269
|
"aria-expanded": props.isAriaExpanded ? isPopupOpen : undefined,
|
|
271
|
-
spacing:
|
|
270
|
+
spacing: "default",
|
|
272
271
|
onClick: togglePopup,
|
|
273
272
|
onKeyDown: onKeyDown,
|
|
274
273
|
"data-selected-color": props.currentColor,
|
|
@@ -10,7 +10,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
10
10
|
import _extends from "@babel/runtime/helpers/extends";
|
|
11
11
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
12
12
|
var _excluded = ["children"];
|
|
13
|
-
var _templateObject, _templateObject2
|
|
13
|
+
var _templateObject, _templateObject2;
|
|
14
14
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15
15
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16
16
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
@@ -30,7 +30,6 @@ import CustomItem from '@atlaskit/menu/custom-item';
|
|
|
30
30
|
import MenuGroup from '@atlaskit/menu/menu-group';
|
|
31
31
|
import Section from '@atlaskit/menu/section';
|
|
32
32
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
33
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
34
33
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
35
34
|
import { DropdownMenuSharedCssClassName } from '../../styles';
|
|
36
35
|
import { KeyDownHandlerContext } from '../../ui-menu/ToolbarArrowKeyNavigationProvider';
|
|
@@ -52,22 +51,14 @@ var focusedMenuItemStyle = css({
|
|
|
52
51
|
});
|
|
53
52
|
var buttonStyles = function buttonStyles(isActive, submenuActive) {
|
|
54
53
|
if (isActive) {
|
|
55
|
-
if (editorExperiment('platform_editor_controls', 'variant1')) {
|
|
56
|
-
/**
|
|
57
|
-
* Hack for item to imitate old dropdown-menu selected styles
|
|
58
|
-
*/
|
|
59
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
60
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t\t\t\tposition: relative;\n\t\t\t\t&::before {\n\t\t\t\t\tdisplay: block;\n\t\t\t\t\theight: 100%;\n\t\t\t\t\twidth: 2px;\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\tleft: 0;\n\t\t\t\t\ttop: 0;\n\t\t\t\t\tbackground: ", ";\n\t\t\t\t\tcontent: '';\n\t\t\t\t}\n\t\t\t\t> span,\n\t\t\t\t> span:hover,\n\t\t\t\t> span:active {\n\t\t\t\t\tbackground: ", ";\n\t\t\t\t\tcolor: ", ";\n\t\t\t\t}\n\t\t\t\t:focus > span[aria-disabled='false'] {\n\t\t\t\t\t", ";\n\t\t\t\t}\n\t\t\t\t:focus-visible,\n\t\t\t\t:focus-visible > span[aria-disabled='false'] {\n\t\t\t\t\toutline: none;\n\t\t\t\t}\n\t\t\t"])), "var(--ds-border-selected, #1868DB)", "var(--ds-background-selected, #E9F2FE)", "var(--ds-text-selected, #1868DB)", focusedMenuItemStyle);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
54
|
/**
|
|
64
55
|
* Hack for item to imitate old dropdown-menu selected styles
|
|
65
56
|
*/
|
|
66
57
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
67
|
-
return css(
|
|
58
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t\t\tposition: relative;\n\t\t\t&::before {\n\t\t\t\tdisplay: block;\n\t\t\t\theight: 100%;\n\t\t\t\twidth: 2px;\n\t\t\t\tposition: absolute;\n\t\t\t\tleft: 0;\n\t\t\t\ttop: 0;\n\t\t\t\tbackground: ", ";\n\t\t\t\tcontent: '';\n\t\t\t}\n\t\t\t> span,\n\t\t\t> span:hover,\n\t\t\t> span:active {\n\t\t\t\tbackground: ", ";\n\t\t\t\tcolor: ", ";\n\t\t\t}\n\t\t\t:focus > span[aria-disabled='false'] {\n\t\t\t\t", ";\n\t\t\t}\n\t\t\t:focus-visible,\n\t\t\t:focus-visible > span[aria-disabled='false'] {\n\t\t\t\toutline: none;\n\t\t\t}\n\t\t"])), "var(--ds-border-selected, #1868DB)", "var(--ds-background-selected, #E9F2FE)", "var(--ds-text-selected, #1868DB)", focusedMenuItemStyle);
|
|
68
59
|
} else {
|
|
69
60
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
70
|
-
return css(
|
|
61
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\t\t\t> span:hover[aria-disabled='false'] {\n\t\t\t\tcolor: ", ";\n\t\t\t\tbackground-color: ", ";\n\t\t\t}\n\t\t\t", "\n\t\t\t> span[aria-disabled='true'] {\n\t\t\t\tcolor: ", ";\n\t\t\t}\n\t\t\t:focus > span[aria-disabled='false'] {\n\t\t\t\t", ";\n\t\t\t}\n\t\t\t:focus-visible,\n\t\t\t:focus-visible > span[aria-disabled='false'] {\n\t\t\t\toutline: none;\n\t\t\t}\n\t\t"])), "var(--ds-text, #292A2E)", "var(--ds-background-neutral-subtle-hovered, #0515240F)", !submenuActive && "\n\t\t\t\t\t> span:active[aria-disabled='false'] {\n\t\t\t\t\t\tbackground-color: ".concat("var(--ds-background-neutral-subtle-pressed, #0B120E24)", ";\n\t\t\t\t\t}"), "var(--ds-text-disabled, #080F214A)", focusedMenuItemStyle); // The default focus-visible style is removed to ensure consistency across browsers
|
|
71
62
|
}
|
|
72
63
|
};
|
|
73
64
|
var DropListWithOutsideClickTargetRef = function DropListWithOutsideClickTargetRef(props) {
|
|
@@ -10,7 +10,6 @@ var _excluded = ["captureClick", "closeOnTab", "handleBackspaceDeleteKeydown", "
|
|
|
10
10
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
11
11
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12
12
|
import React, { PureComponent, useCallback, useEffect, useRef, useState } from 'react';
|
|
13
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
14
13
|
import { OutsideClickTargetRefContext } from './OutsideClickTargetRefContext';
|
|
15
14
|
import ReactEditorViewContext from './ReactEditorViewContext';
|
|
16
15
|
|
|
@@ -69,7 +68,7 @@ var WithOutsideClick = /*#__PURE__*/function (_PureComponent) {
|
|
|
69
68
|
key: "componentDidMount",
|
|
70
69
|
value: function componentDidMount() {
|
|
71
70
|
if (this.props.handleClickOutside) {
|
|
72
|
-
var options = this.props.captureClick
|
|
71
|
+
var options = this.props.captureClick ? {
|
|
73
72
|
capture: true
|
|
74
73
|
} : false;
|
|
75
74
|
// Ignored via go/ees005
|
|
@@ -94,7 +93,7 @@ var WithOutsideClick = /*#__PURE__*/function (_PureComponent) {
|
|
|
94
93
|
key: "componentWillUnmount",
|
|
95
94
|
value: function componentWillUnmount() {
|
|
96
95
|
if (this.props.handleClickOutside) {
|
|
97
|
-
var options = this.props.captureClick
|
|
96
|
+
var options = this.props.captureClick ? {
|
|
98
97
|
capture: true
|
|
99
98
|
} : false;
|
|
100
99
|
// Ignored via go/ees005
|
|
@@ -150,11 +150,27 @@ type InsertNodeViaExtensionAPIAEP = InsertAEP<undefined, {
|
|
|
150
150
|
type InsertPlaceholderTextAEP = InsertAEP<ACTION_SUBJECT_ID.PLACEHOLDER_TEXT, {
|
|
151
151
|
inputMethod: INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.ELEMENT_BROWSER;
|
|
152
152
|
}, undefined>;
|
|
153
|
-
type FailedToInsertMediaPayload = OperationalAEP<ACTION.FAILED_TO_INSERT, ACTION_SUBJECT.DOCUMENT, ACTION_SUBJECT_ID.MEDIA_INLINE | ACTION_SUBJECT_ID.MEDIA_SINGLE | ACTION_SUBJECT_ID.MEDIA_GROUP, {
|
|
153
|
+
type FailedToInsertMediaPayload = OperationalAEP<ACTION.FAILED_TO_INSERT, ACTION_SUBJECT.DOCUMENT, ACTION_SUBJECT_ID.MEDIA | ACTION_SUBJECT_ID.MEDIA_INLINE | ACTION_SUBJECT_ID.MEDIA_SINGLE | ACTION_SUBJECT_ID.MEDIA_GROUP, {
|
|
154
|
+
/**
|
|
155
|
+
* Whether `allowMediaInlineImages` was set. Only populated when the insertion type could not
|
|
156
|
+
* be determined (`actionSubjectId` is `media`).
|
|
157
|
+
*/
|
|
158
|
+
allowMediaInlineImages?: boolean;
|
|
154
159
|
fileExtension?: string;
|
|
155
160
|
inputMethod?: InputMethodInsertMedia;
|
|
156
161
|
insertMediaVia?: InsertMediaVia;
|
|
162
|
+
/**
|
|
163
|
+
* Value of the `mediaInline` media feature flag. Together with `schemaHasMediaInline` this
|
|
164
|
+
* identifies a flag/schema mismatch. Only populated when the insertion type could not be
|
|
165
|
+
* determined.
|
|
166
|
+
*/
|
|
167
|
+
mediaInlineFlag?: boolean;
|
|
157
168
|
reason?: string;
|
|
169
|
+
/**
|
|
170
|
+
* Whether the editor schema contains the `mediaInline` node. Only populated when the
|
|
171
|
+
* insertion type could not be determined.
|
|
172
|
+
*/
|
|
173
|
+
schemaHasMediaInline?: boolean;
|
|
158
174
|
}>;
|
|
159
175
|
type InsertReferenceSyncedBlockPayload = InsertAEP<ACTION_SUBJECT_ID.SYNCED_BLOCK, {
|
|
160
176
|
blockInstanceId: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
export type EditorAICreditFeatureName = 'blockMenu-askRovo' | 'selectionToolbar-askRovo' | 'selectionToolbar-remix' | 'commentEditor-askRovo' | 'quickInsert-askRovo' | 'elementBrowser-askRovo' | 'panelFloatingToolbar-remix' | 'primaryToolbar-write' | 'mediaFloatingToolbar-editImage' | 'tableFloatingToolbar-remix' | 'smartLinkFloatingToolbar-askRovo' | 'codeBlockFloatingToolbar-remix' | 'imageGenerationMediaInsert' | 'blockControls-remix';
|
|
2
|
+
export type EditorAICreditFeatureName = 'blockMenu-askRovo' | 'blockMenu-remix' | 'selectionToolbar-askRovo' | 'selectionToolbar-remix' | 'commentEditor-askRovo' | 'quickInsert-askRovo' | 'elementBrowser-askRovo' | 'panelFloatingToolbar-remix' | 'primaryToolbar-write' | 'mediaFloatingToolbar-editImage' | 'tableFloatingToolbar-remix' | 'smartLinkFloatingToolbar-askRovo' | 'codeBlockFloatingToolbar-remix' | 'imageGenerationMediaInsert' | 'blockControls-remix';
|
|
3
3
|
export type AICreditCheck = {
|
|
4
4
|
featureName: EditorAICreditFeatureName;
|
|
5
5
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const areToolbarFlagsEnabled: (
|
|
1
|
+
export declare const areToolbarFlagsEnabled: (_isNewToolbarEnabled?: boolean) => boolean;
|
|
@@ -15,5 +15,5 @@ export interface WithOutsideClickProps {
|
|
|
15
15
|
handleKeyDown?: SimpleEventHandler<KeyboardEvent>;
|
|
16
16
|
targetRef?: any;
|
|
17
17
|
}
|
|
18
|
-
export default function withReactEditorViewOuterListeners<P extends
|
|
18
|
+
export default function withReactEditorViewOuterListeners<P extends object>(Component: React.ComponentType<React.PropsWithChildren<P>>): React.ComponentType<React.PropsWithChildren<P & WithOutsideClickProps>>;
|
|
19
19
|
export { OutsideClickTargetRefContext } from './OutsideClickTargetRefContext';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "135.
|
|
3
|
+
"version": "135.3.0",
|
|
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/"
|
|
@@ -54,12 +54,13 @@
|
|
|
54
54
|
"@atlaskit/feature-gate-js-client": "^8.0.0",
|
|
55
55
|
"@atlaskit/icon": "^38.1.0",
|
|
56
56
|
"@atlaskit/link": "^5.1.0",
|
|
57
|
-
"@atlaskit/link-datasource": "^7.
|
|
58
|
-
"@atlaskit/link-picker": "^6.
|
|
57
|
+
"@atlaskit/link-datasource": "^7.14.0",
|
|
58
|
+
"@atlaskit/link-picker": "^6.21.0",
|
|
59
|
+
"@atlaskit/linking-common": "^13.0.0",
|
|
59
60
|
"@atlaskit/logo": "^23.3.0",
|
|
60
61
|
"@atlaskit/media-card": "^82.3.0",
|
|
61
62
|
"@atlaskit/media-client": "^39.4.0",
|
|
62
|
-
"@atlaskit/media-client-react": "^7.
|
|
63
|
+
"@atlaskit/media-client-react": "^7.1.0",
|
|
63
64
|
"@atlaskit/media-common": "^14.7.0",
|
|
64
65
|
"@atlaskit/media-file-preview": "^2.0.0",
|
|
65
66
|
"@atlaskit/media-picker": "^73.3.0",
|
|
@@ -80,8 +81,8 @@
|
|
|
80
81
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
81
82
|
"@atlaskit/react-ufo": "^8.5.0",
|
|
82
83
|
"@atlaskit/section-message": "^10.3.0",
|
|
83
|
-
"@atlaskit/smart-card": "^46.
|
|
84
|
-
"@atlaskit/smart-user-picker": "^12.
|
|
84
|
+
"@atlaskit/smart-card": "^46.17.0",
|
|
85
|
+
"@atlaskit/smart-user-picker": "^12.13.0",
|
|
85
86
|
"@atlaskit/spinner": "^20.4.0",
|
|
86
87
|
"@atlaskit/task-decision": "^21.16.0",
|
|
87
88
|
"@atlaskit/teams-app-config": "^3.1.0",
|