@atlaskit/editor-common 126.1.3 → 126.2.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.
Files changed (31) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/cjs/messages/syncBlock.js +5 -0
  3. package/dist/cjs/monitoring/error.js +1 -1
  4. package/dist/cjs/quick-insert/CompactQuickInsertMenuItem.js +4 -2
  5. package/dist/cjs/quick-insert/QuickInsertHoverPreview.js +5 -3
  6. package/dist/cjs/quick-insert/jira-service-management-attribution-icon.js +18 -0
  7. package/dist/cjs/quick-insert/messages.js +5 -0
  8. package/dist/cjs/ui/DropList/index.js +1 -1
  9. package/dist/cjs/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.js +0 -4
  10. package/dist/es2019/messages/syncBlock.js +5 -0
  11. package/dist/es2019/monitoring/error.js +1 -1
  12. package/dist/es2019/quick-insert/CompactQuickInsertMenuItem.js +4 -2
  13. package/dist/es2019/quick-insert/QuickInsertHoverPreview.js +5 -3
  14. package/dist/es2019/quick-insert/jira-service-management-attribution-icon.js +10 -0
  15. package/dist/es2019/quick-insert/messages.js +5 -0
  16. package/dist/es2019/ui/DropList/index.js +1 -1
  17. package/dist/es2019/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.js +0 -4
  18. package/dist/esm/messages/syncBlock.js +5 -0
  19. package/dist/esm/monitoring/error.js +1 -1
  20. package/dist/esm/quick-insert/CompactQuickInsertMenuItem.js +4 -2
  21. package/dist/esm/quick-insert/QuickInsertHoverPreview.js +5 -3
  22. package/dist/esm/quick-insert/jira-service-management-attribution-icon.js +12 -0
  23. package/dist/esm/quick-insert/messages.js +5 -0
  24. package/dist/esm/ui/DropList/index.js +1 -1
  25. package/dist/esm/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.js +0 -4
  26. package/dist/types/messages/syncBlock.d.ts +5 -0
  27. package/dist/types/quick-insert/jira-service-management-attribution-icon.d.ts +3 -0
  28. package/dist/types/quick-insert/messages.d.ts +1 -1
  29. package/dist/types/quick-insert/preview.d.ts +3 -2
  30. package/package.json +3 -3
  31. package/quick-insert/jira-service-management-attribution-icon/package.json +10 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 126.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`a4fe8636fa0ec`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a4fe8636fa0ec) -
