@atlaskit/editor-common 78.10.0 → 78.10.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/extensibility/ExtensionComponent.js +2 -1
- package/dist/cjs/extensibility/MultiBodiedExtension/index.js +21 -7
- package/dist/cjs/extensibility/MultiBodiedExtension/styles.js +17 -4
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/extensibility/ExtensionComponent.js +2 -1
- package/dist/es2019/extensibility/MultiBodiedExtension/index.js +22 -8
- package/dist/es2019/extensibility/MultiBodiedExtension/styles.js +16 -14
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/extensibility/ExtensionComponent.js +2 -1
- package/dist/esm/extensibility/MultiBodiedExtension/index.js +22 -8
- package/dist/esm/extensibility/MultiBodiedExtension/styles.js +17 -3
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/extensibility/MultiBodiedExtension/index.d.ts +1 -0
- package/dist/types/preset/plugin-injection-api.d.ts +1 -1
- package/dist/types/types/feature-flags.d.ts +16 -0
- package/dist/types-ts4.5/extensibility/MultiBodiedExtension/index.d.ts +1 -0
- package/dist/types-ts4.5/preset/plugin-injection-api.d.ts +2 -2
- package/dist/types-ts4.5/types/feature-flags.d.ts +16 -0
- package/package.json +1 -1
- package/tsconfig.json +1 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 78.10.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#77796](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/77796) [`eab996d08513`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/eab996d08513) - Add new statsig experiement for preserve table width, add support for passing through width to create table. Allow tables to be inserted at full width
|
|
8
|
+
|
|
3
9
|
## 78.10.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -208,7 +208,8 @@ var ExtensionComponent = exports.ExtensionComponent = /*#__PURE__*/function (_Co
|
|
|
208
208
|
eventDispatcher: eventDispatcher,
|
|
209
209
|
pluginInjectionApi: pluginInjectionApi,
|
|
210
210
|
editorAppearance: editorAppearance,
|
|
211
|
-
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates
|
|
211
|
+
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates,
|
|
212
|
+
isNodeSelected: selectedNode === node
|
|
212
213
|
});
|
|
213
214
|
}
|
|
214
215
|
var extensionHandlerResult = this.tryExtensionHandler(undefined);
|
|
@@ -19,6 +19,7 @@ var _hooks = require("../../hooks");
|
|
|
19
19
|
var _MultiBodiedExtension = require("../../ui/MultiBodiedExtension");
|
|
20
20
|
var _utils = require("../../utils");
|
|
21
21
|
var _withPluginState = require("../../with-plugin-state");
|
|
22
|
+
var _Lozenge = _interopRequireDefault(require("../Extension/Lozenge"));
|
|
22
23
|
var _actionApi = require("./action-api");
|
|
23
24
|
var _styles = require("./styles");
|
|
24
25
|
var _excluded = ["url"];
|
|
@@ -27,7 +28,10 @@ var _excluded = ["url"];
|
|
|
27
28
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
28
29
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
30
|
// Similar to the one in platform/packages/editor/editor-common/src/extensibility/Extension/Lozenge.tsx
|
|
30
|
-
var getWrapperTitleContent = function getWrapperTitleContent(imageData, title) {
|
|
31
|
+
var getWrapperTitleContent = function getWrapperTitleContent(imageData, title, showMacroInteractionDesignUpdates) {
|
|
32
|
+
if (showMacroInteractionDesignUpdates) {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
31
35
|
if (imageData) {
|
|
32
36
|
var url = imageData.url,
|
|
33
37
|
rest = (0, _objectWithoutProperties2.default)(imageData, _excluded);
|
|
@@ -44,7 +48,8 @@ var getWrapperTitleContent = function getWrapperTitleContent(imageData, title) {
|
|
|
44
48
|
})), title);
|
|
45
49
|
}
|
|
46
50
|
return (0, _react2.jsx)("div", {
|
|
47
|
-
className: "extension-title"
|
|
51
|
+
className: "extension-title",
|
|
52
|
+
"data-testid": 'multiBodiedExtension-default-lozenge'
|
|
48
53
|
}, (0, _react2.jsx)(_file.default, {
|
|
49
54
|
label: title
|
|
50
55
|
}), title);
|
|
@@ -57,7 +62,9 @@ var MultiBodiedExtensionWithWidth = function MultiBodiedExtensionWithWidth(_ref)
|
|
|
57
62
|
editorView = _ref.editorView,
|
|
58
63
|
eventDispatcher = _ref.eventDispatcher,
|
|
59
64
|
widthState = _ref.widthState,
|
|
60
|
-
editorAppearance = _ref.editorAppearance
|
|
65
|
+
editorAppearance = _ref.editorAppearance,
|
|
66
|
+
showMacroInteractionDesignUpdates = _ref.showMacroInteractionDesignUpdates,
|
|
67
|
+
isNodeSelected = _ref.isNodeSelected;
|
|
61
68
|
var _node$attrs = node.attrs,
|
|
62
69
|
parameters = _node$attrs.parameters,
|
|
63
70
|
extensionKey = _node$attrs.extensionKey;
|
|
@@ -108,13 +115,20 @@ var MultiBodiedExtensionWithWidth = function MultiBodiedExtensionWithWidth(_ref)
|
|
|
108
115
|
breakoutStyles = (0, _extends2.default)({}, ((0, _objectDestructuringEmpty2.default)(_calculateBreakoutSty), _calculateBreakoutSty));
|
|
109
116
|
mbeWrapperStyles = breakoutStyles;
|
|
110
117
|
}
|
|
111
|
-
var wrapperClassNames = (0, _classnames.default)('multiBodiedExtension--wrapper', 'extension-container', 'block'
|
|
112
|
-
|
|
118
|
+
var wrapperClassNames = (0, _classnames.default)('multiBodiedExtension--wrapper', 'extension-container', 'block', {
|
|
119
|
+
'remove-margin-top': showMacroInteractionDesignUpdates
|
|
120
|
+
});
|
|
121
|
+
return (0, _react2.jsx)(_react.Fragment, null, showMacroInteractionDesignUpdates && (0, _react2.jsx)(_Lozenge.default, {
|
|
122
|
+
isNodeSelected: isNodeSelected,
|
|
123
|
+
node: node,
|
|
124
|
+
showMacroInteractionDesignUpdates: true,
|
|
125
|
+
customContainerStyles: mbeWrapperStyles
|
|
126
|
+
}), (0, _react2.jsx)("div", {
|
|
113
127
|
className: wrapperClassNames,
|
|
114
128
|
css: _styles.mbeExtensionWrapperCSS,
|
|
115
129
|
"data-testid": "multiBodiedExtension--wrapper",
|
|
116
130
|
style: mbeWrapperStyles
|
|
117
|
-
}, getWrapperTitleContent(imageData, title), (0, _react2.jsx)("div", {
|
|
131
|
+
}, getWrapperTitleContent(imageData, title, showMacroInteractionDesignUpdates), (0, _react2.jsx)("div", {
|
|
118
132
|
className: "multiBodiedExtension--container",
|
|
119
133
|
css: containerCssExtended,
|
|
120
134
|
"data-testid": "multiBodiedExtension--container",
|
|
@@ -127,7 +141,7 @@ var MultiBodiedExtensionWithWidth = function MultiBodiedExtensionWithWidth(_ref)
|
|
|
127
141
|
className: "multiBodiedExtension--frames",
|
|
128
142
|
"data-testid": "multiBodiedExtension--frames",
|
|
129
143
|
ref: articleRef
|
|
130
|
-
})));
|
|
144
|
+
}))));
|
|
131
145
|
};
|
|
132
146
|
var MultiBodiedExtensionWithSharedState = function MultiBodiedExtensionWithSharedState(props) {
|
|
133
147
|
var pluginInjectionApi = props.pluginInjectionApi;
|
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.mbeExtensionWrapperCSS = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
7
|
var _react = require("@emotion/react");
|
|
10
8
|
var _styles = require("../Extension/styles");
|
|
11
|
-
var _templateObject;
|
|
12
9
|
// Wrapper the extension title and extensionContainer
|
|
13
|
-
var mbeExtensionWrapperCSS = exports.mbeExtensionWrapperCSS = (0, _react.css)(
|
|
10
|
+
var mbeExtensionWrapperCSS = exports.mbeExtensionWrapperCSS = (0, _react.css)(_styles.wrapperDefault, {
|
|
11
|
+
'&.remove-margin-top': {
|
|
12
|
+
marginTop: 0
|
|
13
|
+
},
|
|
14
|
+
cursor: 'pointer',
|
|
15
|
+
marginTop: "var(--ds-space-250, 24px)",
|
|
16
|
+
marginBottom: "var(--ds-space-200, 16px)",
|
|
17
|
+
'.extension-title': {
|
|
18
|
+
display: 'flex',
|
|
19
|
+
alignItems: 'center',
|
|
20
|
+
lineHeight: '16px !important',
|
|
21
|
+
marginBottom: "var(--ds-space-100, 8px)",
|
|
22
|
+
marginLeft: "var(--ds-space-050, 4px)".concat(" !important"),
|
|
23
|
+
marginRight: "var(--ds-space-100, 8px)",
|
|
24
|
+
paddingTop: "var(--ds-space-100, 8px)".concat(" !important")
|
|
25
|
+
}
|
|
26
|
+
});
|
|
@@ -16,7 +16,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
17
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
18
18
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
19
|
-
var packageVersion = "78.10.
|
|
19
|
+
var packageVersion = "78.10.1";
|
|
20
20
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
21
21
|
// Remove URL as it has UGC
|
|
22
22
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -22,7 +22,7 @@ var _templateObject, _templateObject2, _templateObject3;
|
|
|
22
22
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
23
23
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /** @jsx jsx */
|
|
24
24
|
var packageName = "@atlaskit/editor-common";
|
|
25
|
-
var packageVersion = "78.10.
|
|
25
|
+
var packageVersion = "78.10.1";
|
|
26
26
|
var halfFocusRing = 1;
|
|
27
27
|
var dropOffset = '0, 8';
|
|
28
28
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -163,7 +163,8 @@ export class ExtensionComponent extends Component {
|
|
|
163
163
|
eventDispatcher: eventDispatcher,
|
|
164
164
|
pluginInjectionApi: pluginInjectionApi,
|
|
165
165
|
editorAppearance: editorAppearance,
|
|
166
|
-
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates
|
|
166
|
+
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates,
|
|
167
|
+
isNodeSelected: selectedNode === node
|
|
167
168
|
});
|
|
168
169
|
}
|
|
169
170
|
const extensionHandlerResult = this.tryExtensionHandler(undefined);
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
/* eslint-disable @atlaskit/design-system/prefer-primitives */
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
|
|
5
|
-
import React, { useState } from 'react';
|
|
5
|
+
import React, { Fragment, useState } from 'react';
|
|
6
6
|
import { css, jsx } from '@emotion/react';
|
|
7
7
|
import classnames from 'classnames';
|
|
8
8
|
import EditorFileIcon from '@atlaskit/icon/glyph/editor/file';
|
|
@@ -10,10 +10,14 @@ import { useSharedPluginState } from '../../hooks';
|
|
|
10
10
|
import { sharedMultiBodiedExtensionStyles } from '../../ui/MultiBodiedExtension';
|
|
11
11
|
import { calculateBreakoutStyles, getExtensionLozengeData } from '../../utils';
|
|
12
12
|
import { WithPluginState } from '../../with-plugin-state';
|
|
13
|
+
import ExtensionLozenge from '../Extension/Lozenge';
|
|
13
14
|
import { useMultiBodiedExtensionActions } from './action-api';
|
|
14
15
|
import { mbeExtensionWrapperCSS } from './styles';
|
|
15
16
|
// Similar to the one in platform/packages/editor/editor-common/src/extensibility/Extension/Lozenge.tsx
|
|
16
|
-
const getWrapperTitleContent = (imageData, title) => {
|
|
17
|
+
const getWrapperTitleContent = (imageData, title, showMacroInteractionDesignUpdates) => {
|
|
18
|
+
if (showMacroInteractionDesignUpdates) {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
17
21
|
if (imageData) {
|
|
18
22
|
const {
|
|
19
23
|
url,
|
|
@@ -32,7 +36,8 @@ const getWrapperTitleContent = (imageData, title) => {
|
|
|
32
36
|
})), title);
|
|
33
37
|
}
|
|
34
38
|
return jsx("div", {
|
|
35
|
-
className: "extension-title"
|
|
39
|
+
className: "extension-title",
|
|
40
|
+
"data-testid": 'multiBodiedExtension-default-lozenge'
|
|
36
41
|
}, jsx(EditorFileIcon, {
|
|
37
42
|
label: title
|
|
38
43
|
}), title);
|
|
@@ -45,7 +50,9 @@ const MultiBodiedExtensionWithWidth = ({
|
|
|
45
50
|
editorView,
|
|
46
51
|
eventDispatcher,
|
|
47
52
|
widthState,
|
|
48
|
-
editorAppearance
|
|
53
|
+
editorAppearance,
|
|
54
|
+
showMacroInteractionDesignUpdates,
|
|
55
|
+
isNodeSelected
|
|
49
56
|
}) => {
|
|
50
57
|
const {
|
|
51
58
|
parameters,
|
|
@@ -98,13 +105,20 @@ const MultiBodiedExtensionWithWidth = ({
|
|
|
98
105
|
});
|
|
99
106
|
mbeWrapperStyles = breakoutStyles;
|
|
100
107
|
}
|
|
101
|
-
const wrapperClassNames = classnames('multiBodiedExtension--wrapper', 'extension-container', 'block'
|
|
102
|
-
|
|
108
|
+
const wrapperClassNames = classnames('multiBodiedExtension--wrapper', 'extension-container', 'block', {
|
|
109
|
+
'remove-margin-top': showMacroInteractionDesignUpdates
|
|
110
|
+
});
|
|
111
|
+
return jsx(Fragment, null, showMacroInteractionDesignUpdates && jsx(ExtensionLozenge, {
|
|
112
|
+
isNodeSelected: isNodeSelected,
|
|
113
|
+
node: node,
|
|
114
|
+
showMacroInteractionDesignUpdates: true,
|
|
115
|
+
customContainerStyles: mbeWrapperStyles
|
|
116
|
+
}), jsx("div", {
|
|
103
117
|
className: wrapperClassNames,
|
|
104
118
|
css: mbeExtensionWrapperCSS,
|
|
105
119
|
"data-testid": "multiBodiedExtension--wrapper",
|
|
106
120
|
style: mbeWrapperStyles
|
|
107
|
-
}, getWrapperTitleContent(imageData, title), jsx("div", {
|
|
121
|
+
}, getWrapperTitleContent(imageData, title, showMacroInteractionDesignUpdates), jsx("div", {
|
|
108
122
|
className: "multiBodiedExtension--container",
|
|
109
123
|
css: containerCssExtended,
|
|
110
124
|
"data-testid": "multiBodiedExtension--container",
|
|
@@ -117,7 +131,7 @@ const MultiBodiedExtensionWithWidth = ({
|
|
|
117
131
|
className: "multiBodiedExtension--frames",
|
|
118
132
|
"data-testid": "multiBodiedExtension--frames",
|
|
119
133
|
ref: articleRef
|
|
120
|
-
})));
|
|
134
|
+
}))));
|
|
121
135
|
};
|
|
122
136
|
const MultiBodiedExtensionWithSharedState = props => {
|
|
123
137
|
const {
|
|
@@ -2,18 +2,20 @@ import { css } from '@emotion/react';
|
|
|
2
2
|
import { wrapperDefault } from '../Extension/styles';
|
|
3
3
|
|
|
4
4
|
// Wrapper the extension title and extensionContainer
|
|
5
|
-
export const mbeExtensionWrapperCSS = css
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
5
|
+
export const mbeExtensionWrapperCSS = css(wrapperDefault, {
|
|
6
|
+
'&.remove-margin-top': {
|
|
7
|
+
marginTop: 0
|
|
8
|
+
},
|
|
9
|
+
cursor: 'pointer',
|
|
10
|
+
marginTop: "var(--ds-space-250, 24px)",
|
|
11
|
+
marginBottom: "var(--ds-space-200, 16px)",
|
|
12
|
+
'.extension-title': {
|
|
13
|
+
display: 'flex',
|
|
14
|
+
alignItems: 'center',
|
|
15
|
+
lineHeight: '16px !important',
|
|
16
|
+
marginBottom: "var(--ds-space-100, 8px)",
|
|
17
|
+
marginLeft: `${"var(--ds-space-050, 4px)"} !important`,
|
|
18
|
+
marginRight: "var(--ds-space-100, 8px)",
|
|
19
|
+
paddingTop: `${"var(--ds-space-100, 8px)"} !important`
|
|
18
20
|
}
|
|
19
|
-
|
|
21
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
2
2
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
3
|
-
const packageVersion = "78.10.
|
|
3
|
+
const packageVersion = "78.10.1";
|
|
4
4
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
5
5
|
// Remove URL as it has UGC
|
|
6
6
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -7,7 +7,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
|
|
|
7
7
|
import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
8
8
|
import Layer from '../Layer';
|
|
9
9
|
const packageName = "@atlaskit/editor-common";
|
|
10
|
-
const packageVersion = "78.10.
|
|
10
|
+
const packageVersion = "78.10.1";
|
|
11
11
|
const halfFocusRing = 1;
|
|
12
12
|
const dropOffset = '0, 8';
|
|
13
13
|
class DropList extends Component {
|
|
@@ -198,7 +198,8 @@ export var ExtensionComponent = /*#__PURE__*/function (_Component) {
|
|
|
198
198
|
eventDispatcher: eventDispatcher,
|
|
199
199
|
pluginInjectionApi: pluginInjectionApi,
|
|
200
200
|
editorAppearance: editorAppearance,
|
|
201
|
-
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates
|
|
201
|
+
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates,
|
|
202
|
+
isNodeSelected: selectedNode === node
|
|
202
203
|
});
|
|
203
204
|
}
|
|
204
205
|
var extensionHandlerResult = this.tryExtensionHandler(undefined);
|
|
@@ -7,7 +7,7 @@ var _excluded = ["url"];
|
|
|
7
7
|
/* eslint-disable @atlaskit/design-system/prefer-primitives */
|
|
8
8
|
/** @jsx jsx */
|
|
9
9
|
|
|
10
|
-
import React, { useState } from 'react';
|
|
10
|
+
import React, { Fragment, useState } from 'react';
|
|
11
11
|
import { css, jsx } from '@emotion/react';
|
|
12
12
|
import classnames from 'classnames';
|
|
13
13
|
import EditorFileIcon from '@atlaskit/icon/glyph/editor/file';
|
|
@@ -15,10 +15,14 @@ import { useSharedPluginState } from '../../hooks';
|
|
|
15
15
|
import { sharedMultiBodiedExtensionStyles } from '../../ui/MultiBodiedExtension';
|
|
16
16
|
import { calculateBreakoutStyles, getExtensionLozengeData } from '../../utils';
|
|
17
17
|
import { WithPluginState } from '../../with-plugin-state';
|
|
18
|
+
import ExtensionLozenge from '../Extension/Lozenge';
|
|
18
19
|
import { useMultiBodiedExtensionActions } from './action-api';
|
|
19
20
|
import { mbeExtensionWrapperCSS } from './styles';
|
|
20
21
|
// Similar to the one in platform/packages/editor/editor-common/src/extensibility/Extension/Lozenge.tsx
|
|
21
|
-
var getWrapperTitleContent = function getWrapperTitleContent(imageData, title) {
|
|
22
|
+
var getWrapperTitleContent = function getWrapperTitleContent(imageData, title, showMacroInteractionDesignUpdates) {
|
|
23
|
+
if (showMacroInteractionDesignUpdates) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
22
26
|
if (imageData) {
|
|
23
27
|
var url = imageData.url,
|
|
24
28
|
rest = _objectWithoutProperties(imageData, _excluded);
|
|
@@ -35,7 +39,8 @@ var getWrapperTitleContent = function getWrapperTitleContent(imageData, title) {
|
|
|
35
39
|
})), title);
|
|
36
40
|
}
|
|
37
41
|
return jsx("div", {
|
|
38
|
-
className: "extension-title"
|
|
42
|
+
className: "extension-title",
|
|
43
|
+
"data-testid": 'multiBodiedExtension-default-lozenge'
|
|
39
44
|
}, jsx(EditorFileIcon, {
|
|
40
45
|
label: title
|
|
41
46
|
}), title);
|
|
@@ -48,7 +53,9 @@ var MultiBodiedExtensionWithWidth = function MultiBodiedExtensionWithWidth(_ref)
|
|
|
48
53
|
editorView = _ref.editorView,
|
|
49
54
|
eventDispatcher = _ref.eventDispatcher,
|
|
50
55
|
widthState = _ref.widthState,
|
|
51
|
-
editorAppearance = _ref.editorAppearance
|
|
56
|
+
editorAppearance = _ref.editorAppearance,
|
|
57
|
+
showMacroInteractionDesignUpdates = _ref.showMacroInteractionDesignUpdates,
|
|
58
|
+
isNodeSelected = _ref.isNodeSelected;
|
|
52
59
|
var _node$attrs = node.attrs,
|
|
53
60
|
parameters = _node$attrs.parameters,
|
|
54
61
|
extensionKey = _node$attrs.extensionKey;
|
|
@@ -99,13 +106,20 @@ var MultiBodiedExtensionWithWidth = function MultiBodiedExtensionWithWidth(_ref)
|
|
|
99
106
|
breakoutStyles = _extends({}, (_objectDestructuringEmpty(_calculateBreakoutSty), _calculateBreakoutSty));
|
|
100
107
|
mbeWrapperStyles = breakoutStyles;
|
|
101
108
|
}
|
|
102
|
-
var wrapperClassNames = classnames('multiBodiedExtension--wrapper', 'extension-container', 'block'
|
|
103
|
-
|
|
109
|
+
var wrapperClassNames = classnames('multiBodiedExtension--wrapper', 'extension-container', 'block', {
|
|
110
|
+
'remove-margin-top': showMacroInteractionDesignUpdates
|
|
111
|
+
});
|
|
112
|
+
return jsx(Fragment, null, showMacroInteractionDesignUpdates && jsx(ExtensionLozenge, {
|
|
113
|
+
isNodeSelected: isNodeSelected,
|
|
114
|
+
node: node,
|
|
115
|
+
showMacroInteractionDesignUpdates: true,
|
|
116
|
+
customContainerStyles: mbeWrapperStyles
|
|
117
|
+
}), jsx("div", {
|
|
104
118
|
className: wrapperClassNames,
|
|
105
119
|
css: mbeExtensionWrapperCSS,
|
|
106
120
|
"data-testid": "multiBodiedExtension--wrapper",
|
|
107
121
|
style: mbeWrapperStyles
|
|
108
|
-
}, getWrapperTitleContent(imageData, title), jsx("div", {
|
|
122
|
+
}, getWrapperTitleContent(imageData, title, showMacroInteractionDesignUpdates), jsx("div", {
|
|
109
123
|
className: "multiBodiedExtension--container",
|
|
110
124
|
css: containerCssExtended,
|
|
111
125
|
"data-testid": "multiBodiedExtension--container",
|
|
@@ -118,7 +132,7 @@ var MultiBodiedExtensionWithWidth = function MultiBodiedExtensionWithWidth(_ref)
|
|
|
118
132
|
className: "multiBodiedExtension--frames",
|
|
119
133
|
"data-testid": "multiBodiedExtension--frames",
|
|
120
134
|
ref: articleRef
|
|
121
|
-
})));
|
|
135
|
+
}))));
|
|
122
136
|
};
|
|
123
137
|
var MultiBodiedExtensionWithSharedState = function MultiBodiedExtensionWithSharedState(props) {
|
|
124
138
|
var pluginInjectionApi = props.pluginInjectionApi;
|
|
@@ -1,7 +1,21 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject;
|
|
3
1
|
import { css } from '@emotion/react';
|
|
4
2
|
import { wrapperDefault } from '../Extension/styles';
|
|
5
3
|
|
|
6
4
|
// Wrapper the extension title and extensionContainer
|
|
7
|
-
export var mbeExtensionWrapperCSS = css(
|
|
5
|
+
export var mbeExtensionWrapperCSS = css(wrapperDefault, {
|
|
6
|
+
'&.remove-margin-top': {
|
|
7
|
+
marginTop: 0
|
|
8
|
+
},
|
|
9
|
+
cursor: 'pointer',
|
|
10
|
+
marginTop: "var(--ds-space-250, 24px)",
|
|
11
|
+
marginBottom: "var(--ds-space-200, 16px)",
|
|
12
|
+
'.extension-title': {
|
|
13
|
+
display: 'flex',
|
|
14
|
+
alignItems: 'center',
|
|
15
|
+
lineHeight: '16px !important',
|
|
16
|
+
marginBottom: "var(--ds-space-100, 8px)",
|
|
17
|
+
marginLeft: "var(--ds-space-050, 4px)".concat(" !important"),
|
|
18
|
+
marginRight: "var(--ds-space-100, 8px)",
|
|
19
|
+
paddingTop: "var(--ds-space-100, 8px)".concat(" !important")
|
|
20
|
+
}
|
|
21
|
+
});
|
|
@@ -6,7 +6,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
6
6
|
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; }
|
|
7
7
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
8
8
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
9
|
-
var packageVersion = "78.10.
|
|
9
|
+
var packageVersion = "78.10.1";
|
|
10
10
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
11
11
|
// Remove URL as it has UGC
|
|
12
12
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -17,7 +17,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
|
|
|
17
17
|
import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
18
18
|
import Layer from '../Layer';
|
|
19
19
|
var packageName = "@atlaskit/editor-common";
|
|
20
|
-
var packageVersion = "78.10.
|
|
20
|
+
var packageVersion = "78.10.1";
|
|
21
21
|
var halfFocusRing = 1;
|
|
22
22
|
var dropOffset = '0, 8';
|
|
23
23
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -19,6 +19,7 @@ type Props = {
|
|
|
19
19
|
pluginInjectionApi?: ExtensionsPluginInjectionAPI;
|
|
20
20
|
editorAppearance?: EditorAppearance;
|
|
21
21
|
showMacroInteractionDesignUpdates?: boolean;
|
|
22
|
+
isNodeSelected?: boolean;
|
|
22
23
|
};
|
|
23
24
|
declare const MultiBodiedExtension: (props: Props & OverflowShadowProps) => jsx.JSX.Element;
|
|
24
25
|
/**
|
|
@@ -39,7 +39,7 @@ export declare class EditorPluginInjectionAPI implements PluginInjectionAPIDefin
|
|
|
39
39
|
private commandsAPI;
|
|
40
40
|
private plugins;
|
|
41
41
|
constructor({ getEditorState, getEditorView }: PluginInjectionAPIProps);
|
|
42
|
-
api<T extends NextEditorPlugin<any, any>>(): import("../types/next-editor-plugin").PublicPluginAPI<[NextEditorPlugin<T extends import("../types/next-editor-plugin").NextEditorPluginFunctionOptionalConfigDefinition<infer Name extends string, any, any> ? Name : never, T extends NextEditorPlugin<any, infer
|
|
42
|
+
api<T extends NextEditorPlugin<any, any>>(): import("../types/next-editor-plugin").PublicPluginAPI<[NextEditorPlugin<T extends import("../types/next-editor-plugin").NextEditorPluginFunctionOptionalConfigDefinition<infer Name extends string, any, any> ? Name : never, T extends NextEditorPlugin<any, infer Metadata_1 extends import("../types/next-editor-plugin").NextEditorPluginMetadata> ? Metadata_1 : never>, ..."dependencies" extends keyof (T extends NextEditorPlugin<any, infer Metadata_1 extends import("../types/next-editor-plugin").NextEditorPluginMetadata> ? Metadata_1 : never) ? (T extends NextEditorPlugin<any, infer Metadata_1 extends import("../types/next-editor-plugin").NextEditorPluginMetadata> ? Metadata_1 : never)["dependencies"] extends (import("../types/next-editor-plugin").NextEditorPluginFunctionOptionalConfigDefinition<any, any, any> | import("../types/next-editor-plugin").OptionalPlugin<import("../types/next-editor-plugin").NextEditorPluginFunctionOptionalConfigDefinition<any, any, any>>)[] ? Exclude<(T extends NextEditorPlugin<any, infer Metadata_1 extends import("../types/next-editor-plugin").NextEditorPluginMetadata> ? Metadata_1 : never)["dependencies"], undefined> : [] : []]>;
|
|
43
43
|
onEditorViewUpdated: ({ newEditorState, oldEditorState, }: EditorStateDiff) => void;
|
|
44
44
|
onEditorPluginInitialized: (plugin: NextEditorPluginInitializedType) => void;
|
|
45
45
|
private addPlugin;
|
|
@@ -211,6 +211,14 @@ export type FeatureFlags = {
|
|
|
211
211
|
* @default false
|
|
212
212
|
*/
|
|
213
213
|
tableSelector?: boolean;
|
|
214
|
+
/**
|
|
215
|
+
* @description
|
|
216
|
+
* Enables table to scale in the same way as renderer
|
|
217
|
+
*
|
|
218
|
+
* @see https://product-fabric.atlassian.net/browse/ED-22364
|
|
219
|
+
* @default false
|
|
220
|
+
*/
|
|
221
|
+
tablePreserveWidth?: boolean;
|
|
214
222
|
/**
|
|
215
223
|
* @description
|
|
216
224
|
* Enables commenting on media
|
|
@@ -219,6 +227,14 @@ export type FeatureFlags = {
|
|
|
219
227
|
* @default false
|
|
220
228
|
*/
|
|
221
229
|
commentsOnMedia?: boolean;
|
|
230
|
+
/**
|
|
231
|
+
* @description
|
|
232
|
+
* Enables macro interaction visual updates
|
|
233
|
+
*
|
|
234
|
+
* @see https://product-fabric.atlassian.net/browse/PGXT-4910
|
|
235
|
+
* @default false
|
|
236
|
+
*/
|
|
237
|
+
macroInteractionUpdates?: boolean;
|
|
222
238
|
};
|
|
223
239
|
export type FeatureFlagKey = keyof FeatureFlags;
|
|
224
240
|
export type GetEditorFeatureFlags = () => FeatureFlags;
|
|
@@ -19,6 +19,7 @@ type Props = {
|
|
|
19
19
|
pluginInjectionApi?: ExtensionsPluginInjectionAPI;
|
|
20
20
|
editorAppearance?: EditorAppearance;
|
|
21
21
|
showMacroInteractionDesignUpdates?: boolean;
|
|
22
|
+
isNodeSelected?: boolean;
|
|
22
23
|
};
|
|
23
24
|
declare const MultiBodiedExtension: (props: Props & OverflowShadowProps) => jsx.JSX.Element;
|
|
24
25
|
/**
|
|
@@ -40,8 +40,8 @@ export declare class EditorPluginInjectionAPI implements PluginInjectionAPIDefin
|
|
|
40
40
|
private plugins;
|
|
41
41
|
constructor({ getEditorState, getEditorView }: PluginInjectionAPIProps);
|
|
42
42
|
api<T extends NextEditorPlugin<any, any>>(): import("../types/next-editor-plugin").PublicPluginAPI<[
|
|
43
|
-
NextEditorPlugin<T extends import("../types/next-editor-plugin").NextEditorPluginFunctionOptionalConfigDefinition<infer Name extends string, any, any> ? Name : never, T extends NextEditorPlugin<any, infer
|
|
44
|
-
..."dependencies" extends keyof (T extends NextEditorPlugin<any, infer
|
|
43
|
+
NextEditorPlugin<T extends import("../types/next-editor-plugin").NextEditorPluginFunctionOptionalConfigDefinition<infer Name extends string, any, any> ? Name : never, T extends NextEditorPlugin<any, infer Metadata_1 extends import("../types/next-editor-plugin").NextEditorPluginMetadata> ? Metadata_1 : never>,
|
|
44
|
+
..."dependencies" extends keyof (T extends NextEditorPlugin<any, infer Metadata_1 extends import("../types/next-editor-plugin").NextEditorPluginMetadata> ? Metadata_1 : never) ? (T extends NextEditorPlugin<any, infer Metadata_1 extends import("../types/next-editor-plugin").NextEditorPluginMetadata> ? Metadata_1 : never)["dependencies"] extends (import("../types/next-editor-plugin").NextEditorPluginFunctionOptionalConfigDefinition<any, any, any> | import("../types/next-editor-plugin").OptionalPlugin<import("../types/next-editor-plugin").NextEditorPluginFunctionOptionalConfigDefinition<any, any, any>>)[] ? Exclude<(T extends NextEditorPlugin<any, infer Metadata_1 extends import("../types/next-editor-plugin").NextEditorPluginMetadata> ? Metadata_1 : never)["dependencies"], undefined> : [
|
|
45
45
|
] : [
|
|
46
46
|
]
|
|
47
47
|
]>;
|
|
@@ -211,6 +211,14 @@ export type FeatureFlags = {
|
|
|
211
211
|
* @default false
|
|
212
212
|
*/
|
|
213
213
|
tableSelector?: boolean;
|
|
214
|
+
/**
|
|
215
|
+
* @description
|
|
216
|
+
* Enables table to scale in the same way as renderer
|
|
217
|
+
*
|
|
218
|
+
* @see https://product-fabric.atlassian.net/browse/ED-22364
|
|
219
|
+
* @default false
|
|
220
|
+
*/
|
|
221
|
+
tablePreserveWidth?: boolean;
|
|
214
222
|
/**
|
|
215
223
|
* @description
|
|
216
224
|
* Enables commenting on media
|
|
@@ -219,6 +227,14 @@ export type FeatureFlags = {
|
|
|
219
227
|
* @default false
|
|
220
228
|
*/
|
|
221
229
|
commentsOnMedia?: boolean;
|
|
230
|
+
/**
|
|
231
|
+
* @description
|
|
232
|
+
* Enables macro interaction visual updates
|
|
233
|
+
*
|
|
234
|
+
* @see https://product-fabric.atlassian.net/browse/PGXT-4910
|
|
235
|
+
* @default false
|
|
236
|
+
*/
|
|
237
|
+
macroInteractionUpdates?: boolean;
|
|
222
238
|
};
|
|
223
239
|
export type FeatureFlagKey = keyof FeatureFlags;
|
|
224
240
|
export type GetEditorFeatureFlags = () => FeatureFlags;
|
package/package.json
CHANGED
package/tsconfig.json
CHANGED
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
"extends": "../../../tsconfig.json",
|
|
3
3
|
"compilerOptions": {
|
|
4
4
|
"baseUrl": "./",
|
|
5
|
-
"types": [
|
|
6
|
-
"cypress"
|
|
7
|
-
]
|
|
8
5
|
},
|
|
9
6
|
"include": [
|
|
10
7
|
"src/**/*.ts",
|
|
@@ -20,4 +17,4 @@
|
|
|
20
17
|
"src/json-schema",
|
|
21
18
|
"../editor-common-tests/src/__tests_external__"
|
|
22
19
|
]
|
|
23
|
-
}
|
|
20
|
+
}
|