@atlaskit/editor-plugin-tasks-and-decisions 14.2.4 → 15.0.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.
Files changed (45) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/package.json +24 -32
  3. package/tasks-and-decisions-plugin/package.json +1 -8
  4. package/tasks-and-decisions-plugin-type/package.json +1 -8
  5. package/types/package.json +1 -8
  6. package/dist/types-ts4.5/entry-points/tasks-and-decisions-plugin-type.d.ts +0 -1
  7. package/dist/types-ts4.5/entry-points/tasks-and-decisions-plugin.d.ts +0 -1
  8. package/dist/types-ts4.5/entry-points/types.d.ts +0 -1
  9. package/dist/types-ts4.5/index.d.ts +0 -3
  10. package/dist/types-ts4.5/nodeviews/DecisionItemNodeView.d.ts +0 -54
  11. package/dist/types-ts4.5/nodeviews/TaskItemNodeView.d.ts +0 -37
  12. package/dist/types-ts4.5/nodeviews/decisionItemNodeSpec.d.ts +0 -58
  13. package/dist/types-ts4.5/nodeviews/hooks/use-show-placeholder.d.ts +0 -11
  14. package/dist/types-ts4.5/nodeviews/task-node-view.d.ts +0 -7
  15. package/dist/types-ts4.5/nodeviews/taskItemNodeSpec.d.ts +0 -28
  16. package/dist/types-ts4.5/nodeviews/toDOM-fixes/decisionItem.d.ts +0 -2
  17. package/dist/types-ts4.5/nodeviews/utils.d.ts +0 -2
  18. package/dist/types-ts4.5/pm-plugins/actions/move-selected-task-list-items.d.ts +0 -2
  19. package/dist/types-ts4.5/pm-plugins/actions.d.ts +0 -5
  20. package/dist/types-ts4.5/pm-plugins/commands.d.ts +0 -32
  21. package/dist/types-ts4.5/pm-plugins/helpers.d.ts +0 -103
  22. package/dist/types-ts4.5/pm-plugins/input-rules.d.ts +0 -7
  23. package/dist/types-ts4.5/pm-plugins/insert-commands.d.ts +0 -18
  24. package/dist/types-ts4.5/pm-plugins/keymaps.d.ts +0 -11
  25. package/dist/types-ts4.5/pm-plugins/main.d.ts +0 -8
  26. package/dist/types-ts4.5/pm-plugins/plugin-key.d.ts +0 -2
  27. package/dist/types-ts4.5/pm-plugins/task-list-indentation.d.ts +0 -36
  28. package/dist/types-ts4.5/pm-plugins/taskItemOnChange.d.ts +0 -2
  29. package/dist/types-ts4.5/pm-plugins/toggle-tasklist-commands.d.ts +0 -3
  30. package/dist/types-ts4.5/pm-plugins/transforms.d.ts +0 -10
  31. package/dist/types-ts4.5/pm-plugins/types.d.ts +0 -28
  32. package/dist/types-ts4.5/pm-plugins/utils/paste.d.ts +0 -6
  33. package/dist/types-ts4.5/pm-plugins/utils.d.ts +0 -12
  34. package/dist/types-ts4.5/tasksAndDecisionsPlugin.d.ts +0 -2
  35. package/dist/types-ts4.5/tasksAndDecisionsPluginType.d.ts +0 -38
  36. package/dist/types-ts4.5/types/index.d.ts +0 -99
  37. package/dist/types-ts4.5/ui/DecisionListBlockMenuItem/DecisionListBlockMenuItem.d.ts +0 -6
  38. package/dist/types-ts4.5/ui/Task/RequestToEditPopup.d.ts +0 -21
  39. package/dist/types-ts4.5/ui/Task/index.d.ts +0 -39
  40. package/dist/types-ts4.5/ui/Task/task-item-with-providers.d.ts +0 -30
  41. package/dist/types-ts4.5/ui/TaskListBlockMenuItem/TaskListBlockMenuItem.d.ts +0 -6
  42. package/dist/types-ts4.5/ui/TaskListMenuItem/TaskListMenuItem.d.ts +0 -10
  43. package/dist/types-ts4.5/ui/ToolbarDecision/index.d.ts +0 -18
  44. package/dist/types-ts4.5/ui/ToolbarTask/index.d.ts +0 -18
  45. package/dist/types-ts4.5/ui/toolbar-components.d.ts +0 -8
package/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # @atlaskit/editor-plugin-tasks-and-decisions
2
2
 
3
+ ## 15.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [`f2dc9097319f0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f2dc9097319f0) - ###
8
+ Dropped support for _legacy_ Typescript 4 types. **Typescript 5 is now the new minimum**.
9
+
10
+ Removes the `typesVersions` property and `dist/types-ts4.5` directory from the dist.
11
+
12
+ Types are now exclusively via the `"types": "dist/types/index.d.ts"` property.
13
+
14
+ ```diff
15
+ - "typesVersions": {
16
+ - ">=4.5 <4.9": {
17
+ - "*": [
18
+ - "dist/types-ts4.5/*",
19
+ - "dist/types-ts4.5/index.d.ts"
20
+ - ]
21
+ - }
22
+ - },
23
+ ```
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies
28
+
29
+ ## 14.2.5
30
+
31
+ ### Patch Changes
32
+
33
+ - Updated dependencies
34
+
3
35
  ## 14.2.4
4
36
 
5
37
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-tasks-and-decisions",
3
- "version": "14.2.4",
3
+ "version": "15.0.0",
4
4
  "description": "Tasks and decisions plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -16,47 +16,39 @@
16
16
  "module": "dist/esm/index.js",
17
17
  "module:es2019": "dist/es2019/index.js",
18
18
  "types": "dist/types/index.d.ts",
19
- "typesVersions": {
20
- ">=4.5 <4.9": {
21
- "*": [
22
- "dist/types-ts4.5/*",
23
- "dist/types-ts4.5/index.d.ts"
24
- ]
25
- }
26
- },
27
19
  "sideEffects": [
28
20
  "**/*.compiled.css"
29
21
  ],
30
22
  "atlaskit:src": "src/index.ts",
