@atlaskit/editor-common 125.1.0 → 125.2.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 CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 125.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`111eaadd44c1c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/111eaadd44c1c) -
8
+ EDITOR-8995: Make the editor find dialog usable in live view. The find dialog now accepts an
9
+ `allowReplace` prop, and hides the replace label, field, replacement count message, both replace
10
+ buttons and the horizontal rule when it is false. It also names the dialog "Find" instead of "Find
11
+ and Replace" in that state. The find plugin derives `allowReplace` from the `editorViewMode`
12
+ shared state, so view mode never offers replace. A new ProseMirror plugin opens the dialog on
13
+ `Mod-f` in view mode, where no keymap fires, behind the `platform_editor_collapsible_headings`
14
+ experiment. The `activated` analytics event gains an `editorViewMode` attribute.
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies
19
+
3
20
  ## 125.1.0
4
21
 
5
22
  ### Minor Changes
@@ -31,6 +31,11 @@ var findReplaceMessages = exports.findReplaceMessages = (0, _reactIntl.defineMes
31
31
  defaultMessage: 'Find and Replace',
32
32
  description: 'Aria label for the "Find and Replace" dialog'
33
33
  },
34
+ findDialogAriaLabel: {
35
+ id: 'fabric.editor.findDialogAriaLabel',
36
+ defaultMessage: 'Find',
37
+ description: 'Aria label for the "Find" dialog, used where the dialog offers find without replace'
38
+ },
34
39
  closeFindReplaceDialog: {
35
40
  id: 'fabric.editor.closeFindReplaceDialog',
36
41
  defaultMessage: 'Close',
@@ -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 = "125.0.0";
30
+ var packageVersion = "125.1.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 = "125.0.0";
27
+ var packageVersion = "125.1.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -25,6 +25,11 @@ export const findReplaceMessages = defineMessages({
25
25
  defaultMessage: 'Find and Replace',
26
26
  description: 'Aria label for the "Find and Replace" dialog'
27
27
  },
28
+ findDialogAriaLabel: {
29
+ id: 'fabric.editor.findDialogAriaLabel',
30
+ defaultMessage: 'Find',
31
+ description: 'Aria label for the "Find" dialog, used where the dialog offers find without replace'
32
+ },
28
33
  closeFindReplaceDialog: {
29
34
  id: 'fabric.editor.closeFindReplaceDialog',
30
35
  defaultMessage: 'Close',
@@ -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 = "125.0.0";
16
+ const packageVersion = "125.1.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 = "125.0.0";
17
+ const packageVersion = "125.1.0";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -25,6 +25,11 @@ export var findReplaceMessages = defineMessages({
25
25
  defaultMessage: 'Find and Replace',
26
26
  description: 'Aria label for the "Find and Replace" dialog'
27
27
  },
28
+ findDialogAriaLabel: {
29
+ id: 'fabric.editor.findDialogAriaLabel',
30
+ defaultMessage: 'Find',
31
+ description: 'Aria label for the "Find" dialog, used where the dialog offers find without replace'
32
+ },
28
33
  closeFindReplaceDialog: {
29
34
  id: 'fabric.editor.closeFindReplaceDialog',
30
35
  defaultMessage: 'Close',
@@ -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 = "125.0.0";
22
+ var packageVersion = "125.1.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 = "125.0.0";
24
+ var packageVersion = "125.1.0";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -1,6 +1,8 @@
1
1
  import type { ACTION, ACTION_SUBJECT, INPUT_METHOD, TRIGGER_METHOD } from './enums';
2
2
  import type { TrackAEP, UIAEP } from './utils';
3
3
  type ActivateAEP = UIAEP<ACTION.ACTIVATED, ACTION_SUBJECT.FIND_REPLACE_DIALOG, undefined, {
4
+ /** The editor mode when the dialog opened. */
5
+ editorViewMode?: 'view' | 'edit';
4
6
  inputMethod: INPUT_METHOD.KEYBOARD | INPUT_METHOD.PREFILL;
5
7
  triggerMethod: TRIGGER_METHOD.SHORTCUT | TRIGGER_METHOD.TOOLBAR | TRIGGER_METHOD.EXTERNAL;
6
8
  }, undefined>;
@@ -1,67 +1,72 @@
1
1
  export declare const findReplaceMessages: {
2
- find: {
3
- id: string;
2
+ closeFindReplaceDialog: {
4
3
  defaultMessage: string;
5
4
  description: string;
5
+ id: string;
6
6
  };
7
- matchCase: {
7
+ find: {
8
+ defaultMessage: string;
9
+ description: string;
8
10
  id: string;
11
+ };
12
+ findDialogAriaLabel: {
9
13
  defaultMessage: string;
10
14
  description: string;
15
+ id: string;
11
16
  };
12
17
  findNext: {
13
- id: string;
14
18
  defaultMessage: string;
15
19
  description: string;
20
+ id: string;
16
21
  };
17
22
  findPrevious: {
18
- id: string;
19
23
  defaultMessage: string;
20
24
  description: string;
25
+ id: string;
21
26
  };
22
27
  findReplaceDialogAriaLabel: {
23
- id: string;
24
28
  defaultMessage: string;
25
29
  description: string;
26
- };
27
- closeFindReplaceDialog: {
28
30
  id: string;
29
- defaultMessage: string;
30
- description: string;
31
31
  };
32
- noResultsFound: {
33
- id: string;
32
+ findReplaceToolbarButton: {
34
33
  defaultMessage: string;
35
34
  description: string;
36
- };
37
- resultsCount: {
38
35
  id: string;
39
- description: string;
40
- defaultMessage: string;
41
36
  };
42
- findReplaceToolbarButton: {
43
- id: string;
37
+ matchCase: {
44
38
  defaultMessage: string;
45
39
  description: string;
46
- };
47
- replaceWith: {
48
40
  id: string;
41
+ };
42
+ noResultsFound: {
49
43
  defaultMessage: string;
50
44
  description: string;
45
+ id: string;
51
46
  };
52
47
  replace: {
53
- id: string;
54
48
  defaultMessage: string;
55
49
  description: string;
50
+ id: string;
56
51
  };
57
52
  replaceAll: {
58
- id: string;
59
53
  defaultMessage: string;
60
54
  description: string;
55
+ id: string;
61
56
  };
62
57
  replaceSuccess: {
58
+ defaultMessage: string;
59
+ description: string;
60
+ id: string;
61
+ };
62
+ replaceWith: {
63
+ defaultMessage: string;
64
+ description: string;
63
65
  id: string;
66
+ };
67
+ resultsCount: {
64
68
  defaultMessage: string;
65
69
  description: string;
70
+ id: string;
66
71
  };
67
72
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "125.1.0",
3
+ "version": "125.2.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/"
@@ -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": "^206.0.0",
87
+ "@atlaskit/tmp-editor-statsig": "^207.0.0",
88
88
  "@atlaskit/tokens": "^20.0.0",
89
89
  "@atlaskit/tooltip": "^24.3.0",
90
90
  "@atlaskit/width-detector": "^7.2.0",