@atlaskit/editor-plugin-card 0.13.1 → 0.13.2
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 +7 -0
- package/dist/cjs/pm-plugins/mountHyperlink.js +12 -16
- package/dist/cjs/toolbar.js +12 -15
- package/dist/es2019/pm-plugins/mountHyperlink.js +10 -14
- package/dist/es2019/toolbar.js +10 -13
- package/dist/esm/pm-plugins/mountHyperlink.js +12 -16
- package/dist/esm/toolbar.js +12 -15
- package/package.json +2 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-card
|
|
2
2
|
|
|
3
|
+
## 0.13.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#42933](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42933) [`6a7848b6400`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6a7848b6400) - Cleansup feature flag. Floating toolbar now always fires a viewed event when activated for links when the card plugin is enabled.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
3
10
|
## 0.13.1
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -8,25 +8,21 @@ exports.mountHyperlinkPlugin = void 0;
|
|
|
8
8
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
10
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
11
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
11
|
var _HyperlinkToolbarAppearance = require("../ui/HyperlinkToolbarAppearance");
|
|
13
12
|
var _ToolbarViewedEvent = require("../ui/ToolbarViewedEvent");
|
|
14
13
|
var getToolbarViewedItem = function getToolbarViewedItem(link) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}];
|
|
28
|
-
}
|
|
29
|
-
return [];
|
|
14
|
+
return [{
|
|
15
|
+
type: 'custom',
|
|
16
|
+
fallback: [],
|
|
17
|
+
render: function render(editorView) {
|
|
18
|
+
return /*#__PURE__*/_react.default.createElement(_ToolbarViewedEvent.ToolbarViewedEvent, {
|
|
19
|
+
key: "edit.link.menu.viewed",
|
|
20
|
+
url: link,
|
|
21
|
+
display: "url",
|
|
22
|
+
editorView: editorView
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}];
|
|
30
26
|
};
|
|
31
27
|
var mountHyperlinkPlugin = exports.mountHyperlinkPlugin = function mountHyperlinkPlugin(pluginInjectionApi, options) {
|
|
32
28
|
return new _safePlugin.SafePlugin({
|
package/dist/cjs/toolbar.js
CHANGED
|
@@ -168,21 +168,18 @@ var getToolbarViewedItem = function getToolbarViewedItem(url, display) {
|
|
|
168
168
|
if (!url) {
|
|
169
169
|
return [];
|
|
170
170
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
}];
|
|
184
|
-
}
|
|
185
|
-
return [];
|
|
171
|
+
return [{
|
|
172
|
+
type: 'custom',
|
|
173
|
+
fallback: [],
|
|
174
|
+
render: function render(editorView) {
|
|
175
|
+
return /*#__PURE__*/_react.default.createElement(_ToolbarViewedEvent.ToolbarViewedEvent, {
|
|
176
|
+
key: "edit.link.menu.viewed",
|
|
177
|
+
url: url,
|
|
178
|
+
display: display,
|
|
179
|
+
editorView: editorView
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
}];
|
|
186
183
|
};
|
|
187
184
|
var generateToolbarItems = function generateToolbarItems(state, featureFlags, intl, providerFactory, cardOptions, platform, linkPicker, pluginInjectionApi) {
|
|
188
185
|
return function (node) {
|
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
import { HyperlinkToolbarAppearance } from '../ui/HyperlinkToolbarAppearance';
|
|
5
4
|
import { ToolbarViewedEvent } from '../ui/ToolbarViewedEvent';
|
|
6
5
|
const getToolbarViewedItem = link => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}];
|
|
18
|
-
}
|
|
19
|
-
return [];
|
|
6
|
+
return [{
|
|
7
|
+
type: 'custom',
|
|
8
|
+
fallback: [],
|
|
9
|
+
render: editorView => /*#__PURE__*/React.createElement(ToolbarViewedEvent, {
|
|
10
|
+
key: "edit.link.menu.viewed",
|
|
11
|
+
url: link,
|
|
12
|
+
display: "url",
|
|
13
|
+
editorView: editorView
|
|
14
|
+
})
|
|
15
|
+
}];
|
|
20
16
|
};
|
|
21
17
|
export const mountHyperlinkPlugin = (pluginInjectionApi, options) => {
|
|
22
18
|
return new SafePlugin({
|
package/dist/es2019/toolbar.js
CHANGED
|
@@ -161,19 +161,16 @@ const getToolbarViewedItem = (url, display) => {
|
|
|
161
161
|
if (!url) {
|
|
162
162
|
return [];
|
|
163
163
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
}];
|
|
175
|
-
}
|
|
176
|
-
return [];
|
|
164
|
+
return [{
|
|
165
|
+
type: 'custom',
|
|
166
|
+
fallback: [],
|
|
167
|
+
render: editorView => /*#__PURE__*/React.createElement(ToolbarViewedEvent, {
|
|
168
|
+
key: "edit.link.menu.viewed",
|
|
169
|
+
url: url,
|
|
170
|
+
display: display,
|
|
171
|
+
editorView: editorView
|
|
172
|
+
})
|
|
173
|
+
}];
|
|
177
174
|
};
|
|
178
175
|
const generateToolbarItems = (state, featureFlags, intl, providerFactory, cardOptions, platform, linkPicker, pluginInjectionApi) => node => {
|
|
179
176
|
var _pluginInjectionApi$a, _pluginInjectionApi$d, _pluginInjectionApi$d2, _node$attrs, _node$attrs2, _node$attrs2$datasour;
|
|
@@ -1,25 +1,21 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
import { HyperlinkToolbarAppearance } from '../ui/HyperlinkToolbarAppearance';
|
|
6
5
|
import { ToolbarViewedEvent } from '../ui/ToolbarViewedEvent';
|
|
7
6
|
var getToolbarViewedItem = function getToolbarViewedItem(link) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}];
|
|
21
|
-
}
|
|
22
|
-
return [];
|
|
7
|
+
return [{
|
|
8
|
+
type: 'custom',
|
|
9
|
+
fallback: [],
|
|
10
|
+
render: function render(editorView) {
|
|
11
|
+
return /*#__PURE__*/React.createElement(ToolbarViewedEvent, {
|
|
12
|
+
key: "edit.link.menu.viewed",
|
|
13
|
+
url: link,
|
|
14
|
+
display: "url",
|
|
15
|
+
editorView: editorView
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}];
|
|
23
19
|
};
|
|
24
20
|
export var mountHyperlinkPlugin = function mountHyperlinkPlugin(pluginInjectionApi, options) {
|
|
25
21
|
return new SafePlugin({
|
package/dist/esm/toolbar.js
CHANGED
|
@@ -158,21 +158,18 @@ var getToolbarViewedItem = function getToolbarViewedItem(url, display) {
|
|
|
158
158
|
if (!url) {
|
|
159
159
|
return [];
|
|
160
160
|
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}];
|
|
174
|
-
}
|
|
175
|
-
return [];
|
|
161
|
+
return [{
|
|
162
|
+
type: 'custom',
|
|
163
|
+
fallback: [],
|
|
164
|
+
render: function render(editorView) {
|
|
165
|
+
return /*#__PURE__*/React.createElement(ToolbarViewedEvent, {
|
|
166
|
+
key: "edit.link.menu.viewed",
|
|
167
|
+
url: url,
|
|
168
|
+
display: display,
|
|
169
|
+
editorView: editorView
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
}];
|
|
176
173
|
};
|
|
177
174
|
var generateToolbarItems = function generateToolbarItems(state, featureFlags, intl, providerFactory, cardOptions, platform, linkPicker, pluginInjectionApi) {
|
|
178
175
|
return function (node) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.2",
|
|
4
4
|
"description": "Card plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@atlaskit/adf-schema": "^32.0.0",
|
|
35
35
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
36
36
|
"@atlaskit/custom-steps": "^0.0.2",
|
|
37
|
-
"@atlaskit/editor-common": "^76.
|
|
37
|
+
"@atlaskit/editor-common": "^76.20.0",
|
|
38
38
|
"@atlaskit/editor-plugin-analytics": "^0.3.0",
|
|
39
39
|
"@atlaskit/editor-plugin-decorations": "^0.2.0",
|
|
40
40
|
"@atlaskit/editor-plugin-feature-flags": "^1.0.0",
|
|
@@ -123,9 +123,6 @@
|
|
|
123
123
|
"platform.linking-platform.datasource-jira_issues": {
|
|
124
124
|
"type": "boolean"
|
|
125
125
|
},
|
|
126
|
-
"platform.linking-platform.editor.toolbar-viewed-event": {
|
|
127
|
-
"type": "boolean"
|
|
128
|
-
},
|
|
129
126
|
"platform.linking-platform.datasource.show-jlol-basic-filters": {
|
|
130
127
|
"type": "boolean",
|
|
131
128
|
"referenceOnly": "true"
|