@atlaskit/editor-plugin-tasks-and-decisions 11.0.0 → 11.0.2
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 +12 -0
- package/dist/cjs/pm-plugins/insert-commands.js +3 -1
- package/dist/cjs/tasksAndDecisionsPlugin.js +4 -4
- package/dist/cjs/ui/Task/index.js +4 -1
- package/dist/cjs/ui/ToolbarDecision/index.js +4 -1
- package/dist/cjs/ui/ToolbarTask/index.js +4 -1
- package/dist/es2019/pm-plugins/insert-commands.js +3 -1
- package/dist/es2019/tasksAndDecisionsPlugin.js +4 -4
- package/dist/es2019/ui/Task/index.js +4 -1
- package/dist/es2019/ui/ToolbarDecision/index.js +4 -1
- package/dist/es2019/ui/ToolbarTask/index.js +4 -1
- package/dist/esm/pm-plugins/insert-commands.js +3 -1
- package/dist/esm/tasksAndDecisionsPlugin.js +4 -4
- package/dist/esm/ui/Task/index.js +4 -1
- package/dist/esm/ui/ToolbarDecision/index.js +4 -1
- package/dist/esm/ui/ToolbarTask/index.js +4 -1
- package/dist/types/nodeviews/taskItemNodeSpec.d.ts +3 -3
- package/dist/types/nodeviews/toDOM-fixes/decisionItem.d.ts +2 -1
- package/dist/types/pm-plugins/helpers.d.ts +1 -1
- package/dist/types/pm-plugins/insert-commands.d.ts +2 -2
- package/dist/types/pm-plugins/plugin-key.d.ts +1 -1
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/ui/Task/index.d.ts +3 -3
- package/dist/types/ui/ToolbarDecision/index.d.ts +3 -3
- package/dist/types/ui/ToolbarTask/index.d.ts +3 -3
- package/dist/types-ts4.5/nodeviews/taskItemNodeSpec.d.ts +3 -3
- package/dist/types-ts4.5/nodeviews/toDOM-fixes/decisionItem.d.ts +2 -1
- package/dist/types-ts4.5/pm-plugins/helpers.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/insert-commands.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/plugin-key.d.ts +1 -1
- package/dist/types-ts4.5/types/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/Task/index.d.ts +3 -3
- package/dist/types-ts4.5/ui/ToolbarDecision/index.d.ts +3 -3
- package/dist/types-ts4.5/ui/ToolbarTask/index.d.ts +3 -3
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,7 @@ var _model = require("@atlaskit/editor-prosemirror/model");
|
|
|
14
14
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
15
15
|
var _transform = require("@atlaskit/editor-prosemirror/transform");
|
|
16
16
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
17
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
18
|
var _pluginKey = require("./plugin-key");
|
|
18
19
|
var _types = require("./types");
|
|
19
20
|
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; }
|
|
@@ -38,13 +39,14 @@ var generateAnalyticsPayload = function generateAnalyticsPayload(listType, conte
|
|
|
38
39
|
objectId = contextData.objectId;
|
|
39
40
|
userContext = contextData.userContext;
|
|
40
41
|
}
|
|
42
|
+
var resolvedInputMethod = (0, _platformFeatureFlags.fg)('platform_editor_element_browser_analytic') ? inputMethod : _analytics.INPUT_METHOD.QUICK_INSERT;
|
|
41
43
|
return {
|
|
42
44
|
action: _analytics.ACTION.INSERTED,
|
|
43
45
|
actionSubject: _analytics.ACTION_SUBJECT.DOCUMENT,
|
|
44
46
|
actionSubjectId: listType === 'taskList' ? _analytics.ACTION_SUBJECT_ID.ACTION : _analytics.ACTION_SUBJECT_ID.DECISION,
|
|
45
47
|
eventType: _analytics.EVENT_TYPE.TRACK,
|
|
46
48
|
attributes: {
|
|
47
|
-
inputMethod:
|
|
49
|
+
inputMethod: resolvedInputMethod,
|
|
48
50
|
containerAri: containerId,
|
|
49
51
|
objectAri: objectId,
|
|
50
52
|
userContext: userContext,
|
|
@@ -341,9 +341,9 @@ var tasksAndDecisionsPlugin = exports.tasksAndDecisionsPlugin = function tasksAn
|
|
|
341
341
|
icon: function icon() {
|
|
342
342
|
return /*#__PURE__*/React.createElement(_quickInsert.IconAction, null);
|
|
343
343
|
},
|
|
344
|
-
action: function action(insert, state) {
|
|
344
|
+
action: function action(insert, state, source) {
|
|
345
345
|
var _api$analytics6;
|
|
346
|
-
return (0, _insertCommands.insertTaskDecisionAction)(api === null || api === void 0 || (_api$analytics6 = api.analytics) === null || _api$analytics6 === void 0 ? void 0 : _api$analytics6.actions, getIdentifierProvider)(state, 'taskList', _analytics.INPUT_METHOD.QUICK_INSERT, addItem(insert, 'taskList', state.schema));
|
|
346
|
+
return (0, _insertCommands.insertTaskDecisionAction)(api === null || api === void 0 || (_api$analytics6 = api.analytics) === null || _api$analytics6 === void 0 ? void 0 : _api$analytics6.actions, getIdentifierProvider)(state, 'taskList', source !== null && source !== void 0 ? source : _analytics.INPUT_METHOD.QUICK_INSERT, addItem(insert, 'taskList', state.schema));
|
|
347
347
|
}
|
|
348
348
|
}, {
|
|
349
349
|
id: 'decision',
|
|
@@ -354,9 +354,9 @@ var tasksAndDecisionsPlugin = exports.tasksAndDecisionsPlugin = function tasksAn
|
|
|
354
354
|
icon: function icon() {
|
|
355
355
|
return /*#__PURE__*/React.createElement(_quickInsert.IconDecision, null);
|
|
356
356
|
},
|
|
357
|
-
action: function action(insert, state) {
|
|
357
|
+
action: function action(insert, state, source) {
|
|
358
358
|
var _api$analytics7;
|
|
359
|
-
return (0, _insertCommands.insertTaskDecisionAction)(api === null || api === void 0 || (_api$analytics7 = api.analytics) === null || _api$analytics7 === void 0 ? void 0 : _api$analytics7.actions, getIdentifierProvider)(state, 'decisionList', _analytics.INPUT_METHOD.QUICK_INSERT, addItem(insert, 'decisionList', state.schema));
|
|
359
|
+
return (0, _insertCommands.insertTaskDecisionAction)(api === null || api === void 0 || (_api$analytics7 = api.analytics) === null || _api$analytics7 === void 0 ? void 0 : _api$analytics7.actions, getIdentifierProvider)(state, 'decisionList', source !== null && source !== void 0 ? source : _analytics.INPUT_METHOD.QUICK_INSERT, addItem(insert, 'decisionList', state.schema));
|
|
360
360
|
}
|
|
361
361
|
}];
|
|
362
362
|
}
|
|
@@ -82,4 +82,7 @@ var TaskItemWrapper = function TaskItemWrapper(props) {
|
|
|
82
82
|
taskDecisionProvider: provider
|
|
83
83
|
}, props));
|
|
84
84
|
};
|
|
85
|
-
|
|
85
|
+
|
|
86
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
87
|
+
var _default_1 = (0, _reactIntlNext.injectIntl)(TaskItemWrapper);
|
|
88
|
+
var _default = exports.default = _default_1;
|
|
@@ -42,4 +42,7 @@ var ToolbarDecision = function ToolbarDecision(_ref) {
|
|
|
42
42
|
})
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
|
-
|
|
45
|
+
|
|
46
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
47
|
+
var _default_1 = (0, _reactIntlNext.injectIntl)(ToolbarDecision);
|
|
48
|
+
var _default = exports.default = _default_1;
|
|
@@ -41,4 +41,7 @@ var ToolbarTask = function ToolbarTask(_ref) {
|
|
|
41
41
|
})
|
|
42
42
|
});
|
|
43
43
|
};
|
|
44
|
-
|
|
44
|
+
|
|
45
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
46
|
+
var _default_1 = (0, _reactIntlNext.injectIntl)(ToolbarTask);
|
|
47
|
+
var _default = exports.default = _default_1;
|
|
@@ -6,6 +6,7 @@ import { NodeRange } from '@atlaskit/editor-prosemirror/model';
|
|
|
6
6
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
7
7
|
import { liftTarget } from '@atlaskit/editor-prosemirror/transform';
|
|
8
8
|
import { findParentNodeOfType, hasParentNodeOfType, replaceParentNodeOfType, safeInsert, setTextSelection } from '@atlaskit/editor-prosemirror/utils';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
10
|
import { stateKey } from './plugin-key';
|
|
10
11
|
import { ACTIONS } from './types';
|
|
11
12
|
const getContextData = (contextProvider = {}) => {
|
|
@@ -31,13 +32,14 @@ const generateAnalyticsPayload = (listType, contextData, inputMethod, itemLocalI
|
|
|
31
32
|
userContext
|
|
32
33
|
} = contextData);
|
|
33
34
|
}
|
|
35
|
+
const resolvedInputMethod = fg('platform_editor_element_browser_analytic') ? inputMethod : INPUT_METHOD.QUICK_INSERT;
|
|
34
36
|
return {
|
|
35
37
|
action: ACTION.INSERTED,
|
|
36
38
|
actionSubject: ACTION_SUBJECT.DOCUMENT,
|
|
37
39
|
actionSubjectId: listType === 'taskList' ? ACTION_SUBJECT_ID.ACTION : ACTION_SUBJECT_ID.DECISION,
|
|
38
40
|
eventType: EVENT_TYPE.TRACK,
|
|
39
41
|
attributes: {
|
|
40
|
-
inputMethod,
|
|
42
|
+
inputMethod: resolvedInputMethod,
|
|
41
43
|
containerAri: containerId,
|
|
42
44
|
objectAri: objectId,
|
|
43
45
|
userContext,
|
|
@@ -303,9 +303,9 @@ export const tasksAndDecisionsPlugin = ({
|
|
|
303
303
|
keywords: ['checkbox', 'task', 'todo'],
|
|
304
304
|
keyshortcut: '[]',
|
|
305
305
|
icon: () => /*#__PURE__*/React.createElement(IconAction, null),
|
|
306
|
-
action(insert, state) {
|
|
306
|
+
action(insert, state, source) {
|
|
307
307
|
var _api$analytics6;
|
|
308
|
-
return insertTaskDecisionAction(api === null || api === void 0 ? void 0 : (_api$analytics6 = api.analytics) === null || _api$analytics6 === void 0 ? void 0 : _api$analytics6.actions, getIdentifierProvider)(state, 'taskList', INPUT_METHOD.QUICK_INSERT, addItem(insert, 'taskList', state.schema));
|
|
308
|
+
return insertTaskDecisionAction(api === null || api === void 0 ? void 0 : (_api$analytics6 = api.analytics) === null || _api$analytics6 === void 0 ? void 0 : _api$analytics6.actions, getIdentifierProvider)(state, 'taskList', source !== null && source !== void 0 ? source : INPUT_METHOD.QUICK_INSERT, addItem(insert, 'taskList', state.schema));
|
|
309
309
|
}
|
|
310
310
|
}, {
|
|
311
311
|
id: 'decision',
|
|
@@ -314,9 +314,9 @@ export const tasksAndDecisionsPlugin = ({
|
|
|
314
314
|
priority: 900,
|
|
315
315
|
keyshortcut: '<>',
|
|
316
316
|
icon: () => /*#__PURE__*/React.createElement(IconDecision, null),
|
|
317
|
-
action(insert, state) {
|
|
317
|
+
action(insert, state, source) {
|
|
318
318
|
var _api$analytics7;
|
|
319
|
-
return insertTaskDecisionAction(api === null || api === void 0 ? void 0 : (_api$analytics7 = api.analytics) === null || _api$analytics7 === void 0 ? void 0 : _api$analytics7.actions, getIdentifierProvider)(state, 'decisionList', INPUT_METHOD.QUICK_INSERT, addItem(insert, 'decisionList', state.schema));
|
|
319
|
+
return insertTaskDecisionAction(api === null || api === void 0 ? void 0 : (_api$analytics7 = api.analytics) === null || _api$analytics7 === void 0 ? void 0 : _api$analytics7.actions, getIdentifierProvider)(state, 'decisionList', source !== null && source !== void 0 ? source : INPUT_METHOD.QUICK_INSERT, addItem(insert, 'decisionList', state.schema));
|
|
320
320
|
}
|
|
321
321
|
}]
|
|
322
322
|
}
|
|
@@ -60,4 +60,7 @@ const TaskItemWrapper = props => {
|
|
|
60
60
|
taskDecisionProvider: provider
|
|
61
61
|
}, props));
|
|
62
62
|
};
|
|
63
|
-
|
|
63
|
+
|
|
64
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
65
|
+
const _default_1 = injectIntl(TaskItemWrapper);
|
|
66
|
+
export default _default_1;
|
|
@@ -9,6 +9,7 @@ import { NodeRange } from '@atlaskit/editor-prosemirror/model';
|
|
|
9
9
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
10
10
|
import { liftTarget } from '@atlaskit/editor-prosemirror/transform';
|
|
11
11
|
import { findParentNodeOfType, hasParentNodeOfType, replaceParentNodeOfType, safeInsert, setTextSelection } from '@atlaskit/editor-prosemirror/utils';
|
|
12
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
13
|
import { stateKey } from './plugin-key';
|
|
13
14
|
import { ACTIONS } from './types';
|
|
14
15
|
var getContextData = function getContextData() {
|
|
@@ -31,13 +32,14 @@ var generateAnalyticsPayload = function generateAnalyticsPayload(listType, conte
|
|
|
31
32
|
objectId = contextData.objectId;
|
|
32
33
|
userContext = contextData.userContext;
|
|
33
34
|
}
|
|
35
|
+
var resolvedInputMethod = fg('platform_editor_element_browser_analytic') ? inputMethod : INPUT_METHOD.QUICK_INSERT;
|
|
34
36
|
return {
|
|
35
37
|
action: ACTION.INSERTED,
|
|
36
38
|
actionSubject: ACTION_SUBJECT.DOCUMENT,
|
|
37
39
|
actionSubjectId: listType === 'taskList' ? ACTION_SUBJECT_ID.ACTION : ACTION_SUBJECT_ID.DECISION,
|
|
38
40
|
eventType: EVENT_TYPE.TRACK,
|
|
39
41
|
attributes: {
|
|
40
|
-
inputMethod:
|
|
42
|
+
inputMethod: resolvedInputMethod,
|
|
41
43
|
containerAri: containerId,
|
|
42
44
|
objectAri: objectId,
|
|
43
45
|
userContext: userContext,
|
|
@@ -332,9 +332,9 @@ export var tasksAndDecisionsPlugin = function tasksAndDecisionsPlugin(_ref3) {
|
|
|
332
332
|
icon: function icon() {
|
|
333
333
|
return /*#__PURE__*/React.createElement(IconAction, null);
|
|
334
334
|
},
|
|
335
|
-
action: function action(insert, state) {
|
|
335
|
+
action: function action(insert, state, source) {
|
|
336
336
|
var _api$analytics6;
|
|
337
|
-
return insertTaskDecisionAction(api === null || api === void 0 || (_api$analytics6 = api.analytics) === null || _api$analytics6 === void 0 ? void 0 : _api$analytics6.actions, getIdentifierProvider)(state, 'taskList', INPUT_METHOD.QUICK_INSERT, addItem(insert, 'taskList', state.schema));
|
|
337
|
+
return insertTaskDecisionAction(api === null || api === void 0 || (_api$analytics6 = api.analytics) === null || _api$analytics6 === void 0 ? void 0 : _api$analytics6.actions, getIdentifierProvider)(state, 'taskList', source !== null && source !== void 0 ? source : INPUT_METHOD.QUICK_INSERT, addItem(insert, 'taskList', state.schema));
|
|
338
338
|
}
|
|
339
339
|
}, {
|
|
340
340
|
id: 'decision',
|
|
@@ -345,9 +345,9 @@ export var tasksAndDecisionsPlugin = function tasksAndDecisionsPlugin(_ref3) {
|
|
|
345
345
|
icon: function icon() {
|
|
346
346
|
return /*#__PURE__*/React.createElement(IconDecision, null);
|
|
347
347
|
},
|
|
348
|
-
action: function action(insert, state) {
|
|
348
|
+
action: function action(insert, state, source) {
|
|
349
349
|
var _api$analytics7;
|
|
350
|
-
return insertTaskDecisionAction(api === null || api === void 0 || (_api$analytics7 = api.analytics) === null || _api$analytics7 === void 0 ? void 0 : _api$analytics7.actions, getIdentifierProvider)(state, 'decisionList', INPUT_METHOD.QUICK_INSERT, addItem(insert, 'decisionList', state.schema));
|
|
350
|
+
return insertTaskDecisionAction(api === null || api === void 0 || (_api$analytics7 = api.analytics) === null || _api$analytics7 === void 0 ? void 0 : _api$analytics7.actions, getIdentifierProvider)(state, 'decisionList', source !== null && source !== void 0 ? source : INPUT_METHOD.QUICK_INSERT, addItem(insert, 'decisionList', state.schema));
|
|
351
351
|
}
|
|
352
352
|
}];
|
|
353
353
|
}
|
|
@@ -73,4 +73,7 @@ var TaskItemWrapper = function TaskItemWrapper(props) {
|
|
|
73
73
|
taskDecisionProvider: provider
|
|
74
74
|
}, props));
|
|
75
75
|
};
|
|
76
|
-
|
|
76
|
+
|
|
77
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
78
|
+
var _default_1 = injectIntl(TaskItemWrapper);
|
|
79
|
+
export default _default_1;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type IntlShape } from 'react-intl-next';
|
|
2
|
-
import type { DOMOutputSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import type { DOMOutputSpec, NodeSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
/**
|
|
4
4
|
* Wrapper for ADF taskItem node spec to augment toDOM implementation
|
|
5
5
|
* with fallback UI for lazy node view rendering / window virtualization
|
|
@@ -7,7 +7,7 @@ import type { DOMOutputSpec, Node as PMNode } from '@atlaskit/editor-prosemirror
|
|
|
7
7
|
* @returns
|
|
8
8
|
* @example
|
|
9
9
|
*/
|
|
10
|
-
export declare const taskItemNodeSpec: () =>
|
|
10
|
+
export declare const taskItemNodeSpec: () => NodeSpec;
|
|
11
11
|
/**
|
|
12
12
|
* Wrapper for ADF blockTaskItem node spec to augment toDOM implementation
|
|
13
13
|
* with fallback UI for lazy node view rendering / window virtualization
|
|
@@ -15,7 +15,7 @@ export declare const taskItemNodeSpec: () => import("prosemirror-model").NodeSpe
|
|
|
15
15
|
* @returns
|
|
16
16
|
* @example
|
|
17
17
|
*/
|
|
18
|
-
export declare const blockTaskItemNodeSpec: () =>
|
|
18
|
+
export declare const blockTaskItemNodeSpec: () => NodeSpec;
|
|
19
19
|
/**
|
|
20
20
|
* Converts a task item node to a DOM output specification.
|
|
21
21
|
* This is used for rendering the task item in the editor.
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { NodeSpec } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
export declare const decisionItemSpecWithFixedToDOM: () => NodeSpec;
|
|
@@ -12,7 +12,7 @@ export declare const isTable: (node?: Node | null) => boolean;
|
|
|
12
12
|
* Creates a NodeRange around the given taskItem and the following
|
|
13
13
|
* ("nested") taskList, if one exists.
|
|
14
14
|
*/
|
|
15
|
-
export declare const getBlockRange: ({ $from, $to }: {
|
|
15
|
+
export declare const getBlockRange: ({ $from, $to, }: {
|
|
16
16
|
$from: ResolvedPos;
|
|
17
17
|
$to: ResolvedPos;
|
|
18
18
|
}) => NodeRange | null;
|
|
@@ -9,8 +9,8 @@ export declare const getListTypes: (listType: TaskDecisionListType, schema: Sche
|
|
|
9
9
|
item: NodeType;
|
|
10
10
|
list: NodeType;
|
|
11
11
|
};
|
|
12
|
-
export declare const insertTaskDecisionAction: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, getContextIdentifierProvider: GetContextIdentifier) => (state: EditorState, listType: TaskDecisionListType, inputMethod?: INPUT_METHOD.FORMATTING | INPUT_METHOD.QUICK_INSERT |
|
|
13
|
-
export declare const insertTaskDecisionCommand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, getContextIdentifierProvider: GetContextIdentifier) => (listType: TaskDecisionListType, inputMethod?: INPUT_METHOD.FORMATTING | INPUT_METHOD.QUICK_INSERT | TOOLBAR_MENU_TYPE, addItem?: AddItemTransactionCreator, listLocalId?: string, itemLocalId?: string) => Command;
|
|
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
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
15
|
export declare const isSupportedSourceNode: (schema: Schema, selection: Selection) => boolean;
|
|
16
16
|
export declare const changeInDepth: (before: ResolvedPos, after: ResolvedPos) => number;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
export declare const stateKey: PluginKey
|
|
2
|
+
export declare const stateKey: PluginKey;
|
|
@@ -7,7 +7,7 @@ import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/stat
|
|
|
7
7
|
import { type DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
8
8
|
import type { TaskDecisionProvider } from '@atlaskit/task-decision/types';
|
|
9
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;
|
|
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
11
|
export type ContextData = {
|
|
12
12
|
containerId: string;
|
|
13
13
|
objectId: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactElement, Ref } from 'react';
|
|
2
2
|
import React, { PureComponent } from 'react';
|
|
3
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
3
|
+
import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
|
|
4
4
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
5
5
|
import { type ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
6
6
|
import type { ContentRef } from '@atlaskit/task-decision';
|
|
@@ -33,7 +33,7 @@ export declare class TaskItem extends PureComponent<TaskItemProps, Object> {
|
|
|
33
33
|
private renderWithProvider;
|
|
34
34
|
render(): React.JSX.Element;
|
|
35
35
|
}
|
|
36
|
-
declare const
|
|
36
|
+
declare const _default_1: React.FC<WithIntlProps<TaskProps & WrappedComponentProps>> & {
|
|
37
37
|
WrappedComponent: React.ComponentType<TaskProps & WrappedComponentProps>;
|
|
38
38
|
};
|
|
39
|
-
export default
|
|
39
|
+
export default _default_1;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
2
|
+
import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
|
|
3
3
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
import type { TasksAndDecisionsPlugin } from '../../tasksAndDecisionsPluginType';
|
|
@@ -12,7 +12,7 @@ export interface Props {
|
|
|
12
12
|
export interface State {
|
|
13
13
|
disabled: boolean;
|
|
14
14
|
}
|
|
15
|
-
declare const
|
|
15
|
+
declare const _default_1: React.FC<WithIntlProps<Props & WrappedComponentProps>> & {
|
|
16
16
|
WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
|
|
17
17
|
};
|
|
18
|
-
export default
|
|
18
|
+
export default _default_1;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
2
|
+
import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
|
|
3
3
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
import type { TasksAndDecisionsPlugin } from '../../tasksAndDecisionsPluginType';
|
|
@@ -12,7 +12,7 @@ export interface Props {
|
|
|
12
12
|
export interface State {
|
|
13
13
|
disabled: boolean;
|
|
14
14
|
}
|
|
15
|
-
declare const
|
|
15
|
+
declare const _default_1: React.FC<WithIntlProps<Props & WrappedComponentProps>> & {
|
|
16
16
|
WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
|
|
17
17
|
};
|
|
18
|
-
export default
|
|
18
|
+
export default _default_1;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type IntlShape } from 'react-intl-next';
|
|
2
|
-
import type { DOMOutputSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import type { DOMOutputSpec, NodeSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
/**
|
|
4
4
|
* Wrapper for ADF taskItem node spec to augment toDOM implementation
|
|
5
5
|
* with fallback UI for lazy node view rendering / window virtualization
|
|
@@ -7,7 +7,7 @@ import type { DOMOutputSpec, Node as PMNode } from '@atlaskit/editor-prosemirror
|
|
|
7
7
|
* @returns
|
|
8
8
|
* @example
|
|
9
9
|
*/
|
|
10
|
-
export declare const taskItemNodeSpec: () =>
|
|
10
|
+
export declare const taskItemNodeSpec: () => NodeSpec;
|
|
11
11
|
/**
|
|
12
12
|
* Wrapper for ADF blockTaskItem node spec to augment toDOM implementation
|
|
13
13
|
* with fallback UI for lazy node view rendering / window virtualization
|
|
@@ -15,7 +15,7 @@ export declare const taskItemNodeSpec: () => import("prosemirror-model").NodeSpe
|
|
|
15
15
|
* @returns
|
|
16
16
|
* @example
|
|
17
17
|
*/
|
|
18
|
-
export declare const blockTaskItemNodeSpec: () =>
|
|
18
|
+
export declare const blockTaskItemNodeSpec: () => NodeSpec;
|
|
19
19
|
/**
|
|
20
20
|
* Converts a task item node to a DOM output specification.
|
|
21
21
|
* This is used for rendering the task item in the editor.
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { NodeSpec } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
export declare const decisionItemSpecWithFixedToDOM: () => NodeSpec;
|
|
@@ -12,7 +12,7 @@ export declare const isTable: (node?: Node | null) => boolean;
|
|
|
12
12
|
* Creates a NodeRange around the given taskItem and the following
|
|
13
13
|
* ("nested") taskList, if one exists.
|
|
14
14
|
*/
|
|
15
|
-
export declare const getBlockRange: ({ $from, $to }: {
|
|
15
|
+
export declare const getBlockRange: ({ $from, $to, }: {
|
|
16
16
|
$from: ResolvedPos;
|
|
17
17
|
$to: ResolvedPos;
|
|
18
18
|
}) => NodeRange | null;
|
|
@@ -9,8 +9,8 @@ export declare const getListTypes: (listType: TaskDecisionListType, schema: Sche
|
|
|
9
9
|
item: NodeType;
|
|
10
10
|
list: NodeType;
|
|
11
11
|
};
|
|
12
|
-
export declare const insertTaskDecisionAction: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, getContextIdentifierProvider: GetContextIdentifier) => (state: EditorState, listType: TaskDecisionListType, inputMethod?: INPUT_METHOD.FORMATTING | INPUT_METHOD.QUICK_INSERT |
|
|
13
|
-
export declare const insertTaskDecisionCommand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, getContextIdentifierProvider: GetContextIdentifier) => (listType: TaskDecisionListType, inputMethod?: INPUT_METHOD.FORMATTING | INPUT_METHOD.QUICK_INSERT | TOOLBAR_MENU_TYPE, addItem?: AddItemTransactionCreator, listLocalId?: string, itemLocalId?: string) => Command;
|
|
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
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
15
|
export declare const isSupportedSourceNode: (schema: Schema, selection: Selection) => boolean;
|
|
16
16
|
export declare const changeInDepth: (before: ResolvedPos, after: ResolvedPos) => number;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
export declare const stateKey: PluginKey
|
|
2
|
+
export declare const stateKey: PluginKey;
|
|
@@ -7,7 +7,7 @@ import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/stat
|
|
|
7
7
|
import { type DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
8
8
|
import type { TaskDecisionProvider } from '@atlaskit/task-decision/types';
|
|
9
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;
|
|
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
11
|
export type ContextData = {
|
|
12
12
|
containerId: string;
|
|
13
13
|
objectId: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactElement, Ref } from 'react';
|
|
2
2
|
import React, { PureComponent } from 'react';
|
|
3
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
3
|
+
import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
|
|
4
4
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
5
5
|
import { type ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
6
6
|
import type { ContentRef } from '@atlaskit/task-decision';
|
|
@@ -33,7 +33,7 @@ export declare class TaskItem extends PureComponent<TaskItemProps, Object> {
|
|
|
33
33
|
private renderWithProvider;
|
|
34
34
|
render(): React.JSX.Element;
|
|
35
35
|
}
|
|
36
|
-
declare const
|
|
36
|
+
declare const _default_1: React.FC<WithIntlProps<TaskProps & WrappedComponentProps>> & {
|
|
37
37
|
WrappedComponent: React.ComponentType<TaskProps & WrappedComponentProps>;
|
|
38
38
|
};
|
|
39
|
-
export default
|
|
39
|
+
export default _default_1;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
2
|
+
import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
|
|
3
3
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
import type { TasksAndDecisionsPlugin } from '../../tasksAndDecisionsPluginType';
|
|
@@ -12,7 +12,7 @@ export interface Props {
|
|
|
12
12
|
export interface State {
|
|
13
13
|
disabled: boolean;
|
|
14
14
|
}
|
|
15
|
-
declare const
|
|
15
|
+
declare const _default_1: React.FC<WithIntlProps<Props & WrappedComponentProps>> & {
|
|
16
16
|
WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
|
|
17
17
|
};
|
|
18
|
-
export default
|
|
18
|
+
export default _default_1;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
2
|
+
import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
|
|
3
3
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
import type { TasksAndDecisionsPlugin } from '../../tasksAndDecisionsPluginType';
|
|
@@ -12,7 +12,7 @@ export interface Props {
|
|
|
12
12
|
export interface State {
|
|
13
13
|
disabled: boolean;
|
|
14
14
|
}
|
|
15
|
-
declare const
|
|
15
|
+
declare const _default_1: React.FC<WithIntlProps<Props & WrappedComponentProps>> & {
|
|
16
16
|
WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
|
|
17
17
|
};
|
|
18
|
-
export default
|
|
18
|
+
export default _default_1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-tasks-and-decisions",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.2",
|
|
4
4
|
"description": "Tasks and decisions plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -49,14 +49,14 @@
|
|
|
49
49
|
"@atlaskit/primitives": "^18.0.0",
|
|
50
50
|
"@atlaskit/prosemirror-input-rules": "^3.6.0",
|
|
51
51
|
"@atlaskit/task-decision": "^19.3.0",
|
|
52
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
52
|
+
"@atlaskit/tmp-editor-statsig": "^37.0.0",
|
|
53
53
|
"@atlaskit/tokens": "^11.1.0",
|
|
54
54
|
"@babel/runtime": "^7.0.0",
|
|
55
55
|
"@compiled/react": "^0.20.0",
|
|
56
56
|
"bind-event-listener": "^3.0.0"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@atlaskit/editor-common": "^112.
|
|
59
|
+
"@atlaskit/editor-common": "^112.2.0",
|
|
60
60
|
"react": "^18.2.0",
|
|
61
61
|
"react-dom": "^18.2.0",
|
|
62
62
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
@@ -101,6 +101,9 @@
|
|
|
101
101
|
}
|
|
102
102
|
},
|
|
103
103
|
"platform-feature-flags": {
|
|
104
|
+
"platform_editor_element_browser_analytic": {
|
|
105
|
+
"type": "boolean"
|
|
106
|
+
},
|
|
104
107
|
"platform_editor_blocktaskitem_patch_2": {
|
|
105
108
|
"type": "boolean"
|
|
106
109
|
},
|