@atlaskit/editor-core 188.10.5 → 188.10.7

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 (89) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/cjs/labs/next/presets/universal.js +2 -1
  3. package/dist/cjs/plugins/index.js +0 -7
  4. package/dist/cjs/version-wrapper.js +1 -1
  5. package/dist/es2019/labs/next/presets/universal.js +2 -1
  6. package/dist/es2019/plugins/index.js +0 -1
  7. package/dist/es2019/version-wrapper.js +1 -1
  8. package/dist/esm/labs/next/presets/universal.js +2 -1
  9. package/dist/esm/plugins/index.js +0 -1
  10. package/dist/esm/version-wrapper.js +1 -1
  11. package/dist/types/plugins/index.d.ts +0 -1
  12. package/dist/types/plugins/insert-block/types.d.ts +2 -4
  13. package/dist/types/types/editor-props.d.ts +1 -1
  14. package/dist/types-ts4.5/plugins/index.d.ts +0 -1
  15. package/dist/types-ts4.5/plugins/insert-block/types.d.ts +2 -4
  16. package/dist/types-ts4.5/types/editor-props.d.ts +1 -1
  17. package/package.json +2 -2
  18. package/report.api.md +1 -9
  19. package/tmp/api-report-tmp.d.ts +1 -9
  20. package/dist/cjs/plugins/mentions/analytics.js +0 -157
  21. package/dist/cjs/plugins/mentions/index.js +0 -142
  22. package/dist/cjs/plugins/mentions/messages.js +0 -29
  23. package/dist/cjs/plugins/mentions/nodeviews/mention.js +0 -117
  24. package/dist/cjs/plugins/mentions/pm-plugins/key.js +0 -8
  25. package/dist/cjs/plugins/mentions/pm-plugins/main.js +0 -156
  26. package/dist/cjs/plugins/mentions/pm-plugins/utils.js +0 -23
  27. package/dist/cjs/plugins/mentions/type-ahead/index.js +0 -362
  28. package/dist/cjs/plugins/mentions/types.js +0 -5
  29. package/dist/cjs/plugins/mentions/ui/InviteItem/index.js +0 -76
  30. package/dist/cjs/plugins/mentions/ui/InviteItem/styles.js +0 -19
  31. package/dist/cjs/plugins/mentions/ui/Mention/index.js +0 -98
  32. package/dist/cjs/plugins/mentions/ui/ToolbarMention/index.js +0 -63
  33. package/dist/cjs/plugins/mentions/utils.js +0 -32
  34. package/dist/es2019/plugins/mentions/analytics.js +0 -147
  35. package/dist/es2019/plugins/mentions/index.js +0 -124
  36. package/dist/es2019/plugins/mentions/messages.js +0 -23
  37. package/dist/es2019/plugins/mentions/nodeviews/mention.js +0 -80
  38. package/dist/es2019/plugins/mentions/pm-plugins/key.js +0 -2
  39. package/dist/es2019/plugins/mentions/pm-plugins/main.js +0 -143
  40. package/dist/es2019/plugins/mentions/pm-plugins/utils.js +0 -14
  41. package/dist/es2019/plugins/mentions/type-ahead/index.js +0 -338
  42. package/dist/es2019/plugins/mentions/types.js +0 -1
  43. package/dist/es2019/plugins/mentions/ui/InviteItem/index.js +0 -66
  44. package/dist/es2019/plugins/mentions/ui/InviteItem/styles.js +0 -47
  45. package/dist/es2019/plugins/mentions/ui/Mention/index.js +0 -71
  46. package/dist/es2019/plugins/mentions/ui/ToolbarMention/index.js +0 -33
  47. package/dist/es2019/plugins/mentions/utils.js +0 -20
  48. package/dist/esm/plugins/mentions/analytics.js +0 -150
  49. package/dist/esm/plugins/mentions/index.js +0 -130
  50. package/dist/esm/plugins/mentions/messages.js +0 -23
  51. package/dist/esm/plugins/mentions/nodeviews/mention.js +0 -107
  52. package/dist/esm/plugins/mentions/pm-plugins/key.js +0 -2
  53. package/dist/esm/plugins/mentions/pm-plugins/main.js +0 -148
  54. package/dist/esm/plugins/mentions/pm-plugins/utils.js +0 -16
  55. package/dist/esm/plugins/mentions/type-ahead/index.js +0 -350
  56. package/dist/esm/plugins/mentions/types.js +0 -1
  57. package/dist/esm/plugins/mentions/ui/InviteItem/index.js +0 -65
  58. package/dist/esm/plugins/mentions/ui/InviteItem/styles.js +0 -12
  59. package/dist/esm/plugins/mentions/ui/Mention/index.js +0 -91
  60. package/dist/esm/plugins/mentions/ui/ToolbarMention/index.js +0 -53
  61. package/dist/esm/plugins/mentions/utils.js +0 -26
  62. package/dist/types/plugins/mentions/analytics.d.ts +0 -13
  63. package/dist/types/plugins/mentions/index.d.ts +0 -19
  64. package/dist/types/plugins/mentions/messages.d.ts +0 -22
  65. package/dist/types/plugins/mentions/nodeviews/mention.d.ts +0 -9
  66. package/dist/types/plugins/mentions/pm-plugins/key.d.ts +0 -3
  67. package/dist/types/plugins/mentions/pm-plugins/main.d.ts +0 -6
  68. package/dist/types/plugins/mentions/pm-plugins/utils.d.ts +0 -4
  69. package/dist/types/plugins/mentions/type-ahead/index.d.ts +0 -17
  70. package/dist/types/plugins/mentions/types.d.ts +0 -24
  71. package/dist/types/plugins/mentions/ui/InviteItem/index.d.ts +0 -22
  72. package/dist/types/plugins/mentions/ui/InviteItem/styles.d.ts +0 -8
  73. package/dist/types/plugins/mentions/ui/Mention/index.d.ts +0 -19
  74. package/dist/types/plugins/mentions/ui/ToolbarMention/index.d.ts +0 -13
  75. package/dist/types/plugins/mentions/utils.d.ts +0 -8
  76. package/dist/types-ts4.5/plugins/mentions/analytics.d.ts +0 -13
  77. package/dist/types-ts4.5/plugins/mentions/index.d.ts +0 -22
  78. package/dist/types-ts4.5/plugins/mentions/messages.d.ts +0 -22
  79. package/dist/types-ts4.5/plugins/mentions/nodeviews/mention.d.ts +0 -9
  80. package/dist/types-ts4.5/plugins/mentions/pm-plugins/key.d.ts +0 -3
  81. package/dist/types-ts4.5/plugins/mentions/pm-plugins/main.d.ts +0 -6
  82. package/dist/types-ts4.5/plugins/mentions/pm-plugins/utils.d.ts +0 -4
  83. package/dist/types-ts4.5/plugins/mentions/type-ahead/index.d.ts +0 -17
  84. package/dist/types-ts4.5/plugins/mentions/types.d.ts +0 -24
  85. package/dist/types-ts4.5/plugins/mentions/ui/InviteItem/index.d.ts +0 -22
  86. package/dist/types-ts4.5/plugins/mentions/ui/InviteItem/styles.d.ts +0 -8
  87. package/dist/types-ts4.5/plugins/mentions/ui/Mention/index.d.ts +0 -19
  88. package/dist/types-ts4.5/plugins/mentions/ui/ToolbarMention/index.d.ts +0 -13
  89. package/dist/types-ts4.5/plugins/mentions/utils.d.ts +0 -8
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 188.10.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [#41648](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41648) [`20f43769aa7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/20f43769aa7) - [ED-19746] Extract mentions plugin from editor-core to its own package: @atlaskit/editor-plugin-mentions
8
+ - Updated dependencies
9
+
3
10
  ## 188.10.5
4
11
 
5
12
  ### Patch Changes
@@ -27,6 +27,7 @@ var _editorPluginContentInsertion = require("@atlaskit/editor-plugin-content-ins
27
27
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
28
28
  var _editorPluginSaveOnEnter = require("@atlaskit/editor-plugin-save-on-enter");
29
29
  var _editorPluginScrollIntoView = require("@atlaskit/editor-plugin-scroll-into-view");
30
+ var _editorPluginMentions = require("@atlaskit/editor-plugin-mentions");
30
31
  var _isFullPage = require("../../../utils/is-full-page");
31
32
  var _mediaCommon = require("@atlaskit/media-common");
32
33
  var _default = require("./default");
@@ -139,7 +140,7 @@ function createUniversalPreset(appearance, props, featureFlags, prevAppearance,
139
140
  return builder.add(plugin);
140
141
  }
141
142
  return builder;
142
- }).maybeAdd(_plugins.mentionsPlugin, function (plugin, builder) {
143
+ }).maybeAdd(_editorPluginMentions.mentionsPlugin, function (plugin, builder) {
143
144
  if (props.mentionProvider) {
144
145
  var _props$mention$insert, _props$mention, _props$mention2;
145
146
  return builder.add([plugin, {
@@ -173,12 +173,6 @@ Object.defineProperty(exports, "maxContentSizePlugin", {
173
173
  return _maxContentSize.default;
174
174
  }
175
175
  });
176
- Object.defineProperty(exports, "mentionsPlugin", {
177
- enumerable: true,
178
- get: function get() {
179
- return _mentions.default;
180
- }
181
- });
182
176
  Object.defineProperty(exports, "mobileDimensionsPlugin", {
183
177
  enumerable: true,
184
178
  get: function get() {
@@ -258,7 +252,6 @@ var _layout = _interopRequireDefault(require("./layout"));
258
252
  var _toolbarListsIndentation = _interopRequireDefault(require("./toolbar-lists-indentation"));
259
253
  var _macro = _interopRequireDefault(require("./macro"));
260
254
  var _maxContentSize = _interopRequireDefault(require("./max-content-size"));
261
- var _mentions = _interopRequireDefault(require("./mentions"));
262
255
  var _panel = _interopRequireDefault(require("./panel"));
263
256
  var _paste = _interopRequireDefault(require("./paste"));
264
257
  var _placeholderText = _interopRequireDefault(require("./placeholder-text"));
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.nextMajorVersion = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "188.10.5";
8
+ var version = exports.version = "188.10.7";
9
9
  var nextMajorVersion = exports.nextMajorVersion = function nextMajorVersion() {
10
10
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
11
11
  };
@@ -1,4 +1,4 @@
1
- import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, fragmentMarkPlugin, insertBlockPlugin, jiraIssuePlugin, layoutPlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, mentionsPlugin, panelPlugin, placeholderTextPlugin, tasksAndDecisionsPlugin, textColorPlugin, alignmentPlugin, indentationPlugin, customAutoformatPlugin, feedbackDialogPlugin, historyPlugin, expandPlugin, isExpandInsertionEnabled, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin } from '../../../plugins';
1
+ import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, fragmentMarkPlugin, insertBlockPlugin, jiraIssuePlugin, layoutPlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, panelPlugin, placeholderTextPlugin, tasksAndDecisionsPlugin, textColorPlugin, alignmentPlugin, indentationPlugin, customAutoformatPlugin, feedbackDialogPlugin, historyPlugin, expandPlugin, isExpandInsertionEnabled, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin } from '../../../plugins';
2
2
  import { statusPlugin } from '@atlaskit/editor-plugin-status';
3
3
  import { datePlugin } from '../../../plugins/date';
4
4
  import { captionPlugin } from '@atlaskit/editor-plugin-caption';
@@ -18,6 +18,7 @@ import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertio
18
18
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
19
19
  import { saveOnEnterPlugin } from '@atlaskit/editor-plugin-save-on-enter';
20
20
  import { scrollIntoViewPlugin } from '@atlaskit/editor-plugin-scroll-into-view';
21
+ import { mentionsPlugin } from '@atlaskit/editor-plugin-mentions';
21
22
  import { isFullPage as fullPageCheck } from '../../../utils/is-full-page';
22
23
  import { getMediaFeatureFlag } from '@atlaskit/media-common';
23
24
  import { createDefaultPreset } from './default';
@@ -11,7 +11,6 @@ export { default as layoutPlugin } from './layout';
11
11
  export { default as toolbarListsIndentationPlugin } from './toolbar-lists-indentation';
12
12
  export { default as macroPlugin } from './macro';
13
13
  export { default as maxContentSizePlugin } from './max-content-size';
14
- export { default as mentionsPlugin } from './mentions';
15
14
  export { default as panelPlugin } from './panel';
16
15
  export { default as pastePlugin } from './paste';
17
16
  export { default as placeholderTextPlugin } from './placeholder-text';
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "188.10.5";
2
+ export const version = "188.10.7";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -2,7 +2,7 @@ import _typeof from "@babel/runtime/helpers/typeof";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
4
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
- import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, fragmentMarkPlugin, insertBlockPlugin, jiraIssuePlugin, layoutPlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, mentionsPlugin, panelPlugin, placeholderTextPlugin, tasksAndDecisionsPlugin, textColorPlugin, alignmentPlugin, indentationPlugin, customAutoformatPlugin, feedbackDialogPlugin, historyPlugin, expandPlugin, isExpandInsertionEnabled, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin } from '../../../plugins';
5
+ import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, fragmentMarkPlugin, insertBlockPlugin, jiraIssuePlugin, layoutPlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, panelPlugin, placeholderTextPlugin, tasksAndDecisionsPlugin, textColorPlugin, alignmentPlugin, indentationPlugin, customAutoformatPlugin, feedbackDialogPlugin, historyPlugin, expandPlugin, isExpandInsertionEnabled, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin } from '../../../plugins';
6
6
  import { statusPlugin } from '@atlaskit/editor-plugin-status';
7
7
  import { datePlugin } from '../../../plugins/date';
8
8
  import { captionPlugin } from '@atlaskit/editor-plugin-caption';
@@ -22,6 +22,7 @@ import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertio
22
22
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
23
23
  import { saveOnEnterPlugin } from '@atlaskit/editor-plugin-save-on-enter';
24
24
  import { scrollIntoViewPlugin } from '@atlaskit/editor-plugin-scroll-into-view';
25
+ import { mentionsPlugin } from '@atlaskit/editor-plugin-mentions';
25
26
  import { isFullPage as fullPageCheck } from '../../../utils/is-full-page';
26
27
  import { getMediaFeatureFlag } from '@atlaskit/media-common';
27
28
  import { createDefaultPreset } from './default';
@@ -11,7 +11,6 @@ export { default as layoutPlugin } from './layout';
11
11
  export { default as toolbarListsIndentationPlugin } from './toolbar-lists-indentation';
12
12
  export { default as macroPlugin } from './macro';
13
13
  export { default as maxContentSizePlugin } from './max-content-size';
14
- export { default as mentionsPlugin } from './mentions';
15
14
  export { default as panelPlugin } from './panel';
16
15
  export { default as pastePlugin } from './paste';
17
16
  export { default as placeholderTextPlugin } from './placeholder-text';
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "188.10.5";
2
+ export var version = "188.10.7";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -11,7 +11,6 @@ export { default as layoutPlugin } from './layout';
11
11
  export { default as toolbarListsIndentationPlugin } from './toolbar-lists-indentation';
12
12
  export { default as macroPlugin } from './macro';
13
13
  export { default as maxContentSizePlugin } from './max-content-size';
14
- export { default as mentionsPlugin } from './mentions';
15
14
  export { default as panelPlugin } from './panel';
16
15
  export { default as pastePlugin } from './paste';
17
16
  export { default as placeholderTextPlugin } from './placeholder-text';
@@ -6,7 +6,6 @@ import type { tablesPlugin } from '@atlaskit/editor-plugin-table';
6
6
  import type { hyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
7
7
  import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
8
8
  import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
9
- import type mentionsPlugin from '../mentions';
10
9
  import type { QuickInsertPlugin } from '@atlaskit/editor-plugin-quick-insert';
11
10
  import type { BlockTypePlugin } from '@atlaskit/editor-plugin-block-type';
12
11
  import type codeBlockPlugin from '../code-block';
@@ -14,7 +13,7 @@ import type panelPlugin from '../panel';
14
13
  import type { RulePlugin } from '@atlaskit/editor-plugin-rule';
15
14
  import type { MediaPlugin } from '@atlaskit/editor-plugin-media';
16
15
  import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
17
- import type { MentionPlugin } from '../mentions';
16
+ import type { MentionsPlugin } from '@atlaskit/editor-plugin-mentions';
18
17
  import type { StatusPlugin } from '@atlaskit/editor-plugin-status';
19
18
  export type InsertBlockPluginDependencies = [
20
19
  FeatureFlagsPlugin,
@@ -25,13 +24,12 @@ export type InsertBlockPluginDependencies = [
25
24
  OptionalPlugin<BlockTypePlugin>,
26
25
  OptionalPlugin<typeof analyticsPlugin>,
27
26
  OptionalPlugin<ImageUploadPlugin>,
28
- OptionalPlugin<typeof mentionsPlugin>,
29
27
  OptionalPlugin<EmojiPlugin>,
30
28
  OptionalPlugin<QuickInsertPlugin>,
31
29
  OptionalPlugin<RulePlugin>,
32
30
  OptionalPlugin<typeof codeBlockPlugin>,
33
31
  OptionalPlugin<typeof panelPlugin>,
34
32
  OptionalPlugin<MediaPlugin>,
35
- OptionalPlugin<MentionPlugin>,
33
+ OptionalPlugin<MentionsPlugin>,
36
34
  OptionalPlugin<StatusPlugin>
37
35
  ];
@@ -20,7 +20,7 @@ import type { DatePluginConfig } from '@atlaskit/editor-plugin-date';
20
20
  import type { FindReplaceOptions } from '../plugins/find-replace/types';
21
21
  import type { LayoutPluginOptions } from '../plugins/layout/types';
22
22
  import type { MediaOptions, MediaState } from '@atlaskit/editor-plugin-media/types';
23
- import type { MentionPluginConfig } from '../plugins/mentions/types';
23
+ import type { MentionPluginConfig } from '@atlaskit/editor-plugin-mentions';
24
24
  import type { PanelPluginConfig } from '../plugins/panel/types';
25
25
  import type { PlaceholderTextOptions } from '../plugins/placeholder-text/types';
26
26
  import type { TextColorPluginConfig } from '../plugins/text-color/pm-plugins/main';
@@ -11,7 +11,6 @@ export { default as layoutPlugin } from './layout';
11
11
  export { default as toolbarListsIndentationPlugin } from './toolbar-lists-indentation';
12
12
  export { default as macroPlugin } from './macro';
13
13
  export { default as maxContentSizePlugin } from './max-content-size';
14
- export { default as mentionsPlugin } from './mentions';
15
14
  export { default as panelPlugin } from './panel';
16
15
  export { default as pastePlugin } from './paste';
17
16
  export { default as placeholderTextPlugin } from './placeholder-text';
@@ -6,7 +6,6 @@ import type { tablesPlugin } from '@atlaskit/editor-plugin-table';
6
6
  import type { hyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
7
7
  import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
8
8
  import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
9
- import type mentionsPlugin from '../mentions';
10
9
  import type { QuickInsertPlugin } from '@atlaskit/editor-plugin-quick-insert';
11
10
  import type { BlockTypePlugin } from '@atlaskit/editor-plugin-block-type';
12
11
  import type codeBlockPlugin from '../code-block';
@@ -14,7 +13,7 @@ import type panelPlugin from '../panel';
14
13
  import type { RulePlugin } from '@atlaskit/editor-plugin-rule';
15
14
  import type { MediaPlugin } from '@atlaskit/editor-plugin-media';
16
15
  import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
17
- import type { MentionPlugin } from '../mentions';
16
+ import type { MentionsPlugin } from '@atlaskit/editor-plugin-mentions';
18
17
  import type { StatusPlugin } from '@atlaskit/editor-plugin-status';
19
18
  export type InsertBlockPluginDependencies = [
20
19
  FeatureFlagsPlugin,
@@ -25,13 +24,12 @@ export type InsertBlockPluginDependencies = [
25
24
  OptionalPlugin<BlockTypePlugin>,
26
25
  OptionalPlugin<typeof analyticsPlugin>,
27
26
  OptionalPlugin<ImageUploadPlugin>,
28
- OptionalPlugin<typeof mentionsPlugin>,
29
27
  OptionalPlugin<EmojiPlugin>,
30
28
  OptionalPlugin<QuickInsertPlugin>,
31
29
  OptionalPlugin<RulePlugin>,
32
30
  OptionalPlugin<typeof codeBlockPlugin>,
33
31
  OptionalPlugin<typeof panelPlugin>,
34
32
  OptionalPlugin<MediaPlugin>,
35
- OptionalPlugin<MentionPlugin>,
33
+ OptionalPlugin<MentionsPlugin>,
36
34
  OptionalPlugin<StatusPlugin>
37
35
  ];
@@ -20,7 +20,7 @@ import type { DatePluginConfig } from '@atlaskit/editor-plugin-date';
20
20
  import type { FindReplaceOptions } from '../plugins/find-replace/types';
21
21
  import type { LayoutPluginOptions } from '../plugins/layout/types';
22
22
  import type { MediaOptions, MediaState } from '@atlaskit/editor-plugin-media/types';
23
- import type { MentionPluginConfig } from '../plugins/mentions/types';
23
+ import type { MentionPluginConfig } from '@atlaskit/editor-plugin-mentions';
24
24
  import type { PanelPluginConfig } from '../plugins/panel/types';
25
25
  import type { PlaceholderTextOptions } from '../plugins/placeholder-text/types';
26
26
  import type { TextColorPluginConfig } from '../plugins/text-color/pm-plugins/main';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "188.10.5",
3
+ "version": "188.10.7",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -42,7 +42,6 @@
42
42
  "@atlaskit/activity-provider": "^2.4.0",
43
43
  "@atlaskit/adf-schema": "^32.0.0",
44
44
  "@atlaskit/adf-utils": "^19.0.0",
45
- "@atlaskit/analytics-gas-types": "^5.1.0",
46
45
  "@atlaskit/analytics-listeners": "^8.7.0",
47
46
  "@atlaskit/analytics-namespaced-context": "^6.7.0",
48
47
  "@atlaskit/analytics-next": "^9.1.0",
@@ -85,6 +84,7 @@
85
84
  "@atlaskit/editor-plugin-image-upload": "^0.2.0",
86
85
  "@atlaskit/editor-plugin-list": "^1.3.0",
87
86
  "@atlaskit/editor-plugin-media": "^0.3.0",
87
+ "@atlaskit/editor-plugin-mentions": "^0.1.0",
88
88
  "@atlaskit/editor-plugin-placeholder": "^0.1.0",
89
89
  "@atlaskit/editor-plugin-quick-insert": "^0.2.0",
90
90
  "@atlaskit/editor-plugin-rule": "^0.1.0",
package/report.api.md CHANGED
@@ -16,7 +16,6 @@
16
16
 
17
17
  ```ts
18
18
  /// <reference types="node" />
19
- /// <reference types="react" />
20
19
 
21
20
  import { ACTION } from '@atlaskit/editor-common/analytics';
22
21
  import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
@@ -57,6 +56,7 @@ import { MacroProvider } from '@atlaskit/editor-common/provider-factory';
57
56
  import { MediaOptions } from '@atlaskit/editor-plugin-media/types';
58
57
  import { MediaProvider as MediaProvider_2 } from '@atlaskit/editor-common/provider-factory';
59
58
  import type { MediaState } from '@atlaskit/editor-plugin-media/types';
59
+ import type { MentionPluginConfig } from '@atlaskit/editor-plugin-mentions';
60
60
  import { MentionProvider } from '@atlaskit/mention/resource';
61
61
  import { MentionResource } from '@atlaskit/mention/resource';
62
62
  import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
@@ -654,14 +654,6 @@ export { MediaOptions };
654
654
 
655
655
  export { MediaProvider_2 as MediaProvider };
656
656
 
657
- // @public (undocumented)
658
- interface MentionPluginConfig {
659
- // (undocumented)
660
- HighlightComponent?: React.ComponentType;
661
- // (undocumented)
662
- insertDisplayName?: boolean;
663
- }
664
-
665
657
  export { MentionProvider };
666
658
 
667
659
  export { MentionResource };
@@ -5,7 +5,6 @@
5
5
  ```ts
6
6
 
7
7
  /// <reference types="node" />
8
- /// <reference types="react" />
9
8
 
10
9
  import { ACTION } from '@atlaskit/editor-common/analytics';
11
10
  import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
@@ -46,6 +45,7 @@ import { MacroProvider } from '@atlaskit/editor-common/provider-factory';
46
45
  import { MediaOptions } from '@atlaskit/editor-plugin-media/types';
47
46
  import { MediaProvider as MediaProvider_2 } from '@atlaskit/editor-common/provider-factory';
48
47
  import type { MediaState } from '@atlaskit/editor-plugin-media/types';
48
+ import type { MentionPluginConfig } from '@atlaskit/editor-plugin-mentions';
49
49
  import { MentionProvider } from '@atlaskit/mention/resource';
50
50
  import { MentionResource } from '@atlaskit/mention/resource';
51
51
  import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
@@ -602,14 +602,6 @@ export { MediaOptions }
602
602
 
603
603
  export { MediaProvider_2 as MediaProvider }
604
604
 
605
- // @public (undocumented)
606
- interface MentionPluginConfig {
607
- // (undocumented)
608
- HighlightComponent?: React.ComponentType;
609
- // (undocumented)
610
- insertDisplayName?: boolean;
611
- }
612
-
613
605
  export { MentionProvider }
614
606
 
615
607
  export { MentionResource }
@@ -1,157 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.buildTypeAheadRenderedPayload = exports.buildTypeAheadInviteItemViewedPayload = exports.buildTypeAheadInviteItemClickedPayload = exports.buildTypeAheadInviteExposurePayload = exports.buildTypeAheadInsertedPayload = exports.buildTypeAheadCancelPayload = exports.buildAnalyticsPayload = void 0;
8
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _analyticsGasTypes = require("@atlaskit/analytics-gas-types");
10
- var _resource = require("@atlaskit/mention/resource");
11
- var _utils = require("./utils");
12
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
13
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
14
- var componentName = 'mention';
15
- var buildAnalyticsPayload = exports.buildAnalyticsPayload = function buildAnalyticsPayload(actionSubject, action, eventType, sessionId) {
16
- var otherAttributes = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
17
- var tags = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : [];
18
- return {
19
- action: action,
20
- actionSubject: actionSubject,
21
- eventType: eventType,
22
- attributes: _objectSpread({
23
- componentName: componentName,
24
- sessionId: sessionId
25
- }, otherAttributes),
26
- tags: tags
27
- };
28
- };
29
- var emptyQueryResponse = {
30
- queryLength: 0,
31
- spaceInQuery: false
32
- };
33
- var extractAttributesFromQuery = function extractAttributesFromQuery(query) {
34
- if (query) {
35
- return {
36
- queryLength: query.length,
37
- spaceInQuery: query.indexOf(' ') !== -1
38
- };
39
- }
40
- return emptyQueryResponse;
41
- };
42
- var buildTypeAheadCancelPayload = exports.buildTypeAheadCancelPayload = function buildTypeAheadCancelPayload(duration, upKeyCount, downKeyCount, sessionId, query) {
43
- var _extractAttributesFro = extractAttributesFromQuery(query),
44
- queryLength = _extractAttributesFro.queryLength,
45
- spaceInQuery = _extractAttributesFro.spaceInQuery;
46
- return buildAnalyticsPayload('mentionTypeahead', 'cancelled', _analyticsGasTypes.UI_EVENT_TYPE, sessionId, {
47
- duration: duration,
48
- downKeyCount: downKeyCount,
49
- upKeyCount: upKeyCount,
50
- queryLength: queryLength,
51
- spaceInQuery: spaceInQuery
52
- });
53
- };
54
- var getPosition = function getPosition(mentionList, selectedMention) {
55
- if (mentionList) {
56
- var index = mentionList.findIndex(function (mention) {
57
- return mention.id === selectedMention.id;
58
- });
59
- return index === -1 ? undefined : index;
60
- }
61
- return;
62
- };
63
- var isClicked = function isClicked(insertType) {
64
- return insertType === 'selected';
65
- };
66
- var buildTypeAheadInviteItemViewedPayload = exports.buildTypeAheadInviteItemViewedPayload = function buildTypeAheadInviteItemViewedPayload(sessionId, contextIdentifierProvider, userRole) {
67
- var _ref = contextIdentifierProvider || {},
68
- containerId = _ref.containerId,
69
- objectId = _ref.objectId,
70
- childObjectId = _ref.childObjectId;
71
- return buildAnalyticsPayload('inviteItem', 'rendered', _analyticsGasTypes.UI_EVENT_TYPE, sessionId, {
72
- containerId: containerId,
73
- objectId: objectId,
74
- childObjectId: childObjectId,
75
- userRole: userRole
76
- });
77
- };
78
- var buildTypeAheadInviteExposurePayload = exports.buildTypeAheadInviteExposurePayload = function buildTypeAheadInviteExposurePayload(sessionId, contextIdentifierProvider, inviteExperimentCohort, userRole) {
79
- var _ref2 = contextIdentifierProvider || {},
80
- containerId = _ref2.containerId,
81
- objectId = _ref2.objectId,
82
- childObjectId = _ref2.childObjectId;
83
- return buildAnalyticsPayload('feature', 'exposed', _analyticsGasTypes.OPERATIONAL_EVENT_TYPE, sessionId, {
84
- flagKey: 'confluence.frontend.invite.from.mention',
85
- value: inviteExperimentCohort || 'not-enrolled',
86
- containerId: containerId,
87
- objectId: objectId,
88
- childObjectId: childObjectId,
89
- userRole: userRole
90
- }, ['measurement', 'hasCustomAttributes']);
91
- };
92
- var buildTypeAheadInviteItemClickedPayload = exports.buildTypeAheadInviteItemClickedPayload = function buildTypeAheadInviteItemClickedPayload(duration, upKeyCount, downKeyCount, sessionId, insertType, query, contextIdentifierProvider, userRole) {
93
- var _extractAttributesFro2 = extractAttributesFromQuery(query),
94
- queryLength = _extractAttributesFro2.queryLength,
95
- spaceInQuery = _extractAttributesFro2.spaceInQuery;
96
- var _ref3 = contextIdentifierProvider || {},
97
- containerId = _ref3.containerId,
98
- objectId = _ref3.objectId,
99
- childObjectId = _ref3.childObjectId;
100
- return buildAnalyticsPayload('inviteItem', isClicked(insertType) ? 'clicked' : 'pressed', _analyticsGasTypes.UI_EVENT_TYPE, sessionId, {
101
- duration: duration,
102
- queryLength: queryLength,
103
- spaceInQuery: spaceInQuery,
104
- upKeyCount: upKeyCount,
105
- downKeyCount: downKeyCount,
106
- containerId: containerId,
107
- objectId: objectId,
108
- childObjectId: childObjectId,
109
- userRole: userRole
110
- });
111
- };
112
- var buildTypeAheadInsertedPayload = exports.buildTypeAheadInsertedPayload = function buildTypeAheadInsertedPayload(duration, upKeyCount, downKeyCount, sessionId, insertType, mention, mentionList, query, contextIdentifierProvider) {
113
- var _extractAttributesFro3 = extractAttributesFromQuery(query),
114
- queryLength = _extractAttributesFro3.queryLength,
115
- spaceInQuery = _extractAttributesFro3.spaceInQuery;
116
- var analyticsPayload = buildAnalyticsPayload('mentionTypeahead', isClicked(insertType) ? 'clicked' : 'pressed', _analyticsGasTypes.UI_EVENT_TYPE, sessionId, {
117
- duration: duration,
118
- position: getPosition(mentionList, mention),
119
- keyboardKey: isClicked(insertType) ? undefined : insertType,
120
- source: mention.source,
121
- queryLength: queryLength,
122
- spaceInQuery: spaceInQuery,
123
- isSpecial: (0, _resource.isSpecialMention)(mention),
124
- accessLevel: mention.accessLevel || '',
125
- userType: mention.userType,
126
- userId: mention.id,
127
- upKeyCount: upKeyCount,
128
- downKeyCount: downKeyCount,
129
- memberCount: (0, _utils.isTeamType)(mention.userType) && mention.context ? mention.context.memberCount : null,
130
- includesYou: (0, _utils.isTeamType)(mention.userType) && mention.context ? mention.context.includesYou : null
131
- });
132
- if (contextIdentifierProvider) {
133
- analyticsPayload.containerId = contextIdentifierProvider.containerId || undefined;
134
- analyticsPayload.objectId = contextIdentifierProvider.objectId || undefined;
135
- analyticsPayload.childObjectId = contextIdentifierProvider.childObjectId || undefined;
136
- }
137
- return analyticsPayload;
138
- };
139
- var buildTypeAheadRenderedPayload = exports.buildTypeAheadRenderedPayload = function buildTypeAheadRenderedPayload(duration, userIds, query, teams) {
140
- var _extractAttributesFro4 = extractAttributesFromQuery(query),
141
- queryLength = _extractAttributesFro4.queryLength,
142
- spaceInQuery = _extractAttributesFro4.spaceInQuery;
143
- var actionSubject = userIds ? 'mentionTypeahead' : 'teamMentionTypeahead';
144
- return {
145
- action: 'rendered',
146
- actionSubject: actionSubject,
147
- eventType: _analyticsGasTypes.OPERATIONAL_EVENT_TYPE,
148
- attributes: {
149
- componentName: componentName,
150
- duration: duration,
151
- userIds: userIds,
152
- teams: teams,
153
- queryLength: queryLength,
154
- spaceInQuery: spaceInQuery
155
- }
156
- };
157
- };
@@ -1,142 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- Object.defineProperty(exports, "mentionPluginKey", {
9
- enumerable: true,
10
- get: function get() {
11
- return _key.mentionPluginKey;
12
- }
13
- });
14
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
- var _react = _interopRequireDefault(require("react"));
16
- var _uuid = _interopRequireDefault(require("uuid"));
17
- var _resource = require("@atlaskit/mention/resource");
18
- var _adfSchema = require("@atlaskit/adf-schema");
19
- var _withPluginState = require("@atlaskit/editor-common/with-plugin-state");
20
- var _ToolbarMention = _interopRequireDefault(require("./ui/ToolbarMention"));
21
- var _analytics = require("@atlaskit/editor-common/analytics");
22
- var _quickInsert = require("@atlaskit/editor-common/quick-insert");
23
- var _messages = require("@atlaskit/editor-common/messages");
24
- var _typeAhead = require("./type-ahead");
25
- var _key = require("./pm-plugins/key");
26
- var _main = require("./pm-plugins/main");
27
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
28
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
29
- var mentionsPlugin = function mentionsPlugin(_ref) {
30
- var options = _ref.config,
31
- api = _ref.api;
32
- var sessionId = (0, _uuid.default)();
33
- var fireEvent = function fireEvent(payload) {
34
- var _api$analytics$shared, _api$analytics;
35
- var _ref2 = (_api$analytics$shared = api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.sharedState.currentState()) !== null && _api$analytics$shared !== void 0 ? _api$analytics$shared : {},
36
- createAnalyticsEvent = _ref2.createAnalyticsEvent;
37
- if (!createAnalyticsEvent) {
38
- return;
39
- }
40
- if (payload.attributes && !payload.attributes.sessionId) {
41
- payload.attributes.sessionId = sessionId;
42
- }
43
- createAnalyticsEvent(payload).fire(_resource.ELEMENTS_CHANNEL);
44
- };
45
- var typeAhead = (0, _typeAhead.createTypeAheadConfig)({
46
- sanitizePrivateContent: options === null || options === void 0 ? void 0 : options.sanitizePrivateContent,
47
- mentionInsertDisplayName: options === null || options === void 0 ? void 0 : options.insertDisplayName,
48
- HighlightComponent: options === null || options === void 0 ? void 0 : options.HighlightComponent,
49
- fireEvent: fireEvent
50
- });
51
- return {
52
- name: 'mention',
53
- nodes: function nodes() {
54
- return [{
55
- name: 'mention',
56
- node: _adfSchema.mention
57
- }];
58
- },
59
- pmPlugins: function pmPlugins() {
60
- return [{
61
- name: 'mention',
62
- plugin: function plugin(pmPluginFactoryParams) {
63
- return (0, _main.createMentionPlugin)(pmPluginFactoryParams, fireEvent, options);
64
- }
65
- }];
66
- },
67
- secondaryToolbarComponent: function secondaryToolbarComponent(_ref3) {
68
- var editorView = _ref3.editorView,
69
- disabled = _ref3.disabled;
70
- var openMentionTypeAhead = function openMentionTypeAhead() {
71
- var _api$typeAhead;
72
- api === null || api === void 0 || (_api$typeAhead = api.typeAhead) === null || _api$typeAhead === void 0 || (_api$typeAhead = _api$typeAhead.actions) === null || _api$typeAhead === void 0 || _api$typeAhead.open({
73
- triggerHandler: typeAhead,
74
- inputMethod: _analytics.INPUT_METHOD.INSERT_MENU
75
- });
76
- };
77
- return /*#__PURE__*/_react.default.createElement(_withPluginState.WithPluginState, {
78
- editorView: editorView,
79
- plugins: {
80
- mentionState: _key.mentionPluginKey
81
- },
82
- render: function render(_ref4) {
83
- var _ref4$mentionState = _ref4.mentionState,
84
- mentionState = _ref4$mentionState === void 0 ? {} : _ref4$mentionState;
85
- return !mentionState.mentionProvider ? null : /*#__PURE__*/_react.default.createElement(_ToolbarMention.default, {
86
- editorView: editorView,
87
- onInsertMention: openMentionTypeAhead,
88
- isDisabled: disabled || (api === null || api === void 0 ? void 0 : api.typeAhead.actions.isAllowed(editorView.state))
89
- });
90
- }
91
- });
92
- },
93
- actions: {
94
- openTypeAhead: function openTypeAhead(inputMethod) {
95
- var _api$typeAhead2;
96
- return Boolean(api === null || api === void 0 || (_api$typeAhead2 = api.typeAhead) === null || _api$typeAhead2 === void 0 || (_api$typeAhead2 = _api$typeAhead2.actions) === null || _api$typeAhead2 === void 0 ? void 0 : _api$typeAhead2.open({
97
- triggerHandler: typeAhead,
98
- inputMethod: inputMethod
99
- }));
100
- }
101
- },
102
- getSharedState: function getSharedState(editorState) {
103
- if (!editorState) {
104
- return undefined;
105
- }
106
- var mentionPluginState = _key.mentionPluginKey.getState(editorState);
107
- return _objectSpread(_objectSpread({}, mentionPluginState), {}, {
108
- typeAheadHandler: typeAhead
109
- });
110
- },
111
- pluginsOptions: {
112
- quickInsert: function quickInsert(_ref5) {
113
- var formatMessage = _ref5.formatMessage;
114
- return [{
115
- id: 'mention',
116
- title: formatMessage(_messages.toolbarInsertBlockMessages.mention),
117
- description: formatMessage(_messages.toolbarInsertBlockMessages.mentionDescription),
118
- keywords: ['team', 'user'],
119
- priority: 400,
120
- keyshortcut: '@',
121
- icon: function icon() {
122
- return /*#__PURE__*/_react.default.createElement(_quickInsert.IconMention, null);
123
- },
124
- action: function action(insert, state) {
125
- var tr = insert(undefined);
126
- var pluginState = _key.mentionPluginKey.getState(state);
127
- if (pluginState && pluginState.canInsertMention === false) {
128
- return false;
129
- }
130
- api === null || api === void 0 || api.typeAhead.actions.openAtTransaction({
131
- triggerHandler: typeAhead,
132
- inputMethod: _analytics.INPUT_METHOD.QUICK_INSERT
133
- })(tr);
134
- return tr;
135
- }
136
- }];
137
- },
138
- typeAhead: typeAhead
139
- }
140
- };
141
- };
142
- var _default = exports.default = mentionsPlugin;