@atlaskit/editor-plugin-quick-insert 15.1.2 → 15.1.4
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 +16 -0
- package/dist/cjs/quickInsertPlugin.js +3 -3
- package/dist/cjs/ui/ModalElementBrowser/ModalElementBrowser.js +8 -7
- package/dist/cjs/ui/ModalElementBrowser/index.js +3 -3
- package/dist/cjs/ui/search.js +2 -2
- package/dist/es2019/quickInsertPlugin.js +1 -1
- package/dist/es2019/ui/ModalElementBrowser/ModalElementBrowser.js +5 -2
- package/dist/es2019/ui/ModalElementBrowser/index.js +1 -1
- package/dist/es2019/ui/search.js +1 -1
- package/dist/esm/quickInsertPlugin.js +1 -1
- package/dist/esm/ui/ModalElementBrowser/ModalElementBrowser.js +5 -2
- package/dist/esm/ui/ModalElementBrowser/index.js +1 -1
- package/dist/esm/ui/search.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-quick-insert
|
|
2
2
|
|
|
3
|
+
## 15.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 15.1.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`656801b9e097c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/656801b9e097c) -
|
|
14
|
+
VOLTC-331 - Migrate updated package usage in platform/editor: rewrite barrel imports of
|
|
15
|
+
voltCompliant provider packages to deep/subpath imports (consumer-side debarrel). No public API
|
|
16
|
+
changes.
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 15.1.2
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -18,7 +18,7 @@ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
|
18
18
|
var _typeAhead = require("@atlaskit/editor-common/type-ahead");
|
|
19
19
|
var _showMoreHorizontal = _interopRequireDefault(require("@atlaskit/icon/core/show-more-horizontal"));
|
|
20
20
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
21
|
-
var
|
|
21
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
22
22
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
23
23
|
var _appCategoryAnalytics = require("./app-category-analytics");
|
|
24
24
|
var _commands = require("./pm-plugins/commands");
|
|
@@ -106,7 +106,7 @@ var quickInsertPlugin = exports.quickInsertPlugin = function quickInsertPlugin(_
|
|
|
106
106
|
var openElementBrowser = function openElementBrowser(options) {
|
|
107
107
|
return function (_ref5) {
|
|
108
108
|
var tr = _ref5.tr;
|
|
109
|
-
if ((0,
|
|
109
|
+
if ((0, _fg.fg)('platform_editor_ease_of_use_metrics')) {
|
|
110
110
|
var _api$metrics;
|
|
111
111
|
api === null || api === void 0 || (_api$metrics = api.metrics) === null || _api$metrics === void 0 || _api$metrics.commands.handleIntentToStartEdit({
|
|
112
112
|
shouldStartTimer: false,
|
|
@@ -229,7 +229,7 @@ var quickInsertPlugin = exports.quickInsertPlugin = function quickInsertPlugin(_
|
|
|
229
229
|
openElementBrowser: openElementBrowser,
|
|
230
230
|
openElementBrowserModal: function openElementBrowserModal(_ref9) {
|
|
231
231
|
var tr = _ref9.tr;
|
|
232
|
-
if ((0,
|
|
232
|
+
if ((0, _fg.fg)('platform_editor_ease_of_use_metrics')) {
|
|
233
233
|
var _api$metrics2;
|
|
234
234
|
api === null || api === void 0 || (_api$metrics2 = api.metrics) === null || _api$metrics2 === void 0 || _api$metrics2.commands.handleIntentToStartEdit({
|
|
235
235
|
shouldStartTimer: false,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -10,13 +9,15 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
10
9
|
var _react = require("react");
|
|
11
10
|
var _react2 = require("@emotion/react");
|
|
12
11
|
var _reactIntl = require("react-intl");
|
|
13
|
-
var _button = _interopRequireDefault(require("@atlaskit/button"));
|
|
12
|
+
var _button = _interopRequireDefault(require("@atlaskit/button/button"));
|
|
14
13
|
var _elementBrowser = require("@atlaskit/editor-common/element-browser");
|
|
15
14
|
var _quickInsert = require("@atlaskit/editor-common/quick-insert");
|
|
16
15
|
var _questionCircle = _interopRequireDefault(require("@atlaskit/icon/core/question-circle"));
|
|
17
|
-
var _modalDialog =
|
|
16
|
+
var _modalDialog = _interopRequireDefault(require("@atlaskit/modal-dialog/modal-dialog"));
|
|
17
|
+
var _closeButton = require("@atlaskit/modal-dialog/close-button");
|
|
18
|
+
var _modalTransition = _interopRequireDefault(require("@atlaskit/modal-dialog/modal-transition"));
|
|
19
|
+
var _hooks = require("@atlaskit/modal-dialog/hooks");
|
|
18
20
|
var _categories = require("./categories");
|
|
19
|
-
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); }
|
|
20
21
|
/**
|
|
21
22
|
* @jsxRuntime classic
|
|
22
23
|
* @jsx jsx
|
|
@@ -99,7 +100,7 @@ var ModalElementBrowser = function ModalElementBrowser(props) {
|
|
|
99
100
|
var label = intl.formatMessage(_quickInsert.messages.browse);
|
|
100
101
|
return (0, _react2.jsx)("div", {
|
|
101
102
|
"data-editor-popup": true
|
|
102
|
-
}, (0, _react2.jsx)(
|
|
103
|
+
}, (0, _react2.jsx)(_modalTransition.default, null, props.isOpen &&
|
|
103
104
|
// eslint-disable-next-line @atlaskit/design-system/no-modal-label
|
|
104
105
|
(0, _react2.jsx)(_modalDialog.default, {
|
|
105
106
|
label: label,
|
|
@@ -113,7 +114,7 @@ var ModalElementBrowser = function ModalElementBrowser(props) {
|
|
|
113
114
|
shouldReturnFocus: props.shouldReturnFocus
|
|
114
115
|
}, (0, _react2.jsx)("div", {
|
|
115
116
|
css: modalCloseButtonStyles
|
|
116
|
-
}, (0, _react2.jsx)(
|
|
117
|
+
}, (0, _react2.jsx)(_closeButton.CloseButton, {
|
|
117
118
|
onClick: props.onClose
|
|
118
119
|
})), (0, _react2.jsx)(RenderBody, null), (0, _react2.jsx)(RenderFooter, null))));
|
|
119
120
|
};
|
|
@@ -122,7 +123,7 @@ var Footer = function Footer(_ref) {
|
|
|
122
123
|
var onInsert = _ref.onInsert,
|
|
123
124
|
beforeElement = _ref.beforeElement;
|
|
124
125
|
var intl = (0, _reactIntl.useIntl)();
|
|
125
|
-
var _useModal = (0,
|
|
126
|
+
var _useModal = (0, _hooks.useModal)(),
|
|
126
127
|
onClose = _useModal.onClose;
|
|
127
128
|
return (0, _react2.jsx)("div", {
|
|
128
129
|
css: modalFooterStyles
|
|
@@ -12,7 +12,7 @@ var _analytics = require("@atlaskit/editor-common/analytics");
|
|
|
12
12
|
var _isOfflineMode = require("@atlaskit/editor-common/connectivity/isOfflineMode");
|
|
13
13
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
14
14
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
15
|
-
var
|
|
15
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
16
16
|
var _commands = require("../../pm-plugins/commands");
|
|
17
17
|
var _pluginKey = require("../../pm-plugins/plugin-key");
|
|
18
18
|
var _ModalElementBrowser = _interopRequireDefault(require("./ModalElementBrowser"));
|
|
@@ -58,7 +58,7 @@ var Modal = function Modal(_ref) {
|
|
|
58
58
|
}, [editorView]);
|
|
59
59
|
var onInsertItem = (0, _react.useCallback)(function (item) {
|
|
60
60
|
closeBrowser();
|
|
61
|
-
if ((0,
|
|
61
|
+
if ((0, _fg.fg)('platform_editor_ease_of_use_metrics')) {
|
|
62
62
|
var _api$metrics;
|
|
63
63
|
api === null || api === void 0 || api.core.actions.execute(api === null || api === void 0 || (_api$metrics = api.metrics) === null || _api$metrics === void 0 ? void 0 : _api$metrics.commands.startActiveSessionTimer());
|
|
64
64
|
}
|
|
@@ -66,7 +66,7 @@ var Modal = function Modal(_ref) {
|
|
|
66
66
|
}, [closeBrowser, api]);
|
|
67
67
|
var onClose = (0, _react.useCallback)(function () {
|
|
68
68
|
closeBrowser();
|
|
69
|
-
if ((0,
|
|
69
|
+
if ((0, _fg.fg)('platform_editor_ease_of_use_metrics')) {
|
|
70
70
|
var _api$metrics2;
|
|
71
71
|
api === null || api === void 0 || api.core.actions.execute(api === null || api === void 0 || (_api$metrics2 = api.metrics) === null || _api$metrics2 === void 0 ? void 0 : _api$metrics2.commands.startActiveSessionTimer());
|
|
72
72
|
}
|
package/dist/cjs/ui/search.js
CHANGED
|
@@ -8,7 +8,7 @@ exports.withLayoutQuickInsertPrioritySorting = exports.getQuickInsertSuggestions
|
|
|
8
8
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
9
|
var _quickInsert = require("@atlaskit/editor-common/quick-insert");
|
|
10
10
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
11
|
-
var
|
|
11
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
12
12
|
var isRegisteredLayoutQuickInsertItem = function isRegisteredLayoutQuickInsertItem(item) {
|
|
13
13
|
var _item$keywords, _item$keywords2;
|
|
14
14
|
return Boolean(item.id && item.id !== 'layout' && ((_item$keywords = item.keywords) === null || _item$keywords === void 0 ? void 0 : _item$keywords.includes('layout')) && ((_item$keywords2 = item.keywords) === null || _item$keywords2 === void 0 ? void 0 : _item$keywords2.includes('column')));
|
|
@@ -69,7 +69,7 @@ var getQuickInsertSuggestions = exports.getQuickInsertSuggestions = function get
|
|
|
69
69
|
return item.featured;
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
|
-
return (0, _quickInsert.find)(((0,
|
|
72
|
+
return (0, _quickInsert.find)(((0, _fg.fg)('platform_editor_fix_space_triggering_ai') ? query === null || query === void 0 ? void 0 : query.trimEnd() : query) || '', category === 'all' || !category ? items : items.filter(function (item) {
|
|
73
73
|
return item.categories && item.categories.includes(category);
|
|
74
74
|
}), prioritySortingFn);
|
|
75
75
|
};
|
|
@@ -7,7 +7,7 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
7
7
|
import { TypeAheadAvailableNodes } from '@atlaskit/editor-common/type-ahead';
|
|
8
8
|
import ShowMoreHorizontalIcon from '@atlaskit/icon/core/show-more-horizontal';
|
|
9
9
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
10
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
11
11
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
12
12
|
import { createQuickInsertItemsAnalyticsScheduler } from './app-category-analytics';
|
|
13
13
|
import { createInsertItem, openElementBrowser as openElementBrowserCommand, openElementBrowserModal } from './pm-plugins/commands';
|
|
@@ -7,11 +7,14 @@ import { useCallback, useState } from 'react';
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import { injectIntl, useIntl } from 'react-intl';
|
|
10
|
-
import Button from '@atlaskit/button';
|
|
10
|
+
import Button from '@atlaskit/button/button';
|
|
11
11
|
import { ElementBrowser } from '@atlaskit/editor-common/element-browser';
|
|
12
12
|
import { messages } from '@atlaskit/editor-common/quick-insert';
|
|
13
13
|
import QuestionCircleIcon from '@atlaskit/icon/core/question-circle';
|
|
14
|
-
import Modal
|
|
14
|
+
import Modal from '@atlaskit/modal-dialog/modal-dialog';
|
|
15
|
+
import { CloseButton } from '@atlaskit/modal-dialog/close-button';
|
|
16
|
+
import ModalTransition from '@atlaskit/modal-dialog/modal-transition';
|
|
17
|
+
import { useModal } from '@atlaskit/modal-dialog/hooks';
|
|
15
18
|
import { getCategories } from './categories';
|
|
16
19
|
export const MODAL_WRAPPER_PADDING = 16;
|
|
17
20
|
const actionsStyles = css({
|
|
@@ -3,7 +3,7 @@ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
|
3
3
|
import { isOfflineMode } from '@atlaskit/editor-common/connectivity/isOfflineMode';
|
|
4
4
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
5
5
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
7
7
|
import { closeElementBrowser, closeElementBrowserModal } from '../../pm-plugins/commands';
|
|
8
8
|
import { pluginKey } from '../../pm-plugins/plugin-key';
|
|
9
9
|
import ModalElementBrowser from './ModalElementBrowser';
|
package/dist/es2019/ui/search.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { find } from '@atlaskit/editor-common/quick-insert';
|
|
2
2
|
import { dedupe } from '@atlaskit/editor-common/utils';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
4
4
|
const isRegisteredLayoutQuickInsertItem = item => {
|
|
5
5
|
var _item$keywords, _item$keywords2;
|
|
6
6
|
return Boolean(item.id && item.id !== 'layout' && ((_item$keywords = item.keywords) === null || _item$keywords === void 0 ? void 0 : _item$keywords.includes('layout')) && ((_item$keywords2 = item.keywords) === null || _item$keywords2 === void 0 ? void 0 : _item$keywords2.includes('column')));
|
|
@@ -13,7 +13,7 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
13
13
|
import { TypeAheadAvailableNodes } from '@atlaskit/editor-common/type-ahead';
|
|
14
14
|
import ShowMoreHorizontalIcon from '@atlaskit/icon/core/show-more-horizontal';
|
|
15
15
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
16
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
17
17
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
18
18
|
import { createQuickInsertItemsAnalyticsScheduler } from './app-category-analytics';
|
|
19
19
|
import { createInsertItem, openElementBrowser as openElementBrowserCommand, openElementBrowserModal as _openElementBrowserModal } from './pm-plugins/commands';
|
|
@@ -8,11 +8,14 @@ import { useCallback, useState } from 'react';
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
10
|
import { injectIntl, useIntl } from 'react-intl';
|
|
11
|
-
import Button from '@atlaskit/button';
|
|
11
|
+
import Button from '@atlaskit/button/button';
|
|
12
12
|
import { ElementBrowser } from '@atlaskit/editor-common/element-browser';
|
|
13
13
|
import { messages } from '@atlaskit/editor-common/quick-insert';
|
|
14
14
|
import QuestionCircleIcon from '@atlaskit/icon/core/question-circle';
|
|
15
|
-
import Modal
|
|
15
|
+
import Modal from '@atlaskit/modal-dialog/modal-dialog';
|
|
16
|
+
import { CloseButton } from '@atlaskit/modal-dialog/close-button';
|
|
17
|
+
import ModalTransition from '@atlaskit/modal-dialog/modal-transition';
|
|
18
|
+
import { useModal } from '@atlaskit/modal-dialog/hooks';
|
|
16
19
|
import { getCategories } from './categories';
|
|
17
20
|
export var MODAL_WRAPPER_PADDING = 16;
|
|
18
21
|
var actionsStyles = css({
|
|
@@ -6,7 +6,7 @@ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
|
6
6
|
import { isOfflineMode } from '@atlaskit/editor-common/connectivity/isOfflineMode';
|
|
7
7
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
8
8
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
10
10
|
import { closeElementBrowser, closeElementBrowserModal } from '../../pm-plugins/commands';
|
|
11
11
|
import { pluginKey } from '../../pm-plugins/plugin-key';
|
|
12
12
|
import ModalElementBrowser from './ModalElementBrowser';
|
package/dist/esm/ui/search.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import { find } from '@atlaskit/editor-common/quick-insert';
|
|
3
3
|
import { dedupe } from '@atlaskit/editor-common/utils';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
5
5
|
var isRegisteredLayoutQuickInsertItem = function isRegisteredLayoutQuickInsertItem(item) {
|
|
6
6
|
var _item$keywords, _item$keywords2;
|
|
7
7
|
return Boolean(item.id && item.id !== 'layout' && ((_item$keywords = item.keywords) === null || _item$keywords === void 0 ? void 0 : _item$keywords.includes('layout')) && ((_item$keywords2 = item.keywords) === null || _item$keywords2 === void 0 ? void 0 : _item$keywords2.includes('column')));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-quick-insert",
|
|
3
|
-
"version": "15.1.
|
|
3
|
+
"version": "15.1.4",
|
|
4
4
|
"description": "Quick insert plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@atlaskit/modal-dialog": "^16.5.0",
|
|
34
34
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
35
35
|
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
36
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
36
|
+
"@atlaskit/tmp-editor-statsig": "^160.0.0",
|
|
37
37
|
"@atlaskit/tokens": "^16.8.0",
|
|
38
38
|
"@babel/runtime": "^7.0.0",
|
|
39
39
|
"@emotion/react": "^11.7.1"
|