@atlaskit/editor-plugin-insert-block 7.0.17 → 7.0.19

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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/editor-plugin-insert-block
2
2
 
3
+ ## 7.0.19
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 7.0.18
10
+
11
+ ### Patch Changes
12
+
13
+ - [`03033c71229b5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/03033c71229b5) -
14
+ ED-29543: prevent insert block toolbar buttons breaking hydration
15
+ - Updated dependencies
16
+
3
17
  ## 7.0.17
4
18
 
5
19
  ### Patch Changes
@@ -19,7 +19,7 @@ var TableButton = exports.TableButton = function TableButton(_ref) {
19
19
  formatMessage = _useIntl.formatMessage;
20
20
  var _useEditorToolbar = (0, _toolbar.useEditorToolbar)(),
21
21
  editorView = _useEditorToolbar.editorView;
22
- if (!(editorView !== null && editorView !== void 0 && editorView.state.schema.nodes.table)) {
22
+ if (!(api !== null && api !== void 0 && api.table)) {
23
23
  return null;
24
24
  }
25
25
  var onClick = function onClick() {
@@ -8,7 +8,6 @@ exports.TableSizePicker = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
  var _reactIntlNext = require("react-intl-next");
10
10
  var _messages = require("@atlaskit/editor-common/messages");
11
- var _toolbar = require("@atlaskit/editor-common/toolbar");
12
11
  var _editorToolbar = require("@atlaskit/editor-toolbar");
13
12
  var _useTableSelectorPopup = require("./hooks/useTableSelectorPopup");
14
13
  var _TableSelectorPopupWrapper = require("./popups/TableSelectorPopupWrapper");
@@ -18,8 +17,6 @@ var TableSizePicker = exports.TableSizePicker = function TableSizePicker(_ref) {
18
17
  tableSelectorSupported = _ref.tableSelectorSupported;
19
18
  var _useIntl = (0, _reactIntlNext.useIntl)(),
20
19
  formatMessage = _useIntl.formatMessage;
21
- var _useEditorToolbar = (0, _toolbar.useEditorToolbar)(),
22
- editorView = _useEditorToolbar.editorView;
23
20
  var tableSizePickerRef = (0, _react.useRef)(null);
24
21
  var _useToolbarUI = (0, _editorToolbar.useToolbarUI)(),
25
22
  popupsMountPoint = _useToolbarUI.popupsMountPoint,
@@ -29,7 +26,7 @@ var TableSizePicker = exports.TableSizePicker = function TableSizePicker(_ref) {
29
26
  api: api,
30
27
  buttonRef: tableSizePickerRef
31
28
  });
32
- if (!(editorView !== null && editorView !== void 0 && editorView.state.schema.nodes.table) || !tableSelectorSupported) {
29
+ if (!(api !== null && api !== void 0 && api.table) || !tableSelectorSupported) {
33
30
  return null;
34
31
  }
35
32
  var onClick = function onClick(event) {
@@ -19,7 +19,7 @@ var TaskListButton = exports.TaskListButton = function TaskListButton(_ref) {
19
19
  formatMessage = _useIntl.formatMessage;
20
20
  var _useEditorToolbar = (0, _toolbar.useEditorToolbar)(),
21
21
  editorView = _useEditorToolbar.editorView;
22
- if (!(editorView !== null && editorView !== void 0 && editorView.state.schema.nodes.taskItem)) {
22
+ if (!(api !== null && api !== void 0 && api.taskDecision)) {
23
23
  return null;
24
24
  }
25
25
  var onClick = function onClick() {
@@ -15,7 +15,7 @@ export const TableButton = ({
15
15
  const {
16
16
  editorView
17
17
  } = useEditorToolbar();
18
- if (!(editorView !== null && editorView !== void 0 && editorView.state.schema.nodes.table)) {
18
+ if (!(api !== null && api !== void 0 && api.table)) {
19
19
  return null;
20
20
  }
21
21
  const onClick = () => {
@@ -1,7 +1,6 @@
1
1
  import React, { useRef } from 'react';
2
2
  import { useIntl } from 'react-intl-next';
3
3
  import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
4
- import { useEditorToolbar } from '@atlaskit/editor-common/toolbar';
5
4
  import { MoreItemsIcon, ToolbarButton, ToolbarTooltip, useToolbarUI } from '@atlaskit/editor-toolbar';
6
5
  import { useTableSelectorPopup } from './hooks/useTableSelectorPopup';
7
6
  import { TableSelectorPopupWrapper } from './popups/TableSelectorPopupWrapper';
@@ -12,9 +11,6 @@ export const TableSizePicker = ({
12
11
  const {
13
12
  formatMessage
14
13
  } = useIntl();
15
- const {
16
- editorView
17
- } = useEditorToolbar();
18
14
  const tableSizePickerRef = useRef(null);
19
15
  const {
20
16
  popupsMountPoint,
@@ -25,7 +21,7 @@ export const TableSizePicker = ({
25
21
  api,
26
22
  buttonRef: tableSizePickerRef
27
23
  });
28
- if (!(editorView !== null && editorView !== void 0 && editorView.state.schema.nodes.table) || !tableSelectorSupported) {
24
+ if (!(api !== null && api !== void 0 && api.table) || !tableSelectorSupported) {
29
25
  return null;
30
26
  }
31
27
  const onClick = event => {
@@ -15,7 +15,7 @@ export const TaskListButton = ({
15
15
  const {
16
16
  editorView
17
17
  } = useEditorToolbar();
18
- if (!(editorView !== null && editorView !== void 0 && editorView.state.schema.nodes.taskItem)) {
18
+ if (!(api !== null && api !== void 0 && api.taskDecision)) {
19
19
  return null;
20
20
  }
21
21
  const onClick = () => {
@@ -12,7 +12,7 @@ export var TableButton = function TableButton(_ref) {
12
12
  formatMessage = _useIntl.formatMessage;
13
13
  var _useEditorToolbar = useEditorToolbar(),
14
14
  editorView = _useEditorToolbar.editorView;
15
- if (!(editorView !== null && editorView !== void 0 && editorView.state.schema.nodes.table)) {
15
+ if (!(api !== null && api !== void 0 && api.table)) {
16
16
  return null;
17
17
  }
18
18
  var onClick = function onClick() {
@@ -1,7 +1,6 @@
1
1
  import React, { useRef } from 'react';
2
2
  import { useIntl } from 'react-intl-next';
3
3
  import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
4
- import { useEditorToolbar } from '@atlaskit/editor-common/toolbar';
5
4
  import { MoreItemsIcon, ToolbarButton, ToolbarTooltip, useToolbarUI } from '@atlaskit/editor-toolbar';
6
5
  import { useTableSelectorPopup } from './hooks/useTableSelectorPopup';
7
6
  import { TableSelectorPopupWrapper } from './popups/TableSelectorPopupWrapper';
@@ -10,8 +9,6 @@ export var TableSizePicker = function TableSizePicker(_ref) {
10
9
  tableSelectorSupported = _ref.tableSelectorSupported;
11
10
  var _useIntl = useIntl(),
12
11
  formatMessage = _useIntl.formatMessage;
13
- var _useEditorToolbar = useEditorToolbar(),
14
- editorView = _useEditorToolbar.editorView;
15
12
  var tableSizePickerRef = useRef(null);
16
13
  var _useToolbarUI = useToolbarUI(),
17
14
  popupsMountPoint = _useToolbarUI.popupsMountPoint,
@@ -21,7 +18,7 @@ export var TableSizePicker = function TableSizePicker(_ref) {
21
18
  api: api,
22
19
  buttonRef: tableSizePickerRef
23
20
  });
24
- if (!(editorView !== null && editorView !== void 0 && editorView.state.schema.nodes.table) || !tableSelectorSupported) {
21
+ if (!(api !== null && api !== void 0 && api.table) || !tableSelectorSupported) {
25
22
  return null;
26
23
  }
27
24
  var onClick = function onClick(event) {
@@ -12,7 +12,7 @@ export var TaskListButton = function TaskListButton(_ref) {
12
12
  formatMessage = _useIntl.formatMessage;
13
13
  var _useEditorToolbar = useEditorToolbar(),
14
14
  editorView = _useEditorToolbar.editorView;
15
- if (!(editorView !== null && editorView !== void 0 && editorView.state.schema.nodes.taskItem)) {
15
+ if (!(api !== null && api !== void 0 && api.taskDecision)) {
16
16
  return null;
17
17
  }
18
18
  var onClick = function onClick() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-insert-block",
3
- "version": "7.0.17",
3
+ "version": "7.0.19",
4
4
  "description": "Insert block plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -58,18 +58,18 @@
58
58
  "@atlaskit/editor-plugin-type-ahead": "^6.5.0",
59
59
  "@atlaskit/editor-prosemirror": "7.0.0",
60
60
  "@atlaskit/editor-shared-styles": "^3.8.0",
61
- "@atlaskit/editor-toolbar": "^0.16.0",
61
+ "@atlaskit/editor-toolbar": "^0.17.0",
62
62
  "@atlaskit/editor-toolbar-model": "^0.2.0",
63
63
  "@atlaskit/emoji": "^69.6.0",
64
64
  "@atlaskit/heading": "^5.2.0",
65
65
  "@atlaskit/icon": "^28.5.0",
66
- "@atlaskit/icon-lab": "^5.10.0",
66
+ "@atlaskit/icon-lab": "^5.11.0",
67
67
  "@atlaskit/platform-feature-flags": "^1.1.0",
68
- "@atlaskit/primitives": "^16.0.0",
68
+ "@atlaskit/primitives": "^16.1.0",
69
69
  "@atlaskit/theme": "^21.0.0",
70
- "@atlaskit/tmp-editor-statsig": "^13.19.0",
70
+ "@atlaskit/tmp-editor-statsig": "^13.22.0",
71
71
  "@atlaskit/tokens": "^7.0.0",
72
- "@atlaskit/tooltip": "^20.6.0",
72
+ "@atlaskit/tooltip": "^20.7.0",
73
73
  "@babel/runtime": "^7.0.0",
74
74
  "@emotion/react": "^11.7.1",
75
75
  "bind-event-listener": "^3.0.0",
@@ -78,7 +78,7 @@
78
78
  "react-virtualized": "^9.22.6"
79
79
  },
80
80
  "peerDependencies": {
81
- "@atlaskit/editor-common": "^110.18.0",
81
+ "@atlaskit/editor-common": "^110.19.0",
82
82
  "react": "^18.2.0",
83
83
  "react-dom": "^18.2.0",
84
84
  "react-intl-next": "npm:react-intl@^5.18.1"