@atlaskit/editor-common 111.8.7 → 111.8.9

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 (55) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/afm-jira/tsconfig.json +1 -1
  3. package/dist/cjs/analytics/types/enums.js +12 -0
  4. package/dist/cjs/experiences/consts.js +9 -2
  5. package/dist/cjs/experiences/experience-utils.js +16 -1
  6. package/dist/cjs/experiences/index.js +12 -0
  7. package/dist/cjs/experiences/types.js +15 -1
  8. package/dist/cjs/extensibility/Extension/Extension/index.js +3 -2
  9. package/dist/cjs/link/LinkSearch/index.js +2 -1
  10. package/dist/cjs/messages/block-menu.js +20 -0
  11. package/dist/cjs/monitoring/error.js +1 -1
  12. package/dist/cjs/ui/DropList/index.js +1 -1
  13. package/dist/es2019/analytics/types/enums.js +12 -0
  14. package/dist/es2019/experiences/consts.js +8 -1
  15. package/dist/es2019/experiences/experience-utils.js +13 -0
  16. package/dist/es2019/experiences/index.js +2 -2
  17. package/dist/es2019/experiences/types.js +14 -0
  18. package/dist/es2019/extensibility/Extension/Extension/index.js +3 -2
  19. package/dist/es2019/link/LinkSearch/index.js +2 -1
  20. package/dist/es2019/messages/block-menu.js +20 -0
  21. package/dist/es2019/monitoring/error.js +1 -1
  22. package/dist/es2019/ui/DropList/index.js +1 -1
  23. package/dist/esm/analytics/types/enums.js +12 -0
  24. package/dist/esm/experiences/consts.js +8 -1
  25. package/dist/esm/experiences/experience-utils.js +15 -0
  26. package/dist/esm/experiences/index.js +2 -2
  27. package/dist/esm/experiences/types.js +14 -0
  28. package/dist/esm/extensibility/Extension/Extension/index.js +3 -2
  29. package/dist/esm/link/LinkSearch/index.js +2 -1
  30. package/dist/esm/messages/block-menu.js +20 -0
  31. package/dist/esm/monitoring/error.js +1 -1
  32. package/dist/esm/ui/DropList/index.js +1 -1
  33. package/dist/types/analytics/types/enums.d.ts +12 -0
  34. package/dist/types/analytics/types/sync-block-events.d.ts +14 -2
  35. package/dist/types/experiences/Experience.d.ts +2 -2
  36. package/dist/types/experiences/consts.d.ts +7 -0
  37. package/dist/types/experiences/experience-utils.d.ts +7 -0
  38. package/dist/types/experiences/index.d.ts +2 -2
  39. package/dist/types/experiences/types.d.ts +4 -1
  40. package/dist/types/extensibility/Extension/Extension/index.d.ts +58 -58
  41. package/dist/types/link/LinkSearch/index.d.ts +43 -41
  42. package/dist/types/messages/block-menu.d.ts +20 -0
  43. package/dist/types/utils/browser.d.ts +2 -1
  44. package/dist/types-ts4.5/analytics/types/enums.d.ts +12 -0
  45. package/dist/types-ts4.5/analytics/types/sync-block-events.d.ts +14 -2
  46. package/dist/types-ts4.5/experiences/Experience.d.ts +2 -2
  47. package/dist/types-ts4.5/experiences/consts.d.ts +7 -0
  48. package/dist/types-ts4.5/experiences/experience-utils.d.ts +7 -0
  49. package/dist/types-ts4.5/experiences/index.d.ts +2 -2
  50. package/dist/types-ts4.5/experiences/types.d.ts +4 -1
  51. package/dist/types-ts4.5/extensibility/Extension/Extension/index.d.ts +58 -58
  52. package/dist/types-ts4.5/link/LinkSearch/index.d.ts +43 -41
  53. package/dist/types-ts4.5/messages/block-menu.d.ts +20 -0
  54. package/dist/types-ts4.5/utils/browser.d.ts +2 -1
  55. package/package.json +6 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 111.8.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [`33f11753a7104`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/33f11753a7104) -
8
+ [ux] Added i18n for sections' titles in the Turn into menu.
9
+ - Updated dependencies
10
+
11
+ ## 111.8.8
12
+
13
+ ### Patch Changes
14
+
15
+ - [`7f41011a1b0ff`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7f41011a1b0ff) -
16
+ EDITOR-1665 update sync block experience events to use general experience ids, keep existing error
17
+ events and add success events
18
+ - Updated dependencies
19
+
3
20
  ## 111.8.7
4
21
 
5
22
  ### Patch Changes
