@atlaskit/editor-plugin-quick-insert 17.1.4 → 17.1.6

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,31 @@
1
1
  # @atlaskit/editor-plugin-quick-insert
2
2
 
3
+ ## 17.1.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [`df59babd59961`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/df59babd59961) -
8
+ Use registered Quick Insert items in both primary toolbar implementations when
9
+ `platform_editor_slash_command` is enabled, independently of the controls and AIFC experiments.
10
+ Share the registered menu model through an explicit editor-common subpath and use compact
11
+ presentation for typeahead and toolbar items.
12
+
13
+ Virtualize the toolbar menu, keep keyboard-selected items visible, and restore the bounded popup's
14
+ themed background and scrolling. Dismiss the popup on outside clicks and inset the search field
15
+ from its edges. When the experiment is enabled, ignore absent legacy Quick Insert handlers to
16
+ prevent suggestion crashes.
17
+
18
+ Provide persisted toolbar docking preferences in editor examples to support testing the primary
19
+ toolbar Insert menu.
20
+
21
+ - Updated dependencies
22
+
23
+ ## 17.1.5
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies
28
+
3
29
  ## 17.1.4
4
30
 
5
31
  ### Patch Changes
@@ -153,7 +153,9 @@ var quickInsertPlugin = exports.quickInsertPlugin = function quickInsertPlugin(_
153
153
  getIntl = _ref6.getIntl,
154
154
  dispatch = _ref6.dispatch,
155
155
  dispatchAnalyticsEvent = _ref6.dispatchAnalyticsEvent;
156
- return quickInsertPluginFactory(defaultItems, providerFactory, getIntl, dispatch, dispatchAnalyticsEvent, options === null || options === void 0 ? void 0 : options.emptyStateHandler, onInsert, options === null || options === void 0 ? void 0 : options.itemFilter, api);
156
+ return quickInsertPluginFactory((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_slash_command') ? (defaultItems || []).filter(function (item) {
157
+ return item !== undefined;
158
+ }) : defaultItems, providerFactory, getIntl, dispatch, dispatchAnalyticsEvent, options === null || options === void 0 ? void 0 : options.emptyStateHandler, onInsert, options === null || options === void 0 ? void 0 : options.itemFilter, api);
157
159
  }
