@atlaskit/editor-plugin-quick-insert 16.1.3 → 16.1.5

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-quick-insert
2
2
 
3
+ ## 16.1.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`0841b102bfe4a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0841b102bfe4a) -
8
+ Add a PM-state-backed multi-location left block-controls surface and register the display-only
9
+ heading collapse button behind `platform_editor_block_control_migration` and
10
+ `platform_editor_collapsible_headings`.
11
+ - Updated dependencies
12
+
13
+ ## 16.1.4
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+
3
19
  ## 16.1.3
4
20
 
5
21
  ### Patch Changes
@@ -16,7 +16,11 @@ var _heading = _interopRequireDefault(require("@atlaskit/heading/heading"));
16
16
  var _keys = require("@atlaskit/editor-common/quick-insert/keys");
17
17
  var _typeAheadGetMenuFooterSectionKey = require("@atlaskit/editor-common/type-ahead-get-menu-footer-section-key");
18
18
  var _typeAheadGetSectionOverflowItemKey = require("@atlaskit/editor-common/type-ahead-get-section-overflow-item-key");
19
- var _modalDialog = _interopRequireWildcard(require("@atlaskit/modal-dialog"));
19
+ var _modalDialog = _interopRequireDefault(require("@atlaskit/modal-dialog/modal-dialog"));
20
+ var _modalBody = _interopRequireDefault(require("@atlaskit/modal-dialog/modal-body"));
21
+ var _modalFooter = _interopRequireDefault(require("@atlaskit/modal-dialog/modal-footer"));
22
+ var _modalHeader = _interopRequireDefault(require("@atlaskit/modal-dialog/modal-header"));
23
+ var _modalTransition = _interopRequireDefault(require("@atlaskit/modal-dialog/modal-transition"));
20
24
  var _model = require("./model");
21
25
  var _RegistryElementBrowserCategories = require("./RegistryElementBrowserCategories");
22
26
  var _RegistryElementBrowserFooter = require("./RegistryElementBrowserFooter");
@@ -135,7 +139,7 @@ var RegistryElementBrowser = exports.RegistryElementBrowser = function RegistryE
135
139
  onConfirmInsert();
136
140
  }
137
141
  }, [onClose, onConfirmInsert, selectedKey]);
