@atlaskit/editor-plugin-rule 20.0.0 → 21.0.0
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,18 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-rule
|
|
2
2
|
|
|
3
|
+
## 21.0.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`5c5d7a5bbff74`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5c5d7a5bbff74) -
|
|
8
|
+
Cleanup `feature_gate` `platform_editor_element_browser_analytic`. Insert analytics permanently
|
|
9
|
+
report the caller's actual input method rather than always attributing the insertion to
|
|
10
|
+
`quickInsert`.
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 20.0.0
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -11,7 +11,6 @@ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
|
11
11
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
12
12
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
13
13
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
14
|
-
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
15
14
|
var _prosemirrorInputRules = require("@atlaskit/prosemirror-input-rules");
|
|
16
15
|
var createHorizontalRule = exports.createHorizontalRule = function createHorizontalRule(state, start, end, inputMethod, editorAnalyticsAPI) {
|
|
17
16
|
if (!state.selection.empty) {
|
|
@@ -29,13 +28,12 @@ var createHorizontalRule = exports.createHorizontalRule = function createHorizon
|
|
|
29
28
|
if (!tr) {
|
|
30
29
|
tr = state.tr.replaceRange(start, end, new _model.Slice(_model.Fragment.from(state.schema.nodes.rule.createChecked()), 0, 0));
|
|
31
30
|
}
|
|
32
|
-
var resolvedInputMethod = (0, _fg.fg)('platform_editor_element_browser_analytic') ? inputMethod : _analytics.INPUT_METHOD.QUICK_INSERT;
|
|
33
31
|
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 || editorAnalyticsAPI.attachAnalyticsEvent({
|
|
34
32
|
action: _analytics.ACTION.INSERTED,
|
|
35
33
|
actionSubject: _analytics.ACTION_SUBJECT.DOCUMENT,
|
|
36
34
|
actionSubjectId: _analytics.ACTION_SUBJECT_ID.DIVIDER,
|
|
37
35
|
attributes: {
|
|
38
|
-
inputMethod:
|
|
36
|
+
inputMethod: inputMethod
|
|
39
37
|
},
|
|
40
38
|
eventType: _analytics.EVENT_TYPE.TRACK
|
|
41
39
|
})(tr);
|
|
@@ -4,7 +4,6 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
4
4
|
import { createRule } from '@atlaskit/editor-common/utils';
|
|
5
5
|
import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
6
6
|
import { hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
8
7
|
import { createPlugin, leafNodeReplacementCharacter } from '@atlaskit/prosemirror-input-rules';
|
|
9
8
|
export const createHorizontalRule = (state, start, end, inputMethod, editorAnalyticsAPI) => {
|
|
10
9
|
if (!state.selection.empty) {
|
|
@@ -24,13 +23,12 @@ export const createHorizontalRule = (state, start, end, inputMethod, editorAnaly
|
|
|
24
23
|
if (!tr) {
|
|
25
24
|
tr = state.tr.replaceRange(start, end, new Slice(Fragment.from(state.schema.nodes.rule.createChecked()), 0, 0));
|
|
26
25
|
}
|
|
27
|
-
const resolvedInputMethod = fg('platform_editor_element_browser_analytic') ? inputMethod : INPUT_METHOD.QUICK_INSERT;
|
|
28
26
|
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 ? void 0 : editorAnalyticsAPI.attachAnalyticsEvent({
|
|
29
27
|
action: ACTION.INSERTED,
|
|
30
28
|
actionSubject: ACTION_SUBJECT.DOCUMENT,
|
|
31
29
|
actionSubjectId: ACTION_SUBJECT_ID.DIVIDER,
|
|
32
30
|
attributes: {
|
|
33
|
-
inputMethod
|
|
31
|
+
inputMethod
|
|
34
32
|
},
|
|
35
33
|
eventType: EVENT_TYPE.TRACK
|
|
36
34
|
})(tr);
|
|
@@ -4,7 +4,6 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
4
4
|
import { createRule } from '@atlaskit/editor-common/utils';
|
|
5
5
|
import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
6
6
|
import { hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
8
7
|
import { createPlugin, leafNodeReplacementCharacter } from '@atlaskit/prosemirror-input-rules';
|
|
9
8
|
export var createHorizontalRule = function createHorizontalRule(state, start, end, inputMethod, editorAnalyticsAPI) {
|
|
10
9
|
if (!state.selection.empty) {
|
|
@@ -22,13 +21,12 @@ export var createHorizontalRule = function createHorizontalRule(state, start, en
|
|
|
22
21
|
if (!tr) {
|
|
23
22
|
tr = state.tr.replaceRange(start, end, new Slice(Fragment.from(state.schema.nodes.rule.createChecked()), 0, 0));
|
|
24
23
|
}
|
|
25
|
-
var resolvedInputMethod = fg('platform_editor_element_browser_analytic') ? inputMethod : INPUT_METHOD.QUICK_INSERT;
|
|
26
24
|
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 || editorAnalyticsAPI.attachAnalyticsEvent({
|
|
27
25
|
action: ACTION.INSERTED,
|
|
28
26
|
actionSubject: ACTION_SUBJECT.DOCUMENT,
|
|
29
27
|
actionSubjectId: ACTION_SUBJECT_ID.DIVIDER,
|
|
30
28
|
attributes: {
|
|
31
|
-
inputMethod:
|
|
29
|
+
inputMethod: inputMethod
|
|
32
30
|
},
|
|
33
31
|
eventType: EVENT_TYPE.TRACK
|
|
34
32
|
})(tr);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-rule",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "21.0.0",
|
|
4
4
|
"description": "Rule plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -22,23 +22,23 @@
|
|
|
22
22
|
"@atlaskit/adf-schema": "^57.6.0",
|
|
23
23
|
"@atlaskit/button": "^25.4.0",
|
|
24
24
|
"@atlaskit/css": "^1.1.0",
|
|
25
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
26
|
-
"@atlaskit/editor-plugin-floating-toolbar": "^
|
|
27
|
-
"@atlaskit/editor-plugin-ui-control-registry": "^
|
|
25
|
+
"@atlaskit/editor-plugin-analytics": "^21.0.0",
|
|
26
|
+
"@atlaskit/editor-plugin-floating-toolbar": "^23.0.0",
|
|
27
|
+
"@atlaskit/editor-plugin-ui-control-registry": "^15.0.0",
|
|
28
28
|
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
29
29
|
"@atlaskit/editor-shared-styles": "^4.3.0",
|
|
30
|
-
"@atlaskit/icon": "^
|
|
30
|
+
"@atlaskit/icon": "^38.0.0",
|
|
31
31
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
32
32
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
33
33
|
"@atlaskit/primitives": "^22.5.0",
|
|
34
34
|
"@atlaskit/prosemirror-input-rules": "^4.1.0",
|
|
35
|
-
"@atlaskit/tokens": "^
|
|
35
|
+
"@atlaskit/tokens": "^20.0.0",
|
|
36
36
|
"@babel/runtime": "^7.0.0",
|
|
37
37
|
"@compiled/react": "^1.0.2",
|
|
38
38
|
"react-intl": "^7.0.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@atlaskit/editor-common": "^
|
|
41
|
+
"@atlaskit/editor-common": "^125.0.0",
|
|
42
42
|
"react": "^18.2.0 || ^19.2.0",
|
|
43
43
|
"react-dom": "^18.2.0 || ^19.2.0"
|
|
44
44
|
},
|
|
@@ -48,9 +48,6 @@
|
|
|
48
48
|
"react-dom": "^19.2.0"
|
|
49
49
|
},
|
|
50
50
|
"platform-feature-flags": {
|
|
51
|
-
"platform_editor_element_browser_analytic": {
|
|
52
|
-
"type": "boolean"
|
|
53
|
-
},
|
|
54
51
|
"platform_editor_adf_with_localid": {
|
|
55
52
|
"type": "boolean"
|
|
56
53
|
}
|