@atlaskit/editor-plugin-card 0.2.2 → 0.2.3

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.2.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`e86c43db633`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e86c43db633) - Updates card plugin to skip finding changed links for analytics for transactions with TableSortStep
8
+
3
9
  ## 0.2.2
4
10
 
5
11
  ### Patch Changes
@@ -283,7 +283,10 @@ function eventsFromTransaction(tr, state) {
283
283
  */
284
284
  var isRemote = tr.getMeta('isRemote');
285
285
  var isReplaceDocument = tr.getMeta('replaceDocument');
286
- if (isRemote || isReplaceDocument) {
286
+ var isTableSort = tr.steps.find(function (step) {
287
+ return step instanceof _steps.TableSortStep;
288
+ });
289
+ if (isRemote || isReplaceDocument || isTableSort) {
287
290
  return events;
288
291
  }
289
292
  var historyMeta = tr.getMeta(_utils.pmHistoryPluginKey);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-card",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import { AddMarkStep, RemoveMarkStep } from 'prosemirror-transform';
2
- import { LinkMetaStep } from '@atlaskit/adf-schema/steps';
2
+ import { LinkMetaStep, TableSortStep } from '@atlaskit/adf-schema/steps';
3
3
  import { ACTION } from '@atlaskit/editor-common/analytics';
4
4
  import { getLinkMetadataFromTransaction } from '@atlaskit/editor-common/card';
5
5
  import { isLinkMark, pmHistoryPluginKey } from '@atlaskit/editor-common/utils';
@@ -259,7 +259,8 @@ export function eventsFromTransaction(tr, state) {
259
259
  */
260
260
  const isRemote = tr.getMeta('isRemote');
261
261
  const isReplaceDocument = tr.getMeta('replaceDocument');
262
- if (isRemote || isReplaceDocument) {
262
+ const isTableSort = tr.steps.find(step => step instanceof TableSortStep);
263
+ if (isRemote || isReplaceDocument || isTableSort) {
263
264
  return events;
264
265
  }
265
266
  const historyMeta = tr.getMeta(pmHistoryPluginKey);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-card",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "sideEffects": false
5
5
  }
@@ -4,7 +4,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
4
4
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
5
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
6
  import { AddMarkStep, RemoveMarkStep } from 'prosemirror-transform';
7
- import { LinkMetaStep } from '@atlaskit/adf-schema/steps';
7
+ import { LinkMetaStep, TableSortStep } from '@atlaskit/adf-schema/steps';
8
8
  import { ACTION } from '@atlaskit/editor-common/analytics';
9
9
  import { getLinkMetadataFromTransaction } from '@atlaskit/editor-common/card';
10
10
  import { isLinkMark, pmHistoryPluginKey } from '@atlaskit/editor-common/utils';
@@ -274,7 +274,10 @@ export function eventsFromTransaction(tr, state) {
274
274
  */
275
275
  var isRemote = tr.getMeta('isRemote');
276
276
  var isReplaceDocument = tr.getMeta('replaceDocument');
277
- if (isRemote || isReplaceDocument) {
277
+ var isTableSort = tr.steps.find(function (step) {
278
+ return step instanceof TableSortStep;
279
+ });
280
+ if (isRemote || isReplaceDocument || isTableSort) {
278
281
  return events;
279
282
  }
280
283
  var historyMeta = tr.getMeta(pmHistoryPluginKey);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-card",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-card",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Card 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": "^26.1.0",
35
35
  "@atlaskit/analytics-next": "^9.1.0",
36
- "@atlaskit/editor-common": "^74.25.0",
36
+ "@atlaskit/editor-common": "^74.26.0",
37
37
  "@atlaskit/editor-plugin-analytics": "^0.1.0",
38
38
  "@atlaskit/editor-plugin-decorations": "^0.1.0",
39
39
  "@atlaskit/editor-plugin-feature-flags": "^0.1.0",