158
160
  }, {
159
161
  name: 'quickInsertOpenExperience',
@@ -1,4 +1,4 @@
1
- /* BlockControlQuickInsertButton.tsx generated by @compiled/babel-plugin v2.0.0 */
1
+ /* BlockControlQuickInsertButton.tsx generated by @compiled/babel-plugin v3.0.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* RegistryElementBrowser.tsx generated by @compiled/babel-plugin v2.0.0 */
1
+ /* RegistryElementBrowser.tsx generated by @compiled/babel-plugin v3.0.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* RegistryElementBrowserCategories.tsx generated by @compiled/babel-plugin v2.0.0 */
1
+ /* RegistryElementBrowserCategories.tsx generated by @compiled/babel-plugin v3.0.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* RegistryElementBrowserSearchResults.tsx generated by @compiled/babel-plugin v2.0.0 */
1
+ /* RegistryElementBrowserSearchResults.tsx generated by @compiled/babel-plugin v3.0.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -137,7 +137,7 @@ export const quickInsertPlugin = ({
137
137
  getIntl,
138
138
  dispatch,
139
139
  dispatchAnalyticsEvent
140
- }) => quickInsertPluginFactory(defaultItems, providerFactory, getIntl, dispatch, dispatchAnalyticsEvent, options === null || options === void 0 ? void 0 : options.emptyStateHandler, onInsert, options === null || options === void 0 ? void 0 : options.itemFilter, api)
140
+ }) => quickInsertPluginFactory(isExperimentEnabled('platform_editor_slash_command') ? (defaultItems || []).filter(item => item !== undefined) : defaultItems, providerFactory, getIntl, dispatch, dispatchAnalyticsEvent, options === null || options === void 0 ? void 0 : options.emptyStateHandler, onInsert, options === null || options === void 0 ? void 0 : options.itemFilter, api)
141
141
  }, {
142
142
  name: 'quickInsertOpenExperience',
143
143
  plugin: () => getQuickInsertOpenExperiencePlugin({
@@ -1,4 +1,4 @@
1
- /* BlockControlQuickInsertButton.tsx generated by @compiled/babel-plugin v2.0.0 */
1
+ /* BlockControlQuickInsertButton.tsx generated by @compiled/babel-plugin v3.0.1 */
2
2
  import "./BlockControlQuickInsertButton.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useCallback } from 'react';
@@ -1,4 +1,4 @@
1
- /* RegistryElementBrowser.tsx generated by @compiled/babel-plugin v2.0.0 */
1
+ /* RegistryElementBrowser.tsx generated by @compiled/babel-plugin v3.0.1 */
2
2
  import "./RegistryElementBrowser.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
@@ -1,4 +1,4 @@
1
- /* RegistryElementBrowserCategories.tsx generated by @compiled/babel-plugin v2.0.0 */
1
+ /* RegistryElementBrowserCategories.tsx generated by @compiled/babel-plugin v3.0.1 */
2
2
  import "./RegistryElementBrowserCategories.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* RegistryElementBrowserSearchResults.tsx generated by @compiled/babel-plugin v2.0.0 */
1
+ /* RegistryElementBrowserSearchResults.tsx generated by @compiled/babel-plugin v3.0.1 */
2
2
  import "./RegistryElementBrowserSearchResults.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useMemo } from 'react';
@@ -146,7 +146,9 @@ export var quickInsertPlugin = function quickInsertPlugin(_ref) {
146
146
  getIntl = _ref6.getIntl,
147
147
  dispatch = _ref6.dispatch,
148
148
  dispatchAnalyticsEvent = _ref6.dispatchAnalyticsEvent;
149
- return quickInsertPluginFactory(defaultItems, providerFactory, getIntl, dispatch, dispatchAnalyticsEvent, options === null || options === void 0 ? void 0 : options.emptyStateHandler, onInsert, options === null || options === void 0 ? void 0 : options.itemFilter, api);
149
+ return quickInsertPluginFactory(isExperimentEnabled('platform_editor_slash_command') ? (defaultItems || []).filter(function (item) {
150
+ return item !== undefined;
151
+ }) : defaultItems, providerFactory, getIntl, dispatch, dispatchAnalyticsEvent, options === null || options === void 0 ? void 0 : options.emptyStateHandler, onInsert, options === null || options === void 0 ? void 0 : options.itemFilter, api);
150
152
  }
151
153
  }, {
152
154
  name: 'quickInsertOpenExperience',
@@ -1,4 +1,4 @@
1
- /* BlockControlQuickInsertButton.tsx generated by @compiled/babel-plugin v2.0.0 */
1
+ /* BlockControlQuickInsertButton.tsx generated by @compiled/babel-plugin v3.0.1 */
2
2
  import "./BlockControlQuickInsertButton.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useCallback } from 'react';
@@ -1,4 +1,4 @@
1
- /* RegistryElementBrowser.tsx generated by @compiled/babel-plugin v2.0.0 */
1
+ /* RegistryElementBrowser.tsx generated by @compiled/babel-plugin v3.0.1 */
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import "./RegistryElementBrowser.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* RegistryElementBrowserCategories.tsx generated by @compiled/babel-plugin v2.0.0 */
1
+ /* RegistryElementBrowserCategories.tsx generated by @compiled/babel-plugin v3.0.1 */
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import "./RegistryElementBrowserCategories.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* RegistryElementBrowserSearchResults.tsx generated by @compiled/babel-plugin v2.0.0 */
1
+ /* RegistryElementBrowserSearchResults.tsx generated by @compiled/babel-plugin v3.0.1 */
2
2
  import "./RegistryElementBrowserSearchResults.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useMemo } from 'react';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-quick-insert",
3
- "version": "17.1.4",
3
+ "version": "17.1.6",
4
4
  "description": "Quick insert plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -38,15 +38,15 @@
38
38
  "@atlaskit/platform-feature-flags": "^2.2.0",
39
39
  "@atlaskit/primitives": "^22.5.0",
40
40
  "@atlaskit/textfield": "^10.2.0",
41
- "@atlaskit/tmp-editor-statsig": "^184.0.0",
42
- "@atlaskit/tokens": "^16.11.0",
41
+ "@atlaskit/tmp-editor-statsig": "^186.0.0",
42
+ "@atlaskit/tokens": "^16.12.0",
43
43
  "@atlaskit/tooltip": "^24.3.0",
44
44
  "@babel/runtime": "^7.0.0",
45
45
  "@compiled/react": "^1.0.2",
46
46
  "@emotion/react": "^11.7.1"
47
47
  },
48
48
  "peerDependencies": {
49
- "@atlaskit/editor-common": "^121.2.0",
49
+ "@atlaskit/editor-common": "^121.4.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"