@atlaskit/editor-plugin-card 1.4.4 → 1.5.0
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 +10 -0
- package/dist/cjs/plugin.js +19 -0
- package/dist/cjs/ui/DatasourceModal/index.js +2 -1
- package/dist/es2019/plugin.js +19 -2
- package/dist/es2019/ui/DatasourceModal/index.js +2 -1
- package/dist/esm/plugin.js +21 -2
- package/dist/esm/ui/DatasourceModal/index.js +2 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-card
|
|
2
2
|
|
|
3
|
+
## 1.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#87262](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/87262) [`a30a91a62f03`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a30a91a62f03) - Add slash command for confluence search datasource creation
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 1.4.4
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -25,6 +25,7 @@ var _ModalWithState = _interopRequireDefault(require("./ui/DatasourceModal/Modal
|
|
|
25
25
|
var _EditorLinkingPlatformAnalytics = require("./ui/EditorLinkingPlatformAnalytics");
|
|
26
26
|
var _EditorSmartCardEvents = require("./ui/EditorSmartCardEvents");
|
|
27
27
|
var _LayoutButton = _interopRequireDefault(require("./ui/LayoutButton"));
|
|
28
|
+
var _utils2 = require("./utils");
|
|
28
29
|
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; }
|
|
29
30
|
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) { (0, _defineProperty2.default)(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; }
|
|
30
31
|
/**
|
|
@@ -165,6 +166,24 @@ var cardPlugin = exports.cardPlugin = function cardPlugin(_ref) {
|
|
|
165
166
|
}
|
|
166
167
|
});
|
|
167
168
|
}
|
|
169
|
+
if ((0, _utils2.isDatasourceConfigEditable)(_linkDatasource.CONFLUENCE_SEARCH_DATASOURCE_ID)) {
|
|
170
|
+
quickInsertArray.push({
|
|
171
|
+
id: 'datasource',
|
|
172
|
+
title: formatMessage(_messages.cardMessages.datasourceConfluenceSearch),
|
|
173
|
+
description: formatMessage(_messages.cardMessages.datasourceConfluenceSearchDescription),
|
|
174
|
+
categories: ['external-content', 'development'],
|
|
175
|
+
keywords: ['confluence'],
|
|
176
|
+
featured: true,
|
|
177
|
+
icon: function icon() {
|
|
178
|
+
return /*#__PURE__*/_react.default.createElement(_quickInsert.IconDatasourceConfluenceSearch, null);
|
|
179
|
+
},
|
|
180
|
+
action: function action(insert) {
|
|
181
|
+
var tr = insert(undefined);
|
|
182
|
+
(0, _actions.showDatasourceModal)('confluence-search')(tr);
|
|
183
|
+
return tr;
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
}
|
|
168
187
|
return quickInsertArray;
|
|
169
188
|
}
|
|
170
189
|
}
|
|
@@ -162,6 +162,8 @@ var DatasourceModal = exports.DatasourceModal = function DatasourceModal(_ref) {
|
|
|
162
162
|
onInsert: onInsert
|
|
163
163
|
}));
|
|
164
164
|
}
|
|
165
|
+
|
|
166
|
+
// TODO: further refactor in https://product-fabric.atlassian.net/browse/EDM-9637
|
|
165
167
|
if (modalType === 'confluence-search') {
|
|
166
168
|
var _existingNode7, _tableView2$propertie, _existingNode8;
|
|
167
169
|
if (!ready) {
|
|
@@ -208,7 +210,6 @@ var DatasourceModal = exports.DatasourceModal = function DatasourceModal(_ref) {
|
|
|
208
210
|
"data-testid": "confluence-search-config-modal"
|
|
209
211
|
}, /*#__PURE__*/_react.default.createElement(_linkDatasource.ConfluenceSearchConfigModal, {
|
|
210
212
|
datasourceId: _datasourceId2,
|
|
211
|
-
viewMode: 'issue',
|
|
212
213
|
visibleColumnKeys: _visibleColumnKeys2,
|
|
213
214
|
parameters: _parameters2,
|
|
214
215
|
url: (_existingNode8 = existingNode) === null || _existingNode8 === void 0 ? void 0 : _existingNode8.attrs.url,
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { blockCard, embedCard, inlineCard } from '@atlaskit/adf-schema';
|
|
3
3
|
import { cardMessages as messages } from '@atlaskit/editor-common/messages';
|
|
4
|
-
import { IconDatasourceAssetsObjects, IconDatasourceJiraIssue } from '@atlaskit/editor-common/quick-insert';
|
|
4
|
+
import { IconDatasourceAssetsObjects, IconDatasourceConfluenceSearch, IconDatasourceJiraIssue } from '@atlaskit/editor-common/quick-insert';
|
|
5
5
|
import { canRenderDatasource } from '@atlaskit/editor-common/utils';
|
|
6
|
-
import { ASSETS_LIST_OF_LINKS_DATASOURCE_ID } from '@atlaskit/link-datasource';
|
|
6
|
+
import { ASSETS_LIST_OF_LINKS_DATASOURCE_ID, CONFLUENCE_SEARCH_DATASOURCE_ID } from '@atlaskit/link-datasource';
|
|
7
7
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
8
8
|
import { createEventsQueue } from './analytics/create-events-queue';
|
|
9
9
|
import { hideLinkToolbar, showDatasourceModal } from './pm-plugins/actions';
|
|
@@ -17,6 +17,7 @@ import DatasourceModalWithState from './ui/DatasourceModal/ModalWithState';
|
|
|
17
17
|
import { EditorLinkingPlatformAnalytics } from './ui/EditorLinkingPlatformAnalytics';
|
|
18
18
|
import { EditorSmartCardEvents } from './ui/EditorSmartCardEvents';
|
|
19
19
|
import LayoutButton from './ui/LayoutButton';
|
|
20
|
+
import { isDatasourceConfigEditable } from './utils';
|
|
20
21
|
/**
|
|
21
22
|
* Card plugin to be added to an `EditorPresetBuilder` and used with `ComposableEditor`
|
|
22
23
|
* from `@atlaskit/editor-core`.
|
|
@@ -154,6 +155,22 @@ export const cardPlugin = ({
|
|
|
154
155
|
}
|
|
155
156
|
});
|
|
156
157
|
}
|
|
158
|
+
if (isDatasourceConfigEditable(CONFLUENCE_SEARCH_DATASOURCE_ID)) {
|
|
159
|
+
quickInsertArray.push({
|
|
160
|
+
id: 'datasource',
|
|
161
|
+
title: formatMessage(messages.datasourceConfluenceSearch),
|
|
162
|
+
description: formatMessage(messages.datasourceConfluenceSearchDescription),
|
|
163
|
+
categories: ['external-content', 'development'],
|
|
164
|
+
keywords: ['confluence'],
|
|
165
|
+
featured: true,
|
|
166
|
+
icon: () => /*#__PURE__*/React.createElement(IconDatasourceConfluenceSearch, null),
|
|
167
|
+
action(insert) {
|
|
168
|
+
const tr = insert(undefined);
|
|
169
|
+
showDatasourceModal('confluence-search')(tr);
|
|
170
|
+
return tr;
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
}
|
|
157
174
|
return quickInsertArray;
|
|
158
175
|
}
|
|
159
176
|
}
|
|
@@ -133,6 +133,8 @@ export const DatasourceModal = ({
|
|
|
133
133
|
onInsert: onInsert
|
|
134
134
|
}));
|
|
135
135
|
}
|
|
136
|
+
|
|
137
|
+
// TODO: further refactor in https://product-fabric.atlassian.net/browse/EDM-9637
|
|
136
138
|
if (modalType === 'confluence-search') {
|
|
137
139
|
var _existingNode7, _existingNode7$attrs, _tableView$properties3, _existingNode8;
|
|
138
140
|
if (!ready) {
|
|
@@ -168,7 +170,6 @@ export const DatasourceModal = ({
|
|
|
168
170
|
"data-testid": "confluence-search-config-modal"
|
|
169
171
|
}, /*#__PURE__*/React.createElement(ConfluenceSearchConfigModal, {
|
|
170
172
|
datasourceId: datasourceId,
|
|
171
|
-
viewMode: 'issue',
|
|
172
173
|
visibleColumnKeys: visibleColumnKeys,
|
|
173
174
|
parameters: parameters,
|
|
174
175
|
url: (_existingNode8 = existingNode) === null || _existingNode8 === void 0 ? void 0 : _existingNode8.attrs.url,
|
package/dist/esm/plugin.js
CHANGED
|
@@ -4,9 +4,9 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { blockCard, embedCard, inlineCard } from '@atlaskit/adf-schema';
|
|
6
6
|
import { cardMessages as messages } from '@atlaskit/editor-common/messages';
|
|
7
|
-
import { IconDatasourceAssetsObjects, IconDatasourceJiraIssue } from '@atlaskit/editor-common/quick-insert';
|
|
7
|
+
import { IconDatasourceAssetsObjects, IconDatasourceConfluenceSearch, IconDatasourceJiraIssue } from '@atlaskit/editor-common/quick-insert';
|
|
8
8
|
import { canRenderDatasource } from '@atlaskit/editor-common/utils';
|
|
9
|
-
import { ASSETS_LIST_OF_LINKS_DATASOURCE_ID } from '@atlaskit/link-datasource';
|
|
9
|
+
import { ASSETS_LIST_OF_LINKS_DATASOURCE_ID, CONFLUENCE_SEARCH_DATASOURCE_ID } from '@atlaskit/link-datasource';
|
|
10
10
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
11
11
|
import { createEventsQueue } from './analytics/create-events-queue';
|
|
12
12
|
import { hideLinkToolbar, showDatasourceModal } from './pm-plugins/actions';
|
|
@@ -20,6 +20,7 @@ import DatasourceModalWithState from './ui/DatasourceModal/ModalWithState';
|
|
|
20
20
|
import { EditorLinkingPlatformAnalytics } from './ui/EditorLinkingPlatformAnalytics';
|
|
21
21
|
import { EditorSmartCardEvents } from './ui/EditorSmartCardEvents';
|
|
22
22
|
import LayoutButton from './ui/LayoutButton';
|
|
23
|
+
import { isDatasourceConfigEditable } from './utils';
|
|
23
24
|
/**
|
|
24
25
|
* Card plugin to be added to an `EditorPresetBuilder` and used with `ComposableEditor`
|
|
25
26
|
* from `@atlaskit/editor-core`.
|
|
@@ -158,6 +159,24 @@ export var cardPlugin = function cardPlugin(_ref) {
|
|
|
158
159
|
}
|
|
159
160
|
});
|
|
160
161
|
}
|
|
162
|
+
if (isDatasourceConfigEditable(CONFLUENCE_SEARCH_DATASOURCE_ID)) {
|
|
163
|
+
quickInsertArray.push({
|
|
164
|
+
id: 'datasource',
|
|
165
|
+
title: formatMessage(messages.datasourceConfluenceSearch),
|
|
166
|
+
description: formatMessage(messages.datasourceConfluenceSearchDescription),
|
|
167
|
+
categories: ['external-content', 'development'],
|
|
168
|
+
keywords: ['confluence'],
|
|
169
|
+
featured: true,
|
|
170
|
+
icon: function icon() {
|
|
171
|
+
return /*#__PURE__*/React.createElement(IconDatasourceConfluenceSearch, null);
|
|
172
|
+
},
|
|
173
|
+
action: function action(insert) {
|
|
174
|
+
var tr = insert(undefined);
|
|
175
|
+
showDatasourceModal('confluence-search')(tr);
|
|
176
|
+
return tr;
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
}
|
|
161
180
|
return quickInsertArray;
|
|
162
181
|
}
|
|
163
182
|
}
|
|
@@ -152,6 +152,8 @@ export var DatasourceModal = function DatasourceModal(_ref) {
|
|
|
152
152
|
onInsert: onInsert
|
|
153
153
|
}));
|
|
154
154
|
}
|
|
155
|
+
|
|
156
|
+
// TODO: further refactor in https://product-fabric.atlassian.net/browse/EDM-9637
|
|
155
157
|
if (modalType === 'confluence-search') {
|
|
156
158
|
var _existingNode7, _tableView2$propertie, _existingNode8;
|
|
157
159
|
if (!ready) {
|
|
@@ -198,7 +200,6 @@ export var DatasourceModal = function DatasourceModal(_ref) {
|
|
|
198
200
|
"data-testid": "confluence-search-config-modal"
|
|
199
201
|
}, /*#__PURE__*/React.createElement(ConfluenceSearchConfigModal, {
|
|
200
202
|
datasourceId: _datasourceId2,
|
|
201
|
-
viewMode: 'issue',
|
|
202
203
|
visibleColumnKeys: _visibleColumnKeys2,
|
|
203
204
|
parameters: _parameters2,
|
|
204
205
|
url: (_existingNode8 = existingNode) === null || _existingNode8 === void 0 ? void 0 : _existingNode8.attrs.url,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Card plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@atlaskit/adf-schema": "^35.8.0",
|
|
36
36
|
"@atlaskit/analytics-next": "^9.2.0",
|
|
37
37
|
"@atlaskit/custom-steps": "^0.0.17",
|
|
38
|
-
"@atlaskit/editor-common": "^78.
|
|
38
|
+
"@atlaskit/editor-common": "^78.25.0",
|
|
39
39
|
"@atlaskit/editor-plugin-analytics": "^1.0.0",
|
|
40
40
|
"@atlaskit/editor-plugin-decorations": "^1.0.0",
|
|
41
41
|
"@atlaskit/editor-plugin-feature-flags": "^1.0.0",
|