@atlaskit/editor-common 123.7.2 → 123.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 123.8.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`d91ad931789cc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d91ad931789cc) -
8
+ [ux] EDITOR-9220 open all expands for suggestions spanning multiple toolcalls behind
9
+ platform_editor_ai_show_diff_patch_2
10
+ - Updated dependencies
11
+
12
+ ## 123.8.0
13
+
14
+ ### Minor Changes
15
+
16
+ - [`ef5742162c47b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ef5742162c47b) -
17
+ EDITOR-9184: Make the synced locations dropdown field-aware for Jira work items, behind the
18
+ `editor_synced_blocks_jira_custom_rich_text` experiment. Each Jira location's title and tooltip
19
+ name the work item field holding the block, a location in the field being viewed reads "This work
20
+ item field" and one in another field of the same work item reads "This work item"; `editor-common`
21
+ gains the three `syncBlockMessages` descriptors this uses. With the experiment off the dropdown
22
+ renders as before.
23
+
24
+ ### Patch Changes
25
+
26
+ - Updated dependencies
27
+
3
28
  ## 123.7.2
4
29
 
5
30
  ### Patch Changes
@@ -1,10 +1,13 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports.toggleExpandRange = exports.isExpandCollapsed = exports.getNextNodeExpandPos = exports.expandedState = exports.TOGGLE_EXPAND_RANGE_META_KEY = void 0;
8
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
7
9
  var _utils = require("@atlaskit/editor-prosemirror/utils");
10
+ var _fg = require("@atlaskit/platform-feature-flags/fg");
8
11
  // Used to store the state of the new single player expand node
9
12
  var expandedState = exports.expandedState = new WeakMap();
10
13
 
@@ -36,11 +39,16 @@ var toggleExpandRange = exports.toggleExpandRange = function toggleExpandRange(f
36
39
  return null;
37
40
  }
38
41
 
42
+ // preserve positions from earlier calls on the same transaction so callers can target disjoint ranges
43
+ // without opening unrelated expands between them.
44
+ var existingMeta = tr.getMeta(TOGGLE_EXPAND_RANGE_META_KEY);
45
+ var combinedPositions = (existingMeta === null || existingMeta === void 0 ? void 0 : existingMeta.open) === open && (0, _fg.fg)('platform_editor_ai_show_diff_patch_2') ? Array.from(new Set([].concat((0, _toConsumableArray2.default)(existingMeta.positions), positions))) : positions;
46
+
39
47
  // Set meta so the expand PM plugin can add node decorations.
40
48
  // This ensures ExpandNodeView.update() receives the decoration and visually
41
49
  // opens or closes the expand.
42
50
  tr.setMeta(TOGGLE_EXPAND_RANGE_META_KEY, {
43
- positions: positions,
51
+ positions: combinedPositions,
44
52
  open: open
45
53
  });
46
54
  return tr;
@@ -401,6 +401,16 @@ var syncBlockMessages = exports.syncBlockMessages = (0, _reactIntl.defineMessage
401
401
  defaultMessage: 'This work item',
402
402
  description: 'Note shown next to the work item title in the synced location dropdown option when the sync block is on the current work item'
403
403
  },
