@atlaskit/editor-plugin-quick-insert 3.0.8 → 3.0.10
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,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-quick-insert
|
|
2
2
|
|
|
3
|
+
## 3.0.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`c67efe1808d4e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c67efe1808d4e) -
|
|
8
|
+
ED-29111: clean up sharedPluginStateHookMigratorFactory in placeholder-text, panel, quick-insert
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 3.0.9
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 3.0.8
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -84,8 +84,12 @@ var Modal = function Modal(_ref) {
|
|
|
84
84
|
shouldReturnFocus: false
|
|
85
85
|
});
|
|
86
86
|
};
|
|
87
|
-
var
|
|
88
|
-
var
|
|
87
|
+
var _default = exports.default = function _default(_ref2) {
|
|
88
|
+
var _pluginInjectionAPI$q, _pluginInjectionAPI$q2;
|
|
89
|
+
var editorView = _ref2.editorView,
|
|
90
|
+
helpUrl = _ref2.helpUrl,
|
|
91
|
+
pluginInjectionAPI = _ref2.pluginInjectionAPI;
|
|
92
|
+
var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(pluginInjectionAPI, ['quickInsert', 'connectivity'], function (state) {
|
|
89
93
|
var _state$quickInsertSta, _state$quickInsertSta2, _state$quickInsertSta3, _state$quickInsertSta4, _state$connectivitySt;
|
|
90
94
|
return {
|
|
91
95
|
lazyDefaultItems: (_state$quickInsertSta = state.quickInsertState) === null || _state$quickInsertSta === void 0 ? void 0 : _state$quickInsertSta.lazyDefaultItems,
|
|
@@ -100,36 +104,6 @@ var useSharedState = (0, _hooks.sharedPluginStateHookMigratorFactory)(function (
|
|
|
100
104
|
isElementBrowserModalOpen = _useSharedPluginState.isElementBrowserModalOpen,
|
|
101
105
|
emptyStateHandler = _useSharedPluginState.emptyStateHandler,
|
|
102
106
|
mode = _useSharedPluginState.mode;
|
|
103
|
-
return {
|
|
104
|
-
mode: mode,
|
|
105
|
-
lazyDefaultItems: lazyDefaultItems,
|
|
106
|
-
providedItems: providedItems,
|
|
107
|
-
isElementBrowserModalOpen: isElementBrowserModalOpen,
|
|
108
|
-
emptyStateHandler: emptyStateHandler
|
|
109
|
-
};
|
|
110
|
-
}, function (api) {
|
|
111
|
-
var _useSharedPluginState2 = (0, _hooks.useSharedPluginState)(api, ['quickInsert', 'connectivity']),
|
|
112
|
-
quickInsertState = _useSharedPluginState2.quickInsertState,
|
|
113
|
-
connectivityState = _useSharedPluginState2.connectivityState;
|
|
114
|
-
return {
|
|
115
|
-
lazyDefaultItems: quickInsertState === null || quickInsertState === void 0 ? void 0 : quickInsertState.lazyDefaultItems,
|
|
116
|
-
providedItems: quickInsertState === null || quickInsertState === void 0 ? void 0 : quickInsertState.providedItems,
|
|
117
|
-
isElementBrowserModalOpen: quickInsertState === null || quickInsertState === void 0 ? void 0 : quickInsertState.isElementBrowserModalOpen,
|
|
118
|
-
emptyStateHandler: quickInsertState === null || quickInsertState === void 0 ? void 0 : quickInsertState.emptyStateHandler,
|
|
119
|
-
mode: connectivityState === null || connectivityState === void 0 ? void 0 : connectivityState.mode
|
|
120
|
-
};
|
|
121
|
-
});
|
|
122
|
-
var _default = exports.default = function _default(_ref2) {
|
|
123
|
-
var _pluginInjectionAPI$q, _pluginInjectionAPI$q2;
|
|
124
|
-
var editorView = _ref2.editorView,
|
|
125
|
-
helpUrl = _ref2.helpUrl,
|
|
126
|
-
pluginInjectionAPI = _ref2.pluginInjectionAPI;
|
|
127
|
-
var _useSharedState = useSharedState(pluginInjectionAPI),
|
|
128
|
-
lazyDefaultItems = _useSharedState.lazyDefaultItems,
|
|
129
|
-
providedItems = _useSharedState.providedItems,
|
|
130
|
-
isElementBrowserModalOpen = _useSharedState.isElementBrowserModalOpen,
|
|
131
|
-
emptyStateHandler = _useSharedState.emptyStateHandler,
|
|
132
|
-
mode = _useSharedState.mode;
|
|
133
107
|
return /*#__PURE__*/_react.default.createElement(Modal, {
|
|
134
108
|
quickInsertState: {
|
|
135
109
|
lazyDefaultItems: lazyDefaultItems,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
3
3
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
4
|
import { closeElementBrowserModal } from '../../pm-plugins/commands';
|
|
5
5
|
import ModalElementBrowser from './ModalElementBrowser';
|
|
@@ -74,14 +74,19 @@ const Modal = ({
|
|
|
74
74
|
shouldReturnFocus: false
|
|
75
75
|
});
|
|
76
76
|
};
|
|
77
|
-
|
|
77
|
+
export default (({
|
|
78
|
+
editorView,
|
|
79
|
+
helpUrl,
|
|
80
|
+
pluginInjectionAPI
|
|
81
|
+
}) => {
|
|
82
|
+
var _pluginInjectionAPI$q, _pluginInjectionAPI$q2, _pluginInjectionAPI$q3, _pluginInjectionAPI$q4;
|
|
78
83
|
const {
|
|
79
84
|
lazyDefaultItems,
|
|
80
85
|
providedItems,
|
|
81
86
|
isElementBrowserModalOpen,
|
|
82
87
|
emptyStateHandler,
|
|
83
88
|
mode
|
|
84
|
-
} = useSharedPluginStateWithSelector(
|
|
89
|
+
} = useSharedPluginStateWithSelector(pluginInjectionAPI, ['quickInsert', 'connectivity'], state => {
|
|
85
90
|
var _state$quickInsertSta, _state$quickInsertSta2, _state$quickInsertSta3, _state$quickInsertSta4, _state$connectivitySt;
|
|
86
91
|
return {
|
|
87
92
|
lazyDefaultItems: (_state$quickInsertSta = state.quickInsertState) === null || _state$quickInsertSta === void 0 ? void 0 : _state$quickInsertSta.lazyDefaultItems,
|
|
@@ -91,39 +96,6 @@ const useSharedState = sharedPluginStateHookMigratorFactory(api => {
|
|
|
91
96
|
mode: (_state$connectivitySt = state.connectivityState) === null || _state$connectivitySt === void 0 ? void 0 : _state$connectivitySt.mode
|
|
92
97
|
};
|
|
93
98
|
});
|
|
94
|
-
return {
|
|
95
|
-
mode,
|
|
96
|
-
lazyDefaultItems,
|
|
97
|
-
providedItems,
|
|
98
|
-
isElementBrowserModalOpen,
|
|
99
|
-
emptyStateHandler
|
|
100
|
-
};
|
|
101
|
-
}, api => {
|
|
102
|
-
const {
|
|
103
|
-
quickInsertState,
|
|
104
|
-
connectivityState
|
|
105
|
-
} = useSharedPluginState(api, ['quickInsert', 'connectivity']);
|
|
106
|
-
return {
|
|
107
|
-
lazyDefaultItems: quickInsertState === null || quickInsertState === void 0 ? void 0 : quickInsertState.lazyDefaultItems,
|
|
108
|
-
providedItems: quickInsertState === null || quickInsertState === void 0 ? void 0 : quickInsertState.providedItems,
|
|
109
|
-
isElementBrowserModalOpen: quickInsertState === null || quickInsertState === void 0 ? void 0 : quickInsertState.isElementBrowserModalOpen,
|
|
110
|
-
emptyStateHandler: quickInsertState === null || quickInsertState === void 0 ? void 0 : quickInsertState.emptyStateHandler,
|
|
111
|
-
mode: connectivityState === null || connectivityState === void 0 ? void 0 : connectivityState.mode
|
|
112
|
-
};
|
|
113
|
-
});
|
|
114
|
-
export default (({
|
|
115
|
-
editorView,
|
|
116
|
-
helpUrl,
|
|
117
|
-
pluginInjectionAPI
|
|
118
|
-
}) => {
|
|
119
|
-
var _pluginInjectionAPI$q, _pluginInjectionAPI$q2, _pluginInjectionAPI$q3, _pluginInjectionAPI$q4;
|
|
120
|
-
const {
|
|
121
|
-
lazyDefaultItems,
|
|
122
|
-
providedItems,
|
|
123
|
-
isElementBrowserModalOpen,
|
|
124
|
-
emptyStateHandler,
|
|
125
|
-
mode
|
|
126
|
-
} = useSharedState(pluginInjectionAPI);
|
|
127
99
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
128
100
|
quickInsertState: {
|
|
129
101
|
lazyDefaultItems,
|
|
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
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; }
|
|
3
3
|
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) { _defineProperty(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; }
|
|
4
4
|
import React, { useCallback } from 'react';
|
|
5
|
-
import {
|
|
5
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
7
|
import { closeElementBrowserModal } from '../../pm-plugins/commands';
|
|
8
8
|
import ModalElementBrowser from './ModalElementBrowser';
|
|
@@ -75,8 +75,12 @@ var Modal = function Modal(_ref) {
|
|
|
75
75
|
shouldReturnFocus: false
|
|
76
76
|
});
|
|
77
77
|
};
|
|
78
|
-
|
|
79
|
-
var
|
|
78
|
+
export default (function (_ref2) {
|
|
79
|
+
var _pluginInjectionAPI$q, _pluginInjectionAPI$q2;
|
|
80
|
+
var editorView = _ref2.editorView,
|
|
81
|
+
helpUrl = _ref2.helpUrl,
|
|
82
|
+
pluginInjectionAPI = _ref2.pluginInjectionAPI;
|
|
83
|
+
var _useSharedPluginState = useSharedPluginStateWithSelector(pluginInjectionAPI, ['quickInsert', 'connectivity'], function (state) {
|
|
80
84
|
var _state$quickInsertSta, _state$quickInsertSta2, _state$quickInsertSta3, _state$quickInsertSta4, _state$connectivitySt;
|
|
81
85
|
return {
|
|
82
86
|
lazyDefaultItems: (_state$quickInsertSta = state.quickInsertState) === null || _state$quickInsertSta === void 0 ? void 0 : _state$quickInsertSta.lazyDefaultItems,
|
|
@@ -91,36 +95,6 @@ var useSharedState = sharedPluginStateHookMigratorFactory(function (api) {
|
|
|
91
95
|
isElementBrowserModalOpen = _useSharedPluginState.isElementBrowserModalOpen,
|
|
92
96
|
emptyStateHandler = _useSharedPluginState.emptyStateHandler,
|
|
93
97
|
mode = _useSharedPluginState.mode;
|
|
94
|
-
return {
|
|
95
|
-
mode: mode,
|
|
96
|
-
lazyDefaultItems: lazyDefaultItems,
|
|
97
|
-
providedItems: providedItems,
|
|
98
|
-
isElementBrowserModalOpen: isElementBrowserModalOpen,
|
|
99
|
-
emptyStateHandler: emptyStateHandler
|
|
100
|
-
};
|
|
101
|
-
}, function (api) {
|
|
102
|
-
var _useSharedPluginState2 = useSharedPluginState(api, ['quickInsert', 'connectivity']),
|
|
103
|
-
quickInsertState = _useSharedPluginState2.quickInsertState,
|
|
104
|
-
connectivityState = _useSharedPluginState2.connectivityState;
|
|
105
|
-
return {
|
|
106
|
-
lazyDefaultItems: quickInsertState === null || quickInsertState === void 0 ? void 0 : quickInsertState.lazyDefaultItems,
|
|
107
|
-
providedItems: quickInsertState === null || quickInsertState === void 0 ? void 0 : quickInsertState.providedItems,
|
|
108
|
-
isElementBrowserModalOpen: quickInsertState === null || quickInsertState === void 0 ? void 0 : quickInsertState.isElementBrowserModalOpen,
|
|
109
|
-
emptyStateHandler: quickInsertState === null || quickInsertState === void 0 ? void 0 : quickInsertState.emptyStateHandler,
|
|
110
|
-
mode: connectivityState === null || connectivityState === void 0 ? void 0 : connectivityState.mode
|
|
111
|
-
};
|
|
112
|
-
});
|
|
113
|
-
export default (function (_ref2) {
|
|
114
|
-
var _pluginInjectionAPI$q, _pluginInjectionAPI$q2;
|
|
115
|
-
var editorView = _ref2.editorView,
|
|
116
|
-
helpUrl = _ref2.helpUrl,
|
|
117
|
-
pluginInjectionAPI = _ref2.pluginInjectionAPI;
|
|
118
|
-
var _useSharedState = useSharedState(pluginInjectionAPI),
|
|
119
|
-
lazyDefaultItems = _useSharedState.lazyDefaultItems,
|
|
120
|
-
providedItems = _useSharedState.providedItems,
|
|
121
|
-
isElementBrowserModalOpen = _useSharedState.isElementBrowserModalOpen,
|
|
122
|
-
emptyStateHandler = _useSharedState.emptyStateHandler,
|
|
123
|
-
mode = _useSharedState.mode;
|
|
124
98
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
125
99
|
quickInsertState: {
|
|
126
100
|
lazyDefaultItems: lazyDefaultItems,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-quick-insert",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.10",
|
|
4
4
|
"description": "Quick insert plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -28,26 +28,23 @@
|
|
|
28
28
|
"*.compiled.css"
|
|
29
29
|
],
|
|
30
30
|
"atlaskit:src": "src/index.ts",
|
|
31
|
-
"af:exports": {
|
|
32
|
-
".": "./src/index.ts"
|
|
33
|
-
},
|
|
34
31
|
"dependencies": {
|
|
35
32
|
"@atlaskit/button": "^23.4.0",
|
|
36
33
|
"@atlaskit/editor-plugin-connectivity": "^3.1.0",
|
|
37
34
|
"@atlaskit/editor-plugin-metrics": "^4.0.0",
|
|
38
35
|
"@atlaskit/editor-plugin-type-ahead": "^3.1.0",
|
|
39
36
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
40
|
-
"@atlaskit/icon": "^28.
|
|
37
|
+
"@atlaskit/icon": "^28.1.0",
|
|
41
38
|
"@atlaskit/modal-dialog": "^14.3.0",
|
|
42
39
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
43
|
-
"@atlaskit/theme": "^
|
|
44
|
-
"@atlaskit/tmp-editor-statsig": "^11.
|
|
45
|
-
"@atlaskit/tokens": "^6.
|
|
40
|
+
"@atlaskit/theme": "^20.0.0",
|
|
41
|
+
"@atlaskit/tmp-editor-statsig": "^11.9.0",
|
|
42
|
+
"@atlaskit/tokens": "^6.1.0",
|
|
46
43
|
"@babel/runtime": "^7.0.0",
|
|
47
44
|
"@emotion/react": "^11.7.1"
|
|
48
45
|
},
|
|
49
46
|
"peerDependencies": {
|
|
50
|
-
"@atlaskit/editor-common": "^107.
|
|
47
|
+
"@atlaskit/editor-common": "^107.33.0",
|
|
51
48
|
"react": "^18.2.0",
|
|
52
49
|
"react-dom": "^18.2.0",
|
|
53
50
|
"react-intl-next": "npm:react-intl@^5.18.1"
|