@atlaskit/editor-plugin-card 0.14.18 → 0.14.19

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,11 @@
1
1
  # @atlaskit/editor-plugin-card
2
2
 
3
+ ## 0.14.19
4
+
5
+ ### Patch Changes
6
+
7
+ - [#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.
8
+
3
9
  ## 0.14.18
4
10
 
5
11
  ### Patch Changes
@@ -25,7 +25,10 @@ var withHistoryMethod = function withHistoryMethod(fn) {
25
25
  };
26
26
  };
27
27
  var getMethod = exports.getMethod = withHistoryMethod(function (_ref) {
28
- var inputMethod = _ref.inputMethod;
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
  }
@@ -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
  }
@@ -19,7 +19,10 @@ var withHistoryMethod = function withHistoryMethod(fn) {
19
19
  };
20
20
  };
21
21
  export var getMethod = withHistoryMethod(function (_ref) {
22
- var inputMethod = _ref.inputMethod;
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
  }
@@ -1,4 +1,4 @@
1
- import { AnalyticsBindingsProps } from './common';
1
+ import type { AnalyticsBindingsProps } from './common';
2
2
  /**
3
3
  * Subscribes to the events occuring in the card
4
4
  * plugin and fires analytics events accordingly
@@ -1,4 +1,4 @@
1
- import { AnalyticsBindingsProps } from './common';
1
+ import type { AnalyticsBindingsProps } from './common';
2
2
  /**
3
3
  * Subscribes to the events occuring in the card
4
4
  * plugin and fires analytics events accordingly
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-card",
3
- "version": "0.14.18",
3
+ "version": "0.14.19",
4
4
  "description": "Card plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",