@atlaskit/editor-plugin-block-type 3.2.0 → 3.2.2
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 +16 -0
- package/dist/cjs/plugin/index.js +2 -1
- package/dist/cjs/plugin/ui/PrimaryToolbarComponent.js +4 -2
- package/dist/cjs/plugin/ui/ToolbarBlockType/index.js +2 -1
- package/dist/es2019/plugin/index.js +2 -1
- package/dist/es2019/plugin/ui/PrimaryToolbarComponent.js +4 -2
- package/dist/es2019/plugin/ui/ToolbarBlockType/index.js +2 -1
- package/dist/esm/plugin/index.js +2 -1
- package/dist/esm/plugin/ui/PrimaryToolbarComponent.js +4 -2
- package/dist/esm/plugin/ui/ToolbarBlockType/index.js +2 -1
- package/dist/types/plugin/ui/PrimaryToolbarComponent.d.ts +2 -1
- package/dist/types/plugin/ui/ToolbarBlockType/index.d.ts +1 -0
- package/dist/types-ts4.5/plugin/ui/PrimaryToolbarComponent.d.ts +2 -1
- package/dist/types-ts4.5/plugin/ui/ToolbarBlockType/index.d.ts +1 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,21 @@
|
|
1
1
|
# @atlaskit/editor-plugin-block-type
|
2
2
|
|
3
|
+
## 3.2.2
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- [#101524](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/101524)
|
8
|
+
[`4821570088e6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4821570088e6) -
|
9
|
+
ED-23362 Bump ADF schema to version 36.8.1 and add support for adf validation and transformation
|
10
|
+
|
11
|
+
## 3.2.1
|
12
|
+
|
13
|
+
### Patch Changes
|
14
|
+
|
15
|
+
- [#95938](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/95938)
|
16
|
+
[`f1309fe9e31b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f1309fe9e31b) -
|
17
|
+
ECA11Y-224: Missing list markup for 'Text styles' dropdown in the main toolbar
|
18
|
+
|
3
19
|
## 3.2.0
|
4
20
|
|
5
21
|
### Minor Changes
|
package/dist/cjs/plugin/index.js
CHANGED
@@ -187,7 +187,8 @@ var blockTypePlugin = exports.blockTypePlugin = function blockTypePlugin(_ref3)
|
|
187
187
|
api: api,
|
188
188
|
popupsMountPoint: popupsMountPoint,
|
189
189
|
popupsBoundariesElement: popupsBoundariesElement,
|
190
|
-
popupsScrollableElement: popupsScrollableElement
|
190
|
+
popupsScrollableElement: popupsScrollableElement,
|
191
|
+
shouldUseDefaultRole: false
|
191
192
|
});
|
192
193
|
},
|
193
194
|
pluginsOptions: {
|
@@ -16,7 +16,8 @@ function PrimaryToolbarComponent(_ref) {
|
|
16
16
|
isToolbarReducedSpacing = _ref.isToolbarReducedSpacing,
|
17
17
|
popupsMountPoint = _ref.popupsMountPoint,
|
18
18
|
popupsBoundariesElement = _ref.popupsBoundariesElement,
|
19
|
-
popupsScrollableElement = _ref.popupsScrollableElement
|
19
|
+
popupsScrollableElement = _ref.popupsScrollableElement,
|
20
|
+
shouldUseDefaultRole = _ref.shouldUseDefaultRole;
|
20
21
|
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(api, ['blockType']),
|
21
22
|
blockTypeState = _useSharedPluginState.blockTypeState;
|
22
23
|
var boundSetBlockType = function boundSetBlockType(name) {
|
@@ -31,6 +32,7 @@ function PrimaryToolbarComponent(_ref) {
|
|
31
32
|
pluginState: blockTypeState,
|
32
33
|
popupsMountPoint: popupsMountPoint,
|
33
34
|
popupsBoundariesElement: popupsBoundariesElement,
|
34
|
-
popupsScrollableElement: popupsScrollableElement
|
35
|
+
popupsScrollableElement: popupsScrollableElement,
|
36
|
+
shouldUseDefaultRole: shouldUseDefaultRole
|
35
37
|
});
|
36
38
|
}
|
@@ -126,6 +126,7 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
|
|
126
126
|
currentBlockType = _this$props$pluginSta2.currentBlockType,
|
127
127
|
blockTypesDisabled = _this$props$pluginSta2.blockTypesDisabled,
|
128
128
|
availableBlockTypes = _this$props$pluginSta2.availableBlockTypes,
|
129
|
+
shouldUseDefaultRole = _this$props.shouldUseDefaultRole,
|
129
130
|
formatMessage = _this$props.intl.formatMessage;
|
130
131
|
var isHeadingDisabled = !availableBlockTypes.some(function (blockType) {
|
131
132
|
return blockType.nodeName === 'heading';
|
@@ -155,7 +156,7 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
|
|
155
156
|
zIndex: _editorSharedStyles.akEditorMenuZIndex,
|
156
157
|
fitHeight: 360,
|
157
158
|
fitWidth: 106,
|
158
|
-
shouldUseDefaultRole:
|
159
|
+
shouldUseDefaultRole: shouldUseDefaultRole,
|
159
160
|
shouldFocusFirstItem: function shouldFocusFirstItem() {
|
160
161
|
if (isOpenedByKeyboard) {
|
161
162
|
// eslint-disable-next-line @repo/internal/react/no-set-state-inside-render
|
@@ -171,7 +171,8 @@ const blockTypePlugin = ({
|
|
171
171
|
api: api,
|
172
172
|
popupsMountPoint: popupsMountPoint,
|
173
173
|
popupsBoundariesElement: popupsBoundariesElement,
|
174
|
-
popupsScrollableElement: popupsScrollableElement
|
174
|
+
popupsScrollableElement: popupsScrollableElement,
|
175
|
+
shouldUseDefaultRole: false
|
175
176
|
});
|
176
177
|
},
|
177
178
|
pluginsOptions: {
|
@@ -9,7 +9,8 @@ export function PrimaryToolbarComponent({
|
|
9
9
|
isToolbarReducedSpacing,
|
10
10
|
popupsMountPoint,
|
11
11
|
popupsBoundariesElement,
|
12
|
-
popupsScrollableElement
|
12
|
+
popupsScrollableElement,
|
13
|
+
shouldUseDefaultRole
|
13
14
|
}) {
|
14
15
|
const {
|
15
16
|
blockTypeState
|
@@ -26,6 +27,7 @@ export function PrimaryToolbarComponent({
|
|
26
27
|
pluginState: blockTypeState,
|
27
28
|
popupsMountPoint: popupsMountPoint,
|
28
29
|
popupsBoundariesElement: popupsBoundariesElement,
|
29
|
-
popupsScrollableElement: popupsScrollableElement
|
30
|
+
popupsScrollableElement: popupsScrollableElement,
|
31
|
+
shouldUseDefaultRole: shouldUseDefaultRole
|
30
32
|
});
|
31
33
|
}
|
@@ -108,6 +108,7 @@ class ToolbarBlockType extends React.PureComponent {
|
|
108
108
|
blockTypesDisabled,
|
109
109
|
availableBlockTypes
|
110
110
|
},
|
111
|
+
shouldUseDefaultRole,
|
111
112
|
intl: {
|
112
113
|
formatMessage
|
113
114
|
}
|
@@ -134,7 +135,7 @@ class ToolbarBlockType extends React.PureComponent {
|
|
134
135
|
zIndex: akEditorMenuZIndex,
|
135
136
|
fitHeight: 360,
|
136
137
|
fitWidth: 106,
|
137
|
-
shouldUseDefaultRole:
|
138
|
+
shouldUseDefaultRole: shouldUseDefaultRole,
|
138
139
|
shouldFocusFirstItem: () => {
|
139
140
|
if (isOpenedByKeyboard) {
|
140
141
|
// eslint-disable-next-line @repo/internal/react/no-set-state-inside-render
|
package/dist/esm/plugin/index.js
CHANGED
@@ -174,7 +174,8 @@ var blockTypePlugin = function blockTypePlugin(_ref3) {
|
|
174
174
|
api: api,
|
175
175
|
popupsMountPoint: popupsMountPoint,
|
176
176
|
popupsBoundariesElement: popupsBoundariesElement,
|
177
|
-
popupsScrollableElement: popupsScrollableElement
|
177
|
+
popupsScrollableElement: popupsScrollableElement,
|
178
|
+
shouldUseDefaultRole: false
|
178
179
|
});
|
179
180
|
},
|
180
181
|
pluginsOptions: {
|
@@ -9,7 +9,8 @@ export function PrimaryToolbarComponent(_ref) {
|
|
9
9
|
isToolbarReducedSpacing = _ref.isToolbarReducedSpacing,
|
10
10
|
popupsMountPoint = _ref.popupsMountPoint,
|
11
11
|
popupsBoundariesElement = _ref.popupsBoundariesElement,
|
12
|
-
popupsScrollableElement = _ref.popupsScrollableElement
|
12
|
+
popupsScrollableElement = _ref.popupsScrollableElement,
|
13
|
+
shouldUseDefaultRole = _ref.shouldUseDefaultRole;
|
13
14
|
var _useSharedPluginState = useSharedPluginState(api, ['blockType']),
|
14
15
|
blockTypeState = _useSharedPluginState.blockTypeState;
|
15
16
|
var boundSetBlockType = function boundSetBlockType(name) {
|
@@ -24,6 +25,7 @@ export function PrimaryToolbarComponent(_ref) {
|
|
24
25
|
pluginState: blockTypeState,
|
25
26
|
popupsMountPoint: popupsMountPoint,
|
26
27
|
popupsBoundariesElement: popupsBoundariesElement,
|
27
|
-
popupsScrollableElement: popupsScrollableElement
|
28
|
+
popupsScrollableElement: popupsScrollableElement,
|
29
|
+
shouldUseDefaultRole: shouldUseDefaultRole
|
28
30
|
});
|
29
31
|
}
|
@@ -120,6 +120,7 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
|
|
120
120
|
currentBlockType = _this$props$pluginSta2.currentBlockType,
|
121
121
|
blockTypesDisabled = _this$props$pluginSta2.blockTypesDisabled,
|
122
122
|
availableBlockTypes = _this$props$pluginSta2.availableBlockTypes,
|
123
|
+
shouldUseDefaultRole = _this$props.shouldUseDefaultRole,
|
123
124
|
formatMessage = _this$props.intl.formatMessage;
|
124
125
|
var isHeadingDisabled = !availableBlockTypes.some(function (blockType) {
|
125
126
|
return blockType.nodeName === 'heading';
|
@@ -149,7 +150,7 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
|
|
149
150
|
zIndex: akEditorMenuZIndex,
|
150
151
|
fitHeight: 360,
|
151
152
|
fitWidth: 106,
|
152
|
-
shouldUseDefaultRole:
|
153
|
+
shouldUseDefaultRole: shouldUseDefaultRole,
|
153
154
|
shouldFocusFirstItem: function shouldFocusFirstItem() {
|
154
155
|
if (isOpenedByKeyboard) {
|
155
156
|
// eslint-disable-next-line @repo/internal/react/no-set-state-inside-render
|
@@ -9,6 +9,7 @@ interface PrimaryToolbarComponentProps {
|
|
9
9
|
popupsMountPoint?: HTMLElement;
|
10
10
|
popupsBoundariesElement?: HTMLElement;
|
11
11
|
popupsScrollableElement?: HTMLElement;
|
12
|
+
shouldUseDefaultRole: boolean;
|
12
13
|
}
|
13
|
-
export declare function PrimaryToolbarComponent({ api, isSmall, disabled, isToolbarReducedSpacing, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, }: PrimaryToolbarComponentProps): JSX.Element;
|
14
|
+
export declare function PrimaryToolbarComponent({ api, isSmall, disabled, isToolbarReducedSpacing, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, shouldUseDefaultRole, }: PrimaryToolbarComponentProps): JSX.Element;
|
14
15
|
export {};
|
@@ -9,6 +9,7 @@ interface PrimaryToolbarComponentProps {
|
|
9
9
|
popupsMountPoint?: HTMLElement;
|
10
10
|
popupsBoundariesElement?: HTMLElement;
|
11
11
|
popupsScrollableElement?: HTMLElement;
|
12
|
+
shouldUseDefaultRole: boolean;
|
12
13
|
}
|
13
|
-
export declare function PrimaryToolbarComponent({ api, isSmall, disabled, isToolbarReducedSpacing, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, }: PrimaryToolbarComponentProps): JSX.Element;
|
14
|
+
export declare function PrimaryToolbarComponent({ api, isSmall, disabled, isToolbarReducedSpacing, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, shouldUseDefaultRole, }: PrimaryToolbarComponentProps): JSX.Element;
|
14
15
|
export {};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atlaskit/editor-plugin-block-type",
|
3
|
-
"version": "3.2.
|
3
|
+
"version": "3.2.2",
|
4
4
|
"description": "BlockType plugin for @atlaskit/editor-core",
|
5
5
|
"author": "Atlassian Pty Ltd",
|
6
6
|
"license": "Apache-2.0",
|
@@ -35,8 +35,8 @@
|
|
35
35
|
"./styles": "./src/styles.ts"
|
36
36
|
},
|
37
37
|
"dependencies": {
|
38
|
-
"@atlaskit/adf-schema": "^36.
|
39
|
-
"@atlaskit/editor-common": "^80.
|
38
|
+
"@atlaskit/adf-schema": "^36.8.0",
|
39
|
+
"@atlaskit/editor-common": "^80.4.0",
|
40
40
|
"@atlaskit/editor-plugin-analytics": "^1.2.0",
|
41
41
|
"@atlaskit/editor-prosemirror": "4.0.1",
|
42
42
|
"@atlaskit/editor-shared-styles": "^2.11.0",
|