@atlaskit/editor-plugin-card 0.14.18 → 0.14.20
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 +12 -0
- package/dist/cjs/pm-plugins/doc.js +4 -8
- package/dist/cjs/ui/EditorLinkingPlatformAnalytics/common.js +6 -1
- package/dist/es2019/pm-plugins/doc.js +4 -8
- package/dist/es2019/ui/EditorLinkingPlatformAnalytics/common.js +6 -1
- package/dist/esm/pm-plugins/doc.js +4 -8
- package/dist/esm/ui/EditorLinkingPlatformAnalytics/common.js +6 -1
- package/dist/types/ui/EditorLinkingPlatformAnalytics/LinkEvents.d.ts +1 -1
- package/dist/types-ts4.5/ui/EditorLinkingPlatformAnalytics/LinkEvents.d.ts +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-card
|
|
2
2
|
|
|
3
|
+
## 0.14.20
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#61628](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/61628) [`c1b054119172`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c1b054119172) - Fixed an issue where link deleteMethod attribute was set as unknown when changing a link to datasource table.
|
|
8
|
+
|
|
9
|
+
## 0.14.19
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#60660](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/60660) [`102ad9375609`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/102ad9375609) - Fixed an issue where link creationMethod attribute was set as unknown when inserting via datasource config modal.
|
|
14
|
+
|
|
3
15
|
## 0.14.18
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -446,10 +446,6 @@ var updateCardFromDatasourceModal = exports.updateCardFromDatasourceModal = func
|
|
|
446
446
|
var isUrlChange = ((_newAdf$attrs2 = newAdf.attrs) === null || _newAdf$attrs2 === void 0 ? void 0 : _newAdf$attrs2.url) !== ((_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 ? void 0 : _node$attrs2.url);
|
|
447
447
|
if (isColumnChange || isUrlChange) {
|
|
448
448
|
tr.setNodeMarkup(from, schemaNodes.blockCard, _objectSpread(_objectSpread({}, node.attrs), newAdf.attrs));
|
|
449
|
-
(0, _card.addLinkMetadata)(state.selection, tr, {
|
|
450
|
-
action: _analytics.ACTION.UPDATED,
|
|
451
|
-
sourceEvent: sourceEvent
|
|
452
|
-
});
|
|
453
449
|
}
|
|
454
450
|
} else {
|
|
455
451
|
// inline or blockCard to datasource
|
|
@@ -458,11 +454,11 @@ var updateCardFromDatasourceModal = exports.updateCardFromDatasourceModal = func
|
|
|
458
454
|
} else if (newAdf.type === 'inlineCard') {
|
|
459
455
|
// card type to inlineCard
|
|
460
456
|
tr.setNodeMarkup(from, schemaNodes.inlineCard, newAdf.attrs);
|
|
461
|
-
(0, _card.addLinkMetadata)(state.selection, tr, {
|
|
462
|
-
action: _analytics.ACTION.UPDATED,
|
|
463
|
-
sourceEvent: sourceEvent
|
|
464
|
-
});
|
|
465
457
|
}
|
|
458
|
+
(0, _card.addLinkMetadata)(state.selection, tr, {
|
|
459
|
+
action: _analytics.ACTION.UPDATED,
|
|
460
|
+
sourceEvent: sourceEvent
|
|
461
|
+
});
|
|
466
462
|
(0, _actions.hideDatasourceModal)(tr);
|
|
467
463
|
view.dispatch(tr.scrollIntoView());
|
|
468
464
|
};
|
|
@@ -25,7 +25,10 @@ var withHistoryMethod = function withHistoryMethod(fn) {
|
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
27
|
var getMethod = exports.getMethod = withHistoryMethod(function (_ref) {
|
|
28
|
-
var
|
|
28
|
+
var _inputMethod, _payload;
|
|
29
|
+
var inputMethod = _ref.inputMethod,
|
|
30
|
+
sourceEvent = _ref.sourceEvent;
|
|
31
|
+
inputMethod = (_inputMethod = inputMethod) !== null && _inputMethod !== void 0 ? _inputMethod : sourceEvent === null || sourceEvent === void 0 || (_payload = sourceEvent.payload) === null || _payload === void 0 || (_payload = _payload.attributes) === null || _payload === void 0 ? void 0 : _payload.inputMethod;
|
|
29
32
|
switch (inputMethod) {
|
|
30
33
|
case _analytics.INPUT_METHOD.CLIPBOARD:
|
|
31
34
|
return 'editor_paste';
|
|
@@ -38,6 +41,8 @@ var getMethod = exports.getMethod = withHistoryMethod(function (_ref) {
|
|
|
38
41
|
return 'linkpicker_searchResult';
|
|
39
42
|
case _analytics.INPUT_METHOD.MANUAL:
|
|
40
43
|
return 'linkpicker_manual';
|
|
44
|
+
case _analytics.INPUT_METHOD.DATASOURCE:
|
|
45
|
+
return 'datasource_config';
|
|
41
46
|
default:
|
|
42
47
|
return 'unknown';
|
|
43
48
|
}
|
|
@@ -421,10 +421,6 @@ export const updateCardFromDatasourceModal = (state, node, newAdf, view, sourceE
|
|
|
421
421
|
...node.attrs,
|
|
422
422
|
...newAdf.attrs
|
|
423
423
|
});
|
|
424
|
-
addLinkMetadata(state.selection, tr, {
|
|
425
|
-
action: ACTION.UPDATED,
|
|
426
|
-
sourceEvent
|
|
427
|
-
});
|
|
428
424
|
}
|
|
429
425
|
} else {
|
|
430
426
|
// inline or blockCard to datasource
|
|
@@ -433,11 +429,11 @@ export const updateCardFromDatasourceModal = (state, node, newAdf, view, sourceE
|
|
|
433
429
|
} else if (newAdf.type === 'inlineCard') {
|
|
434
430
|
// card type to inlineCard
|
|
435
431
|
tr.setNodeMarkup(from, schemaNodes.inlineCard, newAdf.attrs);
|
|
436
|
-
addLinkMetadata(state.selection, tr, {
|
|
437
|
-
action: ACTION.UPDATED,
|
|
438
|
-
sourceEvent
|
|
439
|
-
});
|
|
440
432
|
}
|
|
433
|
+
addLinkMetadata(state.selection, tr, {
|
|
434
|
+
action: ACTION.UPDATED,
|
|
435
|
+
sourceEvent
|
|
436
|
+
});
|
|
441
437
|
hideDatasourceModal(tr);
|
|
442
438
|
view.dispatch(tr.scrollIntoView());
|
|
443
439
|
};
|
|
@@ -21,8 +21,11 @@ const withHistoryMethod = fn => {
|
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
export const getMethod = withHistoryMethod(({
|
|
24
|
-
inputMethod
|
|
24
|
+
inputMethod,
|
|
25
|
+
sourceEvent
|
|
25
26
|
}) => {
|
|
27
|
+
var _inputMethod, _payload, _payload$attributes;
|
|
28
|
+
inputMethod = (_inputMethod = inputMethod) !== null && _inputMethod !== void 0 ? _inputMethod : sourceEvent === null || sourceEvent === void 0 ? void 0 : (_payload = sourceEvent.payload) === null || _payload === void 0 ? void 0 : (_payload$attributes = _payload.attributes) === null || _payload$attributes === void 0 ? void 0 : _payload$attributes.inputMethod;
|
|
26
29
|
switch (inputMethod) {
|
|
27
30
|
case INPUT_METHOD.CLIPBOARD:
|
|
28
31
|
return 'editor_paste';
|
|
@@ -35,6 +38,8 @@ export const getMethod = withHistoryMethod(({
|
|
|
35
38
|
return 'linkpicker_searchResult';
|
|
36
39
|
case INPUT_METHOD.MANUAL:
|
|
37
40
|
return 'linkpicker_manual';
|
|
41
|
+
case INPUT_METHOD.DATASOURCE:
|
|
42
|
+
return 'datasource_config';
|
|
38
43
|
default:
|
|
39
44
|
return 'unknown';
|
|
40
45
|
}
|
|
@@ -439,10 +439,6 @@ export var updateCardFromDatasourceModal = function updateCardFromDatasourceModa
|
|
|
439
439
|
var isUrlChange = ((_newAdf$attrs2 = newAdf.attrs) === null || _newAdf$attrs2 === void 0 ? void 0 : _newAdf$attrs2.url) !== ((_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 ? void 0 : _node$attrs2.url);
|
|
440
440
|
if (isColumnChange || isUrlChange) {
|
|
441
441
|
tr.setNodeMarkup(from, schemaNodes.blockCard, _objectSpread(_objectSpread({}, node.attrs), newAdf.attrs));
|
|
442
|
-
addLinkMetadata(state.selection, tr, {
|
|
443
|
-
action: ACTION.UPDATED,
|
|
444
|
-
sourceEvent: sourceEvent
|
|
445
|
-
});
|
|
446
442
|
}
|
|
447
443
|
} else {
|
|
448
444
|
// inline or blockCard to datasource
|
|
@@ -451,11 +447,11 @@ export var updateCardFromDatasourceModal = function updateCardFromDatasourceModa
|
|
|
451
447
|
} else if (newAdf.type === 'inlineCard') {
|
|
452
448
|
// card type to inlineCard
|
|
453
449
|
tr.setNodeMarkup(from, schemaNodes.inlineCard, newAdf.attrs);
|
|
454
|
-
addLinkMetadata(state.selection, tr, {
|
|
455
|
-
action: ACTION.UPDATED,
|
|
456
|
-
sourceEvent: sourceEvent
|
|
457
|
-
});
|
|
458
450
|
}
|
|
451
|
+
addLinkMetadata(state.selection, tr, {
|
|
452
|
+
action: ACTION.UPDATED,
|
|
453
|
+
sourceEvent: sourceEvent
|
|
454
|
+
});
|
|
459
455
|
hideDatasourceModal(tr);
|
|
460
456
|
view.dispatch(tr.scrollIntoView());
|
|
461
457
|
};
|
|
@@ -19,7 +19,10 @@ var withHistoryMethod = function withHistoryMethod(fn) {
|
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
21
|
export var getMethod = withHistoryMethod(function (_ref) {
|
|
22
|
-
var
|
|
22
|
+
var _inputMethod, _payload;
|
|
23
|
+
var inputMethod = _ref.inputMethod,
|
|
24
|
+
sourceEvent = _ref.sourceEvent;
|
|
25
|
+
inputMethod = (_inputMethod = inputMethod) !== null && _inputMethod !== void 0 ? _inputMethod : sourceEvent === null || sourceEvent === void 0 || (_payload = sourceEvent.payload) === null || _payload === void 0 || (_payload = _payload.attributes) === null || _payload === void 0 ? void 0 : _payload.inputMethod;
|
|
23
26
|
switch (inputMethod) {
|
|
24
27
|
case INPUT_METHOD.CLIPBOARD:
|
|
25
28
|
return 'editor_paste';
|
|
@@ -32,6 +35,8 @@ export var getMethod = withHistoryMethod(function (_ref) {
|
|
|
32
35
|
return 'linkpicker_searchResult';
|
|
33
36
|
case INPUT_METHOD.MANUAL:
|
|
34
37
|
return 'linkpicker_manual';
|
|
38
|
+
case INPUT_METHOD.DATASOURCE:
|
|
39
|
+
return 'datasource_config';
|
|
35
40
|
default:
|
|
36
41
|
return 'unknown';
|
|
37
42
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.20",
|
|
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": "^35.1.1",
|
|
35
35
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
36
36
|
"@atlaskit/custom-steps": "^0.0.9",
|
|
37
|
-
"@atlaskit/editor-common": "^76.
|
|
37
|
+
"@atlaskit/editor-common": "^76.27.0",
|
|
38
38
|
"@atlaskit/editor-plugin-analytics": "^0.4.0",
|
|
39
39
|
"@atlaskit/editor-plugin-decorations": "^0.2.0",
|
|
40
40
|
"@atlaskit/editor-plugin-feature-flags": "^1.0.0",
|