@atlaskit/editor-plugin-hyperlink 0.5.0 → 0.5.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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/editor-plugin-hyperlink
2
2
 
3
+ ## 0.5.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 0.5.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [`553b34b5fd4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/553b34b5fd4) - Small analytics bug fixes relating to auto-linking on enter, legacy link picker, and unresolvable links.
14
+
3
15
  ## 0.5.0
4
16
 
5
17
  ### Minor Changes
@@ -7,6 +7,7 @@ exports.createKeymapPlugin = createKeymapPlugin;
7
7
  exports.default = void 0;
8
8
  var _adfSchema = require("@atlaskit/adf-schema");
9
9
  var _analytics = require("@atlaskit/editor-common/analytics");
10
+ var _card = require("@atlaskit/editor-common/card");
10
11
  var _keymaps = require("@atlaskit/editor-common/keymaps");
11
12
  var _utils = require("@atlaskit/editor-common/utils");
12
13
  var _keymap = require("@atlaskit/editor-prosemirror/keymap");
@@ -60,6 +61,9 @@ var mayConvertLastWordToHyperlink = function mayConvertLastWordToHyperlink(skipA
60
61
  }
61
62
  var tr = state.tr.addMark(start, end, markType);
62
63
  if (dispatch) {
64
+ (0, _card.addLinkMetadata)(state.selection, tr, {
65
+ inputMethod: _analytics.INPUT_METHOD.AUTO_DETECT
66
+ });
63
67
  if (skipAnalytics) {
64
68
  dispatch(tr);
65
69
  } else {
@@ -1,5 +1,6 @@
1
1
  import { getLinkMatch } from '@atlaskit/adf-schema';
2
2
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
+ import { addLinkMetadata } from '@atlaskit/editor-common/card';
3
4
  import { addLink, bindKeymapWithCommand, bindKeymapWithEditorCommand, enter, escape, insertNewLine } from '@atlaskit/editor-common/keymaps';
4
5
  import { findFilepaths, getLinkCreationAnalyticsEvent, isLinkInMatches } from '@atlaskit/editor-common/utils';
5
6
  import { keymap } from '@atlaskit/editor-prosemirror/keymap';
@@ -51,6 +52,9 @@ const mayConvertLastWordToHyperlink = (skipAnalytics, editorAnalyticsApi) => {
51
52
  }
52
53
  const tr = state.tr.addMark(start, end, markType);
53
54
  if (dispatch) {
55
+ addLinkMetadata(state.selection, tr, {
56
+ inputMethod: INPUT_METHOD.AUTO_DETECT
57
+ });
54
58
  if (skipAnalytics) {
55
59
  dispatch(tr);
56
60
  } else {
@@ -1,5 +1,6 @@
1
1
  import { getLinkMatch } from '@atlaskit/adf-schema';
2
2
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
+ import { addLinkMetadata } from '@atlaskit/editor-common/card';
3
4
  import { addLink, bindKeymapWithCommand, bindKeymapWithEditorCommand, enter, escape, insertNewLine } from '@atlaskit/editor-common/keymaps';
4
5
  import { findFilepaths, getLinkCreationAnalyticsEvent, isLinkInMatches } from '@atlaskit/editor-common/utils';
5
6
  import { keymap } from '@atlaskit/editor-prosemirror/keymap';
@@ -53,6 +54,9 @@ var mayConvertLastWordToHyperlink = function mayConvertLastWordToHyperlink(skipA
53
54
  }
54
55
  var tr = state.tr.addMark(start, end, markType);
55
56
  if (dispatch) {
57
+ addLinkMetadata(state.selection, tr, {
58
+ inputMethod: INPUT_METHOD.AUTO_DETECT
59
+ });
56
60
  if (skipAnalytics) {
57
61
  dispatch(tr);
58
62
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-hyperlink",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "Hyperlink plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,7 +33,7 @@
33
33
  "dependencies": {
34
34
  "@atlaskit/adf-schema": "^29.1.0",
35
35
  "@atlaskit/analytics-next": "^9.1.0",
36
- "@atlaskit/editor-common": "^75.2.0",
36
+ "@atlaskit/editor-common": "^76.0.0",
37
37
  "@atlaskit/editor-plugin-analytics": "^0.2.0",
38
38
  "@atlaskit/editor-plugin-feature-flags": "^1.0.0",
39
39
  "@atlaskit/editor-prosemirror": "1.1.0",