@atlaskit/editor-plugin-mentions 2.11.1 → 2.11.3

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,25 @@
1
1
  # @atlaskit/editor-plugin-mentions
2
2
 
3
+ ## 2.11.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#100411](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/100411)
8
+ [`14499ab145534`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/14499ab145534) -
9
+ [ux] Introduces advanced code block as per:
10
+ https://hello.atlassian.net/wiki/spaces/EDITOR/pages/4632293323/Editor+RFC+063+Advanced+code+blocks.
11
+ This can be added to an existing editor preset to enrich the code block experience with syntax
12
+ highlighting and can be extended for other features via CodeMirror extensions (ie. autocompletion,
13
+ code folding etc.).
14
+
15
+ ## 2.11.2
16
+
17
+ ### Patch Changes
18
+
19
+ - [#102447](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/102447)
20
+ [`17f3bf711d55c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/17f3bf711d55c) -
21
+ Re-enable mentions while offline.
22
+
3
23
  ## 2.11.1
4
24
 
5
25
  ### Patch Changes
@@ -225,7 +225,6 @@ var mentionsPlugin = exports.mentionsPlugin = function mentionsPlugin(_ref3) {
225
225
  keywords: ['team', 'user'],
226
226
  priority: 400,
227
227
  keyshortcut: '@',
228
- isDisabledOffline: true,
229
228
  icon: function icon() {
230
229
  return /*#__PURE__*/_react.default.createElement(_quickInsert.IconMention, null);
231
230
  },
@@ -24,7 +24,7 @@ var ACTIONS = exports.ACTIONS = {
24
24
  SET_PROVIDER: 'SET_PROVIDER'
25
25
  };
26
26
  var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
27
- var PACKAGE_VERSION = "2.11.1";
27
+ var PACKAGE_VERSION = "2.11.3";
28
28
  var setProvider = function setProvider(provider) {
29
29
  return function (state, dispatch) {
30
30
  if (dispatch) {
@@ -199,7 +199,6 @@ const mentionsPlugin = ({
199
199
  keywords: ['team', 'user'],
200
200
  priority: 400,
201
201
  keyshortcut: '@',
202
- isDisabledOffline: true,
203
202
  icon: () => /*#__PURE__*/React.createElement(IconMention, null),
204
203
  action(insert, state) {
205
204
  var _api$typeAhead2;
@@ -13,7 +13,7 @@ export const ACTIONS = {
13
13
  SET_PROVIDER: 'SET_PROVIDER'
14
14
  };
15
15
  const PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
16
- const PACKAGE_VERSION = "2.11.1";
16
+ const PACKAGE_VERSION = "2.11.3";
17
17
  const setProvider = provider => (state, dispatch) => {
18
18
  if (dispatch) {
19
19
  dispatch(state.tr.setMeta(mentionPluginKey, {
@@ -332,14 +332,14 @@ export const createTypeAheadConfig = ({
332
332
  handleMentionsChanged([{
333
333
  type: 'added',
334
334
  localId: mentionLocalId,
335
- id: id,
335
+ id,
336
336
  taskLocalId: taskItemId
337
337
  }]);
338
338
  } else {
339
339
  handleMentionsChanged([{
340
340
  type: 'added',
341
341
  localId: mentionLocalId,
342
- id: id
342
+ id
343
343
  }]);
344
344
  }
345
345
  }
@@ -215,7 +215,6 @@ var mentionsPlugin = function mentionsPlugin(_ref3) {
215
215
  keywords: ['team', 'user'],
216
216
  priority: 400,
217
217
  keyshortcut: '@',
218
- isDisabledOffline: true,
219
218
  icon: function icon() {
220
219
  return /*#__PURE__*/React.createElement(IconMention, null);
221
220
  },
@@ -16,7 +16,7 @@ export var ACTIONS = {
16
16
  SET_PROVIDER: 'SET_PROVIDER'
17
17
  };
18
18
  var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
19
- var PACKAGE_VERSION = "2.11.1";
19
+ var PACKAGE_VERSION = "2.11.3";
20
20
  var setProvider = function setProvider(provider) {
21
21
  return function (state, dispatch) {
22
22
  if (dispatch) {
@@ -5,29 +5,28 @@ import type { ContextIdentifierPlugin } from '@atlaskit/editor-plugin-context-id
5
5
  import type { TypeAheadInputMethod, TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
6
6
  import type { MentionProvider } from '@atlaskit/mention/resource';
7
7
  import type { MentionPluginOptions, MentionSharedState } from './types';
8
+ export type MentionActionOpenTypeAhead = (inputMethod: TypeAheadInputMethod) => boolean;
9
+ export type MentionActionAnnounceMentionsInsertion = (mentionIds: {
10
+ type: 'added' | 'deleted';
11
+ localId: string;
12
+ id: string;
13
+ taskLocalId?: string;
14
+ }[]) => void;
15
+ export type MentionActionSetProvider = (provider: Promise<MentionProvider>) => Promise<boolean>;
16
+ export type MentionActions = {
17
+ openTypeAhead: MentionActionOpenTypeAhead;
18
+ announceMentionsInsertion: MentionActionAnnounceMentionsInsertion;
19
+ setProvider: MentionActionSetProvider;
20
+ };
21
+ export type MentionPluginDependencies = [
22
+ OptionalPlugin<AnalyticsPlugin>,
23
+ TypeAheadPlugin,
24
+ OptionalPlugin<ContextIdentifierPlugin>,
25
+ OptionalPlugin<BasePlugin>
26
+ ];
8
27
  export type MentionsPlugin = NextEditorPlugin<'mention', {
9
28
  pluginConfiguration: MentionPluginOptions | undefined;
10
- dependencies: [
11
- OptionalPlugin<AnalyticsPlugin>,
12
- TypeAheadPlugin,
13
- OptionalPlugin<ContextIdentifierPlugin>,
14
- OptionalPlugin<BasePlugin>
15
- ];
29
+ dependencies: MentionPluginDependencies;
16
30
  sharedState: MentionSharedState | undefined;
17
- actions: {
18
- openTypeAhead: (inputMethod: TypeAheadInputMethod) => boolean;
19
- announceMentionsInsertion: (mentionIds: {
20
- type: 'added' | 'deleted';
21
- localId: string;
22
- id: string;
23
- taskLocalId?: string;
24
- }[]) => void;
25
- /**
26
- * Used to update the initial provider passed to the mention plugin.
27
- *
28
- * @param provider Promise<MentionProvider>
29
- * @returns {boolean} if setting the provider was successful or not
30
- */
31
- setProvider: (provider: Promise<MentionProvider>) => Promise<boolean>;
32
- };
31
+ actions: MentionActions;
33
32
  }>;
@@ -5,29 +5,28 @@ import type { ContextIdentifierPlugin } from '@atlaskit/editor-plugin-context-id
5
5
  import type { TypeAheadInputMethod, TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
6
6
  import type { MentionProvider } from '@atlaskit/mention/resource';
7
7
  import type { MentionPluginOptions, MentionSharedState } from './types';
8
+ export type MentionActionOpenTypeAhead = (inputMethod: TypeAheadInputMethod) => boolean;
9
+ export type MentionActionAnnounceMentionsInsertion = (mentionIds: {
10
+ type: 'added' | 'deleted';
11
+ localId: string;
12
+ id: string;
13
+ taskLocalId?: string;
14
+ }[]) => void;
15
+ export type MentionActionSetProvider = (provider: Promise<MentionProvider>) => Promise<boolean>;
16
+ export type MentionActions = {
17
+ openTypeAhead: MentionActionOpenTypeAhead;
18
+ announceMentionsInsertion: MentionActionAnnounceMentionsInsertion;
19
+ setProvider: MentionActionSetProvider;
20
+ };
21
+ export type MentionPluginDependencies = [
22
+ OptionalPlugin<AnalyticsPlugin>,
23
+ TypeAheadPlugin,
24
+ OptionalPlugin<ContextIdentifierPlugin>,
25
+ OptionalPlugin<BasePlugin>
26
+ ];
8
27
  export type MentionsPlugin = NextEditorPlugin<'mention', {
9
28
  pluginConfiguration: MentionPluginOptions | undefined;
10
- dependencies: [
11
- OptionalPlugin<AnalyticsPlugin>,
12
- TypeAheadPlugin,
13
- OptionalPlugin<ContextIdentifierPlugin>,
14
- OptionalPlugin<BasePlugin>
15
- ];
29
+ dependencies: MentionPluginDependencies;
16
30
  sharedState: MentionSharedState | undefined;
17
- actions: {
18
- openTypeAhead: (inputMethod: TypeAheadInputMethod) => boolean;
19
- announceMentionsInsertion: (mentionIds: {
20
- type: 'added' | 'deleted';
21
- localId: string;
22
- id: string;
23
- taskLocalId?: string;
24
- }[]) => void;
25
- /**
26
- * Used to update the initial provider passed to the mention plugin.
27
- *
28
- * @param provider Promise<MentionProvider>
29
- * @returns {boolean} if setting the provider was successful or not
30
- */
31
- setProvider: (provider: Promise<MentionProvider>) => Promise<boolean>;
32
- };
31
+ actions: MentionActions;
33
32
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-mentions",
3
- "version": "2.11.1",
3
+ "version": "2.11.3",
4
4
  "description": "Mentions plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@atlaskit/adf-schema": "^46.1.0",
35
- "@atlaskit/editor-common": "^99.0.0",
35
+ "@atlaskit/editor-common": "^99.1.0",
36
36
  "@atlaskit/editor-plugin-analytics": "^1.10.0",
37
37
  "@atlaskit/editor-plugin-base": "^2.1.0",
38
38
  "@atlaskit/editor-plugin-context-identifier": "^1.3.0",