@atlaskit/editor-plugin-metrics 17.0.12 → 17.0.14
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/utils/check-tr-actions/tr-checks/check-table-column-resized.js +3 -3
- package/dist/cjs/pm-plugins/utils/is-tr-with-doc-changes.js +2 -2
- package/dist/cjs/pm-plugins/utils/should-skip-tr.js +6 -5
- package/dist/es2019/pm-plugins/utils/check-tr-actions/tr-checks/check-table-column-resized.js +1 -1
- package/dist/es2019/pm-plugins/utils/is-tr-with-doc-changes.js +1 -1
- package/dist/es2019/pm-plugins/utils/should-skip-tr.js +2 -1
- package/dist/esm/pm-plugins/utils/check-tr-actions/tr-checks/check-table-column-resized.js +1 -1
- package/dist/esm/pm-plugins/utils/is-tr-with-doc-changes.js +1 -1
- package/dist/esm/pm-plugins/utils/should-skip-tr.js +2 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.checkTableColumnResized = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _batchAttrsStep = require("@atlaskit/adf-schema/steps/batch-attrs-step");
|
|
8
8
|
var _transform = require("@atlaskit/editor-prosemirror/transform");
|
|
9
9
|
var _types = require("../types");
|
|
10
10
|
var checkTableColumnResized = exports.checkTableColumnResized = function checkTableColumnResized(tr) {
|
|
@@ -13,7 +13,7 @@ var checkTableColumnResized = exports.checkTableColumnResized = function checkTa
|
|
|
13
13
|
|
|
14
14
|
// Find the step that is changing the column width
|
|
15
15
|
var resizingColumnStep = steps.find(function (step) {
|
|
16
|
-
return step instanceof _transform.AttrStep || step instanceof
|
|
16
|
+
return step instanceof _transform.AttrStep || step instanceof _batchAttrsStep.BatchAttrsStep;
|
|
17
17
|
});
|
|
18
18
|
if (!resizingColumnStep) {
|
|
19
19
|
return undefined;
|
|
@@ -21,7 +21,7 @@ var checkTableColumnResized = exports.checkTableColumnResized = function checkTa
|
|
|
21
21
|
var pos;
|
|
22
22
|
|
|
23
23
|
// Find the position of the first column in the step that is being resized
|
|
24
|
-
if (resizingColumnStep instanceof
|
|
24
|
+
if (resizingColumnStep instanceof _batchAttrsStep.BatchAttrsStep) {
|
|
25
25
|
if (resizingColumnStep.data.length === 0) {
|
|
26
26
|
return undefined;
|
|
27
27
|
}
|
|
@@ -4,11 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.isTrWithDocChanges = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _batchAttrsStep = require("@atlaskit/adf-schema/steps/batch-attrs-step");
|
|
8
8
|
var _transform = require("@atlaskit/editor-prosemirror/transform");
|
|
9
9
|
var isTrWithDocChanges = exports.isTrWithDocChanges = function isTrWithDocChanges(tr) {
|
|
10
10
|
var _tr$steps;
|
|
11
11
|
return tr.steps.length > 0 && ((_tr$steps = tr.steps) === null || _tr$steps === void 0 ? void 0 : _tr$steps.some(function (step) {
|
|
12
|
-
return step instanceof _transform.ReplaceStep || step instanceof _transform.ReplaceAroundStep || step instanceof _transform.AddMarkStep || step instanceof _transform.AttrStep || step instanceof _transform.RemoveMarkStep || step instanceof
|
|
12
|
+
return step instanceof _transform.ReplaceStep || step instanceof _transform.ReplaceAroundStep || step instanceof _transform.AddMarkStep || step instanceof _transform.AttrStep || step instanceof _transform.RemoveMarkStep || step instanceof _batchAttrsStep.BatchAttrsStep;
|
|
13
13
|
}));
|
|
14
14
|
};
|
|
@@ -4,18 +4,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.shouldSkipTr = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _typeAhead = require("@atlaskit/adf-schema/steps/type-ahead");
|
|
8
|
+
var _linkMetaStep = require("@atlaskit/adf-schema/steps/link-meta-step");
|
|
8
9
|
var _transform = require("@atlaskit/editor-prosemirror/transform");
|
|
9
10
|
var isResolvingLink = function isResolvingLink(tr) {
|
|
10
11
|
var _linkStep$getMetadata;
|
|
11
12
|
// When links are added, there are two transactions that are fired and we want to ignore the last one where the link is resolved
|
|
12
13
|
var linkStep = tr.steps.find(function (step) {
|
|
13
|
-
return step instanceof
|
|
14
|
+
return step instanceof _linkMetaStep.LinkMetaStep;
|
|
14
15
|
});
|
|
15
16
|
var hasReplaceStep = tr.steps.some(function (step) {
|
|
16
17
|
return step instanceof _transform.ReplaceStep;
|
|
17
18
|
});
|
|
18
|
-
return Boolean(hasReplaceStep && linkStep instanceof
|
|
19
|
+
return Boolean(hasReplaceStep && linkStep instanceof _linkMetaStep.LinkMetaStep && ((_linkStep$getMetadata = linkStep.getMetadata()) === null || _linkStep$getMetadata === void 0 ? void 0 : _linkStep$getMetadata.cardAction) === 'RESOLVE');
|
|
19
20
|
};
|
|
20
21
|
var checkTypeAheadStepStage = function checkTypeAheadStepStage(tr) {
|
|
21
22
|
var _tr$getMeta;
|
|
@@ -28,7 +29,7 @@ var checkTypeAheadStepStage = function checkTypeAheadStepStage(tr) {
|
|
|
28
29
|
return false;
|
|
29
30
|
}
|
|
30
31
|
var insertTypeAheadStep = tr.steps.find(function (step) {
|
|
31
|
-
return step instanceof
|
|
32
|
+
return step instanceof _typeAhead.InsertTypeAheadStep;
|
|
32
33
|
});
|
|
33
34
|
var replaceStep = tr.steps.find(function (step) {
|
|
34
35
|
return step instanceof _transform.ReplaceStep;
|
|
@@ -36,7 +37,7 @@ var checkTypeAheadStepStage = function checkTypeAheadStepStage(tr) {
|
|
|
36
37
|
if (!insertTypeAheadStep || !replaceStep) {
|
|
37
38
|
return false;
|
|
38
39
|
}
|
|
39
|
-
return insertTypeAheadStep instanceof
|
|
40
|
+
return insertTypeAheadStep instanceof _typeAhead.InsertTypeAheadStep && insertTypeAheadStep.stage;
|
|
40
41
|
};
|
|
41
42
|
var shouldSkipTr = exports.shouldSkipTr = function shouldSkipTr(tr) {
|
|
42
43
|
if (isResolvingLink(tr)) {
|
package/dist/es2019/pm-plugins/utils/check-tr-actions/tr-checks/check-table-column-resized.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BatchAttrsStep } from '@atlaskit/adf-schema/steps';
|
|
1
|
+
import { BatchAttrsStep } from '@atlaskit/adf-schema/steps/batch-attrs-step';
|
|
2
2
|
import { AttrStep } from '@atlaskit/editor-prosemirror/transform';
|
|
3
3
|
import { ActionType } from '../types';
|
|
4
4
|
export const checkTableColumnResized = tr => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BatchAttrsStep } from '@atlaskit/adf-schema/steps';
|
|
1
|
+
import { BatchAttrsStep } from '@atlaskit/adf-schema/steps/batch-attrs-step';
|
|
2
2
|
import { AddMarkStep, AttrStep, RemoveMarkStep, ReplaceAroundStep, ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
|
|
3
3
|
export const isTrWithDocChanges = tr => {
|
|
4
4
|
var _tr$steps;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { InsertTypeAheadStep
|
|
1
|
+
import { InsertTypeAheadStep } from '@atlaskit/adf-schema/steps/type-ahead';
|
|
2
|
+
import { LinkMetaStep } from '@atlaskit/adf-schema/steps/link-meta-step';
|
|
2
3
|
import { ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
|
|
3
4
|
const isResolvingLink = tr => {
|
|
4
5
|
var _linkStep$getMetadata;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BatchAttrsStep } from '@atlaskit/adf-schema/steps';
|
|
1
|
+
import { BatchAttrsStep } from '@atlaskit/adf-schema/steps/batch-attrs-step';
|
|
2
2
|
import { AttrStep } from '@atlaskit/editor-prosemirror/transform';
|
|
3
3
|
import { ActionType } from '../types';
|
|
4
4
|
export var checkTableColumnResized = function checkTableColumnResized(tr) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BatchAttrsStep } from '@atlaskit/adf-schema/steps';
|
|
1
|
+
import { BatchAttrsStep } from '@atlaskit/adf-schema/steps/batch-attrs-step';
|
|
2
2
|
import { AddMarkStep, AttrStep, RemoveMarkStep, ReplaceAroundStep, ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
|
|
3
3
|
export var isTrWithDocChanges = function isTrWithDocChanges(tr) {
|
|
4
4
|
var _tr$steps;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { InsertTypeAheadStep
|
|
1
|
+
import { InsertTypeAheadStep } from '@atlaskit/adf-schema/steps/type-ahead';
|
|
2
|
+
import { LinkMetaStep } from '@atlaskit/adf-schema/steps/link-meta-step';
|
|
2
3
|
import { ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
|
|
3
4
|
var isResolvingLink = function isResolvingLink(tr) {
|
|
4
5
|
var _linkStep$getMetadata;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-metrics",
|
|
3
|
-
"version": "17.0.
|
|
3
|
+
"version": "17.0.14",
|
|
4
4
|
"description": "Metrics plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"@atlaskit/editor-plugin-user-preferences": "^14.0.0",
|
|
26
26
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
27
27
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
28
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
28
|
+
"@atlaskit/tmp-editor-statsig": "^174.0.0",
|
|
29
29
|
"@babel/runtime": "^7.0.0",
|
|
30
30
|
"bind-event-listener": "^3.0.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@atlaskit/editor-common": "^120.
|
|
33
|
+
"@atlaskit/editor-common": "^120.12.0",
|
|
34
34
|
"react": "^18.2.0 || ^19.2.0",
|
|
35
35
|
"react-dom": "^18.2.0 || ^19.2.0"
|
|
36
36
|
},
|