@atlaskit/editor-common 102.3.0 → 102.3.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 +9 -0
- package/dist/cjs/extensibility/Extension/Extension/index.js +26 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/extensibility/Extension/Extension/index.js +27 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/extensibility/Extension/Extension/index.js +27 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 102.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#125193](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/125193)
|
|
8
|
+
[`246f1e93ab0d1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/246f1e93ab0d1) -
|
|
9
|
+
ED-26834 Fire exposure for experiment `platform_editor_nested_non_bodied_macros` when rendering a
|
|
10
|
+
non bodied macro rendered in a nested expand, blockquote, panel or listItem in editor
|
|
11
|
+
|
|
3
12
|
## 102.3.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
|
@@ -13,6 +13,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
13
13
|
var _react2 = require("@emotion/react");
|
|
14
14
|
var _classnames2 = _interopRequireDefault(require("classnames"));
|
|
15
15
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
16
17
|
var _hooks = require("../../../hooks");
|
|
17
18
|
var _ui = require("../../../ui");
|
|
18
19
|
var _utils = require("../../../utils");
|
|
@@ -125,6 +126,30 @@ function ExtensionWithPluginState(props) {
|
|
|
125
126
|
setIsNodeHovered(didHover);
|
|
126
127
|
}
|
|
127
128
|
};
|
|
129
|
+
var shouldFireNbmExperimentExposure = _react.default.useMemo(function () {
|
|
130
|
+
if (node.type.name === 'extension' && typeof getPos === 'function') {
|
|
131
|
+
var pos = getPos();
|
|
132
|
+
if (!isNaN(pos)) {
|
|
133
|
+
var _view$state$doc$resol;
|
|
134
|
+
var parentNameType = (_view$state$doc$resol = view.state.doc.resolve(pos).parent) === null || _view$state$doc$resol === void 0 || (_view$state$doc$resol = _view$state$doc$resol.type) === null || _view$state$doc$resol === void 0 ? void 0 : _view$state$doc$resol.name;
|
|
135
|
+
if (['listItem', 'nestedExpand', 'blockquote', 'panel'].includes(parentNameType)) {
|
|
136
|
+
return true;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return false;
|
|
141
|
+
}, [node, getPos, view]);
|
|
142
|
+
(0, _react.useEffect)(function () {
|
|
143
|
+
if (shouldFireNbmExperimentExposure) {
|
|
144
|
+
// No-op editorExperiment evaluation to track usage of nested non-bodied macros
|
|
145
|
+
// these can't be tracked at the point of diversion of the experience because that is a toggle of the
|
|
146
|
+
// ProseMirror schema nodes for listItems, nestedExpand, blockquote, and panel. At that point the customer
|
|
147
|
+
// has not yet been exposed
|
|
148
|
+
(0, _experiments.editorExperiment)('platform_editor_nested_non_bodied_macros', 'test', {
|
|
149
|
+
exposure: true
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
}, [shouldFireNbmExperimentExposure]);
|
|
128
153
|
return (0, _react2.jsx)(_react.Fragment, null, showMacroInteractionDesignUpdates && !isLivePageViewMode && (0, _react2.jsx)(_Lozenge.default, {
|
|
129
154
|
isNodeSelected: isNodeSelected,
|
|
130
155
|
isNodeHovered: isNodeHovered,
|
|
@@ -207,6 +232,7 @@ var Extension = function Extension(props) {
|
|
|
207
232
|
var pluginInjectionApi = props.pluginInjectionApi;
|
|
208
233
|
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(pluginInjectionApi, ['width']),
|
|
209
234
|
widthState = _useSharedPluginState.widthState;
|
|
235
|
+
|
|
210
236
|
// Ignored via go/ees005
|
|
211
237
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
212
238
|
return (0, _react2.jsx)(ExtensionWithPluginState, (0, _extends2.default)({
|
|
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
17
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
18
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
19
19
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
20
|
-
var packageVersion = "102.3.
|
|
20
|
+
var packageVersion = "102.3.1";
|
|
21
21
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
22
22
|
// Remove URL as it has UGC
|
|
23
23
|
// Ignored via go/ees007
|
|
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
23
23
|
* @jsx jsx
|
|
24
24
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
25
25
|
var packageName = "@atlaskit/editor-common";
|
|
26
|
-
var packageVersion = "102.3.
|
|
26
|
+
var packageVersion = "102.3.1";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = '0, 8';
|
|
29
29
|
// Ignored via go/ees005
|
|
@@ -4,12 +4,13 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
4
4
|
* @jsx jsx
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import React, { Fragment } from 'react';
|
|
7
|
+
import React, { Fragment, useEffect } from 'react';
|
|
8
8
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
10
|
import { jsx } from '@emotion/react';
|
|
11
11
|
import classnames from 'classnames';
|
|
12
12
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
13
14
|
import { useSharedPluginState } from '../../../hooks';
|
|
14
15
|
import { overflowShadow } from '../../../ui';
|
|
15
16
|
import { calculateBreakoutStyles } from '../../../utils';
|
|
@@ -123,6 +124,30 @@ function ExtensionWithPluginState(props) {
|
|
|
123
124
|
setIsNodeHovered(didHover);
|
|
124
125
|
}
|
|
125
126
|
};
|
|
127
|
+
const shouldFireNbmExperimentExposure = React.useMemo(() => {
|
|
128
|
+
if (node.type.name === 'extension' && typeof getPos === 'function') {
|
|
129
|
+
const pos = getPos();
|
|
130
|
+
if (!isNaN(pos)) {
|
|
131
|
+
var _view$state$doc$resol, _view$state$doc$resol2;
|
|
132
|
+
const parentNameType = (_view$state$doc$resol = view.state.doc.resolve(pos).parent) === null || _view$state$doc$resol === void 0 ? void 0 : (_view$state$doc$resol2 = _view$state$doc$resol.type) === null || _view$state$doc$resol2 === void 0 ? void 0 : _view$state$doc$resol2.name;
|
|
133
|
+
if (['listItem', 'nestedExpand', 'blockquote', 'panel'].includes(parentNameType)) {
|
|
134
|
+
return true;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return false;
|
|
139
|
+
}, [node, getPos, view]);
|
|
140
|
+
useEffect(() => {
|
|
141
|
+
if (shouldFireNbmExperimentExposure) {
|
|
142
|
+
// No-op editorExperiment evaluation to track usage of nested non-bodied macros
|
|
143
|
+
// these can't be tracked at the point of diversion of the experience because that is a toggle of the
|
|
144
|
+
// ProseMirror schema nodes for listItems, nestedExpand, blockquote, and panel. At that point the customer
|
|
145
|
+
// has not yet been exposed
|
|
146
|
+
editorExperiment('platform_editor_nested_non_bodied_macros', 'test', {
|
|
147
|
+
exposure: true
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
}, [shouldFireNbmExperimentExposure]);
|
|
126
151
|
return jsx(Fragment, null, showMacroInteractionDesignUpdates && !isLivePageViewMode && jsx(ExtensionLozenge, {
|
|
127
152
|
isNodeSelected: isNodeSelected,
|
|
128
153
|
isNodeHovered: isNodeHovered,
|
|
@@ -204,6 +229,7 @@ const Extension = props => {
|
|
|
204
229
|
const {
|
|
205
230
|
widthState
|
|
206
231
|
} = useSharedPluginState(pluginInjectionApi, ['width']);
|
|
232
|
+
|
|
207
233
|
// Ignored via go/ees005
|
|
208
234
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
209
235
|
return jsx(ExtensionWithPluginState, _extends({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isFedRamp } from './environment';
|
|
2
2
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
3
3
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
4
|
-
const packageVersion = "102.3.
|
|
4
|
+
const packageVersion = "102.3.1";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// Ignored via go/ees007
|
|
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
13
13
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
14
14
|
import Layer from '../Layer';
|
|
15
15
|
const packageName = "@atlaskit/editor-common";
|
|
16
|
-
const packageVersion = "102.3.
|
|
16
|
+
const packageVersion = "102.3.1";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
// Ignored via go/ees005
|
|
@@ -9,12 +9,13 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
9
9
|
* @jsx jsx
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import React, { Fragment } from 'react';
|
|
12
|
+
import React, { Fragment, useEffect } from 'react';
|
|
13
13
|
|
|
14
14
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
15
15
|
import { jsx } from '@emotion/react';
|
|
16
16
|
import classnames from 'classnames';
|
|
17
17
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
18
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
18
19
|
import { useSharedPluginState } from '../../../hooks';
|
|
19
20
|
import { overflowShadow } from '../../../ui';
|
|
20
21
|
import { calculateBreakoutStyles } from '../../../utils';
|
|
@@ -117,6 +118,30 @@ function ExtensionWithPluginState(props) {
|
|
|
117
118
|
setIsNodeHovered(didHover);
|
|
118
119
|
}
|
|
119
120
|
};
|
|
121
|
+
var shouldFireNbmExperimentExposure = React.useMemo(function () {
|
|
122
|
+
if (node.type.name === 'extension' && typeof getPos === 'function') {
|
|
123
|
+
var pos = getPos();
|
|
124
|
+
if (!isNaN(pos)) {
|
|
125
|
+
var _view$state$doc$resol;
|
|
126
|
+
var parentNameType = (_view$state$doc$resol = view.state.doc.resolve(pos).parent) === null || _view$state$doc$resol === void 0 || (_view$state$doc$resol = _view$state$doc$resol.type) === null || _view$state$doc$resol === void 0 ? void 0 : _view$state$doc$resol.name;
|
|
127
|
+
if (['listItem', 'nestedExpand', 'blockquote', 'panel'].includes(parentNameType)) {
|
|
128
|
+
return true;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return false;
|
|
133
|
+
}, [node, getPos, view]);
|
|
134
|
+
useEffect(function () {
|
|
135
|
+
if (shouldFireNbmExperimentExposure) {
|
|
136
|
+
// No-op editorExperiment evaluation to track usage of nested non-bodied macros
|
|
137
|
+
// these can't be tracked at the point of diversion of the experience because that is a toggle of the
|
|
138
|
+
// ProseMirror schema nodes for listItems, nestedExpand, blockquote, and panel. At that point the customer
|
|
139
|
+
// has not yet been exposed
|
|
140
|
+
editorExperiment('platform_editor_nested_non_bodied_macros', 'test', {
|
|
141
|
+
exposure: true
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
}, [shouldFireNbmExperimentExposure]);
|
|
120
145
|
return jsx(Fragment, null, showMacroInteractionDesignUpdates && !isLivePageViewMode && jsx(ExtensionLozenge, {
|
|
121
146
|
isNodeSelected: isNodeSelected,
|
|
122
147
|
isNodeHovered: isNodeHovered,
|
|
@@ -199,6 +224,7 @@ var Extension = function Extension(props) {
|
|
|
199
224
|
var pluginInjectionApi = props.pluginInjectionApi;
|
|
200
225
|
var _useSharedPluginState = useSharedPluginState(pluginInjectionApi, ['width']),
|
|
201
226
|
widthState = _useSharedPluginState.widthState;
|
|
227
|
+
|
|
202
228
|
// Ignored via go/ees005
|
|
203
229
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
204
230
|
return jsx(ExtensionWithPluginState, _extends({
|
|
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
import { isFedRamp } from './environment';
|
|
8
8
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
9
9
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
10
|
-
var packageVersion = "102.3.
|
|
10
|
+
var packageVersion = "102.3.1";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// Ignored via go/ees007
|
|
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
20
20
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
21
21
|
import Layer from '../Layer';
|
|
22
22
|
var packageName = "@atlaskit/editor-common";
|
|
23
|
-
var packageVersion = "102.3.
|
|
23
|
+
var packageVersion = "102.3.1";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
// Ignored via go/ees005
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "102.3.
|
|
3
|
+
"version": "102.3.1",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
"@atlaskit/task-decision": "^19.0.0",
|
|
162
162
|
"@atlaskit/textfield": "^8.0.0",
|
|
163
163
|
"@atlaskit/tmp-editor-statsig": "^3.5.0",
|
|
164
|
-
"@atlaskit/tokens": "^4.
|
|
164
|
+
"@atlaskit/tokens": "^4.4.0",
|
|
165
165
|
"@atlaskit/tooltip": "^20.0.0",
|
|
166
166
|
"@atlaskit/width-detector": "^5.0.0",
|
|
167
167
|
"@babel/runtime": "^7.0.0",
|