@atlaskit/editor-common 111.8.4 → 111.8.5

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.
Files changed (31) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/analytics/types/enums.js +1 -0
  3. package/dist/cjs/extensibility/Extension/Extension/index.js +11 -7
  4. package/dist/cjs/extensibility/MultiBodiedExtension/index.js +11 -5
  5. package/dist/cjs/extensibility/utils/should-extension-breakout.js +32 -0
  6. package/dist/cjs/messages/mentions.js +10 -0
  7. package/dist/cjs/monitoring/error.js +1 -1
  8. package/dist/cjs/ui/DropList/index.js +1 -1
  9. package/dist/es2019/analytics/types/enums.js +1 -0
  10. package/dist/es2019/extensibility/Extension/Extension/index.js +11 -7
  11. package/dist/es2019/extensibility/MultiBodiedExtension/index.js +11 -5
  12. package/dist/es2019/extensibility/utils/should-extension-breakout.js +26 -0
  13. package/dist/es2019/messages/mentions.js +10 -0
  14. package/dist/es2019/monitoring/error.js +1 -1
  15. package/dist/es2019/ui/DropList/index.js +1 -1
  16. package/dist/esm/analytics/types/enums.js +1 -0
  17. package/dist/esm/extensibility/Extension/Extension/index.js +11 -7
  18. package/dist/esm/extensibility/MultiBodiedExtension/index.js +11 -5
  19. package/dist/esm/extensibility/utils/should-extension-breakout.js +26 -0
  20. package/dist/esm/messages/mentions.js +10 -0
  21. package/dist/esm/monitoring/error.js +1 -1
  22. package/dist/esm/ui/DropList/index.js +1 -1
  23. package/dist/types/analytics/types/ai-unified-events.d.ts +4 -1
  24. package/dist/types/analytics/types/enums.d.ts +1 -0
  25. package/dist/types/extensibility/utils/should-extension-breakout.d.ts +8 -0
  26. package/dist/types/messages/mentions.d.ts +10 -0
  27. package/dist/types-ts4.5/analytics/types/ai-unified-events.d.ts +4 -1
  28. package/dist/types-ts4.5/analytics/types/enums.d.ts +1 -0
  29. package/dist/types-ts4.5/extensibility/utils/should-extension-breakout.d.ts +8 -0
  30. package/dist/types-ts4.5/messages/mentions.d.ts +10 -0
  31. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 111.8.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`498fc3298e069`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/498fc3298e069) -
8
+ [ux] EDITOR-3463: Keep extension breakout aligned with page width in full-width and max modes. The
9
+ rollout is guarded by `confluence_max_width_content_appearance` and the new
10
+ `confluence_max_width_breakout_extension_fix` experiment so the bugfix can be toggled
11
+ independently.
12
+ - [`b34b724d67362`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b34b724d67362) -
13
+ Improve AI analytics by ensuring attributes are set and firing additional free gen events
14
+ - Updated dependencies
15
+
3
16
  ## 111.8.4
4
17
 
5
18
  ### Patch Changes
@@ -43,6 +43,7 @@ var ACTION = exports.ACTION = /*#__PURE__*/function (ACTION) {
43
43
  ACTION["DECREMENTED"] = "decremented";
44
44
  ACTION["DELETED"] = "deleted";
45
45
  ACTION["DISCARDED_INVALID_STEPS_FROM_TRANSACTION"] = "discardedInvalidStepsFromTransaction";
46
+ ACTION["DISCARDED"] = "discarded";
46
47
  /** used in @atlassian/editor-referentiality */
47
48
  ACTION["DISCONNECTED_SOURCE"] = "disconnectedSource";
48
49
  /** used in @atlassian/editor-referentiality */
@@ -17,6 +17,7 @@ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
17
17
  var _hooks = require("../../../hooks");
18
18
  var _ui = require("../../../ui");
19
19
  var _utils = require("../../../utils");
20
+ var _shouldExtensionBreakout = require("../../utils/should-extension-breakout");
20
21
  var _LegacyContentHeader = require("../LegacyContentHeader");
21
22
  var _Lozenge = _interopRequireDefault(require("../Lozenge"));
22
23
  var _styles = require("../styles");
@@ -82,13 +83,16 @@ function ExtensionWithPluginState(props) {
82
83
  var pos = typeof getPos === 'function' ? getPos() : undefined;
83
84
  return typeof pos !== 'undefined' && !isNaN(pos) && view.state.doc.resolve(pos).depth === 0;
84
85
  }, [view, getPos]);
