@atlaskit/editor-plugin-analytics 6.2.6 → 7.0.1
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,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-analytics
|
|
2
2
|
|
|
3
|
+
## 7.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`d34e6bd1197a5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d34e6bd1197a5) -
|
|
8
|
+
EDITOR-4178 update document inserted event to have is inside synced block attribute
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 7.0.0
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 6.2.6
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -10,6 +10,8 @@ var _analytics2 = require("@atlaskit/editor-common/utils/analytics");
|
|
|
10
10
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
11
11
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
12
12
|
var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
13
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
13
15
|
function getSelectionType(selection) {
|
|
14
16
|
var _selection$constructo;
|
|
15
17
|
var type;
|
|
@@ -78,6 +80,10 @@ function getStateContext(selection, payload, tr) {
|
|
|
78
80
|
}
|
|
79
81
|
if (payload.action === _analytics.ACTION.INSERTED && payload.actionSubject === _analytics.ACTION_SUBJECT.DOCUMENT && payload.attributes) {
|
|
80
82
|
payload.attributes.insertLocation = insertLocation;
|
|
83
|
+
if ((0, _experiments.editorExperiment)('platform_synced_block', true) && (0, _platformFeatureFlags.fg)('platform_synced_block_dogfooding')) {
|
|
84
|
+
var bodiedSyncBlock = selection.$from.doc.type.schema.nodes.bodiedSyncBlock;
|
|
85
|
+
payload.attributes.isInsideSyncedBlock = Boolean((0, _utils.findParentNodeOfType)(bodiedSyncBlock)(selection));
|
|
86
|
+
}
|
|
81
87
|
} else {
|
|
82
88
|
payload.attributes.nodeLocation = insertLocation;
|
|
83
89
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { ACTION, ACTION_SUBJECT, SELECTION_POSITION, SELECTION_TYPE } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import { findInsertLocation } from '@atlaskit/editor-common/utils/analytics';
|
|
3
3
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
import { findParentNode } from '@atlaskit/editor-prosemirror/utils';
|
|
4
|
+
import { findParentNode, findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
5
5
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
6
8
|
export function getSelectionType(selection) {
|
|
7
9
|
var _selection$constructo;
|
|
8
10
|
let type;
|
|
@@ -77,6 +79,12 @@ export function getStateContext(selection, payload, tr) {
|
|
|
77
79
|
}
|
|
78
80
|
if (payload.action === ACTION.INSERTED && payload.actionSubject === ACTION_SUBJECT.DOCUMENT && payload.attributes) {
|
|
79
81
|
payload.attributes.insertLocation = insertLocation;
|
|
82
|
+
if (editorExperiment('platform_synced_block', true) && fg('platform_synced_block_dogfooding')) {
|
|
83
|
+
const {
|
|
84
|
+
bodiedSyncBlock
|
|
85
|
+
} = selection.$from.doc.type.schema.nodes;
|
|
86
|
+
payload.attributes.isInsideSyncedBlock = Boolean(findParentNodeOfType(bodiedSyncBlock)(selection));
|
|
87
|
+
}
|
|
80
88
|
} else {
|
|
81
89
|
payload.attributes.nodeLocation = insertLocation;
|
|
82
90
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { ACTION, ACTION_SUBJECT, SELECTION_POSITION, SELECTION_TYPE } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import { findInsertLocation } from '@atlaskit/editor-common/utils/analytics';
|
|
3
3
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
import { findParentNode } from '@atlaskit/editor-prosemirror/utils';
|
|
4
|
+
import { findParentNode, findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
5
5
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
6
8
|
export function getSelectionType(selection) {
|
|
7
9
|
var _selection$constructo;
|
|
8
10
|
var type;
|
|
@@ -71,6 +73,10 @@ export function getStateContext(selection, payload, tr) {
|
|
|
71
73
|
}
|
|
72
74
|
if (payload.action === ACTION.INSERTED && payload.actionSubject === ACTION_SUBJECT.DOCUMENT && payload.attributes) {
|
|
73
75
|
payload.attributes.insertLocation = insertLocation;
|
|
76
|
+
if (editorExperiment('platform_synced_block', true) && fg('platform_synced_block_dogfooding')) {
|
|
77
|
+
var bodiedSyncBlock = selection.$from.doc.type.schema.nodes.bodiedSyncBlock;
|
|
78
|
+
payload.attributes.isInsideSyncedBlock = Boolean(findParentNodeOfType(bodiedSyncBlock)(selection));
|
|
79
|
+
}
|
|
74
80
|
} else {
|
|
75
81
|
payload.attributes.nodeLocation = insertLocation;
|
|
76
82
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-analytics",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.1",
|
|
4
4
|
"description": "Analytics plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -27,16 +27,18 @@
|
|
|
27
27
|
"sideEffects": false,
|
|
28
28
|
"atlaskit:src": "src/index.ts",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@atlaskit/adf-schema": "^51.5.
|
|
31
|
-
"@atlaskit/analytics-listeners": "^9.
|
|
30
|
+
"@atlaskit/adf-schema": "^51.5.0",
|
|
31
|
+
"@atlaskit/analytics-listeners": "^9.2.0",
|
|
32
32
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
33
|
-
"@atlaskit/editor-plugin-feature-flags": "^
|
|
34
|
-
"@atlaskit/editor-prosemirror": "7.
|
|
33
|
+
"@atlaskit/editor-plugin-feature-flags": "^6.0.0",
|
|
34
|
+
"@atlaskit/editor-prosemirror": "^7.2.0",
|
|
35
35
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
36
|
+
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
37
|
+
"@atlaskit/tmp-editor-statsig": "^16.27.0",
|
|
36
38
|
"@babel/runtime": "^7.0.0"
|
|
37
39
|
},
|
|
38
40
|
"peerDependencies": {
|
|
39
|
-
"@atlaskit/editor-common": "^
|
|
41
|
+
"@atlaskit/editor-common": "^111.8.0",
|
|
40
42
|
"react": "^18.2.0"
|
|
41
43
|
},
|
|
42
44
|
"techstack": {
|
|
@@ -72,6 +74,11 @@
|
|
|
72
74
|
]
|
|
73
75
|
}
|
|
74
76
|
},
|
|
77
|
+
"platform-feature-flags": {
|
|
78
|
+
"platform_synced_block_dogfooding": {
|
|
79
|
+
"type": "boolean"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
75
82
|
"stricter": {
|
|
76
83
|
"no-unused-dependencies": {
|
|
77
84
|
"checkDevDependencies": true
|