@atlaskit/editor-plugin-insert-block 3.2.10 → 3.2.12

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,17 @@
1
1
  # @atlaskit/editor-plugin-insert-block
2
2
 
3
+ ## 3.2.12
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 3.2.11
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 3.2.10
4
16
 
5
17
  ### Patch Changes
@@ -18,8 +18,7 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
18
18
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
19
19
  var _toggleInsertBlock = require("./pm-plugins/toggleInsertBlock");
20
20
  var _ToolbarInsertBlock = _interopRequireDefault(require("./ui/ToolbarInsertBlock"));
21
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
22
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
21
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
23
22
  // Ignored via go/ees005
24
23
  // eslint-disable-next-line import/no-named-as-default
25
24
 
@@ -10,8 +10,7 @@ var _react = _interopRequireDefault(require("react"));
10
10
  var _ui = require("@atlaskit/editor-common/ui");
11
11
  var _InsertMenu = _interopRequireWildcard(require("../ElementBrowser/InsertMenu"));
12
12
  var _dropdownButton = require("./dropdown-button");
13
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
14
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
13
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
15
14
  // This determines how the popup should fit. We prefer the insert menu
16
15
  // opening on the bottom as we have a search bar and should only open on
17
16
  // top if there is more than sufficient room.
@@ -431,10 +431,10 @@ var ToolbarInsertBlock = exports.ToolbarInsertBlock = /*#__PURE__*/function (_Re
431
431
  (0, _defineProperty2.default)(_this, "onItemActivated", function (_ref4) {
432
432
  var item = _ref4.item,
433
433
  inputMethod = _ref4.inputMethod;
434
- var _this$props10 = _this.props,
435
- editorView = _this$props10.editorView,
436
- handleImageUpload = _this$props10.handleImageUpload,
437
- expandEnabled = _this$props10.expandEnabled;
434
+ var _this$props0 = _this.props,
435
+ editorView = _this$props0.editorView,
436
+ handleImageUpload = _this$props0.handleImageUpload,
437
+ expandEnabled = _this$props0.expandEnabled;
438
438
 
439
439
  // need to do this before inserting nodes so scrollIntoView works properly
440
440
  if (!editorView.hasFocus()) {
@@ -575,11 +575,11 @@ var ToolbarInsertBlock = exports.ToolbarInsertBlock = /*#__PURE__*/function (_Re
575
575
  value: function renderPopup() {
576
576
  var _this2 = this;
577
577
  var emojiPickerOpen = this.state.emojiPickerOpen;
578
- var _this$props11 = this.props,
579
- popupsMountPoint = _this$props11.popupsMountPoint,
580
- popupsBoundariesElement = _this$props11.popupsBoundariesElement,
581
- popupsScrollableElement = _this$props11.popupsScrollableElement,
582
- emojiProvider = _this$props11.emojiProvider;
578
+ var _this$props1 = this.props,
579
+ popupsMountPoint = _this$props1.popupsMountPoint,
580
+ popupsBoundariesElement = _this$props1.popupsBoundariesElement,
581
+ popupsScrollableElement = _this$props1.popupsScrollableElement,
582
+ emojiProvider = _this$props1.emojiProvider;
583
583
  var dropdownEmoji = this.state.dropdownItems.some(function (_ref6) {
584
584
  var name = _ref6.value.name;
585
585
  return name === 'emoji';
@@ -620,11 +620,11 @@ var ToolbarInsertBlock = exports.ToolbarInsertBlock = /*#__PURE__*/function (_Re
620
620
  var _this$state = this.state,
621
621
  isTableSelectorOpen = _this$state.isTableSelectorOpen,
622
622
  isTableSelectorOpenedByKeyboard = _this$state.isTableSelectorOpenedByKeyboard;
623
- var _this$props12 = this.props,
624
- popupsMountPoint = _this$props12.popupsMountPoint,
625
- popupsBoundariesElement = _this$props12.popupsBoundariesElement,
626
- popupsScrollableElement = _this$props12.popupsScrollableElement,
627
- pluginInjectionApi = _this$props12.pluginInjectionApi;
623
+ var _this$props10 = this.props,
624
+ popupsMountPoint = _this$props10.popupsMountPoint,
625
+ popupsBoundariesElement = _this$props10.popupsBoundariesElement,
626
+ popupsScrollableElement = _this$props10.popupsScrollableElement,
627
+ pluginInjectionApi = _this$props10.pluginInjectionApi;
628
628
  var ref = (_this$tableButtonRef$ = this.tableButtonRef.current) !== null && _this$tableButtonRef$ !== void 0 ? _this$tableButtonRef$ : undefined;
629
629
  if (!isTableSelectorOpen) {
630
630
  return null;
@@ -677,10 +677,10 @@ var ToolbarInsertBlock = exports.ToolbarInsertBlock = /*#__PURE__*/function (_Re
677
677
  dropdownItems = _this$state2.dropdownItems,
678
678
  emojiPickerOpen = _this$state2.emojiPickerOpen,
679
679
  isTableSelectorOpen = _this$state2.isTableSelectorOpen;
680
- var _this$props13 = this.props,
681
- isDisabled = _this$props13.isDisabled,
682
- isReducedSpacing = _this$props13.isReducedSpacing,
683
- editorAppearance = _this$props13.editorAppearance;
680
+ var _this$props11 = this.props,
681
+ isDisabled = _this$props11.isDisabled,
682
+ isReducedSpacing = _this$props11.isReducedSpacing,
683
+ editorAppearance = _this$props11.editorAppearance;
684
684
  var isFullPageAppearance = ['full-page', 'full-width'].includes(editorAppearance !== null && editorAppearance !== void 0 ? editorAppearance : '');
685
685
  var isTableButtonVisible = buttons.some(function (_ref7) {
686
686
  var value = _ref7.value;
@@ -41,7 +41,7 @@ const InsertMenu = ({
41
41
  pluginInjectionApi,
42
42
  isFullPageAppearance
43
43
  }) => {
44
- var _pluginInjectionApi$q8, _pluginInjectionApi$q9, _pluginInjectionApi$q10;
44
+ var _pluginInjectionApi$q8, _pluginInjectionApi$q9, _pluginInjectionApi$q0;
45
45
  const [itemCount, setItemCount] = useState(0);
46
46
  const [height, setHeight] = useState(DEFAULT_HEIGHT);
47
47
  const cache = useMemo(() => {
@@ -127,11 +127,11 @@ const InsertMenu = ({
127
127
  setItemCount(result.length);
128
128
  return result;
129
129
  }, [pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q8 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q8 === void 0 ? void 0 : _pluginInjectionApi$q8.actions, quickInsertDropdownItems, connectivityMode]);
130
- const emptyStateHandler = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q9 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q9 === void 0 ? void 0 : (_pluginInjectionApi$q10 = _pluginInjectionApi$q9.sharedState.currentState()) === null || _pluginInjectionApi$q10 === void 0 ? void 0 : _pluginInjectionApi$q10.emptyStateHandler;
130
+ const emptyStateHandler = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q9 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q9 === void 0 ? void 0 : (_pluginInjectionApi$q0 = _pluginInjectionApi$q9.sharedState.currentState()) === null || _pluginInjectionApi$q0 === void 0 ? void 0 : _pluginInjectionApi$q0.emptyStateHandler;
131
131
  const onViewMore = useCallback(() => {
132
- var _pluginInjectionApi$c, _pluginInjectionApi$q11;
132
+ var _pluginInjectionApi$c, _pluginInjectionApi$q1;
133
133
  toggleVisiblity();
134
- pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$c = pluginInjectionApi.core) === null || _pluginInjectionApi$c === void 0 ? void 0 : _pluginInjectionApi$c.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q11 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q11 === void 0 ? void 0 : _pluginInjectionApi$q11.commands.openElementBrowserModal);
134
+ pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$c = pluginInjectionApi.core) === null || _pluginInjectionApi$c === void 0 ? void 0 : _pluginInjectionApi$c.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q1 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q1 === void 0 ? void 0 : _pluginInjectionApi$q1.commands.openElementBrowserModal);
135
135
  }, [pluginInjectionApi, toggleVisiblity]);
136
136
  return (
137
137
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
@@ -425,10 +425,10 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
425
425
  _defineProperty(_this, "onItemActivated", function (_ref4) {
426
426
  var item = _ref4.item,
427
427
  inputMethod = _ref4.inputMethod;
428
- var _this$props10 = _this.props,
429
- editorView = _this$props10.editorView,
430
- handleImageUpload = _this$props10.handleImageUpload,
431
- expandEnabled = _this$props10.expandEnabled;
428
+ var _this$props0 = _this.props,
429
+ editorView = _this$props0.editorView,
430
+ handleImageUpload = _this$props0.handleImageUpload,
431
+ expandEnabled = _this$props0.expandEnabled;
432
432
 
433
433
  // need to do this before inserting nodes so scrollIntoView works properly
434
434
  if (!editorView.hasFocus()) {
@@ -569,11 +569,11 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
569
569
  value: function renderPopup() {
570
570
  var _this2 = this;
571
571
  var emojiPickerOpen = this.state.emojiPickerOpen;
572
- var _this$props11 = this.props,
573
- popupsMountPoint = _this$props11.popupsMountPoint,
574
- popupsBoundariesElement = _this$props11.popupsBoundariesElement,
575
- popupsScrollableElement = _this$props11.popupsScrollableElement,
576
- emojiProvider = _this$props11.emojiProvider;
572
+ var _this$props1 = this.props,
573
+ popupsMountPoint = _this$props1.popupsMountPoint,
574
+ popupsBoundariesElement = _this$props1.popupsBoundariesElement,
575
+ popupsScrollableElement = _this$props1.popupsScrollableElement,
576
+ emojiProvider = _this$props1.emojiProvider;
577
577
  var dropdownEmoji = this.state.dropdownItems.some(function (_ref6) {
578
578
  var name = _ref6.value.name;
579
579
  return name === 'emoji';
@@ -614,11 +614,11 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
614
614
  var _this$state = this.state,
615
615
  isTableSelectorOpen = _this$state.isTableSelectorOpen,
616
616
  isTableSelectorOpenedByKeyboard = _this$state.isTableSelectorOpenedByKeyboard;
617
- var _this$props12 = this.props,
618
- popupsMountPoint = _this$props12.popupsMountPoint,
619
- popupsBoundariesElement = _this$props12.popupsBoundariesElement,
620
- popupsScrollableElement = _this$props12.popupsScrollableElement,
621
- pluginInjectionApi = _this$props12.pluginInjectionApi;
617
+ var _this$props10 = this.props,
618
+ popupsMountPoint = _this$props10.popupsMountPoint,
619
+ popupsBoundariesElement = _this$props10.popupsBoundariesElement,
620
+ popupsScrollableElement = _this$props10.popupsScrollableElement,
621
+ pluginInjectionApi = _this$props10.pluginInjectionApi;
622
622
  var ref = (_this$tableButtonRef$ = this.tableButtonRef.current) !== null && _this$tableButtonRef$ !== void 0 ? _this$tableButtonRef$ : undefined;
623
623
  if (!isTableSelectorOpen) {
624
624
  return null;
@@ -671,10 +671,10 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
671
671
  dropdownItems = _this$state2.dropdownItems,
672
672
  emojiPickerOpen = _this$state2.emojiPickerOpen,
673
673
  isTableSelectorOpen = _this$state2.isTableSelectorOpen;
674
- var _this$props13 = this.props,
675
- isDisabled = _this$props13.isDisabled,
676
- isReducedSpacing = _this$props13.isReducedSpacing,
677
- editorAppearance = _this$props13.editorAppearance;
674
+ var _this$props11 = this.props,
675
+ isDisabled = _this$props11.isDisabled,
676
+ isReducedSpacing = _this$props11.isReducedSpacing,
677
+ editorAppearance = _this$props11.editorAppearance;
678
678
  var isFullPageAppearance = ['full-page', 'full-width'].includes(editorAppearance !== null && editorAppearance !== void 0 ? editorAppearance : '');
679
679
  var isTableButtonVisible = buttons.some(function (_ref7) {
680
680
  var value = _ref7.value;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-insert-block",
3
- "version": "3.2.10",
3
+ "version": "3.2.12",
4
4
  "description": "Insert block plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -34,21 +34,21 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@atlaskit/button": "^23.2.0",
37
- "@atlaskit/editor-common": "^106.0.0",
37
+ "@atlaskit/editor-common": "^106.5.0",
38
38
  "@atlaskit/editor-plugin-analytics": "^2.3.0",
39
39
  "@atlaskit/editor-plugin-block-type": "^5.1.0",
40
40
  "@atlaskit/editor-plugin-code-block": "^4.4.0",
41
41
  "@atlaskit/editor-plugin-connectivity": "^2.0.0",
42
42
  "@atlaskit/editor-plugin-date": "^4.3.0",
43
43
  "@atlaskit/editor-plugin-emoji": "^3.7.0",
44
- "@atlaskit/editor-plugin-expand": "^3.2.0",
45
- "@atlaskit/editor-plugin-extension": "^5.4.0",
44
+ "@atlaskit/editor-plugin-expand": "^3.3.0",
45
+ "@atlaskit/editor-plugin-extension": "^5.5.0",
46
46
  "@atlaskit/editor-plugin-feature-flags": "^1.4.0",
47
47
  "@atlaskit/editor-plugin-hyperlink": "^4.4.0",
48
48
  "@atlaskit/editor-plugin-image-upload": "^2.0.0",
49
- "@atlaskit/editor-plugin-layout": "^2.8.0",
49
+ "@atlaskit/editor-plugin-layout": "^2.9.0",
50
50
  "@atlaskit/editor-plugin-media": "^3.0.0",
51
- "@atlaskit/editor-plugin-media-insert": "^6.3.0",
51
+ "@atlaskit/editor-plugin-media-insert": "^7.0.0",
52
52
  "@atlaskit/editor-plugin-mentions": "^4.7.0",
53
53
  "@atlaskit/editor-plugin-metrics": "^3.4.0",
54
54
  "@atlaskit/editor-plugin-panel": "^4.4.0",
@@ -57,21 +57,21 @@
57
57
  "@atlaskit/editor-plugin-quick-insert": "^2.5.0",
58
58
  "@atlaskit/editor-plugin-rule": "^2.1.0",
59
59
  "@atlaskit/editor-plugin-status": "^3.1.0",
60
- "@atlaskit/editor-plugin-table": "^10.11.0",
60
+ "@atlaskit/editor-plugin-table": "^10.12.0",
61
61
  "@atlaskit/editor-plugin-tasks-and-decisions": "^5.1.0",
62
62
  "@atlaskit/editor-plugin-type-ahead": "^2.7.0",
63
63
  "@atlaskit/editor-prosemirror": "7.0.0",
64
64
  "@atlaskit/editor-shared-styles": "^3.4.0",
65
- "@atlaskit/emoji": "^69.2.0",
65
+ "@atlaskit/emoji": "^69.3.0",
66
66
  "@atlaskit/heading": "^5.2.0",
67
67
  "@atlaskit/icon": "^26.4.0",
68
- "@atlaskit/icon-lab": "^4.17.0",
68
+ "@atlaskit/icon-lab": "^4.18.0",
69
69
  "@atlaskit/platform-feature-flags": "^1.1.0",
70
70
  "@atlaskit/primitives": "^14.8.0",
71
71
  "@atlaskit/theme": "^18.0.0",
72
- "@atlaskit/tmp-editor-statsig": "^5.2.0",
73
- "@atlaskit/tokens": "^4.9.0",
74
- "@atlaskit/tooltip": "^20.2.0",
72
+ "@atlaskit/tmp-editor-statsig": "^6.0.0",
73
+ "@atlaskit/tokens": "^5.1.0",
74
+ "@atlaskit/tooltip": "^20.3.0",
75
75
  "@babel/runtime": "^7.0.0",
76
76
  "@emotion/react": "^11.7.1",
77
77
  "bind-event-listener": "^3.0.0",