@atlaskit/editor-common 103.14.0 → 103.16.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 +28 -0
- package/dist/cjs/card/MediaAndEmbedsToolbar/index.js +4 -0
- package/dist/cjs/extensions/messages.js +5 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/MediaSingle/index.js +2 -1
- package/dist/cjs/ui-menu/Dropdown/index.js +5 -2
- package/dist/es2019/card/MediaAndEmbedsToolbar/index.js +4 -0
- package/dist/es2019/extensions/messages.js +5 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/MediaSingle/index.js +2 -1
- package/dist/es2019/ui-menu/Dropdown/index.js +4 -2
- package/dist/esm/card/MediaAndEmbedsToolbar/index.js +4 -0
- package/dist/esm/extensions/messages.js +5 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/MediaSingle/index.js +2 -1
- package/dist/esm/ui-menu/Dropdown/index.js +5 -2
- package/dist/types/extensions/messages.d.ts +5 -0
- package/dist/types/extensions/types/extension-handler.d.ts +3 -0
- package/dist/types/extensions/types/field-definitions.d.ts +1 -0
- package/dist/types/extensions.d.ts +1 -1
- package/dist/types/types/floating-toolbar.d.ts +1 -0
- package/dist/types/ui/FloatingToolbar/Separator.d.ts +10 -3
- package/dist/types/ui-menu/Dropdown/index.d.ts +1 -0
- package/dist/types-ts4.5/extensions/messages.d.ts +5 -0
- package/dist/types-ts4.5/extensions/types/extension-handler.d.ts +3 -0
- package/dist/types-ts4.5/extensions/types/field-definitions.d.ts +1 -0
- package/dist/types-ts4.5/extensions.d.ts +1 -1
- package/dist/types-ts4.5/types/floating-toolbar.d.ts +1 -0
- package/dist/types-ts4.5/ui/FloatingToolbar/Separator.d.ts +10 -3
- package/dist/types-ts4.5/ui-menu/Dropdown/index.d.ts +1 -0
- package/package.json +8 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 103.16.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#145243](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/145243)
|
|
8
|
+
[`7d32c3cc54ceb`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7d32c3cc54ceb) -
|
|
9
|
+
Exposes a new getNodeWithPosByLocalId(localId: string) function in the ExtensionAPI
|
|
10
|
+
|
|
11
|
+
## 103.15.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [#145321](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/145321)
|
|
16
|
+
[`2798c91b69bd9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2798c91b69bd9) -
|
|
17
|
+
[ux] ED-27537 Update dropdown to take in shouldFitContainer prop to fix dropdown content not
|
|
18
|
+
fitting for layout dropdown and add vr tests
|
|
19
|
+
|
|
20
|
+
## 103.14.1
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- [#142403](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/142403)
|
|
25
|
+
[`152f0ebf88ba6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/152f0ebf88ba6) -
|
|
26
|
+
[ux] Fix a bug where autosave errors in the config panel would fail silently and prevent closing.
|
|
27
|
+
Additionally add support for disabling unsupported UI elements related to the macro config panel
|
|
28
|
+
while the user is offline, as part of the offline editor experiment.
|
|
29
|
+
- Updated dependencies
|
|
30
|
+
|
|
3
31
|
## 103.14.0
|
|
4
32
|
|
|
5
33
|
### Minor Changes
|
|
@@ -296,6 +296,9 @@ var buildLayoutDropdown = exports.buildLayoutDropdown = function buildLayoutDrop
|
|
|
296
296
|
return [];
|
|
297
297
|
}
|
|
298
298
|
var selectedLayout = getSelectedLayoutIcon(icons, selection.node) || icons[0];
|
|
299
|
+
if (!selectedLayout) {
|
|
300
|
+
return [];
|
|
301
|
+
}
|
|
299
302
|
var alignmentDropdownOptions = mapIconsToDropdownOptions({
|
|
300
303
|
icons: icons,
|
|
301
304
|
layout: layout,
|
|
@@ -311,6 +314,7 @@ var buildLayoutDropdown = exports.buildLayoutDropdown = function buildLayoutDrop
|
|
|
311
314
|
title: intl.formatMessage(layoutToMessages[selectedLayout.value]),
|
|
312
315
|
icon: selectedLayout.icon,
|
|
313
316
|
options: alignmentDropdownOptions,
|
|
317
|
+
shouldFitContainer: false,
|
|
314
318
|
testId: "".concat(nodeType.name, "-layout-dropdown-trigger-button")
|
|
315
319
|
}];
|
|
316
320
|
};
|
|
@@ -40,6 +40,11 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
|
40
40
|
id: 'fabric.editor.extensions.config-panel.save-indicator',
|
|
41
41
|
defaultMessage: 'All changes are always autosaved',
|
|
42
42
|
description: 'Message shown to the user to notify to them that we save the changes automatically.'
|
|
43
|
+
},
|
|
44
|
+
panelLoadingError: {
|
|
45
|
+
id: 'fabric.editor.extensions.config-panel.loading-error.non-final',
|
|
46
|
+
defaultMessage: "We're having a bit of trouble loading the configuration panel. Try refreshing the page.",
|
|
47
|
+
description: 'Error message when loading the configuration panel'
|
|
43
48
|
}
|
|
44
49
|
});
|
|
45
50
|
var configPanelMessages = exports.configPanelMessages = (0, _reactIntlNext.defineMessages)({
|
|
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
17
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
18
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
19
19
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
20
|
-
var packageVersion = "103.
|
|
20
|
+
var packageVersion = "103.16.0";
|
|
21
21
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
22
22
|
// Remove URL as it has UGC
|
|
23
23
|
// 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 = "103.
|
|
26
|
+
var packageVersion = "103.16.0";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = '0, 8';
|
|
29
29
|
// Ignored via go/ees005
|
|
@@ -114,7 +114,8 @@ function MediaSingle(_ref) {
|
|
|
114
114
|
}, {
|
|
115
115
|
"data-width": mediaSingleWidth,
|
|
116
116
|
"data-width-type": (size === null || size === void 0 ? void 0 : size.widthType) || 'percentage',
|
|
117
|
-
"data-node-type": nodeType
|
|
117
|
+
"data-node-type": nodeType,
|
|
118
|
+
"data-vc": "media-single"
|
|
118
119
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
119
120
|
,
|
|
120
121
|
className: (0, _classnames.default)('rich-media-item mediaSingleView-content-wrap', "image-".concat(layout), className, {
|
|
@@ -14,6 +14,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
14
14
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
15
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
18
|
var _uiReact = require("../../ui-react");
|
|
18
19
|
var _DropList = _interopRequireDefault(require("../../ui/DropList"));
|
|
19
20
|
var _Popup = _interopRequireDefault(require("../../ui/Popup"));
|
|
@@ -89,7 +90,9 @@ var Dropdown = exports.Dropdown = /*#__PURE__*/function (_PureComponent) {
|
|
|
89
90
|
forcePlacement = _this$props.forcePlacement,
|
|
90
91
|
alignX = _this$props.alignX,
|
|
91
92
|
alignY = _this$props.alignY,
|
|
92
|
-
offset = _this$props.offset
|
|
93
|
+
offset = _this$props.offset,
|
|
94
|
+
_this$props$shouldFit = _this$props.shouldFitContainer,
|
|
95
|
+
shouldFitContainer = _this$props$shouldFit === void 0 ? true : _this$props$shouldFit;
|
|
93
96
|
return /*#__PURE__*/_react.default.createElement(_Popup.default, {
|
|
94
97
|
target: targetProp !== null && targetProp !== void 0 ? targetProp : alignDropdownWithParentElement ? // Ignored via go/ees005
|
|
95
98
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
@@ -121,7 +124,7 @@ var Dropdown = exports.Dropdown = /*#__PURE__*/function (_PureComponent) {
|
|
|
121
124
|
isOpen: true,
|
|
122
125
|
onOpenChange: onOpenChange,
|
|
123
126
|
position: popupPlacement.join(' '),
|
|
124
|
-
shouldFitContainer: true,
|
|
127
|
+
shouldFitContainer: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_6') ? shouldFitContainer : true,
|
|
125
128
|
id: dropdownListId
|
|
126
129
|
}, children))));
|
|
127
130
|
}
|
|
@@ -291,6 +291,9 @@ export const buildLayoutDropdown = (state, intl, nodeType, widthPluginDependency
|
|
|
291
291
|
return [];
|
|
292
292
|
}
|
|
293
293
|
const selectedLayout = getSelectedLayoutIcon(icons, selection.node) || icons[0];
|
|
294
|
+
if (!selectedLayout) {
|
|
295
|
+
return [];
|
|
296
|
+
}
|
|
294
297
|
const alignmentDropdownOptions = mapIconsToDropdownOptions({
|
|
295
298
|
icons,
|
|
296
299
|
layout,
|
|
@@ -306,6 +309,7 @@ export const buildLayoutDropdown = (state, intl, nodeType, widthPluginDependency
|
|
|
306
309
|
title: intl.formatMessage(layoutToMessages[selectedLayout.value]),
|
|
307
310
|
icon: selectedLayout.icon,
|
|
308
311
|
options: alignmentDropdownOptions,
|
|
312
|
+
shouldFitContainer: false,
|
|
309
313
|
testId: `${nodeType.name}-layout-dropdown-trigger-button`
|
|
310
314
|
}];
|
|
311
315
|
};
|
|
@@ -34,6 +34,11 @@ export const messages = defineMessages({
|
|
|
34
34
|
id: 'fabric.editor.extensions.config-panel.save-indicator',
|
|
35
35
|
defaultMessage: 'All changes are always autosaved',
|
|
36
36
|
description: 'Message shown to the user to notify to them that we save the changes automatically.'
|
|
37
|
+
},
|
|
38
|
+
panelLoadingError: {
|
|
39
|
+
id: 'fabric.editor.extensions.config-panel.loading-error.non-final',
|
|
40
|
+
defaultMessage: "We're having a bit of trouble loading the configuration panel. Try refreshing the page.",
|
|
41
|
+
description: 'Error message when loading the configuration panel'
|
|
37
42
|
}
|
|
38
43
|
});
|
|
39
44
|
export const configPanelMessages = defineMessages({
|
|
@@ -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 = "103.
|
|
4
|
+
const packageVersion = "103.16.0";
|
|
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 = "103.
|
|
16
|
+
const packageVersion = "103.16.0";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
// Ignored via go/ees005
|
|
@@ -99,7 +99,8 @@ export default function MediaSingle({
|
|
|
99
99
|
}, {
|
|
100
100
|
"data-width": mediaSingleWidth,
|
|
101
101
|
"data-width-type": (size === null || size === void 0 ? void 0 : size.widthType) || 'percentage',
|
|
102
|
-
"data-node-type": nodeType
|
|
102
|
+
"data-node-type": nodeType,
|
|
103
|
+
"data-vc": "media-single"
|
|
103
104
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
104
105
|
,
|
|
105
106
|
className: classnames('rich-media-item mediaSingleView-content-wrap', `image-${layout}`, className, {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import React, { PureComponent } from 'react';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
5
|
import { OutsideClickTargetRefContext, withReactEditorViewOuterListeners } from '../../ui-react';
|
|
5
6
|
import DropdownList from '../../ui/DropList';
|
|
6
7
|
import Popup from '../../ui/Popup';
|
|
@@ -65,7 +66,8 @@ export class Dropdown extends PureComponent {
|
|
|
65
66
|
forcePlacement,
|
|
66
67
|
alignX,
|
|
67
68
|
alignY,
|
|
68
|
-
offset
|
|
69
|
+
offset,
|
|
70
|
+
shouldFitContainer = true
|
|
69
71
|
} = this.props;
|
|
70
72
|
return /*#__PURE__*/React.createElement(Popup, {
|
|
71
73
|
target: targetProp !== null && targetProp !== void 0 ? targetProp : alignDropdownWithParentElement ? // Ignored via go/ees005
|
|
@@ -98,7 +100,7 @@ export class Dropdown extends PureComponent {
|
|
|
98
100
|
isOpen: true,
|
|
99
101
|
onOpenChange: onOpenChange,
|
|
100
102
|
position: popupPlacement.join(' '),
|
|
101
|
-
shouldFitContainer: true,
|
|
103
|
+
shouldFitContainer: fg('platform_editor_controls_patch_6') ? shouldFitContainer : true,
|
|
102
104
|
id: dropdownListId
|
|
103
105
|
}, children))));
|
|
104
106
|
}
|
|
@@ -287,6 +287,9 @@ export var buildLayoutDropdown = function buildLayoutDropdown(state, intl, nodeT
|
|
|
287
287
|
return [];
|
|
288
288
|
}
|
|
289
289
|
var selectedLayout = getSelectedLayoutIcon(icons, selection.node) || icons[0];
|
|
290
|
+
if (!selectedLayout) {
|
|
291
|
+
return [];
|
|
292
|
+
}
|
|
290
293
|
var alignmentDropdownOptions = mapIconsToDropdownOptions({
|
|
291
294
|
icons: icons,
|
|
292
295
|
layout: layout,
|
|
@@ -302,6 +305,7 @@ export var buildLayoutDropdown = function buildLayoutDropdown(state, intl, nodeT
|
|
|
302
305
|
title: intl.formatMessage(layoutToMessages[selectedLayout.value]),
|
|
303
306
|
icon: selectedLayout.icon,
|
|
304
307
|
options: alignmentDropdownOptions,
|
|
308
|
+
shouldFitContainer: false,
|
|
305
309
|
testId: "".concat(nodeType.name, "-layout-dropdown-trigger-button")
|
|
306
310
|
}];
|
|
307
311
|
};
|
|
@@ -34,6 +34,11 @@ export var messages = defineMessages({
|
|
|
34
34
|
id: 'fabric.editor.extensions.config-panel.save-indicator',
|
|
35
35
|
defaultMessage: 'All changes are always autosaved',
|
|
36
36
|
description: 'Message shown to the user to notify to them that we save the changes automatically.'
|
|
37
|
+
},
|
|
38
|
+
panelLoadingError: {
|
|
39
|
+
id: 'fabric.editor.extensions.config-panel.loading-error.non-final',
|
|
40
|
+
defaultMessage: "We're having a bit of trouble loading the configuration panel. Try refreshing the page.",
|
|
41
|
+
description: 'Error message when loading the configuration panel'
|
|
37
42
|
}
|
|
38
43
|
});
|
|
39
44
|
export var configPanelMessages = defineMessages({
|
|
@@ -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 = "103.
|
|
10
|
+
var packageVersion = "103.16.0";
|
|
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 = "103.
|
|
23
|
+
var packageVersion = "103.16.0";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
// Ignored via go/ees005
|
|
@@ -106,7 +106,8 @@ export default function MediaSingle(_ref) {
|
|
|
106
106
|
}, {
|
|
107
107
|
"data-width": mediaSingleWidth,
|
|
108
108
|
"data-width-type": (size === null || size === void 0 ? void 0 : size.widthType) || 'percentage',
|
|
109
|
-
"data-node-type": nodeType
|
|
109
|
+
"data-node-type": nodeType,
|
|
110
|
+
"data-vc": "media-single"
|
|
110
111
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
111
112
|
,
|
|
112
113
|
className: classnames('rich-media-item mediaSingleView-content-wrap', "image-".concat(layout), className, {
|
|
@@ -8,6 +8,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
8
8
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
9
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
10
|
import React, { PureComponent } from 'react';
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
12
|
import { OutsideClickTargetRefContext, withReactEditorViewOuterListeners } from '../../ui-react';
|
|
12
13
|
import DropdownList from '../../ui/DropList';
|
|
13
14
|
import Popup from '../../ui/Popup';
|
|
@@ -79,7 +80,9 @@ export var Dropdown = /*#__PURE__*/function (_PureComponent) {
|
|
|
79
80
|
forcePlacement = _this$props.forcePlacement,
|
|
80
81
|
alignX = _this$props.alignX,
|
|
81
82
|
alignY = _this$props.alignY,
|
|
82
|
-
offset = _this$props.offset
|
|
83
|
+
offset = _this$props.offset,
|
|
84
|
+
_this$props$shouldFit = _this$props.shouldFitContainer,
|
|
85
|
+
shouldFitContainer = _this$props$shouldFit === void 0 ? true : _this$props$shouldFit;
|
|
83
86
|
return /*#__PURE__*/React.createElement(Popup, {
|
|
84
87
|
target: targetProp !== null && targetProp !== void 0 ? targetProp : alignDropdownWithParentElement ? // Ignored via go/ees005
|
|
85
88
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
@@ -111,7 +114,7 @@ export var Dropdown = /*#__PURE__*/function (_PureComponent) {
|
|
|
111
114
|
isOpen: true,
|
|
112
115
|
onOpenChange: onOpenChange,
|
|
113
116
|
position: popupPlacement.join(' '),
|
|
114
|
-
shouldFitContainer: true,
|
|
117
|
+
shouldFitContainer: fg('platform_editor_controls_patch_6') ? shouldFitContainer : true,
|
|
115
118
|
id: dropdownListId
|
|
116
119
|
}, children))));
|
|
117
120
|
}
|
|
@@ -34,6 +34,11 @@ export declare const messages: {
|
|
|
34
34
|
defaultMessage: string;
|
|
35
35
|
description: string;
|
|
36
36
|
};
|
|
37
|
+
panelLoadingError: {
|
|
38
|
+
id: string;
|
|
39
|
+
defaultMessage: string;
|
|
40
|
+
description: string;
|
|
41
|
+
};
|
|
37
42
|
};
|
|
38
43
|
export declare const configPanelMessages: {
|
|
39
44
|
configFailedToLoad: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
3
|
+
import type { NodeWithPos } from '@atlaskit/editor-prosemirror/utils';
|
|
3
4
|
import type { Parameters } from './extension-parameters';
|
|
4
5
|
export interface ExtensionParams<T extends Parameters> {
|
|
5
6
|
extensionKey: string;
|
|
@@ -13,11 +14,13 @@ export interface ExtensionParams<T extends Parameters> {
|
|
|
13
14
|
}
|
|
14
15
|
export type ExtensionHandler<T extends Parameters = Parameters> = (ext: ExtensionParams<T>, doc: object, actions?: MultiBodiedExtensionActions) => JSX.Element | null;
|
|
15
16
|
export type OnSaveCallback<T extends Parameters = Parameters> = (params: T) => void;
|
|
17
|
+
export type OnSaveCallbackAsync<T extends Parameters = Parameters> = (params: T) => Promise<void>;
|
|
16
18
|
export type TransformBefore<T extends Parameters = Parameters> = (data: T) => any;
|
|
17
19
|
export type TransformAfter<T extends Parameters = Parameters> = (data: any) => Promise<Partial<T>>;
|
|
18
20
|
export type ExtensionAPI<T extends Parameters = Parameters> = {
|
|
19
21
|
editInContextPanel: (transformBefore: TransformBefore<T>, transformAfter: TransformAfter<T>) => void;
|
|
20
22
|
_editInLegacyMacroBrowser: () => void;
|
|
23
|
+
getNodeWithPosByLocalId: (localId: string) => NodeWithPos;
|
|
21
24
|
doc: {
|
|
22
25
|
insertAfter: (localId: string, adf: ADFEntity, options?: {
|
|
23
26
|
allowSelectionToNewNode?: boolean;
|
|
@@ -6,7 +6,7 @@ export { getExtensionKeyAndNodeKey, resolveImport } from './extensions/manifest-
|
|
|
6
6
|
export { getExtensionModuleNode, getNodeRenderer, getExtensionModuleNodePrivateProps, } from './extensions/extension-handlers';
|
|
7
7
|
export { getCustomFieldResolver, getFieldSerializer, getFieldDeserializer, getUserFieldContextProvider, } from './extensions/extension-fields-helpers';
|
|
8
8
|
export { configPanelMessages, messages } from './extensions/messages';
|
|
9
|
-
export type { Extension, ExtensionHandler, ExtensionHandlers, ExtensionParams, UpdateExtension, OnSaveCallback, ExtensionAPI, TransformBefore, TransformAfter, ReferenceEntity, MultiBodiedExtensionActions, ParametersGetter, AsyncParametersGetter, } from './extensions/types/extension-handler';
|
|
9
|
+
export type { Extension, ExtensionHandler, ExtensionHandlers, ExtensionParams, UpdateExtension, OnSaveCallback, OnSaveCallbackAsync, ExtensionAPI, TransformBefore, TransformAfter, ReferenceEntity, MultiBodiedExtensionActions, ParametersGetter, AsyncParametersGetter, } from './extensions/types/extension-handler';
|
|
10
10
|
export type { ExtensionAutoConvertHandler, ExtensionComponentProps, ExtensionDeprecationStatus, ExtensionKey, ExtensionManifest, ExtensionModule, ExtensionModuleAction, ExtensionModuleActionHandler, ExtensionModuleActionObject, ExtensionModuleNode, ExtensionModuleNodes, ExtensionModules, ExtensionQuickInsertModule, ExtensionType, Icon, MaybeADFEntity, CustomFieldResolver, UserFieldContextProvider, DynamicFieldDefinitions, } from './extensions/types/extension-manifest';
|
|
11
11
|
export type { ExtensionProvider } from './extensions/types/extension-provider';
|
|
12
12
|
export type { ExtensionToolbarButton, ContextualToolbar, ToolbarItem, } from './extensions/types/extension-manifest-toolbar-item';
|
|
@@ -272,6 +272,7 @@ export type FloatingToolbarDropdown<T extends Object> = {
|
|
|
272
272
|
pulse?: boolean;
|
|
273
273
|
onMount?: () => void;
|
|
274
274
|
onClick?: () => void;
|
|
275
|
+
shouldFitContainer?: boolean;
|
|
275
276
|
};
|
|
276
277
|
type FloatingToolbarExtensionsPlaceholder = {
|
|
277
278
|
type: 'extensions-placeholder';
|
|
@@ -3,7 +3,14 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import { jsx } from '@emotion/react';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
type SeparatorProps = {
|
|
7
|
+
/**
|
|
8
|
+
* @private
|
|
9
|
+
* @deprecated
|
|
10
|
+
*
|
|
11
|
+
* This is no longer used and can be removed at a later date
|
|
12
|
+
*/
|
|
13
|
+
fullHeight?: boolean;
|
|
14
|
+
};
|
|
15
|
+
declare const _default: ({ fullHeight }: SeparatorProps) => jsx.JSX.Element;
|
|
9
16
|
export default _default;
|
|
@@ -34,6 +34,11 @@ export declare const messages: {
|
|
|
34
34
|
defaultMessage: string;
|
|
35
35
|
description: string;
|
|
36
36
|
};
|
|
37
|
+
panelLoadingError: {
|
|
38
|
+
id: string;
|
|
39
|
+
defaultMessage: string;
|
|
40
|
+
description: string;
|
|
41
|
+
};
|
|
37
42
|
};
|
|
38
43
|
export declare const configPanelMessages: {
|
|
39
44
|
configFailedToLoad: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
3
|
+
import type { NodeWithPos } from '@atlaskit/editor-prosemirror/utils';
|
|
3
4
|
import type { Parameters } from './extension-parameters';
|
|
4
5
|
export interface ExtensionParams<T extends Parameters> {
|
|
5
6
|
extensionKey: string;
|
|
@@ -13,11 +14,13 @@ export interface ExtensionParams<T extends Parameters> {
|
|
|
13
14
|
}
|
|
14
15
|
export type ExtensionHandler<T extends Parameters = Parameters> = (ext: ExtensionParams<T>, doc: object, actions?: MultiBodiedExtensionActions) => JSX.Element | null;
|
|
15
16
|
export type OnSaveCallback<T extends Parameters = Parameters> = (params: T) => void;
|
|
17
|
+
export type OnSaveCallbackAsync<T extends Parameters = Parameters> = (params: T) => Promise<void>;
|
|
16
18
|
export type TransformBefore<T extends Parameters = Parameters> = (data: T) => any;
|
|
17
19
|
export type TransformAfter<T extends Parameters = Parameters> = (data: any) => Promise<Partial<T>>;
|
|
18
20
|
export type ExtensionAPI<T extends Parameters = Parameters> = {
|
|
19
21
|
editInContextPanel: (transformBefore: TransformBefore<T>, transformAfter: TransformAfter<T>) => void;
|
|
20
22
|
_editInLegacyMacroBrowser: () => void;
|
|
23
|
+
getNodeWithPosByLocalId: (localId: string) => NodeWithPos;
|
|
21
24
|
doc: {
|
|
22
25
|
insertAfter: (localId: string, adf: ADFEntity, options?: {
|
|
23
26
|
allowSelectionToNewNode?: boolean;
|
|
@@ -6,7 +6,7 @@ export { getExtensionKeyAndNodeKey, resolveImport } from './extensions/manifest-
|
|
|
6
6
|
export { getExtensionModuleNode, getNodeRenderer, getExtensionModuleNodePrivateProps, } from './extensions/extension-handlers';
|
|
7
7
|
export { getCustomFieldResolver, getFieldSerializer, getFieldDeserializer, getUserFieldContextProvider, } from './extensions/extension-fields-helpers';
|
|
8
8
|
export { configPanelMessages, messages } from './extensions/messages';
|
|
9
|
-
export type { Extension, ExtensionHandler, ExtensionHandlers, ExtensionParams, UpdateExtension, OnSaveCallback, ExtensionAPI, TransformBefore, TransformAfter, ReferenceEntity, MultiBodiedExtensionActions, ParametersGetter, AsyncParametersGetter, } from './extensions/types/extension-handler';
|
|
9
|
+
export type { Extension, ExtensionHandler, ExtensionHandlers, ExtensionParams, UpdateExtension, OnSaveCallback, OnSaveCallbackAsync, ExtensionAPI, TransformBefore, TransformAfter, ReferenceEntity, MultiBodiedExtensionActions, ParametersGetter, AsyncParametersGetter, } from './extensions/types/extension-handler';
|
|
10
10
|
export type { ExtensionAutoConvertHandler, ExtensionComponentProps, ExtensionDeprecationStatus, ExtensionKey, ExtensionManifest, ExtensionModule, ExtensionModuleAction, ExtensionModuleActionHandler, ExtensionModuleActionObject, ExtensionModuleNode, ExtensionModuleNodes, ExtensionModules, ExtensionQuickInsertModule, ExtensionType, Icon, MaybeADFEntity, CustomFieldResolver, UserFieldContextProvider, DynamicFieldDefinitions, } from './extensions/types/extension-manifest';
|
|
11
11
|
export type { ExtensionProvider } from './extensions/types/extension-provider';
|
|
12
12
|
export type { ExtensionToolbarButton, ContextualToolbar, ToolbarItem, } from './extensions/types/extension-manifest-toolbar-item';
|
|
@@ -272,6 +272,7 @@ export type FloatingToolbarDropdown<T extends Object> = {
|
|
|
272
272
|
pulse?: boolean;
|
|
273
273
|
onMount?: () => void;
|
|
274
274
|
onClick?: () => void;
|
|
275
|
+
shouldFitContainer?: boolean;
|
|
275
276
|
};
|
|
276
277
|
type FloatingToolbarExtensionsPlaceholder = {
|
|
277
278
|
type: 'extensions-placeholder';
|
|
@@ -3,7 +3,14 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import { jsx } from '@emotion/react';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
type SeparatorProps = {
|
|
7
|
+
/**
|
|
8
|
+
* @private
|
|
9
|
+
* @deprecated
|
|
10
|
+
*
|
|
11
|
+
* This is no longer used and can be removed at a later date
|
|
12
|
+
*/
|
|
13
|
+
fullHeight?: boolean;
|
|
14
|
+
};
|
|
15
|
+
declare const _default: ({ fullHeight }: SeparatorProps) => jsx.JSX.Element;
|
|
9
16
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "103.
|
|
3
|
+
"version": "103.16.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/"
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
"@atlaskit/codemod-utils": "^4.2.0",
|
|
131
131
|
"@atlaskit/css": "^0.10.0",
|
|
132
132
|
"@atlaskit/custom-steps": "^0.11.0",
|
|
133
|
-
"@atlaskit/dropdown-menu": "^14.
|
|
133
|
+
"@atlaskit/dropdown-menu": "^14.1.0",
|
|
134
134
|
"@atlaskit/editor-json-transformer": "^8.24.0",
|
|
135
135
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
136
136
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"@atlaskit/emoji": "^69.1.0",
|
|
140
140
|
"@atlaskit/icon": "^25.6.0",
|
|
141
141
|
"@atlaskit/icon-object": "^7.1.0",
|
|
142
|
-
"@atlaskit/link-datasource": "^4.
|
|
142
|
+
"@atlaskit/link-datasource": "^4.6.0",
|
|
143
143
|
"@atlaskit/link-picker": "^3.2.0",
|
|
144
144
|
"@atlaskit/media-card": "^79.2.0",
|
|
145
145
|
"@atlaskit/media-client": "^32.0.0",
|
|
@@ -157,13 +157,13 @@
|
|
|
157
157
|
"@atlaskit/primitives": "^14.4.0",
|
|
158
158
|
"@atlaskit/profilecard": "^23.8.0",
|
|
159
159
|
"@atlaskit/section-message": "^8.2.0",
|
|
160
|
-
"@atlaskit/smart-card": "^36.
|
|
160
|
+
"@atlaskit/smart-card": "^36.9.0",
|
|
161
161
|
"@atlaskit/smart-user-picker": "^8.0.0",
|
|
162
162
|
"@atlaskit/spinner": "^18.0.0",
|
|
163
163
|
"@atlaskit/task-decision": "^19.1.0",
|
|
164
164
|
"@atlaskit/textfield": "^8.0.0",
|
|
165
165
|
"@atlaskit/theme": "^18.0.0",
|
|
166
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
166
|
+
"@atlaskit/tmp-editor-statsig": "^4.14.0",
|
|
167
167
|
"@atlaskit/tokens": "^4.8.0",
|
|
168
168
|
"@atlaskit/tooltip": "^20.0.0",
|
|
169
169
|
"@atlaskit/width-detector": "^5.0.0",
|
|
@@ -334,6 +334,9 @@
|
|
|
334
334
|
"platform_editor_controls_patch_3": {
|
|
335
335
|
"type": "boolean"
|
|
336
336
|
},
|
|
337
|
+
"platform_editor_controls_patch_6": {
|
|
338
|
+
"type": "boolean"
|
|
339
|
+
},
|
|
337
340
|
"platform_editor_lcm_nested_panel_icon_fix": {
|
|
338
341
|
"type": "boolean"
|
|
339
342
|
},
|