@atlaskit/editor-common 130.2.0 → 130.3.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 +26 -0
- package/dist/cjs/extensibility/extensionNodeView.js +2 -1
- package/dist/cjs/media-single/ExternalImageBadge.js +1 -8
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/Mention/index.js +4 -1
- package/dist/cjs/ui/Mention/mention-with-providers.js +2 -1
- package/dist/cjs/ui/ResizerLegacy/index.js +5 -1
- package/dist/es2019/extensibility/extensionNodeView.js +2 -1
- package/dist/es2019/media-single/ExternalImageBadge.js +1 -6
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/Mention/index.js +2 -1
- package/dist/es2019/ui/Mention/mention-with-providers.js +2 -1
- package/dist/es2019/ui/ResizerLegacy/index.js +5 -1
- package/dist/esm/extensibility/extensionNodeView.js +2 -1
- package/dist/esm/media-single/ExternalImageBadge.js +1 -8
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/Mention/index.js +4 -1
- package/dist/esm/ui/Mention/mention-with-providers.js +2 -1
- package/dist/esm/ui/ResizerLegacy/index.js +5 -1
- package/dist/types/ui/Mention/index.d.ts +2 -3
- package/dist/types/ui/Mention/mention-with-providers.d.ts +2 -3
- package/package.json +7 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 130.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`e07a1b5505804`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e07a1b5505804) -
|
|
8
|
+
[ux] Add experiment-gated support for rendering agent mention avatars as hexagons in React
|
|
9
|
+
mentions and editable editor mention node views.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`e8e50c0062722`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e8e50c0062722) -
|
|
14
|
+
Clean up experiment `platform_editor_media_external_badge_bbc_fix`
|
|
15
|
+
- [`06e85e54427d1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/06e85e54427d1) -
|
|
16
|
+
Correct Forge named viewport height reservation in View and Editor behind
|
|
17
|
+
confluence_forge_early_render_reserve_height while preserving numeric Connect heights.
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
20
|
+
## 130.2.1
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- [`a43e85621e87c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a43e85621e87c) -
|
|
25
|
+
Lower sticky table headers, masks, and dependent controls below the agent control under the
|
|
26
|
+
platform_editor_sticky_headers_zindex experiment.
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
|
|
3
29
|
## 130.2.0
|
|
4
30
|
|
|
5
31
|
### Minor Changes
|
|
@@ -156,7 +156,8 @@ var ExtensionNode = exports.ExtensionNode = /*#__PURE__*/function (_ReactNodeVie
|
|
|
156
156
|
var _htmlElement = document.createElement('div');
|
|
157
157
|
var extensionHeight = (_this$reactComponentP = this.reactComponentProps) === null || _this$reactComponentP === void 0 || (_this$reactComponentP = _this$reactComponentP.extensionNodeViewOptions) === null || _this$reactComponentP === void 0 || (_this$reactComponentP2 = _this$reactComponentP.getExtensionHeight) === null || _this$reactComponentP2 === void 0 ? void 0 : _this$reactComponentP2.call(_this$reactComponentP, this.node);
|
|
158
158
|
if (extensionHeight) {
|
|
159
|
-
|
|
159
|
+
var minHeight = extensionHeight.endsWith('px') && (0, _fg.fg)('confluence_forge_early_render_reserve_height') ? extensionHeight : "".concat(extensionHeight, "px");
|
|
160
|
+
_htmlElement.style.setProperty('min-height', minHeight);
|
|
160
161
|
}
|
|
161
162
|
return _htmlElement;
|
|
162
163
|
}
|
|
@@ -9,7 +9,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _reactIntl = require("react-intl");
|
|
10
10
|
var _statusInformation = _interopRequireDefault(require("@atlaskit/icon/core/status-information"));
|
|
11
11
|
var _primitives = require("@atlaskit/primitives");
|
|
12
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
13
12
|
var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
|
|
14
13
|
var _media = require("../media");
|
|
15
14
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
@@ -21,8 +20,7 @@ var baseStyles = (0, _primitives.xcss)({
|
|
|
21
20
|
lineHeight: "var(--ds-space-200, 16px)",
|
|
22
21
|
cursor: 'pointer'
|
|
23
22
|
});
|
|
24
|
-
var NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com', 'loom.com', 'dam-cdn.atl.orangelogic.com'];
|
|
25
|
-
var NO_EXTERNAL_BADGE_HOSTS_NEW = ['atlassian.com', 'loom.com', 'dam-cdn.atl.orangelogic.com', 'bitbucket.org'];
|
|
23
|
+
var NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com', 'loom.com', 'dam-cdn.atl.orangelogic.com', 'bitbucket.org'];
|
|
26
24
|
var isUnbadgedUrl = exports.isUnbadgedUrl = function isUnbadgedUrl(url) {
|
|
27
25
|
if (!url) {
|
|
28
26
|
return false;
|
|
@@ -40,11 +38,6 @@ var isUnbadgedUrl = exports.isUnbadgedUrl = function isUnbadgedUrl(url) {
|
|
|
40
38
|
if (protocol === 'data:') {
|
|
41
39
|
return pathname === null || pathname === void 0 ? void 0 : pathname.startsWith('image/');
|
|
42
40
|
}
|
|
43
|
-
if ((0, _expValEquals.expValEquals)('platform_editor_media_external_badge_bbc_fix', 'isEnabled', true)) {
|
|
44
|
-
return Boolean(hostname && NO_EXTERNAL_BADGE_HOSTS_NEW.some(function (host) {
|
|
45
|
-
return hostname === host || hostname.endsWith(".".concat(host));
|
|
46
|
-
}));
|
|
47
|
-
}
|
|
48
41
|
return Boolean(hostname && NO_EXTERNAL_BADGE_HOSTS.some(function (host) {
|
|
49
42
|
return hostname === host || hostname.endsWith(".".concat(host));
|
|
50
43
|
}));
|
|
@@ -27,7 +27,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
27
27
|
var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
28
28
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
29
29
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
30
|
-
var packageVersion = "130.2.
|
|
30
|
+
var packageVersion = "130.2.1";
|
|
31
31
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
32
32
|
// Remove URL as it has UGC
|
|
33
33
|
// Ignored via go/ees007
|
|
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
24
24
|
* @jsx jsx
|
|
25
25
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
26
|
var packageName = "@atlaskit/editor-common";
|
|
27
|
-
var packageVersion = "130.2.
|
|
27
|
+
var packageVersion = "130.2.1";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -23,6 +23,9 @@ function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0,
|
|
|
23
23
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /* eslint-disable @repo/internal/react/no-class-components */
|
|
24
24
|
var MENTION_PROVIDERS = ['mentionProvider', 'profilecardProvider'];
|
|
25
25
|
var GENERIC_MENTION_IDS = ['HipChat', 'all', 'here'];
|
|
26
|
+
var isAgentMentionUserType = function isAgentMentionUserType(userType) {
|
|
27
|
+
return userType === 'APP' || userType === 'AGENT';
|
|
28
|
+
};
|
|
26
29
|
var Mention = exports.default = /*#__PURE__*/function (_PureComponent) {
|
|
27
30
|
function Mention(props) {
|
|
28
31
|
var _this;
|
|
@@ -44,7 +47,7 @@ var Mention = exports.default = /*#__PURE__*/function (_PureComponent) {
|
|
|
44
47
|
var hasProvider = Boolean(mentionNodeDataProvider);
|
|
45
48
|
var canReportMissingProvider = !hasProvider && (0, _fg.fg)('platform_editor_mention_avatar_observability');
|
|
46
49
|
var cohort = (0, _expVal.expVal)('convo_ai_entity_hover_cards_non_hello_exp', 'hover_card_cohort', 'control');
|
|
47
|
-
var isAvatarEnabled = (hasProvider || canReportMissingProvider) && userType !== 'SPECIAL' && !GENERIC_MENTION_IDS.includes(id) && (cohort === 'person' || cohort === 'all' || (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_mention_node_avatar') || (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_mention_node_graphql_provider'));
|
|
50
|
+
var isAvatarEnabled = (hasProvider || canReportMissingProvider) && userType !== 'SPECIAL' && !GENERIC_MENTION_IDS.includes(id) && (cohort === 'person' || cohort === 'all' || (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_mention_node_avatar') || (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_mention_node_graphql_provider') || isAgentMentionUserType(userType) && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_drop3_hexagon_agent_avatar'));
|
|
48
51
|
if (isAvatarEnabled && mentionNodeDataProvider) {
|
|
49
52
|
return /*#__PURE__*/_react.default.createElement(_mentionWithProviders.MentionWithAvatarProviders, {
|
|
50
53
|
id: id,
|
|
@@ -217,6 +217,7 @@ var MentionWithProviders = exports.MentionWithProviders = /*#__PURE__*/_react.de
|
|
|
217
217
|
};
|
|
218
218
|
}, [id, mentionNodeData === null || mentionNodeData === void 0 ? void 0 : mentionNodeData.isRovoChat, mentionProvider]);
|
|
219
219
|
var MentionComponent = profilecardProvider && profilecardProviderResolver && GENERIC_USER_IDS.indexOf(id) === -1 ? _mentionWithProfilecard.default : _resourcedMention.default;
|
|
220
|
+
var mentionUserType = userType === 'AGENT' ? 'APP' : userType;
|
|
220
221
|
var ssrPlaceholderId = "mention-".concat(id);
|
|
221
222
|
|
|
222
223
|
// A disabled mention is non-interactive, so it bypasses the profile-card
|
|
@@ -246,7 +247,7 @@ var MentionWithProviders = exports.MentionWithProviders = /*#__PURE__*/_react.de
|
|
|
246
247
|
text: text,
|
|
247
248
|
accessLevel: accessLevel,
|
|
248
249
|
localId: localId,
|
|
249
|
-
userType:
|
|
250
|
+
userType: mentionUserType,
|
|
250
251
|
mentionProvider: mentionProvider,
|
|
251
252
|
appType: mentionNodeData === null || mentionNodeData === void 0 ? void 0 : mentionNodeData.appType,
|
|
252
253
|
avatarUrl: mentionNodeData === null || mentionNodeData === void 0 ? void 0 : mentionNodeData.avatarUrl,
|
|
@@ -15,6 +15,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
15
15
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
16
16
|
var _reResizable = require("re-resizable");
|
|
17
17
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
18
|
+
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
18
19
|
var _analytics = require("../../analytics");
|
|
19
20
|
var _styles = require("../../styles");
|
|
20
21
|
var _utils = require("../../utils");
|
|
@@ -164,11 +165,14 @@ var Resizer = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
164
165
|
handleComponentFunc = _this$props4.handleComponentFunc,
|
|
165
166
|
handleStyles = _this$props4.handleStyles;
|
|
166
167
|
var isResizing = this.state.isResizing;
|
|
168
|
+
|
|
169
|
+
// Tables supply the lower value; media outside tables retains its existing layer.
|
|
170
|
+
var resizeHandleZIndex = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_sticky_headers_zindex') ? "var(--ak-editor-table-resize-handle-z-index, ".concat(_editorSharedStyles.akRichMediaResizeZIndex, ")") : _editorSharedStyles.akRichMediaResizeZIndex;
|
|
167
171
|
_handleSides.handleSides.forEach(function (side) {
|
|
168
172
|
handles[side] = "richMedia-resize-handle-".concat(side);
|
|
169
173
|
baseHandleStyles[side] = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
170
174
|
width: '24px'
|
|
171
|
-
}, side, "".concat(-13 - innerPadding, "px")), "zIndex",
|
|
175
|
+
}, side, "".concat(-13 - innerPadding, "px")), "zIndex", resizeHandleZIndex), "pointerEvents", 'auto');
|
|
172
176
|
var sideHandleComponent = handleComponentFunc && handleComponentFunc(side);
|
|
173
177
|
if (sideHandleComponent) {
|
|
174
178
|
handleComponent[side] = sideHandleComponent;
|
|
@@ -122,7 +122,8 @@ export class ExtensionNode extends ReactNodeView {
|
|
|
122
122
|
const htmlElement = document.createElement('div');
|
|
123
123
|
const extensionHeight = (_this$reactComponentP = this.reactComponentProps) === null || _this$reactComponentP === void 0 ? void 0 : (_this$reactComponentP2 = _this$reactComponentP.extensionNodeViewOptions) === null || _this$reactComponentP2 === void 0 ? void 0 : (_this$reactComponentP3 = _this$reactComponentP2.getExtensionHeight) === null || _this$reactComponentP3 === void 0 ? void 0 : _this$reactComponentP3.call(_this$reactComponentP2, this.node);
|
|
124
124
|
if (extensionHeight) {
|
|
125
|
-
|
|
125
|
+
const minHeight = extensionHeight.endsWith('px') && fg('confluence_forge_early_render_reserve_height') ? extensionHeight : `${extensionHeight}px`;
|
|
126
|
+
htmlElement.style.setProperty('min-height', minHeight);
|
|
126
127
|
}
|
|
127
128
|
return htmlElement;
|
|
128
129
|
}
|
|
@@ -3,7 +3,6 @@ import { useIntl } from 'react-intl';
|
|
|
3
3
|
import InfoIcon from '@atlaskit/icon/core/status-information';
|
|
4
4
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
5
5
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
6
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
6
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
8
7
|
import { externalMediaMessages } from '../media';
|
|
9
8
|
const baseStyles = xcss({
|
|
@@ -13,8 +12,7 @@ const baseStyles = xcss({
|
|
|
13
12
|
lineHeight: "var(--ds-space-200, 16px)",
|
|
14
13
|
cursor: 'pointer'
|
|
15
14
|
});
|
|
16
|
-
const NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com', 'loom.com', 'dam-cdn.atl.orangelogic.com'];
|
|
17
|
-
const NO_EXTERNAL_BADGE_HOSTS_NEW = ['atlassian.com', 'loom.com', 'dam-cdn.atl.orangelogic.com', 'bitbucket.org'];
|
|
15
|
+
const NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com', 'loom.com', 'dam-cdn.atl.orangelogic.com', 'bitbucket.org'];
|
|
18
16
|
export const isUnbadgedUrl = url => {
|
|
19
17
|
if (!url) {
|
|
20
18
|
return false;
|
|
@@ -34,9 +32,6 @@ export const isUnbadgedUrl = url => {
|
|
|
34
32
|
if (protocol === 'data:') {
|
|
35
33
|
return pathname === null || pathname === void 0 ? void 0 : pathname.startsWith('image/');
|
|
36
34
|
}
|
|
37
|
-
if (expValEquals('platform_editor_media_external_badge_bbc_fix', 'isEnabled', true)) {
|
|
38
|
-
return Boolean(hostname && NO_EXTERNAL_BADGE_HOSTS_NEW.some(host => hostname === host || hostname.endsWith(`.${host}`)));
|
|
39
|
-
}
|
|
40
35
|
return Boolean(hostname && NO_EXTERNAL_BADGE_HOSTS.some(host => hostname === host || hostname.endsWith(`.${host}`)));
|
|
41
36
|
};
|
|
42
37
|
|
|
@@ -13,7 +13,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
13
13
|
const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
14
14
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
15
15
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
16
|
-
const packageVersion = "130.2.
|
|
16
|
+
const packageVersion = "130.2.1";
|
|
17
17
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
18
18
|
// Remove URL as it has UGC
|
|
19
19
|
// Ignored via go/ees007
|
|
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
15
15
|
import Layer from '../Layer';
|
|
16
16
|
const packageName = "@atlaskit/editor-common";
|
|
17
|
-
const packageVersion = "130.2.
|
|
17
|
+
const packageVersion = "130.2.1";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -9,6 +9,7 @@ import { ProviderFactory, WithProviders } from '../../provider-factory';
|
|
|
9
9
|
import { MissingMentionAvatarProvider, MentionWithAvatarProviders, MentionWithProviders } from './mention-with-providers';
|
|
10
10
|
const MENTION_PROVIDERS = ['mentionProvider', 'profilecardProvider'];
|
|
11
11
|
const GENERIC_MENTION_IDS = ['HipChat', 'all', 'here'];
|
|
12
|
+
const isAgentMentionUserType = userType => userType === 'APP' || userType === 'AGENT';
|
|
12
13
|
export default class Mention extends PureComponent {
|
|
13
14
|
constructor(props) {
|
|
14
15
|
super(props);
|
|
@@ -31,7 +32,7 @@ export default class Mention extends PureComponent {
|
|
|
31
32
|
const hasProvider = Boolean(mentionNodeDataProvider);
|
|
32
33
|
const canReportMissingProvider = !hasProvider && fg('platform_editor_mention_avatar_observability');
|
|
33
34
|
const cohort = expVal('convo_ai_entity_hover_cards_non_hello_exp', 'hover_card_cohort', 'control');
|
|
34
|
-
const isAvatarEnabled = (hasProvider || canReportMissingProvider) && userType !== 'SPECIAL' && !GENERIC_MENTION_IDS.includes(id) && (cohort === 'person' || cohort === 'all' || isExperimentEnabled('platform_editor_mention_node_avatar') || isExperimentEnabled('platform_editor_mention_node_graphql_provider'));
|
|
35
|
+
const isAvatarEnabled = (hasProvider || canReportMissingProvider) && userType !== 'SPECIAL' && !GENERIC_MENTION_IDS.includes(id) && (cohort === 'person' || cohort === 'all' || isExperimentEnabled('platform_editor_mention_node_avatar') || isExperimentEnabled('platform_editor_mention_node_graphql_provider') || isAgentMentionUserType(userType) && isExperimentEnabled('platform_editor_drop3_hexagon_agent_avatar'));
|
|
35
36
|
if (isAvatarEnabled && mentionNodeDataProvider) {
|
|
36
37
|
return /*#__PURE__*/React.createElement(MentionWithAvatarProviders, {
|
|
37
38
|
id: id,
|
|
@@ -169,6 +169,7 @@ export const MentionWithProviders = /*#__PURE__*/React.memo(({
|
|
|
169
169
|
};
|
|
170
170
|
}, [id, mentionNodeData === null || mentionNodeData === void 0 ? void 0 : mentionNodeData.isRovoChat, mentionProvider]);
|
|
171
171
|
const MentionComponent = profilecardProvider && profilecardProviderResolver && GENERIC_USER_IDS.indexOf(id) === -1 ? ResourcedMentionWithProfilecard : ResourcedMention;
|
|
172
|
+
const mentionUserType = userType === 'AGENT' ? 'APP' : userType;
|
|
172
173
|
const ssrPlaceholderId = `mention-${id}`;
|
|
173
174
|
|
|
174
175
|
// A disabled mention is non-interactive, so it bypasses the profile-card
|
|
@@ -198,7 +199,7 @@ export const MentionWithProviders = /*#__PURE__*/React.memo(({
|
|
|
198
199
|
text: text,
|
|
199
200
|
accessLevel: accessLevel,
|
|
200
201
|
localId: localId,
|
|
201
|
-
userType:
|
|
202
|
+
userType: mentionUserType,
|
|
202
203
|
mentionProvider: mentionProvider,
|
|
203
204
|
appType: mentionNodeData === null || mentionNodeData === void 0 ? void 0 : mentionNodeData.appType,
|
|
204
205
|
avatarUrl: mentionNodeData === null || mentionNodeData === void 0 ? void 0 : mentionNodeData.avatarUrl,
|
|
@@ -3,6 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import classnames from 'classnames';
|
|
4
4
|
import { Resizable } from 're-resizable';
|
|
5
5
|
import { akRichMediaResizeZIndex } from '@atlaskit/editor-shared-styles';
|
|
6
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
6
7
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../../analytics';
|
|
7
8
|
import { richMediaClassName } from '../../styles';
|
|
8
9
|
import { gridTypeForLayout } from '../../utils';
|
|
@@ -146,12 +147,15 @@ export default class Resizer extends React.Component {
|
|
|
146
147
|
const {
|
|
147
148
|
isResizing
|
|
148
149
|
} = this.state;
|
|
150
|
+
|
|
151
|
+
// Tables supply the lower value; media outside tables retains its existing layer.
|
|
152
|
+
const resizeHandleZIndex = isExperimentEnabled('platform_editor_sticky_headers_zindex') ? `var(--ak-editor-table-resize-handle-z-index, ${akRichMediaResizeZIndex})` : akRichMediaResizeZIndex;
|
|
149
153
|
handleSides.forEach(side => {
|
|
150
154
|
handles[side] = `richMedia-resize-handle-${side}`;
|
|
151
155
|
baseHandleStyles[side] = {
|
|
152
156
|
width: '24px',
|
|
153
157
|
[side]: `${-13 - innerPadding}px`,
|
|
154
|
-
zIndex:
|
|
158
|
+
zIndex: resizeHandleZIndex,
|
|
155
159
|
pointerEvents: 'auto'
|
|
156
160
|
};
|
|
157
161
|
const sideHandleComponent = handleComponentFunc && handleComponentFunc(side);
|
|
@@ -146,7 +146,8 @@ export var ExtensionNode = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
146
146
|
var _htmlElement = document.createElement('div');
|
|
147
147
|
var extensionHeight = (_this$reactComponentP = this.reactComponentProps) === null || _this$reactComponentP === void 0 || (_this$reactComponentP = _this$reactComponentP.extensionNodeViewOptions) === null || _this$reactComponentP === void 0 || (_this$reactComponentP2 = _this$reactComponentP.getExtensionHeight) === null || _this$reactComponentP2 === void 0 ? void 0 : _this$reactComponentP2.call(_this$reactComponentP, this.node);
|
|
148
148
|
if (extensionHeight) {
|
|
149
|
-
|
|
149
|
+
var minHeight = extensionHeight.endsWith('px') && fg('confluence_forge_early_render_reserve_height') ? extensionHeight : "".concat(extensionHeight, "px");
|
|
150
|
+
_htmlElement.style.setProperty('min-height', minHeight);
|
|
150
151
|
}
|
|
151
152
|
return _htmlElement;
|
|
152
153
|
}
|
|
@@ -3,7 +3,6 @@ import { useIntl } from 'react-intl';
|
|
|
3
3
|
import InfoIcon from '@atlaskit/icon/core/status-information';
|
|
4
4
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
5
5
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
6
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
6
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
8
7
|
import { externalMediaMessages } from '../media';
|
|
9
8
|
var baseStyles = xcss({
|
|
@@ -13,8 +12,7 @@ var baseStyles = xcss({
|
|
|
13
12
|
lineHeight: "var(--ds-space-200, 16px)",
|
|
14
13
|
cursor: 'pointer'
|
|
15
14
|
});
|
|
16
|
-
var NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com', 'loom.com', 'dam-cdn.atl.orangelogic.com'];
|
|
17
|
-
var NO_EXTERNAL_BADGE_HOSTS_NEW = ['atlassian.com', 'loom.com', 'dam-cdn.atl.orangelogic.com', 'bitbucket.org'];
|
|
15
|
+
var NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com', 'loom.com', 'dam-cdn.atl.orangelogic.com', 'bitbucket.org'];
|
|
18
16
|
export var isUnbadgedUrl = function isUnbadgedUrl(url) {
|
|
19
17
|
if (!url) {
|
|
20
18
|
return false;
|
|
@@ -32,11 +30,6 @@ export var isUnbadgedUrl = function isUnbadgedUrl(url) {
|
|
|
32
30
|
if (protocol === 'data:') {
|
|
33
31
|
return pathname === null || pathname === void 0 ? void 0 : pathname.startsWith('image/');
|
|
34
32
|
}
|
|
35
|
-
if (expValEquals('platform_editor_media_external_badge_bbc_fix', 'isEnabled', true)) {
|
|
36
|
-
return Boolean(hostname && NO_EXTERNAL_BADGE_HOSTS_NEW.some(function (host) {
|
|
37
|
-
return hostname === host || hostname.endsWith(".".concat(host));
|
|
38
|
-
}));
|
|
39
|
-
}
|
|
40
33
|
return Boolean(hostname && NO_EXTERNAL_BADGE_HOSTS.some(function (host) {
|
|
41
34
|
return hostname === host || hostname.endsWith(".".concat(host));
|
|
42
35
|
}));
|
|
@@ -19,7 +19,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
19
19
|
var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
20
20
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
21
21
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
22
|
-
var packageVersion = "130.2.
|
|
22
|
+
var packageVersion = "130.2.1";
|
|
23
23
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
24
24
|
// Remove URL as it has UGC
|
|
25
25
|
// Ignored via go/ees007
|
|
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "130.2.
|
|
24
|
+
var packageVersion = "130.2.1";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -16,6 +16,9 @@ import { ProviderFactory, WithProviders } from '../../provider-factory';
|
|
|
16
16
|
import { MissingMentionAvatarProvider, MentionWithAvatarProviders, MentionWithProviders } from './mention-with-providers';
|
|
17
17
|
var MENTION_PROVIDERS = ['mentionProvider', 'profilecardProvider'];
|
|
18
18
|
var GENERIC_MENTION_IDS = ['HipChat', 'all', 'here'];
|
|
19
|
+
var isAgentMentionUserType = function isAgentMentionUserType(userType) {
|
|
20
|
+
return userType === 'APP' || userType === 'AGENT';
|
|
21
|
+
};
|
|
19
22
|
var Mention = /*#__PURE__*/function (_PureComponent) {
|
|
20
23
|
function Mention(props) {
|
|
21
24
|
var _this;
|
|
@@ -37,7 +40,7 @@ var Mention = /*#__PURE__*/function (_PureComponent) {
|
|
|
37
40
|
var hasProvider = Boolean(mentionNodeDataProvider);
|
|
38
41
|
var canReportMissingProvider = !hasProvider && fg('platform_editor_mention_avatar_observability');
|
|
39
42
|
var cohort = expVal('convo_ai_entity_hover_cards_non_hello_exp', 'hover_card_cohort', 'control');
|
|
40
|
-
var isAvatarEnabled = (hasProvider || canReportMissingProvider) && userType !== 'SPECIAL' && !GENERIC_MENTION_IDS.includes(id) && (cohort === 'person' || cohort === 'all' || isExperimentEnabled('platform_editor_mention_node_avatar') || isExperimentEnabled('platform_editor_mention_node_graphql_provider'));
|
|
43
|
+
var isAvatarEnabled = (hasProvider || canReportMissingProvider) && userType !== 'SPECIAL' && !GENERIC_MENTION_IDS.includes(id) && (cohort === 'person' || cohort === 'all' || isExperimentEnabled('platform_editor_mention_node_avatar') || isExperimentEnabled('platform_editor_mention_node_graphql_provider') || isAgentMentionUserType(userType) && isExperimentEnabled('platform_editor_drop3_hexagon_agent_avatar'));
|
|
41
44
|
if (isAvatarEnabled && mentionNodeDataProvider) {
|
|
42
45
|
return /*#__PURE__*/React.createElement(MentionWithAvatarProviders, {
|
|
43
46
|
id: id,
|
|
@@ -208,6 +208,7 @@ export var MentionWithProviders = /*#__PURE__*/React.memo(function (_ref3) {
|
|
|
208
208
|
};
|
|
209
209
|
}, [id, mentionNodeData === null || mentionNodeData === void 0 ? void 0 : mentionNodeData.isRovoChat, mentionProvider]);
|
|
210
210
|
var MentionComponent = profilecardProvider && profilecardProviderResolver && GENERIC_USER_IDS.indexOf(id) === -1 ? ResourcedMentionWithProfilecard : ResourcedMention;
|
|
211
|
+
var mentionUserType = userType === 'AGENT' ? 'APP' : userType;
|
|
211
212
|
var ssrPlaceholderId = "mention-".concat(id);
|
|
212
213
|
|
|
213
214
|
// A disabled mention is non-interactive, so it bypasses the profile-card
|
|
@@ -237,7 +238,7 @@ export var MentionWithProviders = /*#__PURE__*/React.memo(function (_ref3) {
|
|
|
237
238
|
text: text,
|
|
238
239
|
accessLevel: accessLevel,
|
|
239
240
|
localId: localId,
|
|
240
|
-
userType:
|
|
241
|
+
userType: mentionUserType,
|
|
241
242
|
mentionProvider: mentionProvider,
|
|
242
243
|
appType: mentionNodeData === null || mentionNodeData === void 0 ? void 0 : mentionNodeData.appType,
|
|
243
244
|
avatarUrl: mentionNodeData === null || mentionNodeData === void 0 ? void 0 : mentionNodeData.avatarUrl,
|
|
@@ -12,6 +12,7 @@ import React from 'react';
|
|
|
12
12
|
import classnames from 'classnames';
|
|
13
13
|
import { Resizable } from 're-resizable';
|
|
14
14
|
import { akRichMediaResizeZIndex } from '@atlaskit/editor-shared-styles';
|
|
15
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
15
16
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../../analytics';
|
|
16
17
|
import { richMediaClassName } from '../../styles';
|
|
17
18
|
import { gridTypeForLayout } from '../../utils';
|
|
@@ -157,11 +158,14 @@ var Resizer = /*#__PURE__*/function (_React$Component) {
|
|
|
157
158
|
handleComponentFunc = _this$props4.handleComponentFunc,
|
|
158
159
|
handleStyles = _this$props4.handleStyles;
|
|
159
160
|
var isResizing = this.state.isResizing;
|
|
161
|
+
|
|
162
|
+
// Tables supply the lower value; media outside tables retains its existing layer.
|
|
163
|
+
var resizeHandleZIndex = isExperimentEnabled('platform_editor_sticky_headers_zindex') ? "var(--ak-editor-table-resize-handle-z-index, ".concat(akRichMediaResizeZIndex, ")") : akRichMediaResizeZIndex;
|
|
160
164
|
handleSides.forEach(function (side) {
|
|
161
165
|
handles[side] = "richMedia-resize-handle-".concat(side);
|
|
162
166
|
baseHandleStyles[side] = _defineProperty(_defineProperty(_defineProperty({
|
|
163
167
|
width: '24px'
|
|
164
|
-
}, side, "".concat(-13 - innerPadding, "px")), "zIndex",
|
|
168
|
+
}, side, "".concat(-13 - innerPadding, "px")), "zIndex", resizeHandleZIndex), "pointerEvents", 'auto');
|
|
165
169
|
var sideHandleComponent = handleComponentFunc && handleComponentFunc(side);
|
|
166
170
|
if (sideHandleComponent) {
|
|
167
171
|
handleComponent[side] = sideHandleComponent;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React, { PureComponent } from 'react';
|
|
2
|
-
import type { UserType as MentionUserType } from '@atlaskit/adf-schema/mention';
|
|
3
2
|
import { ProviderFactory } from '../../provider-factory';
|
|
4
3
|
import type { ProfilecardProvider } from '../../provider-factory/profile-card-provider';
|
|
5
4
|
import type { MentionEventHandlers } from '../EventHandlers';
|
|
6
|
-
import type { MentionNodeDataProvider } from './mention-node-data-provider';
|
|
5
|
+
import type { MentionNodeDataProvider, MentionNodeDataUserType } from './mention-node-data-provider';
|
|
7
6
|
export interface MentionProps {
|
|
8
7
|
accessLevel?: string;
|
|
9
8
|
disabledTooltip?: string;
|
|
@@ -14,7 +13,7 @@ export interface MentionProps {
|
|
|
14
13
|
mentionNodeDataProvider?: MentionNodeDataProvider;
|
|
15
14
|
providers?: ProviderFactory;
|
|
16
15
|
text: string;
|
|
17
|
-
userType?:
|
|
16
|
+
userType?: MentionNodeDataUserType;
|
|
18
17
|
}
|
|
19
18
|
export interface MentionState {
|
|
20
19
|
profilecardProvider: ProfilecardProvider | null;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { UserType as MentionUserType } from '@atlaskit/adf-schema/mention';
|
|
3
2
|
import type { MentionNodeData, MentionProvider } from '@atlaskit/mention/types';
|
|
4
3
|
import type { ProfilecardProvider } from '../../provider-factory/profile-card-provider';
|
|
5
4
|
import type { MentionEventHandlers } from '../EventHandlers';
|
|
6
|
-
import type { MentionNodeDataProvider } from './mention-node-data-provider';
|
|
5
|
+
import type { MentionNodeDataProvider, MentionNodeDataUserType } from './mention-node-data-provider';
|
|
7
6
|
export interface Props {
|
|
8
7
|
accessLevel?: string;
|
|
9
8
|
disabledTooltip?: string;
|
|
@@ -15,7 +14,7 @@ export interface Props {
|
|
|
15
14
|
mentionProvider?: Promise<MentionProvider>;
|
|
16
15
|
profilecardProvider?: Promise<ProfilecardProvider>;
|
|
17
16
|
text: string;
|
|
18
|
-
userType?:
|
|
17
|
+
userType?: MentionNodeDataUserType;
|
|
19
18
|
}
|
|
20
19
|
export interface MentionWithProvidersProps extends Props {
|
|
21
20
|
mentionNodeData?: MentionNodeData;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "130.
|
|
3
|
+
"version": "130.3.0",
|
|
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/"
|
|
@@ -79,13 +79,13 @@
|
|
|
79
79
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
80
80
|
"@atlaskit/react-ufo": "^8.1.0",
|
|
81
81
|
"@atlaskit/section-message": "^10.2.0",
|
|
82
|
-
"@atlaskit/smart-card": "^46.
|
|
82
|
+
"@atlaskit/smart-card": "^46.6.0",
|
|
83
83
|
"@atlaskit/smart-user-picker": "^12.4.0",
|
|
84
84
|
"@atlaskit/spinner": "^20.4.0",
|
|
85
85
|
"@atlaskit/task-decision": "^21.12.0",
|
|
86
86
|
"@atlaskit/teams-app-config": "^3.1.0",
|
|
87
87
|
"@atlaskit/textfield": "^10.2.0",
|
|
88
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
88
|
+
"@atlaskit/tmp-editor-statsig": "^229.0.0",
|
|
89
89
|
"@atlaskit/tokens": "^20.4.0",
|
|
90
90
|
"@atlaskit/tooltip": "^24.4.0",
|
|
91
91
|
"@atlaskit/width-detector": "^7.2.0",
|
|
@@ -194,6 +194,10 @@
|
|
|
194
194
|
"platform_editor_bordered_panel_nested_in_table": {
|
|
195
195
|
"type": "boolean"
|
|
196
196
|
},
|
|
197
|
+
"confluence_forge_early_render_reserve_height": {
|
|
198
|
+
"type": "boolean",
|
|
199
|
+
"referenceOnly": true
|
|
200
|
+
},
|
|
197
201
|
"confluence_connect_macro_preset_height": {
|
|
198
202
|
"type": "boolean"
|
|
199
203
|
},
|