@atlaskit/editor-plugin-block-type 3.0.15 → 3.0.16
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/plugin/index.js +2 -2
- package/dist/cjs/plugin/pm-plugins/main.js +4 -4
- package/dist/es2019/plugin/index.js +2 -2
- package/dist/es2019/plugin/pm-plugins/main.js +4 -4
- package/dist/esm/plugin/index.js +2 -2
- package/dist/esm/plugin/pm-plugins/main.js +4 -4
- package/dist/types/plugin/ui/ToolbarBlockType/blocktype-button.d.ts +1 -1
- package/dist/types-ts4.5/plugin/ui/ToolbarBlockType/blocktype-button.d.ts +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-type
|
|
2
2
|
|
|
3
|
+
## 3.0.16
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#67238](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/67238) [`40533849b2ec`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/40533849b2ec) - [ED-21835] Change EditorAPI type to always union with undefined
|
|
8
|
+
|
|
3
9
|
## 3.0.15
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/cjs/plugin/index.js
CHANGED
|
@@ -184,8 +184,8 @@ var blockTypePlugin = exports.blockTypePlugin = function blockTypePlugin(_ref3)
|
|
|
184
184
|
eventDispatcher = _ref7.eventDispatcher;
|
|
185
185
|
var isSmall = options && options.isUndoRedoButtonsEnabled ? toolbarSize < _types.ToolbarSize.XXL : toolbarSize < _types.ToolbarSize.XL;
|
|
186
186
|
var boundSetBlockType = function boundSetBlockType(name) {
|
|
187
|
-
var _api$analytics5;
|
|
188
|
-
api === null || api === void 0 || api.core.actions.execute((0, _commands.setBlockTypeWithAnalytics)(name, _analytics.INPUT_METHOD.TOOLBAR, api === null || api === void 0 || (_api$analytics5 = api.analytics) === null || _api$analytics5 === void 0 ? void 0 : _api$analytics5.actions));
|
|
187
|
+
var _api$core, _api$analytics5;
|
|
188
|
+
api === null || api === void 0 || (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute((0, _commands.setBlockTypeWithAnalytics)(name, _analytics.INPUT_METHOD.TOOLBAR, api === null || api === void 0 || (_api$analytics5 = api.analytics) === null || _api$analytics5 === void 0 ? void 0 : _api$analytics5.actions));
|
|
189
189
|
};
|
|
190
190
|
return /*#__PURE__*/_react.default.createElement(_withPluginState.WithPluginState, {
|
|
191
191
|
editorView: editorView,
|
|
@@ -130,11 +130,11 @@ var createPlugin = exports.createPlugin = function createPlugin(editorAPI, dispa
|
|
|
130
130
|
var headingLevel = _consts.HEADING_KEYS.indexOf(event.keyCode);
|
|
131
131
|
if (headingLevel > -1 && event.altKey) {
|
|
132
132
|
if (_utils.browser.mac && event.metaKey) {
|
|
133
|
-
var _editorAPI$core$actio;
|
|
134
|
-
return (_editorAPI$core$actio = editorAPI === null || editorAPI === void 0 ? void 0 :
|
|
133
|
+
var _editorAPI$core$actio, _editorAPI$core;
|
|
134
|
+
return (_editorAPI$core$actio = editorAPI === null || editorAPI === void 0 || (_editorAPI$core = editorAPI.core) === null || _editorAPI$core === void 0 ? void 0 : _editorAPI$core.actions.execute(autoformatHeading(headingLevel, editorAnalyticsApi))) !== null && _editorAPI$core$actio !== void 0 ? _editorAPI$core$actio : false;
|
|
135
135
|
} else if (!_utils.browser.mac && event.ctrlKey && altKeyLocation !== event.DOM_KEY_LOCATION_RIGHT) {
|
|
136
|
-
var _editorAPI$core$actio2;
|
|
137
|
-
return (_editorAPI$core$actio2 = editorAPI === null || editorAPI === void 0 ? void 0 :
|
|
136
|
+
var _editorAPI$core$actio2, _editorAPI$core2;
|
|
137
|
+
return (_editorAPI$core$actio2 = editorAPI === null || editorAPI === void 0 || (_editorAPI$core2 = editorAPI.core) === null || _editorAPI$core2 === void 0 ? void 0 : _editorAPI$core2.actions.execute(autoformatHeading(headingLevel, editorAnalyticsApi))) !== null && _editorAPI$core$actio2 !== void 0 ? _editorAPI$core$actio2 : false;
|
|
138
138
|
}
|
|
139
139
|
} else if (event.key === 'Alt') {
|
|
140
140
|
// event.location is for the current key only; when a user hits Ctrl-Alt-1 the
|
|
@@ -168,8 +168,8 @@ const blockTypePlugin = ({
|
|
|
168
168
|
}) {
|
|
169
169
|
const isSmall = options && options.isUndoRedoButtonsEnabled ? toolbarSize < ToolbarSize.XXL : toolbarSize < ToolbarSize.XL;
|
|
170
170
|
const boundSetBlockType = name => {
|
|
171
|
-
var _api$analytics5;
|
|
172
|
-
api === null || api === void 0 ? void 0 : api.core.actions.execute(setBlockTypeWithAnalytics(name, INPUT_METHOD.TOOLBAR, api === null || api === void 0 ? void 0 : (_api$analytics5 = api.analytics) === null || _api$analytics5 === void 0 ? void 0 : _api$analytics5.actions));
|
|
171
|
+
var _api$core, _api$analytics5;
|
|
172
|
+
api === null || api === void 0 ? void 0 : (_api$core = api.core) === null || _api$core === void 0 ? void 0 : _api$core.actions.execute(setBlockTypeWithAnalytics(name, INPUT_METHOD.TOOLBAR, api === null || api === void 0 ? void 0 : (_api$analytics5 = api.analytics) === null || _api$analytics5 === void 0 ? void 0 : _api$analytics5.actions));
|
|
173
173
|
};
|
|
174
174
|
return /*#__PURE__*/React.createElement(WithPluginState, {
|
|
175
175
|
editorView: editorView,
|
|
@@ -118,11 +118,11 @@ export const createPlugin = (editorAPI, dispatch, lastNodeMustBeParagraph) => {
|
|
|
118
118
|
const headingLevel = HEADING_KEYS.indexOf(event.keyCode);
|
|
119
119
|
if (headingLevel > -1 && event.altKey) {
|
|
120
120
|
if (browser.mac && event.metaKey) {
|
|
121
|
-
var _editorAPI$core$actio;
|
|
122
|
-
return (_editorAPI$core$actio = editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.core.actions.execute(autoformatHeading(headingLevel, editorAnalyticsApi))) !== null && _editorAPI$core$actio !== void 0 ? _editorAPI$core$actio : false;
|
|
121
|
+
var _editorAPI$core$actio, _editorAPI$core;
|
|
122
|
+
return (_editorAPI$core$actio = editorAPI === null || editorAPI === void 0 ? void 0 : (_editorAPI$core = editorAPI.core) === null || _editorAPI$core === void 0 ? void 0 : _editorAPI$core.actions.execute(autoformatHeading(headingLevel, editorAnalyticsApi))) !== null && _editorAPI$core$actio !== void 0 ? _editorAPI$core$actio : false;
|
|
123
123
|
} else if (!browser.mac && event.ctrlKey && altKeyLocation !== event.DOM_KEY_LOCATION_RIGHT) {
|
|
124
|
-
var _editorAPI$core$actio2;
|
|
125
|
-
return (_editorAPI$core$actio2 = editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.core.actions.execute(autoformatHeading(headingLevel, editorAnalyticsApi))) !== null && _editorAPI$core$actio2 !== void 0 ? _editorAPI$core$actio2 : false;
|
|
124
|
+
var _editorAPI$core$actio2, _editorAPI$core2;
|
|
125
|
+
return (_editorAPI$core$actio2 = editorAPI === null || editorAPI === void 0 ? void 0 : (_editorAPI$core2 = editorAPI.core) === null || _editorAPI$core2 === void 0 ? void 0 : _editorAPI$core2.actions.execute(autoformatHeading(headingLevel, editorAnalyticsApi))) !== null && _editorAPI$core$actio2 !== void 0 ? _editorAPI$core$actio2 : false;
|
|
126
126
|
}
|
|
127
127
|
} else if (event.key === 'Alt') {
|
|
128
128
|
// event.location is for the current key only; when a user hits Ctrl-Alt-1 the
|
package/dist/esm/plugin/index.js
CHANGED
|
@@ -171,8 +171,8 @@ var blockTypePlugin = function blockTypePlugin(_ref3) {
|
|
|
171
171
|
eventDispatcher = _ref7.eventDispatcher;
|
|
172
172
|
var isSmall = options && options.isUndoRedoButtonsEnabled ? toolbarSize < ToolbarSize.XXL : toolbarSize < ToolbarSize.XL;
|
|
173
173
|
var boundSetBlockType = function boundSetBlockType(name) {
|
|
174
|
-
var _api$analytics5;
|
|
175
|
-
api === null || api === void 0 || api.core.actions.execute(setBlockTypeWithAnalytics(name, INPUT_METHOD.TOOLBAR, api === null || api === void 0 || (_api$analytics5 = api.analytics) === null || _api$analytics5 === void 0 ? void 0 : _api$analytics5.actions));
|
|
174
|
+
var _api$core, _api$analytics5;
|
|
175
|
+
api === null || api === void 0 || (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute(setBlockTypeWithAnalytics(name, INPUT_METHOD.TOOLBAR, api === null || api === void 0 || (_api$analytics5 = api.analytics) === null || _api$analytics5 === void 0 ? void 0 : _api$analytics5.actions));
|
|
176
176
|
};
|
|
177
177
|
return /*#__PURE__*/React.createElement(WithPluginState, {
|
|
178
178
|
editorView: editorView,
|
|
@@ -123,11 +123,11 @@ export var createPlugin = function createPlugin(editorAPI, dispatch, lastNodeMus
|
|
|
123
123
|
var headingLevel = HEADING_KEYS.indexOf(event.keyCode);
|
|
124
124
|
if (headingLevel > -1 && event.altKey) {
|
|
125
125
|
if (browser.mac && event.metaKey) {
|
|
126
|
-
var _editorAPI$core$actio;
|
|
127
|
-
return (_editorAPI$core$actio = editorAPI === null || editorAPI === void 0 ? void 0 :
|
|
126
|
+
var _editorAPI$core$actio, _editorAPI$core;
|
|
127
|
+
return (_editorAPI$core$actio = editorAPI === null || editorAPI === void 0 || (_editorAPI$core = editorAPI.core) === null || _editorAPI$core === void 0 ? void 0 : _editorAPI$core.actions.execute(autoformatHeading(headingLevel, editorAnalyticsApi))) !== null && _editorAPI$core$actio !== void 0 ? _editorAPI$core$actio : false;
|
|
128
128
|
} else if (!browser.mac && event.ctrlKey && altKeyLocation !== event.DOM_KEY_LOCATION_RIGHT) {
|
|
129
|
-
var _editorAPI$core$actio2;
|
|
130
|
-
return (_editorAPI$core$actio2 = editorAPI === null || editorAPI === void 0 ? void 0 :
|
|
129
|
+
var _editorAPI$core$actio2, _editorAPI$core2;
|
|
130
|
+
return (_editorAPI$core$actio2 = editorAPI === null || editorAPI === void 0 || (_editorAPI$core2 = editorAPI.core) === null || _editorAPI$core2 === void 0 ? void 0 : _editorAPI$core2.actions.execute(autoformatHeading(headingLevel, editorAnalyticsApi))) !== null && _editorAPI$core$actio2 !== void 0 ? _editorAPI$core$actio2 : false;
|
|
131
131
|
}
|
|
132
132
|
} else if (event.key === 'Alt') {
|
|
133
133
|
// event.location is for the current key only; when a user hits Ctrl-Alt-1 the
|
|
@@ -12,4 +12,4 @@ export interface BlockTypeButtonProps {
|
|
|
12
12
|
onKeyDown(e: React.KeyboardEvent): void;
|
|
13
13
|
formatMessage: WrappedComponentProps['intl']['formatMessage'];
|
|
14
14
|
}
|
|
15
|
-
export declare const BlockTypeButton: React.
|
|
15
|
+
export declare const BlockTypeButton: React.FunctionComponent<BlockTypeButtonProps>;
|
|
@@ -12,4 +12,4 @@ export interface BlockTypeButtonProps {
|
|
|
12
12
|
onKeyDown(e: React.KeyboardEvent): void;
|
|
13
13
|
formatMessage: WrappedComponentProps['intl']['formatMessage'];
|
|
14
14
|
}
|
|
15
|
-
export declare const BlockTypeButton: React.
|
|
15
|
+
export declare const BlockTypeButton: React.FunctionComponent<BlockTypeButtonProps>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-type",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.16",
|
|
4
4
|
"description": "BlockType plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"releaseModel": "continuous",
|
|
15
15
|
"runReact18": false
|
|
16
16
|
},
|
|
17
|
-
"repository": "https://bitbucket.org/atlassian/atlassian-frontend",
|
|
17
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
18
18
|
"main": "dist/cjs/index.js",
|
|
19
19
|
"module": "dist/esm/index.js",
|
|
20
20
|
"module:es2019": "dist/es2019/index.js",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@atlaskit/adf-schema": "^35.3.0",
|
|
39
|
-
"@atlaskit/editor-common": "^76.
|
|
39
|
+
"@atlaskit/editor-common": "^76.39.0",
|
|
40
40
|
"@atlaskit/editor-plugin-analytics": "^0.4.0",
|
|
41
41
|
"@atlaskit/editor-prosemirror": "1.1.0",
|
|
42
42
|
"@atlaskit/editor-shared-styles": "^2.9.0",
|