@atlaskit/editor-plugin-insert-block 7.0.16 → 7.0.18

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,21 @@
1
1
  # @atlaskit/editor-plugin-insert-block
2
2
 
3
+ ## 7.0.18
4
+
5
+ ### Patch Changes
6
+
7
+ - [`03033c71229b5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/03033c71229b5) -
8
+ ED-29543: prevent insert block toolbar buttons breaking hydration
9
+ - Updated dependencies
10
+
11
+ ## 7.0.17
12
+
13
+ ### Patch Changes
14
+
15
+ - [`71746e992b602`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/71746e992b602) -
16
+ Add aa keys & exposure event for insert-block
17
+ - Updated dependencies
18
+
3
19
  ## 7.0.16
4
20
 
5
21
  ### Patch Changes
@@ -22,6 +22,7 @@ var _uiReact = require("@atlaskit/editor-common/ui-react");
22
22
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
23
23
  var _colors = require("@atlaskit/theme/colors");
24
24
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
25
+ var _expVal = require("@atlaskit/tmp-editor-statsig/expVal");
25
26
  var _excluded = ["children"];
26
27
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
27
28
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /**
@@ -77,6 +78,10 @@ var filterForPinWhiteboardsExperiment = exports.filterForPinWhiteboardsExperimen
77
78
  });
78
79
  } else {
79
80
  if ((0, _platformFeatureFlags.fg)('confluence-whiteboards-quick-insert-l10n-eligible')) {
81
+ // Fire exposure for confluence_whiteboards_quick_insert_localised_aa
82
+ // https://switcheroo.atlassian.com/ui/gates/ccd80d32-28a1-4dcf-b3f9-dbdc02a046ff/key/confluence_whiteboards_quick_insert_localised_aa
83
+ (0, _expVal.expVal)('confluence_whiteboards_quick_insert_localised_aa', 'cohort', 'test_diagram');
84
+
80
85
  /** BEGIN locale agnostic path */
81
86
 
82
87
  /**
@@ -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() {
@@ -18,6 +18,7 @@ import { OutsideClickTargetRefContext, withReactEditorViewOuterListeners as with
18
18
  import { fg } from '@atlaskit/platform-feature-flags';
19
19
  import { N0, N30A, N60A } from '@atlaskit/theme/colors';
20
20
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
21
+ import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
21
22
  export const DEFAULT_HEIGHT = 560;
22
23
 
23
24
  /**
@@ -60,6 +61,10 @@ export const filterForPinWhiteboardsExperiment = (featuredItems, formatMessage)
60
61
  return featuredItems.filter(item => ![DIAGRAM_TITLE, BLANK_TITLE].includes(item.title));
61
62
  } else {
62
63
  if (fg('confluence-whiteboards-quick-insert-l10n-eligible')) {
64
+ // Fire exposure for confluence_whiteboards_quick_insert_localised_aa
65
+ // https://switcheroo.atlassian.com/ui/gates/ccd80d32-28a1-4dcf-b3f9-dbdc02a046ff/key/confluence_whiteboards_quick_insert_localised_aa
66
+ expVal('confluence_whiteboards_quick_insert_localised_aa', 'cohort', 'test_diagram');
67
+
63
68
  /** BEGIN locale agnostic path */
64
69
 
65
70
  /**
@@ -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 = () => {
@@ -25,6 +25,7 @@ import { OutsideClickTargetRefContext, withReactEditorViewOuterListeners as with
25
25
  import { fg } from '@atlaskit/platform-feature-flags';
26
26
  import { N0, N30A, N60A } from '@atlaskit/theme/colors';
27
27
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
28
+ import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
28
29
  export var DEFAULT_HEIGHT = 560;
29
30
 
30
31
  /**
@@ -74,6 +75,10 @@ export var filterForPinWhiteboardsExperiment = function filterForPinWhiteboardsE
74
75
  });
75
76
  } else {
76
77
  if (fg('confluence-whiteboards-quick-insert-l10n-eligible')) {
78
+ // Fire exposure for confluence_whiteboards_quick_insert_localised_aa
79
+ // https://switcheroo.atlassian.com/ui/gates/ccd80d32-28a1-4dcf-b3f9-dbdc02a046ff/key/confluence_whiteboards_quick_insert_localised_aa
80
+ expVal('confluence_whiteboards_quick_insert_localised_aa', 'cohort', 'test_diagram');
81
+
77
82
  /** BEGIN locale agnostic path */
78
83
 
79
84
  /**
@@ -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.16",
3
+ "version": "7.0.18",
4
4
  "description": "Insert block plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -35,14 +35,14 @@
35
35
  "@atlaskit/editor-plugin-code-block": "^8.1.0",
36
36
  "@atlaskit/editor-plugin-connectivity": "^6.0.0",
37
37
  "@atlaskit/editor-plugin-date": "^8.1.0",
38
- "@atlaskit/editor-plugin-emoji": "^7.4.0",
38
+ "@atlaskit/editor-plugin-emoji": "^7.5.0",
39
39
  "@atlaskit/editor-plugin-expand": "^7.2.0",
40
- "@atlaskit/editor-plugin-extension": "^9.1.0",
40
+ "@atlaskit/editor-plugin-extension": "^9.2.0",
41
41
  "@atlaskit/editor-plugin-feature-flags": "^5.0.0",
42
42
  "@atlaskit/editor-plugin-hyperlink": "^8.1.0",
43
43
  "@atlaskit/editor-plugin-image-upload": "^6.0.0",
44
- "@atlaskit/editor-plugin-layout": "^6.1.0",
45
- "@atlaskit/editor-plugin-media": "^8.3.0",
44
+ "@atlaskit/editor-plugin-layout": "^6.2.0",
45
+ "@atlaskit/editor-plugin-media": "^8.4.0",
46
46
  "@atlaskit/editor-plugin-media-insert": "^13.1.0",
47
47
  "@atlaskit/editor-plugin-mentions": "^8.2.0",
48
48
  "@atlaskit/editor-plugin-metrics": "^7.1.0",
@@ -52,9 +52,9 @@
52
52
  "@atlaskit/editor-plugin-quick-insert": "^6.0.0",
53
53
  "@atlaskit/editor-plugin-rule": "^6.1.0",
54
54
  "@atlaskit/editor-plugin-status": "^7.1.0",
55
- "@atlaskit/editor-plugin-table": "^15.2.0",
55
+ "@atlaskit/editor-plugin-table": "^15.3.0",
56
56
  "@atlaskit/editor-plugin-tasks-and-decisions": "^9.1.0",
57
- "@atlaskit/editor-plugin-toolbar": "^3.3.0",
57
+ "@atlaskit/editor-plugin-toolbar": "^3.4.0",
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",
@@ -65,11 +65,11 @@
65
65
  "@atlaskit/icon": "^28.5.0",
66
66
  "@atlaskit/icon-lab": "^5.10.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.18.0",
70
+ "@atlaskit/tmp-editor-statsig": "^13.21.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.16.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"