@atlaskit/editor-core 193.10.12 → 193.10.21
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/create-editor/ReactEditorView.js +1 -14
- package/dist/cjs/ui/ContentStyles/extension.js +1 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +4 -17
- package/dist/es2019/ui/ContentStyles/extension.js +1 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +1 -14
- package/dist/esm/ui/ContentStyles/extension.js +1 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 193.10.21
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#92945](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/92945) [`929153e0da60`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/929153e0da60) - Cleanup analytics feature flag for queued analytics.
|
|
8
|
+
|
|
9
|
+
## 193.10.19
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#92786](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/92786) [`1dc6fc4f1a1d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1dc6fc4f1a1d) - fix: onPluginObservation type error with collab plugin state being empty
|
|
14
|
+
|
|
3
15
|
## 193.10.12
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -102,7 +102,7 @@ var ReactEditorView = exports.ReactEditorView = /*#__PURE__*/function (_React$Co
|
|
|
102
102
|
eventType: _analytics.EVENT_TYPE.OPERATIONAL,
|
|
103
103
|
attributes: {
|
|
104
104
|
report: report,
|
|
105
|
-
participants: ((_this$pluginInjection = _this.pluginInjectionAPI.api().collabEdit) === null || _this$pluginInjection === void 0
|
|
105
|
+
participants: ((_this$pluginInjection = _this.pluginInjectionAPI.api().collabEdit) === null || _this$pluginInjection === void 0 || (_this$pluginInjection = _this$pluginInjection.sharedState.currentState()) === null || _this$pluginInjection === void 0 || (_this$pluginInjection = _this$pluginInjection.participants) === null || _this$pluginInjection === void 0 ? void 0 : _this$pluginInjection.size()) || 1
|
|
106
106
|
}
|
|
107
107
|
});
|
|
108
108
|
});
|
|
@@ -561,12 +561,6 @@ var ReactEditorView = exports.ReactEditorView = /*#__PURE__*/function (_React$Co
|
|
|
561
561
|
_this.featureFlags = (0, _featureFlagsFromProps.createFeatureFlagsFromProps)(_this.props.editorProps);
|
|
562
562
|
var featureFlagsEnabled = _this.featureFlags ? (0, _normalizeFeatureFlags.getEnabledFeatureFlagKeys)(_this.featureFlags) : [];
|
|
563
563
|
|
|
564
|
-
// START TEMPORARY CODE ED-10584
|
|
565
|
-
if (_this.props.createAnalyticsEvent) {
|
|
566
|
-
_this.props.createAnalyticsEvent.__queueAnalytics = _this.featureFlags.queueAnalytics;
|
|
567
|
-
}
|
|
568
|
-
// END TEMPORARY CODE ED-10584
|
|
569
|
-
|
|
570
564
|
// This needs to be before initialising editorState because
|
|
571
565
|
// we dispatch analytics events in plugin initialisation
|
|
572
566
|
_this.eventDispatcher.on(_utils.analyticsEventKey, _this.handleAnalyticsEvent);
|
|
@@ -628,13 +622,6 @@ var ReactEditorView = exports.ReactEditorView = /*#__PURE__*/function (_React$Co
|
|
|
628
622
|
}, {
|
|
629
623
|
key: "UNSAFE_componentWillReceiveProps",
|
|
630
624
|
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
631
|
-
// START TEMPORARY CODE ED-10584
|
|
632
|
-
if (nextProps.createAnalyticsEvent && nextProps.createAnalyticsEvent !== this.props.createAnalyticsEvent) {
|
|
633
|
-
var featureFlags = (0, _featureFlagsFromProps.createFeatureFlagsFromProps)(nextProps.editorProps);
|
|
634
|
-
nextProps.createAnalyticsEvent.__queueAnalytics = featureFlags.queueAnalytics;
|
|
635
|
-
}
|
|
636
|
-
// END TEMPORARY CODE ED-10584
|
|
637
|
-
|
|
638
625
|
if (this.view && this.props.editorProps.disabled !== nextProps.editorProps.disabled) {
|
|
639
626
|
// Disables the contentEditable attribute of the editor if the editor is disabled
|
|
640
627
|
this.view.setProps({
|
|
@@ -10,6 +10,7 @@ var _react = require("@emotion/react");
|
|
|
10
10
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
11
11
|
var _colors = require("@atlaskit/theme/colors");
|
|
12
12
|
var _templateObject, _templateObject2;
|
|
13
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
13
14
|
var extensionLabelStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n &.danger > span > div > .extension-label {\n background-color: ", ";\n color: ", ";\n opacity: 1;\n }\n\n &:not(.danger).", "\n > span\n > div\n > .extension-label {\n background-color: ", ";\n color: ", ";\n opacity: 1;\n }\n"])), "var(--ds-background-accent-red-subtler, ".concat(_colors.R200, ")"), "var(--ds-text-danger, ".concat(_colors.R400, ")"), _editorSharedStyles.akEditorSelectedNodeClassName, "var(--ds-background-selected, ".concat(_colors.B50, ")"), "var(--ds-text-selected, ".concat(_colors.B400, ")"));
|
|
14
15
|
var dangerOverlayStyles = (0, _react.css)({
|
|
15
16
|
opacity: 0.3,
|
|
@@ -93,14 +93,14 @@ export class ReactEditorView extends React.Component {
|
|
|
93
93
|
// so we allow transactions by default, to avoid discarding the initial one.
|
|
94
94
|
_defineProperty(this, "canDispatchTransactions", true);
|
|
95
95
|
_defineProperty(this, "onPluginObservation", report => {
|
|
96
|
-
var _this$pluginInjection;
|
|
96
|
+
var _this$pluginInjection, _this$pluginInjection2, _this$pluginInjection3;
|
|
97
97
|
this.dispatchAnalyticsEvent({
|
|
98
98
|
action: ACTION.TRANSACTION_DISPATCHED,
|
|
99
99
|
actionSubject: ACTION_SUBJECT.EDITOR,
|
|
100
100
|
eventType: EVENT_TYPE.OPERATIONAL,
|
|
101
101
|
attributes: {
|
|
102
102
|
report,
|
|
103
|
-
participants: ((_this$pluginInjection = this.pluginInjectionAPI.api().collabEdit) === null || _this$pluginInjection === void 0 ? void 0 : _this$pluginInjection.sharedState.currentState().participants.size()) || 1
|
|
103
|
+
participants: ((_this$pluginInjection = this.pluginInjectionAPI.api().collabEdit) === null || _this$pluginInjection === void 0 ? void 0 : (_this$pluginInjection2 = _this$pluginInjection.sharedState.currentState()) === null || _this$pluginInjection2 === void 0 ? void 0 : (_this$pluginInjection3 = _this$pluginInjection2.participants) === null || _this$pluginInjection3 === void 0 ? void 0 : _this$pluginInjection3.size()) || 1
|
|
104
104
|
}
|
|
105
105
|
});
|
|
106
106
|
});
|
|
@@ -398,10 +398,10 @@ export class ReactEditorView extends React.Component {
|
|
|
398
398
|
const forceSeverityTracking = typeof proseMirrorRenderedTracking === 'undefined' && shouldForceTracking();
|
|
399
399
|
this.proseMirrorRenderedSeverity = !!forceSeverityTracking || proseMirrorRenderedTracking !== null && proseMirrorRenderedTracking !== void 0 && proseMirrorRenderedTracking.trackSeverity ? getAnalyticsEventSeverity(duration, (_proseMirrorRenderedT = proseMirrorRenderedTracking === null || proseMirrorRenderedTracking === void 0 ? void 0 : proseMirrorRenderedTracking.severityNormalThreshold) !== null && _proseMirrorRenderedT !== void 0 ? _proseMirrorRenderedT : PROSEMIRROR_RENDERED_NORMAL_SEVERITY_THRESHOLD, (_proseMirrorRenderedT2 = proseMirrorRenderedTracking === null || proseMirrorRenderedTracking === void 0 ? void 0 : proseMirrorRenderedTracking.severityDegradedThreshold) !== null && _proseMirrorRenderedT2 !== void 0 ? _proseMirrorRenderedT2 : PROSEMIRROR_RENDERED_DEGRADED_SEVERITY_THRESHOLD) : undefined;
|
|
400
400
|
if (this.view) {
|
|
401
|
-
var _this$
|
|
401
|
+
var _this$pluginInjection4, _this$experienceStore10;
|
|
402
402
|
const nodes = getNodesCount(this.view.state.doc);
|
|
403
403
|
const ttfb = getResponseEndTime();
|
|
404
|
-
const contextIdentifier = (_this$
|
|
404
|
+
const contextIdentifier = (_this$pluginInjection4 = this.pluginInjectionAPI.api().base) === null || _this$pluginInjection4 === void 0 ? void 0 : _this$pluginInjection4.sharedState.currentState();
|
|
405
405
|
this.dispatchAnalyticsEvent({
|
|
406
406
|
action: ACTION.PROSEMIRROR_RENDERED,
|
|
407
407
|
actionSubject: ACTION_SUBJECT.EDITOR,
|
|
@@ -548,12 +548,6 @@ export class ReactEditorView extends React.Component {
|
|
|
548
548
|
this.featureFlags = createFeatureFlagsFromProps(this.props.editorProps);
|
|
549
549
|
const featureFlagsEnabled = this.featureFlags ? getEnabledFeatureFlagKeys(this.featureFlags) : [];
|
|
550
550
|
|
|
551
|
-
// START TEMPORARY CODE ED-10584
|
|
552
|
-
if (this.props.createAnalyticsEvent) {
|
|
553
|
-
this.props.createAnalyticsEvent.__queueAnalytics = this.featureFlags.queueAnalytics;
|
|
554
|
-
}
|
|
555
|
-
// END TEMPORARY CODE ED-10584
|
|
556
|
-
|
|
557
551
|
// This needs to be before initialising editorState because
|
|
558
552
|
// we dispatch analytics events in plugin initialisation
|
|
559
553
|
this.eventDispatcher.on(analyticsEventKey, this.handleAnalyticsEvent);
|
|
@@ -583,13 +577,6 @@ export class ReactEditorView extends React.Component {
|
|
|
583
577
|
}
|
|
584
578
|
}
|
|
585
579
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
586
|
-
// START TEMPORARY CODE ED-10584
|
|
587
|
-
if (nextProps.createAnalyticsEvent && nextProps.createAnalyticsEvent !== this.props.createAnalyticsEvent) {
|
|
588
|
-
const featureFlags = createFeatureFlagsFromProps(nextProps.editorProps);
|
|
589
|
-
nextProps.createAnalyticsEvent.__queueAnalytics = featureFlags.queueAnalytics;
|
|
590
|
-
}
|
|
591
|
-
// END TEMPORARY CODE ED-10584
|
|
592
|
-
|
|
593
580
|
if (this.view && this.props.editorProps.disabled !== nextProps.editorProps.disabled) {
|
|
594
581
|
// Disables the contentEditable attribute of the editor if the editor is disabled
|
|
595
582
|
this.view.setProps({
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, blockNodesVerticalMargin, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
3
3
|
import { B400, B50, R200, R400 } from '@atlaskit/theme/colors';
|
|
4
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
4
5
|
const extensionLabelStyles = css`
|
|
5
6
|
&.danger > span > div > .extension-label {
|
|
6
7
|
background-color: ${`var(--ds-background-accent-red-subtler, ${R200})`};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "193.10.
|
|
2
|
+
export const version = "193.10.21";
|
|
@@ -96,7 +96,7 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
96
96
|
eventType: EVENT_TYPE.OPERATIONAL,
|
|
97
97
|
attributes: {
|
|
98
98
|
report: report,
|
|
99
|
-
participants: ((_this$pluginInjection = _this.pluginInjectionAPI.api().collabEdit) === null || _this$pluginInjection === void 0
|
|
99
|
+
participants: ((_this$pluginInjection = _this.pluginInjectionAPI.api().collabEdit) === null || _this$pluginInjection === void 0 || (_this$pluginInjection = _this$pluginInjection.sharedState.currentState()) === null || _this$pluginInjection === void 0 || (_this$pluginInjection = _this$pluginInjection.participants) === null || _this$pluginInjection === void 0 ? void 0 : _this$pluginInjection.size()) || 1
|
|
100
100
|
}
|
|
101
101
|
});
|
|
102
102
|
});
|
|
@@ -555,12 +555,6 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
555
555
|
_this.featureFlags = createFeatureFlagsFromProps(_this.props.editorProps);
|
|
556
556
|
var featureFlagsEnabled = _this.featureFlags ? getEnabledFeatureFlagKeys(_this.featureFlags) : [];
|
|
557
557
|
|
|
558
|
-
// START TEMPORARY CODE ED-10584
|
|
559
|
-
if (_this.props.createAnalyticsEvent) {
|
|
560
|
-
_this.props.createAnalyticsEvent.__queueAnalytics = _this.featureFlags.queueAnalytics;
|
|
561
|
-
}
|
|
562
|
-
// END TEMPORARY CODE ED-10584
|
|
563
|
-
|
|
564
558
|
// This needs to be before initialising editorState because
|
|
565
559
|
// we dispatch analytics events in plugin initialisation
|
|
566
560
|
_this.eventDispatcher.on(analyticsEventKey, _this.handleAnalyticsEvent);
|
|
@@ -622,13 +616,6 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
622
616
|
}, {
|
|
623
617
|
key: "UNSAFE_componentWillReceiveProps",
|
|
624
618
|
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
625
|
-
// START TEMPORARY CODE ED-10584
|
|
626
|
-
if (nextProps.createAnalyticsEvent && nextProps.createAnalyticsEvent !== this.props.createAnalyticsEvent) {
|
|
627
|
-
var featureFlags = createFeatureFlagsFromProps(nextProps.editorProps);
|
|
628
|
-
nextProps.createAnalyticsEvent.__queueAnalytics = featureFlags.queueAnalytics;
|
|
629
|
-
}
|
|
630
|
-
// END TEMPORARY CODE ED-10584
|
|
631
|
-
|
|
632
619
|
if (this.view && this.props.editorProps.disabled !== nextProps.editorProps.disabled) {
|
|
633
620
|
// Disables the contentEditable attribute of the editor if the editor is disabled
|
|
634
621
|
this.view.setProps({
|
|
@@ -3,6 +3,7 @@ var _templateObject, _templateObject2;
|
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
4
|
import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, blockNodesVerticalMargin, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
5
5
|
import { B400, B50, R200, R400 } from '@atlaskit/theme/colors';
|
|
6
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
6
7
|
var extensionLabelStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &.danger > span > div > .extension-label {\n background-color: ", ";\n color: ", ";\n opacity: 1;\n }\n\n &:not(.danger).", "\n > span\n > div\n > .extension-label {\n background-color: ", ";\n color: ", ";\n opacity: 1;\n }\n"])), "var(--ds-background-accent-red-subtler, ".concat(R200, ")"), "var(--ds-text-danger, ".concat(R400, ")"), akEditorSelectedNodeClassName, "var(--ds-background-selected, ".concat(B50, ")"), "var(--ds-text-selected, ".concat(B400, ")"));
|
|
7
8
|
var dangerOverlayStyles = css({
|
|
8
9
|
opacity: 0.3,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "193.10.
|
|
2
|
+
export var version = "193.10.21";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "193.10.
|
|
3
|
+
"version": "193.10.21",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"@atlaskit/analytics-next": "^9.2.0",
|
|
46
46
|
"@atlaskit/analytics-next-stable-react-context": "1.0.1",
|
|
47
47
|
"@atlaskit/button": "^17.12.0",
|
|
48
|
-
"@atlaskit/editor-common": "^78.
|
|
48
|
+
"@atlaskit/editor-common": "^78.30.0",
|
|
49
49
|
"@atlaskit/editor-json-transformer": "^8.10.0",
|
|
50
|
-
"@atlaskit/editor-plugins": "^2.
|
|
50
|
+
"@atlaskit/editor-plugins": "^2.3.0",
|
|
51
51
|
"@atlaskit/editor-prosemirror": "3.0.0",
|
|
52
52
|
"@atlaskit/editor-shared-styles": "^2.9.0",
|
|
53
53
|
"@atlaskit/emoji": "^67.6.0",
|
|
@@ -87,9 +87,9 @@
|
|
|
87
87
|
"@atlaskit/adf-utils": "^19.0.0",
|
|
88
88
|
"@atlaskit/analytics-listeners": "^8.9.1",
|
|
89
89
|
"@atlaskit/checkbox": "^13.1.0",
|
|
90
|
-
"@atlaskit/collab-provider": "9.26.
|
|
90
|
+
"@atlaskit/collab-provider": "9.26.6",
|
|
91
91
|
"@atlaskit/dropdown-menu": "^12.9.0",
|
|
92
|
-
"@atlaskit/editor-plugin-annotation": "1.5.
|
|
92
|
+
"@atlaskit/editor-plugin-annotation": "1.5.10",
|
|
93
93
|
"@atlaskit/editor-plugin-card": "^1.8.0",
|
|
94
94
|
"@atlaskit/editor-plugin-editor-viewmode": "^1.0.0",
|
|
95
95
|
"@atlaskit/editor-plugin-list": "^3.1.5",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"@atlaskit/primitives": "^5.5.0",
|
|
107
107
|
"@atlaskit/renderer": "^109.19.0",
|
|
108
108
|
"@atlaskit/select": "^17.6.0",
|
|
109
|
-
"@atlaskit/smart-card": "^26.
|
|
109
|
+
"@atlaskit/smart-card": "^26.57.0",
|
|
110
110
|
"@atlaskit/synchrony-test-helpers": "^2.3.0",
|
|
111
111
|
"@atlaskit/util-data-test": "^17.9.0",
|
|
112
112
|
"@atlaskit/visual-regression": "*",
|