31
23
  "dependencies": {
32
- "@atlaskit/adf-schema": "^54.0.0",
33
- "@atlaskit/analytics-namespaced-context": "^7.3.0",
34
- "@atlaskit/css": "^0.19.0",
35
- "@atlaskit/editor-plugin-analytics": "^11.0.0",
36
- "@atlaskit/editor-plugin-block-menu": "^10.1.0",
37
- "@atlaskit/editor-plugin-context-identifier": "^11.0.0",
38
- "@atlaskit/editor-plugin-editor-viewmode": "^13.0.0",
39
- "@atlaskit/editor-plugin-selection": "^11.0.0",
40
- "@atlaskit/editor-plugin-toolbar": "^8.0.0",
41
- "@atlaskit/editor-plugin-type-ahead": "^11.3.0",
42
- "@atlaskit/editor-prosemirror": "^7.3.0",
43
- "@atlaskit/editor-shared-styles": "^3.11.0",
44
- "@atlaskit/editor-toolbar": "^1.10.0",
45
- "@atlaskit/editor-toolbar-model": "^0.5.0",
46
- "@atlaskit/heading": "^5.4.0",
47
- "@atlaskit/icon": "^35.4.0",
48
- "@atlaskit/platform-feature-flags": "^1.1.0",
49
- "@atlaskit/primitives": "^19.0.0",
50
- "@atlaskit/prosemirror-input-rules": "^3.7.0",
51
- "@atlaskit/task-decision": "^20.2.0",
52
- "@atlaskit/tmp-editor-statsig": "^102.0.0",
53
- "@atlaskit/tokens": "^13.4.0",
24
+ "@atlaskit/adf-schema": "^55.0.0",
25
+ "@atlaskit/analytics-namespaced-context": "^8.0.0",
26
+ "@atlaskit/css": "^1.0.0",
27
+ "@atlaskit/editor-plugin-analytics": "^12.0.0",
28
+ "@atlaskit/editor-plugin-block-menu": "^11.0.0",
29
+ "@atlaskit/editor-plugin-context-identifier": "^12.0.0",
30
+ "@atlaskit/editor-plugin-editor-viewmode": "^14.0.0",
31
+ "@atlaskit/editor-plugin-selection": "^12.0.0",
32
+ "@atlaskit/editor-plugin-toolbar": "^9.0.0",
33
+ "@atlaskit/editor-plugin-type-ahead": "^12.0.0",
34
+ "@atlaskit/editor-prosemirror": "^8.0.0",
35
+ "@atlaskit/editor-shared-styles": "^4.0.0",
36
+ "@atlaskit/editor-toolbar": "^2.0.0",
37
+ "@atlaskit/editor-toolbar-model": "^1.0.0",
38
+ "@atlaskit/heading": "^6.0.0",
39
+ "@atlaskit/icon": "^36.0.0",
40
+ "@atlaskit/platform-feature-flags": "^2.0.0",
41
+ "@atlaskit/primitives": "^20.0.0",
42
+ "@atlaskit/prosemirror-input-rules": "^4.0.0",
43
+ "@atlaskit/task-decision": "^21.0.0",
44
+ "@atlaskit/tmp-editor-statsig": "^104.0.0",
45
+ "@atlaskit/tokens": "^14.0.0",
54
46
  "@babel/runtime": "^7.0.0",
55
47
  "@compiled/react": "^0.20.0",
56
48
  "bind-event-listener": "^3.0.0"
57
49
  },
58
50
  "peerDependencies": {
59
- "@atlaskit/editor-common": "^115.15.0",
51
+ "@atlaskit/editor-common": "^116.0.0",
60
52
  "react": "^18.2.0",
61
53
  "react-dom": "^18.2.0",
62
54
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/tasks-and-decisions-plugin.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/tasks-and-decisions-plugin.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/tasks-and-decisions-plugin.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/tasks-and-decisions-plugin-type.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/tasks-and-decisions-plugin-type.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/tasks-and-decisions-plugin-type.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/types.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/types.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/types.d.ts"
17
10
  }
