@atlaskit/editor-common 102.11.3 → 102.11.4
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 +8 -0
- package/dist/cjs/extensions/messages.js +0 -5
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui-menu/Dropdown/index.js +15 -6
- package/dist/es2019/extensions/messages.js +0 -5
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui-menu/Dropdown/index.js +15 -6
- package/dist/esm/extensions/messages.js +0 -5
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui-menu/Dropdown/index.js +15 -6
- package/dist/types/extensions/messages.d.ts +0 -5
- package/dist/types/ui-menu/Dropdown/index.d.ts +6 -1
- package/dist/types-ts4.5/extensions/messages.d.ts +0 -5
- package/dist/types-ts4.5/ui-menu/Dropdown/index.d.ts +9 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 102.11.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#129262](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/129262)
|
|
8
|
+
[`9408a99b473bb`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9408a99b473bb) -
|
|
9
|
+
EDF-2570 Fixed config panel not closing when navigating to other page issue is fixed.
|
|
10
|
+
|
|
3
11
|
## 102.11.3
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -137,10 +137,5 @@ var configPanelMessages = exports.configPanelMessages = (0, _reactIntlNext.defin
|
|
|
137
137
|
id: 'fabric.editor.configPanel.errorBoundary.note',
|
|
138
138
|
defaultMessage: "We've let the team know. You can still edit and publish this page, or check the error console for more information.",
|
|
139
139
|
description: 'Note for uncaught config panel error'
|
|
140
|
-
},
|
|
141
|
-
objectSidebarPanelHeaderLabel: {
|
|
142
|
-
id: 'fabric.editor.configPanel.objectSidebarPanelHeaderLabel',
|
|
143
|
-
defaultMessage: ' ',
|
|
144
|
-
description: 'Keep this empty. Defined it as headerLabel is required field.'
|
|
145
140
|
}
|
|
146
141
|
});
|
|
@@ -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 = "102.11.
|
|
20
|
+
var packageVersion = "102.11.4";
|
|
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 = "102.11.
|
|
26
|
+
var packageVersion = "102.11.4";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = '0, 8';
|
|
29
29
|
// Ignored via go/ees005
|
|
@@ -84,19 +84,28 @@ var Dropdown = exports.Dropdown = /*#__PURE__*/function (_PureComponent) {
|
|
|
84
84
|
zIndex = _this$props.zIndex,
|
|
85
85
|
arrowKeyNavigationProviderOptions = _this$props.arrowKeyNavigationProviderOptions,
|
|
86
86
|
dropdownListId = _this$props.dropdownListId,
|
|
87
|
-
alignDropdownWithParentElement = _this$props.alignDropdownWithParentElement
|
|
87
|
+
alignDropdownWithParentElement = _this$props.alignDropdownWithParentElement,
|
|
88
|
+
targetProp = _this$props.target,
|
|
89
|
+
forcePlacement = _this$props.forcePlacement,
|
|
90
|
+
alignX = _this$props.alignX,
|
|
91
|
+
alignY = _this$props.alignY,
|
|
92
|
+
offset = _this$props.offset;
|
|
88
93
|
return /*#__PURE__*/_react.default.createElement(_Popup.default, {
|
|
89
|
-
target: alignDropdownWithParentElement ? // Ignored via go/ees005
|
|
94
|
+
target: targetProp !== null && targetProp !== void 0 ? targetProp : alignDropdownWithParentElement ? // Ignored via go/ees005
|
|
90
95
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
91
96
|
target === null || target === void 0 ? void 0 : target.closest("[data-testid='editor-floating-toolbar']") : target,
|
|
92
97
|
mountTo: mountTo,
|
|
93
98
|
boundariesElement: boundariesElement,
|
|
94
99
|
scrollableElement: scrollableElement,
|
|
95
|
-
onPlacementChanged: this.updatePopupPlacement,
|
|
100
|
+
onPlacementChanged: forcePlacement ? undefined : this.updatePopupPlacement,
|
|
96
101
|
fitHeight: fitHeight,
|
|
97
102
|
fitWidth: fitWidth,
|
|
98
103
|
zIndex: zIndex,
|
|
99
|
-
allowOutOfBounds: alignDropdownWithParentElement
|
|
104
|
+
allowOutOfBounds: alignDropdownWithParentElement,
|
|
105
|
+
alignX: alignX,
|
|
106
|
+
alignY: alignY,
|
|
107
|
+
forcePlacement: forcePlacement,
|
|
108
|
+
offset: offset
|
|
100
109
|
}, /*#__PURE__*/_react.default.createElement(_ArrowKeyNavigationProvider.ArrowKeyNavigationProvider
|
|
101
110
|
// Ignored via go/ees005
|
|
102
111
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -123,11 +132,11 @@ var Dropdown = exports.Dropdown = /*#__PURE__*/function (_PureComponent) {
|
|
|
123
132
|
var _this$props2 = this.props,
|
|
124
133
|
trigger = _this$props2.trigger,
|
|
125
134
|
isOpen = _this$props2.isOpen;
|
|
126
|
-
return /*#__PURE__*/_react.default.createElement(_uiReact.OutsideClickTargetRefContext.Consumer, null, function (setOutsideClickTargetRef) {
|
|
135
|
+
return trigger ? /*#__PURE__*/_react.default.createElement(_uiReact.OutsideClickTargetRefContext.Consumer, null, function (setOutsideClickTargetRef) {
|
|
127
136
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
128
137
|
ref: _this2.handleRef(setOutsideClickTargetRef)
|
|
129
138
|
}, trigger), isOpen ? _this2.renderDropdown() : null);
|
|
130
|
-
});
|
|
139
|
+
}) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, isOpen ? this.renderDropdown() : null);
|
|
131
140
|
}
|
|
132
141
|
}]);
|
|
133
142
|
}(_react.PureComponent);
|
|
@@ -131,10 +131,5 @@ export const configPanelMessages = defineMessages({
|
|
|
131
131
|
id: 'fabric.editor.configPanel.errorBoundary.note',
|
|
132
132
|
defaultMessage: `We've let the team know. You can still edit and publish this page, or check the error console for more information.`,
|
|
133
133
|
description: 'Note for uncaught config panel error'
|
|
134
|
-
},
|
|
135
|
-
objectSidebarPanelHeaderLabel: {
|
|
136
|
-
id: 'fabric.editor.configPanel.objectSidebarPanelHeaderLabel',
|
|
137
|
-
defaultMessage: ' ',
|
|
138
|
-
description: 'Keep this empty. Defined it as headerLabel is required field.'
|
|
139
134
|
}
|
|
140
135
|
});
|
|
@@ -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 = "102.11.
|
|
4
|
+
const packageVersion = "102.11.4";
|
|
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 = "102.11.
|
|
16
|
+
const packageVersion = "102.11.4";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
// Ignored via go/ees005
|
|
@@ -60,20 +60,29 @@ export class Dropdown extends PureComponent {
|
|
|
60
60
|
zIndex,
|
|
61
61
|
arrowKeyNavigationProviderOptions,
|
|
62
62
|
dropdownListId,
|
|
63
|
-
alignDropdownWithParentElement
|
|
63
|
+
alignDropdownWithParentElement,
|
|
64
|
+
target: targetProp,
|
|
65
|
+
forcePlacement,
|
|
66
|
+
alignX,
|
|
67
|
+
alignY,
|
|
68
|
+
offset
|
|
64
69
|
} = this.props;
|
|
65
70
|
return /*#__PURE__*/React.createElement(Popup, {
|
|
66
|
-
target: alignDropdownWithParentElement ? // Ignored via go/ees005
|
|
71
|
+
target: targetProp !== null && targetProp !== void 0 ? targetProp : alignDropdownWithParentElement ? // Ignored via go/ees005
|
|
67
72
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
68
73
|
target === null || target === void 0 ? void 0 : target.closest("[data-testid='editor-floating-toolbar']") : target,
|
|
69
74
|
mountTo: mountTo,
|
|
70
75
|
boundariesElement: boundariesElement,
|
|
71
76
|
scrollableElement: scrollableElement,
|
|
72
|
-
onPlacementChanged: this.updatePopupPlacement,
|
|
77
|
+
onPlacementChanged: forcePlacement ? undefined : this.updatePopupPlacement,
|
|
73
78
|
fitHeight: fitHeight,
|
|
74
79
|
fitWidth: fitWidth,
|
|
75
80
|
zIndex: zIndex,
|
|
76
|
-
allowOutOfBounds: alignDropdownWithParentElement
|
|
81
|
+
allowOutOfBounds: alignDropdownWithParentElement,
|
|
82
|
+
alignX: alignX,
|
|
83
|
+
alignY: alignY,
|
|
84
|
+
forcePlacement: forcePlacement,
|
|
85
|
+
offset: offset
|
|
77
86
|
}, /*#__PURE__*/React.createElement(ArrowKeyNavigationProvider
|
|
78
87
|
// Ignored via go/ees005
|
|
79
88
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -98,9 +107,9 @@ export class Dropdown extends PureComponent {
|
|
|
98
107
|
trigger,
|
|
99
108
|
isOpen
|
|
100
109
|
} = this.props;
|
|
101
|
-
return /*#__PURE__*/React.createElement(OutsideClickTargetRefContext.Consumer, null, setOutsideClickTargetRef => /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
110
|
+
return trigger ? /*#__PURE__*/React.createElement(OutsideClickTargetRefContext.Consumer, null, setOutsideClickTargetRef => /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
102
111
|
ref: this.handleRef(setOutsideClickTargetRef)
|
|
103
|
-
}, trigger), isOpen ? this.renderDropdown() : null));
|
|
112
|
+
}, trigger), isOpen ? this.renderDropdown() : null)) : /*#__PURE__*/React.createElement(React.Fragment, null, isOpen ? this.renderDropdown() : null);
|
|
104
113
|
}
|
|
105
114
|
}
|
|
106
115
|
const DropdownWithOuterListeners = withReactEditorViewOuterListeners(Dropdown);
|
|
@@ -131,10 +131,5 @@ export var configPanelMessages = defineMessages({
|
|
|
131
131
|
id: 'fabric.editor.configPanel.errorBoundary.note',
|
|
132
132
|
defaultMessage: "We've let the team know. You can still edit and publish this page, or check the error console for more information.",
|
|
133
133
|
description: 'Note for uncaught config panel error'
|
|
134
|
-
},
|
|
135
|
-
objectSidebarPanelHeaderLabel: {
|
|
136
|
-
id: 'fabric.editor.configPanel.objectSidebarPanelHeaderLabel',
|
|
137
|
-
defaultMessage: ' ',
|
|
138
|
-
description: 'Keep this empty. Defined it as headerLabel is required field.'
|
|
139
134
|
}
|
|
140
135
|
});
|
|
@@ -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 = "102.11.
|
|
10
|
+
var packageVersion = "102.11.4";
|
|
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 = "102.11.
|
|
23
|
+
var packageVersion = "102.11.4";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
// Ignored via go/ees005
|
|
@@ -74,19 +74,28 @@ export var Dropdown = /*#__PURE__*/function (_PureComponent) {
|
|
|
74
74
|
zIndex = _this$props.zIndex,
|
|
75
75
|
arrowKeyNavigationProviderOptions = _this$props.arrowKeyNavigationProviderOptions,
|
|
76
76
|
dropdownListId = _this$props.dropdownListId,
|
|
77
|
-
alignDropdownWithParentElement = _this$props.alignDropdownWithParentElement
|
|
77
|
+
alignDropdownWithParentElement = _this$props.alignDropdownWithParentElement,
|
|
78
|
+
targetProp = _this$props.target,
|
|
79
|
+
forcePlacement = _this$props.forcePlacement,
|
|
80
|
+
alignX = _this$props.alignX,
|
|
81
|
+
alignY = _this$props.alignY,
|
|
82
|
+
offset = _this$props.offset;
|
|
78
83
|
return /*#__PURE__*/React.createElement(Popup, {
|
|
79
|
-
target: alignDropdownWithParentElement ? // Ignored via go/ees005
|
|
84
|
+
target: targetProp !== null && targetProp !== void 0 ? targetProp : alignDropdownWithParentElement ? // Ignored via go/ees005
|
|
80
85
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
81
86
|
target === null || target === void 0 ? void 0 : target.closest("[data-testid='editor-floating-toolbar']") : target,
|
|
82
87
|
mountTo: mountTo,
|
|
83
88
|
boundariesElement: boundariesElement,
|
|
84
89
|
scrollableElement: scrollableElement,
|
|
85
|
-
onPlacementChanged: this.updatePopupPlacement,
|
|
90
|
+
onPlacementChanged: forcePlacement ? undefined : this.updatePopupPlacement,
|
|
86
91
|
fitHeight: fitHeight,
|
|
87
92
|
fitWidth: fitWidth,
|
|
88
93
|
zIndex: zIndex,
|
|
89
|
-
allowOutOfBounds: alignDropdownWithParentElement
|
|
94
|
+
allowOutOfBounds: alignDropdownWithParentElement,
|
|
95
|
+
alignX: alignX,
|
|
96
|
+
alignY: alignY,
|
|
97
|
+
forcePlacement: forcePlacement,
|
|
98
|
+
offset: offset
|
|
90
99
|
}, /*#__PURE__*/React.createElement(ArrowKeyNavigationProvider
|
|
91
100
|
// Ignored via go/ees005
|
|
92
101
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -113,11 +122,11 @@ export var Dropdown = /*#__PURE__*/function (_PureComponent) {
|
|
|
113
122
|
var _this$props2 = this.props,
|
|
114
123
|
trigger = _this$props2.trigger,
|
|
115
124
|
isOpen = _this$props2.isOpen;
|
|
116
|
-
return /*#__PURE__*/React.createElement(OutsideClickTargetRefContext.Consumer, null, function (setOutsideClickTargetRef) {
|
|
125
|
+
return trigger ? /*#__PURE__*/React.createElement(OutsideClickTargetRefContext.Consumer, null, function (setOutsideClickTargetRef) {
|
|
117
126
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
118
127
|
ref: _this2.handleRef(setOutsideClickTargetRef)
|
|
119
128
|
}, trigger), isOpen ? _this2.renderDropdown() : null);
|
|
120
|
-
});
|
|
129
|
+
}) : /*#__PURE__*/React.createElement(React.Fragment, null, isOpen ? this.renderDropdown() : null);
|
|
121
130
|
}
|
|
122
131
|
}]);
|
|
123
132
|
}(PureComponent);
|
|
@@ -7,7 +7,7 @@ export interface Props {
|
|
|
7
7
|
mountTo?: HTMLElement;
|
|
8
8
|
boundariesElement?: HTMLElement;
|
|
9
9
|
scrollableElement?: HTMLElement;
|
|
10
|
-
trigger
|
|
10
|
+
trigger?: React.ReactElement<any>;
|
|
11
11
|
isOpen?: boolean;
|
|
12
12
|
onOpenChange?: (attrs: OpenChangedEvent) => void;
|
|
13
13
|
fitWidth?: number;
|
|
@@ -16,6 +16,11 @@ export interface Props {
|
|
|
16
16
|
arrowKeyNavigationProviderOptions: ArrowKeyNavigationProviderOptions;
|
|
17
17
|
dropdownListId?: string;
|
|
18
18
|
alignDropdownWithParentElement?: boolean;
|
|
19
|
+
target?: HTMLElement;
|
|
20
|
+
forcePlacement?: boolean;
|
|
21
|
+
alignX?: 'left' | 'right' | 'center';
|
|
22
|
+
alignY?: 'start' | 'bottom' | 'top';
|
|
23
|
+
offset?: [number, number];
|
|
19
24
|
}
|
|
20
25
|
export interface State {
|
|
21
26
|
target?: HTMLElement;
|
|
@@ -7,7 +7,7 @@ export interface Props {
|
|
|
7
7
|
mountTo?: HTMLElement;
|
|
8
8
|
boundariesElement?: HTMLElement;
|
|
9
9
|
scrollableElement?: HTMLElement;
|
|
10
|
-
trigger
|
|
10
|
+
trigger?: React.ReactElement<any>;
|
|
11
11
|
isOpen?: boolean;
|
|
12
12
|
onOpenChange?: (attrs: OpenChangedEvent) => void;
|
|
13
13
|
fitWidth?: number;
|
|
@@ -16,6 +16,14 @@ export interface Props {
|
|
|
16
16
|
arrowKeyNavigationProviderOptions: ArrowKeyNavigationProviderOptions;
|
|
17
17
|
dropdownListId?: string;
|
|
18
18
|
alignDropdownWithParentElement?: boolean;
|
|
19
|
+
target?: HTMLElement;
|
|
20
|
+
forcePlacement?: boolean;
|
|
21
|
+
alignX?: 'left' | 'right' | 'center';
|
|
22
|
+
alignY?: 'start' | 'bottom' | 'top';
|
|
23
|
+
offset?: [
|
|
24
|
+
number,
|
|
25
|
+
number
|
|
26
|
+
];
|
|
19
27
|
}
|
|
20
28
|
export interface State {
|
|
21
29
|
target?: HTMLElement;
|
package/package.json
CHANGED