138
- return /*#__PURE__*/_react.default.createElement(_modalDialog.ModalTransition, null, isOpen && /*#__PURE__*/_react.default.createElement(_modalDialog.default, {
142
+ return /*#__PURE__*/_react.default.createElement(_modalTransition.default, null, isOpen && /*#__PURE__*/_react.default.createElement(_modalDialog.default, {
139
143
  label: formatMessage({
140
144
  defaultMessage: 'Insert elements',
141
145
  id: 'editor.quick-insert.title'
@@ -143,12 +147,12 @@ var RegistryElementBrowser = exports.RegistryElementBrowser = function RegistryE
143
147
  onClose: onClose,
144
148
  onCloseComplete: onCloseComplete,
145
149
  width: "x-large"
146
- }, /*#__PURE__*/_react.default.createElement(_modalDialog.ModalHeader, null, /*#__PURE__*/_react.default.createElement(_heading.default, {
150
+ }, /*#__PURE__*/_react.default.createElement(_modalHeader.default, null, /*#__PURE__*/_react.default.createElement(_heading.default, {
147
151
  size: "medium"
148
152
  }, formatMessage({
149
153
  defaultMessage: 'Insert elements',
150
154
  id: 'editor.quick-insert.title'
151
- }))), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalBody, null, /*#__PURE__*/_react.default.createElement("div", {
155
+ }))), /*#__PURE__*/_react.default.createElement(_modalBody.default, null, /*#__PURE__*/_react.default.createElement("div", {
152
156
  className: (0, _runtime.ax)(["_zulp1ejb _1e0c11p5 _yv0eo9bh"])
153
157
  }, /*#__PURE__*/_react.default.createElement(_RegistryElementBrowserCategories.RegistryElementBrowserCategories, {
154
158
  query: query,
@@ -167,7 +171,7 @@ var RegistryElementBrowser = exports.RegistryElementBrowser = function RegistryE
167
171
  onKeyDown: onKeyDown,
168
172
  onSearchChange: onSearchChange,
169
173
  onSelect: onRegistrySelect
170
- }))), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalFooter, null, /*#__PURE__*/_react.default.createElement(_RegistryElementBrowserFooter.RegistryElementBrowserFooter, {
174
+ }))), /*#__PURE__*/_react.default.createElement(_modalFooter.default, null, /*#__PURE__*/_react.default.createElement(_RegistryElementBrowserFooter.RegistryElementBrowserFooter, {
171
175
  helpUrl: helpUrl,
172
176
  isInsertEnabled: Boolean(selectedKey),
173
177
  onClose: onClose,
@@ -14,7 +14,7 @@ var _reactIntl = require("react-intl");
14
14
  var _link = _interopRequireDefault(require("@atlaskit/button/link"));
15
15
  var _provider = require("@atlaskit/editor-common/quick-insert/provider");
16
16
  var _compiled = require("@atlaskit/primitives/compiled");
17
- var _textfield = _interopRequireDefault(require("@atlaskit/textfield"));
17
+ var _textField = _interopRequireDefault(require("@atlaskit/textfield/text-field"));
18
18
  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); }
19
19
  var resultsGridStyles = null;
20
20
  var RegistryElementBrowserItem = function RegistryElementBrowserItem(_ref) {
@@ -64,7 +64,7 @@ var RegistryElementBrowserSearchResults = exports.RegistryElementBrowserSearchRe
64
64
  formatMessage = _useIntl.formatMessage;
65
65
  return /*#__PURE__*/_react.default.createElement(_compiled.Stack, {
66
66
  space: "space.200"
67
- }, /*#__PURE__*/_react.default.createElement(_textfield.default, {
67
+ }, /*#__PURE__*/_react.default.createElement(_textField.default, {
68
68
  autoFocus: true,
69
69
  "aria-controls": resultsId,
70
70
  "aria-label": formatMessage({
@@ -26,7 +26,7 @@ var getBlockControlQuickInsertComponents = exports.getBlockControlQuickInsertCom
26
26
  var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
27
27
  surfaceContext = _ref2.surfaceContext;
28
28
  var context = surfaceContext === null || surfaceContext === void 0 ? void 0 : surfaceContext.get(_blockControlUiContext.BLOCK_CONTROL_UI_CONTEXT);
29
- return !context || context.targetNode.pos !== context.rootNode.pos;
29
+ return !(context !== null && context !== void 0 && context.activeNode) || context.targetNode.pos !== context.rootNode.pos || context.targetNode.pos !== context.activeNode.rootPos;
30
30
  },
31
31
  component: function component(_ref3) {
32
32
  var surfaceContext = _ref3.surfaceContext;
@@ -7,7 +7,11 @@ import Heading from '@atlaskit/heading/heading';
7
7
  import { MENU, RECOMMENDED_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
8
8
  import { getMenuFooterSectionKey } from '@atlaskit/editor-common/type-ahead-get-menu-footer-section-key';
9
9
  import { getSectionOverflowItemKey } from '@atlaskit/editor-common/type-ahead-get-section-overflow-item-key';
10
- import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTransition } from '@atlaskit/modal-dialog';
10
+ import Modal from '@atlaskit/modal-dialog/modal-dialog';
11
+ import ModalBody from '@atlaskit/modal-dialog/modal-body';
12
+ import ModalFooter from '@atlaskit/modal-dialog/modal-footer';
13
+ import ModalHeader from '@atlaskit/modal-dialog/modal-header';
14
+ import ModalTransition from '@atlaskit/modal-dialog/modal-transition';
11
15
  import { createRegistryElementBrowserModel, getInitialRegistryElementBrowserSection, getRegistryElementBrowserItems } from './model';
12
16
  import { RegistryElementBrowserCategories } from './RegistryElementBrowserCategories';
13
17
  import { RegistryElementBrowserFooter } from './RegistryElementBrowserFooter';
@@ -6,7 +6,7 @@ import { useIntl } from 'react-intl';
6
6
  import LinkButton from '@atlaskit/button/link';
7
7
  import { QuickInsertProvider } from '@atlaskit/editor-common/quick-insert/provider';
8
8
  import { Stack, Text } from '@atlaskit/primitives/compiled';
9
- import Textfield from '@atlaskit/textfield';
9
+ import Textfield from '@atlaskit/textfield/text-field';
10
10
  const resultsGridStyles = null;
11
11
  const RegistryElementBrowserItem = ({
12
12
  editorView,
@@ -17,7 +17,7 @@ export const getBlockControlQuickInsertComponents = ({
17
17
  surfaceContext
18
18
  } = {}) => {
19
19
  const context = surfaceContext === null || surfaceContext === void 0 ? void 0 : surfaceContext.get(BLOCK_CONTROL_UI_CONTEXT);
20
- return !context || context.targetNode.pos !== context.rootNode.pos;
20
+ return !(context !== null && context !== void 0 && context.activeNode) || context.targetNode.pos !== context.rootNode.pos || context.targetNode.pos !== context.activeNode.rootPos;
21
21
  },
22
22
  component: ({
23
23
  surfaceContext
@@ -8,7 +8,11 @@ import Heading from '@atlaskit/heading/heading';
8
8
  import { MENU, RECOMMENDED_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
9
9
  import { getMenuFooterSectionKey } from '@atlaskit/editor-common/type-ahead-get-menu-footer-section-key';
10
10
  import { getSectionOverflowItemKey } from '@atlaskit/editor-common/type-ahead-get-section-overflow-item-key';
11
- import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTransition } from '@atlaskit/modal-dialog';
11
+ import Modal from '@atlaskit/modal-dialog/modal-dialog';
12
+ import ModalBody from '@atlaskit/modal-dialog/modal-body';
13
+ import ModalFooter from '@atlaskit/modal-dialog/modal-footer';
14
+ import ModalHeader from '@atlaskit/modal-dialog/modal-header';
15
+ import ModalTransition from '@atlaskit/modal-dialog/modal-transition';
12
16
  import { createRegistryElementBrowserModel, getInitialRegistryElementBrowserSection, getRegistryElementBrowserItems } from './model';
13
17
  import { RegistryElementBrowserCategories } from './RegistryElementBrowserCategories';
14
18
  import { RegistryElementBrowserFooter } from './RegistryElementBrowserFooter';
@@ -6,7 +6,7 @@ import { useIntl } from 'react-intl';
6
6
  import LinkButton from '@atlaskit/button/link';
7
7
  import { QuickInsertProvider } from '@atlaskit/editor-common/quick-insert/provider';
8
8
  import { Stack, Text } from '@atlaskit/primitives/compiled';
9
- import Textfield from '@atlaskit/textfield';
9
+ import Textfield from '@atlaskit/textfield/text-field';
10
10
  var resultsGridStyles = null;
11
11
  var RegistryElementBrowserItem = function RegistryElementBrowserItem(_ref) {
12
12
  var editorView = _ref.editorView,
@@ -19,7 +19,7 @@ export var getBlockControlQuickInsertComponents = function getBlockControlQuickI
19
19
  var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
20
20
  surfaceContext = _ref2.surfaceContext;
21
21
  var context = surfaceContext === null || surfaceContext === void 0 ? void 0 : surfaceContext.get(BLOCK_CONTROL_UI_CONTEXT);
22
- return !context || context.targetNode.pos !== context.rootNode.pos;
22
+ return !(context !== null && context !== void 0 && context.activeNode) || context.targetNode.pos !== context.rootNode.pos || context.targetNode.pos !== context.activeNode.rootPos;
23
23
  },
24
24
  component: function component(_ref3) {
25
25
  var surfaceContext = _ref3.surfaceContext;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-quick-insert",
3
- "version": "16.1.3",
3
+ "version": "16.1.5",
4
4
  "description": "Quick insert plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -38,7 +38,7 @@
38
38
  "@atlaskit/platform-feature-flags": "^2.1.0",
39
39
  "@atlaskit/primitives": "^22.4.0",
40
40
  "@atlaskit/textfield": "^10.1.0",
41
- "@atlaskit/tmp-editor-statsig": "^163.0.0",
41
+ "@atlaskit/tmp-editor-statsig": "^164.0.0",
42
42
  "@atlaskit/tokens": "^16.8.0",
43
43
  "@atlaskit/tooltip": "^24.2.0",
44
44
  "@babel/runtime": "^7.0.0",
@@ -46,7 +46,7 @@
46
46
  "@emotion/react": "^11.7.1"
47
47
  },
48
48
  "peerDependencies": {
49
- "@atlaskit/editor-common": "^120.3.0",
49
+ "@atlaskit/editor-common": "^120.5.0",
50
50
  "react": "^18.2.0 || ^19.2.0",
51
51
  "react-dom": "^18.2.0 || ^19.2.0",
52
52
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"