404
+ syncedLocationDropdownTitleNoteForJiraWorkItemField: {
405
+ id: 'fabric.editor.syncedLocationDropdownTitleNoteForJiraWorkItemField',
406
+ defaultMessage: 'This work item field',
407
+ description: 'Note shown next to the work item title in the synced location dropdown option when the sync block is in the same field of the current work item'
408
+ },
409
+ syncedLocationDropdownTooltipFieldName: {
410
+ id: 'fabric.editor.syncedLocationDropdownTooltipFieldName',
411
+ defaultMessage: 'Field: {fieldName}',
412
+ description: 'Second line of the tooltip on a synced location dropdown option, naming the Jira work item field that holds the sync block'
413
+ },
404
414
  syncedLocationDropdownSourceLozenge: {
405
415
  id: 'fabric.editor.syncedLocationDropdownSourceLozenge',
406
416
  defaultMessage: 'Source',
@@ -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 = "123.7.1";
30
+ var packageVersion = "123.8.0";
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 = "123.7.1";
27
+ var packageVersion = "123.8.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -1,4 +1,5 @@
1
1
  import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
2
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
2
3
  // Used to store the state of the new single player expand node
3
4
  export const expandedState = new WeakMap();
4
5
 
@@ -30,11 +31,16 @@ export const toggleExpandRange = (from, to, open = true) => ({
30
31
  return null;
31
32
  }
32
33
 
34
+ // preserve positions from earlier calls on the same transaction so callers can target disjoint ranges
35
+ // without opening unrelated expands between them.
36
+ const existingMeta = tr.getMeta(TOGGLE_EXPAND_RANGE_META_KEY);
37
+ const combinedPositions = (existingMeta === null || existingMeta === void 0 ? void 0 : existingMeta.open) === open && fg('platform_editor_ai_show_diff_patch_2') ? Array.from(new Set([...existingMeta.positions, ...positions])) : positions;
38
+
33
39
  // Set meta so the expand PM plugin can add node decorations.
34
40
  // This ensures ExpandNodeView.update() receives the decoration and visually
35
41
  // opens or closes the expand.
36
42
  tr.setMeta(TOGGLE_EXPAND_RANGE_META_KEY, {
37
- positions,
43
+ positions: combinedPositions,
38
44
  open
39
45
  });
40
46
  return tr;
@@ -395,6 +395,16 @@ export const syncBlockMessages = defineMessages({
395
395
  defaultMessage: 'This work item',
396
396
  description: 'Note shown next to the work item title in the synced location dropdown option when the sync block is on the current work item'
397
397
  },
398
+ syncedLocationDropdownTitleNoteForJiraWorkItemField: {
399
+ id: 'fabric.editor.syncedLocationDropdownTitleNoteForJiraWorkItemField',
400
+ defaultMessage: 'This work item field',
401
+ description: 'Note shown next to the work item title in the synced location dropdown option when the sync block is in the same field of the current work item'
402
+ },
403
+ syncedLocationDropdownTooltipFieldName: {
404
+ id: 'fabric.editor.syncedLocationDropdownTooltipFieldName',
405
+ defaultMessage: 'Field: {fieldName}',
406
+ description: 'Second line of the tooltip on a synced location dropdown option, naming the Jira work item field that holds the sync block'
407
+ },
398
408
  syncedLocationDropdownSourceLozenge: {
399
409
  id: 'fabric.editor.syncedLocationDropdownSourceLozenge',
400
410
  defaultMessage: 'Source',
@@ -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 = "123.7.1";
16
+ const packageVersion = "123.8.0";
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 = "123.7.1";
17
+ const packageVersion = "123.8.0";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -1,4 +1,6 @@
1
+ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
1
2
  import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
3
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
2
4
  // Used to store the state of the new single player expand node
3
5
  export var expandedState = new WeakMap();
4
6
 
@@ -30,11 +32,16 @@ export var toggleExpandRange = function toggleExpandRange(from, to) {
30
32
  return null;
31
33
  }
32
34
 
35
+ // preserve positions from earlier calls on the same transaction so callers can target disjoint ranges
36
+ // without opening unrelated expands between them.
37
+ var existingMeta = tr.getMeta(TOGGLE_EXPAND_RANGE_META_KEY);
38
+ var combinedPositions = (existingMeta === null || existingMeta === void 0 ? void 0 : existingMeta.open) === open && fg('platform_editor_ai_show_diff_patch_2') ? Array.from(new Set([].concat(_toConsumableArray(existingMeta.positions), positions))) : positions;
39
+
33
40
  // Set meta so the expand PM plugin can add node decorations.
34
41
  // This ensures ExpandNodeView.update() receives the decoration and visually
35
42
  // opens or closes the expand.
36
43
  tr.setMeta(TOGGLE_EXPAND_RANGE_META_KEY, {
37
- positions: positions,
44
+ positions: combinedPositions,
38
45
  open: open
39
46
  });
40
47
  return tr;
@@ -395,6 +395,16 @@ export var syncBlockMessages = defineMessages({
395
395
  defaultMessage: 'This work item',
396
396
  description: 'Note shown next to the work item title in the synced location dropdown option when the sync block is on the current work item'
397
397
  },
398
+ syncedLocationDropdownTitleNoteForJiraWorkItemField: {
399
+ id: 'fabric.editor.syncedLocationDropdownTitleNoteForJiraWorkItemField',
400
+ defaultMessage: 'This work item field',
401
+ description: 'Note shown next to the work item title in the synced location dropdown option when the sync block is in the same field of the current work item'
402
+ },
403
+ syncedLocationDropdownTooltipFieldName: {
404
+ id: 'fabric.editor.syncedLocationDropdownTooltipFieldName',
405
+ defaultMessage: 'Field: {fieldName}',
406
+ description: 'Second line of the tooltip on a synced location dropdown option, naming the Jira work item field that holds the sync block'
407
+ },
398
408
  syncedLocationDropdownSourceLozenge: {
399
409
  id: 'fabric.editor.syncedLocationDropdownSourceLozenge',
400
410
  defaultMessage: 'Source',
@@ -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 = "123.7.1";
22
+ var packageVersion = "123.8.0";
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 = "123.7.1";
24
+ var packageVersion = "123.8.0";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -459,11 +459,21 @@ export declare const syncBlockMessages: {
459
459
  description: string;
460
460
  id: string;
461
461
  };
462
+ syncedLocationDropdownTitleNoteForJiraWorkItemField: {
463
+ defaultMessage: string;
464
+ description: string;
465
+ id: string;
466
+ };
462
467
  syncedLocationDropdownTitleWithCount: {
463
468
  defaultMessage: string;
464
469
  description: string;
465
470
  id: string;
466
471
  };
472
+ syncedLocationDropdownTooltipFieldName: {
473
+ defaultMessage: string;
474
+ description: string;
475
+ id: string;
476
+ };
467
477
  syncedLocationDropdownUntitledPage: {
468
478
  defaultMessage: string;
469
479
  description: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "123.7.2",
3
+ "version": "123.8.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/"
@@ -73,7 +73,7 @@
73
73
  "@atlaskit/platform-feature-flags-react": "^1.2.0",
74
74
  "@atlaskit/popper": "^9.4.0",
75
75
  "@atlaskit/primitives": "^22.5.0",
76
- "@atlaskit/profilecard": "^26.24.0",
76
+ "@atlaskit/profilecard": "^26.25.0",
77
77
  "@atlaskit/prosemirror-history": "^1.2.0",
78
78
  "@atlaskit/react-compiler-gating": "^0.2.0",
79
79
  "@atlaskit/react-ufo": "^7.13.0",
@@ -84,7 +84,7 @@
84
84
  "@atlaskit/task-decision": "^21.10.0",
85
85
  "@atlaskit/teams-app-config": "^3.1.0",
86
86
  "@atlaskit/textfield": "^10.2.0",
87
- "@atlaskit/tmp-editor-statsig": "^202.0.0",
87
+ "@atlaskit/tmp-editor-statsig": "^204.0.0",
88
88
  "@atlaskit/tokens": "^19.0.0",
89
89
  "@atlaskit/tooltip": "^24.3.0",
90
90
  "@atlaskit/width-detector": "^7.2.0",
@@ -152,6 +152,9 @@
152
152
  "platform_editor_add_text_color_tracking": {
153
153
  "type": "boolean"
154
154
  },
155
+ "platform_editor_ai_show_diff_patch_2": {
156
+ "type": "boolean"
157
+ },
155
158
  "platform_editor_blocks_patch_7": {
156
159
  "type": "boolean",
157
160
  "referenceOnly": true
package/tsconfig.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "extends": "./tsconfig.dev.json",
2
+ "extends": "./tsconfig.app.json",
3
3
  "compilerOptions": {
4
4
  "disableReferencedProjectLoad": true,
5
5
  "disableSolutionSearching": true