85
- var shouldBreakout =
86
- // Extension should breakout when the layout is set to 'full-width' or 'wide'.
87
- ['full-width', 'wide'].includes(node.attrs.layout) &&
88
- // Extension breakout state should only be respected for top level nodes.
89
- isTopLevelNode &&
90
- // Extension breakout state should not be respected when the editor appearance is full-width mode
91
- editorAppearance !== 'full-width';
86
+ var layout = node.attrs.layout;
87
+ var legacyShouldBreakout = ['full-width', 'wide'].includes(layout) && isTopLevelNode && editorAppearance !== 'full-width';
88
+ var tinymceFullWidthModeEnabled = (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true);
89
+ var breakoutExtensionFixEnabled = (0, _expValEquals.expValEquals)('confluence_max_width_breakout_extension_fix', 'isEnabled', true);
90
+ var shouldUseBreakoutFix = tinymceFullWidthModeEnabled && breakoutExtensionFixEnabled;
91
+ var shouldBreakout = shouldUseBreakoutFix ? (0, _shouldExtensionBreakout.shouldExtensionBreakout)({
92
+ layout: layout,
93
+ isTopLevelNode: isTopLevelNode,
94
+ editorAppearance: editorAppearance
95
+ }) : legacyShouldBreakout;
92
96
 
93
97
  // We don't want to show border for non-empty 1p bodied extensions in live pages
94
98
  var show1PBodiedExtensionBorder = showUpdatedLivePages1PBodiedExtensionUI ? (0, _extensionUtils.isEmptyBodiedMacro)(node) : true;
@@ -20,6 +20,7 @@ var _hooks = require("../../hooks");
20
20
  var _MultiBodiedExtension = require("../../ui/MultiBodiedExtension");
21
21
  var _utils = require("../../utils");
22
22
  var _Lozenge = _interopRequireDefault(require("../Extension/Lozenge"));
23
+ var _shouldExtensionBreakout = require("../utils/should-extension-breakout");
23
24
  var _actionApi = require("./action-api");
24
25
  var _styles = require("./styles");
25
26
  var _excluded = ["url"];
