@atlaskit/editor-plugin-card 0.4.5 → 0.4.7
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-card
|
|
2
2
|
|
|
3
|
+
## 0.4.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`9c86163d326`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9c86163d326) - [ux] Adds ability to edit Assets datasource modal from inserted table
|
|
8
|
+
|
|
9
|
+
## 0.4.6
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`33cb07de05f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/33cb07de05f) - change adf-schema to fixed versioning
|
|
14
|
+
|
|
3
15
|
## 0.4.5
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -19,11 +19,11 @@ var _hooks = require("@atlaskit/editor-common/hooks");
|
|
|
19
19
|
var _link = require("@atlaskit/editor-common/link");
|
|
20
20
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
21
21
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
22
|
+
var _utils = require("@atlaskit/editor-common/utils");
|
|
22
23
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
23
|
-
var _linkDatasource = require("@atlaskit/link-datasource");
|
|
24
24
|
var _actions = require("../pm-plugins/actions");
|
|
25
25
|
var _doc = require("../pm-plugins/doc");
|
|
26
|
-
var
|
|
26
|
+
var _utils2 = require("../utils");
|
|
27
27
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
28
28
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
29
29
|
function HyperlinkAddToolbarWithState(_ref) {
|
|
@@ -176,7 +176,7 @@ var buildEditLinkToolbar = function buildEditLinkToolbar(_ref2) {
|
|
|
176
176
|
if (!view || !providerFactory) {
|
|
177
177
|
return null;
|
|
178
178
|
}
|
|
179
|
-
var displayInfo = (0,
|
|
179
|
+
var displayInfo = (0, _utils2.displayInfoForCard)(node, (0, _utils2.findCardInfo)(view.state));
|
|
180
180
|
return /*#__PURE__*/_react.default.createElement(EditLinkToolbar, {
|
|
181
181
|
pluginInjectionApi: pluginInjectionApi,
|
|
182
182
|
key: idx,
|
|
@@ -223,7 +223,7 @@ exports.editLinkToolbarConfig = editLinkToolbarConfig;
|
|
|
223
223
|
var editDatasource = function editDatasource(node, editorAnalyticsApi) {
|
|
224
224
|
return function (state, dispatch) {
|
|
225
225
|
var _node$attrs;
|
|
226
|
-
var modalType = ((_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.datasource.id)
|
|
226
|
+
var modalType = (0, _utils.getDatasourceType)((_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.datasource.id);
|
|
227
227
|
if (dispatch && modalType) {
|
|
228
228
|
var tr = state.tr;
|
|
229
229
|
(0, _actions.showDatasourceModal)(modalType)(tr);
|
|
@@ -5,8 +5,8 @@ import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
|
5
5
|
import { HyperlinkAddToolbar as HyperlinkToolbar } from '@atlaskit/editor-common/link';
|
|
6
6
|
import { linkToolbarMessages } from '@atlaskit/editor-common/messages';
|
|
7
7
|
import { LINKPICKER_HEIGHT_IN_PX, RECENT_SEARCH_HEIGHT_IN_PX, RECENT_SEARCH_WIDTH_IN_PX } from '@atlaskit/editor-common/ui';
|
|
8
|
+
import { getDatasourceType } from '@atlaskit/editor-common/utils';
|
|
8
9
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
9
|
-
import { JIRA_LIST_OF_LINKS_DATASOURCE_ID } from '@atlaskit/link-datasource';
|
|
10
10
|
import { hideLinkToolbar, showDatasourceModal, showLinkToolbar } from '../pm-plugins/actions';
|
|
11
11
|
import { changeSelectedCardToLink, updateCard } from '../pm-plugins/doc';
|
|
12
12
|
import { displayInfoForCard, findCardInfo } from '../utils';
|
|
@@ -194,7 +194,7 @@ export const editLinkToolbarConfig = (showLinkingToolbar, lpLinkPicker) => {
|
|
|
194
194
|
};
|
|
195
195
|
export const editDatasource = (node, editorAnalyticsApi) => (state, dispatch) => {
|
|
196
196
|
var _node$attrs;
|
|
197
|
-
const modalType = ((_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.datasource.id)
|
|
197
|
+
const modalType = getDatasourceType((_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.datasource.id);
|
|
198
198
|
if (dispatch && modalType) {
|
|
199
199
|
const {
|
|
200
200
|
tr
|
|
@@ -12,8 +12,8 @@ import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
|
12
12
|
import { HyperlinkAddToolbar as HyperlinkToolbar } from '@atlaskit/editor-common/link';
|
|
13
13
|
import { linkToolbarMessages } from '@atlaskit/editor-common/messages';
|
|
14
14
|
import { LINKPICKER_HEIGHT_IN_PX, RECENT_SEARCH_HEIGHT_IN_PX, RECENT_SEARCH_WIDTH_IN_PX } from '@atlaskit/editor-common/ui';
|
|
15
|
+
import { getDatasourceType } from '@atlaskit/editor-common/utils';
|
|
15
16
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
16
|
-
import { JIRA_LIST_OF_LINKS_DATASOURCE_ID } from '@atlaskit/link-datasource';
|
|
17
17
|
import { hideLinkToolbar as _hideLinkToolbar, showDatasourceModal, showLinkToolbar } from '../pm-plugins/actions';
|
|
18
18
|
import { changeSelectedCardToLink, updateCard } from '../pm-plugins/doc';
|
|
19
19
|
import { displayInfoForCard, findCardInfo } from '../utils';
|
|
@@ -210,7 +210,7 @@ export var editLinkToolbarConfig = function editLinkToolbarConfig(showLinkingToo
|
|
|
210
210
|
export var editDatasource = function editDatasource(node, editorAnalyticsApi) {
|
|
211
211
|
return function (state, dispatch) {
|
|
212
212
|
var _node$attrs;
|
|
213
|
-
var modalType = ((_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.datasource.id)
|
|
213
|
+
var modalType = getDatasourceType((_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.datasource.id);
|
|
214
214
|
if (dispatch && modalType) {
|
|
215
215
|
var tr = state.tr;
|
|
216
216
|
showDatasourceModal(modalType)(tr);
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
|
-
import { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import { HyperlinkAddToolbarProps } from '@atlaskit/editor-common/link';
|
|
5
|
-
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
6
|
-
import type { Command, ExtractInjectionAPI, FloatingToolbarConfig, FloatingToolbarItem, LinkInputType, LinkPickerOptions } from '@atlaskit/editor-common/types';
|
|
7
|
-
import { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
import type { HyperlinkAddToolbarProps } from '@atlaskit/editor-common/link';
|
|
5
|
+
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
6
|
+
import type { Command, ExtractInjectionAPI, FeatureFlags, FloatingToolbarConfig, FloatingToolbarItem, LinkInputType, LinkPickerOptions } from '@atlaskit/editor-common/types';
|
|
8
7
|
import type { ForceFocusSelector } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
9
|
-
import { Node } from '@atlaskit/editor-prosemirror/model';
|
|
10
|
-
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
|
+
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
9
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
11
10
|
import type { cardPlugin } from '../plugin';
|
|
12
11
|
interface InjectionAPI {
|
|
13
12
|
pluginInjectionApi: ExtractInjectionAPI<typeof cardPlugin> | undefined;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
|
-
import { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import { HyperlinkAddToolbarProps } from '@atlaskit/editor-common/link';
|
|
5
|
-
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
6
|
-
import type { Command, ExtractInjectionAPI, FloatingToolbarConfig, FloatingToolbarItem, LinkInputType, LinkPickerOptions } from '@atlaskit/editor-common/types';
|
|
7
|
-
import { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
import type { HyperlinkAddToolbarProps } from '@atlaskit/editor-common/link';
|
|
5
|
+
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
6
|
+
import type { Command, ExtractInjectionAPI, FeatureFlags, FloatingToolbarConfig, FloatingToolbarItem, LinkInputType, LinkPickerOptions } from '@atlaskit/editor-common/types';
|
|
8
7
|
import type { ForceFocusSelector } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
9
|
-
import { Node } from '@atlaskit/editor-prosemirror/model';
|
|
10
|
-
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
|
+
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
9
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
11
10
|
import type { cardPlugin } from '../plugin';
|
|
12
11
|
interface InjectionAPI {
|
|
13
12
|
pluginInjectionApi: ExtractInjectionAPI<typeof cardPlugin> | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.7",
|
|
4
4
|
"description": "Card plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
".": "./src/index.ts"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@atlaskit/adf-schema": "
|
|
34
|
+
"@atlaskit/adf-schema": "28.1.2",
|
|
35
35
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
36
|
-
"@atlaskit/editor-common": "^74.
|
|
36
|
+
"@atlaskit/editor-common": "^74.51.0",
|
|
37
37
|
"@atlaskit/editor-plugin-analytics": "^0.1.0",
|
|
38
38
|
"@atlaskit/editor-plugin-decorations": "^0.1.0",
|
|
39
39
|
"@atlaskit/editor-plugin-feature-flags": "^0.1.0",
|