@atlaskit/editor-plugin-insert-block 7.0.4 → 7.0.5
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/ui/ToolbarInsertBlock/index.js +7 -1
- package/dist/es2019/ui/ToolbarInsertBlock/index.js +7 -1
- package/dist/esm/ui/ToolbarInsertBlock/index.js +7 -1
- package/dist/types/ui/ToolbarInsertBlock/index.d.ts +1 -0
- package/dist/types-ts4.5/ui/ToolbarInsertBlock/index.d.ts +1 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -196,6 +196,12 @@ var ToolbarInsertBlock = exports.ToolbarInsertBlock = /*#__PURE__*/function (_Re
|
|
|
196
196
|
_this.toggleEmojiPicker(_analytics.INPUT_METHOD.TOOLBAR);
|
|
197
197
|
}
|
|
198
198
|
});
|
|
199
|
+
(0, _defineProperty2.default)(_this, "getToolbarButtonTestId", function (btn) {
|
|
200
|
+
var buttonTestIds = {
|
|
201
|
+
media: 'media-attachment-toolbar-button'
|
|
202
|
+
};
|
|
203
|
+
return buttonTestIds[btn.value.name] || String(btn.content);
|
|
204
|
+
});
|
|
199
205
|
(0, _defineProperty2.default)(_this, "handleToolbarRef", function (buttonName) {
|
|
200
206
|
return function (ref) {
|
|
201
207
|
if (!ref) {
|
|
@@ -727,7 +733,7 @@ var ToolbarInsertBlock = exports.ToolbarInsertBlock = /*#__PURE__*/function (_Re
|
|
|
727
733
|
}, toolbarButtons.map(function (btn) {
|
|
728
734
|
return (0, _react2.jsx)(_uiMenu.ToolbarButton, {
|
|
729
735
|
item: btn,
|
|
730
|
-
testId:
|
|
736
|
+
testId: _this3.getToolbarButtonTestId(btn),
|
|
731
737
|
ref: _this3.handleToolbarRef(btn.value.name),
|
|
732
738
|
key: btn.value.name,
|
|
733
739
|
spacing: isReducedSpacing ? 'none' : 'default',
|
|
@@ -206,6 +206,12 @@ export class ToolbarInsertBlock extends React.PureComponent {
|
|
|
206
206
|
this.toggleEmojiPicker(INPUT_METHOD.TOOLBAR);
|
|
207
207
|
}
|
|
208
208
|
});
|
|
209
|
+
_defineProperty(this, "getToolbarButtonTestId", btn => {
|
|
210
|
+
const buttonTestIds = {
|
|
211
|
+
media: 'media-attachment-toolbar-button'
|
|
212
|
+
};
|
|
213
|
+
return buttonTestIds[btn.value.name] || String(btn.content);
|
|
214
|
+
});
|
|
209
215
|
_defineProperty(this, "handleToolbarRef", buttonName => ref => {
|
|
210
216
|
if (!ref) {
|
|
211
217
|
return;
|
|
@@ -769,7 +775,7 @@ export class ToolbarInsertBlock extends React.PureComponent {
|
|
|
769
775
|
}, toolbarButtons.map(btn => {
|
|
770
776
|
return jsx(ToolbarButton, {
|
|
771
777
|
item: btn,
|
|
772
|
-
testId:
|
|
778
|
+
testId: this.getToolbarButtonTestId(btn),
|
|
773
779
|
ref: this.handleToolbarRef(btn.value.name),
|
|
774
780
|
key: btn.value.name,
|
|
775
781
|
spacing: isReducedSpacing ? 'none' : 'default',
|
|
@@ -190,6 +190,12 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
190
190
|
_this.toggleEmojiPicker(INPUT_METHOD.TOOLBAR);
|
|
191
191
|
}
|
|
192
192
|
});
|
|
193
|
+
_defineProperty(_this, "getToolbarButtonTestId", function (btn) {
|
|
194
|
+
var buttonTestIds = {
|
|
195
|
+
media: 'media-attachment-toolbar-button'
|
|
196
|
+
};
|
|
197
|
+
return buttonTestIds[btn.value.name] || String(btn.content);
|
|
198
|
+
});
|
|
193
199
|
_defineProperty(_this, "handleToolbarRef", function (buttonName) {
|
|
194
200
|
return function (ref) {
|
|
195
201
|
if (!ref) {
|
|
@@ -721,7 +727,7 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
721
727
|
}, toolbarButtons.map(function (btn) {
|
|
722
728
|
return jsx(ToolbarButton, {
|
|
723
729
|
item: btn,
|
|
724
|
-
testId:
|
|
730
|
+
testId: _this3.getToolbarButtonTestId(btn),
|
|
725
731
|
ref: _this3.handleToolbarRef(btn.value.name),
|
|
726
732
|
key: btn.value.name,
|
|
727
733
|
spacing: isReducedSpacing ? 'none' : 'default',
|
|
@@ -26,6 +26,7 @@ export declare class ToolbarInsertBlock extends React.PureComponent<Props & Wrap
|
|
|
26
26
|
private handleEmojiPressEscape;
|
|
27
27
|
private handleEmojiClickOutside;
|
|
28
28
|
private renderPopup;
|
|
29
|
+
private getToolbarButtonTestId;
|
|
29
30
|
private handleToolbarRef;
|
|
30
31
|
private handlePlusButtonRef;
|
|
31
32
|
private handleDropDownButtonRef;
|
|
@@ -26,6 +26,7 @@ export declare class ToolbarInsertBlock extends React.PureComponent<Props & Wrap
|
|
|
26
26
|
private handleEmojiPressEscape;
|
|
27
27
|
private handleEmojiClickOutside;
|
|
28
28
|
private renderPopup;
|
|
29
|
+
private getToolbarButtonTestId;
|
|
29
30
|
private handleToolbarRef;
|
|
30
31
|
private handlePlusButtonRef;
|
|
31
32
|
private handleDropDownButtonRef;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-insert-block",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.5",
|
|
4
4
|
"description": "Insert block plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
],
|
|
30
30
|
"atlaskit:src": "src/index.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@atlaskit/button": "^23.
|
|
32
|
+
"@atlaskit/button": "^23.5.0",
|
|
33
33
|
"@atlaskit/editor-plugin-analytics": "^6.1.0",
|
|
34
34
|
"@atlaskit/editor-plugin-block-type": "^9.0.0",
|
|
35
35
|
"@atlaskit/editor-plugin-code-block": "^8.0.0",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@atlaskit/editor-plugin-type-ahead": "^6.1.0",
|
|
59
59
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
60
60
|
"@atlaskit/editor-shared-styles": "^3.6.0",
|
|
61
|
-
"@atlaskit/editor-toolbar": "^0.
|
|
61
|
+
"@atlaskit/editor-toolbar": "^0.12.0",
|
|
62
62
|
"@atlaskit/editor-toolbar-model": "^0.2.0",
|
|
63
63
|
"@atlaskit/emoji": "^69.5.0",
|
|
64
64
|
"@atlaskit/heading": "^5.2.0",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
68
68
|
"@atlaskit/primitives": "^14.15.0",
|
|
69
69
|
"@atlaskit/theme": "^21.0.0",
|
|
70
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
70
|
+
"@atlaskit/tmp-editor-statsig": "^13.1.0",
|
|
71
71
|
"@atlaskit/tokens": "^6.4.0",
|
|
72
72
|
"@atlaskit/tooltip": "^20.5.0",
|
|
73
73
|
"@babel/runtime": "^7.0.0",
|