8
+ Clean up the fully rolled out `platform_editor_layout_column_menu` experiment and the
9
+ `platform_editor_layout_column_menu_kill_switch_1` feature gate, retaining their shipped behavior.
10
+ Consumers must remove any direct `@atlaskit/tmp-editor-statsig` experiment override for
11
+ `platform_editor_layout_column_menu`.
12
+ - Updated dependencies
13
+
14
+ ## 126.2.0
15
+
16
+ ### Minor Changes
17
+
18
+ - [`d33691c3e94ec`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d33691c3e94ec) -
19
+ Show Rovo skill preview attribution and full descriptions under platform_editor_slash_command,
20
+ including the Jira Service Management icon and localized product names
21
+
22
+ ### Patch Changes
23
+
24
+ - [`8013afd2c90d0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8013afd2c90d0) -
25
+ Add Jira synced block copy guidance behind the platform_editor_blocks_patch_11 experiment.
26
+ - Updated dependencies
27
+
3
28
  ## 126.1.3
4
29
 
5
30
  ### Patch Changes
@@ -321,6 +321,11 @@ var syncBlockMessages = exports.syncBlockMessages = (0, _reactIntl.defineMessage
321
321
  defaultMessage: 'Paste your synced block to keep content auto-updated. Permissions are the same.',
322
322
  description: 'Description in flag which appears when a sync block is copied'
323
323
  },
324
+ syncBlockCopiedJiraUnsavedFieldDescription: {
325
+ id: 'editor-common.messages.syncBlock.syncBlockCopiedJiraUnsavedFieldDescription.ai-non-final',
326
+ defaultMessage: 'To reuse this content, save this field and paste this synced block in another location.',
327
+ description: 'Instruction in a confirmation flag after a synced block is copied from an unsaved Jira work item field.'
328
+ },
324
329
  syncBlockCopiedLivePageDescription: {
325
330
  id: 'editor-common.messages.syncBlock.syncBlockCopiedLivePageDescription',
326
331
  defaultMessage: 'Paste this synced block content in another location to reuse its content.',
@@ -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 = "126.1.3";
30
+ var packageVersion = "126.2.0";
31
31
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
32
32
  // Remove URL as it has UGC
33
33
  // Ignored via go/ees007
@@ -78,7 +78,7 @@ var disabledItemStyles = (0, _primitives.xcss)({
78
78
  width: '100%'
79
79
  });
80
80
  var CompactQuickInsertMenuItem = exports.CompactQuickInsertMenuItem = function CompactQuickInsertMenuItem(_ref) {
81
- var _ref3, _resolvedPreview$imag, _resolvedPreview$imag2, _resolvedPreview$attr;
81
+ var _resolvedPreview$attr, _ref3, _resolvedPreview$imag, _resolvedPreview$imag2;
82
82
  var ariaLabel = _ref.ariaLabel,
83
83
  description = _ref.description,
84
84
  iconBefore = _ref.iconBefore,
@@ -114,6 +114,8 @@ var CompactQuickInsertMenuItem = exports.CompactQuickInsertMenuItem = function C
114
114
  }, [preview, previewImageUrls]);
115
115
  var shouldRenderPreview = shouldShowPreview && isSelected && !isDisabled;
116
116
  var hasAccessiblePreview = Boolean(resolvedDescription || (resolvedPreview === null || resolvedPreview === void 0 ? void 0 : resolvedPreview.attribution));
117
+ var previewAttributionName = (_resolvedPreview$attr = resolvedPreview.attribution) === null || _resolvedPreview$attr === void 0 ? void 0 : _resolvedPreview$attr.name;
118
+ var previewAttributionKey = typeof previewAttributionName === 'string' ? previewAttributionName : previewAttributionName === null || previewAttributionName === void 0 ? void 0 : previewAttributionName.id;
117
119
  var wrappedIcon = iconBefore && shouldWrapIcon ? /*#__PURE__*/_react.default.createElement(_compiled.Box, {
118
120
  xcss: styles.iconLarge
119
121
  }, iconBefore) : iconBefore;
@@ -137,7 +139,7 @@ var CompactQuickInsertMenuItem = exports.CompactQuickInsertMenuItem = function C
137
139
  as: "span",
138
140
  xcss: styles.shortcut
139
141
  }, shortcut))), shouldRenderPreview && referenceElement && /*#__PURE__*/_react.default.createElement(_QuickInsertHoverPreview.QuickInsertHoverPreview, {
140
- key: (_ref3 = (_resolvedPreview$imag = (_resolvedPreview$imag2 = resolvedPreview.image) === null || _resolvedPreview$imag2 === void 0 ? void 0 : _resolvedPreview$imag2.light) !== null && _resolvedPreview$imag !== void 0 ? _resolvedPreview$imag : (_resolvedPreview$attr = resolvedPreview.attribution) === null || _resolvedPreview$attr === void 0 ? void 0 : _resolvedPreview$attr.name) !== null && _ref3 !== void 0 ? _ref3 : title,
142
+ key: (_ref3 = (_resolvedPreview$imag = (_resolvedPreview$imag2 = resolvedPreview.image) === null || _resolvedPreview$imag2 === void 0 ? void 0 : _resolvedPreview$imag2.light) !== null && _resolvedPreview$imag !== void 0 ? _resolvedPreview$imag : previewAttributionKey) !== null && _ref3 !== void 0 ? _ref3 : title,
141
143
  id: previewId,
142
144
  description: resolvedDescription,
143
145
  preview: resolvedPreview,
@@ -94,7 +94,7 @@ var QuickInsertHoverPreview = exports.QuickInsertHoverPreview = function QuickIn
94
94
  }), referenceElement.ownerDocument.body);
95
95
  };
96
96
  var QuickInsertPreviewPanel = function QuickInsertPreviewPanel(_ref3) {
97
- var _preview$attribution;
97
+ var _preview$attribution, _preview$attribution2;
98
98
  var description = _ref3.description,
99
99
  id = _ref3.id,
100
100
  imageUrl = _ref3.imageUrl,
@@ -109,6 +109,8 @@ var QuickInsertPreviewPanel = function QuickInsertPreviewPanel(_ref3) {
109
109
  panelElement = _useState2[0],
110
110
  setPanelElement = _useState2[1];
111
111
  var AttributionIcon = (_preview$attribution = preview.attribution) === null || _preview$attribution === void 0 ? void 0 : _preview$attribution.icon;
112
+ var attributionName = (_preview$attribution2 = preview.attribution) === null || _preview$attribution2 === void 0 ? void 0 : _preview$attribution2.name;
113
+ var formattedAttributionName = typeof attributionName === 'string' ? attributionName : attributionName ? formatMessage(attributionName) : '';
112
114
  (0, _react.useLayoutEffect)(function () {
113
115
  var _referenceElement$own;
114
116
  void update();
@@ -148,8 +150,8 @@ var QuickInsertPreviewPanel = function QuickInsertPreviewPanel(_ref3) {
148
150
  }, /*#__PURE__*/React.createElement(AttributionIcon, null)), /*#__PURE__*/React.createElement(_text.Text, {
149
151
  size: "small",
150
152
  color: "color.text.subtle"
151
- }, AttributionIcon ? preview.attribution.name : formatMessage(_messages.messages.previewAttributionBy, {
152
- name: preview.attribution.name
153
+ }, AttributionIcon ? formattedAttributionName : formatMessage(_messages.messages.previewAttributionBy, {
154
+ name: formattedAttributionName
153
155
  })))));
154
156
  };
155
157
  var PreviewImage = function PreviewImage(_ref4) {
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.JiraServiceManagementAttributionIcon = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _rawIcons = require("@atlaskit/logo/raw-icons");
10
+ /** Decorative product icon accompanying the Jira Service Management attribution name. */
11
+ var JiraServiceManagementAttributionIcon = exports.JiraServiceManagementAttributionIcon = function JiraServiceManagementAttributionIcon() {
12
+ return /*#__PURE__*/_react.default.createElement("img", {
13
+ src: _rawIcons.jiraServiceManagementIcon,
14
+ alt: "",
15
+ width: 16,
16
+ height: 16
17
+ });
18
+ };
@@ -161,6 +161,11 @@ var messages = exports.messages = (0, _reactIntl.defineMessages)({
161
161
  defaultMessage: 'Jira',
162
162
  description: 'Jira product name shown as the creator in a slash-command preview attribution.'
163
163
  },
164
+ previewAttributionJiraServiceManagement: {
165
+ id: 'editor-common.quick-insert.previewAttributionJiraServiceManagement.ai-non-final',
166
+ defaultMessage: 'Jira Service Management',
167
+ description: 'Jira Service Management product name shown as the creator in a slash-command preview attribution.'
168
+ },
164
169
  previewAttributionMicrosoft: {
165
170
  id: 'editor-common.quick-insert.previewAttributionMicrosoft.ai-non-final',
166
171
  defaultMessage: 'Microsoft',
@@ -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 = "126.1.3";
27
+ var packageVersion = "126.2.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -9,7 +9,6 @@ exports.MenuArrowKeyNavigationProvider = void 0;
9
9
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
  var _browserApis = require("@atlaskit/browser-apis");
12
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
13
12
  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); }
14
13
  var hasEnabledItems = function hasEnabledItems(list) {
15
14
  return list.some(function (item) {
@@ -42,9 +41,6 @@ var MenuArrowKeyNavigationProvider = exports.MenuArrowKeyNavigationProvider = fu
42
41
  listenerTargetElement = _useState4[0];
43
42
  var getCurrentIndex = (0, _react.useCallback)(function (list) {
44
43
  var _getDocument;
45
- if (!(0, _expValEquals.expValEquals)('platform_editor_layout_column_menu', 'isEnabled', true)) {
46
- return currentSelectedItemIndex;
47
- }
48
44
  var activeElement = (_getDocument = (0, _browserApis.getDocument)()) === null || _getDocument === void 0 ? void 0 : _getDocument.activeElement;
49
45
  if (!(activeElement instanceof HTMLElement)) {
50
46
  return currentSelectedItemIndex;
@@ -315,6 +315,11 @@ export const syncBlockMessages = defineMessages({
315
315
  defaultMessage: 'Paste your synced block to keep content auto-updated. Permissions are the same.',
316
316
  description: 'Description in flag which appears when a sync block is copied'
317
317
  },
318
+ syncBlockCopiedJiraUnsavedFieldDescription: {
319
+ id: 'editor-common.messages.syncBlock.syncBlockCopiedJiraUnsavedFieldDescription.ai-non-final',
320
+ defaultMessage: 'To reuse this content, save this field and paste this synced block in another location.',
321
+ description: 'Instruction in a confirmation flag after a synced block is copied from an unsaved Jira work item field.'
322
+ },
318
323
  syncBlockCopiedLivePageDescription: {
319
324
  id: 'editor-common.messages.syncBlock.syncBlockCopiedLivePageDescription',
320
325
  defaultMessage: 'Paste this synced block content in another location to reuse its content.',
@@ -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 = "126.1.3";
16
+ const packageVersion = "126.2.0";
17
17
  const sanitiseSentryEvents = (data, _hint) => {
18
18
  // Remove URL as it has UGC
19
19
  // Ignored via go/ees007
@@ -80,7 +80,7 @@ export const CompactQuickInsertMenuItem = ({
80
80
  shouldWrapIcon = true,
81
81
  title
82
82
  }) => {
83
- var _ref, _resolvedPreview$imag, _resolvedPreview$imag2, _resolvedPreview$attr;
83
+ var _resolvedPreview$attr, _ref, _resolvedPreview$imag, _resolvedPreview$imag2;
84
84
  const {
85
85
  item
86
86
  } = useQuickInsertContext();
@@ -100,6 +100,8 @@ export const CompactQuickInsertMenuItem = ({
100
100
  } : {}, [preview, previewImageUrls]);
101
101
  const shouldRenderPreview = shouldShowPreview && isSelected && !isDisabled;
102
102
  const hasAccessiblePreview = Boolean(resolvedDescription || (resolvedPreview === null || resolvedPreview === void 0 ? void 0 : resolvedPreview.attribution));
103
+ const previewAttributionName = (_resolvedPreview$attr = resolvedPreview.attribution) === null || _resolvedPreview$attr === void 0 ? void 0 : _resolvedPreview$attr.name;
104
+ const previewAttributionKey = typeof previewAttributionName === 'string' ? previewAttributionName : previewAttributionName === null || previewAttributionName === void 0 ? void 0 : previewAttributionName.id;
103
105
  const wrappedIcon = iconBefore && shouldWrapIcon ? /*#__PURE__*/React.createElement(Box, {
104
106
  xcss: styles.iconLarge
105
107
  }, iconBefore) : iconBefore;
@@ -123,7 +125,7 @@ export const CompactQuickInsertMenuItem = ({
123
125
  as: "span",
124
126
  xcss: styles.shortcut
125
127
  }, shortcut))), shouldRenderPreview && referenceElement && /*#__PURE__*/React.createElement(QuickInsertHoverPreview, {
126
- key: (_ref = (_resolvedPreview$imag = (_resolvedPreview$imag2 = resolvedPreview.image) === null || _resolvedPreview$imag2 === void 0 ? void 0 : _resolvedPreview$imag2.light) !== null && _resolvedPreview$imag !== void 0 ? _resolvedPreview$imag : (_resolvedPreview$attr = resolvedPreview.attribution) === null || _resolvedPreview$attr === void 0 ? void 0 : _resolvedPreview$attr.name) !== null && _ref !== void 0 ? _ref : title,
128
+ key: (_ref = (_resolvedPreview$imag = (_resolvedPreview$imag2 = resolvedPreview.image) === null || _resolvedPreview$imag2 === void 0 ? void 0 : _resolvedPreview$imag2.light) !== null && _resolvedPreview$imag !== void 0 ? _resolvedPreview$imag : previewAttributionKey) !== null && _ref !== void 0 ? _ref : title,
127
129
  id: previewId,
128
130
  description: resolvedDescription,
129
131
  preview: resolvedPreview,
@@ -96,12 +96,14 @@ const QuickInsertPreviewPanel = ({
96
96
  title,
97
97
  update
98
98
  }) => {
99
- var _preview$attribution;
99
+ var _preview$attribution, _preview$attribution2;
100
100
  const {
101
101
  formatMessage
102
102
  } = useIntl();
103
103
  const [panelElement, setPanelElement] = useState(null);
104
104
  const AttributionIcon = (_preview$attribution = preview.attribution) === null || _preview$attribution === void 0 ? void 0 : _preview$attribution.icon;
105
+ const attributionName = (_preview$attribution2 = preview.attribution) === null || _preview$attribution2 === void 0 ? void 0 : _preview$attribution2.name;
106
+ const formattedAttributionName = typeof attributionName === 'string' ? attributionName : attributionName ? formatMessage(attributionName) : '';
105
107
  useLayoutEffect(() => {
106
108
  var _referenceElement$own;
107
109
  void update();
@@ -137,8 +139,8 @@ const QuickInsertPreviewPanel = ({
137
139
  }, /*#__PURE__*/React.createElement(AttributionIcon, null)), /*#__PURE__*/React.createElement(Text, {
138
140
  size: "small",
139
141
  color: "color.text.subtle"
140
- }, AttributionIcon ? preview.attribution.name : formatMessage(messages.previewAttributionBy, {
141
- name: preview.attribution.name
142
+ }, AttributionIcon ? formattedAttributionName : formatMessage(messages.previewAttributionBy, {
143
+ name: formattedAttributionName
142
144
  })))));
143
145
  };
144
146
  const PreviewImage = ({
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { jiraServiceManagementIcon } from '@atlaskit/logo/raw-icons';
3
+
4
+ /** Decorative product icon accompanying the Jira Service Management attribution name. */
5
+ export const JiraServiceManagementAttributionIcon = () => /*#__PURE__*/React.createElement("img", {
6
+ src: jiraServiceManagementIcon,
7
+ alt: "",
8
+ width: 16,
9
+ height: 16
10
+ });
@@ -155,6 +155,11 @@ export const messages = defineMessages({
155
155
  defaultMessage: 'Jira',
156
156
  description: 'Jira product name shown as the creator in a slash-command preview attribution.'
157
157
  },
158
+ previewAttributionJiraServiceManagement: {
159
+ id: 'editor-common.quick-insert.previewAttributionJiraServiceManagement.ai-non-final',
160
+ defaultMessage: 'Jira Service Management',
161
+ description: 'Jira Service Management product name shown as the creator in a slash-command preview attribution.'
162
+ },
158
163
  previewAttributionMicrosoft: {
159
164
  id: 'editor-common.quick-insert.previewAttributionMicrosoft.ai-non-final',
160
165
  defaultMessage: 'Microsoft',
@@ -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 = "126.1.3";
17
+ const packageVersion = "126.2.0";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -1,6 +1,5 @@
1
1
  import React, { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';
2
2
  import { getDocument } from '@atlaskit/browser-apis';
3
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
3
  const hasEnabledItems = list => list.some(item => item.getAttribute('aria-disabled') !== 'true');
5
4
 
6
5
  /**
@@ -24,9 +23,6 @@ export const MenuArrowKeyNavigationProvider = ({
24
23
  const [listenerTargetElement] = useState(element);
25
24
  const getCurrentIndex = useCallback(list => {
26
25
  var _getDocument;
27
- if (!expValEquals('platform_editor_layout_column_menu', 'isEnabled', true)) {
28
- return currentSelectedItemIndex;
29
- }
30
26
  const activeElement = (_getDocument = getDocument()) === null || _getDocument === void 0 ? void 0 : _getDocument.activeElement;
31
27
  if (!(activeElement instanceof HTMLElement)) {
32
28
  return currentSelectedItemIndex;
@@ -315,6 +315,11 @@ export var syncBlockMessages = defineMessages({
315
315
  defaultMessage: 'Paste your synced block to keep content auto-updated. Permissions are the same.',
316
316
  description: 'Description in flag which appears when a sync block is copied'
317
317
  },
318
+ syncBlockCopiedJiraUnsavedFieldDescription: {
319
+ id: 'editor-common.messages.syncBlock.syncBlockCopiedJiraUnsavedFieldDescription.ai-non-final',
320
+ defaultMessage: 'To reuse this content, save this field and paste this synced block in another location.',
321
+ description: 'Instruction in a confirmation flag after a synced block is copied from an unsaved Jira work item field.'
322
+ },
318
323
  syncBlockCopiedLivePageDescription: {
319
324
  id: 'editor-common.messages.syncBlock.syncBlockCopiedLivePageDescription',
320
325
  defaultMessage: 'Paste this synced block content in another location to reuse its content.',
@@ -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 = "126.1.3";
22
+ var packageVersion = "126.2.0";
23
23
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
24
24
  // Remove URL as it has UGC
25
25
  // Ignored via go/ees007
@@ -69,7 +69,7 @@ var disabledItemStyles = xcss({
69
69
  width: '100%'
70
70
  });
71
71
  export var CompactQuickInsertMenuItem = function CompactQuickInsertMenuItem(_ref) {
72
- var _ref3, _resolvedPreview$imag, _resolvedPreview$imag2, _resolvedPreview$attr;
72
+ var _resolvedPreview$attr, _ref3, _resolvedPreview$imag, _resolvedPreview$imag2;
73
73
  var ariaLabel = _ref.ariaLabel,
74
74
  description = _ref.description,
75
75
  iconBefore = _ref.iconBefore,
@@ -105,6 +105,8 @@ export var CompactQuickInsertMenuItem = function CompactQuickInsertMenuItem(_ref
105
105
  }, [preview, previewImageUrls]);
106
106
  var shouldRenderPreview = shouldShowPreview && isSelected && !isDisabled;
107
107
  var hasAccessiblePreview = Boolean(resolvedDescription || (resolvedPreview === null || resolvedPreview === void 0 ? void 0 : resolvedPreview.attribution));
108
+ var previewAttributionName = (_resolvedPreview$attr = resolvedPreview.attribution) === null || _resolvedPreview$attr === void 0 ? void 0 : _resolvedPreview$attr.name;
109
+ var previewAttributionKey = typeof previewAttributionName === 'string' ? previewAttributionName : previewAttributionName === null || previewAttributionName === void 0 ? void 0 : previewAttributionName.id;
108
110
  var wrappedIcon = iconBefore && shouldWrapIcon ? /*#__PURE__*/React.createElement(Box, {
109
111
  xcss: styles.iconLarge
110
112
  }, iconBefore) : iconBefore;
@@ -128,7 +130,7 @@ export var CompactQuickInsertMenuItem = function CompactQuickInsertMenuItem(_ref
128
130
  as: "span",
129
131
  xcss: styles.shortcut
130
132
  }, shortcut))), shouldRenderPreview && referenceElement && /*#__PURE__*/React.createElement(QuickInsertHoverPreview, {
131
- key: (_ref3 = (_resolvedPreview$imag = (_resolvedPreview$imag2 = resolvedPreview.image) === null || _resolvedPreview$imag2 === void 0 ? void 0 : _resolvedPreview$imag2.light) !== null && _resolvedPreview$imag !== void 0 ? _resolvedPreview$imag : (_resolvedPreview$attr = resolvedPreview.attribution) === null || _resolvedPreview$attr === void 0 ? void 0 : _resolvedPreview$attr.name) !== null && _ref3 !== void 0 ? _ref3 : title,
133
+ key: (_ref3 = (_resolvedPreview$imag = (_resolvedPreview$imag2 = resolvedPreview.image) === null || _resolvedPreview$imag2 === void 0 ? void 0 : _resolvedPreview$imag2.light) !== null && _resolvedPreview$imag !== void 0 ? _resolvedPreview$imag : previewAttributionKey) !== null && _ref3 !== void 0 ? _ref3 : title,
132
134
  id: previewId,
133
135
  description: resolvedDescription,
134
136
  preview: resolvedPreview,
@@ -88,7 +88,7 @@ export var QuickInsertHoverPreview = function QuickInsertHoverPreview(_ref) {
88
88
  }), referenceElement.ownerDocument.body);
89
89
  };
90
90
  var QuickInsertPreviewPanel = function QuickInsertPreviewPanel(_ref3) {
91
- var _preview$attribution;
91
+ var _preview$attribution, _preview$attribution2;
92
92
  var description = _ref3.description,
93
93
  id = _ref3.id,
94
94
  imageUrl = _ref3.imageUrl,
@@ -103,6 +103,8 @@ var QuickInsertPreviewPanel = function QuickInsertPreviewPanel(_ref3) {
103
103
  panelElement = _useState2[0],
104
104
  setPanelElement = _useState2[1];
105
105
  var AttributionIcon = (_preview$attribution = preview.attribution) === null || _preview$attribution === void 0 ? void 0 : _preview$attribution.icon;
106
+ var attributionName = (_preview$attribution2 = preview.attribution) === null || _preview$attribution2 === void 0 ? void 0 : _preview$attribution2.name;
107
+ var formattedAttributionName = typeof attributionName === 'string' ? attributionName : attributionName ? formatMessage(attributionName) : '';
106
108
  useLayoutEffect(function () {
107
109
  var _referenceElement$own;
108
110
  void update();
@@ -142,8 +144,8 @@ var QuickInsertPreviewPanel = function QuickInsertPreviewPanel(_ref3) {
142
144
  }, /*#__PURE__*/React.createElement(AttributionIcon, null)), /*#__PURE__*/React.createElement(Text, {
143
145
  size: "small",
144
146
  color: "color.text.subtle"
145
- }, AttributionIcon ? preview.attribution.name : formatMessage(messages.previewAttributionBy, {
146
- name: preview.attribution.name
147
+ }, AttributionIcon ? formattedAttributionName : formatMessage(messages.previewAttributionBy, {
148
+ name: formattedAttributionName
147
149
  })))));
148
150
  };
149
151
  var PreviewImage = function PreviewImage(_ref4) {
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { jiraServiceManagementIcon } from '@atlaskit/logo/raw-icons';
3
+
4
+ /** Decorative product icon accompanying the Jira Service Management attribution name. */
5
+ export var JiraServiceManagementAttributionIcon = function JiraServiceManagementAttributionIcon() {
6
+ return /*#__PURE__*/React.createElement("img", {
7
+ src: jiraServiceManagementIcon,
8
+ alt: "",
9
+ width: 16,
10
+ height: 16
11
+ });
12
+ };
@@ -155,6 +155,11 @@ export var messages = defineMessages({
155
155
  defaultMessage: 'Jira',
156
156
  description: 'Jira product name shown as the creator in a slash-command preview attribution.'
157
157
  },
158
+ previewAttributionJiraServiceManagement: {
159
+ id: 'editor-common.quick-insert.previewAttributionJiraServiceManagement.ai-non-final',
160
+ defaultMessage: 'Jira Service Management',
161
+ description: 'Jira Service Management product name shown as the creator in a slash-command preview attribution.'
162
+ },
158
163
  previewAttributionMicrosoft: {
159
164
  id: 'editor-common.quick-insert.previewAttributionMicrosoft.ai-non-final',
160
165
  defaultMessage: 'Microsoft',
@@ -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 = "126.1.3";
24
+ var packageVersion = "126.2.0";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -1,7 +1,6 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import React, { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';
3
3
  import { getDocument } from '@atlaskit/browser-apis';
4
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
4
  var hasEnabledItems = function hasEnabledItems(list) {
6
5
  return list.some(function (item) {
7
6
  return item.getAttribute('aria-disabled') !== 'true';
@@ -33,9 +32,6 @@ export var MenuArrowKeyNavigationProvider = function MenuArrowKeyNavigationProvi
33
32
  listenerTargetElement = _useState4[0];
34
33
  var getCurrentIndex = useCallback(function (list) {
35
34
  var _getDocument;
36
- if (!expValEquals('platform_editor_layout_column_menu', 'isEnabled', true)) {
37
- return currentSelectedItemIndex;
38
- }
39
35
  var activeElement = (_getDocument = getDocument()) === null || _getDocument === void 0 ? void 0 : _getDocument.activeElement;
40
36
  if (!(activeElement instanceof HTMLElement)) {
41
37
  return currentSelectedItemIndex;
@@ -329,6 +329,11 @@ export declare const syncBlockMessages: {
329
329
  description: string;
330
330
  id: string;
331
331
  };
332
+ syncBlockCopiedJiraUnsavedFieldDescription: {
333
+ defaultMessage: string;
334
+ description: string;
335
+ id: string;
336
+ };
332
337
  syncBlockCopiedLivePageDescription: {
333
338
  defaultMessage: string;
334
339
  description: string;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ /** Decorative product icon accompanying the Jira Service Management attribution name. */
3
+ export declare const JiraServiceManagementAttributionIcon: () => React.JSX.Element;
@@ -3,5 +3,5 @@ type Messages<Keys extends string> = Record<Keys, MessageDescriptor & {
3
3
  defaultMessage: string;
4
4
  id: string;
5
5
  }>;
6
- export declare const messages: Messages<'admin' | 'AI' | 'all' | 'browse' | 'categoryBlockTemplates' | 'categoryDataAndCharts' | 'categoryEmbed' | 'categoryMedia' | 'categoryOther' | 'categoryRecommended' | 'categoryRovo' | 'categoryStructure' | 'categoryTextFormatting' | 'previewAttributionBy' | 'previewAttributionAtlassian' | 'previewAttributionAssets' | 'previewAttributionConfluence' | 'previewAttributionJira' | 'previewAttributionMicrosoft' | 'close' | 'communication' | 'confluence-content' | 'development' | 'external-content' | 'featuredWhiteboardDescription' | 'formatting' | 'help' | 'insert' | 'media' | 'navigation' | 'reporting' | 'visuals'>;
6
+ export declare const messages: Messages<'admin' | 'AI' | 'all' | 'browse' | 'categoryBlockTemplates' | 'categoryDataAndCharts' | 'categoryEmbed' | 'categoryMedia' | 'categoryOther' | 'categoryRecommended' | 'categoryRovo' | 'categoryStructure' | 'categoryTextFormatting' | 'previewAttributionBy' | 'previewAttributionAtlassian' | 'previewAttributionAssets' | 'previewAttributionConfluence' | 'previewAttributionJira' | 'previewAttributionJiraServiceManagement' | 'previewAttributionMicrosoft' | 'close' | 'communication' | 'confluence-content' | 'development' | 'external-content' | 'featuredWhiteboardDescription' | 'formatting' | 'help' | 'insert' | 'media' | 'navigation' | 'reporting' | 'visuals'>;
7
7
  export {};
@@ -1,4 +1,5 @@
1
1
  import type { ComponentType } from 'react';
2
+ import type { MessageDescriptor } from 'react-intl';
2
3
  /** An image asset with a light default and an optional dark theme variant. */
3
4
  export type PreviewImage = {
4
5
  dark?: string;
@@ -8,8 +9,8 @@ export type QuickInsertPreview = {
8
9
  attribution?: {
9
10
  /** Decorative icon shown at a fixed 16px size beside the attribution. */
10
11
  icon?: ComponentType;
11
- /** Localized display name; Editor adds a localized prefix when no icon is supplied. */
12
- name: string;
12
+ /** Display name or message to localize; Editor adds a localized prefix when no icon is supplied. */
13
+ name: string | MessageDescriptor;
13
14
  };
14
15
  /** Optional image; text and attribution still render when an image is omitted or fails to load. */
15
16
  image?: PreviewImage;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "126.1.3",
3
+ "version": "126.2.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/"
@@ -74,7 +74,7 @@
74
74
  "@atlaskit/platform-feature-flags-react": "^1.2.0",
75
75
  "@atlaskit/popper": "^9.4.0",
76
76
  "@atlaskit/primitives": "^22.5.0",
77
- "@atlaskit/profilecard": "^27.0.0",
77
+ "@atlaskit/profilecard": "^27.1.0",
78
78
  "@atlaskit/prosemirror-history": "^1.3.0",
79
79
  "@atlaskit/react-compiler-gating": "^0.2.0",
80
80
  "@atlaskit/react-ufo": "^8.0.0",
@@ -85,7 +85,7 @@
85
85
  "@atlaskit/task-decision": "^21.11.0",
86
86
  "@atlaskit/teams-app-config": "^3.1.0",
87
87
  "@atlaskit/textfield": "^10.2.0",
88
- "@atlaskit/tmp-editor-statsig": "^212.0.0",
88
+ "@atlaskit/tmp-editor-statsig": "^213.0.0",
89
89
  "@atlaskit/tokens": "^20.1.0",
90
90
  "@atlaskit/tooltip": "^24.3.0",
91
91
  "@atlaskit/width-detector": "^7.2.0",
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@atlaskit/editor-common/quick-insert/jira-service-management-attribution-icon",
3
+ "main": "../../dist/cjs/quick-insert/jira-service-management-attribution-icon.js",
4
+ "module": "../../dist/esm/quick-insert/jira-service-management-attribution-icon.js",
5
+ "module:es2019": "../../dist/es2019/quick-insert/jira-service-management-attribution-icon.js",
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
9
+ "types": "../../dist/types/quick-insert/jira-service-management-attribution-icon.d.ts"
10
+ }