@@ -1,5 +1,5 @@
1
1
  {
2
- "extends": "../../../../tsconfig.entry-points.jira.json",
2
+ "extends": "../../../../tsconfig.local-consumption.json",
3
3
  "compilerOptions": {
4
4
  "declaration": true,
5
5
  "target": "es5",
@@ -66,6 +66,7 @@ var ACTION = exports.ACTION = /*#__PURE__*/function (ACTION) {
66
66
  ACTION["EXPERIENCE_MEASURED"] = "experienceMeasured";
67
67
  ACTION["EXPERIENCE_SAMPLED"] = "experienceSampled";
68
68
  ACTION["EXPOSED"] = "exposed";
69
+ ACTION["FETCHED"] = "fetched";
69
70
  ACTION["FAILED_TO_UNMOUNT"] = "failedToUnmount";
70
71
  ACTION["FAILED_TO_INSERT"] = "failedToInsert";
71
72
  ACTION["FIND_NEXT_PERFORMED"] = "findNextPerformed";
@@ -108,6 +109,8 @@ var ACTION = exports.ACTION = /*#__PURE__*/function (ACTION) {
108
109
  ACTION["PRESSED"] = "pressed";
109
110
  ACTION["PROSEMIRROR_RENDERED"] = "proseMirrorRendered";
110
111
  ACTION["REACT_NODEVIEW_RENDERED"] = "reactNodeViewRendered";
112
+ ACTION["REFERENCE_SYNCED_BLOCK_DELETE"] = "referenceSyncedBlockDelete";
113
+ ACTION["REFERENCE_SYNCED_BLOCK_UPDATE"] = "referenceSyncedBlockUpdate";
111
114
  ACTION["REPLACED_ALL"] = "replacedAll";
112
115
  ACTION["REPLACED_ONE"] = "replacedOne";
113
116
  ACTION["RESOLVED"] = "resolved";
@@ -119,6 +122,11 @@ var ACTION = exports.ACTION = /*#__PURE__*/function (ACTION) {
119
122
  ACTION["STOPPED"] = "stopped";
120
123
  ACTION["SUBMITTED"] = "submitted";
121
124
  ACTION["SUBSTITUTED"] = "autoSubstituted";
125
+ ACTION["SYNCED_BLOCK_CREATE"] = "syncedBlockCreate";
126
+ ACTION["SYNCED_BLOCK_UPDATE"] = "syncedBlockUpdate";
127
+ ACTION["SYNCED_BLOCK_FETCH"] = "syncedBlockFetch";
128
+ ACTION["SYNCED_BLOCK_DELETE"] = "syncedBlockDelete";
129
+ ACTION["SYNCED_BLOCK_GET_SOURCE_INFO"] = "syncedBlockGetSourceInfo";
122
130
  ACTION["SYNCHRONY_DISCONNECTED"] = "synchronyDisconnected";
123
131
  ACTION["SYNCHRONY_ENTITY_ERROR"] = "synchronyEntityError";
124
132
  ACTION["SYNCHRONY_ERROR"] = "synchronyError";
@@ -371,6 +379,7 @@ var ACTION_SUBJECT_ID = exports.ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTIO
371
379
  ACTION_SUBJECT_ID["ALT_TEXT"] = "altText";
372
380
  ACTION_SUBJECT_ID["ANNOTATE_BUTTON"] = "annotateButton";
373
381
  ACTION_SUBJECT_ID["AVATAR_GROUP_PLUGIN"] = "AvatarGroupInPlugin";
382
+ ACTION_SUBJECT_ID["BLOCK_MENU"] = "blockMenu";
374
383
  ACTION_SUBJECT_ID["BLOCK_QUOTE"] = "blockQuote";
375
384
  ACTION_SUBJECT_ID["BORDER"] = "border";
376
385
  ACTION_SUBJECT_ID["BUTTON_CATEGORY"] = "categoryButton";
@@ -485,10 +494,12 @@ var ACTION_SUBJECT_ID = exports.ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTIO
485
494
  ACTION_SUBJECT_ID["PLACEHOLDER_TEXT"] = "placeholderText";
486
495
  ACTION_SUBJECT_ID["POST_QUERY_SEARCH_RESULTS"] = "postQuerySearchResults";
487
496
  ACTION_SUBJECT_ID["PRE_QUERY_SEARCH_RESULTS"] = "preQuerySearchResults";
497
+ ACTION_SUBJECT_ID["PRIMARY_TOOLBAR"] = "primaryToolbar";
488
498
  ACTION_SUBJECT_ID["PROACTIVE_SUGGESTION"] = "proactiveSuggestion";
489
499
  ACTION_SUBJECT_ID["PRODUCT_NAME"] = "productName";
490
500
  ACTION_SUBJECT_ID["PUNC"] = "punctuation";
491
501
  ACTION_SUBJECT_ID["QUICK_SEARCH"] = "quickSearch";
502
+ ACTION_SUBJECT_ID["QUICK_INSERT"] = "quickInsert";
492
503
  ACTION_SUBJECT_ID["RANGE"] = "range";
493
504
  ACTION_SUBJECT_ID["REACT_NODE_VIEW"] = "reactNodeView";
494
505
  ACTION_SUBJECT_ID["RECENT_ACTIVITIES"] = "recentActivities";
@@ -528,6 +539,7 @@ var ACTION_SUBJECT_ID = exports.ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTIO
528
539
  ACTION_SUBJECT_ID["EDITOR_PLUGIN_SELECTION_EXTENSION_ITEM"] = "editorPluginSelectionExtensionItem";
529
540
  ACTION_SUBJECT_ID["EDITOR_PLUGIN_SELECTION_EXTENSION_COMPONENT"] = "editorPluginSelectionExtensionComponent";
530
541
  ACTION_SUBJECT_ID["TRANSFORM"] = "transform";
542
+ ACTION_SUBJECT_ID["SYNCED_BLOCK_TOOLBAR"] = "syncedBlockToolbar";
531
543
  ACTION_SUBJECT_ID["SYNCED_BLOCK_SOURCE_URL"] = "syncedBlockSourceUrl";
532
544
  ACTION_SUBJECT_ID["SYNCED_BLOCK_UPDATE_CACHE"] = "syncedBlockUpdateCache";
533
545
  ACTION_SUBJECT_ID["SYNCED_BLOCK_UPDATE"] = "syncedBlockUpdate";
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.EXPERIENCE_FAILURE_REASON = exports.EXPERIENCE_ABORT_REASON = exports.DEFAULT_EXPERIENCE_SAMPLE_RATE = void 0;
6
+ exports.EXPERIENCE_ID = exports.EXPERIENCE_FAILURE_REASON = exports.EXPERIENCE_ABORT_REASON = exports.DEFAULT_EXPERIENCE_SAMPLE_RATE = void 0;
7
7
  /**
8
8
  * Built-in failure reasons for experience checks
9
9
  *
@@ -48,4 +48,11 @@ var EXPERIENCE_ABORT_REASON = exports.EXPERIENCE_ABORT_REASON = {
48
48
  * The expectation is that measurements will be gathered after initial
49
49
  * instrumentation, then the sample rate can be tuned up to a safe threshold.
50
50
  */
51
- var DEFAULT_EXPERIENCE_SAMPLE_RATE = exports.DEFAULT_EXPERIENCE_SAMPLE_RATE = 0.001;
51
+ var DEFAULT_EXPERIENCE_SAMPLE_RATE = exports.DEFAULT_EXPERIENCE_SAMPLE_RATE = 0.001;
52
+ var EXPERIENCE_ID = exports.EXPERIENCE_ID = {
53
+ ASYNC_OPERATION: 'asyncOperation',
54
+ MENU_ACTION: 'menuAction',
55
+ MENU_OPEN: 'menu-open',
56
+ TOOLBAR_ACTION: 'toolbarAction',
57
+ TOOLBAR_OPEN: 'toolbar-open'
58
+ };
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.popupWithNestedElement = exports.getPopupContainerFromEditorView = exports.containsPopupWithNestedElement = void 0;
6
+ exports.popupWithNestedElement = exports.getPopupContainerFromEditorView = exports.getNodeQuery = exports.containsPopupWithNestedElement = void 0;
7
7
  /**
8
8
  * Checks if a given node contains a popup with a nested element identified by a specific test ID.
9
9
  *
@@ -56,4 +56,19 @@ var getPopupContainerFromEditorView = exports.getPopupContainerFromEditorView =
56
56
  var editorContentArea = editorViewEl === null || editorViewEl === void 0 ? void 0 : editorViewEl.closest('.ak-editor-content-area');
57
57
  var pluginsComponentsWrapper = editorContentArea === null || editorContentArea === void 0 ? void 0 : editorContentArea.querySelector(':scope > [data-testid="plugins-components-wrapper"]');
58
58
  return pluginsComponentsWrapper || undefined;
59
+ };
60
+
61
+ /**
62
+ * Checks if a node matches or contains the node given by the provided query css selector
63
+ *
64
+ * @param query - CSS selector string
65
+ * @returns true if node matches or contains query or false otherwise
66
+ */
67
+ var getNodeQuery = exports.getNodeQuery = function getNodeQuery(query) {
68
+ return function (node) {
69
+ if (!node || !(node instanceof Element)) {
70
+ return false;
71
+ }
72
+ return node.matches(query) || node.querySelector(query) !== null;
73
+ };
59
74
  };
@@ -15,6 +15,12 @@ Object.defineProperty(exports, "EXPERIENCE_FAILURE_REASON", {
15
15
  return _consts.EXPERIENCE_FAILURE_REASON;
16
16
  }
17
17
  });
18
+ Object.defineProperty(exports, "EXPERIENCE_ID", {
19
+ enumerable: true,
20
+ get: function get() {
21
+ return _consts.EXPERIENCE_ID;
22
+ }
23
+ });
18
24
  Object.defineProperty(exports, "Experience", {
19
25
  enumerable: true,
20
26
  get: function get() {
@@ -45,6 +51,12 @@ Object.defineProperty(exports, "containsPopupWithNestedElement", {
45
51
  return _experienceUtils.containsPopupWithNestedElement;
46
52
  }
47
53
  });
54
+ Object.defineProperty(exports, "getNodeQuery", {
55
+ enumerable: true,
56
+ get: function get() {
57
+ return _experienceUtils.getNodeQuery;
58
+ }
59
+ });
48
60
  Object.defineProperty(exports, "getPopupContainerFromEditorView", {
49
61
  enumerable: true,
50
62
  get: function get() {
@@ -1 +1,15 @@
1
- "use strict";
1
+ "use strict";
2
+
3
+ var _consts = require("./consts");
4
+ /**
5
+ * Allow any additional custom metadata to be attached to experience events.
6
+ */
7
+
8
+ /**
9
+ * Represents the state of an experience throughout its lifecycle.
10
+ */
11
+
12
+ /*
13
+ * ID for the the experience. These are broad experiences used for SLOs for all of editor, not at individual feature level.
14
+ */
15
+ var EXPERIENCE_IDS = Object.values(_consts.EXPERIENCE_ID);
@@ -256,6 +256,7 @@ var Extension = function Extension(props) {
256
256
  // eslint-disable-next-line react/jsx-props-no-spreading
257
257
  }, props));
258
258
  };
259
- var _default = exports.default = (0, _ui.overflowShadow)(Extension, {
259
+ var _default_1 = (0, _ui.overflowShadow)(Extension, {
260
260
  overflowSelector: '.extension-overflow-wrapper'
261
- });
261
+ });
262
+ var _default = exports.default = _default_1;
@@ -327,4 +327,5 @@ var RecentLink = /*#__PURE__*/function (_React$Component) {
327
327
  (0, _defineProperty2.default)(RecentLink, "defaultProps", {
328
328
  limit: DEFAULT_ITEMS_LIMIT
329
329
  });
330
- var _default = exports.default = (0, _withActivityProvider.default)((0, _reactIntlNext.injectIntl)(RecentLink));
330
+ var _default_1 = (0, _withActivityProvider.default)((0, _reactIntlNext.injectIntl)(RecentLink));
331
+ var _default = exports.default = _default_1;
@@ -90,5 +90,25 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
90
90
  id: 'fabric.editor.block.menu.wrap.icon',
91
91
  defaultMessage: 'Wrap',
92
92
  description: 'Aria label for the wrap icon in code block toolbar'
93
+ },
94
+ create: {
95
+ id: 'fabric.editor.block.menu.create',
96
+ defaultMessage: 'Create',
97
+ description: 'Menu section title'
98
+ },
99
+ headings: {
100
+ id: 'fabric.editor.block.menu.headings',
101
+ defaultMessage: 'Headings',
102
+ description: 'Menu section title'
103
+ },
104
+ suggested: {
105
+ id: 'fabric.editor.block.menu.suggested',
106
+ defaultMessage: 'Suggested',
107
+ description: 'Menu section title'
108
+ },
109
+ structure: {
110
+ id: 'fabric.editor.block.menu.structure',
111
+ defaultMessage: 'Structure',
112
+ description: 'Menu section title'
93
113
  }
94
114
  });
@@ -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.6";
22
+ var packageVersion = "111.8.8";
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.6";
27
+ var packageVersion = "111.8.8";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -60,6 +60,7 @@ export let ACTION = /*#__PURE__*/function (ACTION) {
60
60
  ACTION["EXPERIENCE_MEASURED"] = "experienceMeasured";
61
61
  ACTION["EXPERIENCE_SAMPLED"] = "experienceSampled";
62
62
  ACTION["EXPOSED"] = "exposed";
63
+ ACTION["FETCHED"] = "fetched";
63
64
  ACTION["FAILED_TO_UNMOUNT"] = "failedToUnmount";
64
65
  ACTION["FAILED_TO_INSERT"] = "failedToInsert";
65
66
  ACTION["FIND_NEXT_PERFORMED"] = "findNextPerformed";
@@ -102,6 +103,8 @@ export let ACTION = /*#__PURE__*/function (ACTION) {
102
103
  ACTION["PRESSED"] = "pressed";
103
104
  ACTION["PROSEMIRROR_RENDERED"] = "proseMirrorRendered";
104
105
  ACTION["REACT_NODEVIEW_RENDERED"] = "reactNodeViewRendered";
106
+ ACTION["REFERENCE_SYNCED_BLOCK_DELETE"] = "referenceSyncedBlockDelete";
107
+ ACTION["REFERENCE_SYNCED_BLOCK_UPDATE"] = "referenceSyncedBlockUpdate";
105
108
  ACTION["REPLACED_ALL"] = "replacedAll";
106
109
  ACTION["REPLACED_ONE"] = "replacedOne";
107
110
  ACTION["RESOLVED"] = "resolved";
@@ -113,6 +116,11 @@ export let ACTION = /*#__PURE__*/function (ACTION) {
113
116
  ACTION["STOPPED"] = "stopped";
114
117
  ACTION["SUBMITTED"] = "submitted";
115
118
  ACTION["SUBSTITUTED"] = "autoSubstituted";
119
+ ACTION["SYNCED_BLOCK_CREATE"] = "syncedBlockCreate";
120
+ ACTION["SYNCED_BLOCK_UPDATE"] = "syncedBlockUpdate";
121
+ ACTION["SYNCED_BLOCK_FETCH"] = "syncedBlockFetch";
122
+ ACTION["SYNCED_BLOCK_DELETE"] = "syncedBlockDelete";
123
+ ACTION["SYNCED_BLOCK_GET_SOURCE_INFO"] = "syncedBlockGetSourceInfo";
116
124
  ACTION["SYNCHRONY_DISCONNECTED"] = "synchronyDisconnected";
117
125
  ACTION["SYNCHRONY_ENTITY_ERROR"] = "synchronyEntityError";
118
126
  ACTION["SYNCHRONY_ERROR"] = "synchronyError";
@@ -365,6 +373,7 @@ export let ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
365
373
  ACTION_SUBJECT_ID["ALT_TEXT"] = "altText";
366
374
  ACTION_SUBJECT_ID["ANNOTATE_BUTTON"] = "annotateButton";
367
375
  ACTION_SUBJECT_ID["AVATAR_GROUP_PLUGIN"] = "AvatarGroupInPlugin";
376
+ ACTION_SUBJECT_ID["BLOCK_MENU"] = "blockMenu";
368
377
  ACTION_SUBJECT_ID["BLOCK_QUOTE"] = "blockQuote";
369
378
  ACTION_SUBJECT_ID["BORDER"] = "border";
370
379
  ACTION_SUBJECT_ID["BUTTON_CATEGORY"] = "categoryButton";
@@ -479,10 +488,12 @@ export let ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
479
488
  ACTION_SUBJECT_ID["PLACEHOLDER_TEXT"] = "placeholderText";
480
489
  ACTION_SUBJECT_ID["POST_QUERY_SEARCH_RESULTS"] = "postQuerySearchResults";
481
490
  ACTION_SUBJECT_ID["PRE_QUERY_SEARCH_RESULTS"] = "preQuerySearchResults";
491
+ ACTION_SUBJECT_ID["PRIMARY_TOOLBAR"] = "primaryToolbar";
482
492
  ACTION_SUBJECT_ID["PROACTIVE_SUGGESTION"] = "proactiveSuggestion";
483
493
  ACTION_SUBJECT_ID["PRODUCT_NAME"] = "productName";
484
494
  ACTION_SUBJECT_ID["PUNC"] = "punctuation";
485
495
  ACTION_SUBJECT_ID["QUICK_SEARCH"] = "quickSearch";
496
+ ACTION_SUBJECT_ID["QUICK_INSERT"] = "quickInsert";
486
497
  ACTION_SUBJECT_ID["RANGE"] = "range";
487
498
  ACTION_SUBJECT_ID["REACT_NODE_VIEW"] = "reactNodeView";
488
499
  ACTION_SUBJECT_ID["RECENT_ACTIVITIES"] = "recentActivities";
@@ -522,6 +533,7 @@ export let ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
522
533
  ACTION_SUBJECT_ID["EDITOR_PLUGIN_SELECTION_EXTENSION_ITEM"] = "editorPluginSelectionExtensionItem";
523
534
  ACTION_SUBJECT_ID["EDITOR_PLUGIN_SELECTION_EXTENSION_COMPONENT"] = "editorPluginSelectionExtensionComponent";
524
535
  ACTION_SUBJECT_ID["TRANSFORM"] = "transform";
536
+ ACTION_SUBJECT_ID["SYNCED_BLOCK_TOOLBAR"] = "syncedBlockToolbar";
525
537
  ACTION_SUBJECT_ID["SYNCED_BLOCK_SOURCE_URL"] = "syncedBlockSourceUrl";
526
538
  ACTION_SUBJECT_ID["SYNCED_BLOCK_UPDATE_CACHE"] = "syncedBlockUpdateCache";
527
539
  ACTION_SUBJECT_ID["SYNCED_BLOCK_UPDATE"] = "syncedBlockUpdate";
@@ -42,4 +42,11 @@ export const EXPERIENCE_ABORT_REASON = {
42
42
  * The expectation is that measurements will be gathered after initial
43
43
  * instrumentation, then the sample rate can be tuned up to a safe threshold.
44
44
  */
45
- export const DEFAULT_EXPERIENCE_SAMPLE_RATE = 0.001;
45
+ export const DEFAULT_EXPERIENCE_SAMPLE_RATE = 0.001;
46
+ export const EXPERIENCE_ID = {
47
+ ASYNC_OPERATION: 'asyncOperation',
48
+ MENU_ACTION: 'menuAction',
49
+ MENU_OPEN: 'menu-open',
50
+ TOOLBAR_ACTION: 'toolbarAction',
51
+ TOOLBAR_OPEN: 'toolbar-open'
52
+ };
@@ -50,4 +50,17 @@ export const getPopupContainerFromEditorView = editorViewEl => {
50
50
  const editorContentArea = editorViewEl === null || editorViewEl === void 0 ? void 0 : editorViewEl.closest('.ak-editor-content-area');
51
51
  const pluginsComponentsWrapper = editorContentArea === null || editorContentArea === void 0 ? void 0 : editorContentArea.querySelector(':scope > [data-testid="plugins-components-wrapper"]');
52
52
  return pluginsComponentsWrapper || undefined;
53
+ };
54
+
55
+ /**
56
+ * Checks if a node matches or contains the node given by the provided query css selector
57
+ *
58
+ * @param query - CSS selector string
59
+ * @returns true if node matches or contains query or false otherwise
60
+ */
61
+ export const getNodeQuery = query => node => {
62
+ if (!node || !(node instanceof Element)) {
63
+ return false;
64
+ }
65
+ return node.matches(query) || node.querySelector(query) !== null;
53
66
  };
@@ -2,8 +2,8 @@
2
2
  /* eslint-disable @atlaskit/editor/no-re-export */
3
3
 
4
4
  export { Experience } from './Experience';
5
- export { EXPERIENCE_ABORT_REASON, EXPERIENCE_FAILURE_REASON } from './consts';
5
+ export { EXPERIENCE_ABORT_REASON, EXPERIENCE_FAILURE_REASON, EXPERIENCE_ID } from './consts';
6
6
  export { ExperienceCheckComposite } from './ExperienceCheckComposite';
7
7
  export { ExperienceCheckDomMutation } from './ExperienceCheckDomMutation';
8
8
  export { ExperienceCheckTimeout } from './ExperienceCheckTimeout';
9
- export { containsPopupWithNestedElement, popupWithNestedElement, getPopupContainerFromEditorView } from './experience-utils';
9
+ export { containsPopupWithNestedElement, popupWithNestedElement, getPopupContainerFromEditorView, getNodeQuery } from './experience-utils';
@@ -0,0 +1,14 @@
1
+ import { EXPERIENCE_ID } from "./consts";
2
+
3
+ /**
4
+ * Allow any additional custom metadata to be attached to experience events.
5
+ */
6
+
7
+ /**
8
+ * Represents the state of an experience throughout its lifecycle.
9
+ */
10
+
11
+ /*
12
+ * ID for the the experience. These are broad experiences used for SLOs for all of editor, not at individual feature level.
13
+ */
14
+ const EXPERIENCE_IDS = Object.values(EXPERIENCE_ID);
@@ -251,6 +251,7 @@ const Extension = props => {
251
251
  // eslint-disable-next-line react/jsx-props-no-spreading
252
252
  }, props));
253
253
  };
254
- export default overflowShadow(Extension, {
254
+ const _default_1 = overflowShadow(Extension, {
255
255
  overflowSelector: '.extension-overflow-wrapper'
256
- });
256
+ });
257
+ export default _default_1;
@@ -220,4 +220,5 @@ class RecentLink extends React.Component {
220
220
  _defineProperty(RecentLink, "defaultProps", {
221
221
  limit: DEFAULT_ITEMS_LIMIT
222
222
  });
223
- export default withActivityProvider(injectIntl(RecentLink));
223
+ const _default_1 = withActivityProvider(injectIntl(RecentLink));
224
+ export default _default_1;
@@ -84,5 +84,25 @@ export const messages = defineMessages({
84
84
  id: 'fabric.editor.block.menu.wrap.icon',
85
85
  defaultMessage: 'Wrap',
86
86
  description: 'Aria label for the wrap icon in code block toolbar'
87
+ },
88
+ create: {
89
+ id: 'fabric.editor.block.menu.create',
90
+ defaultMessage: 'Create',
91
+ description: 'Menu section title'
92
+ },
93
+ headings: {
94
+ id: 'fabric.editor.block.menu.headings',
95
+ defaultMessage: 'Headings',
96
+ description: 'Menu section title'
97
+ },
98
+ suggested: {
99
+ id: 'fabric.editor.block.menu.suggested',
100
+ defaultMessage: 'Suggested',
101
+ description: 'Menu section title'
102
+ },
103
+ structure: {
104
+ id: 'fabric.editor.block.menu.structure',
105
+ defaultMessage: 'Structure',
106
+ description: 'Menu section title'
87
107
  }
88
108
  });
@@ -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.6";
7
+ const packageVersion = "111.8.8";
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.6";
17
+ const packageVersion = "111.8.8";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -60,6 +60,7 @@ export var ACTION = /*#__PURE__*/function (ACTION) {
60
60
  ACTION["EXPERIENCE_MEASURED"] = "experienceMeasured";
61
61
  ACTION["EXPERIENCE_SAMPLED"] = "experienceSampled";
62
62
  ACTION["EXPOSED"] = "exposed";
63
+ ACTION["FETCHED"] = "fetched";
63
64
  ACTION["FAILED_TO_UNMOUNT"] = "failedToUnmount";
64
65
  ACTION["FAILED_TO_INSERT"] = "failedToInsert";
65
66
  ACTION["FIND_NEXT_PERFORMED"] = "findNextPerformed";
@@ -102,6 +103,8 @@ export var ACTION = /*#__PURE__*/function (ACTION) {
102
103
  ACTION["PRESSED"] = "pressed";
103
104
  ACTION["PROSEMIRROR_RENDERED"] = "proseMirrorRendered";
104
105
  ACTION["REACT_NODEVIEW_RENDERED"] = "reactNodeViewRendered";
106
+ ACTION["REFERENCE_SYNCED_BLOCK_DELETE"] = "referenceSyncedBlockDelete";
107
+ ACTION["REFERENCE_SYNCED_BLOCK_UPDATE"] = "referenceSyncedBlockUpdate";
105
108
  ACTION["REPLACED_ALL"] = "replacedAll";
106
109
  ACTION["REPLACED_ONE"] = "replacedOne";
107
110
  ACTION["RESOLVED"] = "resolved";
@@ -113,6 +116,11 @@ export var ACTION = /*#__PURE__*/function (ACTION) {
113
116
  ACTION["STOPPED"] = "stopped";
114
117
  ACTION["SUBMITTED"] = "submitted";
115
118
  ACTION["SUBSTITUTED"] = "autoSubstituted";
119
+ ACTION["SYNCED_BLOCK_CREATE"] = "syncedBlockCreate";
120
+ ACTION["SYNCED_BLOCK_UPDATE"] = "syncedBlockUpdate";
121
+ ACTION["SYNCED_BLOCK_FETCH"] = "syncedBlockFetch";
122
+ ACTION["SYNCED_BLOCK_DELETE"] = "syncedBlockDelete";
123
+ ACTION["SYNCED_BLOCK_GET_SOURCE_INFO"] = "syncedBlockGetSourceInfo";
116
124
  ACTION["SYNCHRONY_DISCONNECTED"] = "synchronyDisconnected";
117
125
  ACTION["SYNCHRONY_ENTITY_ERROR"] = "synchronyEntityError";
118
126
  ACTION["SYNCHRONY_ERROR"] = "synchronyError";
@@ -365,6 +373,7 @@ export var ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
365
373
  ACTION_SUBJECT_ID["ALT_TEXT"] = "altText";
366
374
  ACTION_SUBJECT_ID["ANNOTATE_BUTTON"] = "annotateButton";
367
375
  ACTION_SUBJECT_ID["AVATAR_GROUP_PLUGIN"] = "AvatarGroupInPlugin";
376
+ ACTION_SUBJECT_ID["BLOCK_MENU"] = "blockMenu";
368
377
  ACTION_SUBJECT_ID["BLOCK_QUOTE"] = "blockQuote";
369
378
  ACTION_SUBJECT_ID["BORDER"] = "border";
370
379
  ACTION_SUBJECT_ID["BUTTON_CATEGORY"] = "categoryButton";
@@ -479,10 +488,12 @@ export var ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
479
488
  ACTION_SUBJECT_ID["PLACEHOLDER_TEXT"] = "placeholderText";
480
489
  ACTION_SUBJECT_ID["POST_QUERY_SEARCH_RESULTS"] = "postQuerySearchResults";
481
490
  ACTION_SUBJECT_ID["PRE_QUERY_SEARCH_RESULTS"] = "preQuerySearchResults";
491
+ ACTION_SUBJECT_ID["PRIMARY_TOOLBAR"] = "primaryToolbar";
482
492
  ACTION_SUBJECT_ID["PROACTIVE_SUGGESTION"] = "proactiveSuggestion";
483
493
  ACTION_SUBJECT_ID["PRODUCT_NAME"] = "productName";
484
494
  ACTION_SUBJECT_ID["PUNC"] = "punctuation";
485
495
  ACTION_SUBJECT_ID["QUICK_SEARCH"] = "quickSearch";
496
+ ACTION_SUBJECT_ID["QUICK_INSERT"] = "quickInsert";
486
497
  ACTION_SUBJECT_ID["RANGE"] = "range";
487
498
  ACTION_SUBJECT_ID["REACT_NODE_VIEW"] = "reactNodeView";
488
499
  ACTION_SUBJECT_ID["RECENT_ACTIVITIES"] = "recentActivities";
@@ -522,6 +533,7 @@ export var ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
522
533
  ACTION_SUBJECT_ID["EDITOR_PLUGIN_SELECTION_EXTENSION_ITEM"] = "editorPluginSelectionExtensionItem";
523
534
  ACTION_SUBJECT_ID["EDITOR_PLUGIN_SELECTION_EXTENSION_COMPONENT"] = "editorPluginSelectionExtensionComponent";
524
535
  ACTION_SUBJECT_ID["TRANSFORM"] = "transform";
536
+ ACTION_SUBJECT_ID["SYNCED_BLOCK_TOOLBAR"] = "syncedBlockToolbar";
525
537
  ACTION_SUBJECT_ID["SYNCED_BLOCK_SOURCE_URL"] = "syncedBlockSourceUrl";
526
538
  ACTION_SUBJECT_ID["SYNCED_BLOCK_UPDATE_CACHE"] = "syncedBlockUpdateCache";
527
539
  ACTION_SUBJECT_ID["SYNCED_BLOCK_UPDATE"] = "syncedBlockUpdate";
@@ -42,4 +42,11 @@ export var EXPERIENCE_ABORT_REASON = {
42
42
  * The expectation is that measurements will be gathered after initial
43
43
  * instrumentation, then the sample rate can be tuned up to a safe threshold.
44
44
  */
45
- export var DEFAULT_EXPERIENCE_SAMPLE_RATE = 0.001;
45
+ export var DEFAULT_EXPERIENCE_SAMPLE_RATE = 0.001;
46
+ export var EXPERIENCE_ID = {
47
+ ASYNC_OPERATION: 'asyncOperation',
48
+ MENU_ACTION: 'menuAction',
49
+ MENU_OPEN: 'menu-open',
50
+ TOOLBAR_ACTION: 'toolbarAction',
51
+ TOOLBAR_OPEN: 'toolbar-open'
52
+ };
@@ -50,4 +50,19 @@ export var getPopupContainerFromEditorView = function getPopupContainerFromEdito
50
50
  var editorContentArea = editorViewEl === null || editorViewEl === void 0 ? void 0 : editorViewEl.closest('.ak-editor-content-area');
51
51
  var pluginsComponentsWrapper = editorContentArea === null || editorContentArea === void 0 ? void 0 : editorContentArea.querySelector(':scope > [data-testid="plugins-components-wrapper"]');
52
52
  return pluginsComponentsWrapper || undefined;
53
+ };
54
+
55
+ /**
56
+ * Checks if a node matches or contains the node given by the provided query css selector
57
+ *
58
+ * @param query - CSS selector string
59
+ * @returns true if node matches or contains query or false otherwise
60
+ */
61
+ export var getNodeQuery = function getNodeQuery(query) {
62
+ return function (node) {
63
+ if (!node || !(node instanceof Element)) {
64
+ return false;
65
+ }
66
+ return node.matches(query) || node.querySelector(query) !== null;
67
+ };
53
68
  };
@@ -2,8 +2,8 @@
2
2
  /* eslint-disable @atlaskit/editor/no-re-export */
3
3
 
4
4
  export { Experience } from './Experience';
5
- export { EXPERIENCE_ABORT_REASON, EXPERIENCE_FAILURE_REASON } from './consts';
5
+ export { EXPERIENCE_ABORT_REASON, EXPERIENCE_FAILURE_REASON, EXPERIENCE_ID } from './consts';
6
6
  export { ExperienceCheckComposite } from './ExperienceCheckComposite';
7
7
  export { ExperienceCheckDomMutation } from './ExperienceCheckDomMutation';
8
8
  export { ExperienceCheckTimeout } from './ExperienceCheckTimeout';
9
- export { containsPopupWithNestedElement, popupWithNestedElement, getPopupContainerFromEditorView } from './experience-utils';
9
+ export { containsPopupWithNestedElement, popupWithNestedElement, getPopupContainerFromEditorView, getNodeQuery } from './experience-utils';
@@ -0,0 +1,14 @@
1
+ import { EXPERIENCE_ID } from "./consts";
2
+
3
+ /**
4
+ * Allow any additional custom metadata to be attached to experience events.
5
+ */
6
+
7
+ /**
8
+ * Represents the state of an experience throughout its lifecycle.
9
+ */
10
+
11
+ /*
12
+ * ID for the the experience. These are broad experiences used for SLOs for all of editor, not at individual feature level.
13
+ */
14
+ var EXPERIENCE_IDS = Object.values(EXPERIENCE_ID);
@@ -249,6 +249,7 @@ var Extension = function Extension(props) {
249
249
  // eslint-disable-next-line react/jsx-props-no-spreading
250
250
  }, props));
251
251
  };
252
- export default overflowShadow(Extension, {
252
+ var _default_1 = overflowShadow(Extension, {
253
253
  overflowSelector: '.extension-overflow-wrapper'
254
- });
254
+ });
255
+ export default _default_1;
@@ -320,4 +320,5 @@ var RecentLink = /*#__PURE__*/function (_React$Component) {
320
320
  _defineProperty(RecentLink, "defaultProps", {
321
321
  limit: DEFAULT_ITEMS_LIMIT
322
322
  });
323
- export default withActivityProvider(injectIntl(RecentLink));
323
+ var _default_1 = withActivityProvider(injectIntl(RecentLink));
324
+ export default _default_1;
@@ -84,5 +84,25 @@ export var messages = defineMessages({
84
84
  id: 'fabric.editor.block.menu.wrap.icon',
85
85
  defaultMessage: 'Wrap',
86
86
  description: 'Aria label for the wrap icon in code block toolbar'
87
+ },
88
+ create: {
89
+ id: 'fabric.editor.block.menu.create',
90
+ defaultMessage: 'Create',
91
+ description: 'Menu section title'
92
+ },
93
+ headings: {
94
+ id: 'fabric.editor.block.menu.headings',
95
+ defaultMessage: 'Headings',
96
+ description: 'Menu section title'
97
+ },
98
+ suggested: {
99
+ id: 'fabric.editor.block.menu.suggested',
100
+ defaultMessage: 'Suggested',
101
+ description: 'Menu section title'
102
+ },
103
+ structure: {
104
+ id: 'fabric.editor.block.menu.structure',
105
+ defaultMessage: 'Structure',
106
+ description: 'Menu section title'
87
107
  }
88
108
  });
@@ -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.6";
13
+ var packageVersion = "111.8.8";
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.6";
24
+ var packageVersion = "111.8.8";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({