@atlaskit/editor-plugin-tasks-and-decisions 1.5.1 → 2.1.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,31 @@
1
1
  # @atlaskit/editor-plugin-tasks-and-decisions
2
2
 
3
+ ## 2.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#119966](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/119966)
8
+ [`596ad24e38929`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/596ad24e38929) -
9
+ Clean up typescript references to LegacyPortalProviderAPI
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 2.0.0
16
+
17
+ ### Major Changes
18
+
19
+ - [`d9b562bd66f8e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d9b562bd66f8e) -
20
+ [ux] [ED-23947] restoring the original order of the typeahead menu so that actions, media,
21
+ mentions and emojis are above the fold (in the top 5 results). this change is a major because it
22
+ removes the `getEditorFeatureFlags prop` for plugins. if any consumers who have adopted these
23
+ changes to the public API, they should remove them on their side too.
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies
28
+
3
29
  ## 1.5.1
4
30
 
5
31
  ### Patch Changes
@@ -111,7 +111,6 @@ var Decision = /*#__PURE__*/function (_ReactNodeView) {
111
111
  }(_reactNodeView.default);
112
112
  var decisionItemNodeView = exports.decisionItemNodeView = function decisionItemNodeView(portalProviderAPI, eventDispatcher, api) {
113
113
  return function (node, view, getPos) {
114
- var hasIntlContext = true;
115
- return new Decision(node, view, getPos, portalProviderAPI, eventDispatcher, {}, undefined, undefined, undefined, hasIntlContext).initWithAPI(api);
114
+ return new Decision(node, view, getPos, portalProviderAPI, eventDispatcher, {}).initWithAPI(api);
116
115
  };
117
116
  };
@@ -203,9 +203,8 @@ var Task = /*#__PURE__*/function (_ReactNodeView) {
203
203
  }(_reactNodeView.default);
204
204
  function taskItemNodeViewFactory(portalProviderAPI, eventDispatcher, providerFactory, api) {
205
205
  return function (node, view, getPos) {
206
- var hasIntlContext = true;
207
206
  return new Task(node, view, getPos, portalProviderAPI, eventDispatcher, {
208
207
  providerFactory: providerFactory
209
- }, undefined, undefined, undefined, hasIntlContext).initWithAPI(api);
208
+ }).initWithAPI(api);
210
209
  };
211
210
  }
@@ -49,7 +49,6 @@ var tasksAndDecisionsPlugin = exports.tasksAndDecisionsPlugin = function tasksAn
49
49
  allowNestedTasks = _ref2$config2.allowNestedTasks,
50
50
  consumeTabs = _ref2$config2.consumeTabs,
51
51
  useLongPressSelection = _ref2$config2.useLongPressSelection,
52
- getEditorFeatureFlags = _ref2$config2.getEditorFeatureFlags,
53
52
  api = _ref2.api;
54
53
  var getIdentifierProvider = function getIdentifierProvider() {
55
54
  var _api$contextIdentifie;
@@ -142,7 +141,7 @@ var tasksAndDecisionsPlugin = exports.tasksAndDecisionsPlugin = function tasksAn
142
141
  id: 'action',
143
142
  title: formatMessage(_messages.toolbarInsertBlockMessages.action),
144
143
  description: formatMessage(_messages.toolbarInsertBlockMessages.actionDescription),
145
- priority: getEditorFeatureFlags !== null && getEditorFeatureFlags !== void 0 && getEditorFeatureFlags().platformEditorTypeaheadImprovedRelevancy ? 800 : 100,
144
+ priority: 100,
146
145
  keywords: ['checkbox', 'task', 'todo'],
147
146
  keyshortcut: '[]',
148
147
  icon: function icon() {
@@ -71,6 +71,5 @@ class Decision extends ReactNodeView {
71
71
  }
72
72
  }
73
73
  export const decisionItemNodeView = (portalProviderAPI, eventDispatcher, api) => (node, view, getPos) => {
74
- const hasIntlContext = true;
75
- return new Decision(node, view, getPos, portalProviderAPI, eventDispatcher, {}, undefined, undefined, undefined, hasIntlContext).initWithAPI(api);
74
+ return new Decision(node, view, getPos, portalProviderAPI, eventDispatcher, {}).initWithAPI(api);
76
75
  };
@@ -165,9 +165,8 @@ class Task extends ReactNodeView {
165
165
  }
166
166
  export function taskItemNodeViewFactory(portalProviderAPI, eventDispatcher, providerFactory, api) {
167
167
  return (node, view, getPos) => {
168
- const hasIntlContext = true;
169
168
  return new Task(node, view, getPos, portalProviderAPI, eventDispatcher, {
170
169
  providerFactory
171
- }, undefined, undefined, undefined, hasIntlContext).initWithAPI(api);
170
+ }).initWithAPI(api);
172
171
  };
173
172
  }
@@ -35,8 +35,7 @@ export const tasksAndDecisionsPlugin = ({
35
35
  config: {
36
36
  allowNestedTasks,
37
37
  consumeTabs,
38
- useLongPressSelection,
39
- getEditorFeatureFlags
38
+ useLongPressSelection
40
39
  } = {},
41
40
  api
42
41
  }) => {
@@ -134,7 +133,7 @@ export const tasksAndDecisionsPlugin = ({
134
133
  id: 'action',
135
134
  title: formatMessage(insertBlockMessages.action),
136
135
  description: formatMessage(insertBlockMessages.actionDescription),
137
- priority: getEditorFeatureFlags !== null && getEditorFeatureFlags !== void 0 && getEditorFeatureFlags().platformEditorTypeaheadImprovedRelevancy ? 800 : 100,
136
+ priority: 100,
138
137
  keywords: ['checkbox', 'task', 'todo'],
139
138
  keyshortcut: '[]',
140
139
  icon: () => jsx(IconAction, null),
@@ -104,7 +104,6 @@ var Decision = /*#__PURE__*/function (_ReactNodeView) {
104
104
  }(ReactNodeView);
105
105
  export var decisionItemNodeView = function decisionItemNodeView(portalProviderAPI, eventDispatcher, api) {
106
106
  return function (node, view, getPos) {
107
- var hasIntlContext = true;
108
- return new Decision(node, view, getPos, portalProviderAPI, eventDispatcher, {}, undefined, undefined, undefined, hasIntlContext).initWithAPI(api);
107
+ return new Decision(node, view, getPos, portalProviderAPI, eventDispatcher, {}).initWithAPI(api);
109
108
  };
110
109
  };
@@ -196,9 +196,8 @@ var Task = /*#__PURE__*/function (_ReactNodeView) {
196
196
  }(ReactNodeView);
197
197
  export function taskItemNodeViewFactory(portalProviderAPI, eventDispatcher, providerFactory, api) {
198
198
  return function (node, view, getPos) {
199
- var hasIntlContext = true;
200
199
  return new Task(node, view, getPos, portalProviderAPI, eventDispatcher, {
201
200
  providerFactory: providerFactory
202
- }, undefined, undefined, undefined, hasIntlContext).initWithAPI(api);
201
+ }).initWithAPI(api);
203
202
  };
204
203
  }
@@ -38,7 +38,6 @@ export var tasksAndDecisionsPlugin = function tasksAndDecisionsPlugin(_ref2) {
38
38
  allowNestedTasks = _ref2$config2.allowNestedTasks,
39
39
  consumeTabs = _ref2$config2.consumeTabs,
40
40
  useLongPressSelection = _ref2$config2.useLongPressSelection,
41
- getEditorFeatureFlags = _ref2$config2.getEditorFeatureFlags,
42
41
  api = _ref2.api;
43
42
  var getIdentifierProvider = function getIdentifierProvider() {
44
43
  var _api$contextIdentifie;
@@ -131,7 +130,7 @@ export var tasksAndDecisionsPlugin = function tasksAndDecisionsPlugin(_ref2) {
131
130
  id: 'action',
132
131
  title: formatMessage(insertBlockMessages.action),
133
132
  description: formatMessage(insertBlockMessages.actionDescription),
134
- priority: getEditorFeatureFlags !== null && getEditorFeatureFlags !== void 0 && getEditorFeatureFlags().platformEditorTypeaheadImprovedRelevancy ? 800 : 100,
133
+ priority: 100,
135
134
  keywords: ['checkbox', 'task', 'todo'],
136
135
  keyshortcut: '[]',
137
136
  icon: function icon() {
@@ -1,5 +1,4 @@
1
1
  import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
2
- import type { LegacyPortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
3
2
  import { type PortalProviderAPI } from '@atlaskit/editor-common/src/portal';
4
3
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
5
4
  import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
@@ -7,5 +6,5 @@ import type { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
7
6
  import type { TasksAndDecisionsPlugin } from '../types';
8
7
  type getPosHandler = getPosHandlerNode | boolean;
9
8
  type getPosHandlerNode = () => number | undefined;
10
- export declare const decisionItemNodeView: (portalProviderAPI: LegacyPortalProviderAPI | PortalProviderAPI, eventDispatcher: EventDispatcher, api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined) => (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
9
+ export declare const decisionItemNodeView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined) => (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
11
10
  export {};
@@ -1,5 +1,4 @@
1
1
  import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
2
- import type { LegacyPortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
3
2
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
4
3
  import { type PortalProviderAPI } from '@atlaskit/editor-common/src/portal';
5
4
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
@@ -11,5 +10,5 @@ type getPosHandlerNode = () => number | undefined;
11
10
  export interface Props {
12
11
  providerFactory: ProviderFactory;
13
12
  }
14
- export declare function taskItemNodeViewFactory(portalProviderAPI: LegacyPortalProviderAPI | PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined): (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
13
+ export declare function taskItemNodeViewFactory(portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined): (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
15
14
  export {};
@@ -1,8 +1,7 @@
1
1
  import type { Dispatch, EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
2
- import type { LegacyPortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
3
2
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
4
3
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
5
4
  import { type PortalProviderAPI } from '@atlaskit/editor-common/src/portal';
6
5
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
7
6
  import type { TasksAndDecisionsPlugin } from '../types';
8
- export declare function createPlugin(portalProviderAPI: LegacyPortalProviderAPI | PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, dispatch: Dispatch, api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined, useLongPressSelection?: boolean): SafePlugin<any>;
7
+ export declare function createPlugin(portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, dispatch: Dispatch, api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined, useLongPressSelection?: boolean): SafePlugin<any>;
@@ -1,7 +1,7 @@
1
1
  import type { DecisionItemDefinition, TaskItemDefinition } from '@atlaskit/adf-schema';
2
2
  import type { INPUT_METHOD, USER_CONTEXT } from '@atlaskit/editor-common/analytics';
3
3
  import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
4
- import type { GetEditorFeatureFlags, LongPressSelectionPluginOptions, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
4
+ import type { LongPressSelectionPluginOptions, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
5
5
  import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
6
6
  import type { ContextIdentifierPlugin } from '@atlaskit/editor-plugin-context-identifier';
7
7
  import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
@@ -29,7 +29,6 @@ export type AddItemTransactionCreator = (opts: {
29
29
  export interface TaskDecisionPluginOptions extends LongPressSelectionPluginOptions {
30
30
  allowNestedTasks?: boolean;
31
31
  consumeTabs?: boolean;
32
- getEditorFeatureFlags?: GetEditorFeatureFlags;
33
32
  }
34
33
  export type TaskAndDecisionsSharedState = {
35
34
  focusedTaskItemLocalId: string | null;
@@ -1,5 +1,4 @@
1
1
  import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
2
- import type { LegacyPortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
3
2
  import { type PortalProviderAPI } from '@atlaskit/editor-common/src/portal';
4
3
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
5
4
  import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
@@ -7,5 +6,5 @@ import type { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
7
6
  import type { TasksAndDecisionsPlugin } from '../types';
8
7
  type getPosHandler = getPosHandlerNode | boolean;
9
8
  type getPosHandlerNode = () => number | undefined;
10
- export declare const decisionItemNodeView: (portalProviderAPI: LegacyPortalProviderAPI | PortalProviderAPI, eventDispatcher: EventDispatcher, api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined) => (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
9
+ export declare const decisionItemNodeView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined) => (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
11
10
  export {};
@@ -1,5 +1,4 @@
1
1
  import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
2
- import type { LegacyPortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
3
2
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
4
3
  import { type PortalProviderAPI } from '@atlaskit/editor-common/src/portal';
5
4
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
@@ -11,5 +10,5 @@ type getPosHandlerNode = () => number | undefined;
11
10
  export interface Props {
12
11
  providerFactory: ProviderFactory;
13
12
  }
14
- export declare function taskItemNodeViewFactory(portalProviderAPI: LegacyPortalProviderAPI | PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined): (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
13
+ export declare function taskItemNodeViewFactory(portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined): (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
15
14
  export {};
@@ -1,8 +1,7 @@
1
1
  import type { Dispatch, EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
2
- import type { LegacyPortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
3
2
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
4
3
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
5
4
  import { type PortalProviderAPI } from '@atlaskit/editor-common/src/portal';
6
5
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
7
6
  import type { TasksAndDecisionsPlugin } from '../types';
8
- export declare function createPlugin(portalProviderAPI: LegacyPortalProviderAPI | PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, dispatch: Dispatch, api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined, useLongPressSelection?: boolean): SafePlugin<any>;
7
+ export declare function createPlugin(portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, dispatch: Dispatch, api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined, useLongPressSelection?: boolean): SafePlugin<any>;
@@ -1,7 +1,7 @@
1
1
  import type { DecisionItemDefinition, TaskItemDefinition } from '@atlaskit/adf-schema';
2
2
  import type { INPUT_METHOD, USER_CONTEXT } from '@atlaskit/editor-common/analytics';
3
3
  import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
4
- import type { GetEditorFeatureFlags, LongPressSelectionPluginOptions, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
4
+ import type { LongPressSelectionPluginOptions, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
5
5
  import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
6
6
  import type { ContextIdentifierPlugin } from '@atlaskit/editor-plugin-context-identifier';
7
7
  import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
@@ -29,7 +29,6 @@ export type AddItemTransactionCreator = (opts: {
29
29
  export interface TaskDecisionPluginOptions extends LongPressSelectionPluginOptions {
30
30
  allowNestedTasks?: boolean;
31
31
  consumeTabs?: boolean;
32
- getEditorFeatureFlags?: GetEditorFeatureFlags;
33
32
  }
34
33
  export type TaskAndDecisionsSharedState = {
35
34
  focusedTaskItemLocalId: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-tasks-and-decisions",
3
- "version": "1.5.1",
3
+ "version": "2.1.0",
4
4
  "description": "Tasks and decisions plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -36,12 +36,12 @@
36
36
  "@atlaskit/adf-schema": "^39.0.3",
37
37
  "@atlaskit/analytics-namespaced-context": "^6.10.0",
38
38
  "@atlaskit/analytics-next": "^9.3.0",
39
- "@atlaskit/editor-common": "^83.5.0",
39
+ "@atlaskit/editor-common": "^85.0.0",
40
40
  "@atlaskit/editor-plugin-analytics": "^1.4.0",
41
41
  "@atlaskit/editor-plugin-context-identifier": "^1.1.0",
42
42
  "@atlaskit/editor-plugin-type-ahead": "^1.4.0",
43
43
  "@atlaskit/editor-prosemirror": "4.0.1",
44
- "@atlaskit/icon": "^22.5.0",
44
+ "@atlaskit/icon": "^22.6.0",
45
45
  "@atlaskit/prosemirror-input-rules": "^3.1.0",
46
46
  "@atlaskit/task-decision": "^17.10.0",
47
47
  "@babel/runtime": "^7.0.0",