@@ -152,11 +153,16 @@ var MultiBodiedExtensionWithWidth = function MultiBodiedExtensionWithWidth(_ref2
152
153
  var extensionHandlerResult = _react.default.useMemo(function () {
153
154
  return tryExtensionHandler(actions);
154
155
  }, [tryExtensionHandler, actions]);
155
- var shouldBreakout =
156
- // Extension should breakout when the layout is set to 'full-width' or 'wide'.
157
- ['full-width', 'wide'].includes(node.attrs.layout) &&
158
- // Extension breakout state should not be respected when the editor appearance is full-width mode
159
- editorAppearance !== 'full-width';
156
+ var layout = node.attrs.layout;
157
+ var legacyShouldBreakout = ['full-width', 'wide'].includes(layout) && editorAppearance !== 'full-width';
158
+ var tinymceFullWidthModeEnabled = (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true);
159
+ var breakoutExtensionFixEnabled = (0, _expValEquals.expValEquals)('confluence_max_width_breakout_extension_fix', 'isEnabled', true);
160
+ var shouldUseBreakoutFix = tinymceFullWidthModeEnabled && breakoutExtensionFixEnabled;
161
+ var shouldBreakout = shouldUseBreakoutFix ? (0, _shouldExtensionBreakout.shouldExtensionBreakout)({
162
+ layout: layout,
163
+ editorAppearance: editorAppearance,
164
+ isTopLevelNode: true
165
+ }) : legacyShouldBreakout;
160
166
  var mbeWrapperStyles = {};
161
167
  if (shouldBreakout) {
162
168
  var _calculateBreakoutSty = (0, _utils.calculateBreakoutStyles)({
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.shouldExtensionBreakout = void 0;
7
+ var breakoutLayouts = new Set(['full-width', 'wide']);
8
+ var shouldRespectBreakoutForAppearance = function shouldRespectBreakoutForAppearance(appearance) {
9
+ if (!appearance) {
10
+ return true;
11
+ }
12
+ if (appearance === 'full-width') {
13
+ return false;
14
+ }
15
+ if (appearance === 'max') {
16
+ return false;
17
+ }
18
+ return true;
19
+ };
20
+ var shouldExtensionBreakout = exports.shouldExtensionBreakout = function shouldExtensionBreakout(_ref) {
21
+ var layout = _ref.layout,
22
+ _ref$isTopLevelNode = _ref.isTopLevelNode,
23
+ isTopLevelNode = _ref$isTopLevelNode === void 0 ? true : _ref$isTopLevelNode,
24
+ editorAppearance = _ref.editorAppearance;
25
+ if (!layout || !breakoutLayouts.has(layout)) {
26
+ return false;
27
+ }
28
+ if (!isTopLevelNode) {
29
+ return false;
30
+ }
31
+ return shouldRespectBreakoutForAppearance(editorAppearance);
32
+ };
@@ -30,5 +30,15 @@ var mentionMessages = exports.mentionMessages = (0, _reactIntlNext.defineMessage
30
30
  id: 'fabric.editor.unknown.label',
31
31
  defaultMessage: 'Unknown',
32
32
  description: 'Label to indicate unknown mention node'
33
+ },
34
+ inviteTeammateInvalidEmail: {
35
+ id: 'fabric.editor.inviteItem.invalidEmail',
36
+ defaultMessage: 'Enter a valid email address',
37
+ description: 'By line text for invite teammate option shown in mentions when the email is invalid. This is a placeholder for the actual error message that will be shown to the user.'
38
+ },
39
+ sendInvite: {
40
+ id: 'fabric.editor.inviteItem.sendInvite',
41
+ defaultMessage: 'Send request to invite teammate',
42
+ description: 'By line text for send request to invite teammate option shown in mentions.'
33
43
  }
34
44
  });
@@ -19,7 +19,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
19
19
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
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 = "111.8.3";
22
+ var packageVersion = "111.8.4";
23
23
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
24
24
  // Remove URL as it has UGC
25
25
  // 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 = "111.8.3";
27
+ var packageVersion = "111.8.4";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -37,6 +37,7 @@ export let ACTION = /*#__PURE__*/function (ACTION) {
37
37
  ACTION["DECREMENTED"] = "decremented";
38
38
  ACTION["DELETED"] = "deleted";
39
39
  ACTION["DISCARDED_INVALID_STEPS_FROM_TRANSACTION"] = "discardedInvalidStepsFromTransaction";
40
+ ACTION["DISCARDED"] = "discarded";
40
41
  /** used in @atlassian/editor-referentiality */
41
42
  ACTION["DISCONNECTED_SOURCE"] = "disconnectedSource";
42
43
  /** used in @atlassian/editor-referentiality */
@@ -14,6 +14,7 @@ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
14
14
  import { useSharedPluginStateWithSelector } from '../../../hooks';
15
15
  import { overflowShadow } from '../../../ui';
16
16
  import { calculateBreakoutStyles } from '../../../utils';
17
+ import { shouldExtensionBreakout } from '../../utils/should-extension-breakout';
17
18
  import { LegacyContentHeader } from '../LegacyContentHeader';
18
19
  import ExtensionLozenge from '../Lozenge';
19
20
  import { overlay } from '../styles';
@@ -75,13 +76,16 @@ function ExtensionWithPluginState(props) {
75
76
  const pos = typeof getPos === 'function' ? getPos() : undefined;
76
77
  return typeof pos !== 'undefined' && !isNaN(pos) && view.state.doc.resolve(pos).depth === 0;
77
78
  }, [view, getPos]);
78
- const shouldBreakout =
79
- // Extension should breakout when the layout is set to 'full-width' or 'wide'.
80
- ['full-width', 'wide'].includes(node.attrs.layout) &&
81
- // Extension breakout state should only be respected for top level nodes.
82
- isTopLevelNode &&
83
- // Extension breakout state should not be respected when the editor appearance is full-width mode
84
- editorAppearance !== 'full-width';
79
+ const layout = node.attrs.layout;
80
+ const legacyShouldBreakout = ['full-width', 'wide'].includes(layout) && isTopLevelNode && editorAppearance !== 'full-width';
81
+ const tinymceFullWidthModeEnabled = expValEquals('confluence_max_width_content_appearance', 'isEnabled', true);
82
+ const breakoutExtensionFixEnabled = expValEquals('confluence_max_width_breakout_extension_fix', 'isEnabled', true);
83
+ const shouldUseBreakoutFix = tinymceFullWidthModeEnabled && breakoutExtensionFixEnabled;
84
+ const shouldBreakout = shouldUseBreakoutFix ? shouldExtensionBreakout({
85
+ layout,
86
+ isTopLevelNode,
87
+ editorAppearance
88
+ }) : legacyShouldBreakout;
85
89
 
86
90
  // We don't want to show border for non-empty 1p bodied extensions in live pages
87
91
  const show1PBodiedExtensionBorder = showUpdatedLivePages1PBodiedExtensionUI ? isEmptyBodiedMacro(node) : true;
@@ -16,6 +16,7 @@ import { useSharedPluginStateWithSelector } from '../../hooks';
16
16
  import { removeMarginsAndBorder, sharedMultiBodiedExtensionStyles } from '../../ui/MultiBodiedExtension';
17
17
  import { calculateBreakoutStyles, getExtensionLozengeData } from '../../utils';
18
18
  import ExtensionLozenge from '../Extension/Lozenge';
19
+ import { shouldExtensionBreakout } from '../utils/should-extension-breakout';
19
20
  import { useMultiBodiedExtensionActions } from './action-api';
20
21
  import { mbeExtensionWrapperCSSStyles, overlayStyles } from './styles';
21
22
  const getContainerCssExtendedStyles = (activeChildIndex, showMacroInteractionDesignUpdates) =>
@@ -142,11 +143,16 @@ const MultiBodiedExtensionWithWidth = ({
142
143
  const extensionHandlerResult = React.useMemo(() => {
143
144
  return tryExtensionHandler(actions);
144
145
  }, [tryExtensionHandler, actions]);
145
- const shouldBreakout =
146
- // Extension should breakout when the layout is set to 'full-width' or 'wide'.
147
- ['full-width', 'wide'].includes(node.attrs.layout) &&
148
- // Extension breakout state should not be respected when the editor appearance is full-width mode
149
- editorAppearance !== 'full-width';
146
+ const layout = node.attrs.layout;
147
+ const legacyShouldBreakout = ['full-width', 'wide'].includes(layout) && editorAppearance !== 'full-width';
148
+ const tinymceFullWidthModeEnabled = expValEquals('confluence_max_width_content_appearance', 'isEnabled', true);
149
+ const breakoutExtensionFixEnabled = expValEquals('confluence_max_width_breakout_extension_fix', 'isEnabled', true);
150
+ const shouldUseBreakoutFix = tinymceFullWidthModeEnabled && breakoutExtensionFixEnabled;
151
+ const shouldBreakout = shouldUseBreakoutFix ? shouldExtensionBreakout({
152
+ layout,
153
+ editorAppearance,
154
+ isTopLevelNode: true
155
+ }) : legacyShouldBreakout;
150
156
  let mbeWrapperStyles = {};
151
157
  if (shouldBreakout) {
152
158
  const {
@@ -0,0 +1,26 @@
1
+ const breakoutLayouts = new Set(['full-width', 'wide']);
2
+ const shouldRespectBreakoutForAppearance = appearance => {
3
+ if (!appearance) {
4
+ return true;
5
+ }
6
+ if (appearance === 'full-width') {
7
+ return false;
8
+ }
9
+ if (appearance === 'max') {
10
+ return false;
11
+ }
12
+ return true;
13
+ };
14
+ export const shouldExtensionBreakout = ({
15
+ layout,
16
+ isTopLevelNode = true,
17
+ editorAppearance
18
+ }) => {
19
+ if (!layout || !breakoutLayouts.has(layout)) {
20
+ return false;
21
+ }
22
+ if (!isTopLevelNode) {
23
+ return false;
24
+ }
25
+ return shouldRespectBreakoutForAppearance(editorAppearance);
26
+ };
@@ -24,5 +24,15 @@ export const mentionMessages = defineMessages({
24
24
  id: 'fabric.editor.unknown.label',
25
25
  defaultMessage: 'Unknown',
26
26
  description: 'Label to indicate unknown mention node'
27
+ },
28
+ inviteTeammateInvalidEmail: {
29
+ id: 'fabric.editor.inviteItem.invalidEmail',
30
+ defaultMessage: 'Enter a valid email address',
31
+ description: 'By line text for invite teammate option shown in mentions when the email is invalid. This is a placeholder for the actual error message that will be shown to the user.'
32
+ },
33
+ sendInvite: {
34
+ id: 'fabric.editor.inviteItem.sendInvite',
35
+ defaultMessage: 'Send request to invite teammate',
36
+ description: 'By line text for send request to invite teammate option shown in mentions.'
27
37
  }
28
38
  });
@@ -4,7 +4,7 @@ import { isFedRamp } from './environment';
4
4
  import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
5
5
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
6
6
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
7
- const packageVersion = "111.8.3";
7
+ const packageVersion = "111.8.4";
8
8
  const sanitiseSentryEvents = (data, _hint) => {
9
9
  // Remove URL as it has UGC
10
10
  // Ignored via go/ees007
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import { fg } from '@atlaskit/platform-feature-flags';
15
15
  import Layer from '../Layer';
16
16
  const packageName = "@atlaskit/editor-common";
17
- const packageVersion = "111.8.3";
17
+ const packageVersion = "111.8.4";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -37,6 +37,7 @@ export var ACTION = /*#__PURE__*/function (ACTION) {
37
37
  ACTION["DECREMENTED"] = "decremented";
38
38
  ACTION["DELETED"] = "deleted";
39
39
  ACTION["DISCARDED_INVALID_STEPS_FROM_TRANSACTION"] = "discardedInvalidStepsFromTransaction";
40
+ ACTION["DISCARDED"] = "discarded";
40
41
  /** used in @atlassian/editor-referentiality */
41
42
  ACTION["DISCONNECTED_SOURCE"] = "disconnectedSource";
42
43
  /** used in @atlassian/editor-referentiality */
@@ -19,6 +19,7 @@ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
19
19
  import { useSharedPluginStateWithSelector } from '../../../hooks';
20
20
  import { overflowShadow } from '../../../ui';
21
21
  import { calculateBreakoutStyles } from '../../../utils';
22
+ import { shouldExtensionBreakout } from '../../utils/should-extension-breakout';
22
23
  import { LegacyContentHeader } from '../LegacyContentHeader';
23
24
  import ExtensionLozenge from '../Lozenge';
24
25
  import { overlay } from '../styles';
@@ -75,13 +76,16 @@ function ExtensionWithPluginState(props) {
75
76
  var pos = typeof getPos === 'function' ? getPos() : undefined;
76
77
  return typeof pos !== 'undefined' && !isNaN(pos) && view.state.doc.resolve(pos).depth === 0;
77
78
  }, [view, getPos]);
78
- var shouldBreakout =
79
- // Extension should breakout when the layout is set to 'full-width' or 'wide'.
80
- ['full-width', 'wide'].includes(node.attrs.layout) &&
81
- // Extension breakout state should only be respected for top level nodes.
82
- isTopLevelNode &&
83
- // Extension breakout state should not be respected when the editor appearance is full-width mode
84
- editorAppearance !== 'full-width';
79
+ var layout = node.attrs.layout;
80
+ var legacyShouldBreakout = ['full-width', 'wide'].includes(layout) && isTopLevelNode && editorAppearance !== 'full-width';
81
+ var tinymceFullWidthModeEnabled = expValEquals('confluence_max_width_content_appearance', 'isEnabled', true);
82
+ var breakoutExtensionFixEnabled = expValEquals('confluence_max_width_breakout_extension_fix', 'isEnabled', true);
83
+ var shouldUseBreakoutFix = tinymceFullWidthModeEnabled && breakoutExtensionFixEnabled;
84
+ var shouldBreakout = shouldUseBreakoutFix ? shouldExtensionBreakout({
85
+ layout: layout,
86
+ isTopLevelNode: isTopLevelNode,
87
+ editorAppearance: editorAppearance
88
+ }) : legacyShouldBreakout;
85
89
 
86
90
  // We don't want to show border for non-empty 1p bodied extensions in live pages
87
91
  var show1PBodiedExtensionBorder = showUpdatedLivePages1PBodiedExtensionUI ? isEmptyBodiedMacro(node) : true;
@@ -21,6 +21,7 @@ import { useSharedPluginStateWithSelector } from '../../hooks';
21
21
  import { removeMarginsAndBorder, sharedMultiBodiedExtensionStyles } from '../../ui/MultiBodiedExtension';
22
22
  import { calculateBreakoutStyles, getExtensionLozengeData } from '../../utils';
23
23
  import ExtensionLozenge from '../Extension/Lozenge';
24
+ import { shouldExtensionBreakout } from '../utils/should-extension-breakout';
24
25
  import { useMultiBodiedExtensionActions } from './action-api';
25
26
  import { mbeExtensionWrapperCSSStyles, overlayStyles } from './styles';
26
27
  var getContainerCssExtendedStyles = function getContainerCssExtendedStyles(activeChildIndex, showMacroInteractionDesignUpdates) {
@@ -145,11 +146,16 @@ var MultiBodiedExtensionWithWidth = function MultiBodiedExtensionWithWidth(_ref2
145
146
  var extensionHandlerResult = React.useMemo(function () {
146
147
  return tryExtensionHandler(actions);
147
148
  }, [tryExtensionHandler, actions]);
148
- var shouldBreakout =
149
- // Extension should breakout when the layout is set to 'full-width' or 'wide'.
150
- ['full-width', 'wide'].includes(node.attrs.layout) &&
151
- // Extension breakout state should not be respected when the editor appearance is full-width mode
152
- editorAppearance !== 'full-width';
149
+ var layout = node.attrs.layout;
150
+ var legacyShouldBreakout = ['full-width', 'wide'].includes(layout) && editorAppearance !== 'full-width';
151
+ var tinymceFullWidthModeEnabled = expValEquals('confluence_max_width_content_appearance', 'isEnabled', true);
152
+ var breakoutExtensionFixEnabled = expValEquals('confluence_max_width_breakout_extension_fix', 'isEnabled', true);
153
+ var shouldUseBreakoutFix = tinymceFullWidthModeEnabled && breakoutExtensionFixEnabled;
154
+ var shouldBreakout = shouldUseBreakoutFix ? shouldExtensionBreakout({
155
+ layout: layout,
156
+ editorAppearance: editorAppearance,
157
+ isTopLevelNode: true
158
+ }) : legacyShouldBreakout;
153
159
  var mbeWrapperStyles = {};
154
160
  if (shouldBreakout) {
155
161
  var _calculateBreakoutSty = calculateBreakoutStyles({
@@ -0,0 +1,26 @@
1
+ var breakoutLayouts = new Set(['full-width', 'wide']);
2
+ var shouldRespectBreakoutForAppearance = function shouldRespectBreakoutForAppearance(appearance) {
3
+ if (!appearance) {
4
+ return true;
5
+ }
6
+ if (appearance === 'full-width') {
7
+ return false;
8
+ }
9
+ if (appearance === 'max') {
10
+ return false;
11
+ }
12
+ return true;
13
+ };
14
+ export var shouldExtensionBreakout = function shouldExtensionBreakout(_ref) {
15
+ var layout = _ref.layout,
16
+ _ref$isTopLevelNode = _ref.isTopLevelNode,
17
+ isTopLevelNode = _ref$isTopLevelNode === void 0 ? true : _ref$isTopLevelNode,
18
+ editorAppearance = _ref.editorAppearance;
19
+ if (!layout || !breakoutLayouts.has(layout)) {
20
+ return false;
21
+ }
22
+ if (!isTopLevelNode) {
23
+ return false;
24
+ }
25
+ return shouldRespectBreakoutForAppearance(editorAppearance);
26
+ };
@@ -24,5 +24,15 @@ export var mentionMessages = defineMessages({
24
24
  id: 'fabric.editor.unknown.label',
25
25
  defaultMessage: 'Unknown',
26
26
  description: 'Label to indicate unknown mention node'
27
+ },
28
+ inviteTeammateInvalidEmail: {
29
+ id: 'fabric.editor.inviteItem.invalidEmail',
30
+ defaultMessage: 'Enter a valid email address',
31
+ description: 'By line text for invite teammate option shown in mentions when the email is invalid. This is a placeholder for the actual error message that will be shown to the user.'
32
+ },
33
+ sendInvite: {
34
+ id: 'fabric.editor.inviteItem.sendInvite',
35
+ defaultMessage: 'Send request to invite teammate',
36
+ description: 'By line text for send request to invite teammate option shown in mentions.'
27
37
  }
28
38
  });
@@ -10,7 +10,7 @@ import { isFedRamp } from './environment';
10
10
  import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
11
11
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
12
12
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
13
- var packageVersion = "111.8.3";
13
+ var packageVersion = "111.8.4";
14
14
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
15
15
  // Remove URL as it has UGC
16
16
  // Ignored via go/ees007
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import { fg } from '@atlaskit/platform-feature-flags';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "111.8.3";
24
+ var packageVersion = "111.8.4";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -35,12 +35,15 @@ type AIUnifiedAgentAttributes = {
35
35
  };
36
36
  type AIInteractionInitiatedAEP = TrackAEP<ACTION.INITIATED, ACTION_SUBJECT.AI_INTERACTION, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & AIUnifiedAgentAttributes, undefined>;
37
37
  type AIInteractionDismissedAEP = TrackAEP<ACTION.DISMISSED, ACTION_SUBJECT.AI_INTERACTION, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & AIUnifiedAgentAttributes, undefined>;
38
+ type AIInteractionDiscardedAEP = TrackAEP<ACTION.DISCARDED, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & AIUnifiedAgentAttributes, undefined>;
38
39
  type AIResultViewedAEP = TrackAEP<ACTION.VIEWED, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & AIUnifiedAgentAttributes, undefined>;
39
40
  type AIResultActionedAEP = TrackAEP<ACTION.ACTIONED, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & AIUnifiedAgentAttributes & {
40
41
  aiActionedType?: string;
42
+ aiGroupId: string | undefined;
41
43
  aiResultAction: string;
42
44
  promptType?: string;
43
45
  refinementCount?: number;
46
+ wasRedone?: Boolean;
44
47
  }, undefined>;
45
48
  type AIResultErrorAEP = TrackAEP<ACTION.ERROR, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & AIUnifiedAgentAttributes & {
46
49
  aiErrorCode?: number;
@@ -49,5 +52,5 @@ type AIResultErrorAEP = TrackAEP<ACTION.ERROR, ACTION_SUBJECT.AI_RESULT, ACTION_
49
52
  type AIFeedbackSubmittedAEP = TrackAEP<ACTION.SUBMITTED, ACTION_SUBJECT.AI_FEEDBACK, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & AIUnifiedAgentAttributes & {
50
53
  aiFeedbackResult: 'up' | 'down';
51
54
  }, undefined>;
52
- export type AIUnifiedEventPayload = AIInteractionInitiatedAEP | AIResultViewedAEP | AIResultErrorAEP | AIInteractionDismissedAEP | AIResultActionedAEP | AIFeedbackSubmittedAEP;
55
+ export type AIUnifiedEventPayload = AIInteractionInitiatedAEP | AIResultViewedAEP | AIResultErrorAEP | AIInteractionDismissedAEP | AIResultActionedAEP | AIFeedbackSubmittedAEP | AIInteractionDiscardedAEP;
53
56
  export {};
@@ -36,6 +36,7 @@ export declare enum ACTION {
36
36
  DECREMENTED = "decremented",
37
37
  DELETED = "deleted",
38
38
  DISCARDED_INVALID_STEPS_FROM_TRANSACTION = "discardedInvalidStepsFromTransaction",
39
+ DISCARDED = "discarded",
39
40
  /** used in @atlassian/editor-referentiality */
40
41
  DISCONNECTED_SOURCE = "disconnectedSource",
41
42
  /** used in @atlassian/editor-referentiality */
@@ -0,0 +1,8 @@
1
+ import type { EditorAppearance } from '../../types';
2
+ interface ShouldExtensionBreakoutArgs {
3
+ editorAppearance?: EditorAppearance;
4
+ isTopLevelNode?: boolean;
5
+ layout?: string;
6
+ }
7
+ export declare const shouldExtensionBreakout: ({ layout, isTopLevelNode, editorAppearance, }: ShouldExtensionBreakoutArgs) => boolean;
8
+ export {};
@@ -24,4 +24,14 @@ export declare const mentionMessages: {
24
24
  defaultMessage: string;
25
25
  description: string;
26
26
  };
27
+ inviteTeammateInvalidEmail: {
28
+ id: string;
29
+ defaultMessage: string;
30
+ description: string;
31
+ };
32
+ sendInvite: {
33
+ id: string;
34
+ defaultMessage: string;
35
+ description: string;
36
+ };
27
37
  };
@@ -35,12 +35,15 @@ type AIUnifiedAgentAttributes = {
35
35
  };
36
36
  type AIInteractionInitiatedAEP = TrackAEP<ACTION.INITIATED, ACTION_SUBJECT.AI_INTERACTION, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & AIUnifiedAgentAttributes, undefined>;
37
37
  type AIInteractionDismissedAEP = TrackAEP<ACTION.DISMISSED, ACTION_SUBJECT.AI_INTERACTION, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & AIUnifiedAgentAttributes, undefined>;
38
+ type AIInteractionDiscardedAEP = TrackAEP<ACTION.DISCARDED, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & AIUnifiedAgentAttributes, undefined>;
38
39
  type AIResultViewedAEP = TrackAEP<ACTION.VIEWED, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & AIUnifiedAgentAttributes, undefined>;
39
40
  type AIResultActionedAEP = TrackAEP<ACTION.ACTIONED, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & AIUnifiedAgentAttributes & {
40
41
  aiActionedType?: string;
42
+ aiGroupId: string | undefined;
41
43
  aiResultAction: string;
42
44
  promptType?: string;
43
45
  refinementCount?: number;
46
+ wasRedone?: Boolean;
44
47
  }, undefined>;
45
48
  type AIResultErrorAEP = TrackAEP<ACTION.ERROR, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & AIUnifiedAgentAttributes & {
46
49
  aiErrorCode?: number;
@@ -49,5 +52,5 @@ type AIResultErrorAEP = TrackAEP<ACTION.ERROR, ACTION_SUBJECT.AI_RESULT, ACTION_
49
52
  type AIFeedbackSubmittedAEP = TrackAEP<ACTION.SUBMITTED, ACTION_SUBJECT.AI_FEEDBACK, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & AIUnifiedAgentAttributes & {
50
53
  aiFeedbackResult: 'up' | 'down';
51
54
  }, undefined>;
52
- export type AIUnifiedEventPayload = AIInteractionInitiatedAEP | AIResultViewedAEP | AIResultErrorAEP | AIInteractionDismissedAEP | AIResultActionedAEP | AIFeedbackSubmittedAEP;
55
+ export type AIUnifiedEventPayload = AIInteractionInitiatedAEP | AIResultViewedAEP | AIResultErrorAEP | AIInteractionDismissedAEP | AIResultActionedAEP | AIFeedbackSubmittedAEP | AIInteractionDiscardedAEP;
53
56
  export {};
@@ -36,6 +36,7 @@ export declare enum ACTION {
36
36
  DECREMENTED = "decremented",
37
37
  DELETED = "deleted",
38
38
  DISCARDED_INVALID_STEPS_FROM_TRANSACTION = "discardedInvalidStepsFromTransaction",
39
+ DISCARDED = "discarded",
39
40
  /** used in @atlassian/editor-referentiality */
40
41
  DISCONNECTED_SOURCE = "disconnectedSource",
41
42
  /** used in @atlassian/editor-referentiality */
@@ -0,0 +1,8 @@
1
+ import type { EditorAppearance } from '../../types';
2
+ interface ShouldExtensionBreakoutArgs {
3
+ editorAppearance?: EditorAppearance;
4
+ isTopLevelNode?: boolean;
5
+ layout?: string;
6
+ }
7
+ export declare const shouldExtensionBreakout: ({ layout, isTopLevelNode, editorAppearance, }: ShouldExtensionBreakoutArgs) => boolean;
8
+ export {};
@@ -24,4 +24,14 @@ export declare const mentionMessages: {
24
24
  defaultMessage: string;
25
25
  description: string;
26
26
  };
27
+ inviteTeammateInvalidEmail: {
28
+ id: string;
29
+ defaultMessage: string;
30
+ description: string;
31
+ };
32
+ sendInvite: {
33
+ id: string;
34
+ defaultMessage: string;
35
+ description: string;
36
+ };
27
37
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "111.8.4",
3
+ "version": "111.8.5",
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/"
@@ -81,7 +81,7 @@
81
81
  "@atlaskit/task-decision": "^19.2.0",
82
82
  "@atlaskit/textfield": "^8.2.0",
83
83
  "@atlaskit/theme": "^21.0.0",
84
- "@atlaskit/tmp-editor-statsig": "^16.23.0",
84
+ "@atlaskit/tmp-editor-statsig": "^16.24.0",
85
85
  "@atlaskit/tokens": "^10.0.0",
86
86
  "@atlaskit/tooltip": "^20.14.0",
87
87
  "@atlaskit/width-detector": "^5.0.0",