@@ -1 +0,0 @@
1
- export type { TasksAndDecisionsPlugin, TasksAndDecisionsPluginDependencies, } from '../tasksAndDecisionsPluginType';
@@ -1 +0,0 @@
1
- export { tasksAndDecisionsPlugin } from '../tasksAndDecisionsPlugin';
@@ -1 +0,0 @@
1
- export type { TaskDecisionPluginOptions, TasksAndDecisionsPluginOptions, TaskAndDecisionsSharedState, TaskDecisionListType, AddItemTransactionCreator, } from '../types/index';
@@ -1,3 +0,0 @@
1
- export { tasksAndDecisionsPlugin } from './tasksAndDecisionsPlugin';
2
- export type { TasksAndDecisionsPlugin, TasksAndDecisionsPluginDependencies, } from './tasksAndDecisionsPluginType';
3
- export type { TaskDecisionPluginOptions, TasksAndDecisionsPluginOptions, TaskAndDecisionsSharedState, TaskDecisionListType, AddItemTransactionCreator, } from './types';
@@ -1,54 +0,0 @@
1
- import type { IntlShape } from 'react-intl';
2
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
3
- import type { NodeView } from '@atlaskit/editor-prosemirror/view';
4
- /**
5
- * NodeView for the DecisionItem node.
6
- * It renders the decision item with its content and exposes the contentDOM to prosemirror.
7
- */
8
- export declare class DecisionItemNodeView implements NodeView {
9
- dom: Node;
10
- contentDOM?: HTMLElement;
11
- private icon;
12
- private intl;
13
- private hasChildren;
14
- /**
15
- * Updates the hasChildren state based on the node's child count by setting the `data-empty` attribute on the contentDOM.
16
- * @param node - The ProseMirror node to check for children.
17
- * @private
18
- */
19
- private updateHasChildren;
20
- private setIcon;
21
- private setIconAriaLabel;
22
- /**
23
- * Creates a new DecisionItemNodeView.
24
- * @import type {PMNode} from '@atlaskit/editor-prosemirror/model';
25
- * @import type {IntlShape} from 'react-intl';
26
- * @param {PMNode} node - The ProseMirror node representing the decision item.
27
- * @param {IntlShape} intl - The IntlShape for internationalization, used to format the placeholder text.
28
- * @example
29
- * const decisionItemNodeView = new DecisionItemNodeView(node, getIntl());
30
- */
31
- constructor(node: PMNode, intl: IntlShape);
32
- /**
33
- * Updates the node view when the ProseMirror node changes.
34
- * @import type {PMNode} from '@atlaskit/editor-prosemirror/model';
35
- * @param {PMNode} node - The ProseMirror node to update the view with.
36
- * @example
37
- * decisionItemNodeView.update(node);
38
- * @returns {boolean} - Returns true if the view was updated successfully.
39
- */
40
- update(node: PMNode): boolean;
41
- /**
42
- * Determines whether a mutation should be ignored by ProseMirror.
43
- * This prevents unnecessary node view destruction during DOM changes that don't affect our content.
44
- * @param mutation - The DOM mutation record or selection change
45
- * @returns true if the mutation should be ignored, false if it should be processed
46
- * @example
47
- * // Mutation outside contentDOM will be ignored
48
- * const shouldIgnore = decisionItemNodeView.ignoreMutation(mutationRecord);
49
- */
50
- ignoreMutation(mutation: MutationRecord | {
51
- target: Node;
52
- type: 'selection';
53
- }): boolean;
54
- }
@@ -1,37 +0,0 @@
1
- import type { IntlShape } from 'react-intl';
2
- import type { ExtractInjectionAPI, getPosHandlerNode } from '@atlaskit/editor-common/types';
3
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
4
- import type { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
5
- import type { TasksAndDecisionsPlugin } from '../tasksAndDecisionsPluginType';
6
- interface TaskItemNodeViewOptions {
7
- api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined;
8
- intl: IntlShape;
9
- placeholder?: string;
10
- }
11
- export declare class TaskItemNodeView implements NodeView {
12
- dom: Node;
13
- domElement: HTMLElement | undefined;
14
- contentDOM: HTMLElement | undefined;
15
- private node;
16
- private view;
17
- private getPos;
18
- private api;
19
- private readonly intl;
20
- private unbindInputDom;
21
- private emptyContent;
22
- private input?;
23
- constructor(node: PMNode, view: EditorView, getPos: getPosHandlerNode, { api, placeholder, intl }: TaskItemNodeViewOptions);
24
- private getContextIdentifierProvider;
25
- private getObjectAri;
26
- private handleOnClick;
27
- private handleOnChange;
28
- private isContentEmpty;
29
- private updatePlaceholder;
30
- update(node: PMNode): boolean;
31
- ignoreMutation(mutation: MutationRecord | {
32
- target: Node;
33
- type: 'selection';
34
- }): boolean;
35
- destroy(): void;
36
- }
37
- export {};
@@ -1,58 +0,0 @@
1
- import type { IntlShape } from 'react-intl';
2
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
3
- export declare const decisionItemToDOM: (node: PMNode, intl: IntlShape) => [
4
- string,
5
- {
6
- class: string;
7
- "data-decision-local-id": any;
8
- "data-decision-state": any;
9
- "data-prosemirror-node-name": string;
10
- },
11
- (string | [
12
- string,
13
- {
14
- contentEditable: boolean;
15
- "data-component": string;
16
- },
17
- (string | {
18
- "aria-label": string;
19
- role: string;
20
- } | (string | {
21
- "data-icon-source": string;
22
- height: string;
23
- role: string;
24
- viewBox: string;
25
- width: string;
26
- } | (string | {
27
- d: string;
28
- fill: string;
29
- "fill-rule": string;
30
- })[])[] | (string | {
31
- "data-icon-source": string;
32
- fill: string;
33
- height: string;
34
- role: string;
35
- viewBox: string;
36
- width: string;
37
- } | (string | {
38
- d: string;
39
- fill: string;
40
- "fill-rule": string;
41
- })[])[])[]
42
- ] | {
43
- "data-decision-wrapper": boolean;
44
- "data-testid": string;
45
- } | (string | {
46
- contentEditable: boolean;
47
- "data-component": string;
48
- "data-testid": string;
49
- })[] | (string | {
50
- "data-component": string;
51
- } | (string | number | {
52
- class: string;
53
- "data-empty"?: undefined;
54
- } | {
55
- class: string;
56
- "data-empty": string;
57
- })[])[])[]
58
- ];
@@ -1,11 +0,0 @@
1
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
- import type { TasksAndDecisionsPlugin } from '../../tasksAndDecisionsPluginType';
4
- type Props2 = {
5
- api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined;
6
- editorView: EditorView;
7
- getPos: () => number | undefined;
8
- isContentNodeEmpty: boolean;
9
- };
10
- export declare const useShowPlaceholder: ({ editorView, api, isContentNodeEmpty, getPos, }: Props2) => boolean;
11
- export {};
@@ -1,7 +0,0 @@
1
- import type { IntlShape } from 'react-intl';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
4
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
5
- import type { TasksAndDecisionsPlugin } from '../tasksAndDecisionsPluginType';
6
- import { TaskItemNodeView } from './TaskItemNodeView';
7
- export declare const taskView: (api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined, intl: IntlShape, placeholder?: string) => (node: PMNode, view: EditorView, getPos: () => number | undefined) => TaskItemNodeView;
@@ -1,28 +0,0 @@
1
- import type { IntlShape } from 'react-intl';
2
- import type { DOMOutputSpec, NodeSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
3
- /**
4
- * Wrapper for ADF taskItem node spec to augment toDOM implementation
5
- * with fallback UI for lazy node view rendering / window virtualization
6
- * @nodeSpecException:toDOM patch
7
- * @returns
8
- * @example
9
- */
10
- export declare const taskItemNodeSpec: () => NodeSpec;
11
- /**
12
- * Wrapper for ADF blockTaskItem node spec to augment toDOM implementation
13
- * with fallback UI for lazy node view rendering / window virtualization
14
- * @nodeSpecException:toDOM patch
15
- * @returns
16
- * @example
17
- */
18
- export declare const blockTaskItemNodeSpec: () => NodeSpec;
19
- /**
20
- * Converts a task item node to a DOM output specification.
21
- * This is used for rendering the task item in the editor.
22
- *
23
- * @param {Node} node - The ProseMirror node representing the task item.
24
- * @param {string} placeholder - The placeholder text to display when the task item is empty.
25
- * @returns A DOMOutputSpec representing the task item.
26
- */
27
- export declare function taskItemToDom(node: PMNode, placeholder: string, intl: IntlShape): DOMOutputSpec;
28
- export declare const lazyTaskItemToDom: (node: PMNode) => DOMOutputSpec;
@@ -1,2 +0,0 @@
1
- import type { NodeSpec } from '@atlaskit/editor-prosemirror/model';
2
- export declare const decisionItemSpecWithFixedToDOM: () => NodeSpec;
@@ -1,2 +0,0 @@
1
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
- export declare const isContentEmpty: (node: PMNode) => boolean;
@@ -1,2 +0,0 @@
1
- import type { Transaction } from '@atlaskit/editor-prosemirror/state';
2
- export declare function moveSelectedTaskListItems(tr: Transaction, indentDelta: number): Transaction | null;
@@ -1,5 +0,0 @@
1
- import type { TaskDecisionPluginState } from '../types';
2
- import type { TaskDecisionFocusByLocalIdAction, TaskDecisionSetProviderAction, TaskDecisionOpenRequestToEdit } from './types';
3
- export declare const focusTaskDecision: (state: TaskDecisionPluginState, action: TaskDecisionFocusByLocalIdAction) => TaskDecisionPluginState;
4
- export declare const setProvider: (state: TaskDecisionPluginState, action: TaskDecisionSetProviderAction) => TaskDecisionPluginState;
5
- export declare const openRequestEditPopup: (state: TaskDecisionPluginState, action: TaskDecisionOpenRequestToEdit) => TaskDecisionPluginState;
@@ -1,32 +0,0 @@
1
- import type { Command } from '@atlaskit/editor-common/types';
2
- import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
3
- export declare const liftSelection: Command;
4
- /**
5
- * Wraps the current selection in a task list, respecting a maximum indentation depth of 6 levels.
6
- *
7
- * - Normalizes the selection to ensure it covers complete task items.
8
- * - Determines the maximum depth of task list nesting within the selection.
9
- * - If the selection is already nested at or beyond the maximum depth, the command does nothing.
10
- * - Calculates the block range to wrap, handling both regular and block task items.
11
- * - Wraps the block in a task list to increase indentation or create a new task list if necessary.
12
- *
13
- * @param state - The current editor state.
14
- * @param dispatch - The dispatch function to apply the transaction.
15
- * @returns `true` if the command was handled (even if no changes were made), otherwise `false`.
16
- * @example
17
- * ```typescript
18
- * autoJoin(wrapSelectionInTaskList, ['taskList']))(state, dispatch);
19
- * ```
20
- */
21
- export declare const wrapSelectionInTaskList: Command;
22
- /**
23
- * Tries to move the paragraph content near the given position into the taskItem or decisionItem
24
- * before it.
25
- *
26
- * Looks backwards from the given position to find the "cut point" between the last taskItem and the
27
- * following paragraph. Then tries to move the content from that paragraph into the taskItem.
28
- *
29
- * @param $pos Position at the end of, or anywhere in paragraph following, the last taskItem
30
- * @see {joinToPreviousListItem}
31
- */
32
- export declare const joinAtCut: ($pos: ResolvedPos) => Command;
@@ -1,103 +0,0 @@
1
- import { NodeRange } from '@atlaskit/editor-prosemirror/model';
2
- import type { Node, NodeType, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
3
- import type { EditorState, Selection, Transaction } from '@atlaskit/editor-prosemirror/state';
4
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
5
- import type { TaskItemData } from './types';
6
- export declare const isInsideTaskOrDecisionItem: (state: EditorState) => boolean;
7
- export declare const isActionOrDecisionList: (node: Node) => boolean;
8
- export declare const isActionOrDecisionItem: (node: Node) => boolean;
9
- export declare const isInsideTask: (state: EditorState) => boolean;
10
- export declare const isInsideDecision: (state: EditorState) => boolean;
11
- export declare const isTable: (node?: Node | null) => boolean;
12
- /**
13
- * Creates a NodeRange around the given taskItem and the following
14
- * ("nested") taskList, if one exists.
15
- */
16
- export declare const getBlockRange: ({ $from, $to, }: {
17
- $from: ResolvedPos;
18
- $to: ResolvedPos;
19
- }) => NodeRange | null;
20
- /**
21
- * Calculates the current indent level of the selection within a task list in the ProseMirror document.
22
- *
23
- * The indent level is determined by finding the depth difference between the selection and the furthest parent
24
- * node of type `taskList`. If the selection is inside a `blockTaskItem`, the calculation is adjusted to avoid
25
- * counting nested block items as additional indent levels.
26
- *
27
- * @param selection - The current ProseMirror selection.
28
- * @returns The indent level as a number, or `null` if the selection is not inside a task list.
29
- * @example
30
- * ```typescript
31
- * const indentLevel = getCurrentIndentLevel(editorState.selection);
32
- * ```
33
- */
34
- export declare const getCurrentIndentLevel: (selection: Selection) => number | null;
35
- /**
36
- * Finds the index of the current task item in relation to the closest taskList
37
- */
38
- export declare const getTaskItemIndex: (state: EditorState) => number;
39
- /**
40
- * Walk outwards from a position until we encounter the (inside) start of
41
- * the next node, or reach the end of the document.
42
- *
43
- * @param $startPos Position to start walking from.
44
- */
45
- export declare const walkOut: ($startPos: ResolvedPos) => ResolvedPos;
46
- /**
47
- * Finds the height of a tree-like structure, given any position inside it.
48
- *
49
- * Traverses from the top of the tree to all leaf nodes, and returns the length
50
- * of the longest path.
51
- *
52
- * This means you can use it with things like taskList, which
53
- * do not nest themselves inside taskItems but rather as adjacent children.
54
- *
55
- * @param $pos Any position inside the tree.
56
- * @param types The node types to consider traversable
57
- */
58
- export declare const subtreeHeight: ($from: ResolvedPos, $to: ResolvedPos, types: NodeType[]) => number;
59
- /**
60
- * Determines if the current selection is inside an empty taskItem, decisionItem, or blockTaskItem.
61
- *
62
- * @param state - The current EditorState.
63
- * @returns `true` if the taskItem, decisionItem, or blockTaskItem is empty; otherwise, `false`.
64
- */
65
- export declare const isEmptyTaskDecision: (state: EditorState) => boolean;
66
- /**
67
- * Lifts a taskItem and any directly following taskList
68
- * (taskItem and its "nested children") out one level.
69
- *
70
- * @param tr Transaction to base steps on
71
- * @param $from Start of range you want to lift
72
- * @param $to End of range you want to lift (can be same as `$from`)
73
- */
74
- export declare const liftBlock: (tr: Transaction, $from: ResolvedPos, $to: ResolvedPos) => Transaction | null;
75
- export declare function getTaskItemDataAtPos(view: EditorView): {
76
- localId: any;
77
- pos: number;
78
- } | undefined;
79
- export declare function getAllTaskItemsDataInRootTaskList(view: EditorView): {
80
- index: number;
81
- node: Node;
82
- pos: number;
83
- }[] | undefined;
84
- export declare function getCurrentTaskItemIndex(view: EditorView, allTaskItems: Array<{
85
- index: number;
86
- node: Node;
87
- pos: number;
88
- }>): number;
89
- export declare function getTaskItemDataToFocus(view: EditorView, direction: 'next' | 'previous'): {
90
- localId: any;
91
- pos: number;
92
- } | undefined;
93
- export declare function focusCheckbox(view: EditorView, taskItemData?: TaskItemData): void;
94
- export declare function focusCheckboxAndUpdateSelection(view: EditorView, taskItemData: TaskItemData): void;
95
- export declare function removeCheckboxFocus(view: EditorView): void;
96
- export declare function openRequestEditPopupAt(view: EditorView, pos: number): void;
97
- export declare function closeRequestEditPopupAt(view: EditorView): void;
98
- export declare function findFirstParentListNode($pos: ResolvedPos): {
99
- node: Node;
100
- pos: number;
101
- } | null;
102
- export declare const isInFirstTextblockOfBlockTaskItem: (state: EditorState) => boolean;
103
- export declare const isInLastTextblockOfBlockTaskItem: (state: EditorState) => boolean;
@@ -1,7 +0,0 @@
1
- import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
2
- import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
- import type { FeatureFlags } from '@atlaskit/editor-common/types';
4
- import type { Schema } from '@atlaskit/editor-prosemirror/model';
5
- import type { GetContextIdentifier } from '../types';
6
- export declare const inputRulePlugin: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, getContextIdentifierProvider: GetContextIdentifier) => (schema: Schema, featureFlags: FeatureFlags) => SafePlugin;
7
- export default inputRulePlugin;
@@ -1,18 +0,0 @@
1
- import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
2
- import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
- import type { Command, TOOLBAR_MENU_TYPE } from '@atlaskit/editor-common/types';
4
- import type { NodeType, ResolvedPos, Schema } from '@atlaskit/editor-prosemirror/model';
5
- import type { EditorState, Selection, Transaction } from '@atlaskit/editor-prosemirror/state';
6
- import type { TaskDecisionProvider } from '@atlaskit/task-decision/types';
7
- import type { AddItemAttrs, AddItemTransactionCreator, GetContextIdentifier, TaskDecisionInputMethod, TaskDecisionListType } from '../types';
8
- export declare const getListTypes: (listType: TaskDecisionListType, schema: Schema) => {
9
- item: NodeType;
10
- list: NodeType;
11
- };
12
- export declare const insertTaskDecisionAction: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, getContextIdentifierProvider: GetContextIdentifier) => (state: EditorState, listType: TaskDecisionListType, inputMethod?: INPUT_METHOD.FORMATTING | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.ELEMENT_BROWSER | TaskDecisionInputMethod, addItem?: AddItemTransactionCreator, listLocalId?: string, itemLocalId?: string, itemAttrs?: AddItemAttrs) => Transaction;
13
- export declare const insertTaskDecisionCommand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, getContextIdentifierProvider: GetContextIdentifier) => (listType: TaskDecisionListType, inputMethod?: INPUT_METHOD.FORMATTING | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.ELEMENT_BROWSER | TOOLBAR_MENU_TYPE, addItem?: AddItemTransactionCreator, listLocalId?: string, itemLocalId?: string) => Command;
14
- export declare const insertTaskDecisionWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, getContextIdentifierProvider: GetContextIdentifier) => (state: EditorState, listType: TaskDecisionListType, inputMethod: TaskDecisionInputMethod, addAndCreateList: AddItemTransactionCreator, addToList?: AddItemTransactionCreator, listLocalId?: string, itemLocalId?: string, itemAttrs?: AddItemAttrs) => Transaction | null;
15
- export declare const isSupportedSourceNode: (schema: Schema, selection: Selection) => boolean;
16
- export declare const changeInDepth: (before: ResolvedPos, after: ResolvedPos) => number;
17
- export declare const createListAtSelection: (tr: Transaction, list: NodeType, item: NodeType, schema: Schema, state: EditorState, listLocalId?: string, itemLocalId?: string, itemAttrs?: AddItemAttrs) => Transaction | null;
18
- export declare const setProvider: (provider?: TaskDecisionProvider) => (tr: Transaction) => Transaction;
@@ -1,11 +0,0 @@
1
- import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
2
- import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
- import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
4
- import type { Command, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
5
- import type { Schema } from '@atlaskit/editor-prosemirror/model';
6
- import type { TasksAndDecisionsPlugin } from '../tasksAndDecisionsPluginType';
7
- type IndentationInputMethod = INPUT_METHOD.KEYBOARD | INPUT_METHOD.TOOLBAR | INPUT_METHOD.FLOATING_TB;
8
- export declare const getUnindentCommand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputMethod?: IndentationInputMethod) => Command;
9
- export declare const getIndentCommand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputMethod?: IndentationInputMethod) => Command;
10
- export declare function keymapPlugin(_schema: Schema, api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined, allowNestedTasks?: boolean, consumeTabs?: boolean): SafePlugin | undefined;
11
- export default keymapPlugin;
@@ -1,8 +0,0 @@
1
- import type { IntlShape } from 'react-intl';
2
- import type { Dispatch, EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
3
- import type { PortalProviderAPI } from '@atlaskit/editor-common/portal';
4
- import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
5
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
6
- import type { TasksAndDecisionsPlugin } from '../tasksAndDecisionsPluginType';
7
- import type { TaskDecisionPluginState } from '../types';
8
- export declare function createPlugin(portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, dispatch: Dispatch, api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined, getIntl: () => IntlShape, useLongPressSelection?: boolean, hasEditPermission?: boolean, hasRequestedEditPermission?: boolean, requestToEditContent?: () => void, taskPlaceholder?: string): SafePlugin<TaskDecisionPluginState>;
@@ -1,2 +0,0 @@
1
- import { PluginKey } from '@atlaskit/editor-prosemirror/state';
2
- export declare const stateKey: PluginKey;
@@ -1,36 +0,0 @@
1
- import type { FlattenedItem, FlattenListOptions, FlattenListResult } from '@atlaskit/editor-common/lists';
2
- import type { Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
3
- /**
4
- * Flattens a taskList tree into an array of task items with computed depths.
5
- * Only selected items have their depth adjusted by indentDelta.
6
- *
7
- * Delegates to the shared `flattenList` with task-list-specific callbacks.
8
- */
9
- export declare function flattenTaskList(options: FlattenListOptions): FlattenListResult | null;
10
- /**
11
- * Rebuilds a taskList tree from a flattened array of task items.
12
- * Uses a stack-based approach to create proper nesting.
13
- *
14
- * Preserves original taskList attributes (e.g. localId) for wrappers
15
- * of unselected items. Only generates fresh UUIDs for newly-created
16
- * nesting levels (i.e. when items were moved via indent/outdent).
17
- *
18
- * Given items with depths [A:0, B:1, C:2, D:1, E:0], produces:
19
- *
20
- * taskList
21
- * taskItem 'A'
22
- * taskList
23
- * taskItem 'B'
24
- * taskList
25
- * taskItem 'C'
26
- * taskItem 'D'
27
- * taskItem 'E'
28
- *
29
- * Also computes `contentStartOffsets`: for each item (by index),
30
- * the offset within the returned fragment where the item's content
31
- * begins. This is used for accurate selection restoration.
32
- */
33
- export declare function rebuildTaskList(items: FlattenedItem[], schema: Schema): {
34
- contentStartOffsets: number[];
35
- node: PMNode;
36
- } | null;
@@ -1,2 +0,0 @@
1
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
2
- export declare function taskItemOnChange(view: EditorView, event: Event): void;
@@ -1,3 +0,0 @@
1
- import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
2
- import type { EditorCommand } from '@atlaskit/editor-common/types';
3
- export declare const toggleTaskList: (editorAnalyticsAPI?: EditorAnalyticsAPI) => (targetType?: "orderedList" | "bulletList" | "paragraph") => EditorCommand;
@@ -1,10 +0,0 @@
1
- import type { Node, Schema } from '@atlaskit/editor-prosemirror/model';
2
- import type { Transaction } from '@atlaskit/editor-prosemirror/state';
3
- interface ApplyTaskListNormalisationFixesOptions {
4
- doc: Node;
5
- schema: Schema;
6
- tr: Transaction;
7
- transactions: readonly Transaction[];
8
- }
9
- export declare function applyTaskListNormalisationFixes({ doc, schema, tr, transactions, }: ApplyTaskListNormalisationFixesOptions): Transaction;
10
- export {};
@@ -1,28 +0,0 @@
1
- import type { TaskDecisionProvider } from '@atlaskit/task-decision/types';
2
- export declare enum ACTIONS {
3
- SET_PROVIDER = 0,
4
- FOCUS_BY_LOCALID = 1,
5
- OPEN_REQUEST_TO_EDIT_POPUP = 2
6
- }
7
- export type TaskItemData = {
8
- localId: string | null;
9
- pos: number;
10
- };
11
- export type TaskDecisionSetProviderAction = {
12
- action: ACTIONS.SET_PROVIDER;
13
- data: TaskDecisionProvider;
14
- };
15
- export type TaskDecisionFocusByLocalIdAction = {
16
- action: ACTIONS.FOCUS_BY_LOCALID;
17
- data: string;
18
- };
19
- export type TaskDecisionOpenRequestToEdit = {
20
- action: ACTIONS.OPEN_REQUEST_TO_EDIT_POPUP;
21
- data: number | null;
22
- };
23
- export type TaskDecisionPluginAction = TaskDecisionSetProviderAction | TaskDecisionFocusByLocalIdAction | TaskDecisionOpenRequestToEdit;
24
- export type TaskDecisionEditPermissionCommand = {
25
- hasEditPermission?: boolean;
26
- hasRequestedEditPermission?: boolean;
27
- };
28
- export type TaskDecisionPluginCommand = TaskDecisionEditPermissionCommand;
@@ -1,6 +0,0 @@
1
- import type { FontSizeMarkAttrs } from '@atlaskit/adf-schema';
2
- import { Slice } from '@atlaskit/editor-prosemirror/model';
3
- import type { Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
4
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
5
- export declare const normalizeNodeForTaskTextSize: (node: PMNode, schema: Schema, smallTextAttrs: FontSizeMarkAttrs | false) => PMNode[];
6
- export declare const tempTransformSliceToRemoveBlockTaskItem: (slice: Slice, view: EditorView) => Slice;
@@ -1,12 +0,0 @@
1
- import type { Node as PMNode, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
- import { Selection } from '@atlaskit/editor-prosemirror/state';
3
- export declare const normalizeTaskItemsSelection: (selection: Selection) => Selection;
4
- /**
5
- * Gets the blockTaskItem node and whether it has a paragraph child if it exists near the given resolved position.
6
- * @param $from resolved position, typically from the selection when the selection is an empty selection at the start of a task item
7
- * @returns {{ blockTaskItemNode: PMNode; hasParagraph: boolean } | false} An object with blockTaskItemNode and hasParagraph if found, or false if there is no blockTaskItem node.
8
- */
9
- export declare const findBlockTaskItem: ($from: ResolvedPos) => {
10
- blockTaskItemNode: PMNode;
11
- hasParagraph: boolean;
12
- } | false;
@@ -1,2 +0,0 @@
1
- import type { TasksAndDecisionsPlugin } from './tasksAndDecisionsPluginType';
2
- export declare const tasksAndDecisionsPlugin: TasksAndDecisionsPlugin;
@@ -1,38 +0,0 @@
1
- import type { _MarkdownModePluginStub, EditorCommand, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
- import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
- import type { BlockMenuPlugin } from '@atlaskit/editor-plugin-block-menu';
4
- import type { ContextIdentifierPlugin } from '@atlaskit/editor-plugin-context-identifier';
5
- import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
6
- import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
7
- import type { ToolbarPlugin } from '@atlaskit/editor-plugin-toolbar';
8
- import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
9
- import type { TaskDecisionProvider } from '@atlaskit/task-decision/types';
10
- import type { insertTaskDecisionCommand } from './pm-plugins/insert-commands';
11
- import type { getIndentCommand, getUnindentCommand } from './pm-plugins/keymaps';
12
- import type { TaskAndDecisionsSharedState, TasksAndDecisionsPluginOptions } from './types';
13
- export type TasksAndDecisionsPluginDependencies = [
14
- OptionalPlugin<TypeAheadPlugin>,
15
- OptionalPlugin<AnalyticsPlugin>,
16
- OptionalPlugin<ContextIdentifierPlugin>,
17
- OptionalPlugin<EditorViewModePlugin>,
18
- OptionalPlugin<BlockMenuPlugin>,
19
- OptionalPlugin<SelectionPlugin>,
20
- OptionalPlugin<ToolbarPlugin>,
21
- OptionalPlugin<_MarkdownModePluginStub>
22
- ];
23
- export type TasksAndDecisionsPlugin = NextEditorPlugin<'taskDecision', {
24
- actions: {
25
- indentTaskList: ReturnType<typeof getIndentCommand>;
26
- insertTaskDecision: ReturnType<typeof insertTaskDecisionCommand>;
27
- outdentTaskList: ReturnType<typeof getUnindentCommand>;
28
- setProvider: (provider: Promise<TaskDecisionProvider>) => Promise<boolean>;
29
- };
30
- commands: {
31
- toggleTaskList: (targetType?: 'orderedList' | 'bulletList' | 'paragraph') => EditorCommand;
32
- updateEditPermission: (hasEditPermission: boolean | undefined) => EditorCommand;
33
- updateHasRequestedEditPermission: (hasRequestedEditPermission: boolean) => EditorCommand;
34
- };
35
- dependencies: TasksAndDecisionsPluginDependencies;
36
- pluginConfiguration: TasksAndDecisionsPluginOptions | undefined;
37
- sharedState: TaskAndDecisionsSharedState | undefined;
38
- }>;
@@ -1,99 +0,0 @@
1
- import type { BlockTaskItemDefinition, DecisionItemDefinition, TaskItemDefinition } from '@atlaskit/adf-schema';
2
- import type { INPUT_METHOD, USER_CONTEXT } from '@atlaskit/editor-common/analytics';
3
- import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
4
- import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
5
- import type { NodeType } from '@atlaskit/editor-prosemirror/model';
6
- import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
7
- import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
8
- import type { TaskDecisionProvider } from '@atlaskit/task-decision/types';
9
- export type TaskDecisionListType = 'taskList' | 'decisionList';
10
- export type TaskDecisionInputMethod = INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.FORMATTING | INPUT_METHOD.KEYBOARD | INPUT_METHOD.ELEMENT_BROWSER;
11
- export type ContextData = {
12
- containerId: string;
13
- objectId: string;
14
- userContext: USER_CONTEXT;
15
- };
16
- export type AddItemAttrs = Partial<DecisionItemDefinition['attrs']> | Partial<TaskItemDefinition['attrs']> | Partial<BlockTaskItemDefinition['attrs']>;
17
- export type AddItemTransactionCreator = (opts: {
18
- item: NodeType;
19
- itemAttrs?: AddItemAttrs;
20
- itemLocalId: string;
21
- list: NodeType;
22
- listLocalId: string;
23
- state: EditorState;
24
- tr: Transaction;
25
- }) => Transaction | null;
26
- /**
27
- * Interface representing the options for the TaskDecisionPlugin.
28
- * Extends the LongPressSelectionPluginOptions interface.
29
- */
30
- export interface TasksAndDecisionsPluginOptions extends LongPressSelectionPluginOptions {
31
- /**
32
- * Allows the blockTaskItem node to be a child of taskList (taskItem variant that supports block children - currently only supports extension and is intended to support Confluence TinyMCE migration flows in conjunction with the Legacy Content Extension)
33
- */
34
- allowBlockTaskItem?: boolean;
35
- /**
36
- * Indicates whether nested tasks are allowed.
37
- * @default false
38
- */
39
- allowNestedTasks?: boolean;
40
- /**
41
- * Indicates whether tab key presses should be consumed.
42
- * @default false
43
- */
44
- consumeTabs?: boolean;
45
- /**
46
- * Indicates whether the user has permission to edit.
47
- * @default false
48
- */
49
- hasEditPermission?: boolean;
50
- /**
51
- * Indicates whether the user has requested permission to edit.
52
- * @default false
53
- */
54
- hasRequestedEditPermission?: boolean;
55
- /**
56
- * Description of the quick insert for creating action items.
57
- */
58
- quickInsertActionDescription?: string;
59
- /**
60
- * Function to request edit permission.
61
- */
62
- requestToEditContent?: () => void;
63
- /**
64
- * The provider for tasks and decisions.
65
- */
66
- taskDecisionProvider?: Promise<TaskDecisionProvider>;
67
- /**
68
- * Placeholder text to display when creating a task.
69
- */
70
- taskPlaceholder?: string;
71
- }
72
- /**
73
- * @private
74
- * @deprecated Use {@link TasksAndDecisionsPluginOptions} instead.
75
- * @see https://product-fabric.atlassian.net/browse/ED-27496
76
- */
77
- export type TaskDecisionPluginOptions = TasksAndDecisionsPluginOptions;
78
- export type TaskDecisionPluginState = {
79
- decorations: DecorationSet;
80
- focusedTaskItemLocalId: string | null;
81
- hasEditPermission?: boolean;
82
- hasRequestedEditPermission?: boolean;
83
- insideTaskDecisionItem: boolean;
84
- openRequestToEditPopupAt?: number | null;
85
- requestToEditContent?: () => void;
86
- taskDecisionProvider: TaskDecisionProvider | undefined;
87
- };
88
- export type TaskAndDecisionsSharedState = Pick<TaskDecisionPluginState, 'focusedTaskItemLocalId' | 'hasEditPermission' | 'requestToEditContent' | 'taskDecisionProvider' | 'hasRequestedEditPermission' | 'openRequestToEditPopupAt'> & {
89
- indentDisabled: boolean;
90
- isInsideTask: boolean;
91
- outdentDisabled: boolean;
92
- };
93
- export type GetContextIdentifier = () => ContextIdentifierProvider | undefined;
94
- export type TaskItemState = 'DONE' | 'TODO';
95
- export type TaskItemInfoMeta = {
96
- checkState: TaskItemState;
97
- from: number;
98
- to: number;
99
- };
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { TasksAndDecisionsPlugin } from '../../tasksAndDecisionsPluginType';
4
- export declare const DecisionListBlockMenuItem: ({ api, }: {
5
- api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined;
6
- }) => React.JSX.Element | null;
@@ -1,21 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsxFrag jsx
4
- * @jsx jsx
5
- */
6
- import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
7
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
8
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
9
- import type { TasksAndDecisionsPlugin } from '../../tasksAndDecisionsPluginType';
10
- interface Props {
11
- api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined;
12
- boundariesElement?: HTMLElement;
13
- dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
14
- editorView: EditorView;
15
- element: HTMLElement;
16
- mountTo?: HTMLElement;
17
- onClose: () => void;
18
- scrollableElement?: HTMLElement;
19
- }
20
- export declare const RequestToEditPopup: ({ element, api, editorView, onClose, mountTo, boundariesElement, scrollableElement, }: Props) => JSX.Element | null;
21
- export {};
@@ -1,39 +0,0 @@
1
- import type { ReactElement, Ref } from 'react';
2
- import React, { PureComponent } from 'react';
3
- import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
4
- import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
5
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
6
- import type { ContentRef } from '@atlaskit/task-decision';
7
- import type { TasksAndDecisionsPlugin } from '../../tasksAndDecisionsPluginType';
8
- import type { TaskAndDecisionsSharedState } from '../../types';
9
- export interface TaskProps {
10
- api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined;
11
- children?: ReactElement<any>;
12
- contentRef?: ContentRef;
13
- disabled?: boolean;
14
- disableOnChange?: boolean;
15
- inputRef?: Ref<HTMLInputElement>;
16
- isDone: boolean;
17
- isFocused?: boolean;
18
- onChange?: (taskId: string, isChecked: boolean) => void;
19
- onClick?: () => void;
20
- placeholder?: string;
21
- providers?: ProviderFactory;
22
- showPlaceholder?: boolean;
23
- taskId: string;
24
- }
25
- type TaskItemProps = TaskProps & WrappedComponentProps & {
26
- taskDecisionProvider: TaskAndDecisionsSharedState['taskDecisionProvider'] | undefined;
27
- };
28
- export declare class TaskItem extends PureComponent<TaskItemProps, Object> {
29
- static displayName: string;
30
- private providerFactory;
31
- constructor(props: TaskItemProps);
32
- componentWillUnmount(): void;
33
- private renderWithProvider;
34
- render(): React.JSX.Element;
35
- }
36
- declare const _default_1: React.FC<WithIntlProps<TaskProps & WrappedComponentProps>> & {
37
- WrappedComponent: React.ComponentType<TaskProps & WrappedComponentProps>;
38
- };
39
- export default _default_1;
@@ -1,30 +0,0 @@
1
- import type { ReactElement } from 'react';
2
- import React, { Component } from 'react';
3
- import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
4
- import type { ContentRef, TaskDecisionProvider } from '@atlaskit/task-decision';
5
- export interface Props {
6
- children?: ReactElement<any>;
7
- contentRef?: ContentRef;
8
- contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
9
- inputRef?: React.Ref<HTMLInputElement>;
10
- isDone: boolean;
11
- isFocused?: boolean;
12
- onChange?: (taskId: string, isChecked: boolean) => void;
13
- placeholder?: string;
14
- showPlaceholder?: boolean;
15
- taskDecisionProvider?: Promise<TaskDecisionProvider>;
16
- taskId: string;
17
- }
18
- export interface State {
19
- resolvedContextProvider?: ContextIdentifierProvider;
20
- }
21
- export default class TaskItemWithProviders extends Component<Props, State> {
22
- static displayName: string;
23
- state: State;
24
- private mounted;
25
- componentDidMount(): void;
26
- componentDidUpdate(prevProps: Props): void;
27
- componentWillUnmount(): void;
28
- private updateContextIdentifierProvider;
29
- render(): React.JSX.Element;
30
- }
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { TasksAndDecisionsPlugin } from '../../tasksAndDecisionsPluginType';
4
- export declare const TaskListBlockMenuItem: ({ api, }: {
5
- api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined;
6
- }) => React.JSX.Element | null;
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { ToolbarComponentTypes } from '@atlaskit/editor-toolbar-model';
4
- import type { TasksAndDecisionsPlugin } from '../../tasksAndDecisionsPluginType';
5
- type TaskListMenuItemProps = {
6
- api?: ExtractInjectionAPI<TasksAndDecisionsPlugin>;
7
- parents?: ToolbarComponentTypes;
8
- };
9
- export declare const TaskListMenuItem: ({ api }: TaskListMenuItemProps) => React.JSX.Element;
10
- export {};
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
3
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
4
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
5
- import type { TasksAndDecisionsPlugin } from '../../tasksAndDecisionsPluginType';
6
- export interface Props {
7
- editorAPI: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined;
8
- editorView?: EditorView;
9
- isDisabled?: boolean;
10
- isReducedSpacing?: boolean;
11
- }
12
- export interface State {
13
- disabled: boolean;
14
- }
15
- declare const _default_1: React.FC<WithIntlProps<Props & WrappedComponentProps>> & {
16
- WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
17
- };
18
- export default _default_1;
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
3
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
4
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
5
- import type { TasksAndDecisionsPlugin } from '../../tasksAndDecisionsPluginType';
6
- export interface Props {
7
- editorAPI: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined;
8
- editorView?: EditorView;
9
- isDisabled?: boolean;
10
- isReducedSpacing?: boolean;
11
- }
12
- export interface State {
13
- disabled: boolean;
14
- }
15
- declare const _default_1: React.FC<WithIntlProps<Props & WrappedComponentProps>> & {
16
- WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
17
- };
18
- export default _default_1;
@@ -1,8 +0,0 @@
1
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
- import type { RegisterComponent } from '@atlaskit/editor-toolbar-model';
3
- import type { TasksAndDecisionsPlugin } from '../tasksAndDecisionsPluginType';
4
- type GetTasksAndDecisionsToolbarComponentsProps = {
5
- api?: ExtractInjectionAPI<TasksAndDecisionsPlugin>;
6
- };
7
- export declare const getTasksAndDecisionsToolbarComponents: ({ api, }: GetTasksAndDecisionsToolbarComponentsProps) => RegisterComponent